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
7bace5ca301124f03d7ff98669ac08c0c32da55f
Add example OOP python script
labs/lab-5/oop.py
labs/lab-5/oop.py
Python
0.000005
@@ -0,0 +1,1134 @@ +#!/usr/bin/python%0A#%0A# Copyright 2016 BMC Software, Inc.%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0A# you may not use this file except in compliance with the License.%0A# You may obtain a copy of the License at%0A#%0A# http://www.apache.org/licenses/LICENSE-...
5f2533e090e181d84c3e5567131447aa4326773a
Add libx11 package
libx11/conanfile.py
libx11/conanfile.py
Python
0.000001
@@ -0,0 +1,1347 @@ +from conans import ConanFile, AutoToolsBuildEnvironment, tools%0Aimport os%0A%0A%0Aclass Libx11Conan(ConanFile):%0A name = %22libx11%22%0A version = %221.6.5%22%0A license = %22Custom https://cgit.freedesktop.org/xorg/lib/libX11/tree/COPYING%22%0A url = %22https://github.com/trigger-happ...
e972bb5127b231bfbdf021597f5c9a32bb6e21c8
Create gametesting.py
gametesting.py
gametesting.py
Python
0
@@ -0,0 +1 @@ +%0A
a83a48f6c9276b86c3cc13aeb000611036a6e3c4
Make all end-points accepting post
jedihttp/handlers.py
jedihttp/handlers.py
import bottle from bottle import response, request import json import jedi import logging app = bottle.Bottle( __name__ ) logger = logging.getLogger( __name__ ) @app.get( '/healthy' ) def healthy(): return _Json({}) @app.get( '/ready' ) def ready(): return _Json({}) @app.post( '/completions' ) def completio...
Python
0.000318
@@ -159,26 +159,27 @@ __ )%0A%0A%0A@app. -ge +pos t( '/healthy @@ -223,18 +223,19 @@ %0A%0A%0A@app. -ge +pos t( '/rea
64e91bf4a7fb8dae8ae49db64396bdfed12bec63
Add deploy script for pypi.
deploy.py
deploy.py
Python
0
@@ -0,0 +1,919 @@ +%22%22%22%0ADeploy this package to PyPi.%0A%0AIf the package is already uploaded (by --version) then this will do nothing.%0AReqires Python3.%0A%22%22%22%0A%0Aimport http.client%0Aimport json%0Aimport subprocess%0A%0A%0Adef setup(*args):%0A o = subprocess.check_output('python3 ./setup.py %25s' %25...
77a7873221fdbf2a83be99b6d05c5bb6bef65552
Fix silly logic from last commit.
flexget/plugins/services/pogcal_acquired.py
flexget/plugins/services/pogcal_acquired.py
from __future__ import unicode_literals, division, absolute_import import logging import re from datetime import datetime from sqlalchemy import Column, Unicode, Integer from flexget import validator from flexget.plugin import register_plugin from flexget.utils import requests from flexget.utils.soup import...
Python
0.999999
@@ -1679,19 +1679,22 @@ _name') -and +or not entry.g
2dfa0dd815061497f89f9ca5e09fa62ea4dc23bf
fix issue #956
launcher/start.py
launcher/start.py
#!/usr/bin/env python # coding:utf-8 import os, sys import time import atexit import webbrowser import launcher_log current_path = os.path.dirname(os.path.abspath(__file__)) python_path = os.path.abspath( os.path.join(current_path, os.pardir, 'python27', '1.0')) noarch_lib = os.path.abspath( os.path.join(python_path...
Python
0
@@ -564,16 +564,28 @@ err=PIPE +, shell=True )%0A
03137f65202f5423ea705db601aaea7f18c590f9
add the main file
lexos/__main__.py
lexos/__main__.py
Python
0.000001
@@ -0,0 +1,100 @@ +%22%22%22Module allowing for %60%60python -m lexos ...%60%60.%22%22%22%0Afrom lexos import application%0A%0Aapplication.run()%0A
370f5a87ac8d26245b5919fc98b24019861f4dde
Add missing test
tests/test_fetch_site_logs_from_ftp_sites.py
tests/test_fetch_site_logs_from_ftp_sites.py
Python
0.000383
@@ -0,0 +1,242 @@ +import pytest%0Aimport os%0A%0Afrom fetch_site_logs_from_ftp_sites import gws_list_site_logs%0A%0Adef test_get_gws_site_logs():%0A os.environ%5B'gws_url'%5D = 'https://testgeodesy-webservices.geodesy.ga.gov.au'%0A assert len(gws_list_site_logs()) %3E 1000%0A
65a639fafbe88b4867ff474b0884ebc2cc7c29d8
fix libjpeg_turbo in valid names
third_party/systemlibs/syslibs_configure.bzl
third_party/systemlibs/syslibs_configure.bzl
# -*- Python -*- """Repository rule for system library autoconfiguration. `syslibs_configure` depends on the following environment variables: * `TF_SYSTEM_LIBS`: list of third party dependencies that should use the system version instead """ _TF_SYSTEM_LIBS = "TF_SYSTEM_LIBS" VALID_LIBS = [ "absl_py", ...
Python
0.000561
@@ -606,12 +606,21 @@ %22 +lib jpeg +_turbo %22,%0A
0774413ae3623c28a8aaf77727d0c355f6a5bd7c
Add deezer_complete core plugin #146
timeside/plugins/provider/deezer_complete.py
timeside/plugins/provider/deezer_complete.py
Python
0
@@ -0,0 +1,920 @@ +from timeside.core import implements, interfacedoc%0Afrom timeside.core.provider import Provider%0Afrom timeside.core.api import IProvider%0Afrom timeside.core.tools.utils import slugify%0A%0Aimport os%0Afrom requests import get%0A%0A%0Aclass DeezerComplete(Provider):%0A %22%22%22%0A Represents...
fa8032792f208e2693f8f6a4693ba9af084de935
use path
src/robotide/spec/librarymanager.py
src/robotide/spec/librarymanager.py
# Copyright 2008-2012 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.000005
@@ -622,16 +622,26 @@ t Queue%0A +import os%0A from thr @@ -844,16 +844,27 @@ rom_spec +, _get_path %0A%0Aclass @@ -1722,32 +1722,117 @@ ge%0A try:%0A + path =_get_path(library_name.replace('/', os.sep), os.path.abspath('.'))%0A keyw @@ -1870,28 +1870,20 @@ process( -library_name +...
02c06a544b1b6e4230a9b658540b360cc60c0bb5
add cmstat.py
gist/cmstat.py
gist/cmstat.py
Python
0.000101
@@ -0,0 +1,1771 @@ +from __future__ import print_function%0Aimport sh%0Afrom collections import namedtuple%0Aimport os%0Aimport itertools%0Agit = sh.git.bake()%0A%0A%0ANumStat = namedtuple('NumStat', %5B'insert', 'delete', 'filename'%5D)%0A%0A%0Adef getCommit(commit):%0A %22%22%22get commit message%0A --no-pager:...
e29a2107cd08e6b40b99e3682d783887107a5e77
Add a loader to load several yaml files
populous/loader.py
populous/loader.py
Python
0
@@ -0,0 +1,1859 @@ +import collections%0A%0Aimport yaml%0A%0A%0Adef load_yaml(*filenames):%0A %22%22%22%0A Parse the given files as if they were a single YAML file.%0A %22%22%22%0A with ChainedFileObject(*filenames) as f:%0A return yaml.load(f)%0A%0A%0Aclass ChainedFileObject(object):%0A %22%22%22...
555cedf76d5f569b8a99691ed7dba672e578bb42
Add admin integration for positions
positions/admin.py
positions/admin.py
Python
0
@@ -0,0 +1,263 @@ +from django.contrib import admin%0Afrom .models import Position%0A%0Aclass PositionAdminIndex(admin.ModelAdmin):%0A list_display = %5B'title', 'date'%5D%0A%0A list_filter = %5B'date'%5D%0A%0A search_fields = %5B'title', 'content'%5D%0Aadmin.site.register(Position, PositionAdminIndex)
9dc39f6492d9ece3964d5cb733cc146acee7cf66
Create w3_1.py
w3_1.py
w3_1.py
Python
0.000482
@@ -0,0 +1,15 @@ +print(%22hello%22)%0A
31fcd83585905ca28245e42163c77af38f0c83cf
Create w3_1.py
w3_1.py
w3_1.py
Python
0.000482
@@ -0,0 +1,14 @@ +print(%22test%22)%0A
d35f2d7310c277625ea6e2e15b887ac9620696a7
Add unit test for glacier vault
tests/unit/glacier/test_vault.py
tests/unit/glacier/test_vault.py
Python
0
@@ -0,0 +1,2219 @@ +#!/usr/bin/env python%0A# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved%0A#%0A# Permission is hereby granted, free of charge, to any person obtaining a%0A# copy of this software and associated documentation files (the%0A# %22Software%22), to deal in the Software without...
d44f12ca4395c0001bbaf0cf0d5436a84484569c
Create fasta2nexus.py
biokit/converters/fasta2nexus.py
biokit/converters/fasta2nexus.py
Python
0.000001
@@ -0,0 +1,510 @@ +from Bio import AlignIO%0A%0A%0Aclass Fasta2Nexus(object):%0A %22%22%22%0A %22%22%22%0A def __init__(self, infile, outfile, *args, **kwargs):%0A %22%22%22%0A %22%22%22%0A self.infile = infile%0A self.outfile = outfile%0A%0A def __call__(self):%0A%0A inpu...
e8cd41a2151e5907aeaac685f5c78300a010ce7e
add sensu plugin to check eventanomaly
plugins/bongo/check-eventanomaly.py
plugins/bongo/check-eventanomaly.py
Python
0
@@ -0,0 +1,2257 @@ +#!/usr/bin/env python%0A%0Afrom optparse import OptionParser%0Aimport socket%0Aimport sys%0Aimport httplib%0Aimport json%0A%0APASS = 0%0AFAIL = 1%0A%0Adef get_bongo_host(server, app):%0A try:%0A con = httplib.HTTPConnection(server, timeout=45)%0A con.request(%22GET%22,%22/v2/apps/%2...
6a95f7aa987994cdd173dc52d5de2754e449ebbb
Add a Python script that controls the user list in my own Twitter lists.
listmanager.py
listmanager.py
Python
0
@@ -0,0 +1,2037 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%22%22%22This script manages your own Twitter lists.%0A%0AExamples:%0A You can add users to a list by the %22add%22 command::%0A%0A $ python listmanager.py add your_screen_name your_list_name user1 %5Buser2 ...%5D%0A%0A Likewise, you can also re...
489c77d3bbd3a9e0e14578f4371870042e2d04d1
Add another debug script
debug1.py
debug1.py
Python
0.000001
@@ -0,0 +1,512 @@ +import logging%0Aimport threading%0Afrom cornbread.xorg import *%0A%0Aif __name__ == '__main__':%0A logging.warning('Creating FW')%0A w = FocusedWindow()%0A%0A logging.warning('Creating FW thread')%0A t = threading.Thread(target=FocusedWindowWatcher, args=(w,))%0A%0A logging.warning('S...
b6b65f0ca7253af5325eafc6b19e7cfecda231b3
Add solution for exercise 2b of hw3
hw3/hw3_2b.py
hw3/hw3_2b.py
Python
0.000071
@@ -0,0 +1,496 @@ +import sympy%0A%0Ax1, x2 = sympy.symbols('x1 x2')%0Af = 8*x1 + 12*x2 + x1**2 -2*x2**2%0A%0Adf_dx1 = sympy.diff(f,x1)%0Adf_dx2 = sympy.diff(f,x2)%0AH = sympy.hessian(f, (x1, x2))%0A%0Axs = sympy.solve(%5Bdf_dx1, df_dx2%5D, %5Bx1, x2%5D)%0A%0AH_xs = H.subs(%5B(x1,xs%5Bx1%5D), (x2,xs%5Bx2%5D)%5D)%0Alamb...
8649fef1ddea18525fd0f6c5f8aa42e18b0726f8
rename plot to visualizer
lib/visualizer.py
lib/visualizer.py
Python
0.000874
@@ -0,0 +1,2232 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0Aimport matplotlib.pyplot as plt%0Afrom matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas%0Aimport datetime%0Aimport time%0Afrom utils import slugify%0Afrom scipy.cluster.hierarchy import dendrogram%0A%0Adef create_bar_graph(_x...
71b0af732e6d151a22cc0d0b28b55020780af8b6
Add memoize function for python 2.x
ftools.py
ftools.py
Python
0.000018
@@ -0,0 +1,515 @@ +from functools import wraps%0A%0A%0Adef memoize(obj):%0A # This is taken from the Python Decorator Library on the official Python%0A # wiki. https://wiki.python.org/moin/PythonDecoratorLibrary#Memoize%0A # Unfortunately we're using Python 2.x here and lru_cache isn't available%0A%0A cach...
1967db2a9b6e3b4420a1ebc5fe5fe157d61c6314
Initialise entry and do a proper 404 if it could not be found.
kindlefeed.py
kindlefeed.py
# KindleFeed Controller # ===================== # # This file is part of KindleFeed. # # KindleFeed is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option)...
Python
0
@@ -1402,16 +1402,30 @@ eed_url) +%0A%09entry = None %0A%0A%09for i @@ -1477,16 +1477,56 @@ ntry = i +%0A%09%0A%09if entry == None:%0A%09%09flask.abort(404) %0A%0A%09retur
7b05d0a9d8017477cd6ddfac6ba56898affcdf37
Revert "start reactor in separate thread"
king/tking.py
king/tking.py
import exceptions, sys from twisted.internet import reactor from twisted.names import dns as twisted_dns from twisted.names import server from datetime import datetime from random import randrange from threading import Thread from time import sleep from datetime import datetime import dns.query, dns.rdatatype, dns.exce...
Python
0
@@ -1130,18 +1130,8 @@ - udpPort = rea @@ -1170,18 +1170,8 @@ - tcpPort = rea @@ -1275,19 +1275,21 @@ t. -run +start ()%0A%0A @@ -1296,62 +1296,70 @@ -udpPort.stopListening()%0A tcpPort.stopListening( +# Start DNS Server%0A reactor.run(installSignalHandlers=0 )%0A%0A @@...
4bc2c46e605b7bffb6e7e8206fdb6bb168864c45
test random user fulfilling the specifications
listRandomUser.py
listRandomUser.py
Python
0
@@ -0,0 +1,1445 @@ +import random%0Aclass list_random:%0A%0A def __init__(self, n):%0A self.n=n%0A self.count=n/2%0A self.l_tuple=%5B%5D%0A for i in range(n):%0A for j in range(i+1,n):%0A self.l_tuple.append(%5Bi,j,0%5D)%0A # 0 no usado%0A ...
c2f1717c53042f8ff3a7ba169a2db365aa8bc8ba
ADd gff2togff3.py
gff2togff3.py
gff2togff3.py
Python
0.001224
@@ -0,0 +1,361 @@ +%22%22%22Change attribute string from GFF2 format GGF3 format.%22%22%22%0A%0Aimport csv%0Aimport sys%0A%0Afor row in csv.reader(open(sys.argv%5B1%5D), delimiter=%22%5Ct%22):%0A if not row%5B0%5D.startswith(%22#%22):%0A row%5B8%5D = %22;%22.join(%0A %5B%22%25s=%25s%22 %25 (attribu...
a18e1b9fde1b86c4cfee2c202fcebe0d1fd640e9
debug mode off!
lib/Artist.py
lib/Artist.py
from flask import Flask from flask import render_template from flask import jsonify from flask import session from flask import redirect from flask import request from multiprocessing import Process from time import sleep from time import time class Artist(object): def __init__(self, diary, config_opts): ...
Python
0
@@ -592,16 +592,17 @@ rself.%22%0A +#
ac89ec64ab619bfa778d0961aeaefc8967d971a3
Add errors.py to move away from Python errors
errors.py
errors.py
Python
0.000001
@@ -0,0 +1,293 @@ +# Kimi language interpreter in Python 3%0A# Anjana Vakil%0A# http://www.github.com/vakila/kimi%0A%0Adef complain_and_die(message):%0A print(message)%0A quit()%0A%0Adef assert_or_complain(assertion, message):%0A try:%0A assert assertion%0A except AssertionError:%0A complain_a...
5cb726d5139537cbe7c03bc5ed540b9cdb7c7e21
Add bzero simprocedure I have had lying around forever
angr/procedures/posix/bzero.py
angr/procedures/posix/bzero.py
Python
0
@@ -0,0 +1,173 @@ +from ..libc import memset%0A%0Aclass bzero(memset.memset):%0A def run(self, addr, size):%0A return super().run(addr, self.state.solver.BVV(0, self.arch.byte_width), size)%0A
551f78f32665b1397120ada10036c1d9c09daddc
Create flip-bits.py
lulu/flip-bits.py
lulu/flip-bits.py
Python
0.000004
@@ -0,0 +1,448 @@ +class Solution:%0A %22%22%22%0A @param a, b: Two integer%0A return: An integer%0A %22%22%22%0A def bitSwapRequired(self, a, b):%0A # write your code here%0A return self.countOnes(a%5Eb)%0A %0A def countOnes(self, num):%0A # write your code here%0A ...
b62b3b26f2ae6525a53b211c7f291aa7be51d377
Monitor all sensor types by default to rtorrent (#17894)
homeassistant/components/sensor/rtorrent.py
homeassistant/components/sensor/rtorrent.py
"""Support for monitoring the rtorrent BitTorrent client API.""" import logging import xmlrpc.client import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( CONF_URL, CONF_NAME, CONF_MONITORED_VARIABLES, STATE_IDLE) from homeassistant.helpers.enti...
Python
0
@@ -1012,21 +1012,28 @@ ult= -%5B%5D): vol.All( +list(SENSOR_TYPES)): %0A @@ -1037,16 +1037,24 @@ +vol.All( cv.ensur
75437fc5607b41763f8c81813ba12dbe1c414c5f
combine the sequence names from various headers and then concatonate the sam entries
iron/utilities/combine_sam.py
iron/utilities/combine_sam.py
Python
0.000001
@@ -0,0 +1,1050 @@ +#!/usr/bin/python%0Aimport sys, argparse, re%0A%0Adef main():%0A parser = argparse.ArgumentParser(description = 'Combine sam files')%0A parser.add_argument('sam_files',nargs='+',help='FILENAME for sam files')%0A args = parser.parse_args()%0A header = False%0A seqs = set()%0A tagorder = %5B%5D%...
e3c493847ead7352ecad1e92a739a1b79549a70c
Add dodo tape command
dodo_commands/extra/webdev_commands/tape.py
dodo_commands/extra/webdev_commands/tape.py
Python
0.000004
@@ -0,0 +1,722 @@ +# noqa%0Aimport argparse%0Afrom dodo_commands.extra.standard_commands import DodoCommand%0A%0A%0Aclass Command(DodoCommand): # noqa%0A help = %22%22%0A decorators = %5B%22docker%22%5D%0A docker_options = %5B%0A '--name=tape',%0A %5D%0A%0A def add_arguments_imp(self, parser): #...
0f13cc95eeeed58c770e60b74a37f99ca24a28f0
add tests for views
api/tests/test_views.py
api/tests/test_views.py
Python
0
@@ -0,0 +1,1508 @@ +from django.test import TestCase%0Afrom rest_framework.test import APIClient%0Afrom rest_framework import status%0Afrom django.core.urlresolvers import reverse%0A%0Aclass ViewsTestCase(TestCase):%0A %22%22%22Test suite for views.%22%22%22%0A%0A def setUp(self):%0A %22%22%22setup variabl...
27788308891d9cd82da7782d62b5920ea7a54f80
Add custom command to daily check scores
employees/management/commands/dailycheck.py
employees/management/commands/dailycheck.py
Python
0
@@ -0,0 +1,3028 @@ +from constance import config%0Afrom datetime import datetime%0Afrom django.core.management.base import BaseCommand%0Afrom django.core.mail import EmailMessage%0Afrom django.shortcuts import get_list_or_404%0Afrom employees.models import Employee%0A%0A%0Aclass Command(BaseCommand):%0A help = %22Up...
8aac73fdc26fd838c3f91ffa9bc58e25777a5179
Add tests for mach angle
properties/tests/test_mach_angle.py
properties/tests/test_mach_angle.py
Python
0
@@ -0,0 +1,540 @@ +#!/usr/bin/env python%0A%0A%22%22%22Test Mach angle functions.%0A%0ATest data is obtained from http://www.grc.nasa.gov/WWW/k-12/airplane/machang.html.%0A%22%22%22%0A%0A%0Aimport nose%0Aimport nose.tools as nt%0A%0Afrom properties.prandtl_meyer_function import mu_in_deg%0A%0A%0A@nt.raises(ValueError)%...
49dfd690abe794e3b393b8bcac3e0ab1427c41b3
Define riot_open.
riot/app.py
riot/app.py
Python
0.000913
@@ -0,0 +1,185 @@ +# -*- coding: utf-8 -*-%0A%0Aimport urwid%0A%0Adef run_tag(tag, *args, **kwargs):%0A loop = urwid.MainLoop(tag, *args, **kwargs)%0A loop.run()%0A%0Adef quit_app():%0A raise urwid.ExitMainLoop()%0A
f1cc40c716f1e4f598e0a9230cd188fc897ac117
add config
moon/config.py
moon/config.py
Python
0.000002
@@ -0,0 +1,1197 @@ +# -*- coding: utf-8 -*-%0A%22%22%22 %E8%BF%99%E9%87%8C%E6%98%AF%E4%B8%80%E4%BA%9B%E5%B7%A5%E5%85%B7, %E7%94%A8%E6%9D%A5%E5%AE%9E%E7%8E%B0%E7%AE%80%E5%8D%95%E7%9A%84%E9%A1%B9%E7%9B%AE%E9%85%8D%E7%BD%AE%E7%B3%BB%E7%BB%9F %22%22%22%0Aimport logging%0A%0A_confdata = %7B%7D%0A%0A%0Adef setconf(prjname, c...
106a339561f5b79e0cd9508246d2f8da227c4fdc
move file to folder
move_hmdb51.py
move_hmdb51.py
Python
0.000003
@@ -0,0 +1,1139 @@ +import argparse%0Aimport os%0Aimport sys%0Aimport math%0Aimport cv2%0Aimport numpy as np%0Aimport multiprocessing%0Aimport re%0Aimport shutil%0A%0A%0A%0Aparser = argparse.ArgumentParser()%0Aparser.add_argument('--data_dir', type=str, help=%22video image list%22,%0A%09%09%09%09%09default='/media/llj/...
6349d8acfd76fc893dfdb6a7c12aebfe9ec1bac9
add plexpy/Plex.tv
Contents/Libraries/Shared/subzero/lib/auth.py
Contents/Libraries/Shared/subzero/lib/auth.py
Python
0
@@ -0,0 +1,2120 @@ +# coding=utf-8%0A%0A%0A# thanks, https://github.com/drzoidberg33/plexpy/blob/master/plexpy/plextv.py%0A%0Aclass PlexTV(object):%0A %22%22%22%0A Plex.tv authentication%0A %22%22%22%0A%0A def __init__(self, username=None, password=None):%0A self.protocol = 'HTTPS'%0A self.use...
d0c2ee2e0d848a586cc03ba5ac5da697b333ef32
Create list of random num
Misc/listOfRandomNum.py
Misc/listOfRandomNum.py
Python
0.00002
@@ -0,0 +1,176 @@ +#List of randoms%0A%0Aimport random%0Aimport math%0A%0AnumList = %5B%5D%0A%0Afor i in range(10):%0A numList.append(random.randrange(1, 20))%0A%0Afor i in numList:%0A print(%22Rand num = %22 + str(i))%0A
9f508a429949d59f9969cc1e17a9094fa7c2441d
Create routines.py
routines.py
routines.py
Python
0.000003
@@ -0,0 +1 @@ +%0A
85abbe29c7c764deac75b6e7b95e1ccec645d84b
Add icmp_ping ansible module
ansible-tests/validations/library/icmp_ping.py
ansible-tests/validations/library/icmp_ping.py
Python
0
@@ -0,0 +1,971 @@ +#!/usr/bin/env python%0A%0ADOCUMENTATION = '''%0A---%0Amodule: icmp_ping%0Ashort_description: ICMP ping remote hosts%0Arequirements: %5B ping %5D%0Adescription:%0A - Check host connectivity with ICMP ping.%0Aoptions:%0A host:%0A required: true%0A description:%0A - IP ad...
24cf3ca775e8f42fa73217e29d3662a32627f9ea
Use a more reliable method to get the commit SHA for a tag.
buedafab/notify.py
buedafab/notify.py
"""Deploy notification hooks for third party services like Campfire and Hoptoad. """ from fabric.api import env, require, local from fabric.decorators import runs_once import os from buedafab import utils @runs_once def hoptoad_deploy(deployed=False): """Notify Hoptoad of the time and commit SHA of an app deploy....
Python
0
@@ -2281,41 +2281,46 @@ rev- -parse --short %25(release)s' %25 env, +list --abbrev-commit %25s %7C head -n 1' %25 %0A @@ -2323,32 +2323,45 @@ %0A + env.release, capture=True)%0A
d3937b803baf036d5bd96dfcb1e10e51b29bab1e
Create migration
fellowms/migrations/0023_event_ad_status.py
fellowms/migrations/0023_event_ad_status.py
Python
0.000001
@@ -0,0 +1,540 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.9.7 on 2016-06-06 13:00%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('fellowms', '0022_fellow_user'),%0A %5D%0A%0A o...
db465ffe58a425b651930eaf1778ef179ed42d2a
Rename res_dict to result and add comment.
redash/query_runner/dynamodb_sql.py
redash/query_runner/dynamodb_sql.py
import json import logging import sys from redash.query_runner import * from redash.utils import JSONEncoder logger = logging.getLogger(__name__) try: from dql import Engine, FragmentEngine from pyparsing import ParseException enabled = True except ImportError, e: enabled = False types_map = { ...
Python
0
@@ -32,17 +32,16 @@ rt sys%0A%0A -%0A from red @@ -2339,20 +2339,18 @@ res -_dic +ul t = engi @@ -2458,24 +2458,197 @@ rows = %5B%5D +%0A%0A # When running a count query it returns the value as a string, in which case%0A # we transform it into a dictionary to be the same as regular qu...
0781070ee0c17a34a3cc9521e8a6b67c401aa692
Add WGAN Tests
models/wgan_test.py
models/wgan_test.py
Python
0
@@ -0,0 +1,870 @@ +# Lint as: python3%0A%22%22%22Tests for WGAN model.%22%22%22%0A%0Afrom __future__ import absolute_import%0Afrom __future__ import division%0Afrom __future__ import print_function%0A%0Aimport tensorflow as tf%0Aimport numpy as np%0Aimport os%0A%0Aimport wgan%0A%0A%0Aclass SpectralTest(tf.test.TestCase...
e90d12802ff62738cbe4094e8db079f6519f47a5
Create BDayGift.py
Probability/BDayGift.py
Probability/BDayGift.py
Python
0
@@ -0,0 +1,120 @@ +import sys;%0A%0An = int(sys.stdin.readline());%0AS = 0%0Afor i in range(n):%0A S += int(sys.stdin.readline());%0A %0Aprint(S/2.0);%0A
45f91a92fd3ae08dd7403707f3981f306122eb6c
test task creation
freelancefinder/remotes/tests/test_tasks.py
freelancefinder/remotes/tests/test_tasks.py
Python
0.000322
@@ -0,0 +1,425 @@ +%22%22%22Tests related to the remotes.tasks functions.%22%22%22%0A%0Afrom django_celery_beat.models import IntervalSchedule, PeriodicTask%0A%0Afrom ..tasks import setup_periodic_tasks%0A%0A%0Adef test_make_tasks():%0A %22%22%22Ensure that setup makes some tasks/schedules.%22%22%22%0A setup_peri...
9edce7cb1704aa1d06b74b661725d54b465e54da
Add SQLALCHEMY_ECHO support in heroku.py (when debugging)
heroku.py
heroku.py
#!/usr/bin/env python from evesrp import create_app from evesrp.killmail import CRESTMail, ZKillmail from evesrp.transformers import ShipTransformer, PilotTransformer from evesrp.auth.testauth import TestAuth from evesrp.auth.bravecore import BraveCore from os import environ as env from binascii import unhexlify from e...
Python
0
@@ -1980,16 +1980,119 @@ g = True +%0A if config.get('SQLALCHEMY_ECHO') is not None:%0A app.config%5B'SQLALCHEMY_ECHO'%5D = True %0A%0A se
cd3f59026b9026d62537b38d4e9d70a740e88018
Add tests for java mode
tests/test_java_mode.py
tests/test_java_mode.py
Python
0.000001
@@ -0,0 +1,2195 @@ +import editor_manager%0Aimport editor_common%0Aimport curses%0Aimport curses.ascii%0Aimport keytab%0Afrom ped_test_util import read_str,validate_screen,editor_test_suite,play_macro,screen_size,match_attr%0A%0Adef test_java_mode(testdir,capsys):%0A with capsys.disabled():%0A def main(stdscr...
f03f976696077db4146ea78e0d0b1ef5767f00ca
Add high level signing capabilities
tests/unit/test_sign.py
tests/unit/test_sign.py
Python
0
@@ -0,0 +1,554 @@ +# Import libnacl libs%0Aimport libnacl.sign%0A%0A# Import pythonlibs%0Aimport unittest%0A%0A%0Aclass TestSigning(unittest.TestCase):%0A '''%0A '''%0A def test_sign(self):%0A msg = ('Well, that%5C's no ordinary rabbit. That%5C's the most foul, '%0A 'cruel, and bad-temper...
f6609763f832cd5672e40d1dfe8f7dc7c58ca7c5
Create diarygui.py
_src/om2py2w/2wex0/diarygui.py
_src/om2py2w/2wex0/diarygui.py
Python
0
@@ -0,0 +1,1052 @@ +# -*- coding: utf-8 -*- %0A# ------------2w task:simple diary GUI-----------%0A# --------------created by bambooom-------------- %0A%0A%0Afrom Tkinter import * # import Tkinter module%0Afrom ScrolledText import * # ScrolledText module = Text Widget + scrollbar%0A%0Aglobal newlog%0A%0Aclass App...
c43c7d523ddbb5b914748a20d55971fbf1c12496
Create oauth2token.py
oauth2token.py
oauth2token.py
Python
0.000016
@@ -0,0 +1,1204 @@ +#!/usr/bin/python%0A%0A'''%0A This script will attempt to open your webbrowser,%0A perform OAuth 2 authentication and print your access token.%0A%0A It depends on two libraries: oauth2client and gflags.%0A%0A To install dependencies from PyPI:%0A%0A $ pip install python-gflags oauth2c...
31cdb65a8d370c6f309ad610aa3b969d5bfb8706
Add follow_bot.py
follow_bot.py
follow_bot.py
Python
0.00002
@@ -0,0 +1,1530 @@ +%22%22%22Follow bot, to follow some followers from an account%0A%22%22%22%0A__date__ = '08/01/2014'%0A__author__ = '@ismailsunni'%0A%0Aimport tweepy%0Aimport constants%0A%0A# constants%0Aconsumer_key = constants.consumer_key%0Aconsumer_secret = constants.consumer_secret%0Aaccess_key = constants.acce...
e26be1cdee6b40896e7ee5c2a894fba05fc58480
Add traceview directory.
traceview/__init__.py
traceview/__init__.py
Python
0
@@ -0,0 +1,233 @@ +# -*- coding: utf-8 -*-%0A%0A%22%22%22%0ATraceView API library%0A%0A:copyright: (c) 2014 by Daniel Riti.%0A:license: MIT, see LICENSE for more details.%0A%0A%22%22%22%0A%0A__title__ = 'traceview'%0A__version__ = '0.1.0'%0A__author__ = 'Daniel Riti'%0A__license__ = 'MIT'%0A
b28d2933ac1b5c6375f9dd5142f467a06bd69463
add a simple plot script to visualize the distribution
Utils/py/BallDetection/Evaluation/plot_csv.py
Utils/py/BallDetection/Evaluation/plot_csv.py
Python
0
@@ -0,0 +1,221 @@ +import matplotlib.pyplot as plt%0Aimport sys%0Aimport numpy as np%0A%0Ascores = np.genfromtxt(sys.argv%5B1%5D, usecols=(1), skip_header=1, delimiter=%22,%22)%0A%0Ascores = np.sort(scores)%0A%0Aplt.style.use('seaborn')%0Aplt.plot(scores)%0Aplt.show()
6d910181758008d05de3917fdac5b35b34188a8e
add RebootNodeWithPCU call. fails gracefully if dependencies are not met.
PLC/Methods/RebootNodeWithPCU.py
PLC/Methods/RebootNodeWithPCU.py
Python
0
@@ -0,0 +1,2270 @@ +import socket%0A%0Afrom PLC.Faults import *%0Afrom PLC.Method import Method%0Afrom PLC.Parameter import Parameter, Mixed%0Afrom PLC.Nodes import Node, Nodes%0Afrom PLC.NodeNetworks import NodeNetwork, NodeNetworks%0Afrom PLC.Auth import Auth%0Afrom PLC.POD import udp_pod%0A%0Atry:%0A%09from pcucontr...
f75e1397735adcbd39dbc90a0446b9efd9532be4
add initial python script to handle button events that trigger the node process
bin/selfie.py
bin/selfie.py
Python
0
@@ -0,0 +1,346 @@ +#!/usr/bin/python%0A%0Aimport RPi.GPIO as GPIO%0Aimport time%0Afrom subprocess import call%0A%0AGPIO.setmode(GPIO.BCM)%0A%0ABUTTON = 18;%0A%0AGPIO.setup(BUTTON, GPIO.IN, pull_up_down=GPIO.PUD_UP)%0A%0Awhile True:%0A input_state = GPIO.input(BUTTON)%0A if input_state == False:%0A print('B...
fb83969c6467e288ff16661aec2eafc174bdf124
correct fieldsight form issue fix
onadata/apps/fsforms/management/commands/set_correct_fxf_in_finstance.py
onadata/apps/fsforms/management/commands/set_correct_fxf_in_finstance.py
Python
0
@@ -0,0 +1,1431 @@ +from django.db import transaction%0Afrom django.core.management.base import BaseCommand%0A%0Afrom onadata.apps.fieldsight.models import Site%0Afrom onadata.apps.fsforms.models import FieldSightXF, FInstance%0Afrom onadata.apps.viewer.models.parsed_instance import update_mongo_instance%0A%0A%0Aclass ...
0f76875400ea1a03a23a4b266eb0ca9bf574922d
implement 9 (9) 各行を2コラム目,1コラム目の優先順位で辞書の逆順ソートしたもの(注意: 各行の内容は変更せずに並び替えよ).確認にはsortコマンドを用いよ(この問題は結果が合わなくてもよい).
set01/09.py
set01/09.py
Python
0.000001
@@ -0,0 +1,381 @@ +# -*- coding: utf-8 -*-%0A# (9) %E5%90%84%E8%A1%8C%E3%82%92%EF%BC%92%E3%82%B3%E3%83%A9%E3%83%A0%E7%9B%AE%EF%BC%8C%EF%BC%91%E3%82%B3%E3%83%A9%E3%83%A0%E7%9B%AE%E3%81%AE%E5%84%AA%E5%85%88%E9%A0%86%E4%BD%8D%E3%81%A7%E8%BE%9E%E6%9B%B8%E3%81%AE%E9%80%86%E9%A0%86%E3%82%BD%E3%83%BC%E3%83%88%E3%81%97%E3%81%9...
c24dc9072e1e8bddc3dbda09f1b98b51d91fc644
fix fetching (#2921)
var/spack/repos/builtin/packages/oce/package.py
var/spack/repos/builtin/packages/oce/package.py
############################################################################## # Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
Python
0.000002
@@ -1473,80 +1473,8 @@ oce%22 -%0A url = %22https://github.com/tpaviot/oce/archive/OCE-0.18.tar.gz%22 %0A%0A @@ -2031,24 +2031,167 @@ en='+tbb')%0A%0A + def url_for_version(self, version):%0A return 'https://github.com/tpaviot/oce/archive/OCE-%25s.tar.gz' %25 (%0A version.dotted)%0A%0A...
d654bf0fb0c5e3fc7a11029a216c109b5f04d37b
Add __init__ file
taxdata/cps/__init__.py
taxdata/cps/__init__.py
Python
0.00026
@@ -0,0 +1,458 @@ +# flake8: noqa%0Afrom taxdata.cps import benefits%0Afrom taxdata.cps import cps_meta%0Afrom taxdata.cps import cpsmar%0Afrom taxdata.cps.create import create%0Afrom taxdata.cps.finalprep import finalprep%0Afrom taxdata.cps import helpers%0Afrom taxdata.cps import impute%0Afrom taxdata.cps import pycp...
1fddb845ad99bb65aa7b86155d899043a64ebdcf
Update app/views/main/views.py
app/views/main/views.py
app/views/main/views.py
Python
0
@@ -0,0 +1,1785 @@ +from flask import current_app as app%0Afrom flask import flash%0Afrom flask import redirect%0Afrom flask import render_template%0Afrom flask import url_for%0Afrom flask_login import current_user%0Afrom flask_login import login_required%0A%0Afrom . import main%0Afrom .forms import SearchForm%0A%0Afro...
938a9548b6503136b82fd248258df5f4e0523f8a
add sorting_algorithms.py
adv/sorting_algorithms.py
adv/sorting_algorithms.py
Python
0.003966
@@ -0,0 +1,2180 @@ +# Sorting Algorithms%0D%0A%0D%0Aimport random%0D%0Aimport time%0D%0A%0D%0Amy_list = range(10000)%0D%0A%0D%0Arandom.shuffle(my_list)%0D%0A%0D%0A#print sorted(my_list) #We have a way to sort information.%0D%0A%0D%0A# But how did it do that?%0D%0A%0D%0A##################################################...
bb7031385af7931f9e12a8987375f929bcfb6b5a
Create script that checks for dev and docs dependencies.
scripts/devdeps.py
scripts/devdeps.py
Python
0
@@ -0,0 +1,1763 @@ +from __future__ import print_function%0A%0Aimport sys%0A%0Atry:%0A import colorama%0A def blue(text): return %22%25s%25s%25s%22 %25 (colorama.Fore.BLUE, text, colorama.Style.RESET_ALL)%0A def red(text): return %22%25s%25s%25s%22 %25 (colorama.Fore.RED, text, colorama.Style.RESET_ALL)%0Aexce...
a23e08275652f7356863edada51e7dee345a2dfc
Add functools from Python trunk r65615
test-tools/functools.py
test-tools/functools.py
Python
0
@@ -0,0 +1,2162 @@ +%22%22%22functools.py - Tools for working with functions and callable objects%0A%22%22%22%0A# Python module wrapper for _functools C module%0A# to allow utilities written in Python to be added%0A# to the functools module.%0A# Written by Nick Coghlan %3Cncoghlan at gmail.com%3E%0A# Copyright (C) 20...
d3a652111aa7df0a5ecc429db6aa639f9a667ff9
Create imogen.py
imogen.py
imogen.py
Python
0.000001
@@ -0,0 +1 @@ +%0A
ca098b540b171460f41ea66c01d2b0d039feb073
Add arrange combination algorithm
arrange_combination/arrange.py
arrange_combination/arrange.py
Python
0.000036
@@ -0,0 +1,450 @@ +#!/usr/bin/env python%0A%0Adef range(input_list, step):%0A%0A if step == 3:%0A print(input_list)%0A return%0A%0A for i in range(step, len(input_list)):%0A input_list%5Bstep%5D, input_list%5Bi%5D = input_list%5Bi%5D, input_list%5Bstep%5D%0A range(input_list, step+1)%0A input_list%5Bst...
c28522ace1efc0d2c7545bbc742356f6f6428812
Use argparse in the radare module.
modules/radare.py
modules/radare.py
# -*- coding: utf-8 -*- # This file is part of Viper - https://github.com/botherder/viper # See the file 'LICENSE' for copying permission. import os import sys import getopt from viper.common.out import * from viper.common.abstracts import Module from viper.core.session import __sessions__ ext = ".bin" run_radare =...
Python
0
@@ -165,46 +165,32 @@ ort -getopt%0A%0Afrom viper.common.out import * +shlex%0Aimport subprocess%0A %0Afro @@ -344,16 +344,19 @@ + 'win32': @@ -363,16 +363,17 @@ 'r2'%7D%0A%0A +%0A class Ra @@ -481,32 +481,185 @@ __init__(self):%0A + super(Radare, self).__init__()%0A self.parser.add_a...
f0da1774514c839b4b97fa92d2202437932dc99a
Add a small driver for plotting skeletons.
analysis/plot-skeleton.py
analysis/plot-skeleton.py
Python
0
@@ -0,0 +1,474 @@ +#!/usr/bin/env python%0A%0Aimport climate%0A%0Aimport database%0Aimport plots%0A%0A%0A@climate.annotate(%0A root='plot data rooted at this path',%0A pattern=('plot data from files matching this pattern', 'option'),%0A)%0Adef main(root, pattern='*/*block02/*trial00*.csv.gz'):%0A with plots.sp...
060c8a4379aef14459929a47bf62a80a3e7eef67
Create af_setJoints.py
af_scripts/tmp/af_setJoints.py
af_scripts/tmp/af_setJoints.py
Python
0.000001
@@ -0,0 +1,651 @@ +import pymel.core as pm%0A%0AcurSel = pm.ls(sl=True,type='transform')%5B0%5D%0A%0AbBox = pm.xform(curSel,ws=1,q=1,bb=1)%0AsizeX = abs(bBox%5B0%5D-bBox%5B3%5D)%0AsizeY = abs(bBox%5B1%5D-bBox%5B4%5D)%0AsizeZ = abs(bBox%5B2%5D-bBox%5B5%5D)%0AcurPvt = %5B(bBox%5B0%5D+sizeX/2),(bBox%5B1%5D+sizeY/2),(bBox%...
bde8b61f419dd6e66a85cc92f3661de6aaadeb94
ADD CHECK FOR YELLING
proselint/checks/misc/yelling.py
proselint/checks/misc/yelling.py
Python
0
@@ -0,0 +1,376 @@ +# -*- coding: utf-8 -*-%0A%22%22%22EES: Too much yelling..%0A%0A---%0Alayout: post%0Aerror_code: SCH%0Asource: ???%0Asource_url: ???%0Atitle: yelling%0Adate: 2014-06-10 12:31:19%0Acategories: writing%0A---%0A%0AToo much yelling.%0A%0A%22%22%22%0Afrom proselint.tools import blacklis...
26e7e7b270bfd5e08cf871f7d89b5a92b07df230
add migration file
contmon/scraper/migrations/0001_initial.py
contmon/scraper/migrations/0001_initial.py
Python
0.000001
@@ -0,0 +1,1669 @@ +# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import models, migrations%0Aimport django.utils.timezone%0Aimport model_utils.fields%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A replaces = %5B('scraper', '0001_initial'), ('scraper', '0002_auto_2015070...
2e7aa28131ce09143ef5f6b1b36eddbd112352b7
Revert "get rid of sleep in setUp"
smart_open/tests/test_s3_version.py
smart_open/tests/test_s3_version.py
# -*- coding: utf-8 -*- import logging import os import time import unittest import uuid import boto3 import botocore.client import moto from smart_open import open BUCKET_NAME = 'test-smartopen-{}'.format(uuid.uuid4().hex) KEY_NAME = 'test-key' DISABLE_MOCKS = os.environ.get('SO_DISABLE_MOCKS') == "1" logger = l...
Python
0
@@ -2394,24 +2394,226 @@ self.key))%0A%0A + if DISABLE_MOCKS:%0A #%0A # I suspect there is a race condition that's messing up the%0A # order of the versions in the test.%0A #%0A time.sleep(5)%0A%0A with
2c728b79856aee63aebaeaeb29ce119edd510331
Update pattern string
axelrod/strategies/lookerup.py
axelrod/strategies/lookerup.py
from axelrod import Actions, Player, init_args from itertools import product C, D = Actions.C, Actions.D class LookerUp(Player): """ A strategy that uses a lookup table to decide what to do based on a combination of the last m turns and the opponent's opening n actions. If there isn't enough history ...
Python
0
@@ -5592,16 +5592,16 @@ CDCC -CDDDCDDD +DDDDDCDC DDDC @@ -5609,26 +5609,24 @@ DDDC -DDDD CCDDC -DDCDDDCCC +CDDDDDCDCDD DCDC @@ -5630,16 +5630,18 @@ CDCDDDDD +DD '%0A
872dd45173e889db06e9b16105492c241f7badae
Add an example for dynamic RPC lookup.
examples/rpc_dynamic.py
examples/rpc_dynamic.py
Python
0
@@ -0,0 +1,1157 @@ +import asyncio%0Aimport aiozmq%0Aimport aiozmq.rpc%0A%0A%0Aclass DynamicHandler(aiozmq.rpc.AttrHandler):%0A%0A def __init__(self, namespace=()):%0A self.namespace = namespace%0A%0A def __getitem__(self, key):%0A try:%0A return getattr(self, key)%0A except Attrib...
e0b1bea00c56657ef9fb4456203a522920375cc2
add testLCMSpy.py script
software/ddapp/src/python/tests/testLCMSpy.py
software/ddapp/src/python/tests/testLCMSpy.py
Python
0.000001
@@ -0,0 +1,2157 @@ +from ddapp.consoleapp import ConsoleApp%0Afrom ddapp import lcmspy%0Afrom ddapp import lcmUtils%0Afrom ddapp import simpletimer as st%0A%0Aapp = ConsoleApp()%0A%0Aapp.setupGlobals(globals())%0A%0Aif app.getTestingInteractiveEnabled():%0A app.showPythonConsole()%0A%0A%0Alcmspy.findLCMModulesInSysP...
3c365bb964e5466eddd5623329c50bc14e03964a
version bump for 0.21.4.4.
oneflow/__init__.py
oneflow/__init__.py
VERSION = '0.21.4.3'
Python
0
@@ -16,8 +16,8 @@ 1.4. -3 +4 '%0A%0A
da5b5c1ab9a3af614ff7bcc42ce42f4a23a89324
version bump for 0.23.4.1.
oneflow/__init__.py
oneflow/__init__.py
VERSION = '0.23.4'
Python
0
@@ -11,11 +11,13 @@ '0.23.4 +.1 '%0A%0A
9155555df340c4f845326326faf79c582df70394
version bump for 0.28.1.
oneflow/__init__.py
oneflow/__init__.py
VERSION = '0.28.0.2'
Python
0
@@ -10,14 +10,12 @@ = '0.28. -0.2 +1 '%0A%0A
632266d59f1eefafcb38747ea57686824f41b978
version bump for 0.20.11.1.
oneflow/__init__.py
oneflow/__init__.py
VERSION = '0.20.11'
Python
0
@@ -12,11 +12,13 @@ '0.20.11 +.1 '%0A%0A
45367ebc4e54402082add655fa8c87885a50e6a4
version bump for 0.21.2.2.
oneflow/__init__.py
oneflow/__init__.py
VERSION = '0.21.2.1'
Python
0
@@ -12,12 +12,12 @@ '0.21.2. -1 +2 '%0A%0A
7cc3dd653351799d2513a424c6bedd499f28c1a1
version bump for 0.20.10.
oneflow/__init__.py
oneflow/__init__.py
VERSION = '0.20.9.15'
Python
0
@@ -14,11 +14,9 @@ .20. -9.15 +10 '%0A%0A
cb2cc713c29c20ba239a60b6151c5e5c001c8e0b
Add joinkb.py
joinkb.py
joinkb.py
Python
0.000005
@@ -0,0 +1,1235 @@ +from __future__ import print_function%0A%0A__module_name__ = 'Join Kickban'%0A__module_version__ = '0.1'%0A__module_description__ = 'Kickbans clients from specified channels on regex match against their nickname on join'%0A__author__ = 'Daniel A. J.'%0A%0Aimport hexchat%0Aimport re%0A%0Are = re.comp...
f6864179a2dc1c531afc2c3ba6be300006e01fab
Create consecZero.py
Codingame/Python/Clash/consecZero.py
Codingame/Python/Clash/consecZero.py
Python
0.000001
@@ -0,0 +1,380 @@ +import sys%0Aimport math%0A%0A# Auto-generated code below aims at helping you parse%0A# the standard input according to the problem statement.%0A%0An = input()%0A%0A# Write an action using print%0A# To debug: print(%22Debug messages...%22, file=sys.stderr)%0Ac = 0%0At = 0%0Afor x in n:%0A if x == ...
6a4fb74befd22c2bc814dbe51a1fa884a077be9d
Create django_audit_snippets.py
example_code/django_audit_snippets.py
example_code/django_audit_snippets.py
Python
0.000004
@@ -0,0 +1,1299 @@ +from django.conf import settings%0Afrom urls import urlpatterns%0A%0A'''%0AAccess shell via%0A./manage.py shell %0A(or shell_plus if you have django-extensions)%0ADont forget you may need to set environment variables:%0A - DJANGO_SETTINGS_MODULE to the settings file (python module load syntax like s...
73819cea7150e15212a014f9c3a42a69d0351ab8
Create cutrope.py
cutrope.py
cutrope.py
Python
0
@@ -0,0 +1,969 @@ +# Author: Vikram Raman%0A# Date: 08-15-2015%0A%0Aimport time%0A%0A# Given a rope with length n, how to cut the rope into m parts with length n%5B0%5D, n%5B1%5D, ..., n%5Bm-1%5D,%0A# in order to get the maximal product of n%5B0%5D*n%5B1%5D* ... *n%5Bm-1%5D? %0A# We have to cut once at least. Additiona...
6b95af9822b9d94793eef503609b48d83066f594
add test that causes KeyError for disabled text
test/test-text-diabled.py
test/test-text-diabled.py
Python
0
@@ -0,0 +1,224 @@ +from framework import *%0Aroot.title(%22Disabled text%22)%0A%0Acanv.create_text(200, 200,%0A%09text = %22Test disabled text%22,%0A%09font = (%22Times%22, 20),%0A%09state = DISABLED%0A)%0A%0Athread.start_new_thread(test, (canv, __file__, True))%0Aroot.mainloop()%0A
06efe8a8be913fb63f27016268d86f1ad0a5bcdf
Add test_engine_seed.py
tests/test_engine_seed.py
tests/test_engine_seed.py
Python
0.000039
@@ -0,0 +1,1151 @@ +# -*- coding: utf-8 -*-%0A%0A# Copyright (c) 2015-2016 MIT Probabilistic Computing Project%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....
3de2b08133f6f721a3a30120a93b81be0eacefb6
add tests for the scuba.filecleanup sub-module
tests/test_filecleanup.py
tests/test_filecleanup.py
Python
0
@@ -0,0 +1,1883 @@ +from __future__ import print_function%0A%0Afrom nose.tools import *%0Afrom unittest import TestCase%0Atry:%0A from unittest import mock%0Aexcept ImportError:%0A import mock%0A%0Afrom scuba.filecleanup import FileCleanup%0A%0Adef assert_set_equal(a, b):%0A assert_equal(set(a), set(b))%0A%0A%...
d41005d14239a93237fb839084f029208b94539d
Use the custom.js as served from the CDN for try
common/profile_default/ipython_notebook_config.py
common/profile_default/ipython_notebook_config.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Configuration file for ipython-notebook. c = get_config() c.NotebookApp.ip = '*' c.NotebookApp.open_browser = False c.NotebookApp.port = 8888 # Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded- # For headerssent by the upstream reverse proxy...
Python
0
@@ -812,13 +812,11 @@ ook/ -3.1.0 +try /'%0A%7D
2b380d501b80afad8c7c5ec27537bcc682ed2775
Fix some scope mistakes. This fix was part of the reverted commit.
commands/handle.py
commands/handle.py
import commands.cmds as cmds def handle(self, chat_raw): self.logger.info("Handling command: " + chat_raw + " (for player" + self.fquid + ")") _atmp1 = chat_raw.split(" ") _atmp2 = list(_atmp1[0]) del _atmp2[0] del _atmp1[0] cmdobj = { "base": _atmp2, "args_raw": _atmp1, ...
Python
0
@@ -368,25 +368,16 @@ %7D%0A -commands. cmds.Inv @@ -425,25 +425,16 @@ not in -commands. cmds.bas @@ -444,25 +444,16 @@ st else -commands. cmds.bas
b37f31b5adbdda3e5d40d2d8a9dde19b2e305c2c
Add tests for the controller module
ckanext/wirecloudview/tests/test_controller.py
ckanext/wirecloudview/tests/test_controller.py
Python
0
@@ -0,0 +1,2654 @@ +# -*- coding: utf-8 -*-%0A%0A# Copyright (c) 2018 Future Internet Consulting and Development Solutions S.L.%0A%0A# This file is part of CKAN WireCloud View Extension.%0A%0A# CKAN WireCloud View Extension is free software: you can redistribute it and/or modify%0A# it under the terms of the GNU Affero...
d1d1892551d805b5a73aaef07932c65fd375e342
Add Rules unit test
py/desisurvey/test/test_rules.py
py/desisurvey/test/test_rules.py
Python
0
@@ -0,0 +1,798 @@ +import unittest%0A%0Aimport numpy as np%0A%0Aimport desisurvey.tiles%0Afrom desisurvey.rules import Rules%0A%0A%0Aclass TestRules(unittest.TestCase):%0A%0A def setUp(self):%0A pass%0A%0A def test_rules(self):%0A rules = Rules()%0A tiles = desisurvey.tiles.get_tiles()%0A ...
3efa20e0d93c922bec6ae0f41774fd406532257a
Allow manually graded code cells
nbgrader/preprocessors/checkcellmetadata.py
nbgrader/preprocessors/checkcellmetadata.py
from nbgrader import utils from nbgrader.preprocessors import NbGraderPreprocessor class CheckCellMetadata(NbGraderPreprocessor): """A preprocessor for checking that grade ids are unique.""" def preprocess(self, nb, resources): resources['grade_ids'] = ids = [] nb, resources = super(CheckCellM...
Python
0
@@ -1268,308 +1268,8 @@ ))%0A%0A - # check that code cells are grade OR solution (not both)%0A if cell.cell_type == %22code%22 and utils.is_grade(cell) and utils.is_solution(cell):%0A raise RuntimeError(%0A %22Code grade cell '%7B%7D' is also marked as a solution cell%22.format(...
6f5e4b4a125883017c6349545cc2d141054bc662
Fix super call with wrong class.
extra_views/formsets.py
extra_views/formsets.py
from django.views.generic.base import TemplateResponseMixin, View from django.http import HttpResponseRedirect from django.forms.formsets import formset_factory from django.forms.models import modelformset_factory, inlineformset_factory from django.views.generic.detail import SingleObjectMixin, SingleObjectTemplateResp...
Python
0
@@ -5224,36 +5224,32 @@ return super( -Base InlineFormSetMix