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
1c7b9c1ed1f4d6a8ee201ba109db95449181fee1
Make operation tests timezone-aware
pylxd/tests/test_operation.py
pylxd/tests/test_operation.py
# Copyright (c) 2015 Canonical Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
Python
0.000106
@@ -1607,32 +1607,35 @@ tetime.datetime. +utc fromtimestamp(14 @@ -1629,35 +1629,35 @@ mtimestamp(14338 -696 +768 44)%0A @@ -1767,32 +1767,35 @@ tetime.datetime. +utc fromtimestamp(14 @@ -1789,35 +1789,35 @@ mtimestamp(14338 -696 +768 43)%0A @@ -2139,32 +2139,35 @@ tetime.datetime. +utc...
36af45d88f01723204d9b65d4081e74a80f0776b
Add test for layers module.
test/layers_test.py
test/layers_test.py
Python
0
@@ -0,0 +1,1043 @@ +import theanets%0Aimport numpy as np%0A%0A%0Aclass TestLayer:%0A def test_build(self):%0A layer = theanets.layers.build('feedforward', nin=2, nout=4)%0A assert isinstance(layer, theanets.layers.Layer)%0A%0A%0Aclass TestFeedforward:%0A def test_create(self):%0A l = theanets...
3dcf251276060b43ac888e0239f26a0cf2531832
Add tests for proxy drop executable
tests/test_proxy_drop_executable.py
tests/test_proxy_drop_executable.py
Python
0
@@ -0,0 +1,2859 @@ +# This Source Code Form is subject to the terms of the Mozilla Public%0A# License, v. 2.0. If a copy of the MPL was not distributed with this%0A# file, You can obtain one at http://mozilla.org/MPL/2.0/.%0A# Copyright (c) 2017 Mozilla Corporation%0Afrom positive_alert_test_case import PositiveAlertTe...
30d4301a04081f3d7a4fdba835a56aa0adac1375
fix latent slaves started serially with monkey patch instead
monkeypatch.py
monkeypatch.py
Python
0
@@ -0,0 +1,1884 @@ +from twisted.python import log%0Afrom twisted.internet import reactor%0A%0A%0Adef botmaster_maybeStartBuildsForSlave(self, slave_name):%0A %22%22%22%0A We delay this for 10 seconds, so that if multiple slaves start at the same%0A time, builds will be distributed between them.%0A %22%22%2...
379aef7e3aebc05352cacd274b43b156e32de18b
Add script to run tests
runtests.py
runtests.py
Python
0.000001
@@ -0,0 +1,588 @@ +#!/usr/bin/env python%0Aimport argparse%0Aimport sys%0A%0Aimport django%0Afrom django.conf import settings%0Afrom django.test.utils import get_runner%0A%0A%0Adef runtests(test_labels):%0A settings.configure(INSTALLED_APPS=%5B'tests'%5D)%0A django.setup()%0A TestRunner = get_runner(settings)%...
abf39931331f54aff5f10345939420041bd2039d
Add test for APS2 instruction merging.
tests/test_APS2Pattern.py
tests/test_APS2Pattern.py
Python
0
@@ -0,0 +1,1563 @@ +import h5py%0Aimport unittest%0Aimport numpy as np%0Afrom copy import copy%0A%0Afrom QGL import *%0Afrom instruments.drivers import APS2Pattern%0A%0Aclass APSPatternUtils(unittest.TestCase):%0A def setUp(self):%0A self.q1gate = Channels.LogicalMarkerChannel(label='q1-gate')%0A self....
df05088b5a6233cb262017b8489723c23000eb17
Add variable
src/robotide/ui/images.py
src/robotide/ui/images.py
# Copyright 2008-2009 Nokia Siemens Networks Oyj # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
Python
0.000005
@@ -619,16 +619,57 @@ port wx%0A +from robot.parsing.model import Variable%0A %0A%0A_SIZE @@ -1175,16 +1175,73 @@ AL_FILE) +,%0A 'Variable': _TreeImage(self, 'process.png') %0A
aeaf2e1a1207f2094ea4298b1ecff015f5996b5a
Add test cases for gabor filter
skimage/filter/tests/test_gabor.py
skimage/filter/tests/test_gabor.py
Python
0
@@ -0,0 +1,1235 @@ +import numpy as np%0Afrom numpy.testing import assert_almost_equal, assert_array_almost_equal%0A%0Afrom skimage.filter import gabor_kernel, gabor_filter%0A%0A%0Adef test_gabor_kernel_sum():%0A for sigmax in range(1, 10, 2):%0A for sigmay in range(1, 10, 2):%0A for frequency in r...
a70f46aac52be5b38b869cfbe18c0421a0032aee
Add script to count parameters of PyTorch model
count_params.py
count_params.py
Python
0
@@ -0,0 +1,208 @@ +import sys%0Aimport numpy as np%0Aimport torch%0A%0Amodel = torch.load(sys.argv%5B1%5D)%0Aparams = 0%0Afor key in model:%0A params += np.multiply.reduce(model%5Bkey%5D.shape)%0Aprint('Total number of parameters: ' + str(params))%0A
fd4398b1e811aaa2b876c120f99ca7fff08618ca
install on windows via gohlke wheels
scripts/install_on_windows.py
scripts/install_on_windows.py
Python
0
@@ -0,0 +1,975 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0A%22%22%22Script for installing on Microsoft Windows%0A%0AWheels from %5BGOHLKE WINDOWS REPOSITORY%5D(https://www.lfd.uci.edu/~gohlke/pythonlibs/)%0A%0A%22%22%22%0A%0Atry:%0A from gohlkegrabber import GohlkeGrabber%0Aexcept ImportError:%0A pri...
495c937d39da1902948065a38502f9d582fa2b3b
Add darkobject tests.
tests/darkobject.py
tests/darkobject.py
Python
0
@@ -0,0 +1,325 @@ +%22%22%22%0A.. moduleauthor:: Adam Gagorik %3Cadam.gagorik@gmail.com%3E%0A%22%22%22%0Aimport unittest%0Aimport pydarkstar.logutils%0Aimport pydarkstar.darkobject%0A%0Apydarkstar.logutils.setDebug()%0A%0Aclass TestDarkObject(unittest.TestCase):%0A def test_init(self):%0A pydarkstar.darkobjec...
6f8699288f79ff856ed58595169cb08956cd210d
Create toeplitz-matrix.py
Python/toeplitz-matrix.py
Python/toeplitz-matrix.py
Python
0.000017
@@ -0,0 +1,343 @@ +# Time: O(m * n)%0A# Space: O(1)%0A%0Aclass Solution(object):%0A def isToeplitzMatrix(self, matrix):%0A %22%22%22%0A :type matrix: List%5BList%5Bint%5D%5D%0A :rtype: bool%0A %22%22%22%0A return all(i == 0 or j == 0 or matrix%5Bi-1%5D%5Bj-1%5D == val%0A ...
76c040e9da5d94dfcb68d3e9a8003b894c1cf1dc
test file for vimba.py
tests/test_vimba.py
tests/test_vimba.py
Python
0
@@ -0,0 +1,1050 @@ +import pytest%0A%0Afrom pymba import Vimba, VimbaException%0A%0A%0Adef test_version():%0A version = Vimba().version.split('.')%0A assert int(version%5B0%5D) %3E= 1%0A assert int(version%5B1%5D) %3E= 7%0A assert int(version%5B2%5D) %3E= 0%0A%0A%0Adef test_startup_shutdown():%0A with py...
295b83d466b90ea812e8c0bda56b4d38a31c956a
Create reversedArrayNum.py
CodeWars/8kyu/reversedArrayNum.py
CodeWars/8kyu/reversedArrayNum.py
Python
0.000106
@@ -0,0 +1,59 @@ +def digitize(n):%0A return %5Bint(i) for i in str(n)%5D%5B::-1%5D%0A
7b279117da06af5cf21b61ad810a9c3177de8e3e
Update fabfile.py
fabfile.py
fabfile.py
from fabric.api import local,run import os from os import path #Add settings module so fab file can see it os.environ['DJANGO_SETTINGS_MODULE'] = "adl_lrs.settings" from django.conf import settings adldir = settings.MEDIA_ROOT actor_profile = 'actor_profile' activity_profile = 'activity_profile' activity_state = 'act...
Python
0
@@ -553,16 +553,98 @@ ' +sudo pip install virtualenv',%0A 'virtualenv env;. env/bin/activate; pip inst @@ -666,16 +666,27 @@ ents.txt +;deactivate '%5D%0Adef d @@ -751,27 +751,8 @@ p)%0A%0A -def create_dirs():%0A
86418c4f3ea786c6eb1aad6579dadfb286dec0a3
Create InMoov2.minimal.py
toSort/InMoov2.minimal.py
toSort/InMoov2.minimal.py
Python
0.000001
@@ -0,0 +1,1940 @@ +# a very minimal script for InMoov%0A# although this script is very short you can still%0A# do voice control of a right hand or finger box%0A# for any command which you say - you will be required to say a confirmation%0A# e.g. you say -%3E open hand, InMoov will ask -%3E %22Did you say open hand?%22...
35e76ec99a3710a20b17a5afddaa14389af65098
Add some simple MediaWiki importer.
tools/import_mediawiki.py
tools/import_mediawiki.py
Python
0
@@ -0,0 +1,2141 @@ +import os%0Aimport os.path%0Aimport argparse%0Afrom sqlalchemy import create_engine%0A%0A%0Adef main():%0A parser = argparse.ArgumentParser()%0A parser.add_argument('url')%0A parser.add_argument('-o', '--out', default='wikked_import')%0A parser.add_argument('--prefix', default='wiki')%0A...
237041aff9d99ac840572742467772edf1f4d5ef
Add image download example
examples/image/download.py
examples/image/download.py
Python
0.000003
@@ -0,0 +1,2262 @@ +# 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...
ab60bd4f31a185884e0c05fa1a5f70c39a9d903a
add 52
python/p052.py
python/p052.py
Python
0.998596
@@ -0,0 +1,207 @@ +def same(a, b):%0A return sorted(str(a)) == sorted(str(b))%0A%0Afor i in xrange(1, 1000000):%0A if same(i, 2 * i) and same(3 * i, 4 * i) and same(5 * i, 6 * i) and same(i, 6 * i):%0A print i%0A break
40288df82cd8bf8f253284875c5da62a60975118
Fix path
services.py
services.py
""" A toolkit for identifying and advertising service resources. Uses a specific naming convention for the Task Definition of services. If you name the Task Definition ending with "-service", no configuration is needed. This also requires that you not use that naming convention for task definitions that are not servi...
Python
0.000018
@@ -923,16 +923,20 @@ (open('/ +etc/ ecs/ecs.
26bc79d7ed478872f615e80fa177f0c4582c3631
reverse string ii
src/main/python/pyleetcode/reverse_string_ii.py
src/main/python/pyleetcode/reverse_string_ii.py
Python
0.999999
@@ -0,0 +1,966 @@ +%22%22%22%0AGiven a string and an integer k, you need to reverse the first k characters for every 2k characters counting from the%0Astart of the string. If there are less than k characters left, reverse all of them. If there are less than 2k but%0Agreater than or equal to k characters, then reverse t...
fe6ece236e684d76441280ba700565f7fbce40cc
Create masked version based on pbcov cutogg
14B-088/HI/analysis/pbcov_masking.py
14B-088/HI/analysis/pbcov_masking.py
Python
0
@@ -0,0 +1,1314 @@ +%0A'''%0ACut out noisy regions by imposing a mask of the primary beam coverage.%0A'''%0A%0Afrom astropy.io import fits%0Afrom spectral_cube import SpectralCube%0Afrom spectral_cube.cube_utils import beams_to_bintable%0Afrom astropy.utils.console import ProgressBar%0Aimport os%0A%0Afrom analysis.path...
d8ddd6a843000c8b4125f166645a41443b6c06ba
Add kms_decrypt module
kms_decrypt.py
kms_decrypt.py
Python
0.000001
@@ -0,0 +1,2406 @@ +#!/usr/bin/python%0Aimport base64%0A%0ADOCUMENTATION = '''%0Ashort_description: Decrypt a secret that was generated by KMS%0Adescription:%0A - This module decrypts the given secret using AWS KMS, and returns it as the Plaintext property%0Aversion_added: null%0Aauthor: Ben Bridts%0Anotes:%0A - Make...
4af087e4920124eddb0342d0f22978872f9ba5dc
add landuse_sql.py which convert the .csv files from ArcMap to a SQL database
landuse_sql.py
landuse_sql.py
Python
0.000006
@@ -0,0 +1,890 @@ +import sqlite3%0Aimport glob%0Aimport pandas%0A%0A#Name of SQL database%0Asql_schema = 'LandUse_Approx.db'%0A%0Afiles = %5Bf for f in glob.glob(%22*.csv%22) if %22LandUseApprox_%22 in f%5D%0A%0A#Create table names for the SQL database. %0A#Table names will have 'landuse_' as prefix and the year and l...
110179832ff8ccdda81599f7d6b0675ba8feac24
Fix document of gaussian
chainer/functions/gaussian.py
chainer/functions/gaussian.py
import numpy from chainer import cuda from chainer import function from chainer.utils import type_check class Gaussian(function.Function): """Gaussian sampling function. In forward calculation, this funciton takes mean and logarithm of variance as inputs, and draw a sample from a gaussian distribution....
Python
0.000005
@@ -1975,16 +1975,21 @@ t takes +mean :math:%60%5C @@ -1997,16 +1997,42 @@ mu%60 and +logarithm of variance%0A :math:%60%5C @@ -2043,16 +2043,18 @@ (%5C%5Csigma +%5E2 )%60 as in @@ -2072,18 +2072,16 @@ put +a sample -%0A dra @@ -2096,16 +2096,20 @@ gaussian +%0A :math:%60 @@ -2200,24 +2200,3...
e23ccb850a6aef017ae91e35f672e6c6b5184e23
Add image preprocessing functions
skan/pre.py
skan/pre.py
Python
0.000004
@@ -0,0 +1,2052 @@ +import numpy as np%0Afrom scipy import spatial, ndimage as ndi%0Afrom skimage import filters, img_as_ubyte%0A%0A%0Adef hyperball(ndim, radius):%0A %22%22%22Return a binary morphological filter containing pixels within %60radius%60.%0A%0A Parameters%0A ----------%0A ndim : int%0A T...
f8823429d1bc548e4a91fe8ea64086d35dd66676
Add race migration.
tvdordrecht/race/migrations/0003_auto_20150730_2250.py
tvdordrecht/race/migrations/0003_auto_20150730_2250.py
Python
0
@@ -0,0 +1,1848 @@ +# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import models, migrations%0Afrom django.conf import settings%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A migrations.swappable_dependency(settings.AUTH_USER_MODEL),%0A ...
564851a1a7f1378c9ef0e936640b690300a112fb
Add synthtool scripts (#3765)
java-containeranalysis/google-cloud-containeranalysis/synth.py
java-containeranalysis/google-cloud-containeranalysis/synth.py
Python
0.000001
@@ -0,0 +1,1329 @@ +# Copyright 2018 Google LLC%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 a...
e2124aef9cb91dac3a597d353cd217ed328221e5
Add gyp file to build cpu_features static library.
ndk/sources/android/cpufeatures/cpu_features.gyp
ndk/sources/android/cpufeatures/cpu_features.gyp
Python
0
@@ -0,0 +1,425 @@ +# Copyright (c) 2012 The Chromium Authors. All rights reserved.%0A# Use of this source code is governed by a BSD-style license that can be%0A# found in the LICENSE file.%0A%0A%7B%0A 'targets': %5B%0A %7B%0A 'target_name': 'cpu_features',%0A 'type': 'static_library',%0A 'direct_depe...
f4aad329c445415f1306882d386abe43969ba6a9
Add test for API ticket basics.
Allura/allura/tests/functional/test_rest_api_tickets.py
Allura/allura/tests/functional/test_rest_api_tickets.py
Python
0
@@ -0,0 +1,2218 @@ +from pprint import pprint%0Afrom datetime import datetime, timedelta%0Aimport json%0A%0Afrom pylons import c%0Afrom ming.orm import session%0A%0Afrom allura import model as M%0Afrom allura.lib import helpers as h%0Afrom alluratest.controller import TestController, TestRestApiBase%0A%0A%0Aclass TestA...
38a5a1d5bd5bcccf52a66a84377429bdecdfa4a2
Replace g.next() with next(g)
troveclient/tests/test_common.py
troveclient/tests/test_common.py
from testtools import TestCase from mock import Mock from troveclient import common class CommonTest(TestCase): def test_check_for_exceptions(self): status = [400, 422, 500] for s in status: resp = Mock() resp.status_code = s self.assertRaises(Exception, ...
Python
0.000939
@@ -1597,32 +1597,37 @@ elf.assertEqual( +next( itr_expected.nex @@ -1622,34 +1622,27 @@ expected -.next(), itr. +), next( +itr ))%0A @@ -1661,16 +1661,21 @@ rtEqual( +next( itr_expe @@ -1682,26 +1682,19 @@ cted -.next(), itr. +), next( +itr ))%0A @@ -1728,24 +1728,30 @@ opIteration, + next, itr_ex...
3eb8e73faf56bf3e3e3eb7cc8209c780d0f71b62
create nanoparticle class
nanoparticle.py
nanoparticle.py
Python
0.000002
@@ -0,0 +1,2726 @@ +from scipy.constants import pi%0Aimport numpy as np%0Afrom math import cos, sin%0A%0Aclass NanoParticle(object):%0A def __init__(self, r, n_acceptors, tau_D, R_Forster):%0A %22%22%22%0A Create a nanoparticle object%0A %0A Parameters%0A ----------%0A R : f...
b3e6855489eba5d59507ef6fb4c92f8284526ec1
Check consecutive elements in an array
Arrays/check_consecutive_elements.py
Arrays/check_consecutive_elements.py
Python
0.000024
@@ -0,0 +1,1626 @@ +import unittest%0A%22%22%22%0AGiven an unsorted array of numbers, return true if the array only contains consecutive elements.%0AInput: 5 2 3 1 4%0AOuput: True (consecutive elements from 1 through 5)%0AInput: 83 78 80 81 79 82%0AOutput: True (consecutive elements from 78 through 83)%0AInput: 34 23 5...
55b33bff9856cc91943f0a5ae492db1fdc7d8d5a
Add missing python 3 only file.
numba/tests/jitclass_usecases.py
numba/tests/jitclass_usecases.py
Python
0
@@ -0,0 +1,453 @@ +%22%22%22%0AUsecases with Python 3 syntax in the signatures. This is a separate module%0Ain order to avoid syntax errors with Python 2.%0A%22%22%22%0A%0A%0Aclass TestClass1(object):%0A def __init__(self, x, y, z=1, *, a=5):%0A self.x = x%0A self.y = y%0A self.z = z%0A s...
e251aff9a232a66b2d24324f394da2ad9345ce79
Add migration script for changing users with None as email_verifications to {}
scripts/migration/migrate_none_as_email_verification.py
scripts/migration/migrate_none_as_email_verification.py
Python
0.000001
@@ -0,0 +1,1446 @@ +%22%22%22 Ensure that users with User.email_verifications == None now have %7B%7D instead%0A%22%22%22%0A%0Aimport logging%0Aimport sys%0Afrom tests.base import OsfTestCase%0Afrom tests.factories import UserFactory%0Afrom modularodm import Q%0Afrom nose.tools import *%0Afrom website import models%0Af...
97bf6ba36b27822a9bd73cb9a27d9878e48945e2
add a decorator to ignore signals from fixture loading
project/apps/utils/signal_decorators.py
project/apps/utils/signal_decorators.py
Python
0
@@ -0,0 +1,381 @@ +%0A%0Afrom functools import wraps%0A%0Adef disable_for_loaddata(signal_handler):%0A %22%22%22%0A Decorator that turns off signal handlers when loading fixture data.%0A%0A based on http://stackoverflow.com/a/15625121%0A %22%22%22%0A%0A @wraps(signal_handler)%0A def wrapper(*args, **k...
f8b5e413b46350f25bd7d231a8102c706fbf34f8
Add new package: py-devlib (#16982)
var/spack/repos/builtin/packages/py-devlib/package.py
var/spack/repos/builtin/packages/py-devlib/package.py
Python
0
@@ -0,0 +1,1903 @@ +# Copyright 2013-2020 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 PyDevlib(PythonPackage):%0A %22%22%22Library for intera...
de39aa257d845ecb6e1c2e7c4c4911497d00cdcf
add sample, non working, test_wsgi
os_loganalyze/tests/test_wsgi.py
os_loganalyze/tests/test_wsgi.py
Python
0
@@ -0,0 +1,1167 @@ +#!/usr/bin/python%0A#%0A# Copyright (c) 2013 IBM Corp.%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...
4c8ea40eeec6df07cf8721c256ad8cc3d35fb23e
Add intial unit test file
src/test_main.py
src/test_main.py
Python
0
@@ -0,0 +1,1699 @@ +import pytest%0Afrom main import *%0A%0Atest_files = %5B %22examples/C/filenames/script%22, %22examples/Clojure/index.cljs.hl%22, %0A %22examples/Chapel/lulesh.chpl%22, %22examples/Forth/core.fth%22, %0A %22examples/GAP/Magic.gd%22, %22examples/JavaScript/steelseries-m...
33a3e4a8adc6b3284de18fe02c67eafa3a391226
Create tinycrypt.py
tinycrypt.py
tinycrypt.py
Python
0.000091
@@ -0,0 +1,2 @@ + %0A
4a179825234b711a729fce5bc9ffc8de029c0999
Test for invalid data when loading
utest/controller/test_loading.py
utest/controller/test_loading.py
import unittest from robot.utils.asserts import assert_true, assert_raises from robotide.application.chiefcontroller import ChiefController from robotide.namespace import Namespace from resources import MINIMAL_SUITE_PATH, RESOURCE_PATH from robot.errors import DataError class _FakeObserver(object): def notify...
Python
0
@@ -71,41 +71,48 @@ ises -%0A%0Afrom robotide.application.chief +, assert_raises_with_msg%0A%0Afrom robotide. cont @@ -238,16 +238,34 @@ RCE_PATH +, FakeLoadObserver %0Afrom ro @@ -298,129 +298,8 @@ r%0A%0A%0A -class _FakeObserver(object):%0A%0A def notify(self):%0A pass%0A%0A def finished(self):%0A ...
f8d49af459fb3b751f44ecf625521c62fa68df0a
Check in script to delete existing autochecked tasks
bin/ext_service/historical/fix_autocheck_tasks.py
bin/ext_service/historical/fix_autocheck_tasks.py
Python
0
@@ -0,0 +1,2737 @@ +import logging%0Aimport argparse%0Aimport uuid%0Aimport emission.core.wrapper.user as ecwu%0Aimport emission.core.get_database as edb%0Aimport emission.net.ext_service.habitica.proxy as proxy%0A%0Adef fix_autocheck_for_user(uuid):%0A auto_tasks = find_existing_auto_tasks(uuid)%0A delete_tasks(...
89ef576ba4e707eef653c670b32fa40d862e79ec
Add package for the Python regex library (#4771)
var/spack/repos/builtin/packages/py-regex/package.py
var/spack/repos/builtin/packages/py-regex/package.py
Python
0
@@ -0,0 +1,1595 @@ +##############################################################################%0A# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.%0A# Produced at the Lawrence Livermore National Laboratory.%0A#%0A# This file is part of Spack.%0A# Created by Todd Gamblin, tgamblin@llnl.gov, All r...
0e6a7a805ff08f191c88bda67992cb874f538c2f
Add migration for unitconnection section types
services/migrations/0097_alter_unitconnection_section_type.py
services/migrations/0097_alter_unitconnection_section_type.py
Python
0
@@ -0,0 +1,932 @@ +# Generated by Django 4.0.5 on 2022-06-22 05:40%0A%0Afrom django.db import migrations, models%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A (%22services%22, %220096_create_syllables_fi_columns%22),%0A %5D%0A%0A operations = %5B%0A migrations.AlterFi...
9009315381edd69adac3319b973b3bcdb16f23e4
Add missing module wirecloud.live.utils
src/wirecloud/live/utils.py
src/wirecloud/live/utils.py
Python
0.000024
@@ -0,0 +1,1012 @@ +# -*- coding: utf-8 -*-%0A%0A# Copyright (c) 2016 CoNWeT Lab., Universidad Polit%C3%A9cnica de Madrid%0A%0A# This file is part of Wirecloud.%0A%0A# Wirecloud is free software: you can redistribute it and/or modify%0A# it under the terms of the GNU Affero General Public License as published by%0A# th...
5e49eb4fb6bce9cdeae515590530b78e4dde89d9
Add alternate example for `match_template`.
doc/examples/plot_match_face_template.py
doc/examples/plot_match_face_template.py
Python
0
@@ -0,0 +1,1043 @@ +%22%22%22%0A=================%0ATemplate Matching%0A=================%0A%0AIn this example, we use template matching to identify the occurrence of an%0Aimage patch (in this case, a sub-image centered on the camera man's head).%0ASince there's only a single match, the maximum value in the %60match_te...
f284bb85a0b28142850f980a33f38a3cf25d9da8
Solve Knowit 2017/08
knowit2017/08.py
knowit2017/08.py
Python
0.000118
@@ -0,0 +1,840 @@ +memoized = %7B%7D%0A%0A%0Adef christmas_number(n):%0A in_sequence = %7B1: True%7D%0A%0A while True:%0A if n %3E 10000000:%0A for k in in_sequence:%0A memoized%5Bk%5D = False%0A%0A return False%0A%0A in_sequence%5Bn%5D = True%0A%0A if n i...
2dd0efce803c4dfcc4c5d61cf6fec1d5ee64e1b3
test for btcSpecialTx.py
test/test_btcSpecialTx.py
test/test_btcSpecialTx.py
Python
0.000001
@@ -0,0 +1,1701 @@ +from pyethereum import tester%0Afrom datetime import datetime, date%0Aimport math%0A%0Aimport pytest%0Aslow = pytest.mark.slow%0A%0Aclass TestBtcSpecialTx(object):%0A%0A CONTRACT = 'btcSpecialTx.py'%0A CONTRACT_GAS = 55000%0A%0A ETHER = 10 ** 18%0A%0A def setup_class(cls):%0A test...
edc5116472c49370e5bf3ff7f9f7872732b0285e
Add a solution to the phone number problem: can a phone number be represented as words in a dictionary?
phone_numbers.py
phone_numbers.py
Python
0.999746
@@ -0,0 +1,1829 @@ +#!/usr/bin/env python%0A%0Aimport unittest%0A%0Awords = set(%5B%22dog%22, %22clog%22, %22cat%22, %22mouse%22, %22rat%22, %22can%22,%0A %22fig%22, %22dig%22, %22mud%22, %22a%22, %22an%22, %22duh%22, %22sin%22,%0A %22get%22, %22shit%22, %22done%22, %22all%22, %22glory%22, %22co...
904ac79bd278634c97f6f43f4d85bc0c2316117b
add configuration example
scripts/exchange-bots/config-example.py
scripts/exchange-bots/config-example.py
Python
0.000001
@@ -0,0 +1,2040 @@ +from bot.strategies.maker import MakerRamp, MakerSellBuyWalls%0A%0Awallet_host = %22localhost%22%0Awallet_port = 8092%0Awallet_user = %22%22%0Awallet_password = %22%22%0Awitness_url = %22ws://testnet.bitshares.eu/ws%22%0Awitness_user = %22%22%0A...
d5cfa59c586053d911f8725dfd321d8ad0eecce6
Fix context comprobation. It must be exist at begining
account_voucher_payment_method/account_voucher.py
account_voucher_payment_method/account_voucher.py
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # This program is free software: you can redistribute...
Python
0.994592
@@ -1649,16 +1649,28 @@ if +context and context. @@ -3878,28 +3878,29 @@ %0A %0A +%0A
60efa5bbab4463714df8dd93c1c7c606bee4dbaf
add giphy plugin
plugins/giphy.py
plugins/giphy.py
Python
0
@@ -0,0 +1,378 @@ +from util import http, hook%0A%0A@hook.api_key('giphy')%0A@hook.command('giphy', autohelp=False)%0A@hook.command('gif', autohelp=False)%0A@hook.command(autohelp=False)%0Adef giphy(inp, api_key=None):%0A %22.giphy %5Bterm%5D -- gets random gif for a term%22%0A%0A data = http.get_json(%22http://a...
227a8e0f654c9797a7dedf863f7568d55a6c2f8e
add download sample from go-sciter port
examples/download.py
examples/download.py
Python
0
@@ -0,0 +1,1598 @@ +%22%22%22Go sciter example port.%22%22%22%0A%0Aimport sciter%0A%0Aclass MyEventHandler(sciter.EventHandler):%0A%0A def document_complete(self):%0A print(%22content loaded.%22)%0A %0A pass%0A%0A def on_data_arrived(self, nm):%0A print(%22data arrived, uri:%22, nm.uri...
dff9d7a05e2a522b3dbbd7ea18866c5ba1fc0476
add a !stock plugin for stock images
plugins/stock.py
plugins/stock.py
Python
0
@@ -0,0 +1,698 @@ +%22%22%22!stock %3Csearch term%3E return a stock photo for %3Csearch term%3E%22%22%22%0A%0Afrom random import shuffle%0Aimport re%0A%0Aimport requests%0Afrom bs4 import BeautifulSoup%0A%0Adef stock(searchterm):%0A url = %22http://www.shutterstock.com/cat.mhtml?searchterm=%7B%7D&search_group=&lang=...
d26a78d3e0695e0bf492910c530beb54b30cdbbc
bump version number for development
stdeb/__init__.py
stdeb/__init__.py
# setuptools is required for distutils.commands plugin we use import logging import setuptools __version__ = '0.4.2' log = logging.getLogger('stdeb') log.setLevel(logging.INFO) handler = logging.StreamHandler() handler.setLevel(logging.INFO) formatter = logging.Formatter('%(message)s') handler.setFormatter(formatter) ...
Python
0
@@ -108,16 +108,20 @@ = '0.4.2 +.git '%0A%0Alog =
1cab72ac3c5f3cea8326ebc97ccae1a8068eb839
Add http responses collection module.
superview/http.py
superview/http.py
Python
0
@@ -0,0 +1,1317 @@ +# -*- coding: utf-8 -*-%0A%22%22%22%0AThe various HTTP responses for use in returning proper HTTP codes.%0A%22%22%22%0A%0Afrom django.http import HttpResponse, StreamingHttpResponse%0A%0A%0Aclass HttpCreated(HttpResponse):%0A status_code = 201%0A%0A def __init__(self, *args, **kwargs):%0A ...
b6c80ac9bc585602b943e8823f21465e663c9201
Modify ccnet_rpc
profile/views.py
profile/views.py
# encoding: utf-8 import simplejson as json from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_to_response, get_object_or_404 from django.template import Context, RequestContext from django.contrib.auth.decorators import login_requ...
Python
0.000002
@@ -3779,16 +3779,25 @@ = ccnet_ +threaded_ rpc.get_
86baa4f437cf3892c15a56e8331c19b6d2e63b1d
Add a script for generating unicode name table
lib/gen-names.py
lib/gen-names.py
Python
0
@@ -0,0 +1,1486 @@ +#!/usr/bin/python3%0A%0A# Input: https://www.unicode.org/Public/UNIDATA/UnicodeData.txt%0A%0Aimport io%0Aimport re%0A%0Aclass Builder(object):%0A def __init__(self):%0A pass%0A%0A def read(self, infile):%0A names = %5B%5D%0A for line in infile:%0A if line.starts...
a50190fe04e434ce70f6b02027e281a896dbb81b
Create Python password hasher
passwordhash.py
passwordhash.py
Python
0.000107
@@ -0,0 +1,851 @@ +#!/usr/bin/env python%0A# Password Hashing Module for Linux%0A# Author: Dave Russell Jr (drussell393)%0A%0Afrom getpass import getpass%0Aimport crypt%0A%0A# If you like Python 2, please to be importing.%0Aimport os%0Aimport binascii%0A%0Apassword = getpass('Enter your desired password, Harry: ')%0Apa...
961e9b031b94a0533c53c29787660ab954b6db37
Add patch-weight.py, patch weight into phrase segs.
patch-weight.py
patch-weight.py
Python
0.000001
@@ -0,0 +1,2422 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8%0A%0Afrom codecs import open%0Afrom argparse import ArgumentParser%0A%0ADEBUG_FLAG = False%0A%0Adef load_weight_dict(weight_file):%0A%0A weight_dict = %7B%7D%0A with open(weight_file, 'r') as fd:%0A for line in fd:%0A splited_line =...
9e51fc305f21a4031b6ec94ccfa39ef1e611da9e
add script to compare DFAs.
src/trusted/validator_ragel/unreviewed/compare_dfa.py
src/trusted/validator_ragel/unreviewed/compare_dfa.py
Python
0.000011
@@ -0,0 +1,1241 @@ +#!/usr/bin/python%0A# Copyright (c) 2013 The Native Client Authors. All rights reserved.%0A# Use of this source code is governed by a BSD-style license that can be%0A# found in the LICENSE file.%0A%0Aimport sys%0Aimport os%0Asys.path.append(os.path.join(os.path.dirname(__file__), '..'))%0Aimport dfa...
3cdee1d40d3370686c9bff435a4575e985c121e9
Create __init__.py
pfc/__init__.py
pfc/__init__.py
Python
0.000429
@@ -0,0 +1,10 @@ +%22%22%22pfc%22%22%22%0A
438471a4a3b41637c5c1eb3c2e07d9d8ca81ee09
Add a stats ./manage.py command
www/management/commands/stats.py
www/management/commands/stats.py
Python
0.000048
@@ -0,0 +1,1737 @@ +# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0A# Copyright 2014, Cercle Informatique ASBL. All rights reserved.%0A#%0A# This program is free software: you can redistribute it and/or modify it%0A# under the terms of the GNU Affero General Public License as published by%0A# the...
633e540a1718a5cc515725b13d3f1740bb950bb6
Use GitHub URL for ImageMagick
var/spack/repos/builtin/packages/ImageMagick/package.py
var/spack/repos/builtin/packages/ImageMagick/package.py
############################################################################## # Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
Python
0
@@ -1420,51 +1420,41 @@ url - = %22http +s :// -www.i +github.com/I mage -m +M agick -.org/download /Ima @@ -1465,16 +1465,24 @@ gick -- +/archive/ 7.0.2- -6 +7 .tar @@ -1510,45 +1510,104 @@ 0.2- -6 +7 ', 'c -29c98d2496fbc66adb05a28d8fad21a +59cdc8df50e481b2bd1afe09ac24c08')%0A version('7.0.2-6', 'a...
3ba109622c24bd52f32e605c523249e1c26b0207
Add regression test with non ' ' space character as token
spacy/tests/regression/test_issue834.py
spacy/tests/regression/test_issue834.py
Python
0.99974
@@ -0,0 +1,327 @@ +# coding: utf-8%0A%0Afrom io import StringIO%0A%0Aword2vec_str = %22%22%22, -0.046107 -0.035951 -0.560418%0Ade -0.648927 -0.400976 -0.527124%0A. 0.113685 0.439990 -0.634510%0A%C2%A0 -1.499184 -0.184280 -0.598371%22%22%22%0A%0A%0Adef test_issue834(en_vocab):%0A f = StringIO(word2vec_str)%0A vect...
d11707e651d4b44ef706f62677ba6a617102f239
Add test-code
test/post_test.py
test/post_test.py
Python
0.000083
@@ -0,0 +1,228 @@ +import json%0Aimport urllib2%0A%0Adata = %7B %0A %22cells%22:%5B%22ECT%22,%22VISC%22, %22AAA%22%5D%0A%7D%0A%0Areq = urllib2.Request('http://localhost:5000/api')%0Areq.add_header('Content-Type', 'application/json')%0A%0Aresponse = urllib2.urlopen(req, json.dumps(data))%0A
480852bb1dd6796b7fb12e40edc924b9a4dbee60
Add tests to cover no framework, no problem
test/test_misc.py
test/test_misc.py
Python
0
@@ -0,0 +1,385 @@ +import unittest%0A%0Afrom .helpers import run_module%0A%0A%0Aclass MiscTests(unittest.TestCase):%0A def setUp(self):%0A self.name = %22benchmarker%22%0A%0A def test_no_framework(self):%0A with self.assertRaises(Exception):%0A run_module(self.name)%0A%0A def test_no_p...
431760d7a840543901fc1ebc0069ecd384302101
Add tests/conftest.py for py.test
tests/conftest.py
tests/conftest.py
Python
0
@@ -0,0 +1,1759 @@ +import decimal%0Aimport os%0Atry:%0A # Python 2%0A from ConfigParser import ConfigParser%0Aexcept ImportError:%0A # Python 3%0A from configparser import ConfigParser%0A%0Aimport tests.helpers as th%0Afrom .helpers import cfgpath, clear_db, get_app_lock, release_app_lock%0A%0A_parser = Co...
bceee12d94924931ff73b45d2ed3de8b3d71522c
Add case fixture to top-level conftest.py in tests
tests/conftest.py
tests/conftest.py
Python
0.000001
@@ -0,0 +1,131 @@ +import pytest%0A%0Afrom gaphor.conftest import Case%0A%0A%0A@pytest.fixture%0Adef case():%0A case = Case()%0A yield case%0A case.shutdown()%0A
0146058fe8a5c91ce33102bb55f5f087428a03a3
Add tests for get_keeper_token
tests/test_cli.py
tests/test_cli.py
Python
0.000001
@@ -0,0 +1,1228 @@ +%22%22%22Test the ltd-mason CLI features.%22%22%22%0A%0Afrom base64 import b64encode%0A%0Aimport responses%0Aimport pytest%0A%0Afrom ltdmason.cli import get_keeper_token%0A%0A%0A@responses.activate%0Adef test_get_keeper_token():%0A %22%22%22Test getting a token from LTD Keeper.%22%22%22%0A exp...
e1e8bef8c2c916505e9bdc0ea37c81a7626db6af
Add int tests
tests/test_int.py
tests/test_int.py
Python
0.000061
@@ -0,0 +1,839 @@ +import pytest%0A%0Aimport parsenvy%0A%0A%0Adef test_int_positive(monkeypatch):%0A %22%22%22'13'%22%22%22%0A monkeypatch.setenv(%22foo%22, %2213%22)%0A%0A assert parsenvy.int(%22foo%22) == 13%0A%0A%0Adef test_int_negative(monkeypatch):%0A %22%22%22'-42'%22%22%22%0A monkeypatch.setenv(%2...
3b66fbc844b023003420db7a9986811110f55489
Add tests for the run() function
tests/test_run.py
tests/test_run.py
Python
0.000011
@@ -0,0 +1,1720 @@ +import sys%0Aimport tempfile%0Aimport unittest%0A%0Atry:%0A from StringIO import StringIO%0Aexcept ImportError:%0A from io import StringIO%0A%0Aimport icon_font_to_png%0A%0Aclass TestRun(unittest.TestCase):%0A def create_css_file(self, contents):%0A css_file = tempfile.NamedTemporary...
578de6c57f9698c7e273af06d1e815f71269bb18
Add a sample python file interesting to debug
tests/to_debug.py
tests/to_debug.py
Python
0
@@ -0,0 +1,2414 @@ +import sys%0Aimport os%0Aimport time%0Aimport threading%0Aimport ikpdb%0A%0ATEST_MULTI_THREADING = False%0ATEST_EXCEPTION_PROPAGATION = False%0ATEST_POSTMORTEM = True%0ATEST_SYS_EXIT = 0%0ATEST_STEPPING = False%0A%0A# Note that ikpdb.set_trace() will reset/mess breakpoints set using GUI%0ATEST_SET_T...
329270ddef5f4da4528750ebc463ffc910325ec8
add migration
temba/channels/migrations/0066_auto_20170306_1713.py
temba/channels/migrations/0066_auto_20170306_1713.py
Python
0.000001
@@ -0,0 +1,749 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.10.5 on 2017-03-06 17:13%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('channels', '0065_auto_20170228_0837'),%0A %5D%0A...
a8caef202ba0fd6909359241ff385eca762aca1f
Add echo effect
quack/effects.py
quack/effects.py
Python
0.000002
@@ -0,0 +1,660 @@ +# Author: Martin McBride%0A# Created: 2018-09-25%0A# Copyright (C) 2018, Martin McBride%0A# License: MIT%0A%0Aimport math%0Aimport numpy as np%0Afrom quack.buffer import create_buffer%0A%0A%0Adef echo(params, source, delay, strength):%0A '''%0A Create an echo%0A :param params:%0A :param ...
bdd7016fe8f41abdc8562d114efc41622916a675
Create startBackEnd.py
startBackEnd.py
startBackEnd.py
Python
0.000002
@@ -0,0 +1,261 @@ +#!/usr/bin/python%0Aimport boto.ec2%0Aconn = boto.ec2.connect_to_region(%22eu-central-1%22, aws_access_key_id='AKIAI111111111111111', aws_secret_access_key='keyyyyy')%0Ainstance = conn.get_all_instances(instance_ids=%5B'i-40eb8111'%5D)%0Aprint instance%5B0%5D.instances%5B0%5D.start()%0A
f6f2c6fc2a51bb3243d9b99ab1093809a2d1a5bb
Add script that tests AI players
test_players.py
test_players.py
Python
0.000001
@@ -0,0 +1,920 @@ +from AI import *%0Aimport random%0A%0Adef RandomPlayer(game):%0A return 0, random.choice(game.get_available_moves())%0A%0Adef ABPlayer(game):%0A return alpha_beta_search(game, 8, -np.inf, np.inf, True, evaluate_base)%0A%0Adef ABChainPlayer1(game):%0A return alpha_beta_search(game, 7, -np.inf...
0cf85c1ab68ddc50787e6a09f3604320d18118b4
Add UniqueForFieldsMixin
django_more/mixins.py
django_more/mixins.py
Python
0
@@ -0,0 +1,1719 @@ +from django.db.models.options import normalize_together%0Afrom django.utils.functional import cached_property%0A%0A%0A# Used by OrderByField to allow for unique_together constraints to be field declared%0Aclass UniqueForFieldsMixin:%0A %22%22%22 Mixin first to a Field to add a unique_for_fields f...
419f86f5c50f812f19dd731e9c33f66e57f51a48
Test matrix - work in progress
tests/matrix.py
tests/matrix.py
Python
0
@@ -0,0 +1,2499 @@ +import os.path, urllib, subprocess, shutil%0A%0Apython_versions = %5B'2.4.6', '2.5.6', '2.6.8', '2.7.5'%5D%0Alibcurl_versions = %5B'7.19.0', '7.32.0'%5D%0A%0Aclass in_dir:%0A def __init__(self, dir):%0A self.dir = dir%0A %0A def __enter__(self):%0A self.oldwd = os.getcwd()%0A ...
c24647a921c64cfc8a1385f7e735622514e199c3
make it clear that we don't depend on gabble version for the test
tests/test-caps-update.py
tests/test-caps-update.py
""" Test that CapabilitiesChanged signal is emitted only once after all the caps in the presence have been analyzed. """ import dbus from twisted.words.xish import domish from servicetest import match, unwrap, lazy from gabbletest import go, make_result_iq def make_presence(from_jid, type, status): presence = ...
Python
0.000001
@@ -1,13 +1,12 @@ -%0A %22%22%22%0ATest tha @@ -1055,12 +1055,22 @@ '0. -5.14 +4.test-version '%0A @@ -1087,17 +1087,8 @@ = ' -voice-v1 jing
7311f8f2a8a7ab285669dc02d26d7e2248583ff5
Add tests for 'rle_compress'
test_rle.py
test_rle.py
Python
0.000013
@@ -0,0 +1,358 @@ +import pypolycomp%0Aimport numpy as np%0A%0Adef test_compression():%0A for cur_type in (np.int8, np.int16, np.int32, np.int64,%0A np.uint8, np.uint16, np.uint32, np.uint64):%0A compressed = pypolycomp.rle_compress(np.array(%5B1, 1, 1, 2, 3%5D, dtype=cur_type))%0A ...
da2b773bf6e669b3ec50bbd6af73e1d80bb0b5a5
Add tsstats/event.py for easy event-initialization
tsstats/events.py
tsstats/events.py
Python
0
@@ -0,0 +1,845 @@ +from collections import namedtuple%0A%0AEvent = namedtuple(%0A 'Event', %5B'timestamp', 'identifier', 'action', 'arg', 'arg_is_client'%5D%0A)%0A%0A%0Adef nick(timestamp, identifier, nick):%0A return Event(timestamp, identifier, 'set_nick', nick, arg_is_client=False)%0A%0A%0Adef connect(timestam...
99f5c2a9cd44ac8ed301a781460816e8f0dffdb8
add killall.py example script
examples/killall.py
examples/killall.py
Python
0.000001
@@ -0,0 +1,503 @@ +#!/usr/bin/env python%0A%0A%22%22%22%0AKill a process by name.%0A%22%22%22%0A%0Aimport os%0Aimport sys%0Aimport psutil%0A%0Adef main():%0A if len(sys.argv) != 2:%0A sys.exit('usage: %25s name' %25 __file__)%0A else:%0A NAME = sys.argv%5B1%5D%0A%0A killed = %5B%5D%0A for proc...
20c08b96ce7a5377576e45953266c51079b5bdeb
Create testfile.py
testfile.py
testfile.py
Python
0.000005
@@ -0,0 +1,22 @@ +print(%22Tess is cool%22)%0A
d75eebbcb6b1922d37a97550bc4cbead6e50cfdb
add localdb.py
united/localdb.py
united/localdb.py
Python
0.000001
@@ -0,0 +1,1359 @@ +# -*- coding: utf-8 -*-%0A%22%22%22%0ACopyright (C) 2015, MuChu Hsu%0AContributed by Muchu Hsu (muchu1983@gmail.com)%0AThis file is part of BSD license%0A%3Chttps://opensource.org/licenses/BSD-3-Clause%3E%0A%22%22%22%0Aimport sqlite3%0Aimport os%0Aimport logging%0Afrom pkg_resources import resource_...
b6d1b9365c356a14f0f9ef478247d498845a2b2c
add script to process normal vectors
coastline/data/vectors.py
coastline/data/vectors.py
Python
0
@@ -0,0 +1,1421 @@ +import matplotlib.pyplot as plt%0Aimport glob%0Aimport math%0A%0A%0Adef extract_data(file_name):%0A points = %5B%5D%0A with open(file_name, 'r') as f:%0A for i, line in enumerate(f):%0A if i %3E 2:%0A s = line.split()%0A point = (float(s%5B0%5D),...
cb9cbe28f0dfb8c98122ba52b7b050c5727ce1f2
Add debug logging for GetChildPids() on windows.
tools/telemetry/telemetry/core/chrome/win_platform_backend.py
tools/telemetry/telemetry/core/chrome/win_platform_backend.py
# Copyright (c) 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 collections import ctypes import subprocess try: import pywintypes # pylint: disable=F0401 import win32api # pylint: disable=F0401 import ...
Python
0.00004
@@ -193,16 +193,31 @@ ctypes%0A +import logging%0A import s @@ -3799,24 +3799,83 @@ nicate()%5B0%5D%0A + logging.info('wmic process output:%5Cn' + pid_ppid_list)%0A ppid_map @@ -4366,24 +4366,86 @@ ap, child))%0A + logging.info('Found child pids %25s for %25d' %25 (ret, pid))%0A return
1ac09013e8cf89e83418de0be9d83b87a0a20634
Create mp3_exploit.py
mp3_exploit.py
mp3_exploit.py
Python
0
@@ -0,0 +1,711 @@ +#!/usr/bin/env python%0A'''%0AAuthor: Chris Duffy%0ADate: May 2015%0APurpose: To provide a means to demonstrate a simple file upload proof of concept related to%0A exploiting Free MP3 CD Ripper.%0A'''%0Aimport struct%0Afilename=%22exploit.wav%22%0Afill =%22A%22*4112%0A#eip = struct.pack('%3CI...
68ea60fd87e3e0240f82a42f0f6b4dcd65732f97
Add MQTT server example
mqtt-server.py
mqtt-server.py
Python
0.000001
@@ -0,0 +1,990 @@ +#!/usr/bin/python3%0A# %0A# Copyright (c) 2015-2016, Fabian Affolter %3Cfabian@affolter-engineering.ch%3E%0A# Released under the MIT license. See LICENSE file for details.%0A#%0A# Source: https://github.com/beerfactory/hbmqtt/blob/develop/samples/broker_start.py%0A#%0Aimport logging%0Aimport asyncio%...
32a839a3b191582b7075229002026ef131416e17
Allow first data cell to be escaped when continuing lines with '...' (issue 420)
src/robot/parsing/rawdatatables.py
src/robot/parsing/rawdatatables.py
# Copyright 2008-2009 Nokia Siemens Networks Oyj # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
Python
0
@@ -1080,17 +1080,17 @@ for -i +_ in rang @@ -3465,13 +3465,21 @@ ame -== '' +in %5B'', '%5C%5C'%5D and
c0b05a43e10693f8aab87a7f86726d512b7494fc
Add tenant exporter for accounting
bluebottle/clients/management/commands/export_tenants.py
bluebottle/clients/management/commands/export_tenants.py
Python
0
@@ -0,0 +1,1743 @@ +import json%0A%0Afrom rest_framework.authtoken.models import Token%0Afrom django.contrib.contenttypes.models import ContentType%0Afrom django.core.management.base import BaseCommand%0A%0Afrom bluebottle.clients import properties%0Afrom bluebottle.clients.models import Client%0Afrom bluebottle.client...
dfbf888ca0b56448a4f211900b16e3c85648b241
Add migration for changing docstring of Note.is_private to unicode
editorsnotes/main/migrations/0025_auto_20160628_0913.py
editorsnotes/main/migrations/0025_auto_20160628_0913.py
Python
0
@@ -0,0 +1,532 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.9.4 on 2016-06-28 09:13%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('main', '0024_topic_ld'),%0A %5D%0A%0A operatio...
a45a0bb366ae28d38d543ce71f32f625e9b80042
add tools module
modules/tools.py
modules/tools.py
Python
0.000001
@@ -0,0 +1,1550 @@ +from pandas import DataFrame%0Afrom pandas.tseries.tools import to_datetime%0A%0A#%7CCreate time series from trade history DataFrame%0Adef time_series(df, period):%0A%09ts = DataFrame(columns=('timestamp', 'price', 'high',%0A%09%09%09%09'low', 'open', 'amount'))%09%0A%09tmin = int(df%5B'timestamp'%5...
2f4d413e14011847138d6afd27a210fc58823c8a
add certificate and key migrations
rootfs/api/migrations/0004_auto_20160124_2134.py
rootfs/api/migrations/0004_auto_20160124_2134.py
Python
0.000001
@@ -0,0 +1,629 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.9.1 on 2016-01-24 21:34%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('api', '0003_auto_20160114_0310'),%0A %5D%0A%0A ...
d1aa553f739e91cd470eea23042b6c8bcebe9b6f
add mocked integrationtest for the deprecationwarning of makeitem
testing/python/test_deprecations.py
testing/python/test_deprecations.py
Python
0
@@ -0,0 +1,461 @@ +import pytest%0A%0Afrom _pytest.python import PyCollector%0A%0A%0Aclass PyCollectorMock(PyCollector):%0A %22%22%22evil hack%22%22%22%0A%0A def __init__(self):%0A self.called = False%0A%0A def _makeitem(self, *k):%0A %22%22%22hack to disable the actual behaviour%22%22%22%0A ...
e348ec573a4882258466cdc2ab73da8b4dbbe256
Create pillu.py
modules/pillu.py
modules/pillu.py
Python
0.000003
@@ -0,0 +1,6 @@ +#test%0A
1eb2e1390d41c65943e777a66918df87b4ee8799
Add constructive_hierarchy
constructive_hierarchy.py
constructive_hierarchy.py
Python
0.999379
@@ -0,0 +1,2223 @@ +'''Reason about a directed graph in which the (non-)existance of some edges%0Amust be inferred by the disconnectedness of certain vertices. Collect (truthy)%0Aevidence for boolean function return values.'''%0A%0Adef transitive_closure_set(vertices, edges):%0A '''Find the transitive closure of a s...
25ff8c6f8bc9d70886d004f8b64f08facb8c12cf
Create Find the Celebrity sol for Leetcode
leetcode/277-Find-the-Celebrity/FindtheCelebrity_sol.py
leetcode/277-Find-the-Celebrity/FindtheCelebrity_sol.py
Python
0
@@ -0,0 +1,626 @@ +# The knows API is already defined for you.%0A# @param a, person a%0A# @param b, person b%0A# @return a boolean, whether a knows b%0A# def knows(a, b):%0A%0Aclass Solution(object):%0A def findCelebrity(self, n):%0A %22%22%22%0A :type n: int%0A :rtype: int%0A %22%22%22%0...
3eeaa890f0a7afcf7a6f470055c5bc0fda20ae5c
create moistureCaptor.py
captors-enabled/moistureCaptor.py
captors-enabled/moistureCaptor.py
Python
0.000034
@@ -0,0 +1,214 @@ +%0A%0Aclass Captor():%0A id = 5%0A def Captor():%0A self.id = 5%0A %0A %0A def callback(self):%0A moisture = 0%0A #start communication with server%0A %0A return moisture%0A %0A def getiId(self):%0A return self.id%0A
25aa486fcba631a251db4f0366d4d4f713a86f37
Add missing migration file
SigmaPi/UserInfo/migrations/0003_auto_20170204_1342.py
SigmaPi/UserInfo/migrations/0003_auto_20170204_1342.py
Python
0.000002
@@ -0,0 +1,457 @@ +# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('UserInfo', '0002_auto_20161208_1712'),%0A %5D%0A%0A operations = %5B%0A migrations.AlterM...