commit
stringlengths
40
40
subject
stringlengths
1
1.49k
old_file
stringlengths
4
311
new_file
stringlengths
4
311
new_contents
stringlengths
1
29.8k
old_contents
stringlengths
0
9.9k
lang
stringclasses
3 values
proba
float64
0
1
3f6ec1a3e9bcdd2dee714e74fac7215b19ae432f
Add an example of a blocking tcp server
blocking_socket.py
blocking_socket.py
""" A Simple example for testing the SimpleServer Class. A simple telnet server. It is for studying purposes only. """ from server import SimpleServer __author__ = "Facundo Victor" __license__ = "MIT" __email__ = "facundovt@gmail.com" def handle_message(sockets=None): """ Handle a simple TCP connection. ...
Python
0.00016
22fd64e88700fb8cb0c86eef10df1ae0c5fb91c9
Create parse_large_file.py
tools/parse_large_file.py
tools/parse_large_file.py
#!/usr/bin/evn python # -*- encoding: utf-8 -*- # # Simple example for processing large file in multiple threads line by line # # Copyright 2019 Wanghong Lin # # 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...
Python
0.000005
3a11d1c5235fcc7f40aca4395a183d7e1316117a
Add documentation support for swagger
makiki/documentation.py
makiki/documentation.py
# -*- coding: utf-8 -*- import json class Documentation(object): HUG_TYPE_TRANSLATION = { 'A Whole number': 'integer', 'Accepts a JSON formatted data structure': 'object', 'Basic text / string value': 'string', 'Multiple Values': 'array', } def __init__(self, hug_doc, ve...
Python
0
591e9f15a3b9da59f80f81fcf0d6ddad4aeb7d6a
Add a snippet.
python/pyside/pyside6/widget_QSqlRelationalTableModel_sqlite_from_file.py
python/pyside/pyside6/widget_QSqlRelationalTableModel_sqlite_from_file.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Ref: https://doc.qt.io/qtforpython/PySide6/QtSql/QSqlRelationalTableModel.html?highlight=qsqlrelationaltablemodel import sys import sqlite3 from PySide6 import QtCore, QtWidgets from PySide6.QtCore import Qt from PySide6.QtWidgets import QApplication, QTableView from ...
Python
0.000002
99ffed2a53c5266f312127b7a09f86254891234e
Create 4-LDR.py
Code/4-LDR.py
Code/4-LDR.py
# Import Libraries import time import RPi.GPIO as GPIO # Set the GPIO Mode and set the pin to use for the GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) # A variable with the LDR reading pin number PINLDR = 27 def ReadLDR(): LDRCount = 0 # Sets the count to 0 GPIO.setup(PINLDR, GPIO.OUT) GPIO.output(PI...
Python
0.000005
0c4095d9b370da41f653927dc92cc4233aca2beb
Add untested LedStrip driver
LedStrip.py
LedStrip.py
import RPi.GPIO as GPIO, time, os class RGB: r = 0xff g = 0xff b = 0xff def __init__(self, r, g, b): self.r = r self.g = g self.b = b class LedStrip: spidev = None height = 10 def __init__(self): self.spidev = file("/dev/spidev0.0", "w") def WriteStri...
Python
0
35e8133dbf0f95a511c2eb219ba408af464afc2b
Create file
jupyter_notebook_config_template.py
jupyter_notebook_config_template.py
c.NotebookApp.ip = '*' c.NotebookApp.port = 8998 c.NotebookApp.open_browser = False c.NotebookApp.keyfile = u'/home/ubuntu/.certificates/jupyterkey.pem' c.NotebookApp.certfile = u'/home/ubuntu/.certificates/jupytercert.pem' c.NotebookApp.password = u'sha2:PASSWORDHASH'
Python
0.000002
2d66bc24c883f135a9a22cd40a8b2682ec572373
Add count_bits
node/count_bits.py
node/count_bits.py
from nodes import Node class CountBits(Node): char = "./" args = 2 results = 1 contents = 2000 @Node.test_func([8,2], [[1, 3]]) @Node.test_func([12, 3], [[0, 2, 1]]) def count_bits(self, num: int, base: int): """Count the number of times each digit occurs in `base`""" ...
Python
0.000577
623115b7cb26c6402479845dd96e69c613ad4b98
Create easy_23_DashInsert.py
easy_23_DashInsert.py
easy_23_DashInsert.py
def odd(ch): return ch in '13579' ############################## # Inserts dashes between odd # # digits # ############################## def DashInsert(num): result = [] prev = ' ' for curr in str(num): if odd(prev) and odd(curr): result.append('-') result.append(curr) p...
Python
0.000001
bfe073671910efdd932b92c2bb40dc24c230733a
fix migrations
apps/domain/migrations/0024_meta.py
apps/domain/migrations/0024_meta.py
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-11-14 12:11 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('domain', '0023_fix_label'), ] operations = [ migrations.AlterModelManagers( ...
Python
0.000002
b35dc73429d8625b298017625b4521a2f3a00eea
Add testing module
maxwellbloch/testing.py
maxwellbloch/testing.py
# -*- coding: utf-8 -*- import nose def run(): """ Run all tests with nose. """ # runs tests in maxwellbloch.tests module nose.run(defaultTest="maxwellbloch.tests", argv=['nosetests', '-v'])
Python
0.000001
cc04592ea5ea15944f668928d5b8e6f7d8e257a1
Update prefix-and-suffix-search.py
Python/prefix-and-suffix-search.py
Python/prefix-and-suffix-search.py
# Time: ctor: O(w * l), w is the number of words, l is the word length on average # search: O(m + n), m is the number of prefix match, n is the number of suffix match # Space: O(w * l) class Trie(object): def __init__(self): _trie = lambda: collections.defaultdict(_trie) self.__trie ...
# Time: ctor: O(w * l), l is the word length on average # search: O(m + n), m is the number of prefix match, n is the number of suffix match # Space: O(w * l), w is the number of words class Trie(object): def __init__(self): _trie = lambda: collections.defaultdict(_trie) self.__trie ...
Python
0
6718e97b23d67dda6e67cda8226030edd90f7fbd
add env.py for the migrations
migrations/env.py
migrations/env.py
from __future__ import with_statement from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import fileConfig # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config # Interpret the config file for Python...
Python
0
cc3b29aaa2c0ffa3cde6b901bf4bdf3ce3fb4345
Add code for pulling pitcher stats for specified date range
pybaseball/league_pitching_stats.py
pybaseball/league_pitching_stats.py
import requests import pandas as pd from bs4 import BeautifulSoup def get_soup(start_dt, end_dt): # get most recent standings if date not specified if((start_dt is None) or (end_dt is None)): print('Error: a date range needs to be specified') return None url = "http://www.baseball-reference.com/leagues/daily.cg...
Python
0
bd60a99d832d839d7535a5232453afa807d6e3ee
Create __init__.py
Pi_Weather_Station/__init__.py
Pi_Weather_Station/__init__.py
Python
0.000429
f60123ea933cba6b57214ad335b244b48cc65fdf
Create valid-tic-tac-toe-state.py
Python/valid-tic-tac-toe-state.py
Python/valid-tic-tac-toe-state.py
# Time: O(1) # Space: O(1) # A Tic-Tac-Toe board is given as a string array board. Return True # if and only if it is possible to reach this board position # during the course of a valid tic-tac-toe game. # # The board is a 3 x 3 array, and consists of characters " ", "X", # and "O". The " " character represents an...
Python
0.998513
ee7a48da3ef6486c3650f9bcc1f4b59c59642adc
Add unittest-based PyDbLite test
PyDbLite/test/test_pydblite.py
PyDbLite/test/test_pydblite.py
# -*- coding: iso-8859-1 -*- import datetime import unittest import random import os import sys sys.path.insert(0,os.path.dirname(os.getcwd())) import PyDbLite db = None vals1 = [('simon',datetime.date(1984,8,17),26)] vals2 = [('camille',datetime.date(1986,12,12),24), ('jean',datetime.date(1989,6,1...
Python
0.000001
403c724ffd9dab4ebdf3a58e02406969ed7a9fcb
Create front_back.py
Python/CodingBat/front_back.py
Python/CodingBat/front_back.py
# http://codingbat.com/prob/p153599 def front_back(str): if len(str) <= 1: return str return str[len(str)-1] + str[1:-1] + str[0]
Python
0.000013
4a48b9998961be268cbfe64726ea78f68cedce39
Create not_string.py
Python/CodingBat/not_string.py
Python/CodingBat/not_string.py
# http://codingbat.com/prob/p189441 def not_string(str): if str.startswith("not"): return str else: return "not " + str
Python
0.002302
2fc62908b2f0074a0e82a120809b80cb3e009999
add __init__.py for distro
mint/distro/__init__.py
mint/distro/__init__.py
# # Copyright (c) 2005 Specifix, Inc. # # All rights reserved #
Python
0.000016
976f7b4239a1ff21d0748f43e8224017084118b7
make neuroimaging.visualization.tests into a package
lib/visualization/tests/__init__.py
lib/visualization/tests/__init__.py
import test_visualization import unittest def suite(): return unittest.TestSuite([test_visualization.suite()])
Python
0.000583
11d42f7789ae3f0a020087b52389af9c98d07901
add barebones mapper module
modules/mapper.py
modules/mapper.py
from modules.basemodule import BaseModule import mapper.libmapper import pprint import re import time class Mapper(BaseModule): def __init__(self, mud, mapfname='default.map'): self.mapfname = mapfname try: with open(self.mapfname, 'r') as f: ser = f.read() ...
Python
0
b58d7ae6b9887b326ba485ce885deb9c03054801
Create Factorial_of_a_number.py
Python3-5/Factorial_of_a_number.py
Python3-5/Factorial_of_a_number.py
#Write a program which can compute the factorial of a given numbers. #We will first define a function def fact(x): #Define a function named 'fact()' if x == 0: #We directly return 1 if input number is 0. return 1 ; return x * fact(x - 1); # We return 'number * fact(number ...
Python
0.000016
c2b0c8e7545cfc1d460ed5a74146390e99743e4d
Add battery module
modules/core/battery.py
modules/core/battery.py
# pylint: disable=C0111,R0903 '''Displays battery status, remaining percentage and charging information. Parameters: * battery.device : Comma-separated list of battery devices to read information from (defaults to auto for auto-detection) * battery.warning : Warning threshold in % of remaining charge (...
Python
0
a9f6caf863b5c3156c3200d33a6cdc29f0c2ad23
Add new py-hacking package (#14027)
var/spack/repos/builtin/packages/py-hacking/package.py
var/spack/repos/builtin/packages/py-hacking/package.py
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyHacking(PythonPackage): """OpenStack Hacking Guideline Enforcement.""" homepage = "...
Python
0
e6641065af9078e2e50e99f657aa605d837d3976
add new package (#20112)
var/spack/repos/builtin/packages/py-vcstool/package.py
var/spack/repos/builtin/packages/py-vcstool/package.py
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) class PyVcstool(PythonPackage): """vcstool enables batch commands on multiple different vcs repositories. Curren...
Python
0
701f6a06b8405620905a67b47c5702c100a1447a
Check to make sure the input file is sorted
scripts/check_sorted.py
scripts/check_sorted.py
import sys prev_val = 0 prev_val2 = 0 counter = 0 for line in sys.stdin: parts = line.split() curr_val = int(parts[0]) curr_val2 = int(parts[1]) val1 = int(parts[0]) val2 = int(parts[1]) if val1 > val2: print >>sys.stderr, "Not triangular:", counter sys.exit(1) if curr_v...
Python
0.000001
0aa5466be1ba678f0428e825def010a5007059c7
Modify tests to show Unicode handling regression
scss/tests/test_misc.py
scss/tests/test_misc.py
# -*- encoding: utf-8 -*- """Tests for miscellaneous features that should maybe be broken out into their own files, maybe. """ from scss import Scss def test_super_selector(): compiler = Scss(scss_opts=dict(style='expanded')) input = """\ foo, bar { a: b; } baz { c: d; } """ expected = """\ super foo...
# -*- encoding: utf-8 -*- """Tests for miscellaneous features that should maybe be broken out into their own files, maybe. """ from scss import Scss def test_super_selector(): compiler = Scss(scss_opts=dict(style='expanded')) input = """\ foo, bar { a: b; } baz { c: d; } """ expected = """\ super foo...
Python
0
b2532cfeb3541a64143ded6d86b635e2c9049080
Clean up some pylint warnings
bindings/python-examples/example.py
bindings/python-examples/example.py
#! /usr/bin/env python # -*- coding: utf8 -*- # # Link Grammar example usage # import locale from linkgrammar import Sentence, ParseOptions, Dictionary # from linkgrammar import _clinkgrammar as clg locale.setlocale(locale.LC_ALL, "en_US.UTF-8") po = ParseOptions() def desc(lkg): print lkg.diagram() print ...
#! /usr/bin/env python # -*- coding: utf8 -*- # # Link Grammar example usage # import locale from linkgrammar import Sentence, ParseOptions, Dictionary # from linkgrammar import _clinkgrammar as clg locale.setlocale(locale.LC_ALL, "en_US.UTF-8") po = ParseOptions() def desc(linkage): print linkage.diagram() ...
Python
0.000001
39473b1aa0d8c54b0fb43b5e97545596ed087d59
Create set-intersection-size-at-least-two.py
Python/set-intersection-size-at-least-two.py
Python/set-intersection-size-at-least-two.py
# Time: O(nlogn) # Space: O(n) # An integer interval [a, b] (for integers a < b) is a set of all consecutive integers from a to b, # including a and b. # # Find the minimum size of a set S such that for every integer interval A in intervals, # the intersection of S with A has size at least 2. # # Example 1: # Input: ...
Python
0.000562
208fed6d1e162dd0fcfa10c2b79d0d35ea813478
Create intermediate-171.py
Challenge-171/Intermediate/intermediate-171.py
Challenge-171/Intermediate/intermediate-171.py
#Challenge 171 Intermediate hexvalue = 'FF 81 BD A5 A5 BD 81 FF'.split(' ') binary = [bin(int(line, 16))[2:].zfill(8) for line in hexvalue] #Convert it to a list of binary lines image = [pixel.replace('1', '*').replace('0', ' ') for pixel in binary] #Convert it to a list of lines print 'ORIGINAL IMAGE' print '\n'.join...
Python
0.000318
752b5b43aa807e5431615219d40eafd38cacadeb
Increase length of report name on Report model
onmydesk/models.py
onmydesk/models.py
""" Required models to handle and store generated reports. """ from django.db import models from django.conf import settings from onmydesk.utils import my_import ONMYDESK_FILE_HANDLER = getattr(settings, 'ONMYDESK_FILE_HANDLER', None) def output_file_handler(filepath): """ Returns the output filepath (hand...
""" Required models to handle and store generated reports. """ from django.db import models from django.conf import settings from onmydesk.utils import my_import ONMYDESK_FILE_HANDLER = getattr(settings, 'ONMYDESK_FILE_HANDLER', None) def output_file_handler(filepath): """ Returns the output filepath (hand...
Python
0.000001
bdf5cfb2a7b716d897dabd62e591caad8144a029
Add election funding parsing script
utils/populate-funding.py
utils/populate-funding.py
#!/usr/bin/python import os import sys import csv from optparse import OptionParser from django.core.management import setup_environ my_path = os.path.abspath(os.path.dirname(__file__)) app_path = os.path.normpath(my_path + '/..') app_base = app_path + '/' # We need a path like '<app_path>/utils:<app_path>:<app_pat...
Python
0
30b53c525b2319cc664d26d083c84bba1b63ff7c
add unit test for s3 cache
mapproxy/test/unit/test_cache_s3.py
mapproxy/test/unit/test_cache_s3.py
# This file is part of the MapProxy project. # Copyright (C) 2011 Omniscale <http://omniscale.de> # # 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...
Python
0
a332a057292e701e197b5ac2250e608ef953d631
Add example config
pyfsw/config.example.py
pyfsw/config.example.py
# Database URI Scheme (Refer to the SQLAlchemy documentation for variations) DB_URI = '' # Secret Key SECRET_KEY = 'pyfsw' # Network Host NET_HOST = '127.0.0.1' # Network Port NET_PORT = 5000 # Debug Mode DEBUG = False # Debug Profiler DEBUG_PROFILER = False # Date Format DATE_FORMAT = '%m/%d/%y %I:%M %p' # Cach...
Python
0.000001
9bed52b93061fea7381492ffe0ce55c6929eab78
Add tests.py to app skeleton.
lib/rapidsms/skeleton/app/tests.py
lib/rapidsms/skeleton/app/tests.py
from rapidsms.tests.scripted import TestScript from app import App class TestApp (TestScript): apps = (App,) # define your test scripts here. # e.g.: # # testRegister = """ # 8005551212 > register as someuser # 8005551212 < Registered new user 'someuser' for 8005551212! # 8005551...
Python
0
eb8c7876bac066b4505eeffc7772d3c4c8c086df
Add basic stack-preview functional test
heat_integrationtests/functional/test_preview.py
heat_integrationtests/functional/test_preview.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
Python
0.000001
4c78124a434d4f953d5811ee2708eaf051bd591e
Create setup_data_libraries.py
setup_data_libraries.py
setup_data_libraries.py
#!/usr/bin/env python import argparse import logging as log import sys import time import yaml from bioblend import galaxy def setup_data_libraries(gi, data): """ Load files into a Galaxy data library. By default all test-data tools from all installed tools will be linked into a data library. ""...
Python
0.000004
d78872da09bc67435a2662cce0b253ab149b2bad
Create 03.py
02.5/03.py
02.5/03.py
# By Websten from forums # # Given your birthday and the current date, calculate your age in days. # Compensate for leap days. # Assume that the birthday and current date are correct dates (and no time travel). # Simply put, if you were born 1 Jan 2012 and todays date is 2 Jan 2012 # you are 1 day old. # # Hint # A...
Python
0
d2b3996edc1af3f7f491354a762b8bd34c8345a1
Create remove_string_spaces.py
remove_string_spaces.py
remove_string_spaces.py
#Kunal Gautam #Codewars : @Kunalpod #Problem name: Remove String Spaces #Problem level: 8 kyu def no_space(x): return ''.join(x.split())
Python
0.00025
8ea44bc5daa099ccc2e48c606f38a424235b9f3d
Create a.py
abc001/a.py
abc001/a.py
h1 = int(input()) h2 = int(input()) print(h1 - h2)
Python
0.000489
947570fcc24458c4d7d6e44db0849abdf8055ccb
Add script for generating manifests
packer/manifest.py
packer/manifest.py
#!/usr/bin/env python import argparse import hashlib import json class Manifest(object): def __init__(self, name=None, description=None, versions=None): self.name = name self.description = description self.versions = versions def load(self, filename): with open(filename, 'rb') as f: data = ...
Python
0.000001
730b11a45696b4d4b8b0e56c0028ec6eeca7da4f
Create a.py
agc017/a.py
agc017/a.py
import math def comb(n, r): return math.factorial(n) / math.factorial(r) / math.factorial(n - r) def main(): n, p = map(int, input().split()) a = tuple(map(lambda x: int(x) % 2, input().split())) if n == 1 and a[0] % 2 != p: print(0) return 0 t = len(tuple(filter(lambda x...
Python
0.000489
15b1779475c7744a85e948c419de34be038fba94
Add lc0314_binary_tree_vertical_order_traversal.py
lc0314_binary_tree_vertical_order_traversal.py
lc0314_binary_tree_vertical_order_traversal.py
"""Leetcode 314. Binary Tree Vertical Order Traversal Medium URL: https://leetcode.com/problems/binary-tree-vertical-order-traversal/ Given a binary tree, return the vertical order traversal of its nodes' values. (ie, from top to bottom, column by column). If two nodes are in the same row and column, the order shoul...
Python
0.000098
934e907180645e3dc618ff5c75a4982656310673
Add the arrayfns compatibility library -- not finished.
numpy/oldnumeric/arrayfns.py
numpy/oldnumeric/arrayfns.py
"""Backward compatible with arrayfns from Numeric """ __all__ = ['array_set', 'construct3', 'digitize', 'error', 'find_mask', 'histogram', 'index_sort', 'interp', 'nz', 'reverse', 'span', 'to_corners', 'zmin_zmax'] import numpy as nx from numpy import asarray class error(Exception): pass def array_se...
Python
0
d5daa2376fadae0d6715b606a0c355b572efdd0c
Add Python benchmark
lib/node_modules/@stdlib/math/base/dist/beta/kurtosis/benchmark/python/benchmark.scipy.py
lib/node_modules/@stdlib/math/base/dist/beta/kurtosis/benchmark/python/benchmark.scipy.py
#!/usr/bin/env python """Benchmark scipy.stats.beta.stats.""" import timeit name = "beta:kurtosis" repeats = 3 iterations = 1000 def print_version(): """Print the TAP version.""" print("TAP version 13") def print_summary(total, passing): """Print the benchmark summary. # Arguments * `total`...
Python
0.000138
03de607d14805779ed9653b65a5bd5cee3525903
Add the IFTTT campaign success server plugin
server/ifttt_on_campaign_success.py
server/ifttt_on_campaign_success.py
import collections import king_phisher.plugins as plugin_opts import king_phisher.server.plugins as plugins import king_phisher.server.signals as signals import requests class Plugin(plugins.ServerPlugin): authors = ['Spencer McIntyre'] title = 'IFTTT Campaign Success Notification' description = """ A plugin tha...
Python
0
7e7879eb5c0d547a56a082a9b3a444fea59e9156
Create revEncry.py
Codingame/Python/Clash/revEncry.py
Codingame/Python/Clash/revEncry.py
import sys import math # Auto-generated code below aims at helping you parse # the standard input according to the problem statement. word = input() for x in word: o = ord(x) k = 122-o print(chr(97+k),end='')
Python
0.000001
0d8fe16a3d2c70c24fe9743d8c2d2ac721a1435e
Test case for the previous commit.
test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py
test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py
""" Test that you can set breakpoint commands successfully with the Python API's: """ import os import re import unittest2 import lldb, lldbutil import sys from lldbtest import * class PythonBreakpointCommandSettingTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) my_var = 10 @unittest2.skipU...
Python
0.99989
625548dfc54a7f0620a83f62435c6e246dc58d12
Solve 18.
018/solution.py
018/solution.py
""" Project Euler problem #18. """ def problem(): """ Solve the problem. Find the maximum total from top to bottom of the triangle below. Answer: """ triangle = """ 75 95 64 17 47 82 18 35 87 10 20 04 82 47 65 19 01 23 75 03 34 88 02 77 73...
Python
0.999773
b647416b719c9f0b2534c13a67d3396fefaada47
Add problem 1 sum muliples of 3 or 5 python solution
p001_multiples_of_3_and_5.py
p001_multiples_of_3_and_5.py
# ''' Project Euler - Problem 1 - Multiples of 3 and 5 https://projecteuler.net/problem=1 If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. ''' import sys def main(): '''Sum t...
Python
0.999989
6c806f12129d132db17cf601335f638b82a814d6
Create form.py
AutoMap/form.py
AutoMap/form.py
import turtle import Tkinter as tk def desenha(distancia, angulo, lousa): lousa.penup() lousa.home() lousa.left(angulo) lousa.pendown() lousa.forward(distancia) def main(): app = tk.Tk() app.title("Mapeamento 2D de ambiente ") app.fontePadrao = ("Arial", "10", "bold") ...
Python
0
0c2f07fabb94698b8cf1b42a4f671ad0cd5e365f
Add migration for comment notification type
src/ggrc/migrations/versions/20160321011353_3914dbf78dc1_add_comment_notification_type.py
src/ggrc/migrations/versions/20160321011353_3914dbf78dc1_add_comment_notification_type.py
# Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: miha@reciprocitylabs.com # Maintained By: miha@reciprocitylabs.com """ Add comment notification type Create Date: 2016-03-21 01:13:53.293580 """ #...
Python
0
32e6a86f3e7cef04c67e1ae61db1959264d084bb
Add script for deep harvesting a nuxeo folder
s3stash/stash_folder.py
s3stash/stash_folder.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import argparse import logging from s3stash.stash_collection import Stash _loglevel_ = 'INFO' def main(nxpath, pynuxrc="~/.pynuxrc", replace=True, loglevel=_loglevel_): # set up logging logfile = 'logs/stash_folder' numeric_level = getattr(logging,...
Python
0
2a6f3eca3187f8e4ca078cb592bb324a735cc246
Create solution.py
hackerrank/algorithms/sorting/easy/find_the_median/py/solution.py
hackerrank/algorithms/sorting/easy/find_the_median/py/solution.py
#!/bin/python def partition(L, lo, hi): # Lomuto partitioning. # i = j = lo v = hi - 1 while i < hi: if L[i] < L[v]: L[i], L[j] = L[j], L[i] j += 1 i += 1 L[v], L[j] = L[j], L[v] return j def median(L): # Hoare's quick select. # if len(L)...
Python
0.000018
6f7ed6f3b082c7f6399ab456a6f6b291219c910f
ADD migration scripts for uom prices
product_uom_prices/migrations/8.0.0.5.0/pre-migration.py
product_uom_prices/migrations/8.0.0.5.0/pre-migration.py
# -*- encoding: utf-8 -*- from openerp import SUPERUSER_ID from openerp.modules.registry import RegistryManager def set_value(cr, model, table, field, value, condition): print 'Set value %s on field %s on table %s' % ( value, field, table) cr.execute('SELECT id ' 'FROM %(table)s ' ...
Python
0
0f072c8d9cc5dd89d375bf96ed9436f70de8c9cb
Create chivey.py
chivey.py
chivey.py
#!/usr/bin/python import urllib2 import os pic = 1 _path = [] currentDir = os.getcwd() error = 0 year = 2013 month = 7 _time = 6 MAX_ERROR = 10 MIN_MONTH = 01 pathCount = 0 def menu(): print 'Select a category to copy:' print print '[0] Fit Girls [6] Girls lingerie' print '[1] Sexy Bikinis [7]...
Python
0.000001
ad10576cf62a52cac81737d892dd24bb93c46481
Create Connect.py
Connect.py
Connect.py
#!/usr/bin/env python """ Created by _UserName_ 11/28/2013 """ import socket, md5, threading import DB class Connect(): def __init__(self, IP): self.__port = 4444 self.__host = (IP, self.__port) self.__databaseName = "database.db" # Generate Ident self.__...
Python
0
9b6f86cb2f4763625127a3d9d236238a4dd998ba
Create fileExamples.py
Bits/fileExamples.py
Bits/fileExamples.py
#!/usr/bin/env python # CREATING A NEW FILE file = open("newfile.txt", "w") file.write("hello world in the new file\n") file.write("and another line\n") file.close() # READING A FILE file = open('newfile.txt', 'r') print file.read() #Put n for the first n chars # LOOPING OVER FILE file = open('newfile.txt', 'r') ...
Python
0
5e9224d9f51b8c208f73b7493645fd6aa6b6ef48
Removes a typo in a comment: 'not' to 'no'
revscoring/features/tests/test_previous_user_revision.py
revscoring/features/tests/test_previous_user_revision.py
from collections import namedtuple from mw import Timestamp from nose.tools import eq_ from ...datasources import previous_user_revision, revision from ...dependencies import solve from ..previous_user_revision import seconds_since def test_seconds_since(): FakeRevisionMetadata = namedtuple("FakeRevisionMetadat...
from collections import namedtuple from mw import Timestamp from nose.tools import eq_ from ...datasources import previous_user_revision, revision from ...dependencies import solve from ..previous_user_revision import seconds_since def test_seconds_since(): FakeRevisionMetadata = namedtuple("FakeRevisionMetadat...
Python
0.999674
ae1839cbb521be5cb7e76d87bdd65f1e736ccf8d
Add python version of register-result with more robust json serialisation
register-result.py
register-result.py
#!/usr/bin/env python import json import socket import sys if len(sys.argv) < 4: print("Error: Usage <register-result> <client> <name> <output> <status> <ttl>") sys.exit(128) check_client = sys.argv[1] check_name = sys.argv[2] check_output = sys.argv[3] check_status = int(sys.argv[4]) check_ttl = int(sys.arg...
Python
0.000001
1b36f7e837f6c15cab838edfaf6464bef0c88c6d
Add migration for request notification types
src/ggrc/migrations/versions/20160304124523_50c374901d42_add_request_notification_types.py
src/ggrc/migrations/versions/20160304124523_50c374901d42_add_request_notification_types.py
"""Add request notification types Revision ID: 50c374901d42 Revises: 4e989ef86619 Create Date: 2016-03-04 12:45:23.024224 """ import sqlalchemy as sa from alembic import op from sqlalchemy.sql import column from sqlalchemy.sql import table # revision identifiers, used by Alembic. revision = '50c374901d42' down_rev...
Python
0
9665113ef9a6f7fae89b8a0b7b15289ac41996f4
Create mySolution.py
Puzzles/checkio/Home/Min-and-Max/mySolution.py
Puzzles/checkio/Home/Min-and-Max/mySolution.py
def minMaxArgs(key, operator, *args): if key == None: key = lambda x : x minMaxVal = args[0] for arg in args: cmpKey = key(arg) if operator(cmpKey, key(minMaxVal)): minMaxVal = arg return minMaxVal def minMaxIter(iterable, operator, key): if key == Non...
Python
0.000001
2a21ee4b263692872f11ebae18663119c5041d5e
Add test for requirements
fuel_agent/tests/test_requirements.py
fuel_agent/tests/test_requirements.py
# -*- coding: utf-8 -*- # Copyright 2015 Mirantis, Inc. # # 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 requi...
Python
0.000003
39c64ddf7bddb7110d6c85a5ad3c54bf95c334a2
Create client.py
client.py
client.py
import sys, stat, os, re, time, base64, getpass, socket, smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText #Email settings mail_user = "email@email.com" mail_pwd = "password" FROM = 'email@email.com' TO = ['email@email.com'] #must be a list SUBJECT = "BETA TEST: GLSA Clearwell...
Python
0.000001
1bd9013c925cfbbebcff33bf7796fde729d26b34
add cardify script
cardify.py
cardify.py
import os import re import sys import glob import errno import shutil from typing import Dict, Tuple, Union, Any, List, Optional from pprint import pprint def mkdir_p(path: str): try: path = os.path.abspath(path) os.makedirs(path) except OSError as e: if e.errno == errno.EEXIST and os....
Python
0.000001
fddbbc536ad5097769d924d49420e7d5d2e5999f
Update app/extensions/minify/__init__.py
app/extensions/minify/__init__.py
app/extensions/minify/__init__.py
from htmlmin import Minifier class HTMLMIN(object): def __init__(self, app=None, **kwargs): self.app = app if app is not None: self.init_app(app) default_options = { 'remove_comments': True, 'reduce_empty_attributes': True, 'remove_optional_...
Python
0
118a4af7fbc2455d1dcde54e7041a3919f760d69
Create switch_controls_snmp.py
python-mocutils/mocutils/switch_controls_snmp.py
python-mocutils/mocutils/switch_controls_snmp.py
#! /usr/bin/python import os def make_remove_vlans(vlan_ids,add,switch_ip='192.168.0.1',community='admin'): # Expects that you send a string which is a comma separated list of vlan_ids and a bool for adding or removing OID_portVlanId='1.3.6.1.4.1.11863.1.1.4.3.1.1.2.1.1' OID_portVlanStatus='1.3.6.1.4.1.11863.1.1.4....
Python
0.000002
f009f42c168e396e437e08914dc28eb1e08fb7fe
test of c++ wavefront code on big donut
test/test-bigdonut-cpp.py
test/test-bigdonut-cpp.py
### ### Script for fitting a BIG donut ### import numpy as np from donutlib.donutfit import donutfit fitinitDict = {"nZernikeTerms":15,"fixedParamArray1":[0,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],"fixedParamArray2":[0,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1...
Python
0
2f2e7605d87ef06c547df660805abb99835dee18
Add a snippet.
python/pyqt/pyqt5/widget_QAction.py
python/pyqt/pyqt5/widget_QAction.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys from PyQt5.QtCore import Qt from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel, QAction, QSizePolicy app = QApplication(sys.argv) # The default constructor has no parent. # A widget with no parent is a window. window = QMainWindow() window.setWind...
Python
0.000002
75a9584cc859d60c598582b382f41bd685579072
add a new config file at the project root
config.py
config.py
import os PYMICRO_ROOT_DIR = os.path.abspath(os.curdir) PYMICRO_EXAMPLES_DATA_DIR = os.path.join(PYMICRO_ROOT_DIR, 'examples', 'data') PYMICRO_XRAY_DATA_DIR = os.path.join(PYMICRO_ROOT_DIR, 'pymicro', 'xray', 'data')
Python
0
8212faa90328daabb85c7e877942a667aa200119
add config.py
config.py
config.py
import configparser import datetime __all__ = ['blog_name', 'categories', 'dates', 'article_num'] config = configparser.ConfigParser() config.read('blog.ini', encoding='utf-8') DEFAULT = config['DEFAULT'] blog_name = DEFAULT.get('blog_name', "No Name Here") pre_category_name = DEFAULT.get('category_name', ...
Python
0.000002
5259453165cca4767743469b5e77c6eabe444839
add config.py
config.py
config.py
class Config(object): DEBUG = False TESTING = False CSRF_ENABLED = True SECRET_KEY = 'this-really-needs-to-be-changed' class ProductionConfig(Config): DEBUG = False class StagingConfig(Config): DEVELOPMENT = True DEBUG = True class DevelopmentConfig(Config): DEVELOPMENT = True ...
Python
0.000002
979d0906ba1bc7f3ec3e77a6e09ec8a1a2449323
add clean config.py
config.py
config.py
import os workspace = os.getcwd() gnu_CC = 'gcc' gnu_CXX = 'g++' clang_CC = 'clang' clang_CXX = 'clang++' intel_CC = 'icc' intel_CXX = 'icpc' mpi_CC = 'mpicc' mpi_CXX = 'mpic++' # keywords are: $mpi_nprocs, $ncores mpi_RUN = 'mpirun -hostfile hostfile -np $mpi_nprocs' core_per_node = 2 # tmp dir to launch a run....
Python
0.000002
47b88e59781cf2aeb1a4bb3b6b97ceaf6b883820
Add prime count
cpp_10.py
cpp_10.py
first_number = int(input()) if 0 == int(first_number): print('none') exit() prime_count = '' while True: if 2 == first_number: prime_count = '2' break running_number = first_number divider = first_number // 2 if ( 0 == first_number % 2 ) else ( first_number // 2 ) + 1; coun...
Python
0.99981
ccac9cddfad2b883fc8e2c7c8ab27607ba8c4c63
Create config.py
config.py
config.py
token = '252128496:AAHUDCZJlHpd21b722S4B_n6prn8RUjy4' is_sudo = '223404066' #@This_Is_Amir relam = '-133494595' # ___ __ __ _ _ _ _____ # / _ \ / _|/ _| | (_) \ | | __|_ _|__ __ _ _ ...
Python
0.000002
9fae2d4c7ecc35bde8079f5a71a2b369690cd9a3
add config.py
config.py
config.py
import os import stripe stripe_keys = { 'secret_key': os.environ['SECRET_KEY'], 'publishable_key': os.environ['PUBLISHABLE_KEY'] } SALESFORCE = { "CLIENT_ID": os.environ[ 'SALESFORCE_CLIENT_ID' ], "CLIENT_SECRET": os.environ[ 'SALESFORCE_CLIENT_SECRET' ], "USERNAME": os.environ[ 'SALESFORCE_USERNA...
Python
0.000002
298f7d65ba29a0524ff2a3f8eb4b564ed91ad057
Document find_by_name so I remember what to do with it.
rightscale/util.py
rightscale/util.py
import os.path import ConfigParser CFG_USER_RC = '.rightscalerc' CFG_SECTION_OAUTH = 'OAuth' CFG_OPTION_ENDPOINT = 'api_endpoint' CFG_OPTION_REF_TOKEN = 'refresh_token' _config = None class HookList(list): pass class HookDict(dict): pass def get_config(): global _config if not _config: _...
import os.path import ConfigParser CFG_USER_RC = '.rightscalerc' CFG_SECTION_OAUTH = 'OAuth' CFG_OPTION_ENDPOINT = 'api_endpoint' CFG_OPTION_REF_TOKEN = 'refresh_token' _config = None class HookList(list): pass class HookDict(dict): pass def get_config(): global _config if not _config: _...
Python
0
fc7da8e039c38140f3855e8c58d1db9a4e8ed133
add demo about using ftplib.FTP
reading-notes/CorePython/src/ftp.py
reading-notes/CorePython/src/ftp.py
# Copyright (c) 2014 ASMlover. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list ofconditions and the fol...
Python
0
63dd23a756ec0dfbcf4553f1fe66846f90e43a57
Create custom.py
custom.py
custom.py
#!/usr/bin/env python # -*- coding: cp1252 -*- # XSSA is a Cross Site Scripting Scanner & Vulnerability Confirmation # By Yehia Mamdouh - twitter.com/@Yehia1mamdouh / Facebook/yehia.mamdouh.98 class check: def __init__(self): self.hit = ["<script>alert(\"xssya\")</script>", ...
Python
0.000001
d059fa531f46fe063e7811a17478fab6c913acb4
add migration file
sigmapiweb/apps/Scholarship/migrations/0006_course_coursesection_review.py
sigmapiweb/apps/Scholarship/migrations/0006_course_coursesection_review.py
# Generated by Django 3.1.6 on 2021-11-18 13:53 import apps.Scholarship.models import common.mixins from django.conf import settings import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations....
Python
0.000001
2085083fc842c03efae72bbf288804ddd67605b1
add list_comprehension
misc/list_comprehension.py
misc/list_comprehension.py
#!/usr/bin/env python s = [2*x for x in range(101) if x ** 2 > 3] print s
Python
0.000002
1ed39992efa4e6dae46288e9be8de60ec7fc4dcf
Add permutation() & powerset().
problem/powerset/powerset.py
problem/powerset/powerset.py
#! /usr/bin/env python3 # Copyright 2017 John Hanley. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, m...
Python
0
9e60fd94ef801bab0e8e9a5956b5c00c911bd6ca
Create tesseract_example.py
home/kyleclinton/tesseract_example.py
home/kyleclinton/tesseract_example.py
################################################################ # # tesseract_example.py # Kyle J Clinton # # This is an example of the use of TesseractOcr to read text from an image # it is using many of the services that are common to the InMoov project or # MRL in general # ###################################...
Python
0.000006
058de6743532340611ac304c99bc7dd4ea474350
Create NSEPA-Bypass.py
NSEPA-Bypass.py
NSEPA-Bypass.py
import sys import base64 import hashlib ## Requires pyCrypto --> run 'pip install pycrypto' from Crypto.Cipher import AES ## Check that theres is enough info if (len(sys.argv) < 5): print("You're not giving me enough to work with here:\n\n"); print("Usage:\n"); print("python NSEPA-Bypass.py \"NSC_EPAC Cook...
Python
0
665476df5f23bdd781054c1accd8c2e700087039
update routing number to pass checksum
tests/test_bankaccount.py
tests/test_bankaccount.py
import unittest import lob # Setting the API key lob.api_key = 'test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc' class BankAccountFunctions(unittest.TestCase): def setUp(self): lob.api_key = 'test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc' self.addr = lob.Address.list(count=1).data[0] def test_list_bankAcc...
import unittest import lob # Setting the API key lob.api_key = 'test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc' class BankAccountFunctions(unittest.TestCase): def setUp(self): lob.api_key = 'test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc' self.addr = lob.Address.list(count=1).data[0] def test_list_bankAcc...
Python
0
b3a1f84fb6f28598595f00bdb01d789051999cb9
Update 2016-09-19 11h20
GUI_Tkinter_Demo.py
GUI_Tkinter_Demo.py
#!/usr/bin/python import Tkinter import tkMessageBox top = Tkinter.Tk() def helloCallBack(): tkMessageBox.showinfo("Hello Python", "Hello World") B = Tkinter.Button(top, text="Hello", command = helloCallBack) B.pack() top.mainloop()
Python
0
4b0f796479b6402f2a1f390efc3c6c10f52191d4
refactor gesv tests.
scipy/lib/lapack/tests/test_gesv.py
scipy/lib/lapack/tests/test_gesv.py
import numpy as np from numpy.testing import TestCase, assert_array_almost_equal, dec, \ assert_equal from scipy.lib.lapack import flapack, clapack A = np.array([[1,2,3],[2,2,3],[3,3,6]]) B = np.array([[10,-1,1],[-1,8,-2],[1,-2,6]]) FUNCS_TP = {'ssygv' : np.float32, 'dsygv': np.fl...
Python
0
e397d400a81466b22ae735f60f5a239ca4b7d653
create domain lookup module
domain.py
domain.py
# domain.py # Look up a domain's availability # Copyright 2015 Jason Owen <jason.a.owen@gmail.com> # # This program 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 #...
Python
0
dda3ce9c56967dc6069b61f16feed2932e24ea14
test = input ("CPF: ") cpf = test[:3] + "." + test[3:6] + "." + test[6:9] + "-" + test[9:] print(cpf)
Python/FormatCpf.py
Python/FormatCpf.py
test = input ("CPF: ") cpf = test[:3] + "." + test[3:6] + "." + test[6:9] + "-" + test[9:] print(cpf) #https://pt.stackoverflow.com/q/237371/101
Python
0.999999
5315a3042996a5a561aeed41f95c5fa535882e24
Add a class for incrementally tracking tokenization of a statement
lib/reinteract/tokenized_statement.py
lib/reinteract/tokenized_statement.py
from tokenize import tokenize_line class TokenizedStatement(object): def __init__(self): self.lines = [] self.tokens = [] self.stacks = [] def set_lines(self, lines): # We want to avoid retokenizing everything on pure insertions # to make editing not egregiously O(n^2);...
Python
0.000001
f27241b5409ec00568efa1752d5eeb71516b16bd
Add cellular.py
cellular.py
cellular.py
import random class TotalisticCellularAutomaton: def __init__(self): self.n_cells = 200 self.n_states = 5 self.symbols = ' .oO0' self.radius = 1 self.cells = [random.randrange(0, self.n_states) for _ in range(self.n_cells)] n_rules = (2*self.radius + 1) * (self.n_st...
Python
0.00017
7a1a59e5bb5a64dbeb91abdcac31dd0c8803c27d
Functional tests for security group rule
functional/tests/compute/v2/test_security_group_rule.py
functional/tests/compute/v2/test_security_group_rule.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
Python
0.998997
03d5fb46c877d176ed710a8d27b5ad7af699dc52
add Lubebbers example
pylayers/antprop/tests/Diffraction-Luebbers.py
pylayers/antprop/tests/Diffraction-Luebbers.py
# coding: utf-8 # In[1]: from pylayers.simul.link import * # In[2]: DL=DLink(L=Layout('Luebbers.ini'),graph='tvi') # In[3]: # get_ipython().magic(u'matplotlib inline') # DL.L.showG('i') # In[7]: DL.a = np.array(([37.5,6.2,2.])) DL.b = np.array(([13,30,2.])) DL.fGHz=np.array(([0.9,1.0])) # In[8]: plt.ion(...
Python
0
8fb25066deee46a22562be8e416556749678eb0b
remove printout
bihar/utils.py
bihar/utils.py
from operator import attrgetter from django.utils.translation import ugettext_noop from corehq.apps.groups.models import Group ASHA_ROLE = ugettext_noop('ASHA') AWW_ROLE = ugettext_noop('AWW') def get_team_members(group): """ Get any commcare users that are either "asha" or "aww". """ ...
from operator import attrgetter from django.utils.translation import ugettext_noop from corehq.apps.groups.models import Group ASHA_ROLE = ugettext_noop('ASHA') AWW_ROLE = ugettext_noop('AWW') def get_team_members(group): """ Get any commcare users that are either "asha" or "aww". """ ...
Python
0.000006
a703ccf8b39d6c849885532fab0b47d071266d5d
add xrunner python script
scripts/xrunner.py
scripts/xrunner.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import glob import os import os.path import time import getopt import sys from xml.dom.minidom import Document class TestResult: def __init__(self, passed, time_taken, message, out, err): self.passed = passed self.time_taken = time_tak...
Python
0.000001
185c24013eb075f311c90816c9eb2270422f333f
add sample amcache.py
samples/amcache.py
samples/amcache.py
#!/usr/bin/python # This file is part of python-registry. # # Copyright 2015 Will Ballenthin <william.ballenthin@mandiant.com> # while at Mandiant <http://www.mandiant.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance wi...
Python
0.000001
1137a5ffa3481a224649dc2321b17fe227a7553d
Create glitch.py
glitch.py
glitch.py
# Aradiabot image glitching functions. # Transcribed over from my 'fastglitch' repository. from io import BytesIO, StringIO import random, sys, PIL.Image, PIL.ImageChops, PIL.ImageDraw, os chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890' import asyncio def genImg(fname): img = PIL.Image.open(f...
Python
0.000003
471d1d4ae197c7643eeac374a0353adbce54fd44
add scheme to grabber api url if not present
src/streamlink/plugins/nineanime.py
src/streamlink/plugins/nineanime.py
import re from streamlink.plugin import Plugin from streamlink.plugin.api import http from streamlink.plugin.api import useragents from streamlink.plugin.api import validate from streamlink.stream import HTTPStream from streamlink.compat import urlparse class NineAnime(Plugin): _episode_info_url = "//9anime.to/aj...
import re from streamlink.plugin import Plugin from streamlink.plugin.api import http from streamlink.plugin.api import validate from streamlink.stream import HTTPStream class NineAnime(Plugin): _episode_info_url = "http://9anime.to/ajax/episode/info" _info_schema = validate.Schema({ "grabber": valid...
Python
0
bbbddd3d505f18759b509442238cd492f420a142
Fix ordered_dict_merge rename error
fwgen/fwgen_cmd.py
fwgen/fwgen_cmd.py
import argparse import signal import sys import subprocess from collections import OrderedDict from pkg_resources import resource_filename import yaml import fwgen # Python 2.7 compatibility try: input = raw_input except NameError: pass class TimeoutExpired(Exception): pass def alarm_handler(signum, f...
import argparse import signal import sys import subprocess from collections import OrderedDict from pkg_resources import resource_filename import yaml import fwgen # Python 2.7 compatibility try: input = raw_input except NameError: pass class TimeoutExpired(Exception): pass def alarm_handler(signum, f...
Python
0.000001