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
9c70a5d65b1c06f62751dfb4fcdd4d6a60a5eb71
Add unit tests for testing the widget tree iterators.
kivy/tests/test_widget_walk.py
kivy/tests/test_widget_walk.py
Python
0
@@ -0,0 +1,1902 @@ +import unittest%0A%0A%0Aclass FileWidgetWalk(unittest.TestCase):%0A%0A def test_walk_large_tree(self):%0A from kivy.uix.boxlayout import BoxLayout%0A from kivy.uix.label import Label%0A from kivy.uix.widget import walk, walk_reverse%0A ''' the tree%0A BoxLayout%...
989320c3f2bdf65eb8c22822f34052047e0d1a2b
Reorder array
Arrays/reorder_array.py
Arrays/reorder_array.py
Python
0.00003
@@ -0,0 +1,1046 @@ +%22%22%22%0AGiven two integer arrays of same size, arr%5B%5D and index%5B%5D, reorder elements in arr%5B%5D according to given index array.%0AInput:%0Aarr: 50 40 70 60 90%0Aindex: 3 0 4 1 2%0AOutput:%0Aarr: 60 50 90 40 70%0Aindex: 0 1 2 3 4%0A%22%22%22%0A%0A%22%22%22%0AApproach:%0A1. Do the followin...
3a4de870ebefd0e3e32b8c1b9facee6c98ce8b7f
Convert python 2 version to python 3
ltk2to3.py
ltk2to3.py
Python
0.999999
@@ -0,0 +1,2105 @@ +import os%0Aimport shutil%0Aimport fnmatch%0A%0Adef get_files(patterns):%0A %22%22%22 gets all files matching pattern from root%0A pattern supports any unix shell-style wildcards (not same as RE) %22%22%22%0A%0A cwd = os.getcwd()%0A if isinstance(patterns,str):%0A patterns = %...
0babd53317322cea1a56cc8cacd6ffc417145c80
Add migration file.
django_project/realtime/migrations/0033_auto_20180202_0723.py
django_project/realtime/migrations/0033_auto_20180202_0723.py
Python
0
@@ -0,0 +1,505 @@ +# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import models, migrations%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('realtime', '0032_auto_20180201_0947'),%0A %5D%0A%0A operations = %5B%0A migrations.AlterF...
844049b0d4aecb25fc480fae37111e8aebac6438
Add mimeformats.py to support drag and drop
src/mcedit2/util/mimeformats.py
src/mcedit2/util/mimeformats.py
Python
0
@@ -0,0 +1,229 @@ +%22%22%22%0A mimeformats%0A%22%22%22%0Afrom __future__ import absolute_import, division, print_function, unicode_literals%0Aimport logging%0A%0Alog = logging.getLogger(__name__)%0A%0Aclass MimeFormats(object):%0A MapItem = %22application/x-mcedit-mapitem%22
fa1223c661d60033b7d7aba2a27151d6ee18a299
Add tests for circle ci checks
tests/ci_checks/test_circle.py
tests/ci_checks/test_circle.py
Python
0
@@ -0,0 +1,1089 @@ +import pytest%0A%0Afrom semantic_release import ci_checks%0Afrom semantic_release.errors import CiVerificationError%0A%0A%0Adef test_circle_should_pass_if_branch_is_master_and_no_pr(monkeypatch):%0A monkeypatch.setenv('CIRCLE_BRANCH', 'master')%0A monkeypatch.setenv('CI_PULL_REQUEST', '')%0A%0...
6a50f602ebc2334d45352cd2ff13c1f91db7e0bd
Integrate LLVM at llvm/llvm-project@8e22539067d9
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "223261cbaa6b4c74cf9eebca3452ec0d15ea018e" LLVM_SHA256 = "8425d6458484c6e7502b4e393cd8d98b533826a3b040261d67261f1364936518" tf_http_archive( ...
Python
0.000003
@@ -160,133 +160,133 @@ = %22 -223261cbaa6b4c74cf9eebca3452ec0d15ea018e%22%0A LLVM_SHA256 = %228425d6458484c6e7502b4e393cd8d98 +8e22539067d9376c4f808b25f543feba728d40c9%22%0A LLVM_SHA256 = %22db0a7099e6e1eacb b5 +1 338 -26a3b040261d67261f1364936518 +f0b18c237be7354c25e8126c523390bef965a9b6f6 %22%0A%0A
bd729068b1683954ab190f187e59d8a5fc0741f1
Integrate LLVM at llvm/llvm-project@7ed7d4ccb899
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "b109172d993edacd9853a8bbb8128a94da014399" LLVM_SHA256 = "36ee6bf7d89b43034c1c58c57aa63d0703d1688807480969dfd1f4d7ccaa3787" tf_http_archive( ...
Python
0.000004
@@ -160,133 +160,133 @@ = %22 -b109172d993edacd9853a8bbb8128a94da014399%22%0A LLVM_SHA256 = %2236ee6bf7d89b43034c1c58c57aa63d0703d1688807480969dfd1f4d7ccaa3787 +7ed7d4ccb8991e2b5b95334b508f8cec2faee737%22%0A LLVM_SHA256 = %226584ccaffd5debc9fc1bb275a36af9bad319a7865abecf36f97cbe3c2da028d0 %22%0A%0A
f29dab9a82b44fac483d71c432a40a0bb2ca51b1
Add the beginnings of an example client.
examples/dbus_client.py
examples/dbus_client.py
Python
0
@@ -0,0 +1,769 @@ +%0Aimport dbus%0A%0Abus = dbus.SystemBus()%0A%0A# This adds a signal match so that the client gets signals sent by Blivet1's%0A# ObjectManager. These signals are used to notify clients of changes to the%0A# managed objects (for blivet, this will be devices, formats, and actions).%0Abus.add_match_stri...
ebf4d87390307dcf735c53f18a18f3466a4ee5e4
Add standalone wave trigger tool.
tools/standalonewavetrigger.py
tools/standalonewavetrigger.py
Python
0
@@ -0,0 +1,2720 @@ +#!/usr/bin/env python%0A%0A# Standard library imports%0Aimport argparse%0Aimport collections%0Aimport logging%0Aimport os%0Aimport time%0A%0A# Additional library imports%0Aimport requests%0A%0A%0A# Named logger for this module%0A_logger = logging.getLogger(__name__)%0A%0A# Parse the command line arg...
d76c7f73701edeb263ebffc94ccc3f4893f7ef0d
add leetcode Reorder List
leetcode/ReorderList/solution.py
leetcode/ReorderList/solution.py
Python
0
@@ -0,0 +1,1455 @@ +# Definition for singly-linked list.%0Aclass ListNode:%0A%0A def __init__(self, x):%0A self.val = x%0A self.next = None%0A%0A def printList(self):%0A head = self%0A while head:%0A print head,%0A head = head.next%0A print ''%0A%0A def ...
19c4e9a6505f9107e8d47c901658050bdd47dd1e
Correct docstring.
astm/protocol.py
astm/protocol.py
# -*- coding: utf-8 -*- # # Copyright (C) 2012 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # import logging from threading import _Timer, RLock from collections import namedtuple from .asynclib im...
Python
0.000006
@@ -5254,39 +5254,74 @@ out -occurs for send/recv operations +event occurs. Used to limit time for waiting%0A response data .%22%22%22
a86852fe908bb0a44ef267a75b9446ddcaf03f6e
Add basic support for LimitlessLED
homeassistant/components/light/limitlessled.py
homeassistant/components/light/limitlessled.py
Python
0
@@ -0,0 +1,2516 @@ +%22%22%22%0Ahomeassistant.components.light.limitlessled%0A~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%0A%0ASupport for LimitlessLED bulbs, also known as...%0A%0AEasyBulb%0AAppLight%0AAppLamp%0AMiLight%0ALEDme%0Adekolight%0AiLight%0A%0A%22%22%22%0Aimport random%0Aimport logging%0A%0Afrom homeassistant.helper...
8d1917785f4cf8cc17ec1b3898dcb90f7402cfe9
Revert of Attempt to add tracing dir into path, so that tracing_project can be imported. (patchset #1 id:1 of https://codereview.chromium.org/1300373002/ )
tracing/tracing_build/__init__.py
tracing/tracing_build/__init__.py
# 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. # import os import sys def _AddTracingProjectPath(): tracing_path = os.path.normpath( os.path.abspath(os.path.join(os.path.dirname(__file__), '....
Python
0.000007
@@ -187,243 +187,8 @@ ys%0A%0A -%0Adef _AddTracingProjectPath():%0A tracing_path = os.path.normpath(%0A os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))%0A if tracing_path not in sys.path:%0A sys.path.insert(0, tracing_path)%0A%0A%0A_AddTracingProjectPath()%0A impo
37f286812bea7429bea67172a40d26ad435d6f67
Add test for 'holes' argument in add_polygon
test/examples/hole_in_square.py
test/examples/hole_in_square.py
Python
0.000004
@@ -0,0 +1,861 @@ +#!/usr/bin/python%0A# -*- coding: utf-8 -*-%0A%0Aimport pygmsh as pg%0Aimport numpy as np%0A%0Adef generate():%0A # Characteristic length%0A lcar = 1e-1%0A%0A # Coordinates of lower-left and upper-right vertices of a square domain%0A xmin = 0.0%0A xmax = 5.0%0A ymin = 0.0%0A ymax...
db4bc200f9a48edf9e160c2134293df0313183a7
Add conditional command prefix plugin
conditional_prefix.py
conditional_prefix.py
Python
0.000001
@@ -0,0 +1,573 @@ +from cloudbot import hook%0A%0Aimport re%0A%0A@hook.sieve%0Adef conditional_prefix(bot, event, plugin):%0A if plugin.type == 'command':%0A if event.chan in event.conn.config%5B'prefix_blocked_channels'%5D:%0A command_prefix = event.conn.config%5B'command_prefix'%5D%0A%0A ...
a2ea7c7d4d6b680f180b9916eb2a814713887154
Test empty record.
tests/test_empty_record.py
tests/test_empty_record.py
Python
0
@@ -0,0 +1,2381 @@ +#!/usr/bin/env python%0A%0A# Copyright 2016 Ben Walsh%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...
cba5a8058e96bd6c5ee639df223c77f56d8296fa
Add ladot package (#10905)
var/spack/repos/builtin/packages/ladot/package.py
var/spack/repos/builtin/packages/ladot/package.py
Python
0
@@ -0,0 +1,909 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other%0A# Spack Project Developers. See the top-level COPYRIGHT file for details.%0A#%0A# SPDX-License-Identifier: (Apache-2.0 OR MIT)%0A%0Afrom spack import *%0A%0A%0Aclass Ladot(Package):%0A %22%22%22Ladot is a script that makes...
152bf235721c5b6c8ba61da4d8521733a2842885
Send script
extract_norcal_table.py
extract_norcal_table.py
Python
0
@@ -0,0 +1,327 @@ +import urllib2%0A%0Afrom bs4 import BeautifulSoup%0A%0Aurl = %22http://www.mapsofworld.com/usa/states/california/map-of-northern-%0A california.html%22%0A %0Apage = urllib2.urlopen(url) %0Asoup = BeautifulSoup(page)%0A%0Atables = soup.findAll(%22table%22)%0Atables%5B3%5D.find_all(...
b80e52ecf09f96e84625eb6fff9aa7a20059c0f8
Add new top level script to ease running of individual unittests.
test_single.py
test_single.py
Python
0
@@ -0,0 +1,256 @@ +%0Aimport sys%0Aimport unittest%0A%0Afrom toast.mpirunner import MPITestRunner%0A%0Afile = sys.argv%5B1%5D%0A%0Aloader = unittest.TestLoader()%0Arunner = MPITestRunner(verbosity=2)%0Asuite = loader.discover('tests', pattern='%7B%7D'.format(file), top_level_dir='.')%0Arunner.run(suite)%0A
2ae235215d33555b077fbd9e2f0c42d52ccce8c4
add listener
dyn-listener.py
dyn-listener.py
Python
0
@@ -0,0 +1,1338 @@ +#!/usr/bin/env python%0A%0Afrom logentries import LogentriesHandler%0Aimport logging%0Afrom flask import Flask, jsonify, request%0A%0Alistener = Flask(__name__)%0A%0A# Configure the port your postback URL will listen on and provide your%0A# LOGENTRIES_TOKEN%0APORT = 5000%0ALOGENTRIES_TOKEN = %22your...
abc32403d85c536f38a2072941f1864418c55b4f
Create editdistance.py
editdistance.py
editdistance.py
Python
0
@@ -0,0 +1,928 @@ +# Author: Vikram Raman%0A# Date: 09-12-2015%0A%0Aimport time%0A%0A# edit distance between two strings%0A# e(i,j) = min (1 + e(i-1,j) %7C 1 + e(i,j-1) %7C diff(i,j) + e(i-1,j-1))%0A%0Adef editdistance(s1, s2):%0A m = 0 if s1 is None else len(s1)%0A n = 0 if s2 is None else len(s2)%0A%0A if m ...
5a8ad84381650740c5eea8cacb2a6a2e90edaf54
Exclude the 500ing Citizen Code of Conduct.
tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py
tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py
import logging import re import scrapy from scrapy import Request from scrapy.linkextractors import IGNORED_EXTENSIONS from scrapy.linkextractors.lxmlhtml import LxmlLinkExtractor from scrapy.utils.url import url_has_any_extension from typing import Any, Generator, List, Optional, Tuple EXCLUDED_URLS = [ # Googl...
Python
0
@@ -807,16 +807,97 @@ 16617',%0A + # 500s because the site is semi-down%0A 'http://citizencodeofconduct.org/',%0A %5D%0A%0A%0Aclas
f79e0782235943e0ace543db754cca232682f6ad
Add some basic tests
km3pipe/io/tests/test_aanet.py
km3pipe/io/tests/test_aanet.py
Python
0.000012
@@ -0,0 +1,1348 @@ +# Filename: test_aanet.py%0A# pylint: disable=locally-disabled,C0111,R0904,C0301,C0103,W0212%0Afrom km3pipe.testing import TestCase, patch, Mock%0Afrom km3pipe.io.aanet import AanetPump%0A%0Aimport sys%0Asys.modules%5B'ROOT'%5D = Mock()%0Asys.modules%5B'aa'%5D = Mock()%0A%0A__author__ = %22Tamas Gal...
9f39ed48b6f745a96b5874bc87e306c01d3f016f
add 0.py
0.py
0.py
Python
0.999328
@@ -0,0 +1,43 @@ +if __name__ == %22__main__%22:%0A print 2**38%0A
0575be4316e930de71dce8c92d7be428d4565470
Add c.py
c.py
c.py
Python
0.997858
@@ -0,0 +1,63 @@ +%0Aclass C(object):%0A def c(self):%0A print(%22c%22)%0A%0AC().c()%0A
61cfa59b7881f8658a8eab13ba4bc50ac17ba6ce
Add sample plugin used by functional tests
nose2/tests/functional/support/lib/plugin_a.py
nose2/tests/functional/support/lib/plugin_a.py
Python
0
@@ -0,0 +1,149 @@ +from nose2 import events%0A%0Aclass PluginA(events.Plugin):%0A configSection = 'a'%0A%0A def __init__(self):%0A self.a = self.config.as_int('a', 0)%0A
2e6c7235c555799cc9dbb9d1fa7faeab4557ac13
Add stubby saved roll class
db.py
db.py
Python
0
@@ -0,0 +1,256 @@ +import sqlite3%0A%0A%0Aconnection = sqlite3.connect('data.db')%0A%0A%0Aclass SavedRoll:%0A @staticmethod%0A def save(user, name, args):%0A pass%0A%0A @staticmethod%0A def get(user, name):%0A pass%0A%0A @staticmethod%0A def delete(user, name):%0A pass%0A
85044ad914029d9b421b3492e828ad89a85b62a3
Create ept.py
ept.py
ept.py
Python
0.000002
@@ -0,0 +1,786 @@ +# -*- coding: utf-8 -*-%0Afrom TorCtl import TorCtl%0Aimport requests,json%0A%0Aproxies = %7B'http': 'socks5://127.0.0.1:9050','https': 'socks5://127.0.0.1:9050'%7D%0A%0Aclass TorProxy(object):%0A%0A%09def __init__(self,):%0A%09%09pass%0A%0A%09def connect(self, url, method):%0A%09%09r = getattr(reque...
062473c20e59f259d38edcd79e22d0d215b8f52f
Add file to store API Access keys
key.py
key.py
Python
0.000001
@@ -0,0 +1,182 @@ +consumer_key = '' # Enter your values here%0Aconsumer_secret = '' # Enter your values here%0Aaccess_token = '' # Enter your values here%0Aaccess_token_secret = '' # Enter your values here%0A
7f3411268e153c47edc77c681e14aef5747639de
use the subdir /httplib2, follow up for 10273
pwb.py
pwb.py
import sys,os sys.path.append('.') sys.path.append('externals') sys.path.append('pywikibot/compat') if "PYWIKIBOT2_DIR" not in os.environ: os.environ["PYWIKIBOT2_DIR"] = os.path.split(__file__)[0] sys.argv.pop(0) if len(sys.argv) > 0: if not os.path.exists(sys.argv[0]): testpath = os.path.j...
Python
0
@@ -56,16 +56,25 @@ xternals +/httplib2 ')%0D%0Asys.
c1efaebe51c723cd912701ea4cfbf3a9d67068f6
fix logging
bot.py
bot.py
from time import sleep __author__ = 'kotov.a' import options import logging import coloredlogs import sys logger = logging.getLogger('inbot') level = logging.DEBUG handler = logging.StreamHandler(stream=sys.stdout) handler.setLevel(level) logger.addHandler(handler) coloredlogs.install(level=logging.DEBUG) def get_...
Python
0.000002
@@ -777,32 +777,45 @@ media_id, api):%0A + try:%0A logger.info( @@ -831,24 +831,28 @@ , media_id)%0A + api.like @@ -864,32 +864,36 @@ a(media_id)%0A + + sleep_custom()%0A%0A @@ -887,24 +887,78 @@ ep_custom()%0A + except Exception as e:%0A logger.exception(e) %0A%0Adef follow...
81c722316d75e929d120f4d7139c499052a4e2fb
add cli program
cli.py
cli.py
Python
0
@@ -0,0 +1,1178 @@ +#!/usr/bin/env python%0A# -*- codeing: utf-8 -*-%0Aimport socket%0Aimport logging%0Aimport json%0A%0ALOG = logging.getLogger('DynamicLoadCmd')%0A%0A%0Adef main():%0A %0A sc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)%0A sc.connect(('127.0.0.1', 10807))%0A%0A while True:%0A ...
4f08f057c7e4cc8230a996d853892ab3eef36065
Add simple terminal-based version of rock-paper-scissors.
rps.py
rps.py
Python
0
@@ -0,0 +1,1037 @@ +from random import choice%0A%0Aclass RPSGame:%0A shapes = %5B'rock', 'paper', 'scissors'%5D%0A draws = %5B('rock', 'rock'), ('paper', 'paper'), ('scissors', 'scissors')%5D%0A first_wins = %5B('rock', 'scissors'), ('scissors', 'paper'), ('paper', 'rock')%5D%0A %0A def _evaluate(self, p...
024b9dbfb3e34b5ff092ad86a1bec1e82ccfb9f9
Convert tests/test_elsewhere_twitter.py to use Harness & TestClient.
tests/test_elsewhere_twitter.py
tests/test_elsewhere_twitter.py
from gittip.testing import tip_graph from gittip.elsewhere import twitter def test_twitter_resolve_resolves(): with tip_graph(('alice', 'bob', 1, True, False, False, "twitter", "2345")): expected = 'alice' actual = twitter.resolve(u'alice') assert actual == expected, actual
Python
0
@@ -9,15 +9,17 @@ tip. -testing +elsewhere imp @@ -23,24 +23,22 @@ import t -ip_graph +witter %0Afrom gi @@ -46,35 +46,110 @@ tip. -elsewhere import twitter%0A%0A%0A +models import Elsewhere%0Afrom gittip.testing import Harness%0A%0A%0Aclass TestElsewhereTwitter(Harness):%0A def @@ -182,90 +182,293 @@ ves(...
3739819ed85a03520ad3152a569ad6cfb3dd7fb5
Add a used test.
lib/tagnews/tests/test_crimetype_tag.py
lib/tagnews/tests/test_crimetype_tag.py
Python
0.000001
@@ -0,0 +1,557 @@ +import tagnews%0A%0Aclass TestCrimetype():%0A @classmethod%0A def setup_method(cls):%0A cls.model = tagnews.CrimeTags()%0A%0A%0A def test_tagtext(self):%0A self.model.tagtext('This is example article text')%0A%0A%0A def test_tagtext_proba(self):%0A article = 'Murder a...
edc335e68d44c6a0c99499bc4416c55a6072232e
add proper test for govobj stuff
test/test_governance_methods.py
test/test_governance_methods.py
Python
0
@@ -0,0 +1,1227 @@ +import pytest%0Aimport os%0Aos.environ%5B'SENTINEL_ENV'%5D = 'test'%0Aimport sys%0Asys.path.append( os.path.join( os.path.dirname(__file__), '..', 'lib' ) )%0A%0A# NGM/TODO: setup both Proposal and Superblock, and insert related rows,%0A# including Events%0A%0Adef setup():%0A pass%0A #this is ...
8c49123ccaf16a4513f8096475dd2b865cfee66f
Revert of Re-enable mobile memory tests. (https://codereview.chromium.org/414473002/)
tools/perf/benchmarks/memory.py
tools/perf/benchmarks/memory.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. from measurements import memory import page_sets from telemetry import benchmark class MemoryMobile(benchmark.Benchmark): test = memory.Memory page_set...
Python
0.000018
@@ -239,16 +239,67 @@ hmark%0A%0A%0A +@benchmark.Disabled('android') # crbug.com/370977%0A class Me
d36310c6316379086faaf6a29c0392a6ff5ab465
Simple sentence parser with a defined CFG
Natural_Language_Processing/simple_parser.py
Natural_Language_Processing/simple_parser.py
Python
0.997157
@@ -0,0 +1,442 @@ +import nltk%0Afrom nltk import CFG%0A%0Agrammar1 = CFG.fromstring(%22%22%22 S -%3E NP VP%0AVP -%3E V NP %7C V NP PP%0APP -%3E P NP%0AV -%3E %22saw%22 %7C %22ate%22 %7C %22walked%22%0ANP -%3E %22John%22 %7C %22Mary%22 %7C %22Bob%22 %7C Det N %7C Det N PP %7C N%0ADet -%3E %22a%22 %7C %22an%22 %7C %22th...
baff0200dfbe5ac33949f2fa3cddca72912b3b09
add results.py
epac/results.py
epac/results.py
Python
0.000001
@@ -0,0 +1,773 @@ +# -*- coding: utf-8 -*-%0A%22%22%22%0ACreated on Fri May 17 16:37:54 2013%0A%0A@author: edouard.duchesnay@cea.fr%0A%22%22%22%0A%0A%0Aclass Results(dict):%0A TRAIN = %22tr%22%0A TEST = %22te%22%0A SCORE = %22score%22%0A PRED = %22pred%22%0A TRUE = %22true%22%0A SEP = %22_%22%0A%0A ...
553ba87b8858c11b2c2778d35a3c6e3694304278
create the Spider of Turkey of McDonalds
locations/spiders/mcdonalds_tr.py
locations/spiders/mcdonalds_tr.py
Python
0
@@ -0,0 +1,2521 @@ +# -*- coding: utf-8 -*-%0Aimport scrapy%0Aimport json%0Aimport re%0Afrom locations.items import GeojsonPointItem%0A%0Aclass McDonaldsTRSpider(scrapy.Spider):%0A name = 'mcdonalds_tr'%0A allowed_domains = %5B'www.mcdonalds.com.tr'%5D%0A %0A def start_requests(self):%0A url = 'h...
0fef9ab4e7a70a5e53cf5e5ae91d7cc5fd8b91da
Create xml_grabber.py
grabbing/xml_grabber.py
grabbing/xml_grabber.py
Python
0.000008
@@ -0,0 +1,1559 @@ +%22%22%22XML TYPE%0A%3C?xml version=%221.0%22 encoding=%22utf-8%22?%3E%0A%3Crss xmlns:atom=%22http://www.w3.org/2005/Atom%22 version=%222.0%22%3E%0A%09%3Cchannel%3E%0A%09%09%3Ctitle%3EQ Blog%3C/title%3E%0A%09%09%3Clink%3Ehttp://agus.appdev.my.id/feed/%3C/link%3E%0A%09%09%3Cdescription%3ELatest Posts...
6b6f7d225633e9c6bd406de695a1e52ce830a14e
Create feature_util.py
feature_util.py
feature_util.py
Python
0.000001
@@ -0,0 +1,58 @@ +'''%0AContains methods to extract features for training%0A'''%0A
88ff76fbc9275a327e016e9aef09d4ab2c3647e9
test setup
Classes/test_Classes/test_State.py
Classes/test_Classes/test_State.py
Python
0.000001
@@ -0,0 +1,76 @@ +%22%22%22Attribute System unit tests.%22%22%22%0A%0Aimport pytest%0Afrom ..State import State%0A
ae86eb3f7a3d7b2a8289f30c8d3d312c459710fb
update code laplacian article
assets/codes/laplacian_filter.py
assets/codes/laplacian_filter.py
Python
0
@@ -0,0 +1,1243 @@ +import cv2%0Aimport numpy as np%0Afrom PIL import Image%0A%0Aimage = cv2.imread(%22output.jpg%22)%0Agray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)%0A%0Alaplacian0 = np.array((%5B0, 1, 0%5D,%0A %5B1, -4, 1%5D,%0A %5B0, 1, 0%5D), dtype=%22int%22)%0Alaplacian1 ...
d892914381a3067fdd04d6d0af0aceda0c092039
test staff
staff/tests/test_staff.py
staff/tests/test_staff.py
Python
0.000005
@@ -0,0 +1,1001 @@ +%22%22%22Test sending emails.%22%22%22%0A%0Afrom happening.tests import TestCase%0Afrom model_mommy import mommy%0Afrom django.conf import settings%0A%0A%0Aclass TestStaff(TestCase):%0A%0A %22%22%22Test staff views.%22%22%22%0A%0A def setUp(self):%0A %22%22%22Set up users.%22%22%22%0A ...
a193f1d9b1816f72661254bba69c2c4a1e2c1b30
Add tests for google menu
tests/extensions/functional/tests/test_google_menu.py
tests/extensions/functional/tests/test_google_menu.py
Python
0
@@ -0,0 +1,1551 @@ +%22%22%22%0AGoogle Menu tests%0A%22%22%22%0A%0A%0Afrom base import BaseTouchscreenTest%0Aimport time%0Afrom base import MAPS_URL, ZOOMED_IN_MAPS_URL, Pose%0Afrom base import screenshot_on_error, make_screenshot%0Aimport re%0A%0Aclass TestGoogleMenu(BaseTouchscreenTest):%0A%0A @screenshot_on_error...
26df96a0c772c70013cc7a027022e84383ccaee2
Add a helper script for converting -print-before-all output into a file based equivelent
utils/chunk-print-before-all.py
utils/chunk-print-before-all.py
Python
0.999981
@@ -0,0 +1,1221 @@ +#!/usr/bin/env python%0A# Given a -print-before-all -print-module-scope log from an opt invocation,%0A# chunk it into a series of individual IR files, one for each pass invocation.%0A# If the log ends with an obvious stack trace, try to split off a separate%0A# %22crashinfo.txt%22 file leaving only ...
cd08fb72fea040d31394435bc6c1892bc208bcc0
Add sumclip.py for WPA analysis
bin/sumclip.py
bin/sumclip.py
Python
0
@@ -0,0 +1,1947 @@ +# Copyright 2016 Bruce Dawson. All Rights Reserved.%0D%0A#%0D%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0D%0A# you may not use this file except in compliance with the License.%0D%0A# You may obtain a copy of the License at%0D%0A#%0D%0A# http://www.apache.org/license...
34317172bc8b0cf6ec512181e7fac30bc4804cea
Create goingLoopyWithPython.py
goingLoopyWithPython.py
goingLoopyWithPython.py
Python
0.00004
@@ -0,0 +1,560 @@ +# date: 11/09/15%0A# username: A1fus%0A# name: Alfie Bowman%0A# description: Going Loopy with Python%0A%0Alines = 0 #defines variable%0Awhile lines %3C50: #causes Python to do anything indented until the condition is met%0A print(%22I will not mess about in Computer Science lessons%22) #p...
3b3be788b4d414e5828b985300e4e5cca43afdff
initialize listfield before __set__
modularodm/fields/ListField.py
modularodm/fields/ListField.py
from ..fields import Field, List import copy class ListField(Field): def __init__(self, field_instance): super(self.__class__, self).__init__(list=True) # ListField is a list of the following (e.g., ForeignFields) self._field_instance = field_instance # Descriptor data is this t...
Python
0.000001
@@ -1062,32 +1062,120 @@ e, '__iter__'):%0A + self.data%5Binstance%5D = self._list_class(field_instance=self._field_instance)%0A self
828b7614c06ab4879040d5e289b4f12659c96b7e
Fix error preventing use of custom converter
brte/engine.py
brte/engine.py
if "bpy" in locals(): import imp imp.reload(socket_api) imp.reload(_converters) imp.reload(processors) else: import bpy from . import socket_api from . import converters as _converters from . import processors import os import socket import struct import subprocess import sys import tim...
Python
0
@@ -1311,16 +1311,24 @@ erter = +kwargs%5B' converte @@ -1328,16 +1328,18 @@ onverter +'%5D %0A
a90c05355c2735c0a8d2b87d12b143d91f801660
make timeline of training output
bsd/epochizer.py
bsd/epochizer.py
Python
0.000096
@@ -0,0 +1,62 @@ +'''Group ims'''%0A%0Aimport os%0Aimport sys%0Aimport time%0A%0A%0A%0Aif __name
d3fa9df4c4f91ddb42954ea125ed69c2380ada62
create python version of list_change_file_hashes
src/list_changed_file_hashes.py
src/list_changed_file_hashes.py
Python
0.000003
@@ -0,0 +1,1108 @@ +from git import Repo%0Aimport os%0A%0Aclass CommitList:%0A%0A def __init__(self, repo):%0A self.repo = repo%0A%0A def print_all_blob_hashes(self):%0A hashes = set()%0A for commit in self.repo.iter_commits(self.repo.head):%0A for p in commit.parents:%0A ...
5f3f2ce52569eb3ae57ab3e4a2eaff29fc0d6522
add pyqt demo
study/python/pyqt/demo.py
study/python/pyqt/demo.py
Python
0
@@ -0,0 +1,1625 @@ +from PyQt5.QtWidgets import QMainWindow, QPushButton , QWidget , QMessageBox, QApplication, QHBoxLayout%0Aimport sys, sqlite3%0A%0Aclass WinForm(QMainWindow):%0A def __init__(self, parent=None):%0A super(WinForm, self).__init__(parent)%0A button1 = QPushButton('%E6%8F%92%E5%85%A5%E6...
bf8328ff9b020bd3b99268744f86f94db2924011
Create process.py
process.py
process.py
Python
0.000002
@@ -0,0 +1,416 @@ +rm 1_*%0Arm 21_*%0Ahead *error.txt %3E%3E info_gg_unpaired.txt%0Asource /mnt/common/epfl/etc/bbcf_bashrc ### para llamar a todos los programas de bbcf%0Amodule add UHTS/Analysis/samtools/1.2;%0Apython -c %22from bbcflib import mapseq%22%0Afor i in %7B2..48%7D%0Ado%0A %09add_nh_flag %22$i%22_16S_gg.s...
93589c7e139d3af4b0a949f107fc5e20ed69fee4
add atop stats library
cbagent/collectors/libstats/atopstats.py
cbagent/collectors/libstats/atopstats.py
Python
0
@@ -0,0 +1,1988 @@ +from uuid import uuid4%0A%0Afrom fabric.api import run%0A%0Afrom systemstats import SystemStats, multi_task, single_task%0A%0A%0Auhex = lambda: uuid4().hex%0A%0A%0Aclass AtopStats(SystemStats):%0A%0A def __init__(self, hosts, user, password):%0A super(AtopStats, self).__init__(hosts, user,...
a04942d1073ed5d031b2f85e412578d7e33d867a
set default output to png
sympy/printing/preview.py
sympy/printing/preview.py
import os import time import tempfile from latex import latex def preview(expr, output='ps', viewer=None, euler=True): """View expression in PNG, DVI, PostScript or PDF form. This will generate LaTeX representation of the given expression and compile it using available TeX distribiution. Then it w...
Python
0.000001
@@ -85,17 +85,18 @@ utput='p -s +ng ', viewe @@ -544,26 +544,19 @@ default -PostScript +png output
8c65226b79ad0f7ac3487a117298498cff4b23be
Update cherry-pickup.py
Python/cherry-pickup.py
Python/cherry-pickup.py
# Time: O(n^3) # Space: O(n^2) class Solution(object): def cherryPickup(self, grid): """ :type grid: List[List[int]] :rtype: int """ # dp holds the max # of cherries two k-length paths can pickup. # The two k-length paths arrive at (i, k - i) and (j, k - j), ...
Python
0
@@ -603,16 +603,31 @@ (xrange( +max(0, k-n-1), min(k+1,
43f2accb8cd4f63d62f7515bb5633296a7d592f0
Add setup.py to spm.
nipype/interfaces/spm/setup.py
nipype/interfaces/spm/setup.py
Python
0.000136
@@ -0,0 +1,342 @@ +def configuration(parent_package='',top_path=None):%0A from numpy.distutils.misc_util import Configuration%0A%0A config = Configuration('spm', parent_package, top_path)%0A%0A config.add_data_dir('tests')%0A%0A return config%0A%0Aif __name__ == '__main__':%0A from numpy.distutils.core i...
c111c24e870788d729c0d875053ce4bc2a41fa2f
Update captureImage.py
BAD/captureImage.py
BAD/captureImage.py
from urlCommands import UrlCommands as UC # A collection of url commands to request go pro actions import cv2 import numpy as np import os import time import threading # Home cherokee directory: # http://10.5.5.9:8080/videos/DCIM/100GOPRO/ #-----------------------------------------------------------------...
Python
0.000001
@@ -1205,32 +1205,128 @@ r(time.time())%0D%0A + print %22Closed %22 + threading.currentThread().getName() + %22 %22 + str(time.time())%0D%0A %0D%0A def start_ @@ -1537,16 +1537,112 @@ ime())%0D%0A + print %22Closed %22 + threading.currentThread().getName() + %22 %22 + str(time.time())%0D%0A ...
4797918eec0c43ada3f6eb9a63ec2f275eced253
Add spider for State Farm Agents; closes #519
locations/spiders/statefarm.py
locations/spiders/statefarm.py
Python
0
@@ -0,0 +1,2436 @@ +import json%0Aimport re%0Aimport scrapy%0A%0Afrom locations.items import GeojsonPointItem%0A%0A%0Aclass StateFarmSpider(scrapy.Spider):%0A name = %22statefarm%22%0A allowed_domains = %5B%22statefarm.com%22%5D%0A download_delay = 0.2%0A%0A start_urls = %5B%0A 'https://www.statefarm...
ebec02461bd341d49a499572d56bdef4520a650e
Add a missing migration
Instanssi/store/migrations/0007_storeitem_is_ticket.py
Instanssi/store/migrations/0007_storeitem_is_ticket.py
Python
0.00011
@@ -0,0 +1,596 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.10.4 on 2016-12-11 22:21%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('store', '0006_auto_20161209_0015'),%0A %5D%0A%0A...
cb01c58e0d11999331eb01e33bf970db8742f2f8
Create VertexGlyphFilter.py
src/Python/Filtering/VertexGlyphFilter.py
src/Python/Filtering/VertexGlyphFilter.py
Python
0.000001
@@ -0,0 +1,1285 @@ +#!/usr/bin/env python%0Aimport vtk%0A%0Adef main():%0A colors = vtk.vtkNamedColors()%0A points = vtk.vtkPoints()%0A points.InsertNextPoint(0,0,0)%0A points.InsertNextPoint(1,1,1)%0A points.InsertNextPoint(2,2,2)%0A %0A polydata = vtk.vtkPolyData()%0A polydata.SetPoints(points...
d2536ce3ded4fc2ea5648025f04efa093629b70f
test rapapasswords table
test/rapapasswordstest.py
test/rapapasswordstest.py
Python
0.000008
@@ -0,0 +1,1358 @@ +#!/usr/bin/python2.4%0A#%0A# Copyright (c) 2005-2007 rPath, Inc.%0A#%0A%0Aimport testsuite%0Atestsuite.setup()%0A%0Aimport os%0Aimport sys%0Aimport time%0Aimport tempfile%0A%0Aimport fixtures%0A%0Afrom mint import rapapasswords%0A%0Aclass rAPAPasswordsTest(fixtures.FixturedUnitTest):%0A @fixtures...
45e86e49e845ef25df6e1db3bcb336809ffb5f5f
Disable IPv6 on wireless (Extension Attribute for Casper)
ipv6_Checker.py
ipv6_Checker.py
Python
0
@@ -0,0 +1,1086 @@ +#!/usr/bin/python%0A%0A#Copyright 2014 Quam Sodji%0A%0Aimport subprocess%0A%0Adef getinfo(hardware): #Return network info on select interface%0A info = subprocess.check_output(%5B%22networksetup%22, %22-getinfo%22, hardware%5D)%0A return info%0A%0Awireless = %5B%22Airport%22, %22Wi-Fi%22%5D #...
c68872453a0c4a28e31d5ee38faf11d8a0486b62
add drone_setup.py
drone_setup.py
drone_setup.py
Python
0.000001
@@ -0,0 +1,1945 @@ +import requests%0Aimport json%0A%0A# Open user-account.json and create a json object containing%0A# user credential fields.%0Awith open('user-account.json', %22r%22) as jsonFile:%0A jsonUser = json.load(jsonFile)%0A jsonFile.close()%0A%0A# Assign user credentials to variables%0AUSER_EMAIL = json...
a5ff02a696c553dbd4038e1cb1c0fd0668b30006
Create ets2look.py
FreePIE/ets2look.py
FreePIE/ets2look.py
Python
0
@@ -0,0 +1,226 @@ +hSen = 750%0AvSen = 200%0A%0Aif starting:%0A lastX = 0%0A lastY = 0%0A%0AthisX = xbox360%5B0%5D.rightStickX * hSen%0AthisY = xbox360%5B0%5D.rightStickY * vSen%0A%0Amouse.deltaX = thisX - lastX%0Amouse.deltaY = lastY - thisY%0A%0AlastX = thisX%0AlastY = thisY%0A%0A
7bea7133d8b069e784b8e35e045a6411cac8882c
add movielens (#1027)
python/dllib/src/bigdl/dllib/feature/dataset/movielens.py
python/dllib/src/bigdl/dllib/feature/dataset/movielens.py
Python
0
@@ -0,0 +1,1670 @@ +#%0A# Copyright 2016 The BigDL Authors.%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 r...
46b7dd2c389d2bf020e2c413518e0f960fa28ba4
Add test for current_locale expression
tests/test_expressions.py
tests/test_expressions.py
Python
0.000003
@@ -0,0 +1,185 @@ +from sqlalchemy_i18n.expressions import current_locale%0A%0A%0Aclass TestCurrentLocaleExpression(object):%0A def test_render(self):%0A assert str(current_locale()) == ':current_locale'%0A
633f5ad8064395ec3805e38ea1f73a9aa7475878
Use the caller's unpickler as well
jsonpickle/_handlers.py
jsonpickle/_handlers.py
import datetime import jsonpickle class DatetimeHandler(jsonpickle.handlers.BaseHandler): """ Datetime objects use __reduce__, and they generate binary strings encoding the payload. This handler encodes that payload to reconstruct the object. """ def flatten(self, obj, data): pickler =...
Python
0.000001
@@ -711,38 +711,26 @@ ckler = -jsonpickle.Unpickler() +self._base %0A @@ -1429,30 +1429,18 @@ r = -jsonpickle.Unpickler() +self._base %0A
f1f654d823ee8454b53f27372bbaab85f4d01631
add analyzer
performancetest/rec-analyze.py
performancetest/rec-analyze.py
Python
0.000001
@@ -0,0 +1,2025 @@ +#!/usr/bin/python%0A# -*- coding: utf-8 -*-%0A%0Afrom __future__ import division%0A%0Aimport re%0Aimport sys%0Aimport os%0Aimport json%0Aimport numpy as np%0A%0Adef f(n):%0A return int(round(n))%0A %0A%0Adef report(name, seq):%0A print '===', name, '%5Bms%5D ==='%0A print %22mean:%22, f(...
e7809f307610e98cb8356110eec7e8c1f41e9d46
Backup script.
management/backup.py
management/backup.py
Python
0
@@ -0,0 +1,979 @@ +#!/usr/bin/env python%0Aimport sys%0Aimport os%0Aimport glob%0Aimport shutil%0Aimport mc_bin_client%0A%0Adef usage():%0A print %3E%3E sys.stderr, %22%22%22%0AUsage: %25s %3Cdest_dir%3E%0A%22%22%22 %25 os.path.basename(sys.argv%5B0%5D)%0A sys.exit(1)%0A%0Adef main():%0A if len(sys.argv) != 2:...
2945b68d5a8b6505f1a8516dd8b5f7d4b85aac5a
Add tests for storeslice
numba/tests/test_storeslice.py
numba/tests/test_storeslice.py
Python
0
@@ -0,0 +1,920 @@ +from __future__ import print_function%0Aimport numba.unittest_support as unittest%0Aimport numpy as np%0Afrom numba.compiler import compile_isolated, Flags%0A%0A%0Adef usecase(obs, nPoints, B, sigB, A, sigA, M, sigM):%0A center = nPoints / 2%0A print(center)%0A obs%5B0:center%5D = np.arange(...
c468f49e50b7a55995ef1fc447c04993c2171ca2
Add lc0242_valid_anagram.py
lc0242_valid_anagram.py
lc0242_valid_anagram.py
Python
0.007833
@@ -0,0 +1,683 @@ +%22%22%22Leetcode 242. Valid Anagram%0AEasy%0A%0AURL: https://leetcode.com/problems/valid-anagram/%0A%0AGiven two strings s and t,%0Awrite a function to determine if t is an anagram of s.%0A%0AExample 1:%0AInput: s = %22anagram%22, t = %22nagaram%22%0AOutput: true%0A%0AExample 2:%0AInput: s = %22rat%...
dbb812621c58d92bc3c2aed6135ddb9b91cd9181
implement bucket compaction test
perfrunner/tests/compaction.py
perfrunner/tests/compaction.py
Python
0
@@ -0,0 +1,699 @@ +from perfrunner.tests import TargetIterator%0Afrom perfrunner.tests.kv import KVTest%0A%0A%0Aclass DbCompactionTest(KVTest):%0A%0A def compact(self):%0A self.reporter.start()%0A for target_settings in TargetIterator(self.cluster_spec,%0A s...
c2982060ff7ffbbf784a37675f2caec381e9aa48
Create quicksort.py
Python/quicksort.py
Python/quicksort.py
Python
0.000004
@@ -0,0 +1,569 @@ +def quickSort(arr):%0A less = %5B%5D%0A pivotList = %5B%5D%0A more = %5B%5D%0A if len(arr) %3C= 1:%0A return arr%0A else:%0A pivot = arr%5B0%5D%0A for i in arr:%0A if i %3C pivot:%0A less.append(i)%0A elif i %3E pivot:%0A ...
9bf8baec1a0a72d33ad6021bf90488e1163c94de
make IPython tab-complete work on docmuments
metadatastore/doc.py
metadatastore/doc.py
from __future__ import (absolute_import, division, print_function, unicode_literals) import six import collections from functools import reduce _HTML_TEMPLATE = """ <table> {% for key, value in document | dictsort recursive %} <tr> <th> {{ key }} </th> <td> {% if value.items %} ...
Python
0.000001
@@ -842,141 +842,67 @@ me)%0A -%0A -def __getattr__(self, key):%0A try:%0A return self%5Bkey%5D%0A except KeyError:%0A raise AttributeError( + super(Document, self).__setattr__('__dict__', self )%0A%0A
592f9901f9125534f59efc2cb36bb4fb2bab351e
Fix typo (#8754)
homeassistant/scripts/__init__.py
homeassistant/scripts/__init__.py
"""Home Assistant command line scripts.""" import argparse import importlib import logging import os import sys from typing import List from homeassistant.bootstrap import mount_local_lib_path from homeassistant.config import get_default_config_dir from homeassistant.const import CONSTRAINT_FILE from homeassistant.ut...
Python
0.001331
@@ -1757,16 +1757,17 @@ rting sc +r ipt, cou
0aaed7764d743afe46af503fe5938fa718fe3abc
Set up contextmanager for db cals
teamworkApp/lib/dbCalls.py
teamworkApp/lib/dbCalls.py
Python
0
@@ -0,0 +1,840 @@ +# muddersOnRails()%0A# Sara McAllister November 5, 2-17%0A# Last updated: 11-5-2017%0A%0A# library for SQLite database calls for teamwork analysis app%0A%0Aimport contextlib%0Aimport sqlite3%0A%0ADB = 'db/development.sqlite3'%0A%0Adef connect(sqlite_file):%0A %22%22%22 Make connection to an SQLite...
6e5074cf969f8667e633ab2fa3373e83402e7610
Add DigitalOcean
agithub/DigitalOcean.py
agithub/DigitalOcean.py
Python
0.000002
@@ -0,0 +1,727 @@ +# Copyright 2012-2016 Jonathan Paugh and contributors%0A# See COPYING for license details%0Afrom base import *%0A%0Aclass DigitalOcean(API):%0A '''%0A Digital Ocean API%0A '''%0A def __init__(self, token=None, *args, **kwargs):%0A props = ConnectionProperties(%0A api...
18aeea496175cb73ccf0d9f164359f75f854b512
add background_helper
portality/background_helper.py
portality/background_helper.py
Python
0.000001
@@ -0,0 +1,958 @@ +%22%22%22 collections of wrapper function for helping you to create BackgroundTask%0A%0A%22%22%22%0Afrom typing import Callable, Type%0A%0Afrom portality import models%0Afrom portality.background import BackgroundApi, BackgroundTask%0Afrom portality.core import app%0A%0A%0Adef execute_by_job_id(job_i...
caef73c6d7d9853e32f5a75b321f515f3c138b6d
Create nzbget.py
comandarr/nzbget.py
comandarr/nzbget.py
Python
0.000004
@@ -0,0 +1 @@ +%0A
853972cac73c3837c37a5682c2057a0aab500961
Add tests for VAE framework
pylearn2/models/tests/test_vae.py
pylearn2/models/tests/test_vae.py
Python
0
@@ -0,0 +1,2935 @@ +import numpy%0Aimport theano%0Aimport theano.tensor as T%0Afrom pylearn2.models.mlp import MLP%0Afrom pylearn2.models.mlp import Linear, ConvRectifiedLinear%0Afrom pylearn2.models.vae import VAE%0Afrom pylearn2.models.vae.visible import BinaryVisible%0Afrom pylearn2.models.vae.latent import Diagonal...
bf1e9434afc03a21cab5b274401a755c3b84196c
add event.brochure migration
migrations/mezzanine_agenda/0014_event_brochure.py
migrations/mezzanine_agenda/0014_event_brochure.py
Python
0
@@ -0,0 +1,533 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.9.2 on 2016-05-10 13:56%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0Aimport mezzanine.core.fields%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('mezzanine_agenda', '0013_auto...
d0afa54fa01a2981c10f0bbdbc0f5eab4b5ad710
test that test fullscreen/resize with 3d actions
test/test_3d_fullscreen.py
test/test_3d_fullscreen.py
Python
0
@@ -0,0 +1,1225 @@ +# This code is so you can run the samples without installing the package%0Aimport sys%0Aimport os%0Asys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))%0A#%0A%0Aimport pyglet%0Aimport cocos%0Afrom cocos.director import director%0Afrom cocos.actions import *%0Afrom cocos.layer import *%...
2948be3af67b7ec124942654dc7f734eec346f55
Check that the c_api module is not destroyed
tensorflow/python/framework/c_api_util.py
tensorflow/python/framework/c_api_util.py
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0
@@ -1302,32 +1302,54 @@ modules.%0A if +c_api is not None and c_api.TF_DeleteS @@ -1359,32 +1359,32 @@ us is not None:%0A - c_api.TF_D @@ -1716,32 +1716,54 @@ modules.%0A if +c_api is not None and c_api.TF_DeleteG @@ -2174,31 +2174,53 @@ er modules.%0A - if +c_api is not None and c_api.TF...
3ad49c6d2ca7ca5f04302f8ee125741ddb68c879
decode base64 output string to UTF-8
liquid_tags/graphviz.py
liquid_tags/graphviz.py
""" GraphViz Tag --------- This implements a Liquid-style graphviz tag for Pelican. You can use different Graphviz programs like dot, neato, twopi etc. [1] [1] http://www.graphviz.org/ Syntax ------ {% graphviz <program> { <DOT code> } %} Examples -------- {% graphviz dot { digraph graph...
Python
0.999998
@@ -2901,16 +2901,32 @@ (output) +.decode('utf-8') %0A%0A el
126af71599e14866501e2e9f479b2658fff56526
Create ipc_lista2.06.py
lista2/ipc_lista2.06.py
lista2/ipc_lista2.06.py
Python
0.000001
@@ -0,0 +1 @@ +%0A
dac5f9e406f3c205d6ed212d4414ca55c94b8f15
Add test for exact search with album query
tests/local/test_search.py
tests/local/test_search.py
Python
0
@@ -0,0 +1,507 @@ +from __future__ import unicode_literals%0A%0Aimport unittest%0A%0Afrom mopidy.local import search%0Afrom mopidy.models import Album, Track%0A%0A%0Aclass LocalLibrarySearchTest(unittest.TestCase):%0A def test_find_exact_with_album_query(self):%0A expected_tracks = %5BTrack(album=Album(name='...
5701de3e75de98c939eaadcb8d05b6ab228ded8b
Make output tabular
tests/site_detect_tests.py
tests/site_detect_tests.py
# -*- coding: utf-8 -*- """Test for site detection.""" # # (C) Pywikibot team, 2014-2015 # # Distributed under the terms of the MIT license. # from __future__ import unicode_literals __version__ = '$Id$' from pywikibot.site_detect import MWSite from pywikibot.tools import PY2 from tests.aspects import unittest, Tes...
Python
0.000025
@@ -1731,16 +1731,73 @@ tem%5B0%5D)%0A + width = max(len(item%5B1%5D) for item in sorted_all)%0A @@ -1847,16 +1847,20 @@ '%7B0%7D %7B1 +:%7B3%7D %7D : %7B2%7D' @@ -1893,16 +1893,23 @@ 1%5D, i%5B2%5D +, width )%0A
a99e92756a10529ca1e52d1d351bc43fea067b35
Add fabfile for API
packaging/radar-api/fabfile.py
packaging/radar-api/fabfile.py
Python
0
@@ -0,0 +1,892 @@ +import os%0Aimport re%0A%0Afrom fabric.api import task, put, run, cd%0A%0A%0A@task%0Adef deploy(archive=None, name='radar-api'):%0A if archive is None:%0A # Use the latest archive by default%0A archive = sorted(x for x in os.listdir('.') if x.endswith('.tar.gz'))%5B-1%5D%0A%0A ver...
246ed2ba33f21b696af2a00793a521bc77da2a45
add excel-sheet-column-title
vol4/excel-sheet-column-title/excel-sheet-column-title.py
vol4/excel-sheet-column-title/excel-sheet-column-title.py
Python
0.000386
@@ -0,0 +1,314 @@ +import string%0A%0Aclass Solution(object):%0A def convertToTitle(self, n):%0A %22%22%22%0A :type n: int%0A :rtype: str%0A %22%22%22%0A alphabet = string.uppercase%0A ret = ''%0A while n %3E 0:%0A ret = alphabet%5B(n - 1) %25 26%5D + ret%0...
2674b886b786086ec62a18b953e80ec6fceaa59d
Bump subminor version (2.0.5 -> 2.0.6)
endpoints/__init__.py
endpoints/__init__.py
#!/usr/bin/python # # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
Python
0
@@ -1208,7 +1208,7 @@ 2.0. -5 +6 '%0A
0ca298f6706706637dccd4f27c56eed6e91c98ba
Rename new test class correctly and flesh out first passing tests
tests/runners.py
tests/runners.py
from spec import Spec class Runner_(Spec): class run: def out_stream_defaults_to_sys_stdout(self): "out_stream defaults to sys.stdout" def err_stream_defaults_to_sys_stderr(self): "err_stream defaults to sys.stderr" def out_stream_can_be_overridden(self): ...
Python
0.000002
@@ -1,8 +1,20 @@ +import sys%0A%0A from spe @@ -26,16 +26,98 @@ ort Spec +, trap, eq_%0A%0Afrom invoke import Local, Context%0A%0Afrom _utils import mock_subprocess %0A%0A%0Aclass @@ -121,14 +121,13 @@ ass -Runner +Local _(Sp @@ -146,16 +146,66 @@ ss run:%0A + @trap%0A @mock_subprocess(out=%22sup%2...
f6bd8bcf45d182e3aa8edd3cf0fef5aa35125e31
create ccc.py
src/ccc.py
src/ccc.py
Python
0
@@ -0,0 +1,46 @@ +#%0A# ccc.py%0A# Created by pira on 2017/07/28.%0A#%0A
0843eba3476809e833ea52611d9e193bf0872dbd
Add Back Builder Code
tools/Builder.py
tools/Builder.py
Python
0
@@ -0,0 +1,1828 @@ +import os%0Aimport hashlib%0Aimport RandomIO%0A%0A%0A# config vars%0Amy_address = %221CutsncbjcCtZKeRfvQ7bnYFVj28zeU6fo%22%0Amy_store_path = %22C://Farm/%22%0Amy_shard_size = 1024*1024*128 # 128 MB%0Amy_max_size = 1024*1024*640 # 640 MB%0A%0A%0Aclass Builder:%0A def __init__(self, address, shar...
8b7d1ffb2461e12b5cbce6873e51ca14f9d8cf90
Revert "Accidentally deleted manage.py"
SnookR/manage.py
SnookR/manage.py
Python
0
@@ -0,0 +1,804 @@ +#!/usr/bin/env python%0Aimport os%0Aimport sys%0A%0Aif __name__ == %22__main__%22:%0A os.environ.setdefault(%22DJANGO_SETTINGS_MODULE%22, %22SnookR.settings%22)%0A try:%0A from django.core.management import execute_from_command_line%0A except ImportError:%0A # The above import ...
202c8472298780cbf80bf3253550e4277236c0c9
add simple noise fitting code
kid_readout/analysis/noise_fit.py
kid_readout/analysis/noise_fit.py
Python
0
@@ -0,0 +1,918 @@ +import numpy as np%0Aimport lmfit%0Afrom kid_readout.analysis import fitter%0Aprint %22k%22%0Adef lorenz(f,fc,a):%0A return a/(1+(f/fc)**2)%0A%0Adef simple_noise_model(params,f):%0A A = params%5B'A'%5D.value%0A fc = params%5B'fc'%5D.value%0A nw = params%5B'nw'%5D.value%0A return lorenz...
5879e59f34e31707f207c588143711dbdf18ee8b
remove login_required for register page
app/main/views/index.py
app/main/views/index.py
from flask import render_template from flask_login import login_required from app.main import main @main.route('/') def index(): return render_template('signedout.html') @main.route("/govuk") def govuk(): return render_template('govuk_template.html') @main.route("/register") @login_required def register(...
Python
0
@@ -284,32 +284,16 @@ ister%22)%0A -@login_required%0A def regi