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
ae3374305bad49c358a173e26490c5c90b219208
test for multiple open-read-close cycle
tests/multiple_readings.py
tests/multiple_readings.py
Python
0
@@ -0,0 +1,579 @@ +import serial%0Aimport struct%0Aimport time%0Aimport pandas as pd%0Aimport numpy as np%0A%0A%0Adef measure():%0A start_time = time.time()%0A with serial.Serial('/dev/cu.usbmodem14121', 1000000, timeout=1) as inport:%0A open_time = time.time()%0A data = inport.read(100)%0A r...
85d58c1e6e2ee7eae46ca46e25ef7338b23eac89
fix from in search reply
tests/olpc-buddy-search.py
tests/olpc-buddy-search.py
""" test OLPC search buddy """ import dbus from servicetest import call_async, EventPattern from gabbletest import exec_test, make_result_iq, acknowledge_iq from twisted.words.xish import domish, xpath from twisted.words.protocols.jabber.client import IQ NS_OLPC_BUDDY_PROPS = "http://laptop.org/xmpp/buddy-propertie...
Python
0
@@ -3132,31 +3132,24 @@ = ' -index.jabber.laptop.org +gadget.localhost '%0A
4e3644234fab9cb14a3d511b24bce3ed8a1446e0
Add in a minor testcase.
tests/scales/test_minor.py
tests/scales/test_minor.py
Python
0.000001
@@ -0,0 +1,1710 @@ +# Copyright (c) Paul R. Tagliamonte %3Ctag@pault.ag%3E, 2015%0A#%0A# Permission is hereby granted, free of charge, to any person obtaining a%0A# copy of this software and associated documentation files (the %22Software%22),%0A# to deal in the Software without restriction, including without limitatio...
e98065e04cfd52bb369d3b07d29f37fb458baa91
add solution for Merge Intervals
src/mergeIntervals.py
src/mergeIntervals.py
Python
0
@@ -0,0 +1,692 @@ +# Definition for an interval.%0A# class Interval:%0A# def __init__(self, s=0, e=0):%0A# self.start = s%0A# self.end = e%0A%0A%0Aclass Solution:%0A # @param intervals, a list of Interval%0A # @return a list of Interval%0A%0A def merge(self, intervals):%0A if not int...
6f8c64ed6f99493811cab54137a1eed44d851260
Add python script to get group and module given a class name
scripts/GetGroupAndModuleFromClassName.py
scripts/GetGroupAndModuleFromClassName.py
Python
0.000003
@@ -0,0 +1,907 @@ +#!/usr/bin/env python%0A%0A%22%22%22 Given the path to the ITK Source Dir%0Aprint group and module of a given class%0A%0Afor instance, try:%0A%0A ./GetGroupAndModuleFromClassName /path/to/ITK Image%0A%22%22%22%0A%0Aimport sys%0Aimport os%0A%0Aitk_dir = sys.argv%5B1%5D%0Acmakefile = os.path.join( itk...
3ff18745a561ab28e04d9218e00fc0aa367631f5
add `solution` module
src/obpds/solution.py
src/obpds/solution.py
Python
0.000001
@@ -0,0 +1,1505 @@ +#%0A# Copyright (c) 2015, Scott J Maddox%0A#%0A# This file is part of Open Band Parameters Device Simulator (OBPDS).%0A#%0A# OBPDS is free software: you can redistribute it and/or modify%0A# it under the terms of the GNU Affero General Public License as published%0A# by the Free Software F...
9a2f68d14ae2d576c59035c67ffa12c96b4f748a
Add provider tests
test_saau.py
test_saau.py
Python
0
@@ -0,0 +1,219 @@ +from saau.loading import load_image_providers, load_service_providers%0A%0A%0Adef test_load_service_providers():%0A assert load_service_providers(None)%0A%0A%0Adef test_load_image_providers():%0A assert load_image_providers(None)
018be657ea3e088b3116e8a78fe81713a2a30e29
Add tifftopdf, a frontend for tiff2pdf and tiffinfo.
tifftopdf.py
tifftopdf.py
Python
0
@@ -0,0 +1,2191 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A#%0A# Author: R.F. Smith %3Crsmith@xs4all.nl%3E%0A# 2012-06-29%0A#%0A# To the extent possible under law, Roland Smith has waived all copyright and%0A# related or neighboring rights to NAME. This work is published from the%0A# Netherlands. See http://...
6dcbb2004271860b7d2e8bf0d12da46c925f151c
add a utility to show/set/clear software write protect on a lun
tools/swp.py
tools/swp.py
Python
0.000001
@@ -0,0 +1,1268 @@ +#!/usr/bin/env python%0A# coding: utf-8%0A%0A#%0A# A simple example to show/set/clear the software write protect flag SWP%0A#%0Aimport sys%0A%0Afrom pyscsi.pyscsi.scsi import SCSI%0Afrom pyscsi.pyscsi.scsi_device import SCSIDevice%0Afrom pyscsi.pyscsi import scsi_enum_modesense6 as MODESENSE6%0A%0A%...
80d2fa29185e9c3c54ed1e173122bbe5a78624a4
Create tutorial4.py
tutorial4.py
tutorial4.py
Python
0
@@ -0,0 +1 @@ +%0A
f8d4596db159f143d51c62ea2a097a72f9877ee6
Add test for clusqmgr
test/clusqmgr.py
test/clusqmgr.py
Python
0
@@ -0,0 +1,739 @@ +import unittest%0Afrom testbase import MQWebTest%0A%0Aclass TestQueueActions(MQWebTest):%0A%0A%09def testInquire(self):%0A%0A%09%09data = self.getJSON('/api/clusqmgr/inquire/' + self.qmgr)%0A%09%09%0A%09%09self.assertFalse('mqweb' not in data, 'No mqweb data returned')%0A%0A%09%09if 'error' in data:%...
66443f49c932fba9203b878b7be5f8c1a99a4e9e
make pacbio like names
iron/utilities/rename_to_pacbio.py
iron/utilities/rename_to_pacbio.py
Python
0.02221
@@ -0,0 +1,968 @@ +#!/usr/bin/python%0Aimport sys,argparse%0Afrom SequenceBasics import FastaHandleReader, FastqHandleReader%0A%0Adef main():%0A parser = argparse.ArgumentParser()%0A parser.add_argument('input',help=%22Use - for STDIN%22)%0A group = parser.add_mutually_exclusive_group(required=True)%0A group.add_ar...
dddac1090fae15edb9a8d2a2781bb80989a0bc84
add eventrange control
pilot/control/eventrange.py
pilot/control/eventrange.py
Python
0
@@ -0,0 +1,2280 @@ +#!/usr/bin/env python%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# http://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Authors:%0A# - Wen Guan, wen.guan@cern...
42d6f1d17ea0f0117a82eb1933a5150b5eb1e29a
add missing is_context_manager
pikos/_internal/util.py
pikos/_internal/util.py
Python
0.999274
@@ -0,0 +1,200 @@ +import inspect%0A%0Adef is_context_manager(obj):%0A %22%22%22 Check if the obj is a context manager %22%22%22%0A # FIXME: this should work for now.%0A return hasattr(obj, '__enter__') and hasattr(obj, '__exit__')%0A
c0a809ff79d90712a5074d208193ac9fd2af9901
Add haproxy parser
playback/cli/haproxy.py
playback/cli/haproxy.py
Python
0.000001
@@ -0,0 +1,2970 @@ +import sys%0Afrom playback.api import HaproxyInstall%0Afrom playback.api import HaproxyConfig%0Afrom playback.templates.haproxy_cfg import conf_haproxy_cfg%0Afrom playback.cliutil import priority%0A%0Adef install(args):%0A try:%0A target = HaproxyInstall(user=args.user, hosts=args.hosts.sp...
acc5c52011db4c8edc615ae3e0cad9cea4fe58b8
Add basic test for filesystem observer source
spreadflow_observer_fs/test/test_source.py
spreadflow_observer_fs/test/test_source.py
Python
0
@@ -0,0 +1,2204 @@ +# -*- coding: utf-8 -*-%0A# pylint: disable=too-many-public-methods%0A%0A%22%22%22%0AIntegration tests for spreadflow filesystem observer source.%0A%22%22%22%0A%0Afrom __future__ import absolute_import%0Afrom __future__ import division%0Afrom __future__ import unicode_literals%0A%0Aimport copy%0A%0A...
ad519b5e919bcd0efe48219c684ca19e9ef55ddc
Add realpath() calls to Uv watchers where appropriate
powerline/lib/watcher/uv.py
powerline/lib/watcher/uv.py
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import os from collections import defaultdict from threading import RLock from functools import partial from threading import Thread from powerline.lib.path import realpath class UvNotFound(NotImpleme...
Python
0
@@ -1070,32 +1070,56 @@ ch(self, path):%0A +%09%09path = realpath(path)%0A %09%09with self.lock @@ -1120,16 +1120,16 @@ f.lock:%0A - %09%09%09if pa @@ -1526,32 +1526,56 @@ ch(self, path):%0A +%09%09path = realpath(path)%0A %09%09with self.lock @@ -1762,20 +1762,30 @@ %09return -path +realpath(path) in self @@...
4d1c81af1d028b2d0fd58f8bab7e7e0246c04f3b
Create alternative_matching.py
hacker_rank/regex/grouping_and_capturing/alternative_matching.py
hacker_rank/regex/grouping_and_capturing/alternative_matching.py
Python
0.00001
@@ -0,0 +1,82 @@ +Regex_Pattern = r'%5E(Mr%5C.%7CMrs%5C.%7CMs%5C.%7CDr%5C.%7CEr%5C.)%5Ba-zA-Z%5D%7B1,%7D$'%09# Do not delete 'r'.%0A
978b03cc6c1e36b7ce94fbde7c46f3a633ccb4d0
fix import statement
netforce_account/netforce_account/models/import_statement.py
netforce_account/netforce_account/models/import_statement.py
# Copyright (c) 2012-2015 Netforce Co. Ltd. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publ...
Python
0.000008
@@ -6206,16 +6206,20 @@ if +abs( first_ba @@ -6223,20 +6223,17 @@ _bal - != +- prev_bal :%0A @@ -6228,16 +6228,23 @@ prev_bal +)%3E0.001 :%0A
251a045b6dc10d2c4f7ff94ca10b052ce44b68fe
add country for parents
source_data/etl_tasks/transform_upload.py
source_data/etl_tasks/transform_upload.py
import pprint as pp import xlrd import pandas as pd from django.db import IntegrityError from django.core.exceptions import ValidationError from django.core.exceptions import ObjectDoesNotExist from django.conf import settings from pandas.io.excel import read_excel from source_data.models import * from datapoints.mo...
Python
0.99998
@@ -4317,32 +4317,80 @@ self.document,%5C%0A + 'country': row_data.country%0A
8033f8a033ddc38c3f1e2276c8c2b4f50c8360fb
Add Python template
src/template.py
src/template.py
Python
0.000001
@@ -0,0 +1,838 @@ +#!/usr/bin/env python%0A# -*- coding: UTF-8 -*-%0A%0Afrom __future__ import absolute_import%0Afrom __future__ import division%0Afrom __future__ import print_function%0Afrom __future__ import unicode_literals%0A%0Aimport os%0Aimport argparse%0A%0Adef main(filename=None):%0A print(%22Hello world!%22...
11603040c58e27ebb109275bd4454a54e0c61d42
Test examples
tests/acceptance/test_examples.py
tests/acceptance/test_examples.py
Python
0.000001
@@ -0,0 +1,1162 @@ +from typing import Dict%0A%0Afrom miniworld.util import JSONConfig%0A%0A%0A# TODO: examples/batman_adv.json, problem is configurator%0Adef test_snapshot_boot_single_scenario(image_path, runner):%0A with runner() as r:%0A for _ in range(5):%0A scenario = JSONConfig.read_json_conf...
d2c5462c5677d7674921f02687017f4128f219f7
Create while_loop_else.py
while_loop_else.py
while_loop_else.py
Python
0.000058
@@ -0,0 +1,105 @@ +// You can actually do a while loop that ends with an else //%0A%0Awhile True:%0A ...%0A ...%0A ...%0A ...%0Aelse:%0A
0322e1c51fe07cc9707a687ab309a00ca374a1af
Add a cleanup_test_data management command to remove old test data from dev and stage
moztrap/model/core/management/commands/cleanup_test_data.py
moztrap/model/core/management/commands/cleanup_test_data.py
Python
0
@@ -0,0 +1,1371 @@ +# 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%0Afrom datetime import datetime%0Afrom optparse import make_option%0A%0Afrom django.core.manag...
e2004076b1e04df21d9122d94e8ac00776542483
Create new package. (#6044)
var/spack/repos/builtin/packages/r-allelicimbalance/package.py
var/spack/repos/builtin/packages/r-allelicimbalance/package.py
Python
0
@@ -0,0 +1,2759 @@ +##############################################################################%0A# Copyright (c) 2013-2017, 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...
483cdf6b4dd846d9da11788ae98d86d373fb5c49
add analyze script
app/lda/scripts/analyze.py
app/lda/scripts/analyze.py
Python
0.000001
@@ -0,0 +1,1476 @@ +from __future__ import print_function%0Aimport numpy as np%0Aimport sys%0Aimport pandas as pd%0A%0Aphi_path = '/users/wdai/bosen/app/lda/output/lda.S0.M4.T32/lda_out.phi'%0Anum_topics = 100%0Anum_words = 52210%0Atop_k = 10%0Adict_path = '/users/wdai/bosen/app/lda/datasets/words_freq.tsv'%0Atopk_file...
fcb02edeb8fafa8c297d48edc8ebf6b389321430
add test
test_iris.py
test_iris.py
Python
0.000002
@@ -0,0 +1,1735 @@ +import unittest%0Afrom sklearn import datasets%0Afrom sklearn.utils.validation import check_random_state%0Afrom stacked_generalization import StackedClassifier, FWLSClassifier%0Afrom sklearn.ensemble import RandomForestClassifier%0Afrom sklearn.ensemble import ExtraTreesClassifier%0Afrom sklearn.ens...
f43ac6c526aceddea81c8fccf99e33bd7cb917c4
fix api wrapper
src/sentry/debug/middleware.py
src/sentry/debug/middleware.py
from __future__ import absolute_import import json import re from debug_toolbar.toolbar import DebugToolbar from django.conf import settings from django.template.loader import render_to_string from django.utils.encoding import force_text from six.moves import _thread as thread class ToolbarCache(object): def __...
Python
0.000015
@@ -152,132 +152,207 @@ ngo. -template.loader import render_to_string%0Afrom django.utils.encoding import force_text%0Afrom six.moves import _thread as thread +utils.encoding import force_text%0Afrom django.utils.html import escape%0Afrom six.moves import _thread as thread%0A%0AWRAPPER = %22%22%22%0A%3C!DOCTYPE html%3...
4a0af754fc32deb5f0330a239efdeb53645936e6
Simplify similarity connection management. (#5851)
src/sentry/similarity/index.py
src/sentry/similarity/index.py
from __future__ import absolute_import import itertools import time from collections import Counter, defaultdict from sentry.utils.iterators import chunked from sentry.utils.redis import load_script index = load_script('similarity/index.lua') def band(n, value): assert len(value) % n == 0 return list(chunk...
Python
0.000002
@@ -1675,16 +1675,115 @@ uments%0A%0A + def _get_connection(self, scope):%0A return self.cluster.get_local_client_for_key(scope)%0A%0A def @@ -1820,32 +1820,32 @@ imestamp=None):%0A - if times @@ -2300,40 +2300,23 @@ elf. -cluster.get_local_client_for_key +_get_connection (sco @@ -2917,40 +...
2d0f76538f8927a85a2c51b0b6c34f54c775b883
Add kmeans receiver
lexos/receivers/kmeans_receiver.py
lexos/receivers/kmeans_receiver.py
Python
0.001009
@@ -0,0 +1,320 @@ +from lexos.receivers.base_receiver import BaseReceiver%0A%0A%0Aclass KmeansOption:%0A def __init__(self,):%0A%0A%0Aclass KmeansReceiver(BaseReceiver):%0A def options_from_front_end(self) -%3E KmeansOption:%0A %22%22%22Get the Kmeans option from front end.%0A%0A :return: a KmeansOp...
ab87f960ecb6f330f4574d2e8dc6b3d4cc96c40f
add solution for Spiral Matrix II
src/spiralMatrixII.py
src/spiralMatrixII.py
Python
0
@@ -0,0 +1,718 @@ +class Solution:%0A # @return a list of lists of integer%0A%0A def generateMatrix(self, n):%0A if n == 0:%0A return %5B%5D%0A dirs = %5B%5B0, 1%5D, %5B1, 0%5D, %5B0, -1%5D, %5B-1, 0%5D%5D%0A cur = cur_d = 0%0A cur_x = cur_y = 0%0A matrix = %5B%5B0 fo...
69a031db7d83254291349804ee5f59fe9972f181
Add simple jitclass example
examples/jitclass.py
examples/jitclass.py
Python
0.00001
@@ -0,0 +1,905 @@ +%22%22%22%0AA simple jitclass example.%0A%22%22%22%0A%0Aimport numpy as np%0Afrom numba import jitclass # import the decorator%0Afrom numba import int32, float32 # import the types%0A%0Aspec = %5B%0A ('value', int32), # a simple scalar field%0A ('array', float32%5B:%5D...
7350f2f81988b19d79b368193ffbb32111b08f67
Update TimeDepExtinction.py
experimental_code/TimeDepExtinction.py
experimental_code/TimeDepExtinction.py
#!/usr/bin/env python import argparse, os,sys from numpy import * import numpy as np from scipy.special import gamma from scipy.special import beta as f_beta import platform, time import csv from scipy.special import gdtr, gdtrix from scipy.special import betainc import scipy.stats np.set_printoptions(suppress=True) n...
Python
0
@@ -988,14 +988,14 @@ (l)- +l* sum( -l* d) #
5273a97ab1da4b809573617d3fc01705c322992f
Add tests for form mixin.
thecut/authorship/tests/test_forms.py
thecut/authorship/tests/test_forms.py
Python
0
@@ -0,0 +1,2497 @@ +# -*- coding: utf-8 -*-%0Afrom __future__ import absolute_import, unicode_literals%0Afrom django.test import TestCase%0Afrom django import forms%0Afrom mock import patch%0Afrom test_app.models import AuthorshipModel%0Afrom thecut.authorship.factories import UserFactory%0Afrom thecut.authorship.forms...
e838b6d53f131badfbb7b51b4eb268ebb5d7c450
Add tests for using the new Entity ID tracking in the rule matcher
spacy/tests/matcher/test_entity_id.py
spacy/tests/matcher/test_entity_id.py
Python
0
@@ -0,0 +1,1777 @@ +from __future__ import unicode_literals%0Aimport spacy%0Afrom spacy.vocab import Vocab%0Afrom spacy.matcher import Matcher%0Afrom spacy.tokens.doc import Doc%0Afrom spacy.attrs import *%0A%0Aimport pytest%0A%0A%0A@pytest.fixture%0Adef en_vocab():%0A return spacy.get_lang_class('en').Defaults.crea...
2cf812ba2015bfcc392a2f401c253850b31060c7
Make sure all tags are alphanumeric
perf_insights/perf_insights/upload.py
perf_insights/perf_insights/upload.py
# Copyright (c) 2015 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 import webapp2 import uuid from perf_insights import trace_info sys.path.append('third_party') import cloudstorage as gcs default...
Python
0
@@ -170,16 +170,26 @@ port os%0A +import re%0A import s @@ -1666,25 +1666,81 @@ if -len(tags_string): +re.match('%5E%5Ba-zA-Z0-9,%5D+$', tags_string): # ignore non alpha-numeric tags %0A
a1eff713339d528720ed5999d05a85066018f070
Add visualise.py
visualise.py
visualise.py
Python
0.000369
@@ -0,0 +1,1477 @@ +# visualise.py%0D%0A%0D%0A# Imports%0D%0Aimport argparse%0D%0Aimport json%0D%0Aimport numpy as np%0D%0Aimport matplotlib.pyplot as plt%0D%0Afrom mpl_toolkits.mplot3d import Axes3D%0D%0A%0D%0Afrom uniform_bspline import Contour%0D%0A%0D%0A%0D%0A# main%0D%0Adef main():%0D%0A parser = argparse.Argum...
ee5089a6a16c5a6142444a0ad312fdb641aa845c
Fix tests
test/test.py
test/test.py
#!/usr/bin/env python import locale import os import sys import unittest from tempfile import TemporaryFile sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from argparse import ArgumentParser from argcomplete import * IFS = '\013' class TestArgcomplete(unittest.TestCase): @cla...
Python
0.000003
@@ -753,16 +753,75 @@ mmand))%0A + os.environ%5B'COMP_WORDBREAKS'%5D = '%22%5C'@%3E%3C=;%7C&(:'%0A
13e45a8578e57e2cb55b29980b0f3326dd393a20
Create sump_monitor.py
sump_monitor.py
sump_monitor.py
Python
0.000002
@@ -0,0 +1,1720 @@ +#Import the required modules%0Aimport RPi.GPIO as GPIO%0Aimport time%0Aimport requests%0Aimport math%0A%0A#Setup the GPIO%0AGPIO.setmode(GPIO.BCM)%0A%0A#Define the TRIG and ECO pins - these are labeled on the sensor%0ATRIG = 23%0AECHO = 24%0A%0A#Number of readings we are going to take to avoid issue...
9a6ca54f7cca0bd5f21f0bc590a034e7e3e05b6e
Add migration to add userprofiles to existing users
src/icp/apps/user/migrations/0002_add_userprofiles_to_existing_users.py
src/icp/apps/user/migrations/0002_add_userprofiles_to_existing_users.py
Python
0
@@ -0,0 +1,628 @@ +# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0Aimport django.contrib.postgres.fields%0Afrom django.conf import settings%0A%0Adef create_user_profiles_for_existing_users(apps, schema_editor):%0A User = apps.get_model('auth', 'User')...
c2d658ed1caa91eb963a3df850b5cf9b99633f69
Add missing transpose.py
python/bifrost/transpose.py
python/bifrost/transpose.py
Python
0.006976
@@ -0,0 +1,1978 @@ +%0A# Copyright (c) 2016, The Bifrost Authors. All rights reserved.%0A# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.%0A#%0A# Redistribution and use in source and binary forms, with or without%0A# modification, are permitted provided that the following conditions%0A# are met:%0A# * Red...
f46b08ce3d45b44d3f71759705e8045322c6155d
Create __init__.py
pythainlp/spell/__init__.py
pythainlp/spell/__init__.py
Python
0.000429
@@ -0,0 +1,7 @@ +# TODO%0A
34001081c2cfaa86d85f7a5b51925dca4a6e1a9f
Use Python 3 type syntax in `zerver/webhooks/yo/view.py`.
zerver/webhooks/yo/view.py
zerver/webhooks/yo/view.py
# Webhooks for external integrations. from typing import Optional import ujson from django.http import HttpRequest, HttpResponse from zerver.decorator import api_key_only_webhook_view from zerver.lib.actions import check_send_private_message from zerver.lib.request import REQ, has_request_variables from zerver.lib.re...
Python
0
@@ -475,16 +475,29 @@ (request +: HttpRequest , user_p @@ -506,16 +506,59 @@ file -, email= +: UserProfile,%0A email: str = REQ( @@ -601,17 +601,24 @@ username -= +: str = REQ(defa @@ -635,15 +635,55 @@ t'), - topic= +%0A topic: Optional%5Bstr%5D = REQ( @@ -731,106...
8c98d12a08617b9a1ab1a264b826f5e9046eca05
Add getHWND/getAllWindows utility functions for bots.
assisstant/bots/utility.py
assisstant/bots/utility.py
Python
0
@@ -0,0 +1,641 @@ +import subprocess%0A%0A# criteria: dictionary that has key/values to match against.%0A# e.g. %7B%22wm_class%22: %22Navigator.Firefox%22%7D%0Adef getHWND(criteria):%0A windows = getAllWindows()%0A for window in windows:%0A if criteria.items() %3C= window.items():%0A return window%0A return ...
d9133f865c8f0c64e589e902c88a8e85feb77963
remove call to the deleted function.
tensorflow/lite/micro/tools/make/fix_arduino_subfolders.py
tensorflow/lite/micro/tools/make/fix_arduino_subfolders.py
# Lint as: python2, python3 # Copyright 2019 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 # ...
Python
0
@@ -3075,52 +3075,8 @@ ir)%0A - move_image_data_experimental(library_dir)%0A %0A%0Ade
4912c8261dba456e8e4a62051afdf01565f20ae9
Add first iteration of raw_to_average_jpegs.py.
raw_to_average_jpegs.py
raw_to_average_jpegs.py
Python
0.000001
@@ -0,0 +1,1640 @@ +#! /usr/bin/env python%0A#%0A# Tested on Macs. First run %60brew install ufraw exiftool%60%0A%0Aimport argparse%0Aimport glob%0Aimport multiprocessing as mp%0Aimport os%0Aimport subprocess%0A%0A%0Adef parseArgs():%0A desc = 'Auto-white-balance raw images and create average-sized JPEG files with t...
6aaa08a48dade981de18b117363357fdffaeb641
add python_capstone_setup.py
suite/python_capstone_setup.py
suite/python_capstone_setup.py
Python
0.000012
@@ -0,0 +1,127 @@ +#!/bin/sh%0A# this prints out Capstone setup & core+Python-binding versions%0A%0Apython -c %22import capstone; print capstone.debug()%22%0A
077cf46ab42c76bf3a854142a4f530625a377837
Create tutorial2.py
tutorial2.py
tutorial2.py
Python
0
@@ -0,0 +1 @@ +%0A
1bb1ececfcd548d52a28b713f4ee7eb4e710da85
Add an example of using fchollet multi_gpu_model on InceptionV3.
keras_tf_multigpu/examples/fchollet_inception3_multigpu.py
keras_tf_multigpu/examples/fchollet_inception3_multigpu.py
Python
0
@@ -0,0 +1,1078 @@ +import tensorflow as tf%0Afrom keras.applications import InceptionV3%0Afrom keras.utils import multi_gpu_model%0Aimport numpy as np%0A%0Anum_samples = 1000%0Aheight = 224%0Awidth = 224%0Anum_classes = 1000%0A%0Agpu_count = 2%0A%0A# Instantiate the base model%0A# (here, we do it on CPU, which is opti...
9ffafa9c11e71c176adb4056fbc780e450cc0d82
Add experimental queries module.
databroker/queries.py
databroker/queries.py
Python
0
@@ -0,0 +1,1192 @@ +%22%22%22%0AThis module is experimental.%0A%22%22%22%0Aimport collections.abc%0Aimport abc%0A%0A%0Aclass Query(collections.abc.Mapping):%0A %22%22%22%0A This represents a MongoDB query.%0A %0A MongoDB queries are typically encoded as simple dicts. This object supports%0A the dict inte...
8c7fc2382db0ec9c901f6c2c2b00971f3ee7c3cc
Add tests for custom authentication backend
logintokens/tests/test_backends.py
logintokens/tests/test_backends.py
Python
0
@@ -0,0 +1,1884 @@ +%22%22%22logintokens app unittests for backends%0A%0A%22%22%22%0Afrom time import sleep%0A%0Afrom django.test import TestCase, Client%0Afrom django.contrib.auth import get_user_model, authenticate%0A%0Afrom logintokens.tokens import default_token_generator%0A%0A%0AUSER = get_user_model()%0A%0A%0Acla...
f746c2a8a59342060d404944a586b11e1f46df5a
Merge with lp:openobject-addons
addons/product_visible_discount/__openerp__.py
addons/product_visible_discount/__openerp__.py
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
Python
0
@@ -1820,17 +1820,17 @@ -%22 +' depends -%22 +' : %5B%22 @@ -1856,18 +1856,14 @@ -%22 +' demo -_xml%22 +' : %5B%5D @@ -1872,20 +1872,14 @@ -%22update_xml%22 +'data' : %5B' @@ -1919,17 +1919,17 @@ '%5D,%0A -%22 +' auto_ins @@ -1932,17 +1932,17 @@ _install -%22 +' : False, @@ -1946,17 +1946...
54ca48a2b8cbd53cd6506fdbce47d16f03a28a7d
Add unit tests for bubble sort
tests/test_sorting_and_searching/test_bubble_sort.py
tests/test_sorting_and_searching/test_bubble_sort.py
Python
0
@@ -0,0 +1,446 @@ +import unittest%0A%0Afrom aids.sorting_and_searching.bubble_sort import bubble_sort%0A%0Aclass BubbleSortTestCase(unittest.TestCase):%0A '''%0A Unit tests for bubble sort%0A%0A '''%0A%0A def setUp(self):%0A self.example_1 = %5B2, 5, 4, 3, 1%5D%0A%0A def test_bubble_sort(self):%0...
38e75951570be46f6a36eeb000a4621bc76bf02a
Move history plugin to learn phase.
flexget/plugins/output/history.py
flexget/plugins/output/history.py
from __future__ import unicode_literals, division, absolute_import import logging from datetime import datetime from sqlalchemy import Column, String, Integer, DateTime, Unicode, desc from flexget import options, plugin from flexget.event import event from flexget.manager import Base, Session from flexget.utils.tools...
Python
0
@@ -924,35 +924,8 @@ '%7D%0A%0A - @plugin.priority(-255)%0A @@ -936,22 +936,21 @@ on_task_ -output +learn (self, t
70e1910ef01c6313360dff3f3e728e4f5f404f38
Allow history to be filtered by task
flexget/plugins/output/history.py
flexget/plugins/output/history.py
from __future__ import unicode_literals, division, absolute_import import logging from datetime import datetime from sqlalchemy import Column, String, Integer, DateTime, Unicode, desc from flexget import options, plugin from flexget.event import event from flexget.logger import console from flexget.manager import Bas...
Python
0.000008
@@ -1900,16 +1900,119 @@ + '%25'))%0A + if options.task:%0A query = query.filter(History.task.like('%25' + options.task + '%25'))%0A @@ -2983,16 +2983,131 @@ var)s')%0A + parser.add_argument('--task', action='store', metavar='TASK', help='limit to results in specified %25(metavar)s') %...
0b047f5b6123d851916ed12114512ddebec58225
Add 20150509 question.
LeetCode/add_two_numbers.py
LeetCode/add_two_numbers.py
Python
0.000001
@@ -0,0 +1,1848 @@ +%22%22%22%0AYou are given two linked lists representing two non-negative numbers.%0AThe digits are stored in reverse order and each of their nodes contain a single%0Adigit. Add the two numbers and return it as a linked list.%0A%0AInput: (2 -%3E 4 -%3E 3) + (5 -%3E 6 -%3E 4)%0AOutput: 7 -%3E 0 -%3E 8...
e46da8f316485c7c9e11ffe751108539f9254a68
Create ClientUDP.py
ClientUDP.py
ClientUDP.py
Python
0
@@ -0,0 +1,2738 @@ +'''%0ACreated on 12 Feb 2015%0A%0A@author: shutebt01%0A'''%0A#!/bin/env/python3%0A'''%0APacket formating:%0A %5Btype, src-name, src-group, data%5D%0A'''%0A%0Aimport socket, threading, json%0A%0Aname = input(%22Enter User Name: %22)%0Aport = 16500%0A#host = input(%22Enter host: %22)%0Aroom = %22Gl...
bf4b4ae886d8b631c443d1d992159f1922232dca
Create code.py
Code/code.py
Code/code.py
Python
0.000001
@@ -0,0 +1,657 @@ +from django.db import models%0A%0Aclass Address(models.Model):%0A address=models.CharField(max_length=255,blank=True)%0A city=models.CharField(max_length=150,blank=True)%0A state=models.CharField(max_length=2,blank=True) // Such as US for Unitet States of America, IN for India%0A pin=models.C...
67596d081059a004e5f7ab15f7972773fdf2f15e
ADD PyGrid SetupService message tests
tests/syft/grid/messages/setup_msg_test.py
tests/syft/grid/messages/setup_msg_test.py
Python
0
@@ -0,0 +1,2964 @@ +# syft absolute%0Aimport syft as sy%0Afrom syft.core.io.address import Address%0Afrom syft.grid.messages.setup_messages import CreateInitialSetUpMessage%0Afrom syft.grid.messages.setup_messages import CreateInitialSetUpResponse%0Afrom syft.grid.messages.setup_messages import GetSetUpMessage%0Afrom s...
08b52fab8c561834996bd23a5a7654bfac7ea75e
Fix MR comments (NC-1168)
nodeconductor/cost_tracking/filters.py
nodeconductor/cost_tracking/filters.py
from __future__ import unicode_literals from django.contrib.contenttypes.models import ContentType from django.db.models import Q import django_filters from rest_framework import filters from nodeconductor.core import filters as core_filters from nodeconductor.cost_tracking import models, serializers from nodeconduct...
Python
0
@@ -379,16 +379,68 @@ ervices%0A +from nodeconductor.structure.models import Resource%0A %0A%0Aclass @@ -3245,53 +3245,30 @@ els= -SupportedServi +Resour ce -s .get_ -resource_models().value +all_model s())
cb707785cb165e8570aa8201d2e71b5ed2c2f3bd
Use new rebot model
utest/webcontent/spec/data/create_jsdata_for_specs.py
utest/webcontent/spec/data/create_jsdata_for_specs.py
#!/usr/bin/env python import fileinput from os.path import join, dirname, abspath import sys import os BASEDIR = dirname(abspath(__file__)) OUTPUT = join(BASEDIR, 'output.xml') sys.path.insert(0, join(BASEDIR, '..', '..', '..', '..', 'src')) import robot from robot.reporting.outputparser import OutputParser from ro...
Python
0
@@ -97,16 +97,69 @@ port os%0A +from robot.result.datamodel import DatamodelVisitor%0A%0A %0ABASEDIR @@ -417,16 +417,33 @@ ngWriter +, DataModelWriter %0A%0A%0Adef r @@ -966,62 +966,198 @@ -model = OutputParser(split_log=split_log).parse(outxml +result = robot.result.builders.ResultFromXML(outxml)%0A visit...
3608c4d3b559ba7fa1bd9629231e98196681caa4
add package py-gdbgui (#7715)
var/spack/repos/builtin/packages/py-gdbgui/package.py
var/spack/repos/builtin/packages/py-gdbgui/package.py
Python
0
@@ -0,0 +1,2059 @@ +##############################################################################%0A# Copyright (c) 2013-2017, 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...
8355cb358d14589a194926d37beeb5af7af2a591
Increase event image url limit from 200
falmer/events/migrations/0012_auto_20170905_1208.py
falmer/events/migrations/0012_auto_20170905_1208.py
Python
0.000114
@@ -0,0 +1,609 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.11.3 on 2017-09-05 11:08%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('events', '0011_auto_20170905_1028'),%0A %5D%0A%0...
a16b4401f37f08d8cb5e1f9ec1b7d4a3221360ab
Add test case for regular extrusion
test/test_regular_extrusion.py
test/test_regular_extrusion.py
Python
0
@@ -0,0 +1,922 @@ +# -*- coding: utf-8 -*-%0A%22%22%22Creates regular cube mesh by extrusion.%0A%22%22%22%0Aimport pygmsh%0A%0Afrom helpers import compute_volume%0A%0A%0Adef test():%0A x = 5%0A y = 4%0A z = 3%0A x_layers = 10%0A y_layers = 5%0A z_layers = 3%0A geom = pygmsh.built_in.Geometry()%0A ...
5c7b70061d6e96619c6e3a40c87aaec39b408fdf
Enable subscription admin area
subscription/admin.py
subscription/admin.py
Python
0
@@ -0,0 +1,195 @@ +from django.contrib import admin%0Afrom subscription.models import MessageSet, Message, Subscription%0A%0Aadmin.site.register(MessageSet)%0Aadmin.site.register(Message)%0Aadmin.site.register(Subscription)%0A
78552d3de73174dd0ffdf9a58009281013dcf640
make interface consistent for add_sample
rlkit/data_management/replay_buffer.py
rlkit/data_management/replay_buffer.py
import abc class ReplayBuffer(object, metaclass=abc.ABCMeta): """ A class used to save and replay data. """ @abc.abstractmethod def add_sample(self, observation, action, reward, next_observation, terminal, **kwargs): """ Add a transition tuple. """ ...
Python
0
@@ -194,32 +194,24 @@ reward, -next_observation +terminal ,%0A @@ -223,24 +223,32 @@ -terminal +next_observation , **kwar
7bd6f3e7751deecfc3cd555fc071d722c856802c
Implement division using built in library function
chips/compiler/builtins.py
chips/compiler/builtins.py
Python
0.000001
@@ -0,0 +1,2288 @@ +#!/usr/bin/env python%0A%22%22%22Support Library for builtin Functionality%22%22%22%0A%0A__author__ = %22Jon Dawson%22%0A__copyright__ = %22Copyright (C) 2013, Jonathan P Dawson%22%0A__version__ = %220.1%22%0A%0Abuiltins=%22%22%22%0A%0Aunsigned unsigned_divide_xxxx(unsigned dividend, unsigned diviso...
6eb49ae8dcf33a7d7be9ed3c8208bc83a9a46757
Create python_wiki_one.py
ckOLDab/python_wiki_one.py
ckOLDab/python_wiki_one.py
Python
0.999848
@@ -0,0 +1,1222 @@ +import time%0Aimport BaseHTTPServer%0A%0A%0AHOST_NAME = '127.0.0.1' # !!!REMEMBER TO CHANGE THIS!!!%0APORT_NUMBER = 80 # Maybe set this to 9000.%0A%0A%0Aclass MyHandler(BaseHTTPServer.BaseHTTPRequestHandler):%0A def do_HEAD(s):%0A s.send_response(200)%0A s.send_header(%22Content-typ...
93cd3dc8c4d37e2e83f6f6e09273576297e822b9
Version 0.3.0 - alpha
stab/__init__.py
stab/__init__.py
Python
0.000001
@@ -0,0 +1,45 @@ +__version__ = '0.3.0'%0A%0Afrom stab import stab%0A
53cdd6e7bcb37567382f3b3688b6a55f1b2968be
Add test_binaryclassifier
tests/test_binaryclassifier.py
tests/test_binaryclassifier.py
Python
0.000015
@@ -0,0 +1,898 @@ +%0Aimport numpy as np%0Afrom sklearn import svm, datasets%0A%0Afrom darwin.pipeline import ClassificationPipeline%0A%0A%0Adef test_binary_classification_with_classification_pipeline():%0A # generate the dataset%0A n_samples=100%0A n_features=20%0A x, y = datasets.make_gaussian_quantiles(m...
bb80025f3ed8169a2558e9c5c6bc4db5a862d7ae
Integrate LLVM at llvm/llvm-project@529a3d87a799
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 = "6139626d738fd03b968e07698f5cd26924e3cd65" LLVM_SHA256 = "b9581ac44a7d9dd3a8470497cddb63c387ab6520d82d077fb609bc29b4e7b887" tf_http_archive( ...
Python
0.000001
@@ -160,133 +160,133 @@ = %22 -6139626d738fd03b968e07698f5cd26924e3cd65%22%0A LLVM_SHA256 = %22b9581ac44a7d9dd3a8470497cddb63c387ab6520d82d077fb609bc29b4e7b887 +529a3d87a799a2cba29bc1d0f426a00d5bb4c88f%22%0A LLVM_SHA256 = %223d2ca52bd36ad3904f2f5d0e43935b0e82f3d1ac137e0a89025141e36735944f %22%0A%0A
fee6e923b27947721ba1ea4ce5005f54eabba421
Integrate LLVM at llvm/llvm-project@4504e1134c91
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 = "0ad1d9fdf22dad41312e02b8bc990bf58ce1744c" LLVM_SHA256 = "517db6d771cf24d9f0aea6d4fdd59591347c7eb9d86ef58521fe8cb929fbe82b" tf_http_archive( ...
Python
0.000003
@@ -160,47 +160,47 @@ = %22 -0ad1d9fdf22dad413 +4504e1134c9118f3c322685f8a90 12 +9 e0 -2b8bc990bf58ce1744 +9bab92 c%22%0A @@ -221,72 +221,72 @@ = %22 -517db6d771cf24d9f0aea6d4fdd59591347c7eb9d86ef58521fe8cb929fbe82b +2b1d7a96ff37600cae12d2ed51b9f0554b1bbc6511ffe51ac7525928b29bab44 %22%0A%0A
a868b0d057b34dbd487a1e3d2b08d5489651b3ff
Integrate LLVM at llvm/llvm-project@fe611b1da84b
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 = "bd7ece4e063e7afd08cbaa311878c09aadf5ec21" LLVM_SHA256 = "e9390dfa94c1143f35437bea8a011b030194e047bc3df45e2627cff88f83d2ed" tf_http_archive( ...
Python
0.000006
@@ -160,133 +160,133 @@ = %22 -bd7ece4e063e7afd08cbaa311878c09aadf5ec21%22%0A LLVM_SHA256 = %22e9390dfa94c1143f35437bea8a011b030194e047bc3df45e2627cff88f83d2ed +fe611b1da84b9442c093739394d336af9e99c1a1%22%0A LLVM_SHA256 = %2252edc892b020736f4c53e52b63687ee7caab93c90a0062b4026f4d49fc18266f %22%0A%0A
6b01692fcdaf0dc01bb32eefcf883200d2864f60
make paths work independent of cursor
statscraper/scrapers/PXWebScraper.py
statscraper/scrapers/PXWebScraper.py
# encoding: utf-8 """ A wrapper around the PX-Web API. As implementations and versions vary, this is best used as a base class, for more specific scrapers to extend. If used directly, an API endpoint must be set: scraper = PXWeb(base_url="http://api.example.com/") # ...or: scraper =...
Python
0.000003
@@ -1016,22 +1016,8 @@ %22%5D%0A%0A - @property%0A @@ -1034,16 +1034,22 @@ ath(self +, item ):%0A @@ -1250,21 +1250,8 @@ in -self.current_ item @@ -1378,32 +1378,38 @@ t(self._api_path +(item) ).json()%0A%0A @@ -1620,16 +1620,16 @@ taset):%0A - @@ -1662,16 +1662,25 @@ api_path +...
a973c3b5d1683cd27f8b88c4c38daa934dae75c1
refactor storeRegiser
usermanage/views/storeRegister.py
usermanage/views/storeRegister.py
Python
0.99987
@@ -0,0 +1,1286 @@ +from django.shortcuts import render, redirect%0Afrom django.http import HttpResponseRedirect%0Afrom django.contrib.auth import login, authenticate, logout%0Afrom django.contrib.auth.models import User, Group%0Afrom django.contrib.auth.decorators import login_required, user_passes_test, permission_re...
9316bc07c77e2f51332a40bf430cef117f4d89e1
Add script to check for Dockerfile coverage
util/check_dockerfile_coverage.py
util/check_dockerfile_coverage.py
Python
0
@@ -0,0 +1,2410 @@ +import yaml%0Aimport os%0Aimport pathlib2%0Aimport itertools%0Aimport argparse%0Aimport logging%0Aimport sys%0A%0ATRAVIS_BUILD_DIR = os.environ.get(%22TRAVIS_BUILD_DIR%22)%0ACONFIG_FILE_PATH = pathlib2.Path(TRAVIS_BUILD_DIR, %22util%22, %22parsefiles_config.yml%22)%0ALOGGER = logging.getLogger(__nam...
c78c82987feb4dbe91b750ab90a3d163fc1340c6
Add datatables filter mixin
rhinocloud/contrib/jquery/views.py
rhinocloud/contrib/jquery/views.py
Python
0
@@ -0,0 +1,2169 @@ +from django.views import generic%0Afrom django.db.models import Q%0Afrom django.core.exceptions import ImproperlyConfigured%0A%0A%0Aclass DataTablesServerDataMixin(object):%0A query_class = Q%0A initial_query_kwargs = %7B%7D%0A searchable_fields = ()%0A %0A def get_searchable_fields(s...
7a26442d7b219f616062cc60db9cb762a9ac1d37
Add found view controller to pasteboard
commands/FBFindCommands.py
commands/FBFindCommands.py
#!/usr/bin/python # Copyright (c) 2014, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import os imp...
Python
0
@@ -1905,16 +1905,100 @@ ption))%0A + cmd = 'echo %7B%7D %7C tr -d %22%5Cn%22 %7C pbcopy'.format(object)%0A os.system(cmd)%0A
d50378a63d3e2d2385371194dc645970d1836a7c
Fix suggestion slack notification format indexes
controllers/suggestions/suggest_designs_review_controller.py
controllers/suggestions/suggest_designs_review_controller.py
import datetime import os import json import logging from google.appengine.ext import ndb from consts.account_permissions import AccountPermissions from controllers.suggestions.suggestions_review_base_controller import SuggestionsReviewBaseController from helpers.media_manipulator import MediaManipulator from helpers...
Python
0
@@ -1584,32 +1584,33 @@ ad.com/library/%7B +2 %7D%7Csuggestion%3E fo @@ -1651,32 +1651,32 @@ m/team/%7B -2%7D/%7B3%7D%7C%7B2 +3%7D/%7B4%7D%7C%7B3 %7D in %7B -3 +4 %7D%3E%22.form @@ -2491,16 +2491,17 @@ ibrary/%7B +2 %7D%7Csugges @@ -2554,24 +2554,24 @@ am/%7B -2%7D/%7B3%7D%7C%7B2 +3%7D/%7B4%7D%7C%7B3 %7D in %7...
805708048f493ca538a9e0b8d9d40ae1d4baf2c3
Add a tool to reproduce HTTP KeepAlive races in OpenStack gate jobs.
keepalive-race/keep-alive-race.py
keepalive-race/keep-alive-race.py
Python
0.000029
@@ -0,0 +1,1380 @@ +#!/usr/bin/python3%0A%22%22%22%0AThis script demonstrates a race condition with HTTP/1.1 keepalive%0A%22%22%22%0Aimport decimal%0Aimport json%0Aimport subprocess%0Aimport time%0Aimport threading%0A%0Aimport requests%0Arequests.packages.urllib3.disable_warnings()%0A%0ACREDS = json.loads(subprocess.ch...
e11de6b814da4e5ade9fadaa035d6141ab3c113f
add test that features can be read and written ok
test/test_features.py
test/test_features.py
Python
0
@@ -0,0 +1,1121 @@ +#!/usr/bin/python%0Aimport unittest%0Aimport RMF%0A%0Aclass GenericTest(unittest.TestCase):%0A def _create(self, path):%0A fh= RMF.create_rmf_file(path)%0A rt= fh.get_root_node()%0A reps=%5Brt.add_child(%22rep%22+str(i), RMF.REPRESENTATION) for i in range(0,5)%5D%0A sf= RMF.Sc...
d621948137f9b5df20a53b6e2b12dd61551f22bd
fix : bug in test_trigger, but why does it worked on my machine and not jenkins? strange.
test/test_triggers.py
test/test_triggers.py
#!/usr/bin/env python2.6 #Copyright (C) 2009-2010 : # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # #This file is part of Shinken. # #Shinken is free software: you can redistribute it and/or modify #it under the terms of the GNU Affero General Public License as published by #the Fr...
Python
0
@@ -930,16 +930,24 @@ shinken. +objects. trigger
48da7ceb86387d3cb6fd53f50110232813123ecc
Add tests for ansible roster virtual
tests/pytests/unit/roster/test_ansible.py
tests/pytests/unit/roster/test_ansible.py
Python
0
@@ -0,0 +1,423 @@ +import pytest%0Aimport salt.roster.ansible as ansible%0Afrom tests.support.mock import patch%0A%0A%0A@pytest.mark.xfail%0A@pytest.mark.parametrize(%0A %22which_value%22,%0A %5BFalse, None%5D,%0A)%0Adef test_virtual_returns_False_if_ansible_inventory_doesnt_exist(which_value):%0A with patch(%...
f3e3ab4fea1d367578adffbefd072616beaee65e
Create word_a10n.py
word_a10n.py
word_a10n.py
Python
0.999953
@@ -0,0 +1,296 @@ +#Kunal Gautam%0A#Codewars : @Kunalpod%0A#Problem name: Word a10n (abbreviation)%0A#Problem level: 6 kyu%0A%0Aimport re%0Adef abbreviate(s):%0A words = re.findall('%5BA-Za-z%5D%5BA-Za-z%5D%5BA-Za-z%5D%5BA-Za-z%5D+', s)%0A for word in words:%0A s = s.replace(word, word%5B0%5D + str(len(wor...
8dd3207298e7d81f5d4abdfa62604d5849d132fd
Add Python hello client
example/hello.py
example/hello.py
Python
0.000206
@@ -0,0 +1,656 @@ +#!/usr/bin/env python%0A%0Aimport dbus%0A%0Abus = dbus.SessionBus()%0Aremote_object = bus.get_object(%22org.za.hem.DBus%22, %22/Root%22)%0A%0Adbus_interface = %22org.designfu.SampleInterface%22%0Aiface = dbus.Interface(remote_object, dbus_interface)%0A%0Ahello_reply_list = remote_object.HelloWorld(17...
5836eb513b244a21e33e111cd3c3d6f33530aeae
Add a simple widget that sets up basic layout for common controls.
source/harmony/ui/widget/simple.py
source/harmony/ui/widget/simple.py
Python
0
@@ -0,0 +1,1337 @@ +# :coding: utf-8%0A# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips%0A# :license: See LICENSE.txt.%0A%0Afrom PySide import QtGui%0A%0Afrom .base import Widget%0A%0A%0Aclass Simple(Widget):%0A '''Simple widget that wraps a single control.'''%0A%0A def _construct(self):%0A '''Con...
8628ab8cbcb185826e97af9148ec7d07861e29e7
Add setup_pfiles.py to setup parameter files for CIAO tools
scripts/setup_pfiles.py
scripts/setup_pfiles.py
Python
0
@@ -0,0 +1,925 @@ +# Copyright (c) 2017 Weitian LI %3Cliweitianux@live.com%3E%0A# MIT license%0A#%0A# Weitian LI%0A# 2017-02-06%0A%0A%22%22%22%0APrepare the CIAO parameter files and setup the PFILES environment%0Avariable to keep the pfiles locally, in order to avoid the conflicts%0Abetween multiple instance of the sam...
6c8966e0e299c12e95d41009a8dde7519946b432
add db level constraint for one active subscription per domain
corehq/apps/accounting/migrations/0006_unique_active_domain_subscription.py
corehq/apps/accounting/migrations/0006_unique_active_domain_subscription.py
Python
0
@@ -0,0 +1,727 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.10.7 on 2017-04-22 17:18%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0A%0Afrom corehq.sql_db.operations import HqRunSQL%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('accounti...
faaa206923b99f4d986a32ddfd854b234377e988
Add ena2fasta script
bin/ena2fasta.py
bin/ena2fasta.py
Python
0
@@ -0,0 +1,1006 @@ +#!/usr/bin/env python%0A%0A# -*- coding: utf-8 -*-%0A%0A%22%22%22%0ACopyright %5B2009-2020%5D EMBL-European Bioinformatics Institute%0ALicensed under the Apache License, Version 2.0 (the %22License%22);%0Ayou may not use this file except in compliance with the License.%0AYou may obtain a copy of the...
c913d1fc3ac24b2491783dc9c33f401180c7b4b0
test delivering with failures, refactor tests
tests/test_postman.py
tests/test_postman.py
from pytest import fixture from mock import Mock, call from mailthon.postman import Postman from mailthon.envelope import Envelope from mailthon.enclosure import PlainText @fixture def smtp(): smtp = Mock() smtp.return_value = smtp smtp.noop.return_value = (250, 'ok') smtp.sendmail.return_value = {} ...
Python
0.000001
@@ -165,16 +165,65 @@ ainText%0A +from mailthon.headers import sender, to, subject%0A %0A%0A@fixtu @@ -444,30 +444,16 @@ ers= -%7B%0A 'From': +%5Bsender( 'Me @@ -466,16 +466,17 @@ il.com%3E' +) ,%0A @@ -485,14 +485,16 @@ -'To': + to( 'him @@ -503,16 +503,17 @@ ail.com' +) ,%0A ...
c6af972ca6dfd6396b3f16e2e218263faffe16ab
Add run_mraic.py
bin/run_mraic.py
bin/run_mraic.py
Python
0.000005
@@ -0,0 +1,1687 @@ +#!/usr/bin/env python%0A%0A%22%22%22%0A%0AName: run_mraic.py%0A%0AAuthor: Michael G. Harvey%0ADate: 5 July 2013%0A%0ADescription: Run mraic.pl (Nylanderb 2004) on a folder of alignments in phylip/phyml format.%0A%0AUsage: python run_mraic.py mraic_dir in_dir out_dir%0A%0Apython run_mraic.py /Users/m...
2e43441e43942b2f24a89209cfdc56652523901d
Create test_pir.py
test/test_pir.py
test/test_pir.py
Python
0.000051
@@ -0,0 +1,166 @@ +from ...%0A%0Aif __name__ == %22__main__%22:%0A%09try :%0A%09%09pir = PIR()%0A%09%09pir.start()%09%0A%09%09while 1 :%0A%09%09%09print(pir.result())%0A%09except KeyboardInterrupt :%09%0A%09%09pir.stop()%0A%09%09pir.cleanup()%0A
ed2548ca027b4fd062a10ddf2ce359d9115f40a4
add a __main__.py to nuitka works
borg/__main__.py
borg/__main__.py
Python
0.000037
@@ -0,0 +1,39 @@ +from borg.archiver import main%0Amain()%0A%0A
8195278aa5044371c8fa7963be15169209e1b92a
Add new test to call neutron API and check results in dragonflow db.
dragonflow/tests/fullstack/test_neutron_api.py
dragonflow/tests/fullstack/test_neutron_api.py
Python
0.000006
@@ -0,0 +1,2941 @@ +# 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 a...
fefe47a03337d072e47b439a940d7b6eeef56b93
Add OpenTracing example
example/opentracing.py
example/opentracing.py
Python
0
@@ -0,0 +1,1055 @@ +# encoding=utf-8%0Aimport opentracing%0Aimport instana%0Aimport time%0A%0A# Loop continuously with a 2 second sleep to generate traces%0Awhile True:%0A entry_span = opentracing.tracer.start_span('universe')%0A%0A entry_span.set_tag('http.method', 'GET')%0A entry_span.set_tag('http.url', '/u...
f3448d0b37fdac8976a2cc8e4604a6cb2ea7a4ed
add vsmlib.utils which should have been part of commit 6238f235
vsmlib/utils.py
vsmlib/utils.py
Python
0
@@ -0,0 +1,1363 @@ +def parse_signal_num_file(filename):%0A signal_to_num = %7B%7D%0A vsi_version = -1%0A try:%0A with open(filename) as signal_to_num_file:%0A lines = signal_to_num_file.readlines()%0A for line in lines:%0A line_stripped = line.strip()%0A ...
8bd66387ba5cd50dc0b545dc7b627792ed601faa
Add test
tests/context.py
tests/context.py
Python
0.000005
@@ -0,0 +1,77 @@ +import os%0Aimport sys%0Asys.path.insert(0, os.path.abspath('..'))%0A%0Aimport gaend%0A
59e546ae5afe22aab967e5376c8799e29ccbd86a
Add the basic version of my file comparison script
directoryFileContentCmp.py
directoryFileContentCmp.py
Python
0
@@ -0,0 +1,1829 @@ +#! /usr/env/python%0Aimport os%0Aimport hashlib%0Aimport sys%0A%0Abufsize = 65536%0A# Path1 = '/Users/kirkchambers/Desktop'%0A# Path2 = '/Users/kirkchambers/DataSets'%0A%0Adef generate_file_digests_for(path):%0A%09path_set = set()%0A%09for item in os.walk(path):%0A%09%09(directory, _subdirectories, ...
345758259d9ee80826758373c3970db1c28a870b
Bump development version
djangocms_blog/__init__.py
djangocms_blog/__init__.py
__version__ = '0.3.a2'
Python
0
@@ -17,7 +17,7 @@ .3.a -2 +3 '%0A
4af2a6a62e4be78bd20550c3ae5089c51b4fec62
add separate function for pagination
students/utils.py
students/utils.py
Python
0.000007
@@ -0,0 +1,1198 @@ +from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger%0A%0A%0Adef paginate(objects, size, request, context, var_name='object_list'):%0A %22%22%22Paginate objects provided by view.%0A%0A This function takes:%0A * list of elements;%0A * number of objects per page...