text
stringlengths
0
1.05M
meta
dict
# BS mark.1-55 # /* coding: utf-8 */ # BlackSmith plugin # most_plugin.py # Coded by: 40tman (40tman@qip.ru) # ReCoded: by WitcherGeralt (WitcherGeralt@jabber.ru) MOST_C1 = None MOST_C2 = None def most_message_handler(raw, type, source, body): if type == 'public' and source[1] in [MOST_C1, MOST_C2]: if source[...
{ "repo_name": "vlasov7777/blacksmith-bot", "path": "extensions/most.py", "copies": "3", "size": "3899", "license": "apache-2.0", "hash": -4764171842904945000, "line_mean": 35.4646464646, "line_max": 145, "alpha_frac": 0.5903047091, "autogenerated": false, "ratio": 2.1500893388921978, "config_te...
# BS mark.1-55 # /* coding: utf-8 */ # BlackSmith plugin # Coded by: WitcherGeralt [WitcherGeralt@rocketmail.com] # http://witcher-team.ucoz.ru/ def blacksmith_svn(type, source, body): if body: body, call, rlist = body.split(), 0, {} req = body[0].lower() if req in [u'ласт', 'last']: try: repl = u'По...
{ "repo_name": "cobrab11/black1-bot", "path": "extensions/svn_info.py", "copies": "3", "size": "2328", "license": "apache-2.0", "hash": -7560421245626193000, "line_mean": 33.1967213115, "line_max": 163, "alpha_frac": 0.604506232, "autogenerated": false, "ratio": 2.3049723756906078, "config_test"...
# BS mark.1-55 # /* coding: utf-8 */ # BlackSmith plugin # newjid_plugin.py # Coded by: WitcherGeralt (WitcherGeralt@jabber.ru) # http://witcher-team.ucoz.ru/ LASTREG = 0 def handler_REGJID(User, Server, codename): cl = xmpp.Client(server = Server, port = PORT, debug = []) try: if not cl.connect(server = (Ser...
{ "repo_name": "cobrab11/black1-bot", "path": "extensions/newjid.py", "copies": "3", "size": "2546", "license": "apache-2.0", "hash": -8402397998563748000, "line_mean": 28.7272727273, "line_max": 116, "alpha_frac": 0.6107470511, "autogenerated": false, "ratio": 2.2981927710843375, "config_test":...
# BS mark.1-55 # /* coding: utf-8 */ # BlackSmith plugin # note_plugin.py # Coded by: WitcherGeralt (WitcherGeralt@jabber.ru) # http://witcher-team.ucoz.ru/ note_file = 'dynamic/notepad.txt' def handler_note(type, source, body): NOTE = eval(read_file(note_file)) jid = handler_jid(source[0]) if body: args = b...
{ "repo_name": "Manazius/blacksmith-bot", "path": "extensions/note.py", "copies": "3", "size": "2346", "license": "apache-2.0", "hash": -5709026566979412000, "line_mean": 29.0563380282, "line_max": 82, "alpha_frac": 0.6026241799, "autogenerated": false, "ratio": 2.287245444801715, "config_test":...
# BS mark.1-55 # /* coding: utf-8 */ # BlackSmith plugin # opros_plugin.py # Coded by: WitcherGeralt (WitcherGeralt@jabber.ru) # http://witcher-team.ucoz.ru/ #-extmanager-extVer:0.5-# OPROS_USERS = {} OPROS_CHAT = [] OTOPIC = {} MODERIN = [] STARTER = None OPROS_GTS = {'title': False, 'ops': 0, 'tryes': 0, 'work':...
{ "repo_name": "Manazius/blacksmith-bot", "path": "extensions/opros.py", "copies": "1", "size": "7206", "license": "apache-2.0", "hash": -7372997266130860000, "line_mean": 32.6413043478, "line_max": 225, "alpha_frac": 0.6235864297, "autogenerated": false, "ratio": 1.9833386735020826, "config_tes...
# BS mark.1-55 # /* coding: utf-8 */ # BlackSmith plugin # ping_plugin.py # Coded by: WitcherGeralt (WitcherGeralt@jabber.ru) # http://witcher-team.ucoz.ru/ PINGSTAT = {} def handler_ping(type, source, nick): user, jid = nick, nick if nick: if source[1] in GROUPCHATS: if nick in GROUPCHATS[source[1]]: ...
{ "repo_name": "Manazius/blacksmith-bot", "path": "extensions/ping.py", "copies": "3", "size": "2762", "license": "apache-2.0", "hash": -6570759637765123000, "line_mean": 30.5696202532, "line_max": 182, "alpha_frac": 0.6309667068, "autogenerated": false, "ratio": 2.1399141630901286, "config_test...
# BlackSmith plugin # price_plugin.py # Author: ferym (ferym@jabbim.org.ru) # Ported from Isida by: WitcherGeralt (WitcherGeralt@jabber.ru) def handler_price(type, source, body): if body: if not body.count('http://'): try: data = re_search(read_url('http://www.webvaluer.org/ru/www.%s' % (body.encode('utf...
{ "repo_name": "vlasov7777/blacksmith-bot", "path": "extensions/price.py", "copies": "3", "size": "1087", "license": "apache-2.0", "hash": -3277237576168199700, "line_mean": 32.2, "line_max": 175, "alpha_frac": 0.6154618474, "autogenerated": false, "ratio": 2.2182628062360803, "config_test": fal...
# BS mark.1-55 # /* coding: utf-8 */ # BlackSmith plugin # remote_ctrl_plugin.py # Coded by: WitcherGeralt (WitcherGeralt@jabber.ru) # http://witcher-team.ucoz.ru/ def handler_remote_control(type, source, body): confs = GROUPCHATS.keys() confs.sort() if body: args = body.split() if len(args) >= 3: item =...
{ "repo_name": "vlasov7777/blacksmith-bot", "path": "extensions/remote-ctrl.py", "copies": "3", "size": "1703", "license": "apache-2.0", "hash": -5332151216211552000, "line_mean": 25.2459016393, "line_max": 97, "alpha_frac": 0.6021236727, "autogenerated": false, "ratio": 2.553429027113238, "conf...
# BS mark.1-55 # /* coding: utf-8 */ # BlackSmith plugin # resend_plugin.py # Coded by: WitcherGeralt (WitcherGeralt@jabber.ru) # http://witcher-team.ucoz.ru/ def handler_resend(type, source, body): if source[1] in GROUPCHATS: if body: args = body.split() if len(args) >= 2: nick = args[0].strip() ...
{ "repo_name": "cobrab11/black1-bot", "path": "extensions/resend.py", "copies": "3", "size": "1791", "license": "apache-2.0", "hash": -7029486686517151000, "line_mean": 28.1052631579, "line_max": 108, "alpha_frac": 0.6003616637, "autogenerated": false, "ratio": 2.5800933125972008, "config_test":...
# BlackSmith plugin # roster_plugin.py # Author: 40tman (40tman@qip.ru) # ReCoded: by WitcherGeralt (WitcherGeralt@jabber.ru) # http://witcher-team.ucoz.ru/ def roster_control(type, source, body): if body: args = body.split() if len(args) >= 2: jid = args[1].strip() if jid.count('@') and jid.count('.'):...
{ "repo_name": "vlasov7777/blacksmith-bot", "path": "extensions/roster.py", "copies": "3", "size": "4999", "license": "apache-2.0", "hash": -7955909131336251000, "line_mean": 30.0827586207, "line_max": 95, "alpha_frac": 0.5906367872, "autogenerated": false, "ratio": 2.249001996007984, "config_te...
# BS mark.1-55 # /* coding: utf-8 */ # BlackSmith plugin # servres_plugin.py # Coded by: WitcherGeralt (WitcherGeralt@jabber.ru) # http://witcher-team.ucoz.ru/ SERVSTAT = {} RESSTAT = {} def handler_servres_stat(conf, nick, afl, role, status, text): instance = GROUPCHATS[conf][nick] if instance.has_key('full_ji...
{ "repo_name": "vlasov7777/blacksmith-bot", "path": "extensions/servres.py", "copies": "3", "size": "1659", "license": "apache-2.0", "hash": 4965137207651982000, "line_mean": 25.7704918033, "line_max": 62, "alpha_frac": 0.6484996938, "autogenerated": false, "ratio": 2.5879556259904914, "config_t...
# BS mark.1-55 # /* coding: utf-8 */ # BlackSmith plugin # statconfs_plugin.py # Coded by: WitcherGeralt (WitcherGeralt@jabber.ru) # http://witcher-team.ucoz.ru/ STATCONFS_FILE = 'dynamic/statconfs.txt' STATCONFS = {'joins': 0, 'confs': {}} def handler_statconfs(conf, nick, afl, role, status, text): if conf not...
{ "repo_name": "vlasov7777/blacksmith-bot", "path": "extensions/statconfs.py", "copies": "3", "size": "7646", "license": "apache-2.0", "hash": 2222426967409113600, "line_mean": 36.2887700535, "line_max": 106, "alpha_frac": 0.5779434963, "autogenerated": false, "ratio": 2.3274365821094793, "confi...
# BS mark.1-55 # /* coding: utf-8 */ # BlackSmith plugin # superamoder_plugin.py # (c) simpleApps, 2011 — 2013 BossToModer_exc = [] def BossToModer_cfg(mType, source, args): if args: args = args.split() Del = args[0] == "-" if not GROUPCHATS.get(source[1]): answer = u"Только для конференций." else: ...
{ "repo_name": "cobrab11/black1-bot", "path": "extensions/superamoder.py", "copies": "3", "size": "2339", "license": "apache-2.0", "hash": -2508393801536439000, "line_mean": 32.4918032787, "line_max": 126, "alpha_frac": 0.6689520078, "autogenerated": false, "ratio": 2.0858018386108275, "config_t...
# BS mark.1-55 # /* coding: utf-8 */ # BlackSmith plugin # talkers_plugin.py # Coded by: WitcherGeralt (WitcherGeralt@jabber.ru) # http://witcher-team.ucoz.ru/ TALKERS = {} def handler_talkers(type, source, body): if body: if source[1] in GROUPCHATS: args = body.split() if len(args) >= 2: seckey, key...
{ "repo_name": "Manazius/blacksmith-bot", "path": "extensions/talkers.py", "copies": "3", "size": "6483", "license": "apache-2.0", "hash": 5185867382682538000, "line_mean": 36.1349693252, "line_max": 133, "alpha_frac": 0.5641830497, "autogenerated": false, "ratio": 2.370936153544849, "config_tes...
# BS mark.1-55 # /* coding: utf-8 */ # BlackSmith plugin # timer_plugin.py # Coded by: WitcherGeralt (WitcherGeralt@jabber.ru) # http://witcher-team.ucoz.ru/ TCMDS = [u'пинг', u'тест', u'сказать', u'чисть', u'анекдот', u'тык', u'ботап', u'топик', u'призвать', u'участник'] TIMERS = {'col': 0, 'tmrs': {}} def time...
{ "repo_name": "Manazius/blacksmith-bot", "path": "extensions/timer.py", "copies": "3", "size": "4016", "license": "apache-2.0", "hash": 4137468890413289500, "line_mean": 29.3565217391, "line_max": 126, "alpha_frac": 0.5898023489, "autogenerated": false, "ratio": 2.268356075373619, "config_test"...
# BS mark.1-55 # /* coding: utf-8 */ # BlackSmith plugin # verification_plugin.py # Ver.3.5 # Coded by: WitcherGeralt (WitcherGeralt@jabber.ru) # http://witcher-team.ucoz.ru/ OTVET = {} VERON = {} def handler_verification(conf, nick, afl, role, status, text): if VERON[conf] != 'off' and afl == 'none': jid = h...
{ "repo_name": "Manazius/blacksmith-bot", "path": "extensions/verification.py", "copies": "3", "size": "2948", "license": "apache-2.0", "hash": 1779605261472423700, "line_mean": 33.8947368421, "line_max": 125, "alpha_frac": 0.6508295626, "autogenerated": false, "ratio": 2.2763948497854076, "conf...
# BlackSmith plugin # wtf_plugin.py # Author: # Mike Mintz [mikemintz@gmail.com] # Modifications: # Als [Als@exploit.in] # WitcherGeralt [WitcherGeralt@rocketmail.com] WTF_FILE = 'dynamic/wtf.txt' def handler_wtf_global(type, source, body): if body: args = body.split('=', 1) if len(args) == 2: try: ...
{ "repo_name": "vlasov7777/blacksmith-bot", "path": "extensions/wtf.py", "copies": "3", "size": "9455", "license": "apache-2.0", "hash": 3329582666766592000, "line_mean": 29.3732394366, "line_max": 106, "alpha_frac": 0.6050313007, "autogenerated": false, "ratio": 2.2214782384754055, "config_test...
# BS mark.1-55 # /* coding: utf-8 */ # Idea © WitcherGeralt, 2010 — 2011. # (c) simpleApps, 2011 — 2013. ALARM_FILE = 'dynamic/alarm.txt' ALARM_LIST = {} def alarmConfig(mType, source, body): jid = handler_jid(source[0]) answer = "" if body: if len(body) <= 256: args = body.split(None, 1) if args[0] == "...
{ "repo_name": "Manazius/blacksmith-bot", "path": "extensions/alarm.py", "copies": "3", "size": "2447", "license": "apache-2.0", "hash": -4186724221619015700, "line_mean": 27.9102564103, "line_max": 100, "alpha_frac": 0.5949423248, "autogenerated": false, "ratio": 2.231683168316832, "config_test...
# BS mark.1-55 # coding: utf-8 # regexp.py # © simpleApps, 2013. (02.07.13 15:54) #-extmanager-extVer:0.99.1-# from pattern import * Patterns = {} def check_jid_for_matches(jid, Patterns = None): if not Patterns: return False jid = JIDPattern.split(jid) for pattern in Patterns: if pattern == jid: return ...
{ "repo_name": "Manazius/blacksmith-bot", "path": "extensions/regexp.py", "copies": "1", "size": "4151", "license": "apache-2.0", "hash": 8288276747031212000, "line_mean": 29.637037037, "line_max": 106, "alpha_frac": 0.621131528, "autogenerated": false, "ratio": 2.9312544294826366, "config_test"...
# BS mark.1-55 # /* coding: utf-8 */ # BlackSmith plugin # © WitcherGeralt, 2010-2013. chat_file = lambda chat, name: "dynamic/%s/%s" % (chat, name) UstatsFile = "jstat.db" UstatsDesc = {} # spike: DeprecatedUstatsFile = "userstat.txt" def user_stats_spike(conf, db): filename = chkFile(chat_file(conf, Depreca...
{ "repo_name": "Manazius/blacksmith-bot", "path": "extensions/user_stats.py", "copies": "3", "size": "5811", "license": "apache-2.0", "hash": 1580780039081611000, "line_mean": 32.8143712575, "line_max": 184, "alpha_frac": 0.616188452, "autogenerated": false, "ratio": 2.613888888888889, "config_t...
# BS mark.1-55 # /* coding: utf-8 */ # BlackSmith plugin # © WitcherGeralt, 2012. from urllib import urlencode gCache = [] def command_google(mType, source, body): if body: if (chr(42) != body.strip()): Ask = urlencode({'q': body.encode('utf-8')}) try: data = read_url("http://ajax.googleapis.com/aj...
{ "repo_name": "Manazius/blacksmith-bot", "path": "extensions/google.py", "copies": "3", "size": "2432", "license": "apache-2.0", "hash": -1314280029623841500, "line_mean": 27.2405063291, "line_max": 115, "alpha_frac": 0.5652173913, "autogenerated": false, "ratio": 2.3835470085470085, "config_te...
# BS mark.1-55 # /* coding: utf-8 */ # BlackSmith plugin # © simpleApps, 2012 — 2013. BanBase = {} BanBaseFile = "dynamic/banbase.txt" def handle_AflRl(coze, stanza, mType, source): if xmpp.isResultNode(stanza): reply(mType, source, u"Сделано.") else: reply(mType, source, u"Запрещено. Тип: %s." % stanza.getTyp...
{ "repo_name": "cobrab11/black1-bot", "path": "extensions/mucacc.py", "copies": "3", "size": "5100", "license": "apache-2.0", "hash": 8192874180239477000, "line_mean": 30.7682119205, "line_max": 88, "alpha_frac": 0.6577027309, "autogenerated": false, "ratio": 2.4215042907622415, "config_test": f...
# BS mark.1-55 # /* coding: utf-8 */ # © WitcherGeralt, 2012. def command_YandexMarket(mType, source, body): if body: ls = body.split() c1st = (ls.pop(0)).lower() if check_number(c1st): if ls: c2st = ls.pop(0) if check_number(c2st): try: print c2st data = read_url("http://m.market.y...
{ "repo_name": "vlasov7777/blacksmith-bot", "path": "extensions/yandexmarket.py", "copies": "3", "size": "2365", "license": "apache-2.0", "hash": -4018299745227005000, "line_mean": 32.734375, "line_max": 140, "alpha_frac": 0.5871177016, "autogenerated": false, "ratio": 2.3405639913232106, "confi...
# BS mark.1-55 # /* coding: utf-8 */ # © simpleApps, 21.05.2012 (12:38:47) # Web site header detector # RC-5! #-extmanager-extVer:2.9.4-# import re import zlib import urllib2 comp_link = re.compile("(https?)://([^\s'\"<>/]+)([^\s'\"<>]+)") comp_charset = re.compile("(.+);[ ]?charset=(.+)") comp_charset_alt = re.com...
{ "repo_name": "Manazius/blacksmith-bot", "path": "extensions/urldetect.py", "copies": "1", "size": "5306", "license": "apache-2.0", "hash": -3875641043661076500, "line_mean": 31.8662420382, "line_max": 102, "alpha_frac": 0.618143051, "autogenerated": false, "ratio": 2.736870026525199, "config_t...
# BS mark.1-55 # /* coding: utf-8 */ # © simpleApps, 2011 - 2013. def AnecDote(mType, source, body): target = read_link("http://anekdot.odessa.ua/rand-anekdot.php") data = re.search(">(.*)<a href=", target, 16) if data: data = uHTML(data.group(1).decode("cp1251")).strip() reply(mType, source, u"Анекдот: \n%s" %...
{ "repo_name": "cobrab11/black1-bot", "path": "extensions/quotes.py", "copies": "3", "size": "4524", "license": "apache-2.0", "hash": -7584003780334951000, "line_mean": 32.2348484848, "line_max": 181, "alpha_frac": 0.637254902, "autogenerated": false, "ratio": 2.5163511187607575, "config_test": ...
# BS mark.1-55 # /* coding: utf-8 */ # © simpleApps, 27.11.2012. # This plugin receives # info about minecraft servers. #-extmanager-extVer:1.2-# import socket def command_chkMinecraftServer(mType, source, argv): answer = u"что?" if argv: argv = argv.split()[:2] addr, port = str(), 25565 if len(argv) == 1: ...
{ "repo_name": "Manazius/blacksmith-bot", "path": "extensions/minecraft.py", "copies": "1", "size": "1120", "license": "apache-2.0", "hash": -259119955888200960, "line_mean": 23.488372093, "line_max": 93, "alpha_frac": 0.6378326996, "autogenerated": false, "ratio": 2.369369369369369, "config_tes...
# BS mark.1-55 # /* coding: utf-8 */ # © simpleApps, 29.11.2012. # This plugin receives # info about Teeworlds servers. #-extmanager-extVer:1.4-# import socket flags = {"20": "AD", "784": "AE", "4": "AF", "28": "AG", "660": "AI", "8": "AL", "51": "AM", "24": "AO", "32": "AR", "16": "AS", ...
{ "repo_name": "Manazius/blacksmith-bot", "path": "extensions/teeworlds.py", "copies": "1", "size": "6616", "license": "apache-2.0", "hash": -5450685134678239000, "line_mean": 17.8459302326, "line_max": 81, "alpha_frac": 0.4163196051, "autogenerated": false, "ratio": 2.096023278370514, "config_t...
# BS mark.1-55 plugin # /* coding: utf-8 */ import socket def command_dns(mType, source, address): if address: try: address = address.encode("idna") name, alias, addrs = socket.gethostbyaddr(address) addrs.insert(0, name) answer = ", ".join(addrs) except socket.error: try: answer = u"%s — %s" ...
{ "repo_name": "Manazius/blacksmith-bot", "path": "extensions/dns.py", "copies": "3", "size": "1263", "license": "apache-2.0", "hash": -6063508223396411000, "line_mean": 25.2173913043, "line_max": 83, "alpha_frac": 0.6381742739, "autogenerated": false, "ratio": 2.5529661016949152, "config_test":...
# Initial Copyright © 2010 - 2011 WitcherGeralt [WitcherGeralt@rocketmail.com] # Modifications : # © 2011 simpleApps (http://simpleapps.ru) TableRU = '''ёйцукенгшщзхъфывапролджэячсмитьбю.!"№;%:?*()_+/-=\ЁЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ.'''.decode("utf-8") TableEN = '''`qwertyuiop[]asdfghjkl;'zxcvbnm,./!@#;%^&*()...
{ "repo_name": "cobrab11/black1-bot", "path": "extensions/turn.py", "copies": "3", "size": "2339", "license": "apache-2.0", "hash": -9055280333895318000, "line_mean": 27.4050632911, "line_max": 116, "alpha_frac": 0.6205974142, "autogenerated": false, "ratio": 2.243, "config_test": false, "has_...
''' Bspline module for CADRE ''' from six.moves import range import numpy as np from openmdao.core.component import Component from MBI import MBI class BsplineParameters(Component): '''Creates a Bspline interpolant for several CADRE variables so that their time histories can be shaped with m control poi...
{ "repo_name": "hschilling/CADRE-1", "path": "src/CADRE/parameters.py", "copies": "1", "size": "3450", "license": "apache-2.0", "hash": 627307361419446700, "line_mean": 34.5670103093, "line_max": 86, "alpha_frac": 0.532173913, "autogenerated": false, "ratio": 3.372434017595308, "config_test": fa...
# BSP Note: For TI EK-TM4C1294XL Tiva C Series Connected LancuhPad (REV D) import os # toolchains options ARCH='arm' CPU='cortex-m4' CROSS_TOOL='keil' if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') #device options PART_TYPE = 'PART_TM4C129XNCZAD' # cross_tool provides the cross compiler # EXEC_...
{ "repo_name": "RT-Thread/rt-thread", "path": "bsp/tm4c129x/rtconfig.py", "copies": "12", "size": "3663", "license": "apache-2.0", "hash": -1989079979853010700, "line_mean": 26.5488721805, "line_max": 141, "alpha_frac": 0.5481845482, "autogenerated": false, "ratio": 2.8112049117421334, "config_t...
# BSP Note: For TI EK-TM4C1294XL Tiva C Series Connected LancuhPad (REV D) import os import sys # toolchains options CROSS_TOOL = 'gcc' if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') # device options ARCH = 'arm' CPU = 'cortex-m0' # cross_tool provides the cross compiler # EXEC_PATH is the compiler ex...
{ "repo_name": "geniusgogo/rt-thread", "path": "bsp/mm32l07x/rtconfig.py", "copies": "12", "size": "3675", "license": "apache-2.0", "hash": 3011216030989689000, "line_mean": 26.2222222222, "line_max": 153, "alpha_frac": 0.5526530612, "autogenerated": false, "ratio": 2.8800940438871474, "config_t...
# BSP Note: For TI EK-TM4C1294XL Tiva C Series Connected LancuhPad (REV D) import os # toolchains options ARCH='arm' CPU='cortex-m4' CROSS_TOOL='keil' if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') #device options PART_TYPE = 'PART_TM4C129XNCZAD' # cross_tool provides the cross compiler # EXEC_PATH is t...
{ "repo_name": "huangbop/skywalker", "path": "rt-thread-2.0.0/bsp/tm4c129x/rtconfig.py", "copies": "1", "size": "2501", "license": "mit", "hash": 8754098788250605000, "line_mean": 27.7471264368, "line_max": 141, "alpha_frac": 0.5709716114, "autogenerated": false, "ratio": 2.7393209200438116, "co...
# BSRP utilities that simplify individual protocols from datetime import datetime import os, requests, time, stat, socket#, pytz def robust_url_retrieval(parameters, method='GET', post_data='', stn='', tries=5, timeout=20): bssid = parameters['city'] url = parameters['url'] # stn will only be us...
{ "repo_name": "serialc/BSR_parsers", "path": "parsers/pyBSRP/build/lib/bsrp/bsrputil.py", "copies": "2", "size": "4130", "license": "apache-2.0", "hash": 4185667992893791000, "line_mean": 32.132231405, "line_max": 130, "alpha_frac": 0.5799031477, "autogenerated": false, "ratio": 3.852611940298507...
"BST: Binary search tree" class BST(object): """ A binary search tree. (Essentially a simple wrapper class to encapsulate the root node.) """ def __init__(self, value=None): self._root = _BSTNode(value) def insert(self, value): """ Inserts a value into the t...
{ "repo_name": "pauljxtan/pystuff", "path": "data_structures/bst.py", "copies": "1", "size": "5558", "license": "mit", "hash": 9020344887891411000, "line_mean": 31.696969697, "line_max": 79, "alpha_frac": 0.5419215545, "autogenerated": false, "ratio": 4.799654576856649, "config_test": false, "...
"""BST data structure.""" import timeit class Node(object): """Node class used for the bst.""" def __init__(self, data=None): """Init node.""" self.data = data self.left = None self.right = None self.parent = None self.depth = 1 def _set_child(self, child)...
{ "repo_name": "han8909227/data-structures", "path": "src/bst.py", "copies": "1", "size": "10771", "license": "mit", "hash": 5493188076938823000, "line_mean": 32.450310559, "line_max": 108, "alpha_frac": 0.5160152261, "autogenerated": false, "ratio": 4.197583787996883, "config_test": false, "h...
"""bsw - Build Static Website A simple static website generator operating on the current directory and building static websites from pages and templates. Your project folder should be structured as follows: pages/ templates/ base.html An example layout would be: pages/ about/ ...
{ "repo_name": "davb5/bsw", "path": "bsw/bsw.py", "copies": "1", "size": "5292", "license": "mit", "hash": 1151096010612893400, "line_mean": 28.7303370787, "line_max": 79, "alpha_frac": 0.6300075586, "autogenerated": false, "ratio": 4.180094786729858, "config_test": false, "has_no_keywords": f...
"""bsw file management functions""" import shutil import os class FileManager(object): def __init__(self, out_dir): self.out_dir = out_dir def create_out_dir(self): """Create the output dir if it doens't exist.""" if not os.path.isdir(self.out_dir): os.makedirs(self.out_d...
{ "repo_name": "davb5/bsw", "path": "bsw/files.py", "copies": "1", "size": "2828", "license": "mit", "hash": 1450039233917620700, "line_mean": 39.9855072464, "line_max": 87, "alpha_frac": 0.5859264498, "autogenerated": false, "ratio": 3.955244755244755, "config_test": false, "has_no_keywords":...
"""bswitch.py -- binary-tree switch statement For functions that are composed of long if statements testing a value, this rewrites their bytecode. """ # todo: try this out https://pypi.python.org/pypi/BytecodeAssembler # todo: also this http://pydoc.org/2.5.1/compiler.pyassem.html import collections, opcode, struct, d...
{ "repo_name": "abe-winter/bswitch", "path": "bswitch/bswitch.py", "copies": "1", "size": "8777", "license": "mit", "hash": -5706180101115934000, "line_mean": 45.935828877, "line_max": 125, "alpha_frac": 0.694998291, "autogenerated": false, "ratio": 3.270119225037258, "config_test": false, "ha...
"""bsw page model and functions""" import os import re from . import templates from . import includes class Page: def __init__(self, filename): self.filename = filename self.body = None # The page body after var replacement self.body_raw = None # The un-transformed page body se...
{ "repo_name": "davb5/bsw", "path": "bsw/pages.py", "copies": "1", "size": "3654", "license": "mit", "hash": 4377860982980542000, "line_mean": 34.8235294118, "line_max": 85, "alpha_frac": 0.5465243569, "autogenerated": false, "ratio": 3.9038461538461537, "config_test": false, "has_no_keywords"...
import os import re import shutil import cv import time import math import subprocess import sys bswTemplate=""" # Book Scan Wizard Script # http://bookscanwizard.s...
{ "repo_name": "gchoinka/diybookscannerpost", "path": "src/bsw_run.py", "copies": "1", "size": "11314", "license": "bsd-3-clause", "hash": -4361386415123120000, "line_mean": 33.3890577508, "line_max": 354, "alpha_frac": 0.4901007601, "autogenerated": false, "ratio": 4.08742774566474, "config_tes...
import wx import datetime from wx.lib.mixins.listctrl import TextEditMixin ID_NEW_CHILD = wx.NewId() ID_SET_PARENT = wx.NewId() ID_DELETE_NODE = wx.NewId() class mNode: def __init__ (self, xx = 0, yy = 0): self.shape = wx.Rect(xx,yy,50,20) self.children = [] self.name = "Node" self.type = "...
{ "repo_name": "forrestjt/BTEdit", "path": "src/BTEdit.py", "copies": "1", "size": "15844", "license": "mit", "hash": -3637224555875672600, "line_mean": 34.2088888889, "line_max": 137, "alpha_frac": 0.5751704115, "autogenerated": false, "ratio": 3.3202011735121544, "config_test": false, "has_n...
b'This module needs Python 2.6 or later.' # Special variables # __version__ = '0.0.1' # Built-in modules # import os, sys, glob # Internal modules # from gefes.common import dependencies from gefes.groups.pools import Pool from gefes.groups.runs import Run, Runs from gefes.groups.projects import Project, Projects fr...
{ "repo_name": "inodb/gefes", "path": "gefes/__init__.py", "copies": "1", "size": "1612", "license": "mit", "hash": -3836259709599359500, "line_mean": 30.6274509804, "line_max": 123, "alpha_frac": 0.66191067, "autogenerated": false, "ratio": 3.185770750988142, "config_test": false, "has_no_key...
__doc__ = """btpy client module - A common interface to the btpd daemon. Client(dir=/path/to/btpd/dir) - Class for creating btpd object dir defaults to $HOME/.btpd The following three functions support '-a' or torrent numbers with the exception of drop() where '-a' is unsupported The...
{ "repo_name": "vkitchen/btpy", "path": "btpy.py", "copies": "1", "size": "9277", "license": "apache-2.0", "hash": 2185924014406424800, "line_mean": 32.9816849817, "line_max": 104, "alpha_frac": 0.5413387949, "autogenerated": false, "ratio": 3.9077506318449875, "config_test": false, "has_no_ke...
# BTS merger allocation draft 3 # ags-pts-nov-5.json # 662e2bd091a401108fd9736dd556a2c8744111e1 - # vote-aug-21-noFMV.json # c9a08d1a6a1921b1caf2c793cc77f62a2056db1f - # fmv-key.json # b5b55c27b50f6c7fe9737e16b0c438dcd0da7ec4 - # dns-dev-fund.json # 0847a39bd69e1cc7dc073317184bb789bf8d89f2 - # dns-collaps...
{ "repo_name": "bitshares/bitshares", "path": "snapshots/build_sharedrop.py", "copies": "10", "size": "12110", "license": "unlicense", "hash": 7158543904134298000, "line_mean": 42.4050179211, "line_max": 123, "alpha_frac": 0.7186622626, "autogenerated": false, "ratio": 2.070793433652531, "config...
# btw I KNOW that import math.sqrt() and sqrt(<number>) can do this :p resp="n" while(not(resp=="y" or resp=="Y")): print "Enter the number of which u want to find root (greater than 1)" userinput=raw_input() length=len(userinput) try: no=int(userinput) except ValueError: print ...
{ "repo_name": "Aditya8795/Python-Scripts", "path": "root.py", "copies": "1", "size": "2090", "license": "mit", "hash": -7735261932665565000, "line_mean": 30.6666666667, "line_max": 97, "alpha_frac": 0.5866028708, "autogenerated": false, "ratio": 3.8847583643122676, "config_test": false, "has_...
"""BézierBuilder, an interactive Bézier curve explorer. Just run it with $ python bezier_builder.py """ import matplotlib # WebAgg canvas requires matplotlib >= 1.3 and tornado #matplotlib.use('webagg') import numpy as np from scipy.special import binom import matplotlib.pyplot as plt from matplotlib.lines imp...
{ "repo_name": "Pybonacci/bezierbuilder", "path": "bezierbuilder.py", "copies": "1", "size": "6844", "license": "bsd-2-clause", "hash": -153401737189311940, "line_mean": 31.0751173709, "line_max": 84, "alpha_frac": 0.6194379391, "autogenerated": false, "ratio": 3.4750762970498474, "config_test":...
# Bézier curves, elliptical arcs, lines, ellipses and paths # Parcly Taxel / Jeremy Tan, 2018 # https://parclytaxel.tumblr.com import numpy as np from cmath import rect, polar from .matrices import tam from .algebra import ccquad, newton, quadricl2m from .regexes import pcomm_re, num_re, flt Pol, tau = np.polynomial.Po...
{ "repo_name": "Parclytaxel/Kinross", "path": "kinback/paths.py", "copies": "1", "size": "23890", "license": "mit", "hash": -4622062380965907000, "line_mean": 61.2486910995, "line_max": 180, "alpha_frac": 0.566802641, "autogenerated": false, "ratio": 2.876028059990324, "config_test": false, "h...
# Bubble Killer # By: Jeremy Pedersen # Licensed under the Simplified BSD (2-clause) License import pygame, sys from pygame.locals import * from random import randint pygame.init() # Set clock speed FPS = 60 fpsClock = pygame.time.Clock() # Set up screen WIDTH = 400 HEIGHT = 300 DISPLAYSURF = pygame.display.set_mod...
{ "repo_name": "jeremypedersen/pythonGameDev", "path": "class08/bubblePop.py", "copies": "1", "size": "4815", "license": "bsd-2-clause", "hash": -279091004775549300, "line_mean": 28.5398773006, "line_max": 100, "alpha_frac": 0.5771547248, "autogenerated": false, "ratio": 3.2293762575452716, "con...
"""bubble - re-emit a log record with superdomain | bubble [field=host] [parts=3] adds 'superhost' field """ import sys,splunk.Intersplunk import re ipregex = r"(?P<ip>((25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\.){3}(25[0-5]|2[0-4]\d|[01]\d\d|\d?\d))" ip_rex = re.compile(ipregex) def super_domain(host, output_parts)...
{ "repo_name": "jpressnell/splunk-scripts", "path": "bubble.py", "copies": "3", "size": "1305", "license": "mit", "hash": -6108960400369332000, "line_mean": 24.5882352941, "line_max": 94, "alpha_frac": 0.6245210728, "autogenerated": false, "ratio": 3.144578313253012, "config_test": false, "has...
# Bubble Sort def bubble_sort(array): sort = True last = len(array) for i in range(len(array)): for j in range(1, last): if array[j-1] > array[j]: array[j-1], array[j] = array[j], array[j-1] sort = False last = j if sort: ...
{ "repo_name": "yanzhenchao/algorithms-in-python", "path": "sort.py", "copies": "1", "size": "2454", "license": "mit", "hash": 5899223863327331000, "line_mean": 21.9345794393, "line_max": 64, "alpha_frac": 0.4425427873, "autogenerated": false, "ratio": 3.370879120879121, "config_test": false, ...
# Bubble Sort Program """ Bubble Sort takes an array as an input and returns the sorted array by default in ascending order without changing the orignal array. Pre-Conditions - Array must contain elements of integer type only. - By default ascending order is given for reverse order set Reverse = True. Bubble_...
{ "repo_name": "CodersForLife/Data-Structures-Algorithms", "path": "Sorting/Bubble_Sort.py", "copies": "1", "size": "1086", "license": "mit", "hash": -8236025249079082000, "line_mean": 27.6052631579, "line_max": 137, "alpha_frac": 0.6418047882, "autogenerated": false, "ratio": 2.9672131147540983, ...
# Bubbles! import PyIgnition, pygame, sys, math screen = pygame.display.set_mode((800, 600)) pygame.display.set_caption("PyIgnition demo: bubbles") clock = pygame.time.Clock() effect = PyIgnition.ParticleEffect(screen, (0, 0), (800, 600)) source = effect.CreateSource(initspeed = 1.0, initdirection = 0.0, ...
{ "repo_name": "HelsinkiGroup5/Hackathon", "path": "display_dominik/Bubbles!.py", "copies": "1", "size": "1258", "license": "mit", "hash": 6847076728957671000, "line_mean": 37.3125, "line_max": 226, "alpha_frac": 0.7074721781, "autogenerated": false, "ratio": 3.0682926829268293, "config_test": f...
"""Buchklub WBS (web-order-system).""" import os import re from setuptools import setup # Get __version__ from googlefonts_installer.py. here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join( here, 'googlefonts_installer.py'), encoding='utf8') as version: VERSION = re.search( r...
{ "repo_name": "fabianbuechler/googlefonts_installer", "path": "setup.py", "copies": "1", "size": "1491", "license": "mit", "hash": -7457416478379986000, "line_mean": 32.1111111111, "line_max": 77, "alpha_frac": 0.6382550336, "autogenerated": false, "ratio": 3.5903614457831323, "config_test": fa...
"""Buck agnostic utility functions. """ from __future__ import absolute_import, division, print_function, with_statement import copy import functools import inspect import os import subprocess import sys from collections import namedtuple def is_in_dir(filepath, directory): """Returns true if `filepath` is in `...
{ "repo_name": "shs96c/buck", "path": "python-dsl/buck_parser/util.py", "copies": "1", "size": "2954", "license": "apache-2.0", "hash": 5341070420300177000, "line_mean": 31.1086956522, "line_max": 97, "alpha_frac": 0.6296547055, "autogenerated": false, "ratio": 4.172316384180791, "config_test": ...
"""Buck agnostic utility functions. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import with_statement from collections import namedtuple import copy import functools import inspect import subprocess import sys import os def is_in_d...
{ "repo_name": "zhan-xiong/buck", "path": "src/com/facebook/buck/json/buck_parser/util.py", "copies": "17", "size": "3019", "license": "apache-2.0", "hash": -2928427796962966500, "line_mean": 31.1170212766, "line_max": 97, "alpha_frac": 0.6319973501, "autogenerated": false, "ratio": 4.175656984785...
"""Bucket buffer based on NumPy.""" import collections import itertools import sys import numpy if sys.version_info[0] == 2: _range = xrange _zip = itertools.izip else: _range = range _zip = zip _Bunch = collections.namedtuple( '_Bunch', ( 'position', 'data', )) class Ord...
{ "repo_name": "christophercrouzet/hienoi", "path": "hienoi/_orderedbuffer.py", "copies": "1", "size": "2700", "license": "mit", "hash": 6060657083085697000, "line_mean": 23.3243243243, "line_max": 78, "alpha_frac": 0.517037037, "autogenerated": false, "ratio": 3.8243626062322944, "config_test":...
"""bucketlist_id Revision ID: 9d18c039a538 Revises: 73ea12e8a3d0 Create Date: 2017-05-06 15:27:22.866584 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '9d18c039a538' down_revision = '73ea12e8a3d0' branch_labels = None depends_on = None def upgrade(): # ...
{ "repo_name": "andela-wcyn/bucketlist", "path": "migrations/versions/9d18c039a538_bucketlist_id.py", "copies": "1", "size": "2090", "license": "mit", "hash": 7264192616136700000, "line_mean": 44.4347826087, "line_max": 123, "alpha_frac": 0.6799043062, "autogenerated": false, "ratio": 3.1811263318...
"""bucketlist id Revision ID: a641bf299e8d Revises: ba989dada0cb Create Date: 2017-05-07 18:05:21.725356 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'a641bf299e8d' down_revision = 'ba989dada0cb' branch_labels = None depends_on = None def upgrade(): # ...
{ "repo_name": "andela-wcyn/bucketlist", "path": "migrations/versions/a641bf299e8d_bucketlist_id.py", "copies": "1", "size": "1260", "license": "mit", "hash": 8242281961199556000, "line_mean": 36.0588235294, "line_max": 131, "alpha_frac": 0.7023809524, "autogenerated": false, "ratio": 3.3245382585...
"""bucketlist item done Revision ID: c38b5bb24386 Revises: a641bf299e8d Create Date: 2017-05-07 19:08:24.698033 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'c38b5bb24386' down_revision = 'a641bf299e8d' branch_labels = None depends_on = None def upgrade():...
{ "repo_name": "andela-wcyn/bucketlist", "path": "migrations/versions/c38b5bb24386_bucketlist_item_done.py", "copies": "1", "size": "1214", "license": "mit", "hash": 8440453413743480000, "line_mean": 29.35, "line_max": 85, "alpha_frac": 0.6408566722, "autogenerated": false, "ratio": 3.634730538922...
"""bucketlist object field Revision ID: ba989dada0cb Revises: 9d18c039a538 Create Date: 2017-05-06 15:41:28.753461 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'ba989dada0cb' down_revision = '9d18c039a538' branch_labels = None depends_on = None def upgrade...
{ "repo_name": "andela-wcyn/bucketlist", "path": "migrations/versions/ba989dada0cb_bucketlist_object_field.py", "copies": "1", "size": "1247", "license": "mit", "hash": -8545387509111527000, "line_mean": 35.6764705882, "line_max": 117, "alpha_frac": 0.7024859663, "autogenerated": false, "ratio": 3...
"""Bucket manipulation""" from __future__ import absolute_import import time import hmac import hashlib import httplib import urllib2 import datetime import warnings from xml.etree import cElementTree as ElementTree from contextlib import contextmanager from urllib import quote_plus from base64 import b64encode from ...
{ "repo_name": "lericson/simples3", "path": "simples3/bucket.py", "copies": "1", "size": "17172", "license": "bsd-2-clause", "hash": 6895111440885399000, "line_mean": 35.3813559322, "line_max": 88, "alpha_frac": 0.5581178663, "autogenerated": false, "ratio": 3.915184678522572, "config_test": tru...
"""Bucket manipulation""" # original work by Ludvig Ericson (https://github.com/lericson/simples3) # Copyright (c) 2008, Ludvig Ericson # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Red...
{ "repo_name": "abrefort/inkscope-debian", "path": "inkscopeCtrl/S3/bucket.py", "copies": "2", "size": "18836", "license": "apache-2.0", "hash": 9153822761987549000, "line_mean": 36.4473161034, "line_max": 105, "alpha_frac": 0.5763431726, "autogenerated": false, "ratio": 3.95299055613851, "confi...
"""BucketQueue.py A simple priority queue with integer priorities. Use like: Q = BucketQueue() Q[item] = priority del Q[item] for item in Q: ... The time to find and return each item in the queue is proportional to the difference (current priority - previous priority), or O(1) if this difference is no...
{ "repo_name": "jfinkels/PADS", "path": "pads/bucketqueue.py", "copies": "1", "size": "2861", "license": "mit", "hash": 1127010622003580300, "line_mean": 36.1558441558, "line_max": 78, "alpha_frac": 0.5983921706, "autogenerated": false, "ratio": 4.20735294117647, "config_test": false, "has_no_...
"""Bucket sort algorithm example Copyright 2016, Sjors van Gelderen """ import math import random """Insertion sort algorithm Complexity: O(n^2) Used as intermediate in bucket sort """ def insertion_sort(_collection): if not _collection: print("Skipping insertion sort, list is empty!") return ...
{ "repo_name": "SjorsVanGelderen/Graduation", "path": "python_3/algorithms/bucket_sort.py", "copies": "1", "size": "2638", "license": "mit", "hash": 907811514248751500, "line_mean": 26.1958762887, "line_max": 77, "alpha_frac": 0.6046247157, "autogenerated": false, "ratio": 4.180665610142631, "co...
"""Bucket Sort""" def radix_sort(array, base=10): def list_to_buckets(array, base, iteration): buckets = [[] for x in range(base)] # iterate through the input array of number for number in array: # Isolate the base-digit from the number # dividing by base to power of ...
{ "repo_name": "carlb15/Python", "path": "bucket_sort.py", "copies": "1", "size": "1280", "license": "mit", "hash": 1521995829670796300, "line_mean": 31.025, "line_max": 65, "alpha_frac": 0.57578125, "autogenerated": false, "ratio": 4.2105263157894735, "config_test": false, "has_no_keywords": ...
""" buckle command Executes sub-commands in given namespace. """ from __future__ import print_function import argparse import os import re import shlex import subprocess import sys import time from buckle import system_clock from buckle import message from buckle import path as toolbelt_path def flush_file_descr...
{ "repo_name": "Nextdoor/buckle", "path": "buckle/commands/base.py", "copies": "1", "size": "10507", "license": "bsd-2-clause", "hash": -7943122253263403000, "line_mean": 41.028, "line_max": 100, "alpha_frac": 0.5729513658, "autogenerated": false, "ratio": 4.2028, "config_test": false, "has_no...
"""Buckle Embedding""" import copy import torch from torch import nn __all__ = ["BuckleEmbedding"] class BuckleEmbedding(nn.Module): """Buckle multiple one hot embedding together Multiple one hot embedding can be done as one embedding (indexing). Use nn.Embedding to deal with sparse wgrad before I full...
{ "repo_name": "mlperf/training_results_v0.7", "path": "Inspur/benchmarks/dlrm/implementations/implementation_closed/dlrm/nn/modules/buckle_embedding.py", "copies": "1", "size": "1621", "license": "apache-2.0", "hash": -2978873511304770000, "line_mean": 36.6976744186, "line_max": 114, "alpha_frac": 0....
"""Buckle Embedding""" import copy import torch from torch import nn __all__ = ["BuckleEmbedding"] class BuckleEmbedding(nn.Module): """Buckle multiple one hot embedding together Multiple one hot embedding can be done as one embedding (indexing). Use nn.Embedding to deal with sparse wgrad ...
{ "repo_name": "mlperf/training_results_v0.7", "path": "NVIDIA/benchmarks/dlrm/implementations/pytorch/dlrm/nn/modules/buckle_embedding.py", "copies": "1", "size": "1664", "license": "apache-2.0", "hash": 6235702662950290000, "line_mean": 36.6976744186, "line_max": 114, "alpha_frac": 0.6736778846, "...
""" buckle help command Prints help descriptions for commands. """ from __future__ import print_function import argparse import os import re import shlex import sys from buckle import autocomplete from buckle import help_formatters from buckle import message from buckle import path as toolbelt_path if os.name == ...
{ "repo_name": "Nextdoor/buckle", "path": "buckle/commands/help.py", "copies": "1", "size": "5112", "license": "bsd-2-clause", "hash": -8045920540394205000, "line_mean": 34.2551724138, "line_max": 99, "alpha_frac": 0.6203051643, "autogenerated": false, "ratio": 3.6909747292418773, "config_test":...
'''Budgeted Maximum Cover Solver This module contains an approximate algoritm for solving the budgeted maximum cover algorithm. This script contains the following classes: * Cover : to represent the cover over elements(sentences) * BudgetedMaxCover : the class containing the solver The solver accepts a list ...
{ "repo_name": "googleinterns/stampify", "path": "summarization/stamp_page_picking/budgeted_max_cover_solver.py", "copies": "1", "size": "10075", "license": "apache-2.0", "hash": -5432468914873677000, "line_mean": 37.3079847909, "line_max": 86, "alpha_frac": 0.6045657568, "autogenerated": false, "...
""" Budget utilities. """ import csv def _reader_filter(entries, *keys): """ Perform filtering of dictionary keys, returning an interator. """ for entry in entries: yield dict((k, entry[k]) for k in keys) FILTER_COLUMNS = ('Type', 'Trans Date', 'Description', 'Amount') def filter_csv(in_file): ...
{ "repo_name": "doggan/bud-get", "path": "bud_get/bud_get.py", "copies": "1", "size": "1643", "license": "unlicense", "hash": 4486779447371271700, "line_mean": 26.3833333333, "line_max": 69, "alpha_frac": 0.5508216677, "autogenerated": false, "ratio": 3.847775175644028, "config_test": false, "...
"""budy URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based...
{ "repo_name": "DataDrivenExperiences/Server", "path": "budy/urls.py", "copies": "1", "size": "1482", "license": "mpl-2.0", "hash": 3981680344042305500, "line_mean": 34.2857142857, "line_max": 81, "alpha_frac": 0.7159244265, "autogenerated": false, "ratio": 3.742424242424242, "config_test": fals...
# BU EC700 Charlie-3 Backend Server to harvest and view exfiltrated creds # Spring 2015 # Brett Kaplan, Eugene Kolo, Alexandrea Mellen, Allan Wirth #!/usr/bin/python from flask import Flask, request, jsonify, send_file import os import base64 import urllib2,urllib app = Flask(__name__) ROOT_DIR = os.path.abspath(os....
{ "repo_name": "EC700/Charlie-3", "path": "inject/passmgr-test/passmgr-test.py", "copies": "1", "size": "1613", "license": "bsd-2-clause", "hash": 7549941334787315000, "line_mean": 25.0161290323, "line_max": 107, "alpha_frac": 0.6391816491, "autogenerated": false, "ratio": 3.031954887218045, "co...
# BU EC700 Charlie-3 MitM Proxy to Inject Evil JS and HTML5 Forms into target websites # Spring 2015 # Brett Kaplan, Eugene Kolo, Alexandrea Mellen, Allan Wirth from libmproxy.protocol.http import decoded from bs4 import BeautifulSoup from urllib import quote from urllib2 import urlopen # use a script tag with an sr...
{ "repo_name": "EC700/Charlie-3", "path": "inject/inject_sweep.py", "copies": "1", "size": "1543", "license": "bsd-2-clause", "hash": 8730248416977464000, "line_mean": 34.8837209302, "line_max": 91, "alpha_frac": 0.6681788723, "autogenerated": false, "ratio": 3.6305882352941174, "config_test": f...
buf = """const LOGIN_PACKET = 0x8f; const PLAY_STATUS_PACKET = 0x90; const DISCONNECT_PACKET = 0x91; const BATCH_PACKET = 0x92; const TEXT_PACKET = 0x93; const SET_TIME_PACKET = 0x94; const START_GAME_PACKET = 0x95; const ADD_PLAYER_PACKET = 0x96; const REMOVE_PLAYER_PACKET = 0x97; c...
{ "repo_name": "cr0sh/PocketMine-Head-Parser", "path": "parse.py", "copies": "1", "size": "3226", "license": "mit", "hash": -5472214856430500000, "line_mean": 30.9405940594, "line_max": 81, "alpha_frac": 0.6450712957, "autogenerated": false, "ratio": 2.9063063063063064, "config_test": false, "...
"""Buffer allowing to delay multiple costly operations.""" # ----------------------------------------------------------------------------- # Imports # ----------------------------------------------------------------------------- import timeit from threading import Lock import numpy as np from qtools import QtGui, Qt...
{ "repo_name": "c-wilson/klustaviewa", "path": "klustaviewa/gui/buffer.py", "copies": "2", "size": "2686", "license": "bsd-3-clause", "hash": -4531419665115899400, "line_mean": 30.2441860465, "line_max": 79, "alpha_frac": 0.4694713328, "autogenerated": false, "ratio": 4.901459854014599, "config_...
"""Buffer class.""" __author__ = "Patrick K. O'Brien <pobrien@orbtech.com>" __cvsid__ = "$Id: buffer.py 25782 2004-02-13 02:47:59Z PKO $" __revision__ = "$Revision: 25782 $"[11:-2] from interpreter import Interpreter import imp import os import sys import document class Buffer: """Buffer class.""" id = 0 ...
{ "repo_name": "ifwe/wxpy", "path": "wx/py/buffer.py", "copies": "1", "size": "4305", "license": "mit", "hash": 8444360268125365000, "line_mean": 30.1956521739, "line_max": 76, "alpha_frac": 0.5461091754, "autogenerated": false, "ratio": 4.322289156626506, "config_test": false, "has_no_keyword...
"""Buffer class.""" __author__ = "Patrick K. O'Brien <pobrien@orbtech.com>" __cvsid__ = "$Id$" __revision__ = "$Revision$"[11:-2] from interpreter import Interpreter import imp import os import sys import document class Buffer: """Buffer class.""" id = 0 def __init__(self, filename...
{ "repo_name": "ktan2020/legacy-automation", "path": "win/Lib/site-packages/wx-3.0-msw/wx/py/buffer.py", "copies": "1", "size": "4398", "license": "mit", "hash": 4923143955071224000, "line_mean": 29.8695652174, "line_max": 76, "alpha_frac": 0.5272851296, "autogenerated": false, "ratio": 4.48775510...
""" Buffer equivalents of memory data models To create from an existing model in the buffer, make some changes, and then sync to buffer:: my_buffer_skymodel = BufferSkyModel(conf["buffer"], conf["inputs"]["skymodel"]) my_memory_skymodel = my_buffer_skymodel.memory_data_model ... do some stuff my_memor...
{ "repo_name": "SKA-ScienceDataProcessor/algorithm-reference-library", "path": "data_models/buffer_data_models.py", "copies": "1", "size": "6058", "license": "apache-2.0", "hash": -2540059759082697700, "line_mean": 30.0666666667, "line_max": 113, "alpha_frac": 0.627434797, "autogenerated": false, ...
"""Buffer for storing large network data.""" import numpy as np import theano class Buffer(object): """Buffer storing data from contiguous subsequence of minibatches. Content of a buffer is a 4-dimensional floating-point tensor. """ def __init__(self, data_loader): """Create data Buffer. ...
{ "repo_name": "heurezjusz/Athenet", "path": "athenet/data_loader/data_loader_buffer.py", "copies": "2", "size": "2789", "license": "bsd-2-clause", "hash": -5847408216575128000, "line_mean": 34.7564102564, "line_max": 79, "alpha_frac": 0.6084618143, "autogenerated": false, "ratio": 4.3510140405616...
_buffer = [] _bindings = {} def bind(keys, context, action): if context not in _bindings: _bindings[context] = {} _bindings[context][keys] = action def map(key, context): global _buffer _buffer.append(key) if context not in _bindings: _buffer = [] return None flag =...
{ "repo_name": "mateusz-holenko/clired", "path": "core/KeyBinder.py", "copies": "1", "size": "1038", "license": "mit", "hash": -6789845907976379000, "line_mean": 21.085106383, "line_max": 47, "alpha_frac": 0.5404624277, "autogenerated": false, "ratio": 3.13595166163142, "config_test": false, "...
buffer = {} low_x = low_y = high_x = high_y = 0 x = y = 0 instructions = open("input/dec19").readlines() for instr in instructions: dist, dir = instr.strip().split(", ") dx = 0 dy = 0 if dir == 'east': dx = int(dist) if dir == 'west': dx = -int(dist) if dir == 'south': ...
{ "repo_name": "matslindh/codingchallenges", "path": "knowit2017/19.py", "copies": "1", "size": "1067", "license": "mit", "hash": 5056942261441784000, "line_mean": 16.8, "line_max": 53, "alpha_frac": 0.4292408622, "autogenerated": false, "ratio": 3.1474926253687316, "config_test": false, "has_...
# Buffers allocated on the heap from bgenOutput import * from bgenType import OutputOnlyMixIn from bgenBuffer import FixedInputOutputBufferType class HeapInputOutputBufferType(FixedInputOutputBufferType): """Input-output buffer allocated on the heap -- passed as (inbuffer, outbuffer, size). Instantiate wit...
{ "repo_name": "yqm/sl4a", "path": "python/src/Tools/bgen/bgen/bgenHeapBuffer.py", "copies": "44", "size": "4201", "license": "apache-2.0", "hash": -7550309014408022000, "line_mean": 27.9724137931, "line_max": 90, "alpha_frac": 0.6153296834, "autogenerated": false, "ratio": 3.7542448614834676, "...
# Buffers allocated on the heap from bgenOutput import * from bgenType import OutputOnlyMixIn from bgenBuffer import FixedInputOutputBufferType class HeapInputOutputBufferType(FixedInputOutputBufferType): """Input-output buffer allocated on the heap -- passed as (inbuffer, outbuffer, size). Inst...
{ "repo_name": "google/google-ctf", "path": "third_party/edk2/AppPkg/Applications/Python/Python-2.7.2/Tools/bgen/bgen/bgenHeapBuffer.py", "copies": "6", "size": "4346", "license": "apache-2.0", "hash": 2437928915075962400, "line_mean": 27.9724137931, "line_max": 90, "alpha_frac": 0.5947998159, "auto...
"""Buffers are character arrays that may contain null bytes. There are a number of variants depending on: - how the buffer is allocated (for output buffers), and - whether and how the size is passed into and/or out of the called function. """ from bgenType import Type, InputOnlyMixIn, OutputOnlyMixIn, InputOnlyType,...
{ "repo_name": "kerr-huang/SL4A", "path": "python/src/Tools/bgen/bgen/bgenBuffer.py", "copies": "44", "size": "8660", "license": "apache-2.0", "hash": -6233810512599106000, "line_mean": 27.7707641196, "line_max": 89, "alpha_frac": 0.6219399538, "autogenerated": false, "ratio": 3.900900900900901, ...
"""Buffers are character arrays that may contain null bytes. There are a number of variants depending on: - how the buffer is allocated (for output buffers), and - whether and how the size is passed into and/or out of the called function. """ from bgenType import Type, InputOnlyMixIn, OutputOnlyMixIn, InputO...
{ "repo_name": "google/google-ctf", "path": "third_party/edk2/AppPkg/Applications/Python/Python-2.7.2/Tools/bgen/bgen/bgenBuffer.py", "copies": "6", "size": "8961", "license": "apache-2.0", "hash": 6694558976356124000, "line_mean": 27.7707641196, "line_max": 89, "alpha_frac": 0.6010489901, "autogene...
"""Buffers for communication with high-level (cognitive) architectures, and possibly between modules. A buffer can generally contain a single object. Bidirectional buffers are special in that they keep two objects, one for *input* and one for *output*. The interpretation of input and output depend who *owns* the buffe...
{ "repo_name": "napratin/nap", "path": "nap/util/buffer.py", "copies": "1", "size": "2961", "license": "mit", "hash": -7500831171201754000, "line_mean": 29.5257731959, "line_max": 111, "alpha_frac": 0.6690307329, "autogenerated": false, "ratio": 3.642066420664207, "config_test": false, "has_no...
"""Buffet templating plugin and render functions The Buffet object is styled after the original Buffet module that implements template language neutral rendering for CherryPy. This version of Buffet also contains caching functionality that utilizes `Beaker middleware <http://beaker.groovie.org/>`_ to provide template...
{ "repo_name": "santisiri/popego", "path": "envs/ALPHA-POPEGO/lib/python2.5/site-packages/Pylons-0.9.6.1-py2.5.egg/pylons/templating.py", "copies": "1", "size": "15004", "license": "bsd-3-clause", "hash": 1788574667523804700, "line_mean": 39.3333333333, "line_max": 81, "alpha_frac": 0.5931751533, "a...
"""bufrdif.py - read in two bufr files, write out a third containing data that is unique in the 2nd file version 0.2: Jeff Whitaker 20190807 """ from __future__ import print_function import ncepbufr, sys, os, tempfile, hashlib, argparse from datetime import datetime, timedelta # Parse command line args ap = argparse....
{ "repo_name": "jswhit/py-ncepbufr", "path": "utils/bufrdif.py", "copies": "1", "size": "5336", "license": "isc", "hash": 709289299465729900, "line_mean": 37.9489051095, "line_max": 104, "alpha_frac": 0.6469265367, "autogenerated": false, "ratio": 2.9206349206349205, "config_test": false, "has...
BUF_SIZE = 1024 class FFIndexContent(object): def __init__(self, parent, start, length, name, encoding=None): self.parent = parent self.start = start self.pos = 0 self.length = length self.name = name self.mode = 'rb' self.encoding = encoding self.c...
{ "repo_name": "sseemayer/ffindex-python", "path": "ffindex/content.py", "copies": "1", "size": "3882", "license": "mit", "hash": -3669018194681563000, "line_mean": 22.8159509202, "line_max": 132, "alpha_frac": 0.5066975786, "autogenerated": false, "ratio": 4.2472647702407, "config_test": false,...
"""bug 1025987 - BIGINT is overkill Revision ID: 3e872b0759f0 Revises: 1f235c84eaed Create Date: 2014-06-17 09:52:29.095452 """ # revision identifiers, used by Alembic. revision = '3e872b0759f0' down_revision = '1f235c84eaed' from alembic import op from socorro.lib import citexttype, jsontype, buildtype from socorr...
{ "repo_name": "pcabido/socorro", "path": "alembic/versions/3e872b0759f0_bug_1025987_bigint_is_overkill.py", "copies": "14", "size": "1262", "license": "mpl-2.0", "hash": 692679826024077700, "line_mean": 28.3488372093, "line_max": 68, "alpha_frac": 0.6426307448, "autogenerated": false, "ratio": 3....
"""bug 1025987 - normalize correlations table Revision ID: 1f235c84eaed Revises: 3f007539efc Create Date: 2014-06-16 11:39:27.307789 """ # revision identifiers, used by Alembic. revision = '1f235c84eaed' down_revision = '3f007539efc' from alembic import op from socorro.lib import citexttype, jsontype, buildtype fro...
{ "repo_name": "AdrianGaudebert/socorro", "path": "alembic/versions/1f235c84eaed_bug_1025987_normalize_correlations_table.py", "copies": "14", "size": "1486", "license": "mpl-2.0", "hash": -6096909641499314000, "line_mean": 34.380952381, "line_max": 97, "alpha_frac": 0.7240915209, "autogenerated": f...
"""bug 1030218 - group correlations by reason Revision ID: 26521f842be2 Revises: 3e872b0759f0 Create Date: 2014-06-25 11:53:34.946160 """ # revision identifiers, used by Alembic. revision = '26521f842be2' down_revision = '3e872b0759f0' from alembic import op from socorro.lib import citexttype, jsontype, buildtype f...
{ "repo_name": "adngdb/socorro", "path": "alembic/versions/26521f842be2_bug_1030218_group_correlations_by_reason.py", "copies": "14", "size": "1458", "license": "mpl-2.0", "hash": -6402069181791769000, "line_mean": 37.3684210526, "line_max": 95, "alpha_frac": 0.6968449931, "autogenerated": false, ...
"""bug 1053632 - collapse raw_adi release channels Revision ID: 3e64019254d1 Revises: 3294c1805e91 Create Date: 2014-08-13 22:45:29.624480 """ # revision identifiers, used by Alembic. revision = '3e64019254d1' down_revision = '3294c1805e91' import datetime from alembic import op from socorro.lib import citexttype,...
{ "repo_name": "yglazko/socorro", "path": "alembic/versions/3e64019254d1_bug_1053632_collapse_raw_adi_release_.py", "copies": "13", "size": "2589", "license": "mpl-2.0", "hash": -2745019153868464600, "line_mean": 33.52, "line_max": 78, "alpha_frac": 0.461568173, "autogenerated": false, "ratio": 4....
"""bug 1255444 fix fennecandroid for new release repository Revision ID: 335c2bfd99a6 Revises: 9371b45451b Create Date: 2016-03-10 13:24:35.662063 """ # revision identifiers, used by Alembic. revision = '335c2bfd99a6' down_revision = '9371b45451b' from alembic import op from socorro.lib import citexttype, jsontype,...
{ "repo_name": "m8ttyB/socorro", "path": "alembic/versions/335c2bfd99a6_bug_1255444_fix_fennecandroid_for_new_.py", "copies": "3", "size": "3200", "license": "mpl-2.0", "hash": -7722230626151414000, "line_mean": 71.7272727273, "line_max": 245, "alpha_frac": 0.7421875, "autogenerated": false, "rati...
"""bug 1403172 fix fennecandroid api 16 Revision ID: 77856f165be7 Revises: a38b03765a79 Create Date: 2017-09-28 20:41:56.221487 """ # revision identifiers, used by Alembic. revision = '77856f165be7' down_revision = 'a38b03765a79' from alembic import op from socorro.lib import citexttype, jsontype, buildtype from so...
{ "repo_name": "Tayamarn/socorro", "path": "alembic/versions/77856f165be7_bug_1403172_fix_fennecandroid_api_16.py", "copies": "1", "size": "2733", "license": "mpl-2.0", "hash": -4000733785428985000, "line_mean": 36.9583333333, "line_max": 104, "alpha_frac": 0.68935236, "autogenerated": false, "rat...
# BUG 1 # By Andrew and Nick from livewires import games, color import random from Goal import * from Bug import * import math # Environmental inputs: # Am I bumping something? self.bumping boolean # Where is the goal? self.goal.x, self.goal.y # Choose a next move by returning deltas for x and y # Move ...
{ "repo_name": "nickpascucci/CP365_2011", "path": "src/bug/bug1.py", "copies": "1", "size": "3199", "license": "mit", "hash": 1134487205037872400, "line_mean": 25.4380165289, "line_max": 75, "alpha_frac": 0.6314473273, "autogenerated": false, "ratio": 2.7696969696969695, "config_test": false, ...
# BUG 2 # By Andrew and Nick from livewires import games, color import random from Goal import * from Bug import * import math # Environmental inputs: # Am I bumping something? self.bumping boolean # Where is the goal? self.goal.x, self.goal.y # Choose a next move by returning deltas for x and y # Move ...
{ "repo_name": "nickpascucci/CP365_2011", "path": "src/bug/bug2.py", "copies": "1", "size": "3353", "license": "mit", "hash": -1260478110563412700, "line_mean": 24.4015151515, "line_max": 75, "alpha_frac": 0.6269012824, "autogenerated": false, "ratio": 2.737142857142857, "config_test": false, ...
"""bug 803209 -- add garbage collection count to TCBS Revision ID: 2b285e76f71d Revises: 8894c185715 Create Date: 2013-06-11 12:46:09.637058 """ # revision identifiers, used by Alembic. revision = '2b285e76f71d' down_revision = '8894c185715' import os import sqlalchemy as sa from alembic import op from sqlalchemy.d...
{ "repo_name": "yglazko/socorro", "path": "alembic/versions/2b285e76f71d_bug_803209_add_garag.py", "copies": "16", "size": "1782", "license": "mpl-2.0", "hash": 691809937210444200, "line_mean": 25.5970149254, "line_max": 102, "alpha_frac": 0.6632996633, "autogenerated": false, "ratio": 3.205035971...