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
74df88d572c8b6efabcde5e1803245d1bf31cc39
Switch to GitHub-esque event names
src/sentry/models/auditlogentry.py
src/sentry/models/auditlogentry.py
""" sentry.models.auditlogentry ~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, print_function from django.db import models from django.utils import timezone from django.uti...
Python
0.00007
@@ -932,45 +932,101 @@ t = -BoundedPositiveIntegerField(choices=( +models.CharField(max_length=64, choices=(%0A # We emulate github a bit with event naming %0A @@ -1072,16 +1072,19 @@ _(' -I +org.i nvite -d +- memb @@ -1137,14 +1137,16 @@ _(' -Added +org.add- memb @@ -1202,18 +1202,20 @@ _(' -A ...
2457eaf72e0379d0e8915906ba7f7faa9b3f2f03
add plotter for glitch offset
code/plot_glitchOffset.py
code/plot_glitchOffset.py
Python
0
@@ -0,0 +1,646 @@ +#!/bin/python%0A%0Aimport matplotlib as mpl%0Aimport matplotlib.pyplot as plt%0Aimport matplotlib.cbook as cbook%0Aimport numpy as np%0Aimport math%0A%0Adata = np.genfromtxt('GlitchOffsetOut.txt', delimiter=' ', skip_header=1,%0A%09skip_footer=1, names=%5B'time', 'north', 'east'%5D)%0A%0Afig = plt.fi...
526faad8c83d1385cc31ed3db85249a9f5882893
Create myproject.py
myproject.py
myproject.py
Python
0.000002
@@ -0,0 +1,204 @@ +from flask import Flask, render_template%0Aapp = Flask(__name__)%0A%0A@app.route(%22/%22)%0Adef home():%0A return render_template(%22home.html%22)%0A %0Aif __name__ == %22__main__%22:%0A app.run(host='0.0.0.0', debug=True)%0A
c6fbea313571cff4383ce57c689e5aac25537144
add command to run VCLWriter
run_vcl_writer.py
run_vcl_writer.py
Python
0.000008
@@ -0,0 +1,820 @@ +# Copyright 2014 varnishapi authors. All rights reserved.%0A# Use of this source code is governed by a BSD-style%0A# license that can be found in the LICENSE file.%0A%0Aimport argparse%0A%0Afrom feaas import api, vcl_writer%0A%0A%0Adef run(storage):%0A parser = argparse.ArgumentParser(%22VCL Write...
c7fcd98cadb4e2e6929161b886eb6f942553ce81
Test the temperature returned by RM2 (#6205)
homeassistant/components/sensor/broadlink.py
homeassistant/components/sensor/broadlink.py
""" Support for the Broadlink RM2 Pro (only temperature) and A1 devices. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.broadlink/ """ from datetime import timedelta import binascii import logging import socket import voluptuous as vol from home...
Python
0
@@ -1069,16 +1069,17 @@ e', ' '%5D +, %0A%7D%0A%0APLAT @@ -3591,16 +3591,373 @@ timeout%0A + self._schema = vol.Schema(%7B%0A vol.Optional('temperature'): vol.Range(min=-50, max=150),%0A vol.Optional('humidity'): vol.Range(min=0, max=100),%0A vol.Optional('light'): vol.Any(0, ...
30bd54621ce649e90f4a1717d6709652a2c77351
Add missing migration
humans/migrations/0013_auto_20201204_1807.py
humans/migrations/0013_auto_20201204_1807.py
Python
0.0002
@@ -0,0 +1,433 @@ +# Generated by Django 2.2.13 on 2020-12-04 18:07%0A%0Afrom django.db import migrations, models%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('humans', '0012_remove_user_server_signed'),%0A %5D%0A%0A operations = %5B%0A migrations.AlterField(%0A ...
a8bf127b1e17b4ce9c2a5c4e6d2bbbc19faa0141
Create snapper_chain.py
google-code-jam/snapper_chain.py
google-code-jam/snapper_chain.py
Python
0.000009
@@ -0,0 +1,448 @@ +%22%22%22%0Ahttps://code.google.com/codejam/contest/433101/dashboard%0A%22%22%22%0A%0A%0Adef light_on(n, k):%0A bits = bin(k)%5B2:%5D%0A%0A if len(bits) %3C n:%0A return False%0A%0A return all(b == '1' for b in list(reversed(bits))%5B:n%5D)%0A%0A%0Adef main():%0A T = int(raw_input(...
76fe998ad769e97b3424f2a3b8a5cccf2496816f
add very rudimentary/prototype range splitter program, without robust input checking
rangesplitter.py
rangesplitter.py
Python
0
@@ -0,0 +1,881 @@ +#! /usr/bin/env python3.4%0A%0Aimport ipaddress%0Aimport math%0A%0AtoSplit=False%0Awhile not toSplit:%0A%0A%09inputRange = input('Input the IP range you would like to split into subranges: ')%0A%09try:%0A%09%09toSplit =ipaddress.ip_network(inputRange)%0A%09except:%0A%09%09ValueError%0A%0ArangeSize = ...
b2661e8156f9a4e96cce3cc720563b1589037ad5
Add frequency_estimator.py
mhealthx/extractors/frequency_estimator.py
mhealthx/extractors/frequency_estimator.py
Python
0.998838
@@ -0,0 +1,3037 @@ +#!/usr/bin/env python%0A%22%22%22%0AThis program implements some of the frequency estimation functions from:%0Ahttps://gist.github.com/endolith/255291 and%0Ahttps://github.com/endolith/waveform-analyzer%0A%22%22%22%0A%0A%0Adef freq_from_autocorr(signal, fs):%0A %22%22%22%0A Estimate frequency ...
d2a80a76fdf28625ad36b2fd71af56938b9b9506
Add needed track known class.
src/trackknown.py
src/trackknown.py
Python
0
@@ -0,0 +1,1124 @@ +#!/usr/bin/env python %0A'''%0A@author jstober%0A%0ASimple class to track knowledge of states and actions. Based on %0A%0AL. Li, M. L. Littman, and C. R. Mansley, %E2%80%9COnline exploration in least-squares policy iteration%E2%80%9D AAMAS, 2009.%0A'''%0Aimport numpy as np%0Aimport pdb%0A%0Aclass Tr...
5dfa4397a282ddbafb57d990bc7d630fb6f927de
Add helper method for execute a commands
build.py
build.py
Python
0.000006
@@ -0,0 +1,3430 @@ +%22%22%22Update conda packages on binstars with latest versions%22%22%22%0Aimport os%0Aimport six%0Aimport subprocess%0Aimport time%0A%0AATTEMPTS = 3%0ARETRY_INTERVAL = 0.1%0A%0A%0Adef execute(command, **kwargs):%0A %22%22%22Helper method to shell out and execute a command through subprocess.%0A%...
387758ebcc2a0fa29e9e7744eacc6c753ae5284e
add example for FIFOQueue and coordinate application
TF-Demo/QueueRunnerDemo/queue_runner_demo.py
TF-Demo/QueueRunnerDemo/queue_runner_demo.py
Python
0
@@ -0,0 +1,928 @@ +#!/usr/bin/python%0A# -*- coding: utf-8 -*-%0A# Author: violinsolo%0A# Created on 12/12/2017%0A%0Aimport tensorflow as tf%0A%0A%0A# define FIFO queue%0Aq = tf.FIFOQueue(capacity=1000, dtypes='float32')%0A%0A# define ops%0Acounter = tf.Variable(initial_value=0, dtype='float32')%0Acounter_increment_op ...
20b2e70fe732b6f0cc049d18da9cac717cd7e967
Remove groups from admin
polyaxon/db/admin/groups.py
polyaxon/db/admin/groups.py
Python
0
@@ -0,0 +1,108 @@ +from django.contrib import admin%0Afrom django.contrib.auth.models import Group%0A%0Aadmin.site.unregister(Group)%0A
4a7fc9efce33bba3aa9ea818d09f6e9b621ab152
add script to pull out contacts csv
portality/migrate/emails.py
portality/migrate/emails.py
Python
0
@@ -0,0 +1,602 @@ +from portality.models import Account%0Aimport csv%0A%0AOUT = %22emails.csv%22%0A%0Af = open(OUT, %22wb%22)%0Awriter = csv.writer(f)%0Awriter.writerow(%5B%22ID%22, %22Name%22, %22Journal Count%22, %22Email%22%5D)%0A%0Afor a in Account.iterall():%0A id = a.id%0A name = a.name%0A count = len(a....
9639ab62ed0f6e0c5229be9820a9b902e5870a67
update readme and make command line script
scripts/dianon.py
scripts/dianon.py
Python
0
@@ -0,0 +1,1169 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0Aimport argparse%0Aimport dicom%0Aimport sys%0A%0Aif __name__ == %22__main__%22: #pragma nocover%0A%0A from dianonymous.dianonymous import anonymize%0A parser = argparse.ArgumentParser(description=%22Anonymize DICOM files%22)%0A%0A parser.add...
2ba1f25445f3b4d0ba3fdfe65d55041601b383db
Replace GoogleSTT with MycroftSTT
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.999999
@@ -1020,22 +1020,23 @@ import -Google +Mycroft STT%0A%0A__a @@ -1168,14 +1168,15 @@ ize_ -google +mycroft (sel @@ -1194,16 +1194,42 @@ ey=None, +%0A languag @@ -1818,14 +1818,15 @@ op, -Google +Mycroft STT(
bd371ecbd2ac163e44f104a775390b2ca2b88d35
Add migration for index on departement
migrations/versions/75704b2e975e_add_index_on_departement_for_numero.py
migrations/versions/75704b2e975e_add_index_on_departement_for_numero.py
Python
0
@@ -0,0 +1,519 @@ +%22%22%22Add index on Departement for numero%0A%0ARevision ID: 75704b2e975e%0ARevises: 34c2049aaee2%0ACreate Date: 2019-10-22 17:27:10.925104%0A%0A%22%22%22%0A%0A# revision identifiers, used by Alembic.%0Arevision = '75704b2e975e'%0Adown_revision = '34c2049aaee2'%0A%0Afrom alembic import op%0Aimport ...
70428a920ae9e02820e63e7dba98fc16faab6f10
add benchmark for linalg.logm
benchmarks/benchmarks/linalg_logm.py
benchmarks/benchmarks/linalg_logm.py
Python
0.000001
@@ -0,0 +1,787 @@ +%22%22%22 Benchmark linalg.logm for various blocksizes.%0A%0A%22%22%22%0Aimport numpy as np%0A%0Atry:%0A import scipy.linalg%0Aexcept ImportError:%0A pass%0A%0Afrom .common import Benchmark%0A%0A%0Aclass Logm(Benchmark):%0A params = %5B%0A %5B'float64', 'complex128'%5D,%0A %5B6...
e7e37e9b1fd56d18711299065d6f421c1cb28bac
Add some Feed test cases
moksha/tests/test_feed.py
moksha/tests/test_feed.py
Python
0
@@ -0,0 +1,853 @@ +from tw.api import Widget%0Afrom moksha.feed import Feed%0A%0Aclass TestFeed(object):%0A%0A def test_feed_subclassing(self):%0A class MyFeed(Feed):%0A url = 'http://lewk.org/rss'%0A feed = MyFeed()%0A assert feed.url == 'http://lewk.org/rss'%0A assert feed.nu...
d308695c79face90ba7f908230edb5e2e2437cbd
Decrypt file using XOR
tools/xor_decryptor.py
tools/xor_decryptor.py
Python
0.000003
@@ -0,0 +1,1027 @@ +#! /usr/bin/env python3%0A%0Aimport sys%0Aimport os%0Afrom ctypes import c_ubyte%0A%0Akeys = %5B0xd1, 0x73, 0x52, 0xf6, 0xd2, 0x9a, 0xcb, 0x27, 0x3e, 0xaf, 0x59, 0x31, 0x37, 0xb3, 0xe7, 0xa2%5D%0Ainitial_key = 0x5e%0Adelta_key = 0x3d%0A%0Aif __name__ == '__main__':%0A for path in sys.argv%5B1:%5D...
7a02f383986f347d208f69ba59526d9ce7df59bf
Add access grant functions
access.py
access.py
Python
0
@@ -0,0 +1,426 @@ +#%0A# access.py%0A#%0A# functions for dealing with access to Discord bot commands%0A#%0A%0Adef grant_user_access(user, commandclass):%0A%09new_grant = CommandClassAccess(user_id = user.id, command_class_id = commandclass.id)%0A%09session.add(new_grant)%0A%0A%09session.commit()%0A%0Adef grant_role_acc...
c4001a95dee88bc98eda5ce67a2f14485f4e85a5
Add configurations
configurations/initial.py
configurations/initial.py
Python
0.000003
@@ -0,0 +1,16 @@ +#TODO: add code%0A
9666a0d60eeb6954bae0c02300110a6772998859
Fix connection-refused error handling
ssbench/worker.py
ssbench/worker.py
import re import time import yaml from ssbench.constants import * from swift.common import client class Worker: MAX_RETRIES = 10 def __init__(self, queue): queue.use(STATS_TUBE) self.queue = queue def go(self): job = self.queue.reserve() while job: job.delete(...
Python
0.000001
@@ -3,16 +3,30 @@ port re%0A +import socket%0A import t
226cf36e4b4d069a920785b492804b78eebc34a5
Make non-commtrack location types administrative
corehq/apps/locations/management/commands/migrate_admin_status.py
corehq/apps/locations/management/commands/migrate_admin_status.py
Python
0.000313
@@ -0,0 +1,1753 @@ +# One-off migration from 2016-04-04%0Afrom optparse import make_option%0Afrom time import sleep%0Afrom django.core.management.base import BaseCommand%0Afrom corehq.apps.locations.models import LocationType, SQLLocation%0Afrom corehq.apps.es import DomainES%0Afrom corehq.util.log import with_progress...
be2ac14fbb228e5a5addd393867b9b3c7267ba89
Add and define string_permu_check problem.
pyexp/string_permu_check.py
pyexp/string_permu_check.py
Python
0
@@ -0,0 +1,244 @@ +'''Module to solve the algoritm question:%0AGiven a string S, how to count how many permutations%0Aof S is in a longer string L, assuming, of course, that%0Apermutations of S must be in contagious blocks in L.%0A%0AI will solve it in O(len(L)) time.%0A'''%0A
a59682d4b8bd4f594dce72b0f86f2ed4096c4178
Add missing migration file
akvo/rsr/migrations/0127_auto_20180529_0955.py
akvo/rsr/migrations/0127_auto_20180529_0955.py
Python
0
@@ -0,0 +1,621 @@ +# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import models, migrations%0Aimport akvo.rsr.fields%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('rsr', '0126_auto_20180320_1252'),%0A %5D%0A%0A operations = %5B%0A ...
4322ca998fadbd0e380626b895415bf75c4f7214
change ordering on ability levels
editor/migrations/0043_auto_20160303_1138.py
editor/migrations/0043_auto_20160303_1138.py
Python
0
@@ -0,0 +1,389 @@ +# -*- 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 ('editor', '0042_remove_comment_date'),%0A %5D%0A%0A operations = %5B%0A migrations.AlterMo...
65d7e81510980d85af5b52504e6d98e45943cc36
Create getdata.py
python_flask/public_html/nuotiovahti/nuotiovahti/getdata.py
python_flask/public_html/nuotiovahti/nuotiovahti/getdata.py
Python
0.000002
@@ -0,0 +1,1081 @@ +import paho.mqtt.client as mqtt%0Aimport mysql.connector%0Afrom flask import Flask, jsonify, json, request%0A%0Aapp = Flask(__name__)%0Aapp.route(%22/%22)%0Awith app.app_context():%0A%0A%0A%09def fetchfrombase():%0A%09%09try:%0A%09%09 cnx = mysql.connector.connect(option_files='/home/mint/con...
26fcd91313b15ee2426aec36817a3f29734f4b93
add diagonal gaussian demo
examples/demo-diaggaussian.py
examples/demo-diaggaussian.py
Python
0.000008
@@ -0,0 +1,1652 @@ +from __future__ import division%0Aimport numpy as np%0Anp.seterr(invalid='raise')%0Afrom matplotlib import pyplot as plt%0Aimport copy%0A%0Afrom pybasicbayes import models, distributions%0Afrom pybasicbayes.util.text import progprint_xrange%0A%0Aalpha_0=5.0%0Aobs_hypparams=dict(%0A mu_0=np.ze...
f48535102b6f71ba802e9b656c73cdd3ec746a3b
Add the test_repeat_layer.py
python/paddle/trainer_config_helpers/tests/configs/test_repeat_layer.py
python/paddle/trainer_config_helpers/tests/configs/test_repeat_layer.py
Python
0.00104
@@ -0,0 +1,312 @@ +from paddle.trainer_config_helpers import *%0A%0Asettings(batch_size=1000, learning_rate=1e-5)%0A%0Adin = data_layer(name='data', size=30)%0A%0Aoutputs(%0A repeat_layer(%0A input=din, num_repeats=10, as_row_vector=True),%0A repeat_layer(%0A input=din, num_repeats=10, act=TanhActiv...
aa5c8164b26c388b6a3a1efe8ea402a63a1c7ae8
add migrations file
django_db_meter/migrations/0003_testmodel.py
django_db_meter/migrations/0003_testmodel.py
Python
0.000001
@@ -0,0 +1,834 @@ +# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import models, migrations%0Afrom django.conf import settings%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A migrations.swappable_dependency(settings.AUTH_USER_MODEL),%0A ...
4db578f728a1eeda337f642513c57814fa9ec855
create module to save script to s3 bucket
session2s3.py
session2s3.py
Python
0
@@ -0,0 +1,622 @@ +%22%22%22%0ASave session to S3 bucket. Ex: ses2s3.workspace_to_s3('my-project-script')%0A%22%22%22%0Afrom datetime import datetime%0Aimport re%0A%0Aimport boto3%0Aimport dill%0A%0Adef session_to_s3(prefix, bucket_name, timestamp=True):%0A %22%22%22Save session to S3 bucket. Login via ~/.aws/credenti...
c176d9e1ac63debeb449eff704164712a67bcd3b
remove .bam
direct/src/directtools/DirectGrid.py
direct/src/directtools/DirectGrid.py
from pandac.PandaModules import * from direct.showbase.DirectObject import DirectObject from DirectUtil import * from DirectGeometry import * class DirectGrid(NodePath, DirectObject): def __init__(self,gridSize=100.0,gridSpacing=5.0,planeColor=(0.5,0.5,0.5,0.5),parent = None): # Initialize superclass ...
Python
0.000131
@@ -585,20 +585,16 @@ gridBack -.bam ')%0A @@ -1480,12 +1480,8 @@ here -.bam ')%0A
730c8bf23dbd687b3070eae58378ebcccf523736
add 'split' filter
filter_plugins/split.py
filter_plugins/split.py
Python
0.000009
@@ -0,0 +1,224 @@ +class FilterModule(object):%0A ''' A comment '''%0A%0A def filters(self):%0A return %7B%0A 'split': self.split,%0A %7D%0A%0A def split(self, input_value, separator):%0A return input_value.split(separator)%0A
938a6fabbc67feb409f6874966b30cb5c3e927a6
Create myotpsecrets.py
app/myotpsecrets.py
app/myotpsecrets.py
Python
0.000015
@@ -0,0 +1,199 @@ +ttp_user = 'admin'%0Ahttp_pass = 'admin'%0Acodes = %7B%0A%09'account1': 'pefjehegNusherewSunaumIcwoafIfyi',%0A%09'account2': 'memJarrIfomWeykvajLyutIkJeafcoyt',%0A%09'account3': 'rieshjaynEgDoipEjkecPopHiWighath',%0A%7D%0A%0A
eb396c12cccbda03a46381b5a54ff55d8f876152
Fix NameError
vdirsyncer/__init__.py
vdirsyncer/__init__.py
# -*- coding: utf-8 -*- ''' vdirsyncer is a synchronization tool for vdir. See the README for more details. ''' from __future__ import print_function try: from .version import version as __version__ # noqa except ImportError: # pragma: no cover raise ImportError( 'Failed to find (autogenerated) vers...
Python
0
@@ -145,16 +145,133 @@ nction%0A%0A +PROJECT_HOME = 'https://github.com/untitaker/vdirsyncer'%0ADOCS_HOME = 'https://vdirsyncer.readthedocs.org/en/stable'%0A%0A try:%0A @@ -1236,17 +1236,16 @@ xit(1)%0A%0A -%0A _detect_ @@ -1266,122 +1266,4 @@ s()%0A -%0A%0APROJECT_HOME = 'https://github.com/untitaker/vdirsynce...
0e3711000bcf7d59f75baa68f357f49f5246f812
Add video capturing functionality
humblemedia/resources/utils/video_capture.py
humblemedia/resources/utils/video_capture.py
Python
0
@@ -0,0 +1,1379 @@ +import subprocess%0Aimport re%0A%0Adef get_video_duration(filename):%0A # returns duration in seconds%0A command = 'ffmpeg -i %25s 2%3E&1 %7C grep %22Duration%22' %25 filename%0A result = subprocess.Popen(command,%0A stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)%0A ...
ff63bb34aaf01cd9cd7eff89c0c94135f896640f
Create mqtt_easydriver_stepper.py
linkit/easydriver/mqtt_easydriver_stepper.py
linkit/easydriver/mqtt_easydriver_stepper.py
Python
0.000002
@@ -0,0 +1,2014 @@ +import paho.mqtt.client as mqtt%0Aimport json, time%0Aimport mraa%0A%0Apin19 = mraa.Pwm(19)%0Apin0 = mraa.Gpio(0) %0Apin0.dir(mraa.DIR_OUT)%0A%0A# ----- CHANGE THESE FOR YOUR SETUP -----%0AMQTT_HOST = %22190.97.168.236%22%0AMQTT_PORT = 1883%0A%0Adef on_connect(client, userdata, rc):%0A print(%2...
2ae6f4183b2096287f8155d7db7e2ed0444618c4
Add first version of Day One entry splitter
day_one_entry_splitter.py
day_one_entry_splitter.py
Python
0
@@ -0,0 +1,605 @@ +#!/usr/bin/env python%0A# encoding: utf-8%0A%22%22%22%0Aday_one_entry_splitter.py%0A%0ACreated by Rod Docking on 2017-01-01.%0AAll rights reserved.%0A%22%22%22%0A%0Aimport sys%0A%0A%0Adef main():%0A %22%22%22Split entries from Day One export into separate files%22%22%22%0A%0A # Entry headers lo...
87e590c56a68871b1430d71704f303d38fc19e61
Generate Pascal Triangle
PascalsTriangle.py
PascalsTriangle.py
Python
0.999999
@@ -0,0 +1,1377 @@ +#!/usr/bin/env python%0A# HanoiMoves.py%0A# Author: Lijuan Marissa Zhou%0A# CreatedAt: 10/10/2014%0A%0A%22%22%22Interesting play with Pascals Triangle Problem in Python.%22%22%22%0A%0Aclass PascalsTriangle:%0A %22%22%22%0A Class of PascalsTriangle%0A %22%22%22%0A def __init__(self):%...
d73070f268e240439c71ffd193a18c477403dd2e
Add project model class
clowder/project.py
clowder/project.py
Python
0
@@ -0,0 +1,166 @@ +import argparse%0Aimport sys%0A%0Aclass Project(object):%0A%0A def __init__(self, name, path, url):%0A self.name = name%0A self.path = path%0A self.url = url%0A
dd708956ed19a38be09597cae94172e0b9863623
Add signing thanks @jmcarp
waterbutler/signing.py
waterbutler/signing.py
Python
0
@@ -0,0 +1,1934 @@ +# encoding: utf-8%0A%0Aimport hmac%0Aimport json%0Aimport base64%0Aimport collections%0A%0Afrom waterbutler import settings%0A%0A%0A# Written by @jmcarp originally%0Adef order_recursive(data):%0A %22%22%22Recursively sort keys of input data and all its nested dictionaries.%0A Used to ensure co...
cad438214ec55684bfc7d5f1d5383109934f29ff
add weboob.tools.application.prompt.PromptApplication
weboob/tools/application/prompt.py
weboob/tools/application/prompt.py
Python
0.000001
@@ -0,0 +1,1867 @@ +# -*- coding: utf-8 -*-%0A%0A%22%22%22%0ACopyright(C) 2010 Romain Bignon%0A%0AThis program is free software; you can redistribute it and/or modify%0Ait under the terms of the GNU General Public License as published by%0Athe Free Software Foundation, version 3 of the License.%0A%0AThis program is di...
1b3d7078a4ca91ef07f90d1645f26761d1f7abac
Add example of using lower-level plotting methods directly
examples/scatter.py
examples/scatter.py
Python
0.000001
@@ -0,0 +1,792 @@ +%22%22%22%0AExample of how %60ax.scatter%60 can be used to plot linear data on a stereonet%0Avarying color and/or size by other variables.%0A%0AThis also serves as a general example of how to convert orientation data into%0Athe coordinate system that the stereonet plot uses so that generic matplotlib...
7383cc2a4b6ad21c747794dbb3d33338d8eea528
Add another example.
examples/tor-irc.py
examples/tor-irc.py
Python
0.000001
@@ -0,0 +1,1859 @@ +# Copyright (c) Aaron Gallagher %3C_@habnab.it%3E%0A# See COPYING for details.%0A%0Afrom twisted.internet.defer import Deferred%0Afrom twisted.internet.endpoints import TCP4ClientEndpoint%0Afrom twisted.internet.protocol import ClientFactory%0Afrom twisted.internet.task import react%0Afrom twisted.w...
7a3e85231efeb5c03cab944f6da346d138f6fcb1
Add tests for pips
test/test_pips.py
test/test_pips.py
Python
0.000001
@@ -0,0 +1,259 @@ +import pytest%0A%0A@pytest.mark.parametrize(%22name%22, %5B%0A (%22awscli%22),%0A (%22boto3%22),%0A (%22docker-py%22),%0A (%22GitPython%22),%0A (%22mkdocs%22),%0A (%22pep8%22),%0A (%22virtualenv%22),%0A (%22virtualenvwrapper%22),%0A%5D)%0A%0Adef test_pips(host, name):%0A assert name in host....
8b4d27851889bccc87392b14557ce63d3f95e426
add build.py
build.py
build.py
Python
0.000001
@@ -0,0 +1,1954 @@ +#!/usr/bin/python%0Aimport glob%0Aimport gzip%0Aimport os%0Aimport platform%0Aimport re%0Aimport sh%0Aimport shutil%0Aimport subprocess%0Aimport sys%0Aimport time%0Afrom optparse import OptionParser%0A%0Alog = lambda *a: None%0A%0Adef VerbosePrint(*args):%0A # Print each argument separately so ca...
4a97d5b9f9998a5b8ca8509547dabf8d757e70d9
Add build script.
build.py
build.py
Python
0
@@ -0,0 +1,414 @@ +import version%0A%0Aprint %22Reading gitmake.py...%22%0Awith open('gitmake.py') as fp:%0A lines = fp.readlines()%0A%0Aprint %22Rewriting gitmake.py...%22%0Awith open('gitmake.py', 'w') as fp:%0A for line in lines:%0A if line.startswith('version_info ='):%0A fp.write('version_i...
6dabd92990df570d81a621e51d7119345671d4c0
Create Neopixel_Serial.py (#43)
home/moz4r/Neopixel_Serial.py
home/moz4r/Neopixel_Serial.py
Python
0
@@ -0,0 +1,493 @@ +#Just a poc maybe there is a best method%0A#Flash Neopixel_MRL.ino%0Aimport time%0Aserial = Runtime.createAndStart(%22serial%22,%22Serial%22)%0ARuntime.createAndStart(%22mouth%22, %22AcapelaSpeech%22)%0Aserial.connect(%22COM7%22, 9600, 8, 1, 0)%0Asleep(5)%0Amouth.speak(%22Hi everybody this is neo pix...
86ae30203475a2ac718cf3839e38522e8e1aa203
Add tests package #5
tests/__init__.py
tests/__init__.py
Python
0
@@ -0,0 +1,628 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0A#%0A# Copyright 2017 Jun-ya HASEBA%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.a...
f64c6eb4b4a51e8b3289bc3e0f8e3a0d4027c798
Remove command-line activation/optimization help.
theanets/flags.py
theanets/flags.py
'''This module contains command line flags.''' import climate climate.add_arg('--help-activation', action='store_true', help='show available activation functions') climate.add_arg('--help-optimize', action='store_true', help='show available optimization algorithms') g = climate.add_gr...
Python
0
@@ -61,246 +61,8 @@ te%0A%0A -climate.add_arg('--help-activation', action='store_true',%0A help='show available activation functions')%0Aclimate.add_arg('--help-optimize', action='store_true',%0A help='show available optimization algorithms')%0A%0A g =
d519c7f171d7e89f30f073616f71af24654d223d
add solution for Rotate List
src/rotateList.py
src/rotateList.py
Python
0
@@ -0,0 +1,774 @@ +# Definition for singly-linked list.%0A# class ListNode:%0A# def __init__(self, x):%0A# self.val = x%0A# self.next = None%0A%0A%0Aclass Solution:%0A # @param head, a ListNode%0A # @param k, an integer%0A # @return a ListNode%0A%0A def rotateRight(self, head, k):%0A ...
5828823d505aae1425fd2353f898c5b18722e6e5
Introduce base class and ProgressObserver for renaming occurences.
src/robotide/ui/progress.py
src/robotide/ui/progress.py
# Copyright 2008-2009 Nokia Siemens Networks Oyj # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
Python
0
@@ -608,16 +608,28 @@ mport wx +%0Aimport time %0A%0Afrom r @@ -659,20 +659,16 @@ %0A%0Aclass -Load Progress @@ -714,16 +714,32 @@ f, frame +, title, message ):%0A @@ -783,39 +783,22 @@ log( -'RIDE', 'Loading the test data' +title, message ,%0A @@ -1180,8 +1180,529 @@ or(msg)%0A +%0A%0Aclass LoadProgre...
0d7b1d848d7ab80cc9054931f14b98bc123287bf
Create test_bulkresize.py file
jarviscli/plugins/test_bulkresize.py
jarviscli/plugins/test_bulkresize.py
Python
0
@@ -0,0 +1,378 @@ +from unittest import mock%0Aimport unittest%0Aimport os%0Afrom Jarvis import Jarvis%0Afrom plugins.bulkresize import spin%0Afrom plugins import bulkresize%0A%0Afrom tests import PluginTest%0A%0A%0ACURRENT_PATH = os.path.dirname(os.path.abspath(__file__))%0ADATA_PATH = os.path.join(CURRENT_PATH, '..',...
35fd6f5829f25b8f9dd1b3e5fa816e7dbbd08c04
add --all options to `lx export-aria2` and `lx download-aria2`
lixian_plugins/commands/aria2.py
lixian_plugins/commands/aria2.py
from lixian_plugins.api import command from lixian_config import * from lixian_encoding import default_encoding from lixian_cli_parser import command_line_parser from lixian_cli_parser import with_parser from lixian_cli_parser import command_line_value from lixian_commands.util import parse_login, create_client def ...
Python
0
@@ -220,32 +220,53 @@ li_parser import + command_line_option, command_line_va @@ -269,16 +269,16 @@ e_value%0A - from lix @@ -734,28 +734,8 @@ bs:%0A -%09%09%09%09%09import os.path%0A %09%09%09%09 @@ -1316,16 +1316,44 @@ _login)%0A +@command_line_option('all')%0A def expo @@ -2343,32 +2343,32 @@ d_line_parser...
a8a87818094f0cf9954815caca9fb586ddb4099b
Add a gallery example to show coloring of points by categories (#1006)
examples/gallery/symbols/points_categorical.py
examples/gallery/symbols/points_categorical.py
Python
0.000622
@@ -0,0 +1,2690 @@ +%22%22%22%0AColor points by categories%0A---------------------------%0AThe :meth:%60pygmt.Figure.plot%60 method can be used to plot symbols which are%0Acolor-coded by categories. In the example below, we show how the%0A%60Palmer Penguins dataset %3Chttps://github.com/allisonhorst/palmerpenguins%3E%6...
7ff0c1fd4eb77129c7829f92fc176678a06abe19
add solution for Balanced Binary Tree
src/balancedBinaryTree.py
src/balancedBinaryTree.py
Python
0.000001
@@ -0,0 +1,688 @@ +# Definition for a binary tree node%0A# class TreeNode:%0A# def __init__(self, x):%0A# self.val = x%0A# self.left = None%0A# self.right = None%0A%0A%0Aclass Solution:%0A # @param root, a tree node%0A # @return a boolean%0A%0A def isBalanced(self, root):%0A ...
7c17dfaf8d727047e32ab4e18438897f1b35feb2
226. Invert Binary Tree
problems/test_0226_bfs.py
problems/test_0226_bfs.py
Python
0.999305
@@ -0,0 +1,986 @@ +import unittest%0A%0Aimport utils%0Afrom tree import TreeNode%0A%0A%0A# O(n) time. O(log(n)) space. BFS.%0Aclass Solution:%0A def invertTree(self, root: TreeNode) -%3E TreeNode:%0A if not root:%0A return None%0A%0A q = %5Broot%5D%0A%0A while q:%0A new_q =...
09445e163102e76299ab93a872de07b43c6dc5db
Fix bug in func test helper
nose2/tests/_common.py
nose2/tests/_common.py
"""Common functionality.""" import os.path import tempfile import shutil import sys import subprocess import six from nose2.compat import unittest from nose2 import main, util HERE = os.path.abspath(os.path.dirname(__file__)) SUPPORT = os.path.join(HERE, 'functional', 'support') class TestCase(unittest.TestCase):...
Python
0
@@ -4790,25 +4790,23 @@ -self.__enter__()%0A +with self:%0A @@ -4818,32 +4818,36 @@ ry:%0A + + self.result = ma @@ -4887,16 +4887,20 @@ + + argv=('n @@ -4948,16 +4948,20 @@ + **self.k @@ -4983,121 +4983,147 @@ -return self.stdout.getvalue(), self.std...
8bc4dddfad944d385c02e2a6ebd8031bfb6bfae8
Test dynamic_length
extenteten/dynamic_length_test.py
extenteten/dynamic_length_test.py
Python
0.000001
@@ -0,0 +1,514 @@ +import numpy as np%0Aimport tensorflow as tf%0A%0Afrom .dynamic_length import *%0A%0A%0Adef test_id_tree_to_root_width():%0A with tf.Session() as session, session.as_default():%0A id_tree = tf.constant(%5B%5B%5B1%5D, %5B2%5D, %5B3%5D, %5B0%5D, %5B0%5D%5D%5D)%0A assert id_tree_to_root...
e621f9c63e3ba676c3ce33ca227b96c5d6b68afa
make the fakes be the correct
nova/tests/db/fakes.py
nova/tests/db/fakes.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 OpenStack, LLC # 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/...
Python
0.9996
@@ -4723,16 +4723,18 @@ _address +es (context @@ -4756,32 +4756,33 @@ %0A return +%5B FakeModel(fixed_ @@ -4791,32 +4791,33 @@ _fields).address +%5D %0A%0A def fake_i @@ -4841,16 +4841,18 @@ _address +es _v6(cont @@ -4877,32 +4877,33 @@ %0A return +%5B FakeModel(fixed_ @@ -4920,16 +4920,17 ...
471d60f41a283e5a2b2fb4a364cde67150de8acd
Create pmcolor.py
HexChat/pmcolor.py
HexChat/pmcolor.py
Python
0
@@ -0,0 +1,341 @@ +__module_name__ = %22PMColor%22%0A__module_author__ = %22TingPing%22%0A__module_version__ = %221%22%0A__module_description__ = %22Color PM tabs like Hilights%22%0A%0Aimport xchat%0A%0Adef pm_cb(word, word_eol, userdata):%0A xchat.command('GUI COLOR 3')%0A%09return None%0A%0Axchat.hook_print(%22Priva...
8b5c9a434b1d8ae8d46a34d45114bc9c71dac0ea
Create install for nginx
genes/nginx/main.py
genes/nginx/main.py
Python
0
@@ -0,0 +1,391 @@ +from genes.apt import commands as apt%0Afrom genes.brew import commands as brew%0Afrom genes.debian.traits import is_debian%0Afrom genes.mac.traits import is_osx%0Afrom genes.ubuntu.traits import is_ubuntu%0A%0A%0Adef main():%0A if is_ubuntu() or is_debian():%0A apt.update()%0A apt.i...
cd1f02d5707e1285fab54d31e65b6098e967a8d3
Move quality plugin priority earlier, so it can reject before e.g. regexp plugin causes imdb lookups.
flexget/plugins/filter/quality.py
flexget/plugins/filter/quality.py
import logging from flexget.plugin import register_plugin, priority import flexget.utils.qualities as quals log = logging.getLogger('quality') class FilterQuality(object): """ Rejects all entries that don't have one of the specified qualities Example: quality: - hdtv """ ...
Python
0.000003
@@ -1723,10 +1723,10 @@ ty(1 -30 +75 )%0A
e1a40e6a43915f8e8be2aa27387cd0d25f05ed67
Create Multiplication_Of_2_Numbers.py
Code/Multiplication_Of_2_Numbers.py
Code/Multiplication_Of_2_Numbers.py
Python
0.008666
@@ -0,0 +1,70 @@ +a=input(%22Enter a number --%3E%22)%0Ab=input(%22Enter a number --%3E%22)%0Aprint a*b%0A
20e1b3eae08b9052b44e9f54d5ed8c5d76e15033
Fix radiotherm I/O inside properties (#4227)
homeassistant/components/climate/radiotherm.py
homeassistant/components/climate/radiotherm.py
""" Support for Radio Thermostat wifi-enabled home thermostats. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/climate.radiotherm/ """ import datetime import logging import voluptuous as vol from homeassistant.components.climate import ( STATE_AUTO...
Python
0
@@ -1968,32 +1968,86 @@ lf._name = None%0A + self._fmode = None%0A self._tmode = None%0A self.hol @@ -2065,16 +2065,16 @@ ld_temp%0A - @@ -2567,29 +2567,14 @@ elf. -device.fmode%5B'human'%5D +_fmode ,%0A @@ -2599,37 +2599,23 @@ E: self. -device.tmode%5B'human'%5D +_tmode, %0A ...
18b6ac79ebcd881babaa328900c6e39b2da3c1bb
Handle 404 error when attempting to download a game that is still in progress
tenhou-download-game-xml.py
tenhou-download-game-xml.py
#!/usr/bin/python3 import glob import os from optparse import OptionParser from struct import Struct from urllib.parse import parse_qs from urllib.request import urlopen import struct import codecs table = [ 22136, 52719, 55146, 42104, 59591, 46934, 9248, 28891, 49597, 52974, 62844, 4015, 18311, 507...
Python
0
@@ -164,16 +164,51 @@ urlopen%0A +from urllib.error import HTTPError%0A import s @@ -4197,32 +4197,53 @@ ormat(logname))%0A + try:%0A resp @@ -4298,24 +4298,28 @@ + + data = resp. @@ -4321,24 +4321,28 @@ resp.read()%0A + @@ -4393,16 +4393,20 @@ ...
2059aa7776a8e0c947b68e9401d74bdd146a59cd
Test passed for week day
ch03_04.py
ch03_04.py
Python
0.000002
@@ -0,0 +1,772 @@ +(day, month, year) = input().split()%0A%0Aday = int(day); month = int(month); year = int(year)%0A%0Aif month %3C 3:%0A month += 12%0A year -= 1%0A%0Ac = year / 100%0Ak = year %25 100%0Aweek_day = int( day + (26 * (month + 1) / 10) + k + ( k / 4 ) + ( c / 4 ) + ( 5 * c ) ) %25 7%0A%0Aweek_day_na...
bda7ef0f449c40d572cc4fe40aaaa2f60996bde5
add spider for solitaireonline.com
gaming_spiders/solitaireonline.py
gaming_spiders/solitaireonline.py
Python
0
@@ -0,0 +1,525 @@ +#!/usr/bin/env python%0A%0Aimport json%0A%0Afrom cloudfeaster import spider%0A%0Afrom zygomatic import ZygomaticSpider%0A%0A%0Aclass SolitaireOnlineSpider(ZygomaticSpider):%0A%0A @classmethod%0A def get_metadata(cls):%0A return %7B%0A %22url%22: %22http://www.solitaireonline.c...
868293aee14d6216c69446dc367491b25469f6e8
add import_question_metadata to import display_text and key for questions from csv file
apps/stories/management/commands/import_question_metadata.py
apps/stories/management/commands/import_question_metadata.py
Python
0.000001
@@ -0,0 +1,1488 @@ +from django.core.management.base import BaseCommand%0Aimport csv%0Afrom stories.models import Question, Questiongroup, QuestiongroupQuestions%0A%0Aclass Command(BaseCommand):%0A args = %22filename to import from%22%0A help = %22%22%22Import Key and Display Text metadata for questions%0A ...
9f1dfbf4bf36c0e3ef991a66c5a68b2674223b19
Add a constant decoractor
const.py
const.py
Python
0.000978
@@ -0,0 +1,251 @@ +def constant(func):%0A %22%22%22 Decorator used to emulate constant values %22%22%22%0A %0A def fset(self, value):%0A raise TypeError(%22Cannot modify the value of a constant.%22)%0A%0A def fget(self):%0A return func()%0A %0A return property(fget, fset)
2ee04a1b668501eb41ce4b08e6c92ffe4f57d861
Build dependencies were borken because something sorts 1.0.1-XX and 1.0-YY wrong
aliyun/__init__.py
aliyun/__init__.py
""" Aliyun API ========== The Aliyun API is well-documented at `dev.aliyun.com <http://dev.aliyun.com/thread.php?spm=0.0.0.0.MqTmNj&fid=8>`_. Each service's API is very similar: There are regions, actions, and each action has many parameters. It is an OAuth2 API, so you need to have an ID and a secret. You can get the...
Python
0.000026
@@ -2207,9 +2207,9 @@ %221. -0.1 +1.0 %22%0A
c480982a09f354a05c5e5ff0dc8a7c93f13f3970
add config for quakenet script
config/quakenet.py
config/quakenet.py
Python
0
@@ -0,0 +1,100 @@ +settings = %7B%0A %22authname%22: %22authname%22,%0A %22password%22: %22authpw%22,%0A %22channels%22: %22#pwnagedeluxe%22%0A%7D
6b0721b6aeda6d3ec6f5d31be7c741bc7fcc4635
bump release for 18.0.1 development
setup.py
setup.py
"""Functionality that should be in the standard library. Like builtins, but Boltons. Otherwise known as, "everyone's util.py," but cleaned up and tested. Contains over 160 BSD-licensed utility types and functions that can be used as a package or independently. `Extensively documented on Read the Docs <http://boltons....
Python
0
@@ -420,17 +420,20 @@ = '18.0. -0 +1dev '%0A__cont
95d3306f2f7c492ea5f58c86b86165544273e6b9
Create mp.py
mp.py
mp.py
Python
0.000002
@@ -0,0 +1,539 @@ +import multiprocessing as mp%0Aimport time%0A%0ATHREADS=10%0A%0Adef f(x):%0A print(%22Starting....%22 + str(x))%0A time.sleep(5)%0A print(%22Finishing....%22+ str(x))%0A%0Aprocesses = %5BNone%5D * THREADS%0Aprint(processes)%0A%0Adef add_to_processes(args):%0A while True:%0A for idx...
934c4136c6415b76577d206739b352ad965210f0
Create test_postures.py
home/beetlejuice/test_postures.py
home/beetlejuice/test_postures.py
Python
0.000001
@@ -0,0 +1,920 @@ +# Sweety's postures test%0Aimport random%0A%0A%0ARuntime.createAndStart(%22sweety%22, %22Sweety%22)%0Asweety.arduino.setBoard(%22atmega2560%22)%0Asweety.connect(%22COM9%22)%0Asleep(1) # give a second to the arduino for connect%0Asweety.attach()%0A%0Asweety.mouthState(%22smile%22)%0Asleep(1)%0A# set d...
89714cf01186e9aa5575fadf45c6c1fa70812871
Create count.py
count.py
count.py
Python
0.000003
@@ -0,0 +1,356 @@ +#!/usr/bin/env python%0Aimport rospy%0Afrom std_msgs.msg import Int32%0A%0Aif __name__ == '__main__':%0A rospy.init_node('count')%0A pub = rospy.Publisher('count_up', Int32, queue_size=1)%0A rate = rospy.Rate(10)%0A n = 0%0A while not rospy.is_shutdown():%0A ...
9f443a5af6537867712f12419d93a5b8c824858a
Add Notify-osd option for linux based systems
flexget/plugins/output/notify_osd.py
flexget/plugins/output/notify_osd.py
Python
0
@@ -0,0 +1,2485 @@ +from __future__ import unicode_literals, division, absolute_import%0Aimport logging%0A%0Afrom flexget.plugin import register_plugin, priority, DependencyError%0Afrom flexget.utils.template import RenderError, render_from_task%0A%0Alog = logging.getLogger('notify_osd')%0A%0A%0Aclass OutputNotifyOsd(o...
77922e6527ad0e2c223983c59329dea127cd38ef
Create heuristic_test
models/players/heuristic_test.py
models/players/heuristic_test.py
Python
0.00001
@@ -0,0 +1,94 @@ +from models.algorithm.minimax import Heuristic%0Afrom models.algorithm.minimax import Minimax%0A%0A%0A
93b2d737407389a1c4dbc67836a949663eeba948
Call the new presubmit checks from chrome/ code, with a blacklist.
chrome/PRESUBMIT.py
chrome/PRESUBMIT.py
Python
0.000001
@@ -0,0 +1,1496 @@ +# Copyright (c) 2009 The Chromium Authors. All rights reserved.%0A# Use of this source code is governed by a BSD-style license that can be%0A# found in the LICENSE file.%0A%0A%22%22%22Makes sure that the chrome/ code is cpplint clean.%22%22%22%0A%0AINCLUDE_CPP_FILES_ONLY = (%0A r'.*%5C.cc$', r'.*%5...
923786f0ee9e5128337997b6687374f74388c1c2
add leetcode Find Minimum in Rotated Sorted Array
leetcode/FindMinimuminRotatedSortedArray/solution.py
leetcode/FindMinimuminRotatedSortedArray/solution.py
Python
0
@@ -0,0 +1,403 @@ +# -*- coding:utf-8 -*-%0Aclass Solution:%0A # @param num, a list of integer%0A # @return an integer%0A def findMin(self, num):%0A l = 0%0A h = len(num) - 1%0A while l %3C h:%0A mid = (l + h) // 2%0A if num%5Bl%5D %3E num%5Bmid%5D:%0A ...
f8c7a80fc8500d53cacef904c4a7caea88263465
Add 20150608 question.
LeetCode/gas_station.py
LeetCode/gas_station.py
Python
0.000001
@@ -0,0 +1,590 @@ +%0Aclass Solution:%0A # @param %7Binteger%5B%5D%7D gas%0A # @param %7Binteger%5B%5D%7D cost%0A # @return %7Binteger%7D%0A def canCompleteCircuit(self, gas, cost):%0A diff = %5B%5D%0A i = 0%0A while i %3C len(gas):%0A diff.append(gas%5Bi%5D - cost%5Bi%5D)%0A...
08e57c27c47437b46c557f4697dd32d00f27fd7f
Create whatIsYourName.py
whatIsYourName.py
whatIsYourName.py
Python
0.000175
@@ -0,0 +1,182 @@ +a = 20%0Ab = 130%0Ac = a + b%0A%0Aprint (c)%0A%0A%0Ad = 100%0Ae = 2%0Af = d / e%0A%0Aprint (f)%0A%0A%0Ag = 34%0Ah = 47%0Ai = 82%0Aj= g + h + i%0A%0Aprint (j)%0A%0A%0Aname = input(%22What is your name? %22) %0Aprint(%22hello, %22, name)%0A
4f99ffbc3deb321ba3ff76b23bacb889b11e1f4d
add to index solved
Lesson4/add_to_index.py
Lesson4/add_to_index.py
Python
0.000001
@@ -0,0 +1,782 @@ +# Define a procedure, add_to_index,%0A# that takes 3 inputs:%0A%0A# - an index: %5B%5B%3Ckeyword%3E,%5B%3Curl%3E,...%5D%5D,...%5D%0A# - a keyword: String%0A# - a url: String%0A%0A# If the keyword is already%0A# in the index, add the url%0A# to the list of urls associated%0A# with that keyword.%0A%0A#...
d824d2fc32774ce51e4f36d702a2a6cc131db558
add migration file to automatically parse citations
osf/migrations/0074_parse_citation_styles.py
osf/migrations/0074_parse_citation_styles.py
Python
0
@@ -0,0 +1,2934 @@ +# This migration port %60scripts/parse_citation_styles%60 to automatically parse citation styles.%0A# Additionally, this set the corresponding %60has_bibliography%60 field to %60False%60 for all citation formats whose CSL files do not%0A# include a bibliography section. As a result, all such citatio...
9f46cf4836ad555a54dc9c47b8b2843643a878f2
Create migration for draft dos1 briefs to dos2
migrations/versions/840_migrate_draft_dos1_briefs_to_draft_dos2.py
migrations/versions/840_migrate_draft_dos1_briefs_to_draft_dos2.py
Python
0.000001
@@ -0,0 +1,531 @@ +%22%22%22Migrate draft DOS1 briefs to draft DOS2 briefs%0A%0ARevision ID: 840%0ARevises: 830%0ACreate Date: 2017-02-07 15:31:50.715832%0A%0A%22%22%22%0A%0A# revision identifiers, used by Alembic.%0Arevision = '840'%0Adown_revision = '830'%0A%0Afrom alembic import op%0A%0Adef upgrade():%0A # Change...
4a3d56589cbf4e94618795d3f1bc09fa0f59e5ca
Add "ROV_SRS_Library.py" file containing functions for main script.
ROV_SRS_Library.py
ROV_SRS_Library.py
Python
0
@@ -0,0 +1,699 @@ +# ROV_SRS_Library%0A#%0A#%0A# Overview:%09A collection of helper functions used by the BeagleBone%0A#%09%09to control the ROV SRS Actuators.%0A#%0A# Authors:%09Jonathan Lee (2015)%0A#%0A%0Aimport Adafruit_BBIO.GPIO as GPIO%0Aimport Adafruit_BBIO.PWM as PWM%0A%0Adef calc_pulse_width(pin_name):%0A%09%2...
0a45c8f0632f3e8ca5502b9e4fdbaef410b07c71
rename settings.py
config.py
config.py
Python
0.000001
@@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*-%0A%0Afrom flask import Flask%0A%0Aapp = Flask(__name__)%0A
1d35451387f9cab55df12f28e71824b2dbe37153
add back after exposing my key
config.py
config.py
Python
0
@@ -0,0 +1,51 @@ +ECHO_NEST_API_KEY = %22INSERT ECHO NEST API KEY HERE%22
88a1f41c99320117bedb9d9922f3737fa820768a
fix import in config
config.py
config.py
#!/usr/bin/env python # encoding: utf-8 """ config.py Application configurations db_file : the SQLite file used to store the progress serial : settings for the serial port that the RFID reader connects to mpd_conn : the connection details for the MPD client gpio_pins : the ids of the GPIO input pins and their callb...
Python
0.000001
@@ -481,16 +481,26 @@ ime%22%22%22%0A%0A +import os%0A %0A__versi
3bd36c410c3d7fadc911e91ded07ff08eb2d21da
create path if doesn't exist
bakery/management/commands/build.py
bakery/management/commands/build.py
import os import re import six import shutil from django.conf import settings from optparse import make_option from django.core import management from django.core.urlresolvers import get_callable from django.core.exceptions import ViewDoesNotExist from django.core.management.base import BaseCommand, CommandError cust...
Python
0.000002
@@ -3379,24 +3379,139 @@ l_path%5B2:%5D)%0A + if not os.path.exists(dest_path):%0A os.mkdirs(dest_path)%0A @@ -4309,41 +4309,17 @@ le, -os.path.join(dest_path, filename) +dest_path )%0A
ffca5ea26c02170cc5edf6eea25ec9ef2c0c72bf
Disable trix serializer tests with Jython
test/test_trix_serialize.py
test/test_trix_serialize.py
#!/usr/bin/env python import unittest from rdflib.graph import ConjunctiveGraph from rdflib.term import URIRef, Literal from rdflib.graph import Graph try: from io import BytesIO except ImportError: from StringIO import StringIO as BytesIO class TestTrixSerialize(unittest.TestCase): def setUp(self): ...
Python
0
@@ -1709,16 +1709,196 @@ in tg)%0A%0A +import platform%0Aif platform.system() == 'Java':%0A from nose import SkipTest%0A raise SkipTest('Jython issues - %22JavaSAXParser%22 object has no attribute %22start_namespace_decl%22')%0A%0A if __nam
ba6dc4269f96903f863748a779521d2bd8803d4f
Create Process.py
Samples/Process.py
Samples/Process.py
Python
0
@@ -0,0 +1,2882 @@ +__author__ = 'Marius'%0A%0Afrom TM1py import TM1Queries, Process%0Aimport uuid%0Aimport unittest%0A%0A%0Aclass TestAnnotationMethods(unittest.TestCase):%0A q = TM1Queries(ip='', port=8008, user='admin', password='apple', ssl=True)%0A random_string = str(uuid.uuid4()).replace('-', '_')%0A p_...
f26bdfa1ff0a388fb7bd2d473cf7b4b03fa61f6d
add unit test
doajtest/unit/event_consumers/test_application_publisher_revision_notify.py
doajtest/unit/event_consumers/test_application_publisher_revision_notify.py
Python
0.000001
@@ -0,0 +1,2945 @@ +from portality import models%0Afrom portality import constants%0Afrom portality.bll import exceptions%0Afrom doajtest.helpers import DoajTestCase%0Afrom doajtest.fixtures import ApplicationFixtureFactory%0Aimport time%0A%0Afrom portality.events.consumers.application_publisher_revision_notify import ...
d24e8c746359169058e9c0577c2f843695ca3b55
Add 2 instance with EBS test.
heat/tests/functional/test_WordPress_2_Instances_With_EBS.py
heat/tests/functional/test_WordPress_2_Instances_With_EBS.py
Python
0
@@ -0,0 +1,2476 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4%0A#%0A# 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...
24c5248d578774d13d69b001fad8f50e2eac192a
Add tracepoint_variable_sized_types.py
scripts/tracepoint_variable_sized_types.py
scripts/tracepoint_variable_sized_types.py
Python
0.000007
@@ -0,0 +1,1151 @@ +# This script lists all the types in the kernel's tracepoint format files%0A# which appear with more than one size. This script's output should be%0A# compared to the code in TracepointFormatParser::adjust_integer_types()%0A%0Aimport glob%0A%0Afield_types = %7B%7D%0A%0Afor format_file in glob.iglob(...
90b01102538ead893e516449fc52ad4befb8a77c
fix order of osx packer logs
joulupukki/worker/lib/osxpacker.py
joulupukki/worker/lib/osxpacker.py
import os import subprocess import pecan import shutil from joulupukki.common.logger import get_logger_job from joulupukki.common.datamodel.job import Job class OsxPacker(object): def __init__(self, builder, config, job_id): self.config = config self.builder = builder self.distro = "osx" ...
Python
0
@@ -3450,16 +3450,28 @@ commands + + %5B%22 2%3E&1%22%5D %0A @@ -3487,16 +3487,21 @@ mand = %22 + 2%3E&1 && %22%0A @@ -3798,44 +3798,8 @@ PE,%0A - stderr=subprocess.PIPE,%0A @@ -3878,42 +3878,8 @@ e()%0A - self.logger.debug(stdout)%0A @@ -3894,35 +3894,35 @@ .logger.info(s...
673dac79cbab6de0be5650d46840a3bc9858b2b4
Add a help script to clear the test bucket
tests/clear_qiniu_bucket.py
tests/clear_qiniu_bucket.py
Python
0.000001
@@ -0,0 +1,824 @@ +import os%0Afrom qiniu import Auth, BucketManager%0A%0A%0AQINIU_ACCESS_KEY = os.environ.get('QINIU_ACCESS_KEY')%0AQINIU_SECRET_KEY = os.environ.get('QINIU_SECRET_KEY')%0AQINIU_BUCKET_NAME = os.environ.get('QINIU_BUCKET_NAME')%0AQINIU_BUCKET_DOMAIN = os.environ.get('QINIU_BUCKET_DOMAIN')%0A%0A%0Adef m...
da7deee98bb8d6a92d2ab1b8ad5c3e550a24fc83
add `Config` class tests
tests/config/test_config.py
tests/config/test_config.py
Python
0.000016
@@ -0,0 +1,861 @@ +# -*- coding: utf-8 -*-%0A%0Aimport os%0Aimport tempfile%0Aimport unittest%0A%0Afrom mock import patch%0A%0Afrom opoona.config import Config%0A%0Aclass TestInvalidSyntaxException(unittest.TestCase):%0A @patch('os.path.expanduser')%0A def test_init(self, expanduser):%0A expanduser.return_...
ae92573d2c86fa1e83b636c17c443cc8f97f4040
Add unittest for ElementaryLine.
tests/elementary_line_test.py
tests/elementary_line_test.py
Python
0
@@ -0,0 +1,1241 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0A%22%22%22 Test case for ElementaryLine.%0A%22%22%22%0A%0Aimport unittest%0A%0Afrom catplot.ep_components.ep_lines import ElementaryLine%0A%0A%0Aclass ElementaryLineTest(unittest.TestCase):%0A%0A def setUp(self):%0A self.maxDiff = True%0A...