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
31d018181c5183acadbe309a250aed17cbae5a28
Create Add_Binary.py
Array/Add_Binary.py
Array/Add_Binary.py
Python
0.000002
@@ -0,0 +1,699 @@ +Given two binary strings, return their sum (also a binary string).%0A%0AFor example,%0Aa = %2211%22%0Ab = %221%22%0AReturn %22100%22.%0A%0Aclass Solution:%0A # @param a, a string%0A # @param b, a string%0A # @return a string%0A def addBinary(self, a, b):%0A A = len(a)%0A B =...
12192eca146dc1974417bd4fd2cf3722e0049910
add arduino example
example/ard2rrd.py
example/ard2rrd.py
Python
0.000046
@@ -0,0 +1,756 @@ +#!/usr/bin/env python3%0A# -*- coding: utf-8 -*-%0A%0A# Arduino UNO A0 value to RRD db%0A# - read an integer from a serial port and store it on RRD redis database%0A%0Aimport serial%0Afrom pyRRD_Redis import RRD_redis, StepAddFunc%0A%0A# some const%0ATAG_NAME = 'arduino_a0'%0A%0A# init serial port a...
013ee19808dc86d29cb3aa86b38dc35fe98a5580
add to and remove from /etc/hosts some agent node info so condor can recognise its workers
conpaas-services/src/conpaas/services/htcondor/manager/node_info.py
conpaas-services/src/conpaas/services/htcondor/manager/node_info.py
Python
0.000004
@@ -0,0 +1,2421 @@ +%22%22%22%0ACopyright (c) 2010-2013, Contrail consortium.%0AAll rights reserved.%0A%0ARedistribution and use in source and binary forms, %0Awith or without modification, are permitted provided%0Athat the following conditions are met:%0A%0A 1. Redistributions of source code must retain the%0A abov...
2f47284b44ceef3c12990a4f9621062040fe6fcb
Add day 4 solution
day4.py
day4.py
Python
0.001388
@@ -0,0 +1,259 @@ +#!/usr/bin/env python%0A%0Afrom hashlib import md5%0A%0Atests = %5B'abcdef', 'pqrstuv'%5D%0A%0Astring = 'iwrupvqb'%0Afor idx in range(10000000):%0A hash = md5((string + str(idx)).encode('ascii'))%0A if hash.hexdigest().startswith('000000'):%0A print(idx)%0A break%0A%0A
e5008fdf481a80db3b5583d35e6fd369a28cd7ce
drop session_details for sessions
example/__init__.py
example/__init__.py
from pupa.scrape import Jurisdiction from .people import PersonScraper class Example(Jurisdiction): jurisdiction_id = 'ocd-jurisdiction/country:us/state:ex/place:example' name = 'Example Legislature' url = 'http://example.com' provides = ['people'] parties = [ {'name': 'Independent' }, ...
Python
0
@@ -391,28 +391,21 @@ sion -_detail s = -%7B +%5B %0A '20 @@ -404,18 +404,26 @@ + %7B'name': '2013' -: %7B +, '_sc @@ -447,17 +447,17 @@ 3'%7D%0A -%7D +%5D %0A%0A de
cd9c9080a00cc7e05b5ae4574dd39ddfc86fef3b
Create enc.py
enc.py
enc.py
Python
0.000001
@@ -0,0 +1,2165 @@ +#!/usr/bin/python%0A%22%22%22%0AGenerate encrypted messages wrapped in a self-decrypting python script%0Ausage: python enc.py password %3E out.py%0Awhere password is the encryption password and out.py is the message/script file%0Ato decrypt use: python out.py password%0Athis will print the message t...
8adfedd0c30fab796fccac6ec58c09e644a91b2f
Add script to shuffle paired fastq sequences.
shuffle_fastq.py
shuffle_fastq.py
Python
0
@@ -0,0 +1,941 @@ +# shuffles the sequences in a fastq file%0Aimport os%0Aimport random%0Afrom Bio import SeqIO%0Aimport fileinput%0Afrom argparse import ArgumentParser%0A%0Aif __name__ == %22__main__%22:%0A parser = ArgumentParser()%0A parser.add_argument(%22--fq1%22, required=%22True%22)%0A parser.add_argume...
b7f9e5555481ba4e34bcc12beecf540d3204a15f
Fix pep8 issue
raven/contrib/celery/__init__.py
raven/contrib/celery/__init__.py
""" raven.contrib.celery ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ try: from celery.task import task except ImportError: from celery.decorators import task from celery.signals import task_failure from ra...
Python
0
@@ -1086,9 +1086,8 @@ %7D)%0A -%0A
dba14e6dfbaacf79d88f1be0b831488f45fc1bfc
Create coroutine.py
gateway/src/test/coroutine.py
gateway/src/test/coroutine.py
Python
0.000006
@@ -0,0 +1,563 @@ +#!/usr/bin/python3.5%0Aimport asyncio%0Aimport time%0A%0Anow = lambda: time.time()%0Aasync def func(x):%0A print('Waiting for %25d s' %25 x)%0A await asyncio.sleep(x)%0A return 'Done after %7B%7Ds'.format(x)%0A%0Astart = now()%0A%0Acoro1 = func(1)%0Acoro2 = func(2)%0Acoro3 = func(4)%0A%0Atas...
b9d47f54b76345f0c8f7d486282fc416ba540aee
Add specs for ArgumentParser
tests/test_argument_parser.py
tests/test_argument_parser.py
Python
0
@@ -0,0 +1,732 @@ +import pytest%0A%0Afrom codeclimate_test_reporter.components.argument_parser import ArgumentParser%0A%0A%0Adef test_parse_args_default():%0A parsed_args = ArgumentParser().parse_args(%5B%5D)%0A%0A assert(parsed_args.file == %22./.coverage%22)%0A assert(parsed_args.token is None)%0A assert...
614579c38bea10798d285ec2608650d36369020a
add test demonstrating duplicate stream handling
tests/test_invalid_streams.py
tests/test_invalid_streams.py
Python
0
@@ -0,0 +1,265 @@ +import fixtures%0A%0Aimport dnfile%0A%0A%0Adef test_duplicate_stream():%0A path = fixtures.DATA / %22invalid-streams%22 / %22duplicate-stream.exe%22%0A%0A dn = dnfile.dnPE(path)%0A%0A assert %22#US%22 in dn.net.metadata.streams%0A assert dn.net.user_strings.get_us(1).value == %22BBBBBBBB%...
ffb5caf83055e734baf711366b6779ecb24a013c
Add script to generate other adobe themes
addons/adobe/clone.py
addons/adobe/clone.py
Python
0
@@ -0,0 +1,1935 @@ +#!/usr/bin/env python%0Afrom PIL import Image, ImageEnhance%0Aimport PIL.ImageOps%0Aimport fnmatch%0Aimport shutil%0Aimport os%0A%0Adef globPath(path, pattern):%0A result = %5B%5D%0A for root, subdirs, files in os.walk(path):%0A for filename in files:%0A if fnmatch.fnmatch(fi...
c5ecaef62d788b69446181c6ba495cb273bf98ef
Add rolling mean scatter plot example
altair/examples/scatter_with_rolling_mean.py
altair/examples/scatter_with_rolling_mean.py
Python
0.000002
@@ -0,0 +1,680 @@ +%22%22%22%0AScatter Plot with Rolling Mean%0A------------------------------%0AA scatter plot with a rolling mean overlay. In this example a 30 day window%0Ais used to calculate the mean of the maximum temperature around each date.%0A%22%22%22%0A# category: scatter plots%0A%0Aimport altair as alt%0Afr...
5ec793ffb8c260a02ab7da655b5f56ff3c3f5da7
add find_anagrams.py
algo/find_anagrams.py
algo/find_anagrams.py
Python
0.000321
@@ -0,0 +1,310 @@ +words = %22oolf folo oolf lfoo fool oofl fool loof oofl folo abr bra bar rab rba abr arb bar abr abr%22%0Awords = %5Bword.strip() for word in words.split(%22 %22)%5D%0A%0Aanagrams = %7B%7D%0A%0Afor word in words:%0A sorted_word = ''.join(sorted(word))%0A anagrams%5Bsorted_word%5D = anagrams.get...
f830c778fd06e1548da0b87aafa778834005c64e
Add fls simprocedures
angr/procedures/win32/fiber_local_storage.py
angr/procedures/win32/fiber_local_storage.py
Python
0
@@ -0,0 +1,1644 @@ +import angr%0A%0AKEY = 'win32_fls'%0A%0Adef mutate_dict(state):%0A d = dict(state.globals.get(KEY, %7B%7D))%0A state.globals%5BKEY%5D = d%0A return d%0A%0Adef has_index(state, idx):%0A if KEY not in state.globals:%0A return False%0A return idx in state.globals%5BKEY%5D%0A%0Acla...
1bda23c9e6fee7815617a8ad7f64c80a32e223c5
Add script for jira story point report.
scripts/jira.py
scripts/jira.py
Python
0
@@ -0,0 +1,2346 @@ +#!/usr/bin/python%0A%0Aimport sys%0Aimport os%0Aimport requests%0Aimport urllib%0A%0A%0Ag_user = None%0Ag_pass = None%0Ag_sprint = None%0A%0A%0Adef usage():%0A print(%22%22)%0A print(%22usage: %22 + g_script_name + %22 --user username --pass password --sprint sprintname%22)%0A print(%22%22...
a24095964e32da33ea946b3c28bdc829a505585d
Add lidar example
lidar.py
lidar.py
Python
0.000001
@@ -0,0 +1,1563 @@ +%22%22%22 Copyright 2021 CyberTech Labs Ltd.%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...
da7ac24484b75c8ea29c300aa46c42f0fdd9519d
fix for sentry-113947841
src/sentry/receivers/onboarding.py
src/sentry/receivers/onboarding.py
from __future__ import print_function, absolute_import from django.db import IntegrityError, transaction from django.utils import timezone from sentry.models import ( OnboardingTask, OnboardingTaskStatus, OrganizationOnboardingTask ) from sentry.plugins import IssueTrackingPlugin, NotificationPlugin from sentry.s...
Python
0.000002
@@ -3303,17 +3303,21 @@ oot.data -%5B +.get( 'platfor @@ -3318,17 +3318,33 @@ latform' -%5D +, group.platform) != grou
ccf1fb5d5ef1e2b12bc49afd260b1d2d0a166a43
Prepare v2.20.7.dev
flexget/_version.py
flexget/_version.py
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
Python
0.000003
@@ -442,7 +442,11 @@ .20. -6 +7.dev '%0A
950e6b975323293ed8b73a5ffe8448072e0dac27
Fix downloader
support/download.py
support/download.py
# A file downloader. import contextlib, os, tempfile, timer, urllib2, urlparse class Downloader: def __init__(self, dir=None): self.dir = dir # Downloads a file and removes it when exiting a block. # Usage: # d = Downloader() # with d.download(url) as f: # use_file(f) def download(self, url, c...
Python
0.000001
@@ -1312,14 +1312,8 @@ -pass # os.r
570aaad3da93f9252efb787a58bbe5151eff93d4
Create run_ToolKit.py
0.0.5/run_ToolKit.py
0.0.5/run_ToolKit.py
Python
0.000002
@@ -0,0 +1,86 @@ +# run_ToolKit.py%0Afrom modulos import main%0A%0Aif __name__ == %22__main__%22:%0A main.main()%0A
857ccf7f6cfed4e8663d635c119f8683c9ee09e0
Add random choice plugin (with_random_choice)
lib/ansible/runner/lookup_plugins/random_choice.py
lib/ansible/runner/lookup_plugins/random_choice.py
Python
0
@@ -0,0 +1,1277 @@ +# (c) 2012, Michael DeHaan %3Cmichael.dehaan@gmail.com%3E%0A#%0A# This file is part of Ansible%0A#%0A# Ansible is free software: you can redistribute it and/or modify%0A# it under the terms of the GNU General Public License as published by%0A# the Free Software Foundation, either version 3 of the Li...
b3f91806b525ddef50d541f937bed539f9bae20a
Use cache backend for sessions in deployed settings.
mezzanine/project_template/deploy/live_settings.py
mezzanine/project_template/deploy/live_settings.py
DATABASES = { "default": { # Ends with "postgresql_psycopg2", "mysql", "sqlite3" or "oracle". "ENGINE": "django.db.backends.postgresql_psycopg2", # DB name or path to database file if using sqlite3. "NAME": "%(proj_name)s", # Not used with sqlite3. "USER": "%(proj_na...
Python
0
@@ -818,16 +818,75 @@ 11211%22,%0A %7D%0A%7D%0A +%0ASESSION_ENGINE = %22django.contrib.sessions.backends.cache%22%0A
62545500553443863d61d9e5ecc80307c745a227
Add migration to remove non-{entity,classifier} dimensions from the database, and to recompute cubes if necessary
migrate/20110917T143029-remove-value-dimensions.py
migrate/20110917T143029-remove-value-dimensions.py
Python
0.000001
@@ -0,0 +1,1031 @@ +import logging%0A%0Afrom openspending.lib import cubes%0Afrom openspending import migration, model, mongo%0A%0Alog = logging.getLogger(__name__)%0A%0Adef up():%0A group_args = (%7B'dataset':1%7D, %7B%7D, %7B'num': 0%7D,%0A 'function (x, acc) %7B acc.num += 1 %7D')%0A%0A before...
c599b5d470cf80b964af1b261a11540516e120df
Add Dehnen smoothing as a wrapper
galpy/potential_src/DehnenSmoothWrapperPotential.py
galpy/potential_src/DehnenSmoothWrapperPotential.py
Python
0
@@ -0,0 +1,1866 @@ +###############################################################################%0A# DehnenSmoothWrapperPotential.py: Wrapper to smoothly grow a potential%0A###############################################################################%0Afrom galpy.potential_src.WrapperPotential import SimpleWrapp...
ddc61e8158fb1dfb33b30a19f7e9cd3be8eaf3a2
add app.py
app.py
app.py
Python
0.000003
@@ -0,0 +1,141 @@ +from flask import Flask %0A %0Aapp = Flask(__name__) %0Aif __name__ == %22__main__%22: %0A%09app.run(host='0.0.0.0', port=5000, debug=True) %0A
cab4b903b986a7f8bfe4955bf80190bb7f33b012
Create bot.py
bot.py
bot.py
Python
0.000001
@@ -0,0 +1,360 @@ +# -*- coding: utf-8 -*-%0Aimport twitter_key%0Aimport tweepy%0Aimport markovtweet%0A%0Adef auth():%0A auth = tweepy.OAuthHandler(twitter_key.CONSUMER_KEY, twitter_key.CONSUMER_SECRET)%0A auth.set_access_token(twitter_key.ACCESS_TOKEN, twitter_key.ACCESS_SECRET)%0A return tweepy.API(auth)%0A%...
f1b11d2b111ef0b70f0babe6e025056ff1a68acc
Create InMoov.LeapMotionHandTracking.py
home/Alessandruino/InMoov.LeapMotionHandTracking.py
home/Alessandruino/InMoov.LeapMotionHandTracking.py
Python
0
@@ -0,0 +1,539 @@ +i01 = Runtime.createAndStart(%22i01%22,%22InMoov%22)%0A%0A#Set here the port of your InMoov Left Hand Arduino , in this case COM5%0AleftHand = i01.startLeftHand(%22COM5%22)%0A%0A#==============================%0A#Set the min/max values for fingers%0A%0Ai01.leftHand.thumb.setMinMax( 0, 61)%0Ai01.leftH...
ddf940dc932c04ebd287085ec7d035a93ac5598f
add findmyiphone flask api
ios.py
ios.py
Python
0.000001
@@ -0,0 +1,1636 @@ +from pyicloud import PyiCloudService%0A%0Afrom flask import Flask, jsonify, request, abort%0A%0A%0Aapi = PyiCloudService('nikisweeting@gmail.com')%0A%0Aapp = Flask(__name__)%0A%0A@app.route('/devices', methods=%5B'GET'%5D)%0Adef device_list():%0A devices = %5B%5D%0A for id, device in api.devic...
bb7bb2e12d3ccbb55f0b0e6db5d0cb79c3ea8079
Add missing migration for profile items.
km_api/know_me/migrations/0013_remove_profileitem_media_resource.py
km_api/know_me/migrations/0013_remove_profileitem_media_resource.py
Python
0
@@ -0,0 +1,401 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.11.3 on 2017-08-01 14:16%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('know_me', '0012_emergencyitem'),%0A %5D%0A%0A operati...
a0b9d1977b2aa2366a334231b4dd5dbe047d7122
Add testcase for Category.can_create_events
indico/modules/categories/models/categories_test.py
indico/modules/categories/models/categories_test.py
Python
0.000021
@@ -0,0 +1,1928 @@ +# This file is part of Indico.%0A# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).%0A#%0A# Indico is free software; you can redistribute it and/or%0A# modify it under the terms of the GNU General Public License as%0A# published by the Free Software Foundation; either ver...
eb54c75c0f5b7e909177777ce935358b7ac25def
Add zip and unzip to zip_file
py_sys/file/zip_file.py
py_sys/file/zip_file.py
Python
0.000001
@@ -0,0 +1,1567 @@ +# coding=utf-8%0A%0Aimport os%0Aimport zipfile%0A%0Aclass ZipFile(object):%0A%0A def __init__(self):%0A pass%0A %0A def zip(self, dir_path, zip_file):%0A file_list = %5B%5D%0A %0A def walk_dir(sub_dir):%0A for root, dirs, files in os.walk(sub_dir):%0A ...
e27b005e5dc797e2326ab175ef947021c5a85cb7
Add ptt.py
ptt.py
ptt.py
Python
0.000122
@@ -0,0 +1,1623 @@ +import telnetlib%0Aimport re%0A%0ARN = '%5Cr%5Cn'%0AC_L = '%5Cx0C'%0AC_Z = '%5Cx1A'%0AESC = '%5Cx1B'%0A%0Aclass PTT():%0A def __init__(self):%0A self.ptt = telnetlib.Telnet('ptt.cc')%0A self.where = 'login'%0A%0A def login(self, username, password, dup=False):%0A self.__wa...
eef2dff2855ef310dbdb6b864a92306cae724ed7
add missing the missing file exceptions.py
pyecharts/exceptions.py
pyecharts/exceptions.py
Python
0.000003
@@ -0,0 +1,41 @@ +class NoJsExtension(Exception):%0A pass%0A
0d3255f8a69fe5192cb36ee42a731293cfd09715
Add VmCorTaxonPhenology Class
backend/geonature/core/gn_profiles/models.py
backend/geonature/core/gn_profiles/models.py
Python
0
@@ -0,0 +1,449 @@ +from geonature.utils.env import DB%0Afrom utils_flask_sqla.serializers import serializable%0A%0A@serializable%0Aclass VmCorTaxonPhenology(DB.Model):%0A __tablename__ = %22vm_cor_taxon_phenology%22%0A __table_args__ = %7B%22schema%22: %22gn_profiles%22%7D%0A cd_ref = DB.Column(DB.Integer)%0A ...
c81342ec9fb12da819fb966d3363fb57e6262916
fix unit tests in windows xp
utest/controller/test_resource_import.py
utest/controller/test_resource_import.py
import os import unittest import datafilereader from robotide.controller.commands import AddKeyword, ChangeCellValue,\ CreateNewResource, SaveFile from robot.utils.asserts import assert_equals from robotide.controller.cellinfo import ContentType, CellType class TestResourceImport(unittest.TestCase): def set...
Python
0.000001
@@ -2633,29 +2633,26 @@ esource( -os.path +'/' .join( +%5B '..', se @@ -2658,24 +2658,25 @@ elf.res_name +%5D ))%0A s
de57220c8da35af9931ed24f7ae302cd06a00962
Fix hyperv copy file error logged incorrect
nova/virt/hyperv/pathutils.py
nova/virt/hyperv/pathutils.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Cloudbase Solutions Srl # 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.a...
Python
0
@@ -2458,16 +2458,54 @@ failed') +%0A %25 locals() )%0A%0A d
18d40200224d68b0ce93c2710516ed63566b1ad3
Add merge migration
osf/migrations/0127_merge_20180822_1927.py
osf/migrations/0127_merge_20180822_1927.py
Python
0.000001
@@ -0,0 +1,339 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.11.13 on 2018-08-22 19:27%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('osf', '0124_merge_20180816_1229'),%0A ('osf', '0126...
a55fee4515c9e6187198a8fc27ec15e7786d5782
Create utils.py
utils.py
utils.py
Python
0.000001
@@ -0,0 +1,1267 @@ +#!/usr/bin/env python%0A%0A'''Python script that must be kept with all of these plugins'''%0A%0Adef color(color, message):%0A '''color forground/background encoding IRC messages'''%0A %0A colors = %7B'white': '00', 'black': '01', 'blue': '02', 'navy': '02',%0A 'green': '03', 'r...
36e6ff93b270672e0918e5ac0d7f9698834ad6ae
add Pathfinder skeleton
game/pathfinding.py
game/pathfinding.py
Python
0
@@ -0,0 +1,413 @@ +# 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%0A%22%22%22pathfinding.py: %22%22%22%0A%0A%0Aclass Pathfinder(object):%0A def __init__(self,...
ca956d335ad6bf6e190869d98c7abb3b554dfa3d
Create TS3IdleBot.py
TS3IdleBot.py
TS3IdleBot.py
Python
0
@@ -0,0 +1,2257 @@ +import telnetlib%0Aimport time%0Afrom config import config%0A%0A%0Adef getClients():%0A print %22Getting a list of clients.%22%0A telnet.write(%22clientlist -times%5Cn%22)%0A clients = telnet.read_until(%22msg=ok%22)%0A clients = clients.replace(%22 %22, %22%5Cn%22)%0A clients = clien...
ae0ebdccfffffbad259842365712bd4b6e52fc8e
add test files for HDF5 class and read_feats function
sprocket/util/tests/test_hdf5.py
sprocket/util/tests/test_hdf5.py
Python
0
@@ -0,0 +1,1187 @@ +from __future__ import division, print_function, absolute_import%0A%0Aimport os%0Aimport unittest%0A%0Aimport numpy as np%0Afrom sprocket.util.hdf5 import HDF5, read_feats%0A%0Adirpath = os.path.dirname(os.path.realpath(__file__))%0Alistf = os.path.join(dirpath, '/data/test.h5')%0A%0Aclass hdf5Funct...
26fcbefee171f8d56504a7eba121027f0c5be8b5
Add migration for new overrides table
lms/djangoapps/grades/migrations/0013_persistentsubsectiongradeoverride.py
lms/djangoapps/grades/migrations/0013_persistentsubsectiongradeoverride.py
Python
0
@@ -0,0 +1,1120 @@ +# -*- 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 ('grades', '0012_computegradessetting'),%0A %5D%0A%0A operations = %5B%0A migrations.Creat...
e5d3fea99d58a1b02ebe84148d63330ea8d5c3a0
Create WordLadder.py
WordLadder.py
WordLadder.py
Python
0
@@ -0,0 +1,299 @@ +'''%0AGiven a source word, target word and an English dictionary, transform the source word to target by %0Achanging/adding/removing 1 character at a time, while all intermediate words being valid English words. %0AReturn the transformation chain which has the smallest number of intermediate words.%0...
4ba2f92a9712530d084823dae52f54167f2f3afb
fix test source to work with empty msgs
new_pmlib/TestSimpleSource.py
new_pmlib/TestSimpleSource.py
#========================================================================= # TestSimpleSource #========================================================================= # This class will output messages on a val/rdy interface from a # predefined list. # from new_pymtl import * from ValRdyBundle import OutValRdyBund...
Python
0
@@ -922,16 +922,37 @@ .reset:%0A + if s.msgs:%0A @@ -1132,32 +1132,53 @@ len(s.msgs) ):%0A + if s.msgs:%0A s.out.ms
75aabd425bd32a9467d7a06b250a0a5b1f5ba852
Add more comments
application/serializer.py
application/serializer.py
Python
0
@@ -0,0 +1,578 @@ +'''%0AThis module maps the data that will be used by the marshall when returning the%0Adata to the user%0A'''%0A%0Afrom flask_restful import fields%0A%0Abucket_list_item_serializer = %7B%0A 'item_id': fields.Integer,%0A 'name': fields.String,%0A 'date_created': fields.DateTime,%0A 'date_m...
da0f31d6ca5aa8f425c86b9c0caf965f062e1dba
test buying max clicks and gen clicks in the same test
functional-tests/suite6.py
functional-tests/suite6.py
Python
0
@@ -0,0 +1,990 @@ +from clickerft.cft import Cft%0Afrom time import sleep%0A%0A%0Aclass Suite4(Cft):%0A%0A def test_buy_target_max_and_gen(self):%0A %22%22%22%0A buy clicks until we have 50 max clicks of 50%0A and 10 clicks/sec%0A %22%22%22%0A targetGen = 4%0A while int(sel...
158f04702b6c1dcda9981d8da05fe059e84c3f90
Add example with churches.
examples/churches.py
examples/churches.py
Python
0
@@ -0,0 +1,545 @@ +# -*- coding: utf-8 -*-%0A'''%0AThis script demonstrates using the AATProvider to get the concept of%0AChurches.%0A'''%0A%0Afrom skosprovider_getty.providers import AATProvider%0A%0Aaat = AATProvider(metadata=%7B'id': 'AAT'%7D)%0A%0Achurches = aat.get_by_id(300007466)%0A%0Alang = %5B'en', 'nl', 'es',...
7c82a2a8887d25ef86e5d0004cf0a0e0bc4b23ac
Create CodingContestTorontoParkingTickets2013.py
CodingContestTorontoParkingTickets2013.py
CodingContestTorontoParkingTickets2013.py
Python
0.000001
@@ -0,0 +1,1083 @@ +import re%0Afrom collections import defaultdict%0A%0Aprocessed_data = defaultdict(int) # dict to capture reduced dataset info, default value == 0%0Aonly_chars = re.compile('%5CD+').search # pre-compiled reg-exp, for fast run time, to get street name, ignoring numbers%0A%0A# import raw data file with...
f8ee383cc3b3f1f9166627e81a64af4939e4de10
add amqp style routing for virtual channels, allows memory backend to behave like amqp
example/topic.py
example/topic.py
Python
0
@@ -0,0 +1,2726 @@ +from kombu.connection import BrokerConnection%0Afrom kombu.messaging import Exchange, Queue, Consumer, Producer%0A%0A# configuration, normally in an ini file%0Aexchange_name = %22test.shane%22%0Aexchange_type = %22topic%22%0Aexchange_durable = True%0Amessage_serializer = %22json%22%0Aqueue_name = %2...
aff827e9cc02bcee6cf8687e1dff65f39daaf6c6
Add a failing test to the landing page to check for upcoming events.
workshops/test/test_landing_page.py
workshops/test/test_landing_page.py
Python
0
@@ -0,0 +1,978 @@ +from django.core.urlresolvers import reverse%0Afrom django.test import TestCase%0Afrom mock import patch%0Afrom datetime import date%0A%0Aclass FakeDate(date):%0A %22A fake replacement for date that can be mocked for testing.%22%0A pass%0A%0A @classmethod%0A def today(cls):%0A retu...
91918be596c83f468c6c940df7326896aa6082e7
Fix stringify on multichoice forms
adagios/forms.py
adagios/forms.py
# -*- coding: utf-8 -*- from django.utils.encoding import smart_str from django import forms class AdagiosForm(forms.Form): """ Base class for all forms in this module. Forms that use pynag in any way should inherit from this one. """ def clean(self): cleaned_data = {} tmp = super(AdagiosFo...
Python
0.000004
@@ -541,28 +541,17 @@ ta%5Bk%5D = -smart_str(v) +v %0A
cb7bb1d9f24706f3cce2e9841595ee80ce7e2c7f
Implement GetKeyboardType
angr/procedures/win_user32/keyboard.py
angr/procedures/win_user32/keyboard.py
Python
0
@@ -0,0 +1,376 @@ +import angr%0A%0Aclass GetKeyboardType(angr.SimProcedure):%0A def run(self, param):%0A # return the values present at time of author's testing%0A if self.state.solver.is_true(param == 0):%0A return 4%0A if self.state.solver.is_true(param == 1):%0A return ...
8692557a3389403b7a3450065d99e3750d91b2ed
Create views.py
pagination_bootstrap/views.py
pagination_bootstrap/views.py
Python
0
@@ -0,0 +1 @@ +%0A
84bf9d04a2bef01a0cd1ffc7db156c0e70f27b91
Disable tests requiring pairing
test/client/audio_consumer_test.py
test/client/audio_consumer_test.py
# Copyright 2016 Mycroft AI, Inc. # # This file is part of Mycroft Core. # # Mycroft Core is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
Python
0.000001
@@ -6040,32 +6040,101 @@ tate.sleeping)%0A%0A + @unittest.skip('Disabled while unittests are brought upto date')%0A def test_sto @@ -6768,32 +6768,101 @@ utterances%5B0%5D)%0A%0A + @unittest.skip('Disabled while unittests are brought upto date')%0A def test_rec
060c6d2eeea2235cda955c873b50e0aa2a4accd0
use 20
farmer/models.py
farmer/models.py
#coding=utf8 import os import time import json from datetime import datetime from commands import getstatusoutput from django.db import models class Job(models.Model): # hosts, like web_servers:host1 . inventories = models.TextField(null = False, blank = False) # 0, do not use sudo; 1, use sudo . s...
Python
0.99981
@@ -802,16 +802,22 @@ '--sudo +-f 20 -m shell @@ -825,16 +825,22 @@ -a' or ' +-f 20 -m shell
799109759114d141d71bed777b9a1ac2ec26a264
add Red object detection
python/ObjectDetection/RedExtractObject.py
python/ObjectDetection/RedExtractObject.py
Python
0.000002
@@ -0,0 +1,683 @@ +import cv2%0Aimport numpy as np%0A%0Avideo = cv2.VideoCapture(0)%0A%0Awhile (1):%0A%0A # Take each frame%0A _, frame = video.read()%0A # Convert BGR to HSV%0A hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)%0A%0A # define range of blue color in HSV%0A lower_red = np.array(%5B150, 50, 5...
21490bd6cd03d159a440b2c13a6b4641c789c954
Add example
examples/example.py
examples/example.py
Python
0.000003
@@ -0,0 +1,1493 @@ +import sys%0A%0Afrom tumblpy import Tumblpy%0A%0Akey = raw_input('App Consumer Key: ')%0Asecret = raw_input('App Consumer Secret: ')%0A%0Aif not 'skip-auth' in sys.argv:%0A t = Tumblpy(key, secret)%0A%0A callback_url = raw_input('Callback URL: ')%0A%0A auth_props = t.get_authentication_toke...
ece6fb4561e338e32e8527a068cd386f00886a67
Add example with reuters dataset.
examples/reuters.py
examples/reuters.py
Python
0
@@ -0,0 +1,1979 @@ +%22%22%22shell%0A!pip install -q -U pip%0A!pip install -q -U autokeras==1.0.8%0A!pip install -q git+https://github.com/keras-team/keras-tuner.git@1.0.2rc1%0A%22%22%22%0A%0A%22%22%22%0ASearch for a good model for the%0A%5BReuters%5D(https://keras.io/ja/datasets/#_5) dataset.%0A%22%22%22%0A%0Aimport t...
315914bbec88e11bf5ed3bcab29218592549eccf
Create Kmeans.py
Kmeans.py
Kmeans.py
Python
0
@@ -0,0 +1,2043 @@ +import collections%0Afrom nltk import word_tokenize%0Afrom nltk.corpus import stopwords%0Afrom nltk.stem import PorterStemmer%0Afrom sklearn.cluster import KMeans%0Afrom sklearn.feature_extraction.text import TfidfVectorizer%0Afrom pprint import pprint%0Aimport csv%0Aimport pandas%0A%0Adef word_toke...
b0377568c9b927db588b006b7312cbe8ed9d48b7
Add tremelo example
examples/tremelo.py
examples/tremelo.py
Python
0.000358
@@ -0,0 +1,725 @@ +# Author: Martin McBride%0A# Created: 2016-01-08%0A# Copyright (C) 2016, Martin McBride%0A# License: MIT%0A# Website sympl.org/pysound%0A#%0A# Square wave example%0A%0A%0Atry:%0A import pysound%0Aexcept ImportError:%0A # if pysound is not installed append parent dir of __file__ to sys.path%0A ...
ea26478495d5aec6925e32c9a87245bf2e1e4bc8
Add script demonstrating raising and catching Exceptions.
rps/errors.py
rps/errors.py
Python
0
@@ -0,0 +1,383 @@ +gestures = %5B%22rock%22, %22paper%22, %22scissors%22%5D%0A%0Adef verify_move(player_move):%0A if player_move not in gestures:%0A raise Exception(%22Wrong input!%22)%0A return player_move%0A%0A# let's catch an exception%0Atry:%0A player_move = verify_move(input(%22%5Brock,paper,scisso...
ecb3bd6fd9b6496a751a2145909648ba1be8f908
add linear interpolation tests
isochrones/tests/test_interp.py
isochrones/tests/test_interp.py
Python
0.000001
@@ -0,0 +1,1095 @@ +import itertools%0Aimport logging%0A%0Aimport numpy as np%0Aimport pandas as pd%0Afrom scipy.interpolate import RegularGridInterpolator%0A%0Afrom isochrones.interp import DFInterpolator%0A%0Adef test_interp():%0A xx, yy, zz = %5Bnp.arange(10 + np.log10(n))*n for n in %5B1, 10, 100%5D%5D%0A%0A ...
947c9ef100686fa1ec0acaa10bc49bf6c785665b
Use unified class for json output
ffflash/container.py
ffflash/container.py
Python
0.000011
@@ -0,0 +1,1299 @@ +from os import path%0A%0Afrom ffflash import RELEASE, log, now, timeout%0Afrom ffflash.lib.clock import epoch_repr%0Afrom ffflash.lib.data import merge_dicts%0Afrom ffflash.lib.files import read_json_file, write_json_file%0A%0A%0Aclass Container:%0A def __init__(self, spec, filename):%0A s...
6c5dad5d617892a3ea5cdd20cbaef89189307195
add simple content-based model for coldstart
polara/recommender/coldstart/models.py
polara/recommender/coldstart/models.py
Python
0
@@ -0,0 +1,809 @@ +import numpy as np%0Afrom polara.recommender.models import RecommenderModel%0A%0A%0Aclass ContentBasedColdStart(RecommenderModel):%0A def __init__(self, *args, **kwargs):%0A super(ContentBasedColdStart, self).__init__(*args, **kwargs)%0A self.method = 'CB'%0A self._key = '%7B%...
2ca6b22e645cbbe63737d4ac3929cb23700a2e06
Prepare v1.2.342.dev
flexget/_version.py
flexget/_version.py
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
Python
0.000002
@@ -439,11 +439,15 @@ '1.2.34 -1 +2.dev '%0A
edbc9f2c31f98e1447c352058aa05e6884a0927b
Create fold_eigenvalues.py
fold_eigenvalues.py
fold_eigenvalues.py
Python
0.000002
@@ -0,0 +1,1222 @@ +#Definition of inputs and outputs%0A#==================================%0A##%5BMes scripts GEOL%5D=group%0A##entree=vector%0A##dip_dir=field entree%0A##dip=field entree%0A%0A#Algorithm body%0A#==================================%0Afrom qgis.core import *%0Afrom apsg import *%0A%0A%0Alayer = processin...
f55771da6a617c71f2eb620c11fb54e033c64338
Migrate upload-orange-metadata process type
resolwe_bio/migrations/0002_metadata_table_type.py
resolwe_bio/migrations/0002_metadata_table_type.py
Python
0
@@ -0,0 +1,464 @@ +from django.db import migrations%0A%0Afrom resolwe.flow.migration_ops import ResolweProcessChangeType%0A%0A%0Aclass Migration(migrations.Migration):%0A %22%22%22%0A Change the %60%60upload-orange-metadata%60%60 process type.%0A %22%22%22%0A%0A dependencies = %5B%0A (%22resolwe_bio%...
4170807e4a1c70eef6416fe3f1661c9c1c99a9da
Add pysal test
tests/test_pysal.py
tests/test_pysal.py
Python
0.000026
@@ -0,0 +1,176 @@ +import unittest%0A%0Afrom pysal.weights import lat2W%0A%0Aclass TestPysal(unittest.TestCase):%0A def test_distance_band(self):%0A w = lat2W(4,4)%0A self.assertEqual(16, w.n)
69db5c70e6ba9cc5af2910f08a6e2c4421397ead
Fix path joining on Windows
tests/test_types.py
tests/test_types.py
# -*- coding: utf-8 -*- from subprocess import PIPE from mock import Mock from pathlib import Path import pytest from tests.utils import CorrectedCommand, Rule, Command from thefuck import const from thefuck.exceptions import EmptyCommand class TestCorrectedCommand(object): def test_equality(self): asse...
Python
0
@@ -18,16 +18,26 @@ -8 -*-%0A%0A +import os%0A from sub @@ -1484,16 +1484,77 @@ =True))%0A + rule_path = os.path.join(os.sep, 'rules', 'bash.py')%0A @@ -1580,32 +1580,25 @@ th(Path( -'/ rule -s/bash.py' +_path )) %5C%0A @@ -1719,24 +1719,17 @@ h', -'/ rule -s/bash.py' +_path )%0A%0A
484a2bf0c28aa2bbc910ca20849840bf518d4329
Add utils.banners test case
tests/test_utils.py
tests/test_utils.py
Python
0.000001
@@ -0,0 +1,880 @@ +# Foremast - Pipeline Tooling%0A#%0A# Copyright 2016 Gogo, 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/lic...
45efbbdfd62cd0f9f8232bfd7ebd1aae0ac6cd17
Create humidity.py
abstractions/sensor/humidity/humidity.py
abstractions/sensor/humidity/humidity.py
Python
0.001003
@@ -0,0 +1,843 @@ +# This code has to be added to __init__.py in folder .../devices/sensor%0A%0Aclass Humidity():%0A def __family__(self):%0A return %22Humidity%22%0A%0A def __getHumidity__(self):%0A raise NotImplementedError%0A%0A @api(%22Humidity%22, 0)%0A @request(%22GET%22, %22sensor/hum...
c9bd5ba167284d79ae0cbe7aaaf9ec8536bef918
add hiprec.py
benchexec/tools/hiprec.py
benchexec/tools/hiprec.py
Python
0.002017
@@ -0,0 +1,2827 @@ +#!/usr/bin/env python%0A%22%22%22%0ABenchExec is a framework for reliable benchmarking.%0AThis file is part of BenchExec.%0A%0ACopyright (C) 2007-2015 Dirk Beyer%0AAll rights reserved.%0A%0ALicensed under the Apache License, Version 2.0 (the %22License%22);%0Ayou may not use this file except in com...
d726fd9b05b846097ee877ad0897f8416dbceaf7
Add missing __init__
gallery/__init__.py
gallery/__init__.py
Python
0.998696
@@ -0,0 +1,23 @@ +from .gallery import *%0A
f8da70b177fff3d87e55ecd9972c7a5e6deea964
Fix to documentation in function.py
blaze/compute/function.py
blaze/compute/function.py
""" The purpose of this module is to create blaze functions. A Blaze Function carries a polymorphic signature which allows it to verify well-typedness over the input arguments, and to infer the result of the operation. Blaze function also create a deferred expression graph when executed over operands. A blaze function...
Python
0.000014
@@ -1674,16 +1674,166 @@ plugin.%0A + name : string%0A The name of the function (e.g. %22sin%22).%0A module : string%0A The name of the module the function is in (e.g. %22blaze%22)%0A full @@ -1894,16 +1894,35 @@ function + (e.g. %22blaze.sin%22) .%0A%0A %22
c206969facfc0e46d7ec4d3f60ce2e6a07956dbd
Use filfinder to get the average radial width of features in the moment 0
14B-088/HI/analysis/run_filfinder.py
14B-088/HI/analysis/run_filfinder.py
Python
0
@@ -0,0 +1,1257 @@ +%0Afrom fil_finder import fil_finder_2D%0Afrom basics import BubbleFinder2D%0Afrom spectral_cube.lower_dimensional_structures import Projection%0Afrom astropy.io import fits%0Afrom radio_beam import Beam%0Afrom astropy.wcs import WCS%0Aimport astropy.units as u%0Aimport matplotlib.pyplot as p%0A%0A'...
da2de3d9d4b36bf2068dbe5b80d785748f532292
Add __init__.py for the schedule package
pygotham/schedule/__init__.py
pygotham/schedule/__init__.py
Python
0
@@ -0,0 +1,24 @@ +%22%22%22Schedule package.%22%22%22%0A
da5fed886d519b271a120820668d21518872f52c
Remove Duplicates from Sorted Array problem
remove_duplicates_from_sorted_array.py
remove_duplicates_from_sorted_array.py
Python
0
@@ -0,0 +1,939 @@ +'''%0AGiven a sorted array, remove the duplicates in place such that each element appear only once and return the new length.%0A%0ADo not allocate extra space for another array, you must do this in place with constant memory.%0A%0AFor example,%0AGiven input array A = %5B1,1,2%5D,%0A%0AYour function s...
14302f83d755d2319a00db123dab14b300c8c93f
Add python patch script
patch.py
patch.py
Python
0.000001
@@ -0,0 +1,1914 @@ +import json%0Aimport subprocess%0A%0A# This script will:%0A# - read current version%0A# - increment patch version%0A# - update version in a few places%0A# - insert new line in ripme.json with message%0A%0Amessage = raw_input('message: ')%0A%0Awith open('ripme.json') as dataFile:%0A ripmeJson = js...
048e6960d9e6408ef5dbfad2e32d2d1768ead1da
set P(A)
pb151.py
pb151.py
Python
0.999995
@@ -0,0 +1,1181 @@ +import math%0Aimport time%0Aimport random%0A%0At1 = time.time()%0A%0A# A1:16%0A# A2:8%0A# A3:4%0A# A4:2%0A# A5:1%0A'''%0Adef getRandom(n):%0A return random.randint(1,n)%0A%0Adef getbatch(env,l):%0A i = getRandom(l)-1%0A t = env%5Bi%5D%0A env.pop(i)%0A if t == 1:%0A return env%0...
0127670f04006997bc4d22c8015588c51bd5785e
Replace basestring with six.string_types
troveclient/auth.py
troveclient/auth.py
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
Python
0.999709
@@ -683,16 +683,28 @@ ptions%0A%0A +import six%0A%0A %0Adef get @@ -896,18 +896,24 @@ me, -base +six. string +_types ):%0A
f0684a5bb5860c2b9caffefb47dc55781092819e
Add eTools engine
searx/engines/etools.py
searx/engines/etools.py
Python
0.000001
@@ -0,0 +1,1314 @@ +%22%22%22%0A eTools (Web)%0A%0A @website https://www.etools.ch%0A @provide-api no%0A @using-api no%0A @results HTML%0A @stable no (HTML can change)%0A @parse url, title, content%0A%22%22%22%0A%0Afrom lxml import html%0Afrom searx.engines.xpath import extract_text%0Afrom se...
4523621d2dd8913cb9c4156bf20e800652318a9d
add whileloop
whileloop.py
whileloop.py
Python
0.000009
@@ -0,0 +1,44 @@ +a = 1%0Awhile a %3C 10:%0A print (a)%0A a = a+1%0A
bd7a84353b298ad14634e5c9a7b442146e9bfeeb
Create __init__.py
kesh/__init__.py
kesh/__init__.py
Python
0.000429
@@ -0,0 +1,20 @@ +# Empty __init__.py%0A
11f47fcad839b198d134f34b4489537360703a07
Add helpers.py
ckanext/orgdashboards/tests/helpers.py
ckanext/orgdashboards/tests/helpers.py
Python
0.000015
@@ -0,0 +1,984 @@ +from ckan.tests import factories%0A%0A%0Adef create_mock_data(**kwargs):%0A mock_data = %7B%7D%0A%0A mock_data%5B'organization'%5D = factories.Organization()%0A mock_data%5B'organization_name'%5D = mock_data%5B'organization'%5D%5B'name'%5D%0A mock_data%5B'organization_id'%5D = mock_data%5...
46e1afd7faae8bd8c62f6b4f5c01322804e68163
add script to visualize simulation coefficient (us, g, us')
Modules/Biophotonics/python/iMC/script_visualize_simulation_coefficients.py
Modules/Biophotonics/python/iMC/script_visualize_simulation_coefficients.py
Python
0
@@ -0,0 +1,2123 @@ +'''%0ACreated on Sep 22, 2015%0A%0A@author: wirkert%0A'''%0A%0Aimport math%0A%0Aimport numpy as np%0Aimport matplotlib.pyplot as plt%0A%0Afrom mc.usuag import UsG%0A%0Aif __name__ == '__main__':%0A # set up plots%0A f, axarr = plt.subplots(1, 4)%0A usplt = axarr%5B0%5D%0A usplt.grid()%0A...
9429183c1d3ba6f41eb0d5f84b0ca6ed35363b9d
Fix typo in 'Libs.private'
mesonbuild/modules/pkgconfig.py
mesonbuild/modules/pkgconfig.py
# Copyright 2015 The Meson development team # 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 agreed to ...
Python
0
@@ -2968,147 +2968,8 @@ )))%0A - if len(priv_libs) %3E 0:%0A ofile.write(%0A 'Libraries.private: %7B%7D%5Cn'.format(' '.join(priv_libs)))%0A @@ -3734,16 +3734,162 @@ e('%5Cn')%0A + if len(priv_libs) %3E 0:%0A ofile.write(%0A ...
b9c9a1f5cfea61050803ecc442232f2f8b4d7011
Create yaml2json.py
yaml2json.py
yaml2json.py
Python
0.000002
@@ -0,0 +1,156 @@ +#!/usr/bin/python%0A%0Aimport sys%0Aimport yaml%0Aimport json%0A%0Aif __name__ == '__main__':%0A content = yaml.load(sys.stdin)%0A print json.dumps(content, indent=2)%0A %0A
7714b3c640a3d6d7fae9dba3496adfddd9354e0e
Add CFFI binding generator
build_wide.py
build_wide.py
Python
0
@@ -0,0 +1,950 @@ +import cffi%0A%0Affibuilder = cffi.FFI()%0A%0Affibuilder.set_source(%0A '_wide',%0A r%22%22%22%0A #include %22wide.c%22%0A %22%22%22,%0A extra_compile_args=%5B'-Werror', '-fno-unwind-tables', '-fomit-frame-pointer'%5D,%0A)%0A%0Affibuilder.cdef(%0A r%22%22%22%0A typedef uint32_t w...
a7f90fcdffd6108a6b0e07c1bd7a32ac00a9642b
Fix cwltest for checking bare paths.
cwltool/cwltest.py
cwltool/cwltest.py
#!/usr/bin/env python import argparse import json import os import subprocess import sys import shutil import tempfile import yaml import pipes import logging import schema_salad.ref_resolver _logger = logging.getLogger("cwltest") _logger.addHandler(logging.StreamHandler()) _logger.setLevel(logging.INFO) UNSUPPORTED...
Python
0
@@ -492,16 +492,17 @@ if not +( b%5B%22path%22 @@ -528,16 +528,70 @@ %22path%22%5D) + or (%22/%22 not in b%5B%22path%22%5D and a%5B%22path%22%5D == b%5B%22path%22%5D)) :%0A
bc22cd37a62a4e8e9dbfa677a9b3f70b546f1850
Align dict values
jedihttp/handlers.py
jedihttp/handlers.py
# Copyright 2015 Cedraro Andrea <a.cedraro@gmail.com> # 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.000001
@@ -1862,32 +1862,38 @@ 'module_path': + definition.modu @@ -1915,32 +1915,45 @@ 'line': + definition.line @@ -1970,32 +1970,43 @@ 'column': + definition.colu @@ -2097,32 +2097,39 @@ 'is_keyword': + definition.is_k @@ -2157,32 +2157,38 @@ 'descrip...
6610483e55f5371d5dcfe06e984f791c3f051e4a
fix InMoov launching button
src/main/resources/resource/Intro/InMoov01_start.py
src/main/resources/resource/Intro/InMoov01_start.py
Python
0
@@ -0,0 +1,275 @@ +#########################################%0A# InMoov01_start.py%0A# categories: inmoov%0A# more info @: http://myrobotlab.org/service/InMoov%0A#########################################%0A# uncomment for virtual hardware%0A# Platform.setVirtual(True)%0Ai01 = Runtime.start('i01', 'InMoov2')
9ba00cc698a5ce38d8cfb8eb6e921df0e24525cc
Create netstew.py
netstew.py
netstew.py
Python
0.000005
@@ -0,0 +1,198 @@ +#!/opt/anaconda/bin/python2.7%0A# Print the links to stndard out.%0A%0Afrom bs4 import BeautifulSoup%0A%0Asoup = BeautifulSoup(open(%22index.html%22))%0A%0Afor link in soup.find_all('a'):%0A print(link.get('href'))%0A
2e3af241d989bf2b62bba5e344240246e8ff516b
add leave module
modules/leave.py
modules/leave.py
Python
0.000001
@@ -0,0 +1,628 @@ +class LeaveModule:%0A%09def __init__(self, circa):%0A%09%09self.circa = circa%0A%0A%09def onload(self):%0A%09%09self.circa.add_listener(%22cmd.leave%22, self.leave)%0A%09%09self.circa.add_listener(%22cmd.goaway%22, self.leave)%0A%09%09self.circa.add_listener(%22cmd.quit%22, self.quit)%0A%0A%09def onu...
3411020a0445afcb626e7079ae2f4d17a02d27a0
Add simple YTid2AmaraID mapper.
map_ytid2amaraid.py
map_ytid2amaraid.py
Python
0
@@ -0,0 +1,2647 @@ +#!/usr/bin/env python3%0Aimport argparse, sys%0Afrom pprint import pprint%0Afrom amara_api import *%0Afrom utils import answer_me%0A%0Adef read_cmd():%0A %22%22%22Function for reading command line options.%22%22%22%0A desc = %22Program for mapping YouTube IDs to Amara IDs. If given video is not ...
04b08344d1a6305734d749bb77bc4de095c32f55
Fix UnboundLocalError
vint/linting/cli.py
vint/linting/cli.py
import sys from argparse import ArgumentParser import pkg_resources import logging from vint.linting.linter import Linter from vint.linting.env import build_environment from vint.linting.config.config_container import ConfigContainer from vint.linting.config.config_cmdargs_source import ConfigCmdargsSource from vint.l...
Python
0.000003
@@ -1027,77 +1027,74 @@ -if len(violations) == 0:%0A parser = self._build_argparser() +parser = self._build_argparser()%0A%0A if len(violations) == 0: %0A
9fef390248387e02498d18ab7bba5b23e3632c7b
Add missing file
api/constants.py
api/constants.py
Python
0.000006
@@ -0,0 +1,263 @@ +QUERY_PARAM_QUERY = 'q'%0AQUERY_PARAM_SORT = 's'%0AQUERY_PARAM_SIZE = 'size'%0AQUERY_PARAM_PAGE = 'page'%0AQUERY_PARAM_FIELDS = 'fields'%0AQUERY_PARAM_OFFSET = 'offset'%0AQUERY_PARAM_INCLUDE = 'include'%0AQUERY_PARAM_EXCLUDE = 'exclude'%0AQUERY_PARAM_WAIT_UNTIL_COMPLETE = 'wuc'%0A
8f9c979fc2936d53321a377c67cbf2e3b4667f95
Create status_light.py
status_light.py
status_light.py
Python
0.000001
@@ -0,0 +1,1625 @@ +import time%0A%0Aclass StatusLight(object):%0A %0A%09%22%22%22available patterns for the status light%22%22%22%0A%09patterns = %7B%0A%09%09'blink_fast' : (.1, %5BFalse, True%5D),%0A%09%09'blink' : (.5, %5BFalse, True%5D),%0A%09%7D%0A%0A%09%22%22%22placeholder for pattern to tenmporarily interrupt%0...
dcced707c40c6a970d19dfca496dc86e38e8ea3c
Increments version to 0.2.2
deltas/__init__.py
deltas/__init__.py
from .apply import apply from .operations import Operation, Insert, Delete, Equal from .algorithms import segment_matcher, SegmentMatcher from .algorithms import sequence_matcher, SequenceMatcher from .tokenizers import Tokenizer, RegexTokenizer, text_split, wikitext_split from .segmenters import Segmenter, Segment, Ma...
Python
0.999289
@@ -352,7 +352,7 @@ 0.2. -1 +2 %22%0A
a4ad0ffbda8beb4c2ea4ef0d181ec9ef0de3d1e1
add the md5 by python
SystemInfo/1_hashlib.py
SystemInfo/1_hashlib.py
Python
0.000218
@@ -0,0 +1,291 @@ +#!/usr/bin/python%0A#-*- coding:utf-8 -*-%0Aimport hashlib%0Aimport sys%0A%0Adef md5sum(f):%0A%09m = hashlib.md5()%0A%09with open(f) as fd:%0A%09%09while True:%0A%09%09%09data = fd.read(4096)%0A%09%09%09if data:%0A%09%09%09%09m.update(data)%0A%09%09%09else:%0A%09%09%09%09break%0A%09return m.hexdigest...