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
a5c99fe8e37079a2663fe90644d3925d6dc7a5d0
Add another example that works offline
examples/offline_examples/test_request_fixture.py
examples/offline_examples/test_request_fixture.py
Python
0.000001
@@ -0,0 +1,325 @@ +import pytest%0D%0A%0D%0A%0D%0A@pytest.mark.offline%0D%0Adef test_request_fixture(request):%0D%0A sb = request.getfixturevalue('sb')%0D%0A sb.open(%22data:text/html,%3Cp%3EHello%3Cbr%3E%3Cinput%3E%3C/p%3E%22)%0D%0A sb.assert_element(%22html %3E body%22)%0D%0A sb.assert_text(%22Hello%22, %...
1566f5f18bc42df93a73ecd2e502b93ed3c7b24b
handle for missing metadata
edit-value-similarity.py
edit-value-similarity.py
#!/usr/bin/env python2.7 # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "...
Python
0.000024
@@ -2297,25 +2297,41 @@ (file2)%0A -%0A + try:%0A @@ -2436,16 +2436,70 @@ eys()) +%0A except KeyError:%0A continue
f31fb6a06c9f0126f43e7b1208502f67f7605d33
Add the-love-letter-mistery
the-love-letter-mystery/solution.py
the-love-letter-mystery/solution.py
Python
0.999996
@@ -0,0 +1,455 @@ +from math import fabs%0A%0A%0Adef solve(string):%0A %22%22%22%0A abc -%3E abb -%3E aba (2)%0A abcba (0)%0A abcd -%3E abcc -%3E abcb -%3E abca -%3E abba (4)%0A cba -%3E bba -%3E aba (2)%0A %22%22%22%0A if len(string) == 1:%0A return True%0A%0A ords = %5Bord(each) for eac...
4ebcc5980813207fa12108d7c5b9b7971e432502
remove unused code
corehq/apps/userreports/reports/view.py
corehq/apps/userreports/reports/view.py
import json import os import tempfile from StringIO import StringIO from django.core.urlresolvers import reverse from django.http import HttpResponse from django.views.generic.base import TemplateView from braces.views import JSONResponseMixin from corehq.apps.reports.dispatcher import cls_to_view_login_and_domain from...
Python
0.000017
@@ -5488,75 +5488,8 @@ rt%0A%0A - @property%0A def report_type(self):%0A return self.type%0A%0A
01589a78cbe3bcabd116b9943f23ab3e8bc6a158
Create irrigate.py
device/src/irrigate.py
device/src/irrigate.py
Python
0.000001
@@ -0,0 +1,289 @@ +#!/usr/bin/env python%0A#In this project, I use a servo to simulate the water tap.%0A#Roating to 90 angle suggest that the water tap is open, and 0 angle means close.%0Afrom pyb import Servo%0Aservo=Servo(1) # X1%0Adef irrigate_start():%0A servo.angle(90)%0A %0Adef irrigate_stop():%0A servo.angle(...
a2296ae2165b60ba182d540f729a099183169c92
Add problem 40, decimal fraction digits
problem_40.py
problem_40.py
Python
0.999999
@@ -0,0 +1,388 @@ +from time import time%0A%0A%0Adef main():%0A fractional_part = ''%0A%0A i = 1%0A while len(fractional_part) %3C 1000000:%0A fractional_part += str(i)%0A i += 1%0A%0A prod = 1%0A for i in %5B1, 10, 100, 1000, 10000, 100000, 1000000%5D:%0A prod *= int(fractional_part...
e9b6a27a423e765033d04801762f9f0356cd992a
Add urls.py ,placeholder for urls mappings in the plots app
plots/urls.py
plots/urls.py
Python
0.000001
@@ -0,0 +1,65 @@ +__author__ = 'ankesh'%0Afrom django.conf.urls import patterns, url%0A
1545c195c65e96e55bf5432538ff3141c60f5149
bits required to convert A to B
bitsToConvert.py
bitsToConvert.py
Python
0.999491
@@ -0,0 +1,239 @@ +def bit_req(A,B):%0A%09%22%22%22%0A%09Bits required to convert int A to int B%0A%09%22%22%22%0A%09c=A%5EB%0A%09return countOnes(c)%0A%0Adef countOnes(c):%0A%09count=0%0A%09if c == 1:%0A%09%09return 1%0A%09while(c%3E=1):%0A%09%09b=c%252%0A%09%09if b == 1:%0A%09%09%09count+=1%0A%09%09c=c//2%0A%09return...
dc1bcdfed7439e1e00fdcad058fd9acbc1fac466
add initadmin to management base commands
fiduswriter/base/management/commands/initadmin.py
fiduswriter/base/management/commands/initadmin.py
Python
0.000001
@@ -0,0 +1,1145 @@ +# code adapted by github.com/jobdiogenes from https://github.com/dkarchmer/aws-eb-docker-django/blob/master/authentication/manage%0A# used to help automation install like in docker.%0A# Create admins accounts if no users exists.%0A# Password 'admin' is used unless defined by ADMIN_PASSWORD %0Afrom d...
dba312802cbf73f54c7cc347d45430ac0d8f016c
add TicketFactory
tickets/tests/factories.py
tickets/tests/factories.py
Python
0
@@ -0,0 +1,285 @@ +from django.contrib.auth.models import User%0Aimport factory%0A%0Afrom tickets.models import Ticket%0A%0A%0Aclass UserFactory(factory.Factory):%0A FACTORY_FOR = User%0A%0Aclass TicketFactory(factory.Factory):%0A FACTORY_FOR = Ticket%0A %0A creator = factory.LazyAttribute(lambda a: UserFac...
9d77092729e534b19d75b38dd700df25a009fa49
Add script to convexify the energies of a conservation tracking JSON model
toolbox/convexify_costs.py
toolbox/convexify_costs.py
Python
0.000002
@@ -0,0 +1,2146 @@ +import sys%0Aimport commentjson as json%0Aimport os%0Aimport argparse%0Aimport numpy as np%0A%0Adef listify(l):%0A return %5B%5Be%5D for e in l%5D%0A%0Adef convexify(l):%0A%09features = np.array(l)%0A%09if features.shape%5B1%5D != 1:%0A%09%09raise InvalidArgumentException('This script can only co...
6588940418d34a6ac83ed620186319c9c1e30e3c
Correct import
scripts/runsizes.py
scripts/runsizes.py
#!/usr/bin/env python """Gets filesize of a first level of directories and sends it to a CouchDB instance. Not using os.path.getsize neither os.stat.st_size since they report inaccurate filesizes: http://stackoverflow.com/questions/1392413/calculating-a-directory-size-using-python """ # TODO: Manage depth of root (ho...
Python
0.000031
@@ -597,21 +597,16 @@ import -load_ config%0A%0A
9090f48b5abb5c60c8629613724ff7309dee07f5
Fix restructured text rendering in simple_osmesa.py
examples/offscreen/simple_osmesa.py
examples/offscreen/simple_osmesa.py
# -*- coding: utf-8 -*- # vispy: testskip # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ This is a simple osmesa example that produce an image of a cube If you have both osmesa and normal (X) OpenGL installed, execute with something like the ...
Python
0.000424
@@ -357,11 +357,12 @@ ries - +: :%0A +%0A @@ -410,28 +410,24 @@ GLESv2.so %5C%0A - LD_LIBRA @@ -462,20 +462,16 @@ /lib/ %5C%0A - OSME @@ -521,20 +521,16 @@ sa.so %5C%0A - pyth
a951a29062f1fb7946b4d227f6fa0b3b3d5b9a04
Add a bindings.gyp file for use with node-gyp.
bindings.gyp
bindings.gyp
Python
0
@@ -0,0 +1,139 @@ +%7B%0A 'targets': %5B%0A %7B%0A 'target_name': 'serialport_native',%0A 'sources': %5B 'serialport_native/serialport_native.cc' %5D%0A %7D%0A %5D%0A%7D%0A
34f7d76cb1f56280b636f4b98968c17a8b9a2c14
Create TestRSS.py
TestRSS.py
TestRSS.py
Python
0
@@ -0,0 +1,351 @@ +'''%0ACreated on Jul 17, 2014%0A%0A@author: ALLWINLEOPRAKASH%0A'''%0A%0Aimport RssFeedCollector as rs%0Aimport datetime %0A%0A%0Ars.OPFileCheck()%0A%0Avar = 1%0A%0A%0A# Continuous active loop to retrieve real time data%0Awhile var == 1:%0A sec = datetime.datetime.now().second%0A # Check and app...
3024ff0fe1343dac11adba82ec28d3a27f4e0d70
add TXT
gallery/file_modules/txt.py
gallery/file_modules/txt.py
Python
0.00004
@@ -0,0 +1,237 @@ +import os%0A%0Afrom gallery.file_modules import FileModule%0Afrom gallery.util import hash_file%0A%0Aclass TXTFile(FileModule):%0A%0A def __init__(self, file_path):%0A FileModule.__init__(self, file_path)%0A self.mime_type = %22text/plain%22%0A
35da1d5dd86fd597f31c2fb816b2b7e3f89ab021
Revert "removing settings.py, since it's ignored by .gitignore"
csc_new/csc_new/settings.py
csc_new/csc_new/settings.py
Python
0
@@ -0,0 +1,2453 @@ +%22%22%22%0ADjango settings for csc_new project.%0A%0AFor more information on this file, see%0Ahttps://docs.djangoproject.com/en/1.6/topics/settings/%0A%0AFor the full list of settings and their values, see%0Ahttps://docs.djangoproject.com/en/1.6/ref/settings/%0A%22%22%22%0A%0A# Build paths inside t...
d4c30f4e70dabe18c73eeb0feaa49ee4dcead2ff
Create groceries.py
groceries.py
groceries.py
Python
0.002157
@@ -0,0 +1,410 @@ +groceries = %5B%22banana%22, %22orange%22, %22apple%22%5D%0A%0Astock = %7B %22banana%22: 6,%0A %22apple%22: 0,%0A %22orange%22: 32,%0A %22pear%22: 15%0A%7D%0A %0Aprices = %7B %22banana%22: 4,%0A %22apple%22: 2,%0A %22orange%22: 1.5,%0A %22pear%22: 3%0A%7D%0A%0A# Write your code be...
a8dc3e1143290495ab56b30660e7fbe58fcaa36c
add analysis script
v01/analyse_data.py
v01/analyse_data.py
Python
0.000001
@@ -0,0 +1,1273 @@ +# this analysis script finds the photons with the highest energy for the crab nebula from the 2FHL event list%0Afrom numpy import *%0A%0A%0Afrom astropy.io import fits%0Ahdulist=fits.open('gll_psch_v08.fit.gz')%0Aprint hdulist.info()%0A%0Adatalist=hdulist%5B1%5D #hdu=1 is the source catalog, f...
52a83fa5fc6ca029c87b50c64e0e3d08bdf1d081
Create pyton_test.py
pyton_test.py
pyton_test.py
Python
0.000002
@@ -0,0 +1,691 @@ +import RPi.GPIO as GPIO%0AGPIO.setmode(GPIO.BCM)%0A%0AGPIO.setup(2, GPIO.IN, pull_up_down=GPIO.PUD_UP)%0AGPIO.setup(7, GPIO.IN, pull_up_down=GPIO.PUD_UP)%0A%0AGPIO.setup(17, GPIO.OUT)%0AGPIO.setup(22, GPIO.OUT)%0A%0A%0Adef verantavalo(channel):%0A time.sleep(0.1)%0A if GPIO.input(2) != GPIO.HIG...
338470581269d645c7bdd908ea6e17f2246bad12
Move the backend path in the deploy script
fabfile.py
fabfile.py
# fabricfile to deploy build # # depends on installation of fabric - pip install fabric virtualenv # # example invocation # $ fab -H jenkins@uf04.seedscientific.com deploy # $ fab -H ubuntu@52.0.138.67 deploy # $ fab -H ubuntu@uf04.seedscientific.com deploy from fabric.api import local, run, cd, put ## global variabl...
Python
0
@@ -498,24 +498,29 @@ = '/var/www/ +apps/ polio/'%0Aremo @@ -1813,34 +1813,32 @@ run(%22rm -rf %25s -/* %22 %25 remote_front @@ -1847,24 +1847,25 @@ d_path)%0A +%0A run(%22rm @@ -1860,24 +1860,484 @@ -run(%22rm -rf %25s/* +# Delete all Python, HTML, and SQL files. We don't delete the entire%0A ...
096ea11231668e0fd03c1628c255cf0b08c0bfc3
Create HouseCupBot.py
HouseCupBot.py
HouseCupBot.py
Python
0
@@ -0,0 +1,1624 @@ +import praw, time, sqlite3, operator, re%0A%0A#Bot setup%0Ausername = 'HouseCupBot'%0Apassword = ''%0AuserAgent = 'HouseCupBot. Keeps a running score for Hogwarts houses. Author: u/d_web'%0Ahouses = %5B'gryffindor','hufflepuff','ravenclaw','slytherin'%5D%0AtagLine = 'HouseCupBot by u/D_Web. T...
5411224e9683c9ee6a8b06ff9b666a93948e6a69
Create example.py
example.py
example.py
Python
0.000001
@@ -0,0 +1,454 @@ +#TABLE LOAD%0A%0Aself.table_data = QtGui.QTableView()%0Acols=%5B'rowid','data'%5D%0Adata = %5B(1,'data1'),(2,'data2'),%5D%0Atable.load(self.table_data,data,cols,order=0,col=0)%0A%0A#TABLE SORT%0A%0Adef context(self,pos):%0A%09%09mainmenu = QtGui.QMenu(%22Menu%22, self)%0A%09%09mainmenu.addAction(%22S...
8e1e905f5dbdaccc396ec74fb7c05a93d79c35ff
Add example to show failure for #62.
examples/example_blueprint.py
examples/example_blueprint.py
Python
0
@@ -0,0 +1,517 @@ +from flask import Blueprint, Flask, jsonify%0A%0Afrom flasgger import Swagger%0Afrom flasgger.utils import swag_from%0A%0A%0Aapp = Flask(__name__)%0A%0Aexample_blueprint = Blueprint(%22example_blueprint%22, __name__)%0A%0A%0A@example_blueprint.route('/usernames', methods=%5B'GET', 'POST'%5D)%0A@swag_...
158d3c6478f4d9d83d166504febc2ba1ba4e58f7
Add example.
example.py
example.py
Python
0.000001
@@ -0,0 +1,1177 @@ +# Licensed to Tomaz Muraus under one or more%0A# contributor license agreements. See the NOTICE file distributed with%0A# this work for additional information regarding copyright ownership.%0A# Tomaz muraus licenses this file to You under the Apache License, Version 2.0%0A# (the %22License%22); you...
7c87974c862184df8df40595ba26f5ff7082c4a6
Add a CIB routing fuzzer
fuzzers/LIFCL/002-cib-routing/fuzzer.py
fuzzers/LIFCL/002-cib-routing/fuzzer.py
Python
0
@@ -0,0 +1,1879 @@ +from fuzzconfig import FuzzConfig%0Afrom interconnect import fuzz_interconnect%0Aimport re%0A%0Aconfigs = %5B%0A ((1, 18), FuzzConfig(job=%22CIBTROUTE%22, device=%22LIFCL-40%22, sv=%22../shared/route_40.v%22, tiles=%5B%22CIB_R1C18:CIB_T%22%5D), set(%5B%22TAP_CIBT_R1C14:TAP_CIBT%22%5D)),%0A ((1...
bbbdaed24390b7c5808cc7233b6ad0566c09f188
add python C wrapper; mostly empty for now
galpy/orbit_src/integratePlanarOrbit.py
galpy/orbit_src/integratePlanarOrbit.py
Python
0
@@ -0,0 +1,593 @@ +def integratePlanarOrbit_leapfrog(pot,yo,t,rtol=None,atol=None):%0A %22%22%22%0A NAME:%0A integratePlanarOrbit_leapfrog%0A PURPOSE:%0A leapfrog integrate an ode for a planarOrbit%0A INPUT:%0A pot - Potential or list of such instances%0A yo - initial condition %5Bq,...
7b560ea31ad4e308d01926f1e73cb6deb6b24a6a
Clarify location of settings/local.py-dist
airmozilla/settings/__init__.py
airmozilla/settings/__init__.py
from .base import * try: from .local import * except ImportError, exc: exc.args = tuple(['%s (did you rename settings/local.py-dist?)' % exc.args[0]]) raise exc
Python
0.000287
@@ -110,16 +110,27 @@ rename +airmozilla/ settings
70b21201df3c1b6e476f8dbfee53490bd16a6d00
Add Fabric fabfile for project management
fabfile.py
fabfile.py
Python
0
@@ -0,0 +1,1587 @@ +%22%22%22%0AFabric fabfile for Davies cave survey package.%0A%0ARun %60pip install fabric%60 to install, then %60fab --list%60 to see available commands.%0A%22%22%22%0A%0Afrom fabric.api import local, lcd, with_settings%0A%0A%0Adef test():%0A %22%22%22Run project unit tests.%22%22%22%0A local(...
609784dc106e01800eed0a7ccf88f82d6977d408
Add missed language update migrations
babybuddy/migrations/0008_auto_20200120_0622.py
babybuddy/migrations/0008_auto_20200120_0622.py
Python
0
@@ -0,0 +1,554 @@ +# Generated by Django 3.0.2 on 2020-01-20 14:22%0A%0Afrom django.db import migrations, models%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('babybuddy', '0007_auto_20190607_1422'),%0A %5D%0A%0A operations = %5B%0A migrations.AlterField(%0A ...
13a45b0b1ab811d6e0ba131380961fba59e8963c
Create w3_1.py
w3_1.py
w3_1.py
Python
0.000482
@@ -0,0 +1,14 @@ +print(%22test%22)%0A
ce344f340682f81837ae5b71e7c9e17e276c953d
Create nxn.py
nxn/nxn.py
nxn/nxn.py
Python
0.000005
@@ -0,0 +1,273 @@ +N = int(input())%0A%0Aliste = %5B%5D%0A%0Afor i in range(0,N):%0A liste.append(list(map(int, input().split(%22 %22))))%0A%0Aprisum = 0%0Asecsum = 0%0A%0Afor i in range(0,N):%0A prisum += liste%5Bi%5D%5Bi%5D%0A%0Aj = 0%0Afor i in range(N-1,-1,-1):%0A secsum += liste%5Bi%5D%5Bj%5D%0A j += 1...
257bc9e6538d8320603b29465a02000646833805
Add a script to choose randomly from a list. I needed it to choose a random desktop background.
choose_random.py
choose_random.py
Python
0
@@ -0,0 +1,174 @@ +#!/usr/bin/env python3%0A%0Aimport random%0Aimport sys%0A%0Aif __name__ == %22__main__%22:%0A options = list(sys.stdin) # list of lines of text%0A print(random.choice(options), end='')%0A
271999dae2cd7f736b66c68f5e2454aac995a10d
Call `process()` from Python
embed.py
embed.py
Python
0.000004
@@ -0,0 +1,96 @@ +from ctypes import cdll%0A%0Alib = cdll.LoadLibrary(%22target/release/libembed.dylib%22)%0A%0Alib.process()%0A
9416747193dfd597bf15d855d4673cb5b16ce76e
Add python methods to handle api end-points
api/api.py
api/api.py
Python
0.000001
@@ -0,0 +1,867 @@ +from connexion.resolver import RestyResolver%0Afrom flask import current_app, request, abort, jsonify, g, url_for%0Afrom flask_httpauth import HTTPAuth%0A%0A__all__ = %5B%22login%22, %22register%22, %22add_bucket_list%22, %22get_bucket_lists%22,%0A %22get_bucket_list%22,%22put_bucket_list%2...
b0dfbb63a306255bc08eae2e7dd9360ca56a366f
Add default value of access requests enabled to exsisting projects made before model added
osf/migrations/0100_set_access_request_enabled.py
osf/migrations/0100_set_access_request_enabled.py
Python
0
@@ -0,0 +1,1824 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.11.11 on 2018-04-30 18:34%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models ,connection%0A%0Afrom osf.models import AbstractNode%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ...
1c511dcc4156d68f84b97067433ca151f549df1b
Add test for protocol.
flowirc/tests/test_IRCClientProtocol.py
flowirc/tests/test_IRCClientProtocol.py
Python
0.000002
@@ -0,0 +1,2744 @@ +from unittest import TestCase%0Afrom unittest.mock import Mock, patch, call, MagicMock%0Afrom flowirc.client import IRCClientProtocol%0A%0A%0A__author__ = 'olle.lundberg'%0A%0A%0Aclass TestIRCClientProtocol(TestCase):%0A def setUp(self):%0A self.proto = IRCClientProtocol()%0A self.t...
2af3b158f1bc4f528f3d4aa7efb8cd595caca0a5
Add dump/html add-on #69 (dump/html)
jumeaux/addons/dump/html.py
jumeaux/addons/dump/html.py
Python
0
@@ -0,0 +1,1671 @@ +# -*- coding:utf-8 -*-%0A%0Afrom bs4 import BeautifulSoup%0Afrom owlmixin import OwlMixin, TList%0A%0Afrom jumeaux.addons.dump import DumpExecutor%0Afrom jumeaux.logger import Logger%0Afrom jumeaux.models import DumpAddOnPayload%0A%0Alogger: Logger = Logger(__name__)%0ALOG_PREFIX = %22%5Bdump/html%5...
575fd05ace28ed392591228bfdb01f6e739eeff4
Create RobotMemory.py
RobotMemory.py
RobotMemory.py
Python
0
@@ -0,0 +1,1791 @@ +#-------------------------------------------------------------------------------%0A# Name: Robot Memory%0A# Purpose: Stores memory about where robot has been%0A#%0A# Author: Liam McInory%0A#%0A# Created: 06/03/2014%0A# Copyright: (c) Liam 2014%0A# Licence: GNU%0A#----------...
5579100489031b941617a93baef398212db23d6e
Update openerp
__openerp__.py
__openerp__.py
{ 'name': "Gantt Improvement", 'author' : 'Stéphane Codazzi @ TeMPO-consulting', 'category': 'Project', 'sequence': 1, 'description': """ Gantt Improvement ================= """, 'version': '0.3', 'depends': ['web', 'web_gantt'], 'js': [ 'static/src/js/gantt.js', 'sta...
Python
0.000001
@@ -69,17 +69,17 @@ @ TeMPO- -c +C onsultin
64184fa97e9bc55dc50ed492b0b03896a7f5328d
Add degree_size
problem/pop_map/grid/degree_size.py
problem/pop_map/grid/degree_size.py
Python
0.999462
@@ -0,0 +1,1627 @@ +#! /usr/bin/env python%0A%0A# Copyright 2020 John Hanley.%0A#%0A# Permission is hereby granted, free of charge, to any person obtaining a%0A# copy of this software and associated documentation files (the %22Software%22),%0A# to deal in the Software without restriction, including without limitation%0...
aa1fbbaca3e26904855a33014c5077867df54342
Add Vetinari example
examples/vetinari/vetinari.py
examples/vetinari/vetinari.py
Python
0
@@ -0,0 +1,1473 @@ +#! /usr/bin/env python%0A# -*- coding: utf-8 -*-%0A'''A Lord Vetinari clock API.'''%0A%0Afrom time import strftime, localtime, time%0Afrom random import randint%0Afrom uwsgi import async_sleep as sleep%0A%0Afrom swaggery.keywords import *%0A%0A%0Aclass TickStream(Model):%0A%0A '''A stream of cloc...
ef14a21d5bbd2b0c98ac20eb455bd13402749463
fix bug
app/api_1_0/activities.py
app/api_1_0/activities.py
# -*- coding:utf8 -*- # Author: shizhenyu96@gamil.com # github: https://github.com/imndszy import time from flask import request, jsonify, session from flask_login import login_required from app.api_1_0 import api from app.admin.functions import admin_login_required from app import db from app.models import Activity ...
Python
0.000001
@@ -178,16 +178,30 @@ required +, current_user %0A%0Afrom a @@ -577,36 +577,8 @@ pty' -, stuid=session.get('stuid') )%0A @@ -681,36 +681,8 @@ list -, stuid=session.get('stuid') )%0A @@ -2602,36 +2602,8 @@ 'ok' -, stuid=session.get('stuid') )%0A @@ -2640,36 +2640,8 @@ ail' -, stuid=session.get('stuid') )...
eb8f749b2094d61737af496fb6e6c90bad423761
add disk_usage.py example script
examples/disk_usage.py
examples/disk_usage.py
Python
0.000001
@@ -0,0 +1,1172 @@ +#!/usr/bin/env python%0A%0A%22%22%22%0AList all mounted disk partitions a-la %22df%22 command.%0A%22%22%22%0A%0Aimport sys%0Aimport psutil%0A%0Adef convert_bytes(n):%0A if n == 0:%0A return %220B%22%0A symbols = ('k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y')%0A prefix = %7B%7D%0A for i,...
5721ec07b9a40d2f8f5e04bd2c37c1e015fb99df
add an example client, nsq_to_nsq.py
examples/nsq_to_nsq.py
examples/nsq_to_nsq.py
Python
0.000001
@@ -0,0 +1,2448 @@ +# nsq_to_nsq.py%0A# Written by Ryder Moody and Jehiah Czebotar.%0A# Slower than the golang nsq_to_nsq included with nsqd, but useful as a%0A# starting point for a message transforming client written in python.%0A%0Aimport tornado.options%0Afrom nsq import Reader, run%0Afrom nsq import Writer, Error%...
46d6a2a92b79816592af5d3af1fafd218aa3533f
Clarify that changelog entry indicates Trellis version (#987)
lib/trellis/utils/output.py
lib/trellis/utils/output.py
# Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os.path import platform import re import textwrap from ansible import __version__ from ansible.module_utils._text import to_text def system(vagrant_version=None): # Get most recent Trelli...
Python
0.000042
@@ -1021,18 +1021,40 @@ Trellis -at +version (per changelog): %22%7B0%7D%22'.
f2a824715216ca637251a19648f52c030a8abb30
Update handler.py
tendrl/node_agent/message/handler.py
tendrl/node_agent/message/handler.py
import os from io import BlockingIOError import sys import traceback import gevent.event import gevent.greenlet from gevent.server import StreamServer from gevent import socket from gevent.socket import error as socket_error from gevent.socket import timeout as socket_timeout from tendrl.commons.message import Mess...
Python
0.000001
@@ -2510,19 +2510,25 @@ ove( -socket_path +MESSAGE_SOCK_PATH )%0A
39c50fe7d4713b9d0a8e4618a829d94b4fe7456c
Add code to test van der pol model
van_der_pol_sync.py
van_der_pol_sync.py
Python
0
@@ -0,0 +1,909 @@ +%0Afrom __future__ import division%0A%0Aimport sys%0Aimport numpy as np%0Asys.path.append('/media/ixaxaar/Steam/src/nest/local/lib/python2.7/site-packages/')%0Aimport nest%0Aimport nest.raster_plot%0Aimport nest.voltage_trace%0Aimport uuid%0Aimport pylab%0A%0Anest.SetKernelStatus(%7B%22resolution%22:...
161802f87065a6b724c8c02357edf8cbb5b38f1a
Add a rosenbrock example.
examples/rosenbrock.py
examples/rosenbrock.py
Python
0
@@ -0,0 +1,1840 @@ +import climate%0Aimport downhill%0Aimport matplotlib.pyplot as plt%0Aimport matplotlib.animation as anim%0Aimport mpl_toolkits.mplot3d.axes3d%0Aimport numpy as np%0Aimport theano%0Aimport theano.tensor as TT%0A%0Aclimate.enable_default_logging()%0A%0A%0A_, ax = plt.subplots(1, 1)%0A%0A# run several ...
d14130c30f776d9b10ab48c993096dce251aba28
Add script to get list of HRS station IDs
get_hrs_cc_streamflow_list.py
get_hrs_cc_streamflow_list.py
Python
0
@@ -0,0 +1,1786 @@ +import pandas as pd%0Afrom kiwis_pie import KIWIS%0A%0Ak = KIWIS('http://www.bom.gov.au/waterdata/services')%0A%0Adef get_cc_hrs_station_list(update = False):%0A %22%22%22%0A Return list of station IDs that exist in HRS and are supplied by providers that license their data under the Creati...
cbb7fd7d31bf103e0e9c7b385926b61d42dbb8ec
add __main__ file
homework_parser/__main__.py
homework_parser/__main__.py
Python
0.000099
@@ -0,0 +1,699 @@ +from homework_parser.file_parser import detect_plugin%0A%0Afrom sys import argv, stdin, stdout, stderr, exit%0A%0Aif __name__ == %22__main__%22:%0A in_format = argv%5B1%5D%0A out_format = argv%5B2%5D%0A out_plugin = detect_plugin(out_format)%0A%0A if out_plugin is None:%0A print %3...
de5c4e57ccedf0b5c9897bc2046b79ac19a18a0c
add solution for Remove Duplicates from Sorted List
src/removeDuplicatesFromSortedList.py
src/removeDuplicatesFromSortedList.py
Python
0
@@ -0,0 +1,449 @@ +# 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 # @return a ListNode%0A%0A def deleteDuplicates(self, head):%0A p1 = head%0A whi...
aec88e4f9cf2d9ee7f9fe876a7b884028b6c190c
Add Script to generate a container schema from DockerFile
bin/buildHierarchiqueDiagram.py
bin/buildHierarchiqueDiagram.py
Python
0.000001
@@ -0,0 +1,1896 @@ +#!/usr/bin/env/python%0D%0A%0D%0Afrom datetime import datetime%0D%0Aimport os%0D%0Aimport argparse%0D%0Aimport re%0D%0Afrom graphviz import Digraph%0D%0A%0D%0APATH = os.path.dirname(os.path.abspath(__file__))%0D%0AFROM_REGEX = re.compile(ur'%5EFROM%5Cs+(?P%3Cimage%3E%5B%5E:%5D+)(:(?P%3Ctag%3E.+))?',...
77b7b4603466c390bf2dc61428c64e85f7babbb0
create a new file test_cut_milestone.py
test/unit_test/test_cut_milestone.py
test/unit_test/test_cut_milestone.py
Python
0.000004
@@ -0,0 +1,1778 @@ +from lexos.processors.prepare.cutter import cut_by_milestone%0A%0A%0Aclass TestMileStone:%0A def test_milestone_regular(self):%0A text_content = %22The bobcat slept all day..%22%0A milestone = %22bobcat%22%0A assert cut_by_milestone(text_content, milestone) == %5B%22The %22,%...
3284a384a4147857c16462c0fde6a4dec39de2b7
Read temperature
1-wire/ds18b20/python/ds18b20.py
1-wire/ds18b20/python/ds18b20.py
Python
0
@@ -0,0 +1,648 @@ +import glob%0Aimport time%0A%0Abase_dir = '/sys/bus/w1/devices/'%0Adevice_folder = glob.glob(base_dir + '28*')%5B0%5D%0Adevice_file = device_folder + '/w1_slave'%0A%0Adef read_temp_raw():%0A%09f = open(device_file, 'r')%0A%09lines = f.readlines()%0A%09f.close()%0A%09return lines%0A%0Adef read_temp():...
89a65c75ade2629e2b67a9887e27a177617dd39e
add armes
armes/armes.py
armes/armes.py
Python
0.999991
@@ -0,0 +1,195 @@ +class Arme(object) :%0A%0A%09def __init__(self): %0A%09%09'''Caracteristiques de la classe arme'''%0A%09%09pass%0A%0A%09def tirer(self, position, vecteur) :%0A%09%09'''cree et envoie un projectile dans une direction'''%0A%09%09pass
244b7a3b8d3bd32517effdd4b7bab35628a6db61
move init db
flask_again/init_db.py
flask_again/init_db.py
Python
0
@@ -0,0 +1,42 @@ +from aone_app.db import init_db%0Ainit_db()%0A
d054178a75caecfb20a5c4989dc4e9cd7bf4a853
add grayscale conversion test - refs #1454
tests/python_tests/grayscale_test.py
tests/python_tests/grayscale_test.py
Python
0
@@ -0,0 +1,320 @@ +import mapnik%0Afrom nose.tools import *%0A%0Adef test_grayscale_conversion():%0A im = mapnik.Image(2,2)%0A im.background = mapnik.Color('white')%0A im.set_grayscale_to_alpha()%0A pixel = im.get_pixel(0,0)%0A eq_((pixel %3E%3E 24) & 0xff,255);%0A%0Aif __name__ == %22__main__%22:%0A ...
a76d8287d5ad0b9d43c4b509b2b42eb0a7fa03a2
Add asyncio slackbot
slackbot_asyncio.py
slackbot_asyncio.py
Python
0.000003
@@ -0,0 +1,2863 @@ +import asyncio%0Aimport json%0Aimport signal%0A%0Aimport aiohttp%0A%0Afrom config import DEBUG, TOKEN%0A%0Aimport websockets%0A%0A%0ARUNNING = True%0A%0A%0Aasync def api_call(method, data=None, file=None, token=TOKEN):%0A %22%22%22Perform an API call to Slack.%0A :param method: Slack API metho...
f4ed2ec503bc12fe645b6d79a330787d2dde6c8e
Bump version 0.15.0rc7 --> 0.15.0rc8
lbrynet/__init__.py
lbrynet/__init__.py
import logging __version__ = "0.15.0rc7" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler())
Python
0
@@ -36,9 +36,9 @@ .0rc -7 +8 %22%0Ave
1f1da12d49b9aa9b28a937fdf877bb990eb0bd2a
add convenience script to sync local from test
scratchpad/sync/sync_from_remote.py
scratchpad/sync/sync_from_remote.py
Python
0
@@ -0,0 +1,1053 @@ +import esprit%0Afrom portality.core import app%0A%0Aremote = esprit.raw.Connection(%22http://ooz.cottagelabs.com:9200%22, %22doaj%22)%0Alocal = esprit.raw.Connection(%22http://localhost:9200%22, %22doaj%22)%0A%0Aesprit.tasks.copy(remote, %22journal%22, local, %22journal%22)%0Aesprit.tasks.copy(remot...
9d7166e489b425acd64e1294236a821d76270cfc
Create letter_game_v1.1.py
letter_game_v1.1.py
letter_game_v1.1.py
Python
0.000032
@@ -0,0 +1,1631 @@ +# only guess a single letter%0A# only guess an alphabetic%0A# user can play again%0A# strikes max up to 7%0A# draw guesses letter, spaces, and strikes%0A%0Aimport random%0A%0Awords = %5B%0A 'cow',%0A 'cat',%0A 'crocodile',%0A 'lion',%0A 'tiger',%0A 'mouse',%0A 'goat',%0A 'gir...
e1021970c445acd8ba3acc24294611bebc63bc5a
test if weather forecast saves data in the db
server/forecasting/tests/test_weather_forecast.py
server/forecasting/tests/test_weather_forecast.py
Python
0.000001
@@ -0,0 +1,402 @@ +#import unittest%0Afrom server.forecasting.forecasting.weather import WeatherForecast%0Afrom django.test import TestCase%0A#from server.models import Device, Sensor, SensorEntry%0A%0A''''class ForecastingTest(unittest.TestCase):%0A%09def test_test(self):%0A%09%09cast = WeatherForecast()%0A'''%0Aclass...
177fae394115dd0777efa9673198137eb57b1a50
Test docstrings.
test/test_basic_logic.py
test/test_basic_logic.py
# -*- coding: utf-8 -*- """ test_basic_logic ~~~~~~~~~~~~~~~~ Test the basic logic of the h2 state machines. """ import pytest import h2.connection import h2.exceptions class TestBasicClient(object): """ Basic client-side tests. """ example_request_headers = [ (':authority', 'example.com'), ...
Python
0
@@ -536,32 +536,109 @@ nnection(self):%0A + %22%22%22%0A Client connections emit the HTTP/2 preamble.%0A %22%22%22%0A c = h2.c @@ -654,32 +654,32 @@ .H2Connection()%0A - events = @@ -836,32 +836,109 @@ _headers(self):%0A + %22%22%22%0A Single headers frames are co...
f7d88f43779f94dc2623e4726bd50f997104865f
add compress-the-string
contest/pythonist3/compress-the-string/compress-the-string.py
contest/pythonist3/compress-the-string/compress-the-string.py
Python
0.999703
@@ -0,0 +1,274 @@ +# -*- coding: utf-8 -*-%0A# @Author: Zeyuan Shang%0A# @Date: 2016-05-13 12:35:11%0A# @Last Modified by: Zeyuan Shang%0A# @Last Modified time: 2016-05-13 12:35:16%0Afrom itertools import groupby%0A%0As = raw_input()%0Afor k, g in groupby(s):%0A print '(%7B%7D, %7B%7D)'.format(len(list(g)), k),
bf7bfce64b2964cd6adb515788420747fcbedeae
Add an app.wsgi just in case
app.wsgi
app.wsgi
Python
0
@@ -0,0 +1,83 @@ +#!/usr/bin/env python%0A%0Aimport itty%0A%0Aimport leapreader%0A%0A%0Aapp = itty.handle_request%0A%0A
ada3083c38fe75f139079e93b7c544540fe95e1a
add sources/ package
sources/__init__.py
sources/__init__.py
Python
0
@@ -0,0 +1,124 @@ +import sqlaload as sl%0A%0Afrom lobbyfacts.core import app%0A%0Adef etl_engine():%0A return sl.connect(app.config.get('ETL_URL'))%0A%0A
1e2b5e699114ba4e54dc77a56858cdcd2f29a87c
Add support for subscriptions
homeassistant/components/switch/wemo.py
homeassistant/components/switch/wemo.py
""" homeassistant.components.switch.wemo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support for WeMo switches. For more details about this component, please refer to the documentation at https://home-assistant.io/components/switch.wemo/ """ import logging from homeassistant.components.switch import SwitchDevice from homeas...
Python
0
@@ -370,16 +370,18 @@ TANDBY%0A%0A +# REQUIREM @@ -405,16 +405,16 @@ 0.3.3'%5D%0A - _LOGGER @@ -444,16 +444,51 @@ ame__)%0A%0A +_WEMO_SUBSCRIPTION_REGISTRY = None%0A %0A# pylin @@ -718,16 +718,213 @@ covery%0A%0A + global _WEMO_SUBSCRIPTION_REGISTRY%0A if _WEMO_SUBSCRIPTION_REGISTRY is None:%0A _...
78a8fef6123b81011b3d896af69470d249570b05
Add ls.py
kadai3/ls.py
kadai3/ls.py
Python
0.000093
@@ -0,0 +1,1804 @@ +# -*- coding: utf-8 -*-%0A%0Aimport sys%0Aimport os%0Aimport time%0Aimport argparse%0Aimport re%0Afrom tarfile import filemode%0Aimport pwd%0Aimport grp%0A%0Aparser = argparse.ArgumentParser()%0Aparser.add_argument(%22path%22, %0A metavar=%22path%22,%0A nargs=%2...
0223ae91b669ce12b16d8b89456f3291eeed441e
Add log command.
src/commands/log.py
src/commands/log.py
Python
0.000001
@@ -0,0 +1,2334 @@ +#%0A# Copyright (c) 2012 Joshua Hughes %3Ckivhift@gmail.com%3E%0A#%0Aimport os%0Aimport subprocess%0Aimport tempfile%0Aimport threading%0A%0Aimport qmk%0Aimport pu.utils%0A%0Aclass LogCommand(qmk.Command):%0A '''Make log entries using restructured text.'''%0A def __init__(self):%0A supe...
c4d583966ef1a4d9bdb57715ef5e766ba62fbed6
Add tests for the Django directory
jacquard/directory/tests/test_django.py
jacquard/directory/tests/test_django.py
Python
0
@@ -0,0 +1,1601 @@ +from jacquard.directory.base import UserEntry%0Afrom jacquard.directory.django import DjangoDirectory%0A%0Aimport pytest%0Aimport unittest.mock%0A%0Atry:%0A import sqlalchemy%0Aexcept ImportError:%0A sqlalchemy = None%0A%0A%0Aif sqlalchemy is not None:%0A test_database = sqlalchemy.create_e...
6babb6e64e93ed74a72203fdc67955ae8ca3bfb3
Add a baseline set of _MultiCall performance tests
testing/benchmark.py
testing/benchmark.py
Python
0
@@ -0,0 +1,1155 @@ +%22%22%22%0ABenchmarking and performance tests.%0A%22%22%22%0Aimport pytest%0A%0Afrom pluggy import _MultiCall, HookImpl%0Afrom pluggy import HookspecMarker, HookimplMarker%0A%0A%0Ahookspec = HookspecMarker(%22example%22)%0Ahookimpl = HookimplMarker(%22example%22)%0A%0A%0Adef MC(methods, kwargs, fir...
21dc462b47f5b5577d51119ddd340c518d8cfb94
Add script to rename photos in directory
photos.py
photos.py
Python
0
@@ -0,0 +1,882 @@ +import os%0Afrom datetime import date%0A%0A# Programs at the Coral Gables Art Cinema.%0Aprograms = %5B'1. Main Features', '2. After Hours', '3. Special Screenings',%0A '4. Family Day on Aragon', '5. National Theatre Live',%0A '6. See It in 70mm', '7. Alternative Content'%5D%0A%0...
f182dae6eb0a17f8b7a437694b69b273595f9549
Add YAML export
jrnl/plugins/yaml_exporter.py
jrnl/plugins/yaml_exporter.py
Python
0.000001
@@ -0,0 +1,2836 @@ +#!/usr/bin/env python%0A# encoding: utf-8%0A%0Afrom __future__ import absolute_import, unicode_literals, print_function%0Afrom .text_exporter import TextExporter%0Aimport re%0Aimport sys%0Aimport yaml%0A%0A%0Aclass MarkdownExporter(TextExporter):%0A %22%22%22This Exporter can convert entries and ...
41bd33421f14498737aa0088f2d93b00bb521d7b
implement a viewset controller, capable of containing controllers
julesTk/controller/viewset.py
julesTk/controller/viewset.py
Python
0
@@ -0,0 +1,1838 @@ +%0Afrom . import ViewController%0A%0A%0Aclass ViewSetController(ViewController):%0A%0A def __init__(self, parent, view=None):%0A super(ViewSetController, self).__init__(parent, view)%0A self._controllers = %7B%7D%0A%0A @property%0A def controllers(self):%0A %22%22%22 Di...
8c5fb07b37eebf484c33ca735bd2b9dac5d0dede
solve 1 problem
solutions/nested-list-weight-sum.py
solutions/nested-list-weight-sum.py
Python
0.000027
@@ -0,0 +1,1517 @@ +#!/usr/bin/env python%0A# encoding: utf-8%0A%0A%22%22%22%0Anested-list-weight-sum.py%0A %0ACreated by Shuailong on 2016-03-30.%0A%0Ahttps://leetcode.com/problems/nested-list-weight-sum/.%0A%0A%22%22%22%0A%0A# %22%22%22%0A# This is the interface that allows for creating nested lists.%0A# You should n...
0738b3816db752b8cb678324ff4c113625660b94
add test for pathops.operations.intersection
tests/operations_test.py
tests/operations_test.py
Python
0.000025
@@ -0,0 +1,1306 @@ +from pathops import Path, PathVerb%0Afrom pathops.operations import union, difference, intersection, reverse_difference, xor%0Aimport pytest%0A%0A%0A@pytest.mark.parametrize(%0A %22subject_path, clip_path, expected%22,%0A %5B%0A %5B%0A %5B%0A (PathVerb.MOVE, ((...
f3c11599ef1714f7337191719172614c43b87eff
Add tests.test_OrderedSet.
tests/test_OrderedSet.py
tests/test_OrderedSet.py
Python
0
@@ -0,0 +1,555 @@ +from twisted.trial import unittest%0A%0Afrom better_od import OrderedSet%0A%0A%0Aclass TestOrderedDict(unittest.TestCase):%0A def setUp(self):%0A self.values = 'abcddefg'%0A self.s = OrderedSet(self.values)%0A%0A def test_order(self):%0A expected = list(enumerate('abcdefg')...
7df6189dbfd69c881fedf71676dd4fdbc7dba2f0
Add test for renormalize migration
tests/test_migrations.py
tests/test_migrations.py
import copy import pytest import mock import scrapi from scrapi.linter.document import NormalizedDocument from scrapi import tasks from scrapi import registry from scrapi.migrations import delete from scrapi.migrations import rename # Need to force cassandra to ignore set keyspace from scrapi.processing.cassandra i...
Python
0.000001
@@ -228,16 +228,58 @@ t rename +%0Afrom scrapi.migrations import renormalize %0A%0A# Need @@ -2145,28 +2145,589 @@ .elasticsearch.es = real_es%0A +%0A%0A@pytest.mark.cassandra%0Adef test_renormalize():%0A real_es = scrapi.processing.elasticsearch.es%0A scrapi.processing.elasticsearch.es = mock.MagicMock()%0A ...
85fc51ef3d75d2f78e80b346897d22bebf797424
add mf_helpers
mf2py/mf_helpers.py
mf2py/mf_helpers.py
Python
0.000001
@@ -0,0 +1,399 @@ +def get_url(mf):%0A %22%22%22parses the mf dictionary obtained as returns the URL%22%22%22%0A%0A urls = %5B%5D%0A for item in mf:%0A if isinstance(item, basestring):%0A urls.append(item)%0A else:%0A itemtype = %5Bx for x in item.get('type',%5B%5D) if x.sta...
1831dbd065a8776a77d18e10b44f84c99bca4c75
Add test of simple textcat workflow
spacy/tests/textcat/test_textcat.py
spacy/tests/textcat/test_textcat.py
Python
0.000001
@@ -0,0 +1,553 @@ +from __future__ import unicode_literals%0Afrom ...language import Language%0A%0Adef test_simple_train():%0A nlp = Language()%0A%0A nlp.add_pipe(nlp.create_pipe('textcat'))%0A nlp.get_pipe('textcat').add_label('is_good')%0A%0A nlp.begin_training()%0A%0A for i in range(5):%0A for ...
47af5fc466936f46e05f4ebaf89257e5c731a38e
add test_handle_conversation_after_delete
plugin/test/test_handle_conversation_after_delete.py
plugin/test/test_handle_conversation_after_delete.py
Python
0.000008
@@ -0,0 +1,676 @@ +import unittest%0Aimport copy%0Afrom unittest.mock import Mock%0A%0Aimport chat_plugin%0Afrom chat_plugin import handle_conversation_after_delete%0A%0Aclass TestHandleConversationAfterDelete(unittest.TestCase):%0A%0A def setUp(self):%0A self.conn = None%0A self.mock_publish_event = M...
7516f369be3723520def3a9141facc6783d3a887
remove 4handler
githubapp.py
githubapp.py
import os import base64 from flask import Flask , request, render_template import nbconvert.nbconvert as nbconvert import requests from nbformat import current as nbformat from flask import Flask, redirect, abort import re import github as gh from gist import render_content app = Flask(__name__) github = gh.Github() ...
Python
0.000006
@@ -589,16 +589,17 @@ repo%7D)%0A%0A +# @app.rou @@ -632,24 +632,25 @@ %3Cbranch%3E/')%0A +# def dummy1(u @@ -668,24 +668,25 @@ ee,branch):%0A +# if user @@ -698,16 +698,17 @@ tatic':%0A +# @@ -764,16 +764,17 @@ .read()%0A +# retu
a4620f5371cea0a90360c6968c7ecbe426e9e1f4
Create genomic_range_query.py
codility/genomic_range_query.py
codility/genomic_range_query.py
Python
0.000167
@@ -0,0 +1,1341 @@ +%22%22%22%0Ahttps://codility.com/programmers/task/genomic_range_query/%0A%22%22%22%0A%0A%0Afrom collections import Counter%0A%0A%0Adef solution(S, P, Q):%0A # Instead of counters, could've also used four prefix-sum and four suffix-sum%0A # arrays. E.g., %60pref_1%60 would just do a prefix sum...
dfd92f2062f5f8c1f8a483f7af1dc6877502c1b2
add myself as author
build.py
build.py
#!/usr/bin/env python # # -*- coding: utf-8 -*- # # This file is part of PyBuilder # # Copyright 2011-2015 PyBuilder 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 # # ...
Python
0.000538
@@ -2385,24 +2385,84 @@ anov.biz%22),%0A + Author(%22Valentin Haenel%22, %22valentin@haenel.co%22),%0A %5D
1cb55aa6b3abd4a3a20ff0f37b6c80c0c89ef1ff
Add a dummy pavement file.
tools/win32/build_scripts/pavement.py
tools/win32/build_scripts/pavement.py
Python
0
@@ -0,0 +1,137 @@ +options(%0A setup=Bunch(%0A name = %22scipy-superpack%22,%0A )%0A)%0A%0A@task%0Adef setup():%0A print %22Setting up package %25s%22 %25 options.name%0A
cef74f6d84f1d7fec54fd9a314888e7d0e84ac3f
Create telnet-cmdrunner.py
telnet-cmdrunner.py
telnet-cmdrunner.py
Python
0.000006
@@ -0,0 +1,1837 @@ +#!/usr/bin/python%0A%0A%0Afrom __future__ import absolute_import, division, print_function%0A%0Aimport netmiko%0Aimport json%0Aimport tools%0Aimport sys ### Capture and handle signals past from the Operating System.%0Aimport signal%0A%0A%0Asignal.signal(signal.SIGPIPE, signal.SIG_DFL) ### IOER...
ecb6390c800260cedddba655f253a8307e096d76
Create setup.py
setup.py
setup.py
Python
0.001383
@@ -0,0 +1,260 @@ +from distutils.core import setup%0A%0Asetup(name='atmPy',%0A version='0.1',%0A description='Python Distribution Utilities',%0A author='Hagen Telg and Matt Richardson',%0A author_email='matt.richardson@msrconsults.com',%0A packages=%5B'atmPy'%5D,%0A )%0A
93cb8184fe5fdbf294c1e8f36b45ed8b514b2ce5
Allow setup file to enable pip installation
setup.py
setup.py
Python
0
@@ -0,0 +1,97 @@ +from distutils.core import setup%0A%0Asetup(%0A name='multiworld',%0A packages=('multiworld', ),%0A)%0A
dad2024344f581aa042f767e4aa473d50a8f78bc
Create individual_dist_label.py
sandbox/individual_distance/individual_dist_label.py
sandbox/individual_distance/individual_dist_label.py
Python
0.000005
@@ -0,0 +1,2158 @@ +#!/usr/bin/python%0A%0Aimport os, numpy as np, scipy as sp, nibabel.freesurfer as fs%0Afrom sklearn.utils.arpack import eigsh %0A%0A# Set defaults:%0Abase_dir = '/scr/liberia1/LEMON_LSD/LSD_rest_surf'%0Aoutput_base_dir = '/scr/liberia1'%0Asubjects = %5B26410%5D%0A %0Afor subject in subjects:%0A ...
a2865b712d0a28e3a0b8943f67703a77b5d90894
Add a stub for testing _utils
tests/test__utils.py
tests/test__utils.py
Python
0
@@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*-%0A
9a3a619791d34847e07c7dc7b952863d2a6d30c7
Add simple test for monthly ghistory
tests/test_splits.py
tests/test_splits.py
import re from tests.base import IntegrationTest from tasklib.task import local_zone from datetime import datetime class TestBurndownDailySimple(IntegrationTest): def execute(self): self.command("TaskWikiBurndownDaily") assert self.command(":py print vim.current.buffer", silent=False).startswith...
Python
0
@@ -1409,16 +1409,22 @@ Ghistory +Annual Simple(I @@ -2355,16 +2355,1326 @@ n'.join(output)%0A +%0A%0Aclass TestGhistoryMonthlySimple(IntegrationTest):%0A%0A tasks = %5B%0A dict(description=%22test task%22),%0A dict(description=%22completed task 1%22, status=%22completed%22, end=%22now%22),%0A ...
a986397ca1bdc3bdc8894fab8b336803c172b295
add settings file for staging (has a database url but no Sentry)
txlege84/txlege84/settings/staging.py
txlege84/txlege84/settings/staging.py
Python
0
@@ -0,0 +1,1655 @@ +#######################%0A# PRODUCTION SETTINGS #%0A#######################%0A%0Aimport dj_database_url%0A%0Afrom .base import *%0A%0ALOGGING = %7B%0A 'version': 1,%0A 'handlers': %7B%0A 'console':%7B%0A 'level':'DEBUG',%0A 'class':'logging.StreamHandler',%0A ...
f5ba686196866c78dfeafb34a5f78f5cfc2c50bd
Add buildbot.py with required coverage
buildbot.py
buildbot.py
Python
0
@@ -0,0 +1,239 @@ +%EF%BB%BF#!/usr/bin/env python%0A# encoding: utf-8%0A%0Aproject_name = 'sak'%0A%0Adef configure(options):%0A pass%0A%0Adef build(options):%0A pass%0A%0Adef run_tests(options):%0A pass%0A%0Adef coverage_settings(options):%0A options%5B'required_line_coverage'%5D = 94.9%0A
7bbf99a60526e1b15aaf7a7fc9f5b7d6889a9efc
Create getnotfound.py
tools/getnotfound.py
tools/getnotfound.py
Python
0.000001
@@ -0,0 +1,2505 @@ +#!/usr/bin/env python%0A%0Afrom __future__ import print_function%0Aimport argparse%0Aimport requests%0Aimport json%0Aimport wget%0Aimport sys%0Aimport os%0A%0A__author__ = %22Vesselin Bontchev %3Cvbontchev@yahoo.com%3E%22%0A__license__ = %22GPL%22%0A__VERSION__ = %221.00%22%0A%0Adef error(e):%0A ...
1a1e9123313fdedab14700ead90748d9e6182a42
Add revision for new boardmoderator columns
migrations/versions/da8b38b5bdd5_add_board_moderator_roles.py
migrations/versions/da8b38b5bdd5_add_board_moderator_roles.py
Python
0
@@ -0,0 +1,1908 @@ +%22%22%22Add board moderator roles%0A%0ARevision ID: da8b38b5bdd5%0ARevises: 90ac01a2df%0ACreate Date: 2016-05-03 09:32:06.756899%0A%0A%22%22%22%0A%0A# revision identifiers, used by Alembic.%0Arevision = 'da8b38b5bdd5'%0Adown_revision = '90ac01a2df'%0Abranch_labels = None%0Adepends_on = None%0A%0Afr...
4213e9756872cd3a64ca75f374b5bc292e08e3be
add scraping script
scrapingArticle.py
scrapingArticle.py
Python
0.000001
@@ -0,0 +1,1170 @@ +# -*- coding: utf-8 -*-%0A%0Afrom urllib.request import urlopen%0Afrom urllib.error import HTTPError%0Afrom bs4 import BeautifulSoup%0A%0A%0Adef scrapingArticleText(url):%0A %22%22%22%0A %E5%BC%95%E6%95%B0%E3%81%8B%E3%82%89%E5%BE%97%E3%81%9FURL%E3%81%8B%E3%82%89%E3%83%96%E3%83%AD%E3%82%B0%E6%9...
0c5f2c0003ceb1568aa4f6dccce5f6de42b5462e
Add a simple monitoring solution
scripts/monitor.py
scripts/monitor.py
Python
0.000001
@@ -0,0 +1,1452 @@ +#!/usr/bin/python%0A# -*- coding: UTF-8%0A# Copyright: 2014 Tor Hveem %3Cthveem%3E%0A# License: GPL3%0A#%0A# Simple Python script for polling amatyr installation and check latest date%0A#%0A# Usage: python monitor.py %3CAMATYR BASEURL%3E %3CEMAIL RECIPIENT%3E%0A# Check every 5 minute in crontab:%0A#...
5e20df222456fe17fa78290e8fa08b051a951b38
Add events.py
octokit/resources/events.py
octokit/resources/events.py
Python
0.000004
@@ -0,0 +1,147 @@ +# encoding: utf-8%0A%0A%22%22%22Methods for the Events API%0Ahttp://developer.github.com/v3/activity/events/%0Ahttp://developer.github.com/v3/issues/events/%0A%22%22%22%0A
3b22994b26db1c224ef0076bf9a031f661953ada
create Feed of latest articles on the current site.
opps/articles/views/feed.py
opps/articles/views/feed.py
Python
0
@@ -0,0 +1,697 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0Afrom django.contrib.syndication.views import Feed%0Afrom django.contrib.sites.models import get_current_site%0A%0Afrom opps.articles.models import Article%0A%0A%0Aclass ArticleFeed(Feed):%0A%0A link = %22/RSS%22%0A%0A def __call__(self, request,...