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
b40eb5723eeab38edb2440d04d65f1c5be4ad4c0
Create solution.py
data_structures/linked_list/problems/anagrams/py/solution.py
data_structures/linked_list/problems/anagrams/py/solution.py
Python
0.000018
@@ -0,0 +1,393 @@ +import LinkedList%0A%0A# Problem description: %0A# Solution time complexity: %0A# Comments: %0A%0A# Linked List Node inside the LinkedList module is declared as:%0A#%0A# class Node:%0A# def __init__(self, val, nxt=None):%0A# self.val = val%0A# self.nxt...
e9a71173eae28b378052ddce4e0fe8a3d3313c4e
Disable screenshot_sync_tests on Mac.
content/test/gpu/gpu_tests/screenshot_sync.py
content/test/gpu/gpu_tests/screenshot_sync.py
# Copyright 2014 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 os import screenshot_sync_expectations as expectations from telemetry import test from telemetry.core import util from telemetry.page import page fro...
Python
0.000006
@@ -962,16 +962,37 @@ ssage)%0A%0A +@test.Disabled('mac') %0Aclass S
48e19852c6e1f5a0f2792a62adeb560121d77d11
Create __init__.py
crispy/__init__.py
crispy/__init__.py
Python
0.000429
@@ -0,0 +1 @@ +%0A
bad7bfee43ef7d560b186d3f41af2aa35fe0c4af
allow FactorScheduler factor=1
python/mxnet/lr_scheduler.py
python/mxnet/lr_scheduler.py
""" learning rate scheduler, which adaptive changes the learning rate based on the progress """ import logging class LRScheduler(object): """Base class of a learning rate scheduler""" def __init__(self): """ base_lr : float the initial learning rate """ self.base_lr ...
Python
0.000005
@@ -1565,33 +1565,32 @@ if factor %3E -= 1.0:%0A @@ -1616,36 +1616,39 @@ %22Factor must be -less +no more than 1 to make @@ -3133,17 +3133,16 @@ factor %3E -= 1.0:%0A @@ -3188,12 +3188,15 @@ be -less +no more tha
ca25a4e2aedd657a10c7bfa2849f9f3d16f5ee9f
Add Eq demo
demo/eq.py
demo/eq.py
Python
0.000001
@@ -0,0 +1,1630 @@ +# typeclasses, an educational implementation of Haskell-style type%0A# classes, in Python%0A#%0A# Copyright (C) 2010 Nicolas Trangez %3Ceikke eikke com%3E%0A#%0A# This library is free software; you can redistribute it and/or%0A# modify it under the terms of the GNU Lesser General Public%0A# License...
176ab29c5f0506d5ba94a2676b81f34f7e2a6b3b
Add migration for expiration_date change (#28)
groups_manager/migrations/0005_auto_20181001_1009.py
groups_manager/migrations/0005_auto_20181001_1009.py
Python
0.000002
@@ -0,0 +1,510 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.9 on 2018-10-01 10:09%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('groups_manager', '0004_0_6_0_groupmember_expiration_da...
9e56283eaf998f59e4e07dd61999c4c5ac8d919c
Fix position of add_entities of binary sensor (#22866)
homeassistant/components/concord232/binary_sensor.py
homeassistant/components/concord232/binary_sensor.py
""" Support for exposing Concord232 elements as sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/binary_sensor.concord232/ """ import datetime import logging import requests import voluptuous as vol from homeassistant.components.binary_sensor im...
Python
0
@@ -2592,20 +2592,16 @@ )%0A%0A - add_
caa92a302f3dcc6ed084ebc9f20db28c63d48d29
Add missing file
irrigator_pro/uga/aggregates.py
irrigator_pro/uga/aggregates.py
Python
0.000006
@@ -0,0 +1,859 @@ +from django.db import connections%0Afrom django.db.models.aggregates import Aggregate%0Afrom django.db.models.sql.aggregates import Aggregate as SQLAggregate%0Afrom uga.models import UGAProbeData%0A%0A__initialized__ = False%0A%0Aclass SimpleAggregate(Ag...
253cda3fc9d377dc64fe4b67b5fe55f911c8693f
Add startsliver script.
protogeni/test/startsliver.py
protogeni/test/startsliver.py
Python
0
@@ -0,0 +1,1720 @@ +#! /usr/bin/env python%0A#%0A# GENIPUBLIC-COPYRIGHT%0A# Copyright (c) 2008-2009 University of Utah and the Flux Group.%0A# All rights reserved.%0A# %0A# Permission to use, copy, modify and distribute this software is hereby%0A# granted provided that (1) source code retains these copyright, permissio...
aa88f2b64c8c2837022ee020862ec2c0a9a6e7ad
Add fabfile for generating docs in gh-pages branch.
fabfile.py
fabfile.py
Python
0
@@ -0,0 +1,1048 @@ +from __future__ import with_statement%0A%0Aimport os%0Afrom fabric.api import abort, local, task, lcd%0A%0A%0A@task(default=True)%0Adef docs(clean='no', browse_='no'):%0A with lcd('docs'):%0A local('make clean html')%0A temp_path = %22/tmp/openxc-python-docs%22%0A docs_path = %22%25s...
1e4f86f3184d0ae09d2a14690257ba9d4c44edb1
remove dups (local sequence alignments)
repertoire/collapse_reads.py
repertoire/collapse_reads.py
Python
0
@@ -0,0 +1,2262 @@ +#!/usr/bin/env python%0A# encoding: utf-8%0A%22%22%22%0Amatches = pairwise2.align.localms(target, query, 1, -1, -3, -2)%0Atry:%0A # highest scoring match first%0A return int(matches%5B0%5D%5B3%5D)%0Aexcept IndexError:%0A%22%22%22%0Aimport sys%0Afrom toolshed import nopen%0Afrom parsers import ...
736093f945ff53c4fe6d9d8d2e0c4afc28d9ace3
Add answer to leetcode rotate list
chimera/py/leetcode_rotate_list.py
chimera/py/leetcode_rotate_list.py
Python
0.000002
@@ -0,0 +1,893 @@ +# coding=utf-8%0A%22%22%22%0Achimera.leetcode_rotate_list%0A~~~~~~~~~~~~~~~~~~~~~~~~~~~~%0A%0AGiven a list, rotate the list to the right by k places, where k is%0Anon-negative.%0A%0AFor example:%0AGiven 1-%3E2-%3E3-%3E4-%3E5-%3ENULL and k = 2,%0Areturn 4-%3E5-%3E1-%3E2-%3E3-%3ENULL.%0A%0A%22%22%22%0A...
22bb91cfc1b1dc637e33625dcbaf3e8499b384ec
Add LinearRegression.py
1-LinearRegression/LinearRegression.py
1-LinearRegression/LinearRegression.py
Python
0.000295
@@ -0,0 +1,2821 @@ +import tensorflow as tf%0A%0A%0A# TensorFlow Example (1) - Linear Regression%0A#%0A# (model) y = ax + b%0A# By giving some pairs of (x, y) that satisfies the given model,%0A# TensorFlow can compute the value of 'a' and 'b'%0A# by using very simple Machine Learning(ML) algorithm.%0A%0A%0A# 1. impleme...
08d7e10d74297f16e4bcb5cfb7de0749d9d101bc
add missing fiel
codeskel/localcommands/__init__.py
codeskel/localcommands/__init__.py
Python
0.000006
@@ -0,0 +1,2 @@ + %0A
0c289af5ef7f26796bdc4b4183f456074f7440f7
Create dijkstra.py
3-AlgorithmsOnGraphs/Week4/dijkstra/dijkstra.py
3-AlgorithmsOnGraphs/Week4/dijkstra/dijkstra.py
Python
0.000001
@@ -0,0 +1,1388 @@ +#Uses python3%0A%0Aimport sys%0Aimport queue%0A%0A%0A%0Adef Dijkstra(adj, s, cost, t):%0A dist = list()%0A prev = list()%0A inf = 0%0A for c in cost:%0A inf += sum(c)%0A inf += 1%0A for u in range(0, len(adj)):%0A dist.append(inf)%0A prev.append(None)%0A dis...
18e8cee5c19329dac7e931cb00e67f8d19e3f89d
add script `compare_win_set`
examples/bunny/compare_win_set.py
examples/bunny/compare_win_set.py
Python
0
@@ -0,0 +1,793 @@ +from dd import cudd%0A%0A%0Ab = cudd.BDD()%0Au_gr1x = cudd.load('winning_set', b)%0Au_slugs = b.load('winning_set_bdd.txt')%0A%0Aenv_action_slugs = b.load('env_action_slugs.txt')%0Asys_action_slugs = b.load('sys_action_slugs.txt')%0Aassumption_0_slugs = b.load('assumption_0_slugs.txt')%0Agoal_0_slugs...
cc19cdc3430df018e3a8fa63abaf796a897a475b
Add naive bayes SQL test.
Orange/tests/sql/test_naive_bayes.py
Orange/tests/sql/test_naive_bayes.py
Python
0.000001
@@ -0,0 +1,1084 @@ +import unittest%0A%0Afrom numpy import array%0A%0Aimport Orange.classification.naive_bayes as nb%0Afrom Orange.data.discretization import DiscretizeTable%0Afrom Orange.data.sql.table import SqlTable%0Afrom Orange.data.variable import DiscreteVariable%0A%0A%0Aclass NaiveBayesTest(unittest.TestCase):%...
0ed71f8c580e8eb80c55b817c3f971b946016f02
update docstring for Postman.connection
mailthon/postman.py
mailthon/postman.py
""" mailthon.postman ~~~~~~~~~~~~~~~~ This module implements the central Postman object. :copyright: (c) 2015 by Eeo Jun :license: MIT, see LICENSE for details. """ from contextlib import contextmanager from smtplib import SMTP from .response import SendmailResponse from .helpers import encode_ad...
Python
0
@@ -1670,25 +1670,35 @@ ress - and port +, port, and options that ha s be @@ -1697,14 +1697,10 @@ t ha -s been +ve %0A @@ -1704,16 +1704,21 @@ +been passed t
c9dde0a5d40a79d98f01c4214a90321844355444
Include link details in IXP matcher, version bump
peeringdb/PeeringDB.py
peeringdb/PeeringDB.py
# Copyright 2015 Netflix. 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 required...
Python
0
@@ -3950,56 +3950,335 @@ lan_ -match.append(ixlan_obj)%0A%0A return ixlan_match +obj%5B%22links%22%5D = self.get_ixlanlinks(asns%5Basn%5D, ixlan)%0A ixlan_match.append(ixlan_obj)%0A%0A return ixlan_match%0A%0A%0A def get_ixlanlinks(self, asn, ixlan_id):%0A links = %5B%5D%0A ...
78f89e96adedd1045f900d5f9f95c3eb35c12ca3
Create routine module with Tool class
performance/routine.py
performance/routine.py
Python
0
@@ -0,0 +1,59 @@ +%0A%0Aclass Tool:%0A def __init__(self, config):%0A pass%0A
6c0aab6c14539b1cd4eedcd1280bcc4eb35ff7ea
Create poly_talker.py
poly_talker.py
poly_talker.py
Python
0.000001
@@ -0,0 +1,664 @@ +#! /usr/bin/env python%0A%0Aimport rospy%0Afrom std_msgs.msg import String%0Afrom random import randint%0A%0Adef talker():%0A%09# List of names to be printed%0A%09words = %5B%22Dr. Bushey%22, %22Vamsi%22, %22Jon%22%5D%0A%09%0A%09# Registers with roscore a node called %22talker%22. %0A%09# ROS program...
7b3753428f04c86b95191e76ca2c50b54577411a
add problem 27
problem_027.py
problem_027.py
Python
0.019702
@@ -0,0 +1,1504 @@ +#!/usr/bin/env python%0A#-*-coding:utf-8-*-%0A%0A'''%0AEuler discovered the remarkable quadratic formula:%0A%0An%C2%B2 + n + 41%0A%0AIt turns out that the formula will produce 40 primes for%0Athe consecutive values n = 0 to 39.%0AHowever, when n = 40, 402 + 40 + 41 = 40(40 + 1) + 41 is%0Adivisible b...
f530fb3ebe5639d7d6dfe013c5abc70769009a04
add script
collapse.py
collapse.py
Python
0.000001
@@ -0,0 +1,798 @@ +#!/usr/bin/env python%0Aimport json%0Aimport sys%0Aimport argparse%0Aimport xmldict%0A%0Af='bla.json'%0Aref=2%0Aout=%5B%5D%0Awith open(f) as data_file:%0A pages = json.load(data_file)%0A for page in pages:%0A data = page%5B'data'%5D%0A lineIter = iter(data)%0A oldline = None%0A for line...
e9451a8b2d196353e393d265482e37faa651eb1e
Tue Nov 4 20:46:16 PKT 2014 Init
chromepass.py
chromepass.py
Python
0
@@ -0,0 +1,639 @@ +from os import getenv%0Aimport sqlite3%0Aimport win32crypt%0A%0Aappdata = getenv(%22APPDATA%22) %0Aconnection = sqlite3.connect(appdata + %22%5C..%5CLocal%5CGoogle%5CChrome%5CUser Data%5CDefault%5CLogin Data%22)%0Acursor = connection.cursor()%0Acursor.execute('SELECT action_url, username_value, passw...
cf9b6b477e6d044e4065086f98906a0eb4504ff3
Add slack_nagios script
slack_nagios.py
slack_nagios.py
Python
0
@@ -0,0 +1,2175 @@ +#!/bin/python%0A%0Aimport argparse%0Aimport requests%0A%0A%22%22%22%0AA simple script to post nagios notifications to slack%0A%0ASimilar to https://raw.github.com/tinyspeck/services-examples/master/nagios.pl%0ABut adds proxy support%0A%0ANote: If your internal proxy only exposes an http interface, y...
f437b7875aa4bed06dcf3884bb81c009b7e473f0
Add 290-word-pattern.py
290-word-pattern.py
290-word-pattern.py
Python
0.999973
@@ -0,0 +1,1929 @@ +%22%22%22%0AQuestion:%0A Word Pattern%0A%0A Given a pattern and a string str, find if str follows the same pattern.%0A%0A Examples:%0A pattern = %22abba%22, str = %22dog cat cat dog%22 should return true.%0A pattern = %22abba%22, str = %22dog cat cat fish%22 should return false.%0A ...
f39a640a8d5bf7d4a5d80f94235d1fa7461bd4dc
Add code for stashing a single nuxeo image on s3.
s3stash/stash_single_image.py
s3stash/stash_single_image.py
Python
0
@@ -0,0 +1,1899 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0Aimport sys, os%0Aimport argparse%0Aimport logging%0Aimport json%0Afrom s3stash.nxstashref_image import NuxeoStashImage%0A%0Adef main(argv=None):%0A%0A parser = argparse.ArgumentParser(description='Produce jp2 version of Nuxeo image file and stash ...
12821e2859151e8f949f55b8c363ff95d296a7d0
add setup.py for python interface
python/setup.py
python/setup.py
Python
0.000001
@@ -0,0 +1,607 @@ +#!/usr/bin/env python%0A%0Afrom distutils.core import setup, Extension%0A%0Asetup(name = %22LIBSVM%22,%0A version = %222.87%22,%0A author=%22Chih-Chung Chang and Chih-Jen Lin%22,%0A maintainer=%22Chih-Jen Lin%22,%0A maintainer_email=%22cjlin@csie.ntu.edu.tw%22,%0A url=%22http...
fc911a4952a46ea372e1a42cff78351b4f8b42ef
complete 15 lattice paths
15-lattice-paths.py
15-lattice-paths.py
Python
0
@@ -0,0 +1,426 @@ +from collections import defaultdict%0Afrom math import factorial as fac%0A%0Aif __name__ == '__main__':%0A # Dynamic programming method%0A paths = defaultdict(dict)%0A for i in range(21):%0A paths%5B0%5D%5Bi%5D = 1%0A paths%5Bi%5D%5B0%5D = 1%0A for i in range(1, 21):%0A ...
684387315025bc7789aa75def757894cb8d92154
add quickie Python JSON-filtering script
dev/filter_json.py
dev/filter_json.py
Python
0.000001
@@ -0,0 +1,1230 @@ +# == BSD2 LICENSE ==%0A# Copyright (c) 2014, Tidepool Project%0A# %0A# This program is free software; you can redistribute it and/or modify it under%0A# the terms of the associated License, which is identical to the BSD 2-Clause%0A# License as published by the Open Source Initiative at opensource.or...
7d20f9bcbfda514c216fb7faaa08325f21c0e119
add 01 code
01-two-snum.py
01-two-snum.py
Python
0
@@ -0,0 +1,449 @@ +class Solution(object):%0A def twoSum(self, nums, target):%0A %22%22%22%0A :type nums: List%5Bint%5D%0A :type target: int%0A :rtype: List%5Bint%5D%0A %22%22%22%0A for i in range(len(nums)):%0A last = nums%5Bi%5D%0A # print last%0A ...
dd2422293e403a9f664fe887d3fd0950ba540fc0
the inverse returns an int
044_pentagon_numbers.py
044_pentagon_numbers.py
Python
0.99996
@@ -0,0 +1,1201 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A#%0A# A Solution to %22Pentagon numbers%22 %E2%80%93 Project Euler Problem No. 44%0A# by Florian Buetow%0A#%0A# Sourcecode: https://github.com/fbcom/project-euler%0A# Problem statement: https://projecteuler.net/problem=44%0A%0A%0Adef get_pentagonal_n...
b699a18f8928a6e859ebc34a843e4c8a64a22b26
add script to grid-search model parameters — script from scikit-learn: http://scikit-learn.org/stable/modules/generated/sklearn.model_selection.GridSearchCV.html#sklearn.model_selection.GridSearchCV
scripts/grid_search_digits.py
scripts/grid_search_digits.py
Python
0
@@ -0,0 +1,2764 @@ +%22%22%22%0A============================================================%0AParameter estimation using grid search with cross-validation%0A============================================================%0A%0AThis examples shows how a classifier is optimized by cross-validation,%0Awhich is done using the...
3c2316b69fcee9db820937c2814a9872e27f95a9
Implement frequent direction sketch
fd_sketch.py
fd_sketch.py
Python
0.000037
@@ -0,0 +1,2649 @@ +# -*- coding: utf-8 -*-%0A#!/usr/bin/env python%0A%0Aimport numpy as np%0Aimport numpy.linalg as ln%0Aimport math%0Aimport sys%0A%0A%22%22%22 This is a simple and deterministic method for matrix sketch.%0AThe original method has been introduced in %5BLiberty2013%5D_ .%0A%0A%5BLiberty2013%5D Edo Libe...
fe86df913b79fdf8c3627fe31b87c6dfa3da4f46
implement QEngine
engines/QEngine.py
engines/QEngine.py
Python
0.000007
@@ -0,0 +1,778 @@ +#!/usr/bin/env python3%0Afrom ChessEngine import ChessEngine%0Aimport chess%0Aimport sys%0Asys.path.append('.')%0Aimport data%0A%0Aclass QEngine(ChessEngine):%0A def __init__(self, picklefile):%0A super().__init__()%0A with open(picklefile, %22rb%22) as f:%0A self.Q = pick...
e782e519012c4734f591388114fc954fdc014acf
add thousands_separator in Python to format folder
src/Python/format/thousands_separator.py
src/Python/format/thousands_separator.py
Python
0
@@ -0,0 +1,72 @@ +#!/usr/bin/env python%0A%0Aprint %22 Formated number:%22, %22%7B:,%7D%22.format(102403)%0A
3e8c18b32058d9d33ae0d12744355bb65c2b96ed
add alembic migration for orders table
migrations/versions/187cf9175cee_add_orders_table.py
migrations/versions/187cf9175cee_add_orders_table.py
Python
0
@@ -0,0 +1,2064 @@ +%22%22%22add orders table%0A%0ARevision ID: 187cf9175cee%0ARevises: 3d8cf74c2de4%0ACreate Date: 2015-10-23 23:43:31.769594%0A%0A%22%22%22%0A%0A# revision identifiers, used by Alembic.%0Arevision = '187cf9175cee'%0Adown_revision = '3d8cf74c2de4'%0A%0Afrom alembic import op%0Aimport sqlalchemy as sa%0...
64dede2c9a3d489eb8c93200ea8788c26db6da31
Create 6kyu_divisor_harmony.py
Solutions/6kyu/6kyu_divisor_harmony.py
Solutions/6kyu/6kyu_divisor_harmony.py
Python
0.000014
@@ -0,0 +1,292 @@ +def solve(a,b):%0A pairs=%7B%7D%0A for i in range(a,b):%0A ratio=div_sum(i)/i%0A try: pairs%5Bratio%5D=pairs%5Bratio%5D+%5Bi%5D%0A except: pairs%5Bratio%5D=%5Bi%5D%0A return sum(min(i) for i in pairs.values() if len(i)%3E=2)%0A%0A %0Adef div_sum(n):%0A return su...
de7b7d10e5776d631c15660255cf8ad2b85f3d25
Create Beginner 10-A.py
Beginner/10/10-A.py
Beginner/10/10-A.py
Python
0.000084
@@ -0,0 +1,60 @@ +#AtCoder Beginner 10 A%0Aname = raw_input()%0Aprint name + %22pp%22%0A
cd44c385812718d16cc7a490946c7142bebacbfa
Convert evesrp/__init__.py to use explicit unicode literals
evesrp/__init__.py
evesrp/__init__.py
from __future__ import absolute_import from __future__ import unicode_literals import locale import os import requests from flask import Flask, current_app, g from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.wtf.csrf import CsrfProtect db = SQLAlchemy() from .util import DB_STATS from .util.request import...
Python
0.020146
@@ -36,48 +36,8 @@ ort%0A -from __future__ import unicode_literals%0A impo @@ -304,16 +304,17 @@ ion__ = +u '0.7.1'%0A @@ -1437,16 +1437,17 @@ le(rule= +u '/', vie @@ -2547,16 +2547,16 @@ sion__,%0A - @@ -2599,16 +2599,17 @@ E_NAME'%5D +, %0A
75b4c2deac9ff23a5a3c24b3d2450cd23ae3d705
Fix crash in repo info when `%` is used in commit messages
subcmds/info.py
subcmds/info.py
# # Copyright (C) 2012 The Android Open Source Project # # 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 la...
Python
0.000003
@@ -2018,32 +2018,38 @@ text = self.out. +nofmt_ printer('text')%0A
871e9e4bdca027e577bdcde38f483e2de32c8528
Add simple example
examples/simple.py
examples/simple.py
Python
0.000375
@@ -0,0 +1,1578 @@ +# -*- coding: utf-8 -*-%0A%0Aimport time%0A%0Afrom apns_proxy_client import APNSProxyClient%0A%0Avalid_token = %22YOUR VALID TOKEN%22%0A%0A%0Adef main():%0A client = APNSProxyClient(host=%22localhost%22, port=5556, application_id=%2214%22)%0A i = 0%0A%0A with client:%0A token = valid...
9ec5e3f57a64e6242b5d91eb0bf66e238fa48ec2
call superclass __init__() in constructor
smartcard/pyro/PyroReader.py
smartcard/pyro/PyroReader.py
"""PyroReaderClient: concrete reader class for Remote Readers __author__ = "gemalto http://www.gemalto.com" Copyright 2001-2012 gemalto Author: Jean-Daniel Aussel, mailto:jean-daniel.aussel@gemalto.com This file is part of pyscard. pyscard is free software; you can redistribute it and/or modify it under the terms o...
Python
0.000024
@@ -1231,24 +1231,61 @@ yro URI.%22%22%22%0A + super().__init__(readername)%0A ns =
9f7bd49350b0d1b8a8986b28db75a5b369bf7bb5
Add py solution for 393. UTF-8 Validation
py/utf-8-validation.py
py/utf-8-validation.py
Python
0.000002
@@ -0,0 +1,940 @@ +class Solution(object):%0A def validUtf8(self, data):%0A %22%22%22%0A :type data: List%5Bint%5D%0A :rtype: bool%0A %22%22%22%0A it = iter(data)%0A while True:%0A try:%0A c = it.next() & 0xff%0A try:%0A ...
fb70822079c47962f0f713bcea43af80fe58d93e
add example using the VTKMesh class
examples/mesh_vtk_example.py
examples/mesh_vtk_example.py
Python
0
@@ -0,0 +1,1246 @@ +from numpy import array%0A%0Afrom simphony.cuds.mesh import Point, Cell, Edge, Face%0Afrom simphony.core.data_container import DataContainer%0Afrom simphony_mayavi.cuds.api import VTKMesh%0A%0A%0Apoints = array(%5B%0A %5B0, 0, 0%5D, %5B1, 0, 0%5D, %5B0, 1, 0%5D, %5B0, 0, 1%5D,%0A %5B2, 0, 0%5D...
bdc062830a943a312dc6b56002f5ca6ae3990b80
add example
examples/peer/peer_matrix.py
examples/peer/peer_matrix.py
Python
0.000002
@@ -0,0 +1,440 @@ +import cupy%0A%0A%0Adef main():%0A gpus = cupy.cuda.runtime.getDeviceCount()%0A for peerDevice in range(gpus):%0A for device in range(gpus):%0A if peerDevice == device:%0A continue%0A flag = cupy.cuda.runtime.deviceCanAccessPeer(device, peerDevice)%0A...
51530297a561fa9630f69c70810c1b4bbeb7ecf0
Create testmessage table
migrations/versions/187eade64ef0_create_testmessage_table.py
migrations/versions/187eade64ef0_create_testmessage_table.py
Python
0
@@ -0,0 +1,976 @@ +%22%22%22Create testmessage table%0A%0ARevision ID: 187eade64ef0%0ARevises: 016f138b2da8%0ACreate Date: 2016-06-21 16:11:47.905481%0A%0A%22%22%22%0A%0A# revision identifiers, used by Alembic.%0Arevision = '187eade64ef0'%0Adown_revision = '016f138b2da8'%0A%0Afrom alembic import op%0Aimport sqlalchemy ...
cc84a5c71f84596af61b2de4a16cd62ff0209b16
Add migration file
migrations/versions/fd02d1c7d64_add_hail_migration_fields.py
migrations/versions/fd02d1c7d64_add_hail_migration_fields.py
Python
0.000001
@@ -0,0 +1,1350 @@ +%22%22%22Add hail migration fields%0A%0ARevision ID: fd02d1c7d64%0ARevises: 59e5faf237f8%0ACreate Date: 2015-04-15 12:04:43.286358%0A%0A%22%22%22%0A%0A# revision identifiers, used by Alembic.%0Arevision = 'fd02d1c7d64'%0Adown_revision = '59e5faf237f8'%0A%0Afrom alembic import op%0Aimport sqlalchemy ...
730c7e0e36f0466172c050dd791915938c648953
summarize git-shortlog by mail
gist/git_shortlog_mail.py
gist/git_shortlog_mail.py
Python
0.999844
@@ -0,0 +1,772 @@ +%22%22%22%0ABackground:%0A%0Agit shortlog -nse%0A%0AUser may use different nick name in git-shortlog, but always use same mail.%0AThis command cannot map user by mail. I have to use complex .mailmap file.%0A%0AWrite this script to summarize commit number by mail instead of by user name.%0A%0AHow to u...
fc84c19cdbbe86b1a57efb3468cdfc26785ca4a6
add utility helper to format table for console output
rawdisk/util/output.py
rawdisk/util/output.py
Python
0
@@ -0,0 +1,834 @@ +import numpy as np%0A%0Adef format_table(headers, columns, values, ruler='-'):%0A printable_rows = %5B%5D%0A%0A table = np.empty((len(values), len(columns)), dtype=object)%0A%0A for row, value in enumerate(values):%0A table%5Brow%5D = %5Bstr(getattr(value, column)) for column in colum...
100a03003adf3f425d59b69e95078bd0f1e82193
Add test script for segfault bug reported by Jeremy Hill.
test/reopen_screen.py
test/reopen_screen.py
Python
0.000011
@@ -0,0 +1,1645 @@ +#!/usr/bin/env python%0A%0A# Test for bug reported by Jeremy Hill in which re-opening the screen%0A# would cause a segfault.%0A%0Aimport VisionEgg%0AVisionEgg.start_default_logging(); VisionEgg.watch_exceptions()%0A%0Afrom VisionEgg.Core import Screen, Viewport, swap_buffers%0Aimport pygame%0Afrom p...
35849cf3650c5815c0124f90fad3d3fa2ef9abc6
Create InsertationSort2.py
InsertationSort2.py
InsertationSort2.py
Python
0
@@ -0,0 +1,488 @@ +def compareAndRep(numbers , a , b):%0A%09temp = numbers%5Ba%5D%0A%09numbers%5Ba%5D = numbers%5Bb%5D%0A%09numbers%5Bb%5D = temp%0A%09return numbers %0A%0Adef printList(numbers):%0A%09strp = %22%22%0A%09for i in range(0 , len(numbers)):%0A%09%09strp += str(numbers%5Bi%5D)%0A%09%09if(i+1 %3C len(number...
97e46b93124758bec85d2e81a6843c22a265bce3
Add entry point for GC repo importer
ForgeImporters/setup.py
ForgeImporters/setup.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (t...
Python
0
@@ -1449,24 +1449,95 @@ .importers%5D%0A + google-code-repo = forgeimporters.google.code:GoogleRepoImporter%0A %22%22%22,)%0A
1e7421878e90949abc4f6fac5835bd27b472d2b6
Add example script for the newly added mixed_diffusivity
example_Knudsen.py
example_Knudsen.py
Python
0
@@ -0,0 +1,1801 @@ +import openpnm as op%0Aimport numpy as np%0Aimport matplotlib.pyplot as plt%0A%0A%0A# Get Deff w/o including Knudsen effect%0Aspacing = 1.0%0Anet = op.network.Cubic(shape=%5B10, 10, 10%5D, spacing=spacing)%0Ageom = op.geometry.StickAndBall(network=net)%0Aair = op.phases.Air(network=net)%0Aphys = op....
a6bbcc46765fee52eba9c31b95d456977fbeeefe
add beautify for print beautify words
Scripts/beautify.py
Scripts/beautify.py
Python
0.000007
@@ -0,0 +1,485 @@ +#!/usr/bin/env python%0A%0Aimport sys%0A%0A%0Adef beautify(line, bold=False):%0A k = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'%0A v = '%F0%9D%92%9C%E2%84%AC%F0%9D%92%9E%F0%9D%92%9F%E2%84%B0%E2%84%B1%F0%9D%92%A2%E2%84%8B%E2%84%90%F0%9D%92%A5%F0%9D%92%A6%E2%84%92%E2%84%B3%F0%9D%92%A9...
cbafc49d098ee1166aae32eae79a808e576a1afa
Hello world
Simple/hello.py
Simple/hello.py
Python
0.999979
@@ -0,0 +1,23 @@ +print(%22Hello, world%22)%0D%0A
e1772c008d607a2545ddaa05508b1a74473be0ec
Add TaskInstance index on job_id
airflow/migrations/versions/7171349d4c73_add_ti_job_id_index.py
airflow/migrations/versions/7171349d4c73_add_ti_job_id_index.py
Python
0
@@ -0,0 +1,1041 @@ +# -*- coding: utf-8 -*-%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 applicabl...
74dee1d09fdc09f93af3d15286336d7face4ba08
add test file for proper_parens.
test_proper_parens.py
test_proper_parens.py
Python
0
@@ -0,0 +1,887 @@ +from __future__ import unicode_literals%0Afrom proper_parens import check_statement%0A%0A%0Adef test_check_statement():%0A%0A # Edge cases of strings of length one%0A value = %22)%22%0A assert check_statement(value) == -1%0A%0A value = %22(%22%0A assert check_statement(value) == 1%0A%0...
77637c0eca6ba5cd00e8f1fbe863a1fd293c980f
Create __init__.py
tests/CAN/__init__.py
tests/CAN/__init__.py
Python
0.000429
@@ -0,0 +1 @@ +%0A
9d982f3f910c985e8ac29b0c7e271031fd815ee0
Remove useless known hosts warnings
ssh/ssher.py
ssh/ssher.py
""" Simple, robust SSH client for basic I/O """ import logging import os import stat import tempfile from contextlib import contextmanager from subprocess import check_call, check_output from pkgpanda.util import write_string log = logging.getLogger(__name__) class Tunnelled(): def __init__(self, base_cmd: list...
Python
0
@@ -3042,16 +3042,48 @@ /null',%0A + '-oLogLevel=ERROR',%0A
b936fe0b01a29f8638f662a4a779226fe93cd6fa
Create 5kyu_faulty_odometer.py
Solutions/5kyu/5kyu_faulty_odometer.py
Solutions/5kyu/5kyu_faulty_odometer.py
Python
0.000344
@@ -0,0 +1,171 @@ +BASE = '012356789'%0A%0Adef faulty_odometer(num):%0A result = 0%0A for i, n in enumerate(str(num)%5B::-1%5D):%0A result += BASE.index(n) * len(BASE) ** i%0A return result%0A
ab753bc09d27cc00780d48769d8c12a9015fae18
Create 0062_siteoption_copyright_notice.py
radio/migrations/0062_siteoption_copyright_notice.py
radio/migrations/0062_siteoption_copyright_notice.py
Python
0
@@ -0,0 +1,876 @@ +# -*- coding: utf-8 -*-%0A# Save default html text for index and about page%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0A%0Adef set_default_html(apps, schema_editor):%0A%0A SiteOption = apps.get_model('radio', 'SiteOption')%0A SiteOption(name='COPYRI...
fa7b12066fd81ed97bb0ecbd13690f850021915f
Create crossover.py
cea/optimization/master/crossover.py
cea/optimization/master/crossover.py
Python
0.000001
@@ -0,0 +1,3242 @@ +%22%22%22%0ACrossover routines%0A%0A%22%22%22%0Afrom __future__ import division%0A%0Afrom deap import tools%0A%0Afrom cea.optimization.master.validation import validation_main%0A%0A%0Adef crossover_main(individual, indpb,%0A column_names,%0A heating_unit_names_share...
c2509a25eaf3522a55d061f940931447bbf023f1
test pyCharm
lp3thw/ex41.py
lp3thw/ex41.py
Python
0.000002
@@ -0,0 +1,2330 @@ +import random%0Afrom urllib.request import urlopen%0Aimport sys%0A%0AWORD_URL = %22http://learncodethehardway.org/words.txt%22%0AWORDS = %5B%5D%0A%0APHRASES = %7B%0A %22class %25%25%25(%25%25%25):%22:%0A %22Make a class named %25%25%25 that is-a %25%25%25.%22,%0A %22class %25%25%25(obje...
c50f1bd892f5bc17bb77cd9d09ae5d0d1db8d75c
vowel count Day 5
submissions/j-nordell/Day5/vowelcount.py
submissions/j-nordell/Day5/vowelcount.py
Python
0.99922
@@ -0,0 +1,343 @@ +vowel_dict = %7B'a': 0, 'e': 0, 'i': 0, 'o': 0, 'u': 0%7D%0Avowels = %5B'a', 'e', 'i', 'o', 'u'%5D%0Auser_text = input(%22Please enter some text: %22)%0Auser_text = list(user_text)%0A%0Afor letter in user_text:%0A if letter in vowels:%0A vowel_dict%5Bletter%5D += 1%0A %0A%0Aprint(%22Here are th...
24cfe61a9e1d8ed5a78b2338e652085fc5b3f4e1
Add example delete
examples/delete.py
examples/delete.py
Python
0.99966
@@ -0,0 +1,952 @@ +# 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 writ...
0cb6b839509d3f5ecf0e2196c53decbf6fdac65e
add renameDate.py
renameDates.py
renameDates.py
Python
0.000008
@@ -0,0 +1,1338 @@ +#! Python3%0A# renameDate.py - rename file name that include date in US format (MM-DD-YYYY)%0A# to EU format (DD-MM-YYYY)%0A%0Aimport shutil, os, re%0A%0A#Regex for US dates%0AdatePattern = re.compile(r%22%22%22%5E(.*?) # All text before date%0A ((0%7C1)?%5Cd)- # one or two ...
b920103c5aef9fa38d91e2fe0eafaeb8fd18d27b
Create FileEncryptor.py
FileEncryptor.py
FileEncryptor.py
Python
0.000001
@@ -0,0 +1,1995 @@ +import os%0Afrom Crypto.Cipher import AES%0Afrom Crypto.Hash import SHA256%0Afrom Crypto import Random%0A%0Adef encrypt(key, filename):%0A chunksize = 64 * 1024%0A outputFile = %22(encrypted)%22 + filename%0A filesize = str(os.path.getsize(filename)).zfill(16)%0A IV = Random.new().read(1...
06e0f140c517e467445a59be989ba3b9ddd76503
add tests for stdlib xpath
python/ql/test/library-tests/frameworks/stdlib/XPathExecution.py
python/ql/test/library-tests/frameworks/stdlib/XPathExecution.py
Python
0.000002
@@ -0,0 +1,665 @@ +match = %22dc:title%22%0Ans = %7B'dc': 'http://purl.org/dc/elements/1.1/'%7D%0A%0Aimport xml.etree.ElementTree as ET%0Atree = ET.parse('country_data.xml')%0Aroot = tree.getroot()%0A%0Aroot.find(match, namespaces=ns) # $ MISSING: getXPath=match%0Aroot.findall(match, namespaces=ns) # $ MISSING: getXP...
70f7096d353ee3edccf6e52e21c6a74db158d906
Configure settings for py.test
conftest.py
conftest.py
Python
0.000001
@@ -0,0 +1,177 @@ +import os%0A%0Afrom django.conf import settings%0A%0A%0Adef pytest_configure():%0A if not settings.configured:%0A os.environ%5B'DJANGO_SETTINGS_MODULE'%5D = 'multimedia.tests.settings'%0A
4863696bbfb46a836b4febc3397e51dd20214414
add repoquery-recursive.py for downloading rpm packages and their dependencies exceluding which comes from install media
repoquery-recursive.py
repoquery-recursive.py
Python
0
@@ -0,0 +1,784 @@ +#!/usr/bin/python3%0Aimport sys%0Aimport subprocess%0A%0Arepoquery = %5B'repoquery', '--plugins', '--resolve', '--qf',%0A%09'%25%7Bname%7D.%25%7Barch%7D %25%7Brepoid%7D %25%7Blocation%7D', '--plugins', '-R'%5D%0A%0Apackage_info = dict()%0A%0Adef check_dep(packages):%09%0A%09#print(packages)%0A%09if l...
eefe2a1f4dc7482f75a2cd3cfd94c1048ba688c6
Add back $0.25 tip amount; #180
gittip/__init__.py
gittip/__init__.py
import datetime import locale import os from decimal import Decimal try: # XXX This can't be right. locale.setlocale(locale.LC_ALL, "en_US.utf8") except locale.Error: locale.setlocale(locale.LC_ALL, "en_US.UTF-8") BIRTHDAY = datetime.date(2012, 6, 1) CARDINALS = ['zero', 'one', 'two', 'three', 'four', 'fiv...
Python
0.000008
@@ -1162,16 +1162,24 @@ ('0.00', + '0.25', '1.00',
0e2504171dc5679b5cdd1cb219ad1cd1e9f29262
add a test case for performance benchmarking.
tests/perf_unicorn.py
tests/perf_unicorn.py
Python
0.000003
@@ -0,0 +1,1419 @@ +%0Aimport sys%0Aimport os%0Aimport time%0A%0Aimport angr%0Aimport simuvex.s_options as so%0Aimport nose.tools%0A%0Atest_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../'))%0A%0Adef perf_unicorn_0():%0A p = angr.Project(os.path.join(test_location, 'binaries', 'tests...
e3b7b9e5f8ca1be061c71c764fd62d6aeed3fd43
Add test suite for bqlmath.
tests/test_bqlmath.py
tests/test_bqlmath.py
Python
0
@@ -0,0 +1,2539 @@ +# -*- coding: utf-8 -*-%0A%0A# Copyright (c) 2010-2016, MIT Probabilistic Computing Project%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# ...
2014f326eb73f7b30fe9cad8f30df80e7b8b3f26
add first test
tests/test_ipcheck.py
tests/test_ipcheck.py
Python
0.000003
@@ -0,0 +1,69 @@ +class TestBoundaryValue:%0A def test_WeakNomral(self):%0A pass%0A
d95a7d6017dd6a08d9c8df5af9c61ee2cb23d217
add test code for wrapper.py
tests/test_wrapper.py
tests/test_wrapper.py
Python
0.000002
@@ -0,0 +1,803 @@ +import sys%0Asys.path.append('..')%0Aimport unittest%0Afrom wrapper import xp%0Afrom chainer import cuda%0Afrom chainer import Variable%0A%0Aclass WrapperTestCase(unittest.TestCase):%0A%0A def test_xp(self):%0A try:%0A cuda.check_cuda_available()%0A module = 'cupy'%0A ...
6733cc00015458c307272a3124857bf686b06fbb
Create h.py
h.py
h.py
Python
0.000002
@@ -0,0 +1,23 @@ +print %22Hello, World!%22 %0A
553009b8f0cb0396f266d10dc5b6010ad60e7a25
Solve task #21
21.py
21.py
Python
0.999999
@@ -0,0 +1,899 @@ +# Definition for singly-linked list.%0A# class ListNode(object):%0A# def __init__(self, x):%0A# self.val = x%0A# self.next = None%0A%0Aclass Solution(object):%0A def mergeTwoLists(self, l1, l2):%0A %22%22%22%0A :type l1: ListNode%0A :type l2: ListNode%0A ...
7b949393c0cf20b9f21ff3e743a6ad35b3cccb49
Create 22.py
22.py
22.py
Python
0.000004
@@ -0,0 +1,2391 @@ +import copy%0Aimport math%0A%0A# %5B 0 %7C 1 %7C 2 %7C 3 %7C 4 %7C 5 %5D%0A#spell = %5Bspell id %7C mana %7C damage %7C armor %7C mana %7C timer%5D%0Aspells = %5B(0, 53, 4, 0, 0, 0), (1, 73, 2, 2, 0, 0), (2, 113, 0, 0, 0, 6), (3, 173, 3, 0, 0, 6), (4, 229, 0, 0, 101, 5...
62237000f3ae92638214d96f323a81d6a492d9cd
Update existing FAs with current tier programs (#4829)
financialaid/management/commands/migrate_finaid_program_tiers.py
financialaid/management/commands/migrate_finaid_program_tiers.py
Python
0
@@ -0,0 +1,1614 @@ +%22%22%22%0AUpdate FinancialAid objects with current tier program%0A%22%22%22%0Afrom django.core.management import BaseCommand, CommandError%0A%0Afrom financialaid.models import FinancialAid, TierProgram%0A%0A%0Aclass Command(BaseCommand):%0A %22%22%22%0A Updates the existing financial aid obj...
57af6d6d8b4c67f7b437f512e4d8eb4ea66a20f9
Add morse script
morse/morse.py
morse/morse.py
Python
0.000001
@@ -0,0 +1,1716 @@ +# Import modules%0Afrom microbit import *%0A%0A# define morse code dictionary%0Amorse = %7B%0A %22a%22: %22.-%22,%0A %22b%22: %22-...%22,%0A %22c%22: %22-.-.%22,%0A %22d%22: %22-..%22,%0A %22e%22: %22.%22,%0A %22f%22: %22..-.%22,%0A %22s%22: %22...%22...
9609529e3a5c25c37be342d2bd1efe33e25128ff
Add IO file
IO.py
IO.py
Python
0.000001
@@ -0,0 +1,193 @@ +import RPi.GPIO as GPIO%0A%0A%0Adef gettemp():%0A return 80%0A%0A%0Adef setfan(state):%0A pass%0A%0A %0Adef setac(state):%0A if state:%0A # Always turn on the fan when the ac is on%0A setfan(True)
47fffb67871325f1b12d6150f12b2d9c44984837
implement top contributors functionality in gitguard
gitguard.py
gitguard.py
Python
0
@@ -0,0 +1,969 @@ +import re%0Aimport subprocess%0Aimport github%0A%0A%22%22%22%0Agitguard_extractor.py%0A%0AExtracts data for the visualizer.%0A%0Arepo_link is in the format USER/REPO_NAME or ORGANIZATION/REPO_NAME%0A%22%22%22%0A%0AREGEX_REPO_LINK_DELIMITER = '%5Cs*/%5Cs*'%0A%0Adef process_repo_link(repo_link):%0A ...
a9fa88d11f5338f8662d4d6e7dc2103a80144be0
Revert "Remove model"
table/models.py
table/models.py
Python
0
@@ -0,0 +1,57 @@ +from django.db import models%0A%0A# Create your models here.%0A
c821be39a3853bf8a14e8c4089904dfe633ad276
Solve task #412
412.py
412.py
Python
0.999999
@@ -0,0 +1,481 @@ +class Solution(object):%0A def fizzBuzz(self, n):%0A %22%22%22%0A :type n: int%0A :rtype: List%5Bstr%5D%0A %22%22%22%0A def fizzBuzz(i, x):%0A return %7B1: str(i), 3: %22Fizz%22, 5: %22Buzz%22, 15: %22FizzBuzz%22%7D%5Bx%5D%0A %0A ans = %5...
e51322e7ee4afabee8b98137bc5e56b0a0f803ec
Solve #461
461.py
461.py
Python
0.999797
@@ -0,0 +1,482 @@ +class Solution(object):%0A def hammingDistance(self, x, y):%0A %22%22%22%0A :type x: int%0A :type y: int%0A :rtype: int%0A %22%22%22%0A x, y = list(bin(x)%5B2:%5D), list(bin(y)%5B2:%5D)%0A s1 = list('0' * max(len(x), len(y)))%0A s2 = list('0'...
2206f2dac5cb15c10fa59f14597133b6a0d3a314
Create ALE.py
ALE.py
ALE.py
Python
0.000001
@@ -0,0 +1,2089 @@ +%22%22%22%0AAsynchronous Learning Engine (ALE)%0A%0ASupports PWS standard desktop (studio)%0AMentor Queues%0ALoad Balancing / Air Traffic Control%0ACourses / Flights%0A%0AA mentor queue is a worker queue with%0Atasks pending, in process, complete.%0AThe many subclasses of Task are only hinted%0Aat i...
6be70d01bdf58389db2a6adc4035f82669d02a61
Allow use of GoogleMaps plugin without Multilingual support
cms/plugins/googlemap/cms_plugins.py
cms/plugins/googlemap/cms_plugins.py
from cms.plugin_pool import plugin_pool from cms.plugin_base import CMSPluginBase from django.utils.translation import ugettext_lazy as _ from cms.plugins.googlemap.models import GoogleMap from cms.plugins.googlemap.settings import GOOGLE_MAPS_API_KEY from cms.plugins.googlemap import settings from django.forms.widgets...
Python
0
@@ -1,24 +1,57 @@ +from django.conf import settings%0A from cms.plugin_pool imp @@ -282,51 +282,8 @@ KEY%0A -from cms.plugins.googlemap import settings%0A from @@ -855,16 +855,94 @@ API_KEY%0A + lang = getattr(request, 'LANGUAGE_CODE', settings.LANGUAGE_CODE%5B0:2%5D)%0A @@ -1040,35 +1040,17 @@ ey...
5c952e7a54bcff7bcdbd3b2a2d85f1f93ce95242
add first test: config+store
test/test_1100_conf_store.py
test/test_1100_conf_store.py
Python
0.000029
@@ -0,0 +1,2361 @@ +# test mod_md basic configurations%0A%0Aimport os.path%0Aimport pytest%0Aimport re%0Aimport subprocess%0Aimport sys%0Aimport time%0A%0Afrom ConfigParser import SafeConfigParser%0Afrom datetime import datetime%0Afrom httplib import HTTPConnection%0Afrom testbase import TestEnv%0A%0Aconfig = SafeConfi...
c15c4a663c257cad6763cf92c50b7ad706017c74
Remove extraneous imports in the base view package
evesrp/views/__init__.py
evesrp/views/__init__.py
from collections import OrderedDict from urllib.parse import urlparse import re from flask import render_template, redirect, url_for, request, abort, jsonify,\ flash, Markup, session from flask.views import View from flask.ext.login import login_user, login_required, logout_user, \ current_user from fl...
Python
0
@@ -2,1047 +2,99 @@ rom -collections import OrderedDict%0Afrom urllib.parse import urlparse%0Aimport re%0A%0Afrom flask import render_template, redirect, url_for, request, abort, jsonify,%5C%0A flash, Markup, session%0Afrom flask.views import View%0Afrom flask.ext.login import login_user, login_required, logou...
d40b4c250f7d1c0c6a6c198b3e1ea69e0049830e
Create syb.py
syb.py
syb.py
Python
0.000039
@@ -0,0 +1,380 @@ +# -*- coding: utf-8 -*-%0A%22%22%22%0A Star Yuuki Bot%0A ~~~~~~~~~~~%0A LineClient for sending and receiving message from LINE server.%0A Copyright: (c) 2015 SuperSonic Software Foundation and Star Inc.%0A Website:%0A SuperSonic Software Foundation: http://supersonic-org.cf%0A ...
774877893b9f94711b717d01b896deefe65eb211
create file
app.py
app.py
Python
0.000003
@@ -0,0 +1,307 @@ +%22%22%22%0A@import rdflib external lib%0A%22%22%22%0Aimport rdflib%0A%0AjsonldData = open(%22LearningObjectsExpanded.jsonld%22).read()%0AqueryData = open(%22findRecommendations.query%22).read()%0A%0Agraph = rdflib.Graph()%0Agraph.parse(data=jsonldData,format='json-ld')%0A%0Aresults = graph.query(que...
921221e4ad7d74b6f9d8b0b75417fe84fd01715f
Add script to concatenate all titers to one file tracking source/passage Fixes #76
tdb/concatenate.py
tdb/concatenate.py
Python
0.000003
@@ -0,0 +1,1153 @@ +import argparse%0A%0Aparser = argparse.ArgumentParser()%0Aparser.add_argument('-f', '--files', nargs='*', default=%5B%5D, help=%22tsvs that will be concatenated%22)%0Aparser.add_argument('-o', '--output', type=str, default=%22data/titers_complete.tsv%22)%0A%0Adef concat(files,out):%0A with open(o...
ad489edc8059b75d9ec78d0aeb03ac3592b93923
Add Federal Labor Relations Authority.
inspectors/flra.py
inspectors/flra.py
Python
0
@@ -0,0 +1,2563 @@ +#!/usr/bin/env python%0A%0Aimport datetime%0Aimport logging%0Aimport os%0Afrom urllib.parse import urljoin%0A%0Afrom bs4 import BeautifulSoup%0Afrom utils import utils, inspector%0A%0A# https://www.flra.gov/OIG%0A# Oldest report: 1999%0A%0A# options:%0A# standard since/year options for a year rang...
241cc8fc668b9f6c38d23a97d9ff28cc4c481bf3
Create github_watchdog,py
github_watchdog.py
github_watchdog.py
Python
0.000126
@@ -0,0 +1,17 @@ +#!/usr/bin/bash%0A%0A
45af6f13e302fb4e790f8ec5a5730f25c6a9450b
add new segmenter debugging script
kraken/contrib/heatmap_overlay.py
kraken/contrib/heatmap_overlay.py
Python
0
@@ -0,0 +1,1061 @@ +#! /usr/bin/env python%0A%22%22%22%0AProduces semi-transparent neural segmenter output overlays%0A%22%22%22%0A%0Aimport sys%0Aimport torch%0Aimport numpy as np%0Afrom PIL import Image%0Afrom kraken.lib import segmentation, vgsl, dataset%0Aimport torch.nn.functional as F%0Afrom typing import *%0Aimpo...
d39a3bae3f6ca66df044e725cd164082170f4ec7
Modify the config file.
snippet/lib/python/config.py
snippet/lib/python/config.py
Python
0
@@ -0,0 +1,939 @@ +# coding: utf-8%0A%0Afrom oslo_config import cfg%0Afrom oslo_log import log%0A%0ACONF = cfg.CONF%0A%0A_ROOTS = %5B%22root%22%5D%0A_DEFAULT_LOG_LEVELS = %5B'root=INFO'%5D%0A_DEFAULT_LOG_FORMAT = %22%25(asctime)s - %25(name)s - %25(levelname)s - %25(message)s%22%0A%0A%0Adef parse_args(argv, project, ve...
be2f50aae308377dbabd66b5ec78ffb2bd8ae218
Add tse_number as index
politicos/migrations/versions/488fc5ad2ffa_political_party_add_tse_number_as_index.py
politicos/migrations/versions/488fc5ad2ffa_political_party_add_tse_number_as_index.py
Python
0.002058
@@ -0,0 +1,425 @@ +%22%22%22political party: add tse_number as index%0A%0ARevision ID: 488fc5ad2ffa%0ARevises: 192bd4ccdacb%0ACreate Date: 2015-07-08 13:44:38.208146%0A%0A%22%22%22%0A%0A# revision identifiers, used by Alembic.%0Arevision = '488fc5ad2ffa'%0Adown_revision = '192bd4ccdacb'%0A%0Afrom alembic import op%0A%0...
75756f20d4b63daa8425609620e4b32dcb9faab4
Add cryptography unit with morse code functions
units/cryptography.py
units/cryptography.py
Python
0.000001
@@ -0,0 +1,1316 @@ +%0Afrom .errors import UnitOutputError%0A%0Acharacter_to_morse = %7B%0A%09'A': %22.-%22, 'B': %22-...%22, 'C': %22-.-.%22, 'D': %22-..%22, 'E': '.', 'F': %22..-.%22, 'G': %22--.%22, 'H': %22....%22, %0A%09'I': %22..%22, 'J': %22.---%22, 'K': %22-.-%22, 'L': %22.-..%22, 'M': %22--%22, 'N': %22-.%22, ...
93b3cfb5dd465f956fa6c9ceb09be430684c85ae
Add two pass solution
leetcode/q019/solution.py
leetcode/q019/solution.py
Python
0.000031
@@ -0,0 +1,1115 @@ +%22%22%22%0D%0AGiven a linked list, remove the n-th node from the end of list and return its head.%0D%0A%0D%0AExample:%0D%0A%0D%0AGiven linked list: 1-%3E2-%3E3-%3E4-%3E5, and n = 2.%0D%0A%0D%0AAfter removing the second node from the end, the linked list becomes 1-%3E2-%3E3-%3E5.%0D%0ANote:%0D%0A%0D...