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
e238d7cfe1a4eace62ba6a9d199813f317c34c6a
Create AnalyticalDistributions.py
effective_quadratures/AnalyticalDistributions.py
effective_quadratures/AnalyticalDistributions.py
Python
0
@@ -0,0 +1,724 @@ +#!/usr/bin/env python%0Aimport numpy as np%0Afrom scipy.special import erf%0A%22%22%22%0A%0A Analytical definitions for some sample PDFs. Functions in this file are%0A called by PolyParams when constructing %22custom%22 orthogonal polynomials,%0A which require Stieltejes procedure for computing...
0263eb5a96f610b5a2e77d11ad26e892d78c9eda
add 191
vol4/191.py
vol4/191.py
Python
0.999998
@@ -0,0 +1,216 @@ +if __name__ == %22__main__%22:%0A lst = %5B1, 3, 0, 2, 1, 0, 0, 1%5D%0A while lst%5B0%5D %3C 30:%0A n, t, a, b, c, d, e, f = lst%0A lst = %5Bn + 1, 2 * t + b - a, c, 2 * b - a + d, t - (a + c), e, f, t%5D%0A print lst%5B1%5D%0A
84d3e73fd7ff79e36268fce4b470af8fa3617f0c
Add couple of routes for the admin blueprint
app/admin/routes.py
app/admin/routes.py
Python
0
@@ -0,0 +1,944 @@ +from flask import render_template, redirect, url_for, flash, request%0Afrom flask.ext.login import login_required, current_user%0A%0Afrom . import admin%0Afrom .forms import ProfileForm%0A%0Afrom .. import db%0Afrom ..models import User%0A%0A@admin.route('/')%0A@login_required%0Adef index():%0A retu...
12bb21ca19a36465241c85b4f69838294c817630
Update to version 3.4.2
lib/ansiblelint/version.py
lib/ansiblelint/version.py
__version__ = '3.4.1'
Python
0
@@ -16,7 +16,7 @@ 3.4. -1 +2 '%0A
4e4d4365a0ef1a20d181f1015152acb116226e3d
Add device class for low battery (#10829)
homeassistant/components/binary_sensor/__init__.py
homeassistant/components/binary_sensor/__init__.py
""" Component to interface with binary sensors. For more details about this component, please refer to the documentation at https://home-assistant.io/components/binary_sensor/ """ import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.helpers.entity_component import ...
Python
0
@@ -625,16 +625,70 @@ SES = %5B%0A + 'battery', # On means low, Off means normal%0A 'col
4d2b0fdb4ee3289c7a2ba435f77f70c978cdd166
add script to fetch recursively [bug] infinite loop
fetch_recursively.py
fetch_recursively.py
Python
0
@@ -0,0 +1,1865 @@ +#!/usr/bin/env python%0Afrom sys import argv%0Aimport random %0Aimport urllib%0A%0A%0A%0A%0Adef fetch(src_url):%0A%09## first fetch the source HTML page%0A%09num = 100000 * random.random()%0A%09filename = str(num)%0A%09urllib.urlretrieve(src_url, filename=filename)%0A%09txt = open(filename, %22r%22)...
2ea9f36c8eaf796011d93c361e663b01ba259842
Call new doc sync in repair command
src/sentry/runner/commands/repair.py
src/sentry/runner/commands/repair.py
""" sentry.runner.commands.repair ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2015 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, print_function import click from sentry.runner.decorators import configuration @click.comman...
Python
0
@@ -234,16 +234,26 @@ nction%0A%0A +import os%0A import c @@ -464,19 +464,25 @@ try. -tasks.sync_ +utils.integration docs @@ -502,23 +502,150 @@ docs -%0A sync_docs( +, DOC_FOLDER%0A if os.access(DOC_FOLDER, os.W_OK):%0A sync_docs()%0A else:%0A click.echo(' - skipping (path cannot be written...
eec339635bee64d3e50a29167a639a93bc40a3a3
Create set selections for debconf
genes/debconf/set.py
genes/debconf/set.py
Python
0
@@ -0,0 +1,597 @@ +import os%0Afrom subprocess import call%0Afrom functools import partial%0A%0A#TODO: stop using sudo or ensure it exists%0A#TODOE: specify user to run as%0A#TODO: utilize functools partial to handle some of the above functionality%0Aclass Config:%0A SET_SELECTIONS = %5B'sudo', '-E', 'debconf-set-se...
7a4857682567b5a23f940e05189e02d797599d51
Add tests/test_00_info.py that simply reports the icat version number and package directory to the terminal.
tests/test_00_info.py
tests/test_00_info.py
Python
0.000006
@@ -0,0 +1,1091 @@ +%22%22%22Report version info about python-icat being tested.%0A%22%22%22%0A%0Afrom __future__ import print_function%0Aimport pytest%0Aimport os.path%0Aimport icat%0A%0Aclass Reporter(object):%0A %22%22%22Cumulate messages and report them later using a terminalreporter.%0A %22%22%22%0A%0A de...
9afbdbb0fa7f77269b08680e9290fa2628d88caf
add problem 069
problem_069.py
problem_069.py
Python
0.000088
@@ -0,0 +1,1141 @@ +#!/usr/bin/env python%0A#-*-coding:utf-8-*-%0A%0A'''%0AEuler's Totient function, %CF%86(n) %5Bsometimes called the phi function%5D,%0Ais used to determine the number of positive numbers less than or%0Aequal to n which are relatively prime to n.%0AFor example, as 1, 2, 4, 5, 7, and 8, are all less th...
24dc16add818d98594c5a3c463fe718aea3f2923
version bump for 0.25.14.6.
oneflow/__init__.py
oneflow/__init__.py
VERSION = '0.25.14.5'
Python
0
@@ -13,12 +13,12 @@ 0.25.14. -5 +6 '%0A%0A
292fd8b37f9f0b28176ceb3c41f3b2f85b227049
bump version in __init__.py
oneflow/__init__.py
oneflow/__init__.py
VERSION = '0.20.11.14'
Python
0.000023
@@ -18,7 +18,7 @@ 11.1 -4 +5 '%0A
793e4f3f56851db954b3e656520165b6a2351ea7
Correct the placement of call-convention specifier.
glad/lang/c/debug.py
glad/lang/c/debug.py
from glad.lang.c.generator import CGenerator DEFAULT_DEBUG_IMPL = ''' {return_def} _pre_call_callback("{name}", {args_callback}); {return_assign} glad_{name}({args}); _post_call_callback("{name}", {args_callback}); {return_return} ''' DEBUG_HEADER = ''' #define GLAD_DEBUG typedef void (* GLADcal...
Python
0
@@ -2432,25 +2432,16 @@ .write(' -APIENTRY PFN%7B%7DPRO @@ -2745,24 +2745,27 @@ .write(' +%7B%7D APIENTRY %7B%7D glad @@ -2756,19 +2756,16 @@ APIENTRY - %7B%7D glad_de
9df7b7e49c5f7ec9d8962cc28f1b19f18dda114c
Add custom exceptions for api errors
overwatch/errors.py
overwatch/errors.py
Python
0
@@ -0,0 +1,476 @@ +class InvalidFilter(Exception):%0A %22%22%22%0A Raise when 'filter' key word argument is not recognized%0A %22%22%22%0A pass%0A%0A%0Aclass InvalidHero(Exception):%0A %22%22%22%0A Raise when 'hero' key word argument is not recognized%0A %22%22%22%0A pass%0A%0A%0Aclass InvalidCo...
0d3343300d62afc37ba7a3bc1ec6e81bb8f8c648
add parent.py to be forked
worker/namespace/parent.py
worker/namespace/parent.py
Python
0.000002
@@ -0,0 +1,1164 @@ +#TODO make sure listening on the pipe blocks correctly, better error handling%0A%0Aimport os, sys, ns, time%0Afrom subprocess import check_output%0A%0Asys.path.append('/handler') # assume submitted .py file is /handler/lambda_func%0A%0Adef handler(args, path):%0A import lambda_func%0A try:%0A ...
1b7cce5b8dd274b904466dc6deeac312238fc857
add test_comp.py, add test function stubs
wradlib/tests/test_comp.py
wradlib/tests/test_comp.py
Python
0
@@ -0,0 +1,761 @@ +#!/usr/bin/env python%0A# -------------------------------------------------------------------------------%0A# Name: test_comp.py%0A# Purpose: testing file for the wradlib.comp module%0A#%0A# Authors: wradlib developers%0A#%0A# Created: 26.02.2016%0A# Copyright: (c) wradlib develo...
80089ad2856b60383692a8dd5abe8520f61a0895
Create write_OME-XML_from_file.py
write_OME-XML_from_file.py
write_OME-XML_from_file.py
Python
0
@@ -0,0 +1,2503 @@ +# -*- coding: utf-8 -*-%0A%22%22%22%0A@author: Sebi%0A%0AFile: write_OME-XML_from_file.py%0ADate: 17.12.2015%0AVersion. 1.0%0A%22%22%22%0A%0Aimport bfimage as bf%0Afrom lxml import etree as etl%0A%0A%0Adef create_omexml(testdata, method=1, writeczi_metadata=True):%0A%0A # creates readable xml fil...
5f5f48f2f6f8c82d97858230219f67229d3165a4
patch to add match_ids to history
patch-rating-history2.py
patch-rating-history2.py
Python
0
@@ -0,0 +1,1126 @@ +#!/usr/bin/env python3%0A# -*- coding: utf-8 -*-%0A#%0A%0Afrom datetime import datetime%0Afrom dump_qlstats_data import connect_to_database%0A%0AGAMETYPES_AVAILABLE = %5B%22ad%22, %22ctf%22, %22tdm%22%5D%0A%0Adef main(args):%0A%0A try:%0A db = connect_to_database()%0A%0A except Exception as e:%...
38375800cee8c02051d7d8212ccc5fc843a109f1
Create client.py
client.py
client.py
Python
0.000001
@@ -0,0 +1,312 @@ +import socket%0A%0Adef Main():%0A%09host = '192.168.43.130'%0A%09port = 5000%0A%0A%09s = socket.socket()%0A%09s.connect((host, port))%0A%0A%09message = raw_input('--%3E')%0A%09while message != 'q':%0A%09%09s.send(message)%0A%09%09data = s.recv(1024)%0A%09%09print %22server: %22 + str(data)%0A%09%09me...
901d430e3f6705af372974b6e1b42e36884ba47f
Add mplimporthook.py
jupyter/mplimporthook.py
jupyter/mplimporthook.py
Python
0.000001
@@ -0,0 +1,1594 @@ +%22%22%22Startup script for IPython kernel.%0A%0AInstalls an import hook to configure the matplotlib backend on the fly.%0A%0AOriginally from @minrk at%0Ahttps://github.com/minrk/profile_default/blob/master/startup/mplimporthook.py%0ARepurposed for docker-stacks to address repeat bugs like%0Ahttps:/...
baaeee7b003030ded5336c7da9e01c04beea46f3
add swscale dependency
autoconf/swscale.py
autoconf/swscale.py
Python
0
@@ -0,0 +1,114 @@ +from _external import *%0A%0Aswscale = LibWithHeaderChecker(%0A%09%09%09%09'swscale',%0A%09%09%09%09'libswscale/swscale.h',%0A%09%09%09%09'c',%0A%09%09%09)%0A
626ce0dbd2450812e0cbac12293133e12bae0daf
Add parsing module
autosort/parsing.py
autosort/parsing.py
Python
0.000001
@@ -0,0 +1,3192 @@ +import ast%0Aimport textwrap%0Aimport tokenize%0Afrom collections import namedtuple%0Afrom tokenize import COMMENT, DEDENT, ENDMARKER, INDENT, NEWLINE, STRING, NAME%0A%0A%0Aclass Name(namedtuple('Name', 'name asname')):%0A CAMEL, SNAKE, CONST = range(3)%0A%0A @property%0A def kind(self):%0A...
059dae76827ac016524925d94c10e5ed0a83f2c2
Create PreFilterExample.py
home/Alessandruino/PreFilterExample.py
home/Alessandruino/PreFilterExample.py
Python
0
@@ -0,0 +1,435 @@ +from org.myrobotlab.opencv import OpenCVFilterAffine%0A%0Aaffine = OpenCVFilterAffine(%22affine%22)%0Aaffine.setAngle(180.0)%0A%0AleftPort= %22/dev/cu.wchusbserial1450%22 %0Ai01 = Runtime.start(%22i01%22,%22InMoov%22)%0AheadTracking = i01.startHeadTracking(leftPort)%0AeyesTracking = i01.startEyesTrac...
c24fb3b6b41b2f06cee79fd21b090403f3a67457
Add TwrSearch class
twitter/twr_search.py
twitter/twr_search.py
Python
0
@@ -0,0 +1,2993 @@ +#!/usr/bin/env python%0A#%0A# Copyright (c) 2013 Martin Abente Lahaye. - tch@sugarlabs.org%0A%0A#Permission is hereby granted, free of charge, to any person obtaining a copy%0A#of this software and associated documentation files (the %22Software%22), to deal%0A#in the Software without restriction, i...
49edeac697b6c4457f2f55ff4086c9dbacedaa71
add try implementation
pymonet/try.py
pymonet/try.py
Python
0
@@ -0,0 +1,992 @@ +class Try:%0A%0A def __init__(self, value, is_success):%0A self.value = value%0A self.is_success = is_success%0A%0A def __eq__(self, other):%0A return self.value == other.value and self.is_success == other.is_success%0A%0A @classmethod%0A def of(cls, fn, *args):%0A ...
f972606727fa302383acde4ee562a016fe216bd2
Version 0.2.3a
hornet/trampoline.py
hornet/trampoline.py
Python
0.000001
@@ -0,0 +1,551 @@ +import functools%0A%0A%0Adef trampoline(bouncing, *args, **kwargs):%0A while bouncing:%0A result = bouncing(*args, **kwargs)%0A results, bouncing, args, kwargs = result%0A yield from results%0A%0A%0Azero = iter(())%0A%0A%0Adef unit(item):%0A yield item%0A%0A%0Adef land(*arg...
3f35e9b3913bb99cf7b299c36528eefa878337f4
Add method to determine output name
mopidy/outputs/__init__.py
mopidy/outputs/__init__.py
import pygst pygst.require('0.10') import gst import logging logger = logging.getLogger('mopidy.outputs') class BaseOutput(object): """Base class for providing support for multiple pluggable outputs.""" def get_bin(self): """ Build output bin that will attached to pipeline. """ ...
Python
0.001316
@@ -527,26 +527,18 @@ elf. -__class__._ +get _name -__ +() )%0A @@ -591,16 +591,234 @@ output%0A%0A + def get_name(self):%0A %22%22%22%0A Return name of output in gstreamer context.%0A%0A Defaults to class name, can be overriden by sub classes if required.%0A %22%22%22%0A ret...
ea6458a88079b939188d0e5bf86eedeb62247609
add src/cs_utime.py
src/cs_utime.py
src/cs_utime.py
Python
0
@@ -0,0 +1,653 @@ +#!/usr/local/bin/python%0A# -*- coding: utf-8 -*-%0A'''cs_utime%0Aos.stat(fn).st_ctime # 978307200.0%0Att=time.strptime('20010101T090000', '%25Y%25m%25dT%25H%25M%25S') # (2001,1,1,9,0,0,0,1,-1)%0At=time.mktime(tt) # 978307200.0%0Aos.utime(fn, (t, t)) # (atime, mtime)%0A'''%0A%0Aimport sys, os, stat%0...
a2a268ea8b9b2876011453476baedaa4bca01559
Create ball.py
python/ball.py
python/ball.py
Python
0.000011
@@ -0,0 +1,425 @@ +#!/usr/bin/env python%0Afrom rgbmatrix import RGBMatrix%0Aimport sys, time%0Aimport math%0A%0Arows = 16%0Achains = 1%0Aparallel = 1%0AledMatrix = RGBMatrix(rows, chains, parallel)%0A%0AnumRows = 16%0Aheight = ledMatrix.height%0Awidth = ledMatrix.width%0A%0Atry:%0A%09print %22Press Ctrl + C to stop ex...
5eb0dce7f2c287203ace05b6989785b7e4fdac75
add script to track xmin in the database
nagios/check_pgsql_xmin.py
nagios/check_pgsql_xmin.py
Python
0
@@ -0,0 +1,1019 @@ +%22%22%22%0AReturn the maximum xmin in the database %0A%22%22%22%0Aimport os%0Aimport sys%0Aimport stat%0Aimport psycopg2%0AIEM = psycopg2.connect(database='iem', host='iemdb', user='nobody')%0Aicursor = IEM.cursor()%0A%0Adef check():%0A icursor.execute(%22%22%22%0A SELECT datname, age(datfroz...
c373bbb351de421881d9f0e2f8a16d541bb21347
add test-receive-file-ipv6.py
tests/twisted/avahi/test-receive-file-ipv6.py
tests/twisted/avahi/test-receive-file-ipv6.py
Python
0.000002
@@ -0,0 +1,2055 @@ +import avahi%0Aimport urllib%0Aimport BaseHTTPServer%0Aimport SocketServer%0Aimport socket%0A%0Afrom saluttest import exec_test%0Afrom file_transfer_helper import ReceiveFileTest%0A%0Afrom avahitest import AvahiListener%0Afrom xmppstream import connect_to_stream6%0A%0Afrom twisted.words.xish import ...
f296eb4a87a1130cb72e00099f7e9441425548ec
add device handler
ncclient/devices/huawei.py
ncclient/devices/huawei.py
Python
0.000001
@@ -0,0 +1,1598 @@ +%22%22%22%0AHandler for Cisco Nexus device specific information.%0A%0ANote that for proper import, the classname has to be:%0A%0A %22%3CDevicename%3EDeviceHandler%22%0A%0A...where %3CDevicename%3E is something like %22Default%22, %22Huawei%22, etc.%0A%0AAll device-specific handlers derive from th...
401fbbd7440f16c462ca31150d9873da5f052356
create app.py
reddit2telegram/channels/r_freegamefindings/app.py
reddit2telegram/channels/r_freegamefindings/app.py
Python
0.000004
@@ -0,0 +1,155 @@ +#encoding:utf-8%0A%0Asubreddit = 'freegamefindings'%0At_channel = '@r_freegamefindings'%0A%0A%0Adef send_post(submission, r2t):%0A return r2t.send_simple(submission)%0A
412828bea81f5aad917188881c1e7e4d6ce52400
Add tests for the management views
usingnamespace/tests/test_views_management.py
usingnamespace/tests/test_views_management.py
Python
0
@@ -0,0 +1,1911 @@ +import unittest%0Afrom pyramid import testing%0A%0Aclass ManagementViewsTest(unittest.TestCase):%0A def setUp(self):%0A self.config = testing.setUp()%0A%0A def tearDown(self):%0A testing.tearDown()%0A%0A def makeOne(self, context, request):%0A from usingnamespace.views....
ef53650aa06c1121e50e30634d8ca0ba989ecccf
Change self.basket → self.instance.basket in the LineForm
oscar/apps/basket/forms.py
oscar/apps/basket/forms.py
from django import forms from django.conf import settings from django.db.models import get_model from django.utils.translation import gettext_lazy as _ basketline_model = get_model('basket', 'line') basket_model = get_model('basket', 'basket') Product = get_model('catalogue', 'product') class BasketLineForm(forms.Mo...
Python
0.000001
@@ -603,32 +603,41 @@ quantity = self. +instance. basket.num_items
50d84e5b134b69cebcb4935da24a3cc702e1feef
Add coverage for resolve_ref_for_build
tests/zeus/tasks/test_resolve_ref.py
tests/zeus/tasks/test_resolve_ref.py
Python
0.000001
@@ -0,0 +1,397 @@ +from zeus import factories%0Afrom zeus.tasks import resolve_ref_for_build%0A%0A%0Adef test_resolve_ref_for_build(mocker, db_session, default_revision):%0A build = factories.BuildFactory.create(%0A repository=default_revision.repository, ref=default_revision.sha%0A )%0A%0A assert build...
fbb8bffd5e1cb633cc59eb5b1e61fef2067e836a
add empty unit test for viewimage module
supvisors/tests/test_viewimage.py
supvisors/tests/test_viewimage.py
Python
0
@@ -0,0 +1,1756 @@ +#!/usr/bin/python%0A#-*- coding: utf-8 -*-%0A%0A# ======================================================================%0A# Copyright 2016 Julien LE CLEACH%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 Licens...
0f395ca18526ea4c6675bd772cc9af88a6baf006
Create __init__.py
channels/r_gonewild30plus/__init__.py
channels/r_gonewild30plus/__init__.py
Python
0.000429
@@ -0,0 +1 @@ +%0A
10fe17255335e16aac9f828764050bd2c0874175
Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/79deb43ff6fe999bc7767f19ebdc20814b1dfe80.
third_party/tf_runtime/workspace.bzl
third_party/tf_runtime/workspace.bzl
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "0ca0913cd468b657b76a001b74ffa6e91e4eed03" TFRT_SHA256 = "a85d109a5ca7daee97115903784b...
Python
0
@@ -228,133 +228,133 @@ = %22 -0ca0913cd468b657b76a001b74ffa6e91e4eed03%22%0A TFRT_SHA256 = %22a85d109a5ca7daee97115903784bdc5430ae1421090f74c45080fc56f0e04351 +79deb43ff6fe999bc7767f19ebdc20814b1dfe80%22%0A TFRT_SHA256 = %223b9a217602bd20258595ebe997a204f675aad2006ce3d9cdeb2b431f8564e28d %22%0A%0A
430b5daebbd5385551203c2a0cf23bb355a2c027
Add a script that uses the Flickr API.
doc/source/scripts/06-cat-of-cats.py
doc/source/scripts/06-cat-of-cats.py
Python
0
@@ -0,0 +1,614 @@ +import os%0Aimport photomosaic as pm%0Aimport photomosaic.flickr%0Aimport matplotlib.pyplot as plt%0A%0A%0A# For these published examples we use os.environ to keep our API key private.%0A# Just set your own Flickr API key here.%0AFLICKR_API_KEY = os.environ%5B'FLICKR_API_KEY'%5D%0A%0A# Get a pool of ...
3aad37e287a6d0fdb037393d4fcc30817c9dece5
Create statanalyisi.py
statanalyisi.py
statanalyisi.py
Python
0.000008
@@ -0,0 +1,1831 @@ +import string #This line defines string so as to be able to get rid of punctuation.%0Aimport re%0A%0Aname = raw_input(%22Enter file:%22)%0Aif len(name) %3C 1 : name = %22manqnohyphen.txt%22%0Aprint %22Much Ado about Nothing statistics%22%0Ahandle = open(name)%0A%0Atext = handle.read()%0Aprint ''%0Ap...
65ac6b1281ff9cbd17bd0d8dd2f9c188d71215f9
Fix log capture on py3
test/service.py
test/service.py
import logging import re import select import subprocess import threading import time __all__ = [ 'ExternalService', 'SpawnedService', ] class ExternalService(object): def __init__(self, host, port): logging.info("Using already running service at %s:%d", host, port) self.host = host ...
Python
0
@@ -1309,32 +1309,48 @@ dout.append(line +.decode('utf-8') )%0A%0A i
b66b02be95e7b0c36a9ced53b07d91298190ca4a
Add tests for mpi4py.dl module
test/test_dl.py
test/test_dl.py
Python
0
@@ -0,0 +1,1574 @@ +from mpi4py import dl%0Aimport mpiunittest as unittest%0Aimport sys%0Aimport os%0A%0Aclass TestDL(unittest.TestCase):%0A%0A def testDL1(self):%0A if sys.platform == 'darwin':%0A libm = 'libm.dylib'%0A else:%0A libm = 'libm.so'%0A%0A handle = dl.dlopen(li...
ffabca96535a89bd7f3ef640d738fa2f7dc0a0af
fix for last commit
billy/importers/committees.py
billy/importers/committees.py
#!/usr/bin/env python import os import glob import json import datetime import logging from billy.core import db from billy.core import settings from billy.importers.names import get_legislator_id from billy.importers.utils import prepare_obj, update, insert_with_id import pymongo logger = logging.getLogger('billy')...
Python
0
@@ -751,16 +751,189 @@ es %22%22%22%0A%0A + # first, clear committee sources (ones that aren't updated won't be saved)%0A for com in db.committees.find(%7Bsettings.LEVEL_FIELD: abbr%7D):%0A com%5B'sources'%5D = %5B%5D%0A%0A # fo @@ -2161,129 +2161,8 @@ e)%0A%0A - # clear sources befor...
cf3cae6493a369173244e05d190cceae41b9abbd
Add some coverage for olog callback.
bluesky/tests/test_olog_cb.py
bluesky/tests/test_olog_cb.py
Python
0
@@ -0,0 +1,1447 @@ +from bluesky import Msg%0Afrom bluesky.callbacks.olog import logbook_cb_factory%0A%0Atext = %5B%5D%0A%0A%0Adef f(**kwargs):%0A text.append(kwargs%5B'text'%5D)%0A%0A%0Adef test_default_template(fresh_RE):%0A text.clear()%0A fresh_RE.subscribe('start', logbook_cb_factory(f))%0A fresh_RE(%5...
57cfba649e3d7a441e7c10a25448ccb8413b964e
Put PageAdmin back
mangaki/mangaki/admin.py
mangaki/mangaki/admin.py
# coding=utf8 from mangaki.models import Anime, Track, OST, Artist, Rating, Page, Suggestion from django.forms import Textarea from django.db import models from django.contrib import admin, messages class AnimeAdmin(admin.ModelAdmin): search_fields = ('id', 'title') list_display = ('id', 'title', 'nsfw') l...
Python
0
@@ -899,24 +899,61 @@ atingAdmin)%0A +admin.site.register(Page, PageAdmin)%0A admin.site.r
e3d92ce2cd17a967ac19aecad2998c4094f2ae11
Add script to draw NACA foil
run.py
run.py
Python
0
@@ -0,0 +1,1228 @@ +#!/usr/bin/env python%0A%22%22%22%0AThis script generates a force and velocity vector diagram for a cross-flow%0Aturbine.%0A%22%22%22%0A%0Aimport gizeh as gz%0Aimport numpy as np%0Aimport matplotlib.pyplot as plt%0A%0A%0Adef gen_naca_points(naca=%220020%22, c=100, npoints=100):%0A %22%22%22Genera...
4b8c5dd8ebc4261bcdb5e9f92e7936eba68fd5ad
Add BNB prediction script
bernoulli_nb/bnb_predict.py
bernoulli_nb/bnb_predict.py
Python
0.000001
@@ -0,0 +1,1640 @@ +import sys%0A%0Afrom sklearn.naive_bayes import BernoulliNB as BNB%0Aimport matplotlib.pyplot as plt%0Aimport numpy as np%0A%0Adef read_variants(flname):%0A%09fl = open(flname)%0A%09markers = %5B%5D%0A%09individuals = %5B%5D%0A%09population_ids = %5B%5D%0A%09population = -1%0A%09for ln in fl:%0A%09%...
2ccbed0e4d867652554dff208d7c1b7bdd1710f9
add bench/test_curry
bench/test_curry.py
bench/test_curry.py
Python
0.000014
@@ -0,0 +1,152 @@ +from toolz.curried import get%0A%0Apairs = %5B(1, 2) for i in range(100000)%5D%0A%0Adef test_get_curried():%0A first = get(0)%0A for p in pairs:%0A first(p)%0A
f864faea8725659c001783de3a9451f9b693beb4
support exporting all data for SMS Gateway Fee Criteria report
corehq/apps/smsbillables/interface.py
corehq/apps/smsbillables/interface.py
from django.db.models.aggregates import Count from corehq.apps.accounting.filters import DateCreatedFilter from corehq.apps.reports.datatables import ( DataTablesColumn, DataTablesHeader, ) from corehq.apps.reports.generic import GenericTabularReport from corehq.apps.sms.models import ( INCOMING, OUTGOI...
Python
0
@@ -6245,32 +6245,100 @@ y)%22)%0A )%0A%0A + @property%0A def get_all_rows(self):%0A return self.rows%0A%0A @property%0A
3017396176491dae5bab3effda82a59e64a3591f
Add button_example
examples/pygobject/button_example.py
examples/pygobject/button_example.py
Python
0.000002
@@ -0,0 +1,1504 @@ +#!/usr/bin/python%0A# -*- coding: utf-8 -*-%0A# Copyright 2011 Sebastian P%C3%B6lsterl%0A#%0A# Permission is granted to copy, distribute and/or modify this document%0A# under the terms of the GNU Free Documentation License, Version 1.3%0A# or any later version published by the Free Software Foundati...
c7a543237e7d2d40f234e19341be7a835c1ba3ef
Remove old page admin code for forcing order/slug to be set.
mezzanine/pages/admin.py
mezzanine/pages/admin.py
from copy import deepcopy from django.contrib import admin from django.core.exceptions import PermissionDenied from django.core.urlresolvers import NoReverseMatch from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from mezzanine.pages.models import Page, RichTextPage, Link fr...
Python
0
@@ -4945,66 +4945,8 @@ ent%0A - obj._order = None%0A obj.slug = None%0A
efc7097c0248394716144f552522daa1d44b74ce
add test python script
twython_test.py
twython_test.py
Python
0.000002
@@ -0,0 +1,367 @@ +import datetime%0Aimport sys%0Afrom twython import Twython%0A%0Afrom gettokens import tokens%0A%0Atweet = datetime.datetime.utcnow().strftime('%25Y-%25m-%25d %25H:%25M:%25S') %0A%0Aapi = Twython(tokens%5B'api_key'%5D,%0A tokens%5B'api_secret'%5D,%0A tokens%5B'access_token'%5...
bb5457ab736b5f94b9efb9772da16c5ebf97fa06
Test for interpolation functions
tests/theanolm/probfunctions_test.py
tests/theanolm/probfunctions_test.py
Python
0
@@ -0,0 +1,1753 @@ +#!/usr/bin/env python3%0A# -*- coding: utf-8 -*-%0A%0Aimport unittest%0Aimport math%0Afrom theanolm.probfunctions import *%0A%0Aclass TestProbFunctions(unittest.TestCase):%0A def setUp(self):%0A pass%0A%0A def tearDown(self):%0A pass%0A%0A def test_interpolate_linear(self):%0A...
b8e27997000c448d191121ef0f8b08ebca877ed0
Add GNU Prolog package.
var/spack/repos/builtin/packages/gnu-prolog/package.py
var/spack/repos/builtin/packages/gnu-prolog/package.py
Python
0
@@ -0,0 +1,1748 @@ +##############################################################################%0A# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.%0A# Produced at the Lawrence Livermore National Laboratory.%0A#%0A# This file is part of Spack.%0A# Created by Todd Gamblin, tgamblin@llnl.gov, All r...
d57a1049b45614abfe393f80328a07d78c98b5b2
Add system tray support
main.py
main.py
Python
0
@@ -0,0 +1,1328 @@ +#!/usr/bin/env python%0A# -*-coding: utf8 -*-%0A%0Aimport wx%0Aimport webbrowser%0A%0ATRAY_TOOLTIP = 'System Tray Demo'%0ATRAY_ICON = 'icon/network.png'%0A%0A%0Adef create_menu_item(menu, label, func):%0A item = wx.MenuItem(menu, -1, label)%0A menu.Bind(wx.EVT_MENU, func, id=item.GetId())%0A ...
d6120537ec982f50d08fa188e91c68c023809db3
Send ERROR when the user disconnects
txircd/modules/rfc/response_error.py
txircd/modules/rfc/response_error.py
Python
0.000001
@@ -0,0 +1,525 @@ +from twisted.plugin import IPlugin%0Afrom txircd.module_interface import IModuleData, ModuleData%0Afrom zope.interface import implements%0A%0Aclass ErrorResponse(ModuleData):%0A implements(IPlugin, IModuleData)%0A %0A name = %22errorResponse%22%0A core = True%0A %0A def actions(self...
12dda7a7473c094b4483789630e178fd60b0eba4
add routes.py
web/transit/routes.py
web/transit/routes.py
Python
0.000002
@@ -0,0 +1,385 @@ +import transit%0Aimport transit.views.basic%0A%0Afrom transit import app%0A%0Aroutes = (%0A ('/api/trains/', transit.views.basic.get_all_trains),%0A ('/api/trains/line/%3Cline%3E/', transit.views.basic.get_trains_on_line),%0A ('/api/trains/station/%3Cstation%3E/', transit.views.basic.get_tra...
d940abd618a9da4494a9337134f5be1600316601
Fix an emit_series debug message
flexget/plugins/input/emit_series.py
flexget/plugins/input/emit_series.py
from __future__ import unicode_literals, division, absolute_import import logging from sqlalchemy import desc, and_ from flexget import plugin from flexget.event import event from flexget.entry import Entry log = logging.getLogger('emit_series') try: from flexget.plugins.filter.series import SeriesTask, Series,...
Python
0.000064
@@ -3664,21 +3664,21 @@ for -%25d' %25 latest_ +season %25d' %25 seas
2a590a11f92e03d923d66cfc6e8fe5837feb0f20
Add a snippet: 'matplotlib/gaussian_convolution'.
matplotlib/gaussian_convolution/gaussian_convolution_1d.py
matplotlib/gaussian_convolution/gaussian_convolution_1d.py
Python
0.999972
@@ -0,0 +1,2439 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0A%22%22%22Gaussian convolution 1D%22%22%22%0A%0A# Copyright (c) 2012 J%C3%A9r%C3%A9mie DECOCK (http://www.jdhp.org)%0A%0A# Permission is hereby granted, free of charge, to any person obtaining a copy%0A# of this software and associated documentatio...
fac031300c81c31f5d6022a65d3637fd4e62fa91
add blink 3 script
raspberry-pi/led-blink3.py
raspberry-pi/led-blink3.py
Python
0
@@ -0,0 +1,773 @@ +import RPi.GPIO as GPIO%0Aimport time%0A%0Adef blink(ledPin, onTime, offTime):%0A GPIO.output(ledPin, GPIO.HIGH)%0A time.sleep(onTime)%0A GPIO.output(ledPin, GPIO.LOW)%0A time.sleep(offTime)%0A return%0A %0Adef blinkThree(redLedPin, blueLedPin, greenLedPin):%0A blink(redLedPin, 1...
ac44a041e3e7808305b025e1087f48b7d4a9234a
Add script to delete Bit.ly raw results from S3
tools/bitly/delete_bitly_blobs.py
tools/bitly/delete_bitly_blobs.py
Python
0
@@ -0,0 +1,1751 @@ +#!/usr/bin/env python3%0A%0Aimport argparse%0Aimport boto3%0Aimport os%0Afrom typing import List%0A%0Afrom mediawords.util.log import create_logger%0A%0Al = create_logger(__name__)%0A%0A%0Adef delete_bitly_blobs(story_ids: List%5Bint%5D):%0A session = boto3.Session(profile_name='mediacloud')%0A ...
37c0257fcc5e65b67fabfd17c2bf884ad8fe03e1
Add migration to reset signatures
recipe-server/normandy/recipes/migrations/0038_remove_invalid_signatures.py
recipe-server/normandy/recipes/migrations/0038_remove_invalid_signatures.py
Python
0
@@ -0,0 +1,1202 @@ +%22%22%22%0ARemoves signatures, so they can be easily recreated during deployment.%0A%0AThis migration is intended to be used between %22eras%22 of signatures. As%0Athe serialization format of recipes changes, the signatures need to%0Aalso change. This could be handled automatically, but it is easie...
f33ca28e7465a0b35d2419dd9016196f63a114d8
Add demo.py
demo.py
demo.py
Python
0.000002
@@ -0,0 +1,995 @@ +#!/usr/bin/python3%0A# -*- encoding: utf-8 -*-%0A%0Afrom indexes import *%0Aimport global_data%0A%0A%0Adef main(stock='000001', date=global_data.NEWEST_TRADE_DATE, p_MA=5, p_MACD=(12,26,9),%0A p_RSI=6, p_KDJ=(9,3), p_MTM=(12,6)):%0A %22%22%22%0A Example%0A date: str, '2017-08...
c19c1838802ef8b4429df605e085176aef3bb45f
Create 04_peery_beams.py
examples/01-advanced/04_peery_beams.py
examples/01-advanced/04_peery_beams.py
Python
0
@@ -0,0 +1,1788 @@ +r%22%22%22%0A.. _ref_ex_peery_beams:%0A%0ASymmetric and Unsymmetric Beams in Complex Bending%0A--------------------------------------------------%0A%0ACalculate section properties of two different beams%0Agiven in examples from 'Aircraft Structures,' by Peery. %0AThese cases have known results, and ...
c29bf2b9a87fdeb58d78a3ef3219292742371314
test script for BEL2 stmt checks
bin/test_bel2_validation.py
bin/test_bel2_validation.py
Python
0
@@ -0,0 +1,1630 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0A%22%22%22%0AUsage: program.py %3Ccustomer%3E%0A%0A%22%22%22%0A%0A%0Aimport requests%0Aimport json%0A%0Abase_url = %22http://localhost:9292%22%0A%0Afiles = %5B'bel2.0-example-statements.bel', 'bel2_document_examples.bel'%5D%0A%0A%0Adef send_reques...
cec17c0aaf794cdd108713642e0662c7eac7a020
Create cesarEncription.py
assigment1/cesarEncription.py
assigment1/cesarEncription.py
Python
0.000005
@@ -0,0 +1,2398 @@ +%0A# Chechinput: returns false is the inputed text %0A# has any numeric character%0A%0Adef checkInput(userInput):%0A%09return userInput.isalpha()%0A %0A# CheckNumber: returns false is the inputed text %0A# has any numeric character%0A%0Adef checkNumber(userInput):%0A%09return userInput.isdigit()%0A%...
fc35e902e4a41176e1860b5a42fb5ce51c3042f7
Add scaleioutil
scaleiopy/scaleioutil.py
scaleiopy/scaleioutil.py
Python
0
@@ -0,0 +1,1499 @@ +import logging%0A%0A%0Aclass ScaleIOLogger: %0A instance = None%0A%0A @classmethod%0A def get(cls):%0A if cls.instance is None:%0A cls.instance = cls()%0A return cls.instance%0A%0A def __init__(self):%0A # How to use:%0A # loggerInstance = ScaleIOLo...
156d635653e1ec93fbaff7ee7c872a5f6035f9a8
Add new-command.py to standard_commands
extra/standard_commands/new-command.py
extra/standard_commands/new-command.py
Python
0.000056
@@ -0,0 +1,1680 @@ +%22%22%22Finds a directory or file inside the current project.%22%22%22%0Afrom . import DodoCommand%0Afrom dodo_commands.framework.config import CommandPath%0Aimport os%0Aimport sys%0A%0Ascript_src = %22%22%22# noqa%0Afrom dodo_commands.default_commands.standard_commands import DodoCommand%0A%0A%0Ac...
421bd355cb3d471ac61d608c9e39cc821b06089f
Create analyzefiles.py
bin/interpret/analyzefiles.py
bin/interpret/analyzefiles.py
Python
0.000001
@@ -0,0 +1,18 @@ +#!/usr/bin/python%0A
4ec3cb1ddb08e14ba3c2ba169b4c5c47c779740a
Add new package: unuran (#8397)
var/spack/repos/builtin/packages/unuran/package.py
var/spack/repos/builtin/packages/unuran/package.py
Python
0
@@ -0,0 +1,2432 @@ +##############################################################################%0A# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.%0A# Produced at the Lawrence Livermore National Laboratory.%0A#%0A# This file is part of Spack.%0A# Created by Todd Gamblin, tgamblin@llnl.gov, All r...
0c8ebb64bb138da46623449d37078be39432ec54
Simplify if plugin validator by using new validator features.
flexget/plugins/filter/if_condition.py
flexget/plugins/filter/if_condition.py
import logging import re import datetime from copy import copy from flexget.feed import Feed from flexget.plugin import register_plugin, get_plugins_by_phase, get_plugin_by_name, priority log = logging.getLogger('if') def safer_eval(statement, locals): """A safer eval function. Does not allow __ or tr...
Python
0.999993
@@ -1549,231 +1549,8 @@ ')%0D%0A - # Get a list of apiv2 input plugins, make sure to exclude self%0D%0A valid_filters = %5Bplugin for plugin in get_plugins_by_phase('filter')%0D%0A if plugin.api_ver %3E 1 and plugin.name != 'if'%5D%0D%0A @@ -1666,21 +1666,38 @@ in -valid_...
ef62d0cca3f9f28cef6891b87da7b3d9e0ade953
Add stub file
2018/python/2018_02.py
2018/python/2018_02.py
Python
0
@@ -0,0 +1,187 @@ +%22%22%22Advent of Code 2018 Day 2: Inventory Management System%22%22%22%0A%0Aimport aoc_common%0Aimport pytest%0A%0ADAY = 2%0A%0A%0A%0A%0Aif __name__ == '__main__':%0A puzzle_input = aoc_common.load_puzzle_input(DAY)%0A
d5b1dd851b87542ff215bc74f74e3b2e76fc5894
create traditional box score
nba_data/data/traditional_box_score.py
nba_data/data/traditional_box_score.py
Python
0.00048
@@ -0,0 +1,1043 @@ +class TraditionalBoxScore:%0A def __init__(self, seconds_played, field_goals_made, field_goal_attempted,%0A three_point_field_goals_made, three_point_field_goal_attempted,%0A free_throws_made, free_throws_attempted, offensive_rebounds, defensive_rebounds, assists,%...
c87f42579826cf236953bc955d15a9cc98c67d05
Add Migration File this time.
applications/migrations/0029_application_proposed_development_description.py
applications/migrations/0029_application_proposed_development_description.py
Python
0
@@ -0,0 +1,493 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.10.6 on 2017-03-30 05:56%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('applications', '0028_auto_20170329_1445'),%0A %5...
609e143589d89b5be167914b70de99658776745f
add redirection test
ci/new_tsqa/tests/test_redirection.py
ci/new_tsqa/tests/test_redirection.py
Python
0.000001
@@ -0,0 +1,1864 @@ +# Licensed to the Apache Software Foundation (ASF) under one%0A# or more contributor license agreements. See the NOTICE file%0A# distributed with this work for additional information%0A# regarding copyright ownership. The ASF licenses this file%0A# to you under the Apache License, Version 2.0...
2d8b0266dc1bf0eadc2737d35844f5fb45bedd12
Add functional tests for loading by name
nose2/tests/functional/test_loading.py
nose2/tests/functional/test_loading.py
Python
0
@@ -0,0 +1,2923 @@ +%22%22%22%0Apkg1%0Apkg1.test%0Apkg1.test.test_things%0Apkg1.test.test_things.test_func%0Apkg1.test.test_things.test_gen%0Apkg1.test.test_things.test_gen:3%0Apkg1.test.test_things.SomeTests%0Apkg1.test.test_things.SomeTests.test_ok%0A%0A# generator method%0A# generator method index%0A%0A# param func%...
0a610a44f0d20170ba9c3e6f9ec4eafaac937be1
Add unit test for Pattern filterer.
test/unit/filterer/test_pattern.py
test/unit/filterer/test_pattern.py
Python
0
@@ -0,0 +1,1786 @@ +# :coding: utf-8%0A# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips%0A# :license: See LICENSE.txt.%0A%0Aimport pytest%0A%0Afrom bark.log import Log%0Afrom bark.filterer.pattern import Pattern%0A%0A%0Adef test_missing_key_passes():%0A '''Test log record with missing key passes.'''%0A l...
ef65c5eefdcbb21b83504710e3131affbeb88c88
Create map-reduce-advanced-count-number-of-friends.py
databases/nosql_xml_mapreduce/map-reduce-advanced-count-number-of-friends.py
databases/nosql_xml_mapreduce/map-reduce-advanced-count-number-of-friends.py
Python
0.000007
@@ -0,0 +1,1107 @@ +import sys%0Afrom collections import OrderedDict%0A%0Aclass MapReduce:%0A def __init__(self):%0A self.intermediate = OrderedDict()%0A self.result = %5B%5D%0A%0A%0A def emitIntermediate(self, key, value):%0A self.intermediate.setdefault(key, %5B%5D)%0A self.intermedi...
517cb7c66f28e977bf44b7013846f50af8f673fb
Create QiClient.py
Basic/Python/QiPy/Python2/QiClient.py
Basic/Python/QiPy/Python2/QiClient.py
Python
0
@@ -0,0 +1 @@ +%0A
1c1967e5a1e941ffa6a8f32d35269f333644cd98
Create 1.py
solutions/1.py
solutions/1.py
Python
0.000001
@@ -0,0 +1,826 @@ +CODE = %7B'A': '.-', 'B': '-...', 'C': '-.-.',%0A 'D': '-..', 'E': '.', 'F': '..-.',%0A 'G': '--.', 'H': '....', 'I': '..',%0A 'J': '.---', 'K': '-.-', 'L': '.-..',%0A 'M': '--', 'N': '-.', 'O': '---',%0A 'P': '.--.', 'Q': '--.-', 'R': '.-.',%0A '...
4a7b60d47a20084867015490cc52f3c5967b979f
add test file
AFQ/utils/tests/test_conversions.py
AFQ/utils/tests/test_conversions.py
Python
0.000001
@@ -0,0 +1,611 @@ +import numpy as np%0Aimport numpy.testing as npt%0A%0Aimport AFQ.data as afd%0Afrom AFQ.utils.conversion import matlab_tractography, matlab_mori_groups%0A%0Aimport os%0A%0Adef test_matlab_tractography():%0A sft = matlab_tractography(%0A %22AFQ/tests/data/WholeBrainFG_test.mat%22,%0A ...
c64a687f738cefd6f9461f487e76a3920d0f652c
Add new example
examples/consume_queue_until_empty.py
examples/consume_queue_until_empty.py
Python
0.000004
@@ -0,0 +1,557 @@ +import logging%0A%0Afrom amqpstorm import Connection%0A%0Alogging.basicConfig(level=logging.DEBUG)%0A%0A%0Adef consume_until_queue_is_empty():%0A with Connection('127.0.0.1', 'guest', 'guest') as connection:%0A with connection.channel() as channel:%0A while True:%0A ...
f09ee3772d6e15a104af284ed6864005cf8450ef
Add example from listing 11.4
ch11/radix_sort8.py
ch11/radix_sort8.py
Python
0
@@ -0,0 +1,2165 @@ +%22%22%22%0AListing 11.4: An eight-element radix sort%0A%22%22%22%0A%0Afrom io import open%0Aimport numpy as np%0Aimport pyopencl as cl%0Aimport utility%0A%0ANUM_SHORTS = 8%0A%0Akernel_src = '''%0A__kernel void radix_sort8(__global ushort8 *global_data) %7B%0A%0A typedef union %7B%0A ushort8 ...
b33303779a520a0751648d63977f78890ca11d37
make SCRAPY_LOG_FILE and SCRAPY_FEED_URI optional
scrapyd/launcher.py
scrapyd/launcher.py
import sys from datetime import datetime from multiprocessing import cpu_count from twisted.internet import reactor, defer, protocol, error from twisted.application.service import Service from twisted.python import log from scrapy.utils.python import stringify_dict from scrapyd.utils import get_crawl_args from .inter...
Python
0
@@ -2478,33 +2478,37 @@ lf.logfile = env -%5B +.get( 'SCRAPY_LOG_FILE @@ -2508,17 +2508,17 @@ OG_FILE' -%5D +) %0A @@ -2538,17 +2538,21 @@ le = env -%5B +.get( 'SCRAPY_ @@ -2560,17 +2560,17 @@ EED_URI' -%5D +) %0A
75a0cbbd5af597c6683b6644659780c3076b835e
Disable test_nonlocal_symbol unit test
tensorflow/python/autograph/pyct/static_analysis/activity_py3_test.py
tensorflow/python/autograph/pyct/static_analysis/activity_py3_test.py
# python3 # Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
Python
0.000001
@@ -1235,24 +1235,44 @@ in Python 3. +6 or later versions. %22%22%22%0A%0A def t @@ -1293,24 +1293,153 @@ ymbol(self): +%0A # TODO(b/137761188): Remove this skipTest once fixed.%0A self.skipTest('Annotation syntax is not recognized by Python 3.5') %0A%0A nonloc
f5271083eb9f90fba51bea91126d5eb7005f7c51
add script to delete webhooks
demos/webhooks_delete.py
demos/webhooks_delete.py
Python
0
@@ -0,0 +1,509 @@ +import sys%0A%0Afrom Ziggeo import Ziggeo%0A%0Aif(len(sys.argv) %3C 4):%0A print (%22Error%5Cn%22)%0A print (%22Usage: $%3Epython webhooks_delete.py YOUR_API_TOKEN YOUR_PRIVATE_KEY WEBHOOK_URL %5Cn%22)%0A print (%22Example: $%3Epython webhooks_delete.py 1234567890abcdef 1234567890abcdef http...
bbf056f834724a263dbce5c58104db296240a49c
add gyp file
pty.gyp
pty.gyp
Python
0.000001
@@ -0,0 +1,267 @@ +%7B%0A 'targets': %5B%7B%0A 'target_name': 'pty',%0A 'type': 'loadable_module',%0A 'product_extension': 'node',%0A 'product_prefix': '',%0A 'include_dirs': %5B%0A './src'%0A %5D,%0A 'sources': %5B%0A 'src/pty.cc'%0A %5D,%0A 'libraries': %5B%0A '-lutil'%0A ...
d98db37dc70a1126de371bf64e89cc4f20e03511
Create repr.py
repr.py
repr.py
Python
0.000001
@@ -0,0 +1,457 @@ +%22%22%22%0AOne useful class method to override is the built-in __repr__() method, which is short for representation; by providing a return%0Avalue in this method, we can tell Python how to represent an object of our class%0A%22%22%22%0A%0Aclass Point3D(object):%0A def __init__(self,x,y,z):%0A ...
267bf6b38481b2753721e2b5245362c5e6b033cb
Add test for optional host argument in RedisBuffer
tests/sentry/buffer/redis/tests.py
tests/sentry/buffer/redis/tests.py
# -*- coding: utf-8 -*- from __future__ import absolute_import import mock from sentry.buffer.redis import RedisBuffer from sentry.models import Group, Project from sentry.tasks.process_buffer import process_incr from tests.base import TestCase class RedisBufferTest(TestCase): def setUp(self): self.buf...
Python
0
@@ -405,16 +405,197 @@ shdb()%0A%0A + def test_default_host_is_local(self):%0A buf = RedisBuffer()%0A self.assertEquals(len(buf.conn.hosts), 1)%0A self.assertEquals(buf.conn.hosts.host, 'localhost')%0A%0A def
e7faa99d9816745338ada38d1a7d974bf3a739ae
Create pretty table of tie averages + function for pretty averages
s5v3.py
s5v3.py
Python
0.000004
@@ -0,0 +1,1541 @@ +from s5v2 import *%0Afrom prettytable import PrettyTable%0A%0Adef my_table(): # no arguments are passed in, which seems a bit weird. We're hard-coding a function that only does one thing.%0A%09x = PrettyTable(%5B'Style', 'Average Price'%5D) # setup a new pretty table list and give and give it two li...
dd9c96c7b12221029b7ea1a4f9748106520bd7a6
add syntax checker/linter/gotype support
gslint.py
gslint.py
Python
0
@@ -0,0 +1,2648 @@ +import sublime, sublime_plugin%0Aimport gscommon as gs%0Aimport re, threading%0A%0ALINE_PAT = re.compile(r':(%5Cd+):(%5Cd+):%5Cs+(.+)%5Cs*$', re.MULTILINE)%0A%0Aclass GsLint(sublime_plugin.EventListener):%0A rc = 0%0A errors = %7B%7D%0A%0A def on_selection_modified(self, view):%0A se...
0e681d5b5e0d23517a6f050d168e1e86de9eb074
Add unit test for utils.termcolor (closes #4)
test/t_utils/test_termcolor.py
test/t_utils/test_termcolor.py
Python
0
@@ -0,0 +1,721 @@ +# -*- coding: utf-8 -*-%0A%22%22%22%0A test.t_utils.test_termcolor%0A ~~~~~~~~~~~~~~~~~~~~~~~~~~~%0A%0A :copyright: Copyright 2014 by the RootForum.org team, see AUTHORS.%0A :license: MIT License, see LICENSE for details.%0A%22%22%22%0Afrom unittest import TestCase%0Afrom magrathea.utils....
a48c52ccb6e89edbc186e4e916b8151ff0fa232f
Add an admin
sendgrid_events/admin.py
sendgrid_events/admin.py
Python
0
@@ -0,0 +1,204 @@ +from django.contrib import admin%0A%0Afrom .models import Event%0A%0A%0Aadmin.site.register(Event, list_display=%5B%22kind%22, %22email%22, %22created_at%22%5D, list_filter=%5B%22created_at%22, %22kind%22%5D, search_fields=%5B%22email%22, %22data%22%5D)%0A
601b55aca479befbdc77ea65c4c3936c81f0e92a
Fix Travis CI Paths
tests/test_html_builder.py
tests/test_html_builder.py
import os import sys import unittest try: sys.path.insert(0, os.path.abspath('..')) #Works for local from sheetmaker import html_builder from data import test_html_constants except: from sheetmaker import html_builder #Works for Travis CI from data import test_html_constants class HtmlBuilderTes...
Python
0.000003
@@ -188,16 +188,83 @@ except:%0A + sys.path.insert(0, os.path.abspath('.')) #Works for Travis CI%0A from @@ -294,38 +294,16 @@ _builder - #Works for Travis CI %0A fro
3a7459f0f9e171954eb1f86a9e320ef889b9d1a5
Tidy up and en-repo my little monitor
watch_emotes.py
watch_emotes.py
Python
0
@@ -0,0 +1,936 @@ +import sys%0D%0Aimport time%0D%0Aimport pprint%0D%0Aimport subprocess%0D%0Aimport requests%0D%0Asys.path.append(%22../mustard-mine%22)%0D%0Aimport config%0D%0A%0D%0Aemote_count = None%0D%0Awhile emote_count is None or emote_count == len(emotes):%0D%0A%09req = requests.get(%22https://api.twitch.tv/kra...
5e5e74e606d9be3c60fb810ed215dfa109a6ad9f
fix #5 wavファイルを生成する処理を行うクラスを定義
libs/audio/create.py
libs/audio/create.py
Python
0
@@ -0,0 +1,1051 @@ +import wave%0Aimport struct%0Afrom pylab import *%0A%0A%22%22%22%0A%E6%8C%AF%E5%B9%85amp%E3%80%81%E5%9F%BA%E6%9C%AC%E5%91%A8%E6%B3%A2%E6%95%B0frq%E3%80%81%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AA%E3%83%B3%E3%82%B0%E5%91%A8%E6%B3%A2%E6%95%B0 fs%E3%80%81%0A%E3%83%93%E3%83%83%E3%83%88%E6%B7%B1%E5%BA%A6bit_d...
acda4ae5deff6b45f56b84cdecb867a09586af4a
Add lc295_find_median_from_data_stream.py
lc295_find_median_from_data_stream.py
lc295_find_median_from_data_stream.py
Python
0.000084
@@ -0,0 +1,1452 @@ +%22%22%22Leetcode 295. Find Median from Data Stream%0AHard%0A%0AURL: https://leetcode.com/problems/find-median-from-data-stream/%0A%0AMedian is the middle value in an ordered integer list. %0AIf the size of the list is even, there is no middle value. %0ASo the median is the mean of the two middle va...
e2a47d1ef44aa6b0ccc294aae68babd8ca54eb22
Create search_log_files.py
search_log_files.py
search_log_files.py
Python
0.000003
@@ -0,0 +1,1314 @@ +#!/usr/bin/env python%0Aimport os.path%0A%0A#Author: Sumit Joshi%0A#date:5/12/2015%0A# Log File Search Script%0A# This Script is useful for searching specific keyword in log files. For specific keyword it returns matching lines.%0A%0A%0Aprint %22******************************************************...
ae90cf26caa471f85d7e5e20ef2e349b78183f41
make python2 wokr
python/static_dependencies/__init__.py
python/static_dependencies/__init__.py
Python
0.999998
@@ -0,0 +1,20 @@ +__all__ = %5B'ecdsa'%5D%0A