repo
stringlengths
7
54
path
stringlengths
4
223
func_name
stringlengths
1
134
original_string
stringlengths
75
104k
language
stringclasses
1 value
code
stringlengths
75
104k
code_tokens
listlengths
20
28.4k
docstring
stringlengths
1
46.3k
docstring_tokens
listlengths
1
1.66k
sha
stringlengths
40
40
url
stringlengths
87
315
partition
stringclasses
1 value
summary
stringlengths
4
350
obf_code
stringlengths
7.85k
764k
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/pympler/muppy.py
get_referents
def get_referents(object, level=1): """Get all referents of an object up to a certain level. The referents will not be returned in a specific order and will not contain duplicate objects. Duplicate objects will be removed. Keyword arguments: level -- level of indirection to which referents considered. This function is recursive. """ res = gc.get_referents(object) level -= 1 if level > 0: for o in res: res.extend(get_referents(o, level)) res = _remove_duplicates(res) return res
python
def get_referents(object, level=1): """Get all referents of an object up to a certain level. The referents will not be returned in a specific order and will not contain duplicate objects. Duplicate objects will be removed. Keyword arguments: level -- level of indirection to which referents considered. This function is recursive. """ res = gc.get_referents(object) level -= 1 if level > 0: for o in res: res.extend(get_referents(o, level)) res = _remove_duplicates(res) return res
[ "def", "get_referents", "(", "object", ",", "level", "=", "1", ")", ":", "res", "=", "gc", ".", "get_referents", "(", "object", ")", "level", "-=", "1", "if", "level", ">", "0", ":", "for", "o", "in", "res", ":", "res", ".", "extend", "(", "get_referents", "(", "o", ",", "level", ")", ")", "res", "=", "_remove_duplicates", "(", "res", ")", "return", "res" ]
Get all referents of an object up to a certain level. The referents will not be returned in a specific order and will not contain duplicate objects. Duplicate objects will be removed. Keyword arguments: level -- level of indirection to which referents considered. This function is recursive.
[ "Get", "all", "referents", "of", "an", "object", "up", "to", "a", "certain", "level", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/muppy.py#L136-L154
train
Get all referents of an object up to a certain level.
GiP5xwVCF98Z,B3LV8Eo811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ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(4354 - 4243) + chr(1909 - 1858) + '\x30' + chr(0b110111), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11101 + 0o25) + chr(0b110001) + chr(49), 0b1000), nzTpIcepk0o8(chr(2126 - 2078) + chr(6131 - 6020) + chr(0b110001) + '\066' + '\065', 15251 - 15243), nzTpIcepk0o8(chr(48) + '\157' + '\062' + '\060', 55942 - 55934), nzTpIcepk0o8(chr(0b110000 + 0o0) + '\x6f' + '\x32' + chr(0b110001) + chr(1507 - 1457), 41661 - 41653), nzTpIcepk0o8(chr(0b0 + 0o60) + '\157' + '\x31' + chr(49) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(476 - 428) + chr(111) + chr(0b100011 + 0o22) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\x6f' + chr(651 - 602) + chr(2801 - 2746) + chr(55), 60590 - 60582), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1100110 + 0o11) + chr(0b1110 + 0o43) + chr(1272 - 1224) + chr(0b10001 + 0o45), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + chr(0b110001 + 0o6) + chr(645 - 593), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(49) + chr(0b110000), 58745 - 58737), nzTpIcepk0o8(chr(0b11 + 0o55) + '\157' + chr(0b110010) + chr(746 - 694) + chr(2246 - 2198), 0b1000), nzTpIcepk0o8(chr(1874 - 1826) + chr(3384 - 3273) + chr(0b100110 + 0o13) + chr(1517 - 1463) + '\066', 4119 - 4111), nzTpIcepk0o8(chr(0b110000) + chr(0b0 + 0o157) + chr(0b100110 + 0o14) + chr(2713 - 2660) + chr(0b11000 + 0o34), 60945 - 60937), nzTpIcepk0o8(chr(1812 - 1764) + chr(0b101110 + 0o101) + chr(0b110110) + chr(0b100100 + 0o20), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1100000 + 0o17) + chr(1551 - 1500) + '\x37' + chr(2494 - 2439), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1010 + 0o145) + chr(50) + chr(52) + '\060', 8), nzTpIcepk0o8(chr(2056 - 2008) + '\x6f' + '\063' + '\065' + '\x34', 0o10), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + '\x32' + chr(0b110111) + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + chr(8487 - 8376) + chr(52) + '\x30', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + '\x33' + chr(55), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + '\061' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(7680 - 7569) + chr(0b10000 + 0o46) + chr(54), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(55), 0o10), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b10100 + 0o133) + chr(1378 - 1327) + chr(54) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b110 + 0o52) + '\157' + chr(0b110010) + '\x31' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1110 + 0o44) + chr(53) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\157' + '\061' + '\x30' + chr(0b100000 + 0o22), 0o10), nzTpIcepk0o8(chr(586 - 538) + chr(0b1101111) + chr(0b11111 + 0o24) + '\062' + chr(49), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\063' + '\063' + chr(0b100011 + 0o17), 6970 - 6962), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b101 + 0o55) + '\064' + chr(0b101100 + 0o13), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(0b110001) + chr(1425 - 1375), 0o10), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\157' + '\x31', 0o10), nzTpIcepk0o8(chr(1701 - 1653) + chr(111) + chr(0b110010) + chr(682 - 629) + chr(0b110100), 8), nzTpIcepk0o8('\060' + '\x6f' + '\062' + '\062' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b10100 + 0o133) + '\x31' + chr(2167 - 2117) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(286 - 238) + '\x6f' + '\x34' + chr(0b10011 + 0o37), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(55) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(420 - 372) + chr(6139 - 6028) + chr(55) + '\x36', 16977 - 16969), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + chr(1380 - 1327) + chr(966 - 912), 52989 - 52981)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b1010001 + 0o36) + '\x35' + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xe9'), chr(100) + '\145' + chr(0b1100000 + 0o3) + '\x6f' + '\144' + '\145')('\165' + chr(0b1110100) + chr(0b1000011 + 0o43) + chr(0b101101) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def LC7swroHJ3rz(mxgO6GAb3Xup, OHMe9lml54lU=nzTpIcepk0o8(chr(0b101010 + 0o6) + '\x6f' + '\061', 8)): _XdQFJpnzJor = OI_MaVbJ4aG_.get_referents(mxgO6GAb3Xup) OHMe9lml54lU -= nzTpIcepk0o8('\060' + chr(0b110110 + 0o71) + chr(0b101001 + 0o10), 8) if OHMe9lml54lU > nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b101010 + 0o6), 0b1000): for WgZUEOuIyTUO in _XdQFJpnzJor: roI3spqORKae(_XdQFJpnzJor, roI3spqORKae(ES5oEprVxulp(b'\x93\xd6F]\xe5)e(\x19\xfej\xd1'), '\x64' + '\x65' + '\143' + chr(0b1010 + 0o145) + chr(0b100101 + 0o77) + chr(0b10101 + 0o120))('\165' + '\x74' + chr(0b1100110) + chr(1353 - 1308) + chr(2434 - 2378)))(LC7swroHJ3rz(WgZUEOuIyTUO, OHMe9lml54lU)) _XdQFJpnzJor = CUXmihEeVlof(_XdQFJpnzJor) return _XdQFJpnzJor
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/pympler/muppy.py
_get_usage
def _get_usage(function, *args): """Test if more memory is used after the function has been called. The function will be invoked twice and only the second measurement will be considered. Thus, memory used in initialisation (e.g. loading modules) will not be included in the result. The goal is to identify memory leaks caused by functions which use more and more memory. Any arguments next to the function will be passed on to the function on invocation. Note that this function is currently experimental, because it is not tested thoroughly and performs poorly. """ # The usage of a function is calculated by creating one summary of all # objects before the function is invoked and afterwards. These summaries # are compared and the diff is returned. # This function works in a 2-steps process. Before the actual function is # invoked an empty dummy function is measurement to identify the overhead # involved in the measuring process. This overhead then is subtracted from # the measurement performed on the passed function. The result reflects the # actual usage of a function call. # Also, a measurement is performed twice, allowing the adjustment to # initializing things, e.g. modules res = None def _get_summaries(function, *args): """Get a 2-tuple containing one summary from before, and one summary from after the function has been invoked. """ s_before = summary.summarize(get_objects()) function(*args) s_after = summary.summarize(get_objects()) return (s_before, s_after) def _get_usage(function, *args): """Get the usage of a function call. This function is to be used only internally. The 'real' get_usage function is a wrapper around _get_usage, but the workload is done here. """ res = [] # init before calling (s_before, s_after) = _get_summaries(function, *args) # ignore all objects used for the measurement ignore = [] if s_before != s_after: ignore.append(s_before) for row in s_before: # ignore refs from summary and frame (loop) if len(gc.get_referrers(row)) == 2: ignore.append(row) for item in row: # ignore refs from summary and frame (loop) if len(gc.get_referrers(item)) == 2: ignore.append(item) for o in ignore: s_after = summary._subtract(s_after, o) res = summary.get_diff(s_before, s_after) return summary._sweep(res) # calibrate; twice for initialization def noop(): pass offset = _get_usage(noop) offset = _get_usage(noop) # perform operation twice to handle objects possibly used in # initialisation tmp = _get_usage(function, *args) tmp = _get_usage(function, *args) tmp = summary.get_diff(offset, tmp) tmp = summary._sweep(tmp) if len(tmp) != 0: res = tmp return res
python
def _get_usage(function, *args): """Test if more memory is used after the function has been called. The function will be invoked twice and only the second measurement will be considered. Thus, memory used in initialisation (e.g. loading modules) will not be included in the result. The goal is to identify memory leaks caused by functions which use more and more memory. Any arguments next to the function will be passed on to the function on invocation. Note that this function is currently experimental, because it is not tested thoroughly and performs poorly. """ # The usage of a function is calculated by creating one summary of all # objects before the function is invoked and afterwards. These summaries # are compared and the diff is returned. # This function works in a 2-steps process. Before the actual function is # invoked an empty dummy function is measurement to identify the overhead # involved in the measuring process. This overhead then is subtracted from # the measurement performed on the passed function. The result reflects the # actual usage of a function call. # Also, a measurement is performed twice, allowing the adjustment to # initializing things, e.g. modules res = None def _get_summaries(function, *args): """Get a 2-tuple containing one summary from before, and one summary from after the function has been invoked. """ s_before = summary.summarize(get_objects()) function(*args) s_after = summary.summarize(get_objects()) return (s_before, s_after) def _get_usage(function, *args): """Get the usage of a function call. This function is to be used only internally. The 'real' get_usage function is a wrapper around _get_usage, but the workload is done here. """ res = [] # init before calling (s_before, s_after) = _get_summaries(function, *args) # ignore all objects used for the measurement ignore = [] if s_before != s_after: ignore.append(s_before) for row in s_before: # ignore refs from summary and frame (loop) if len(gc.get_referrers(row)) == 2: ignore.append(row) for item in row: # ignore refs from summary and frame (loop) if len(gc.get_referrers(item)) == 2: ignore.append(item) for o in ignore: s_after = summary._subtract(s_after, o) res = summary.get_diff(s_before, s_after) return summary._sweep(res) # calibrate; twice for initialization def noop(): pass offset = _get_usage(noop) offset = _get_usage(noop) # perform operation twice to handle objects possibly used in # initialisation tmp = _get_usage(function, *args) tmp = _get_usage(function, *args) tmp = summary.get_diff(offset, tmp) tmp = summary._sweep(tmp) if len(tmp) != 0: res = tmp return res
[ "def", "_get_usage", "(", "function", ",", "*", "args", ")", ":", "# The usage of a function is calculated by creating one summary of all", "# objects before the function is invoked and afterwards. These summaries", "# are compared and the diff is returned.", "# This function works in a 2-steps process. Before the actual function is", "# invoked an empty dummy function is measurement to identify the overhead", "# involved in the measuring process. This overhead then is subtracted from", "# the measurement performed on the passed function. The result reflects the", "# actual usage of a function call.", "# Also, a measurement is performed twice, allowing the adjustment to", "# initializing things, e.g. modules", "res", "=", "None", "def", "_get_summaries", "(", "function", ",", "*", "args", ")", ":", "\"\"\"Get a 2-tuple containing one summary from before, and one summary\n from after the function has been invoked.\n\n \"\"\"", "s_before", "=", "summary", ".", "summarize", "(", "get_objects", "(", ")", ")", "function", "(", "*", "args", ")", "s_after", "=", "summary", ".", "summarize", "(", "get_objects", "(", ")", ")", "return", "(", "s_before", ",", "s_after", ")", "def", "_get_usage", "(", "function", ",", "*", "args", ")", ":", "\"\"\"Get the usage of a function call.\n This function is to be used only internally. The 'real' get_usage\n function is a wrapper around _get_usage, but the workload is done\n here.\n\n \"\"\"", "res", "=", "[", "]", "# init before calling", "(", "s_before", ",", "s_after", ")", "=", "_get_summaries", "(", "function", ",", "*", "args", ")", "# ignore all objects used for the measurement", "ignore", "=", "[", "]", "if", "s_before", "!=", "s_after", ":", "ignore", ".", "append", "(", "s_before", ")", "for", "row", "in", "s_before", ":", "# ignore refs from summary and frame (loop)", "if", "len", "(", "gc", ".", "get_referrers", "(", "row", ")", ")", "==", "2", ":", "ignore", ".", "append", "(", "row", ")", "for", "item", "in", "row", ":", "# ignore refs from summary and frame (loop)", "if", "len", "(", "gc", ".", "get_referrers", "(", "item", ")", ")", "==", "2", ":", "ignore", ".", "append", "(", "item", ")", "for", "o", "in", "ignore", ":", "s_after", "=", "summary", ".", "_subtract", "(", "s_after", ",", "o", ")", "res", "=", "summary", ".", "get_diff", "(", "s_before", ",", "s_after", ")", "return", "summary", ".", "_sweep", "(", "res", ")", "# calibrate; twice for initialization", "def", "noop", "(", ")", ":", "pass", "offset", "=", "_get_usage", "(", "noop", ")", "offset", "=", "_get_usage", "(", "noop", ")", "# perform operation twice to handle objects possibly used in", "# initialisation", "tmp", "=", "_get_usage", "(", "function", ",", "*", "args", ")", "tmp", "=", "_get_usage", "(", "function", ",", "*", "args", ")", "tmp", "=", "summary", ".", "get_diff", "(", "offset", ",", "tmp", ")", "tmp", "=", "summary", ".", "_sweep", "(", "tmp", ")", "if", "len", "(", "tmp", ")", "!=", "0", ":", "res", "=", "tmp", "return", "res" ]
Test if more memory is used after the function has been called. The function will be invoked twice and only the second measurement will be considered. Thus, memory used in initialisation (e.g. loading modules) will not be included in the result. The goal is to identify memory leaks caused by functions which use more and more memory. Any arguments next to the function will be passed on to the function on invocation. Note that this function is currently experimental, because it is not tested thoroughly and performs poorly.
[ "Test", "if", "more", "memory", "is", "used", "after", "the", "function", "has", "been", "called", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/muppy.py#L156-L233
train
This function is used only internally. It is used by the real get_usage function.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1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6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(278 - 230) + '\157' + '\x32' + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + '\062' + '\064', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + '\x32', 0o10), nzTpIcepk0o8('\x30' + chr(0b11100 + 0o123) + '\063' + chr(52) + chr(1537 - 1483), ord("\x08")), nzTpIcepk0o8(chr(727 - 679) + chr(0b1100111 + 0o10) + chr(0b1100 + 0o47) + '\060' + chr(0b110010), 0b1000), nzTpIcepk0o8('\060' + chr(3017 - 2906) + chr(0b1111 + 0o45) + chr(0b110011), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1001110 + 0o41) + chr(0b110011) + chr(0b101011 + 0o5) + '\062', 8), nzTpIcepk0o8('\x30' + chr(111) + chr(0b10000 + 0o42) + '\062' + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10100 + 0o41) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(0b10101 + 0o132) + chr(657 - 605) + chr(1174 - 1119), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(49) + chr(645 - 593) + '\x30', 0o10), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(111) + chr(0b110111) + chr(0b10000 + 0o46), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1001110 + 0o41) + '\061' + '\x31' + chr(2669 - 2616), 7661 - 7653), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b1101111) + chr(0b101100 + 0o5) + chr(2495 - 2443) + chr(2287 - 2238), 0b1000), nzTpIcepk0o8(chr(2212 - 2164) + chr(111) + chr(51) + chr(235 - 180) + chr(2211 - 2160), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\061' + chr(2915 - 2861) + '\067', 45003 - 44995), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(54) + chr(48), 17516 - 17508), nzTpIcepk0o8(chr(1195 - 1147) + chr(5816 - 5705) + chr(0b110010) + chr(1037 - 987) + chr(0b110110), 8), nzTpIcepk0o8('\060' + chr(111) + chr(51) + '\x37' + chr(2262 - 2208), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + chr(1606 - 1557) + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + chr(50) + chr(0b110011 + 0o3), 0o10), nzTpIcepk0o8(chr(0b100 + 0o54) + '\157' + chr(0b101001 + 0o13) + chr(50), 39909 - 39901), nzTpIcepk0o8('\060' + '\x6f' + '\063' + chr(106 - 51) + '\x34', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(71 - 21) + chr(53) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(111) + chr(173 - 123) + chr(0b110101) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(2403 - 2292) + chr(0b1111 + 0o43) + '\067' + chr(51), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\062' + chr(53) + '\x35', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(745 - 692) + chr(1391 - 1343), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101001 + 0o6) + chr(0b10011 + 0o40) + '\x35' + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\x6f' + '\061' + '\x30' + '\x35', 7486 - 7478), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1101111) + '\x33' + chr(0b110110) + chr(1775 - 1721), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + '\066', 63978 - 63970), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + chr(1228 - 1173) + chr(0b1110 + 0o43), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + '\x35' + '\065', 8), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b11 + 0o154) + chr(0b110011) + chr(594 - 542) + '\x36', 8), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(111) + '\x31' + chr(51) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + chr(0b110000) + chr(0b1010 + 0o51), 33453 - 33445), nzTpIcepk0o8(chr(0b110000) + chr(0b111 + 0o150) + chr(0b1111 + 0o44) + chr(0b100101 + 0o20) + chr(0b10011 + 0o44), ord("\x08")), nzTpIcepk0o8(chr(729 - 681) + chr(0b1001000 + 0o47) + chr(51) + chr(777 - 725) + '\062', 21408 - 21400)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\157' + chr(53) + '\060', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'9'), chr(100) + chr(0b1011010 + 0o13) + chr(0b1100011) + chr(0b1101111) + chr(5728 - 5628) + chr(101))(chr(0b1001110 + 0o47) + chr(0b1110100) + '\x66' + '\x2d' + chr(2713 - 2657)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def kkxaZ9nMm8fK(FGXEL9Pjw9PS, *eemPYp2vtTSr): _XdQFJpnzJor = None def T2nO53ktu93l(FGXEL9Pjw9PS, *eemPYp2vtTSr): Ot0rxAY3t8eI = QEXp0HPqz7Se.summarize(gNSJQwtugw72()) FGXEL9Pjw9PS(*eemPYp2vtTSr) WFR6Jk7hONuB = QEXp0HPqz7Se.summarize(gNSJQwtugw72()) return (Ot0rxAY3t8eI, WFR6Jk7hONuB) def kkxaZ9nMm8fK(FGXEL9Pjw9PS, *eemPYp2vtTSr): _XdQFJpnzJor = [] (Ot0rxAY3t8eI, WFR6Jk7hONuB) = T2nO53ktu93l(FGXEL9Pjw9PS, *eemPYp2vtTSr) NTpppS5XYPvK = [] if Ot0rxAY3t8eI != WFR6Jk7hONuB: roI3spqORKae(NTpppS5XYPvK, roI3spqORKae(ES5oEprVxulp(b'_\x80Y\xd2\xbaD\x85\xf9CH5\x0b'), chr(0b1100100) + '\145' + chr(7039 - 6940) + chr(111) + '\x64' + '\x65')(chr(117) + chr(116) + chr(0b1100110) + '\055' + '\070'))(Ot0rxAY3t8eI) for o6UWUO21mH25 in Ot0rxAY3t8eI: if ftfygxgFas5X(roI3spqORKae(OI_MaVbJ4aG_, roI3spqORKae(ES5oEprVxulp(b'p\xb1~\xb9\xb0F\xa4\xf3[U\x05L>'), chr(100) + chr(101) + '\143' + chr(111) + chr(0b10100 + 0o120) + chr(2749 - 2648))('\165' + '\164' + chr(4529 - 4427) + chr(45) + chr(56)))(o6UWUO21mH25)) == nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1101111) + chr(0b1 + 0o61), ord("\x08")): roI3spqORKae(NTpppS5XYPvK, roI3spqORKae(ES5oEprVxulp(b'_\x80Y\xd2\xbaD\x85\xf9CH5\x0b'), chr(0b101101 + 0o67) + chr(101) + chr(2887 - 2788) + chr(0b1001100 + 0o43) + chr(2395 - 2295) + chr(380 - 279))(chr(117) + chr(0b1110100) + chr(102) + chr(0b101000 + 0o5) + chr(0b111 + 0o61)))(o6UWUO21mH25) for IZ1I2J8X1CQz in o6UWUO21mH25: if ftfygxgFas5X(roI3spqORKae(OI_MaVbJ4aG_, roI3spqORKae(ES5oEprVxulp(b'p\xb1~\xb9\xb0F\xa4\xf3[U\x05L>'), chr(0b110000 + 0o64) + chr(0b1100101) + '\x63' + chr(3595 - 3484) + chr(0b1100100) + chr(101))(chr(117) + chr(0b1110100) + chr(102) + chr(1579 - 1534) + chr(56)))(IZ1I2J8X1CQz)) == nzTpIcepk0o8(chr(48) + '\157' + chr(1915 - 1865), 8): roI3spqORKae(NTpppS5XYPvK, roI3spqORKae(ES5oEprVxulp(b'_\x80Y\xd2\xbaD\x85\xf9CH5\x0b'), chr(4882 - 4782) + '\145' + chr(159 - 60) + '\x6f' + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + '\055' + chr(0b11101 + 0o33)))(IZ1I2J8X1CQz) for WgZUEOuIyTUO in NTpppS5XYPvK: WFR6Jk7hONuB = QEXp0HPqz7Se._subtract(WFR6Jk7hONuB, WgZUEOuIyTUO) _XdQFJpnzJor = QEXp0HPqz7Se.XZErZR_om10z(Ot0rxAY3t8eI, WFR6Jk7hONuB) return roI3spqORKae(QEXp0HPqz7Se, roI3spqORKae(ES5oEprVxulp(b'H\xa7}\x83\xa7S'), '\144' + chr(0b11001 + 0o114) + chr(99) + chr(9277 - 9166) + '\144' + chr(0b1101 + 0o130))(chr(117) + chr(0b10011 + 0o141) + chr(0b1100110) + chr(45) + chr(2167 - 2111)))(_XdQFJpnzJor) def r5FejPTiA8To(): pass GuX46MBAOnaQ = kkxaZ9nMm8fK(r5FejPTiA8To) GuX46MBAOnaQ = kkxaZ9nMm8fK(r5FejPTiA8To) PT32xG247TS3 = kkxaZ9nMm8fK(FGXEL9Pjw9PS, *eemPYp2vtTSr) PT32xG247TS3 = kkxaZ9nMm8fK(FGXEL9Pjw9PS, *eemPYp2vtTSr) PT32xG247TS3 = QEXp0HPqz7Se.XZErZR_om10z(GuX46MBAOnaQ, PT32xG247TS3) PT32xG247TS3 = QEXp0HPqz7Se._sweep(PT32xG247TS3) if ftfygxgFas5X(PT32xG247TS3) != nzTpIcepk0o8(chr(0b101100 + 0o4) + '\157' + chr(1543 - 1495), 0o10): _XdQFJpnzJor = PT32xG247TS3 return _XdQFJpnzJor
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/pympler/muppy.py
_remove_duplicates
def _remove_duplicates(objects): """Remove duplicate objects. Inspired by http://www.peterbe.com/plog/uniqifiers-benchmark """ seen = {} result = [] for item in objects: marker = id(item) if marker in seen: continue seen[marker] = 1 result.append(item) return result
python
def _remove_duplicates(objects): """Remove duplicate objects. Inspired by http://www.peterbe.com/plog/uniqifiers-benchmark """ seen = {} result = [] for item in objects: marker = id(item) if marker in seen: continue seen[marker] = 1 result.append(item) return result
[ "def", "_remove_duplicates", "(", "objects", ")", ":", "seen", "=", "{", "}", "result", "=", "[", "]", "for", "item", "in", "objects", ":", "marker", "=", "id", "(", "item", ")", "if", "marker", "in", "seen", ":", "continue", "seen", "[", "marker", "]", "=", "1", "result", ".", "append", "(", "item", ")", "return", "result" ]
Remove duplicate objects. Inspired by http://www.peterbe.com/plog/uniqifiers-benchmark
[ "Remove", "duplicate", "objects", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/muppy.py#L242-L256
train
Remove duplicate objects.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,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qIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1958 - 1907) + '\x32' + chr(1075 - 1023), 13398 - 13390), nzTpIcepk0o8(chr(48) + chr(9757 - 9646) + '\062' + chr(0b110111) + chr(50), 34183 - 34175), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(3120 - 3009) + chr(51) + chr(0b110100) + chr(0b110110 + 0o1), 15581 - 15573), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\157' + chr(1729 - 1680) + '\063' + chr(0b100100 + 0o17), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010 + 0o0) + chr(1007 - 953) + chr(1557 - 1503), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + '\x33', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100001 + 0o16) + chr(0b1111 + 0o43) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2112 - 2059) + '\066', ord("\x08")), nzTpIcepk0o8(chr(1316 - 1268) + '\x6f' + chr(53) + chr(1285 - 1232), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(509 - 460) + '\062' + '\x37', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1011110 + 0o21) + '\x32' + chr(0b10111 + 0o34), 55179 - 55171), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1466 - 1416) + '\x37' + chr(534 - 484), 8), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + chr(0b110100 + 0o0) + '\x37', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b10010 + 0o135) + chr(0b110001) + '\x35' + chr(1837 - 1784), 0b1000), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1001 + 0o146) + '\067' + '\067', 45290 - 45282), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1413 - 1362) + chr(0b101101 + 0o11) + chr(1240 - 1189), 48314 - 48306), nzTpIcepk0o8('\060' + '\157' + chr(1661 - 1610) + '\066' + '\067', 12190 - 12182), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2181 - 2126) + chr(49), 0b1000), nzTpIcepk0o8('\060' + chr(0b1011100 + 0o23) + chr(1847 - 1797) + chr(0b110111), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + chr(0b110011) + chr(51), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(1386 - 1335) + '\062' + chr(1821 - 1770), 52335 - 52327), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(54) + chr(50), 29507 - 29499), nzTpIcepk0o8('\x30' + chr(0b111001 + 0o66) + chr(0b110011) + '\x30', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + '\x36' + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + '\x33' + chr(928 - 874), 0o10), nzTpIcepk0o8(chr(1629 - 1581) + chr(111) + chr(0b1000 + 0o51), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b100011 + 0o21) + '\064', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(503 - 449) + chr(1845 - 1795), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + chr(0b110110) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1001101 + 0o42) + '\x32' + chr(0b110110) + chr(2520 - 2469), 53923 - 53915), nzTpIcepk0o8(chr(0b10110 + 0o32) + '\x6f' + '\x31' + '\060' + chr(0b11011 + 0o34), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + chr(0b110111), 8), nzTpIcepk0o8('\x30' + chr(0b1100000 + 0o17) + chr(164 - 114) + '\x33', 8), nzTpIcepk0o8(chr(0b11001 + 0o27) + '\x6f' + chr(0b110010) + chr(0b10100 + 0o35) + '\x37', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(1841 - 1792) + '\x37' + chr(50), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(53) + chr(51), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + '\x33' + chr(53), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b101 + 0o152) + chr(2061 - 2011) + chr(0b101101 + 0o12) + '\066', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + chr(0b100000 + 0o26) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(2272 - 2224) + chr(0b1100000 + 0o17) + chr(50) + chr(0b110001) + chr(342 - 291), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\x6f' + '\x35' + chr(0b100001 + 0o17), 48483 - 48475)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xfa'), chr(100) + '\145' + '\143' + '\157' + '\x64' + chr(0b1011110 + 0o7))(chr(0b1001 + 0o154) + chr(116) + '\x66' + chr(1449 - 1404) + chr(114 - 58)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def CUXmihEeVlof(unFw4B5pa4XN): Exa2os6rsBY0 = {} POx95m7SPOVy = [] for IZ1I2J8X1CQz in unFw4B5pa4XN: uic71ZuNaAED = maLnLg8O5zPT(IZ1I2J8X1CQz) if uic71ZuNaAED in Exa2os6rsBY0: continue Exa2os6rsBY0[uic71ZuNaAED] = nzTpIcepk0o8('\060' + '\x6f' + chr(49), 8) roI3spqORKae(POx95m7SPOVy, roI3spqORKae(ES5oEprVxulp(b'\x9c\xee\xb4o\xce|WAG8F\x8f'), chr(3223 - 3123) + chr(0b10011 + 0o122) + '\143' + chr(1086 - 975) + '\144' + '\145')(chr(0b1011110 + 0o27) + '\x74' + chr(0b101001 + 0o75) + '\x2d' + chr(0b111000)))(IZ1I2J8X1CQz) return POx95m7SPOVy
lrq3000/pyFileFixity
pyFileFixity/lib/gooey/gui/action_sorter.py
ActionSorter.get_optionals_without_choices
def get_optionals_without_choices(self, actions): """ All actions which are: (a) Optional, but without required choices (b) Not of a "boolean" type (storeTrue, etc..) (c) Of type _AppendAction e.g. anything which has an argument style like: >>> -f myfilename.txt """ boolean_actions = ( _StoreConstAction, _StoreFalseAction, _StoreTrueAction ) return [action for action in actions if action.option_strings and not action.choices and not isinstance(action, _CountAction) and not isinstance(action, _HelpAction) and type(action) not in boolean_actions]
python
def get_optionals_without_choices(self, actions): """ All actions which are: (a) Optional, but without required choices (b) Not of a "boolean" type (storeTrue, etc..) (c) Of type _AppendAction e.g. anything which has an argument style like: >>> -f myfilename.txt """ boolean_actions = ( _StoreConstAction, _StoreFalseAction, _StoreTrueAction ) return [action for action in actions if action.option_strings and not action.choices and not isinstance(action, _CountAction) and not isinstance(action, _HelpAction) and type(action) not in boolean_actions]
[ "def", "get_optionals_without_choices", "(", "self", ",", "actions", ")", ":", "boolean_actions", "=", "(", "_StoreConstAction", ",", "_StoreFalseAction", ",", "_StoreTrueAction", ")", "return", "[", "action", "for", "action", "in", "actions", "if", "action", ".", "option_strings", "and", "not", "action", ".", "choices", "and", "not", "isinstance", "(", "action", ",", "_CountAction", ")", "and", "not", "isinstance", "(", "action", ",", "_HelpAction", ")", "and", "type", "(", "action", ")", "not", "in", "boolean_actions", "]" ]
All actions which are: (a) Optional, but without required choices (b) Not of a "boolean" type (storeTrue, etc..) (c) Of type _AppendAction e.g. anything which has an argument style like: >>> -f myfilename.txt
[ "All", "actions", "which", "are", ":", "(", "a", ")", "Optional", "but", "without", "required", "choices", "(", "b", ")", "Not", "of", "a", "boolean", "type", "(", "storeTrue", "etc", "..", ")", "(", "c", ")", "Of", "type", "_AppendAction" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/gooey/gui/action_sorter.py#L91-L111
train
Returns a list of all actions which are not optional but without required choices.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq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Ca7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + '\x6f' + chr(0b0 + 0o62) + chr(0b110101) + chr(0b100001 + 0o26), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110101) + '\x37', 59785 - 59777), nzTpIcepk0o8('\x30' + '\157' + chr(2115 - 2065) + '\063' + chr(54), 0o10), nzTpIcepk0o8('\060' + chr(0b1100100 + 0o13) + chr(0b10100 + 0o36) + chr(0b100010 + 0o25) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2066 - 2017) + chr(2215 - 2162), 0b1000), nzTpIcepk0o8(chr(231 - 183) + '\157' + chr(50) + chr(0b100001 + 0o25) + chr(675 - 620), 1146 - 1138), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b101000 + 0o12) + chr(0b110110) + chr(907 - 854), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(2329 - 2280) + chr(51) + '\064', 0o10), nzTpIcepk0o8(chr(1647 - 1599) + chr(0b10 + 0o155) + chr(1962 - 1907) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(1965 - 1917) + chr(0b10 + 0o155) + '\062' + '\067' + '\060', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\063' + chr(0b110010) + chr(49), 0b1000), nzTpIcepk0o8(chr(472 - 424) + chr(111) + '\x33' + chr(0b101111 + 0o10) + chr(1225 - 1175), 17018 - 17010), nzTpIcepk0o8(chr(48) + '\157' + '\062' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + '\x31' + chr(0b110000), 31065 - 31057), nzTpIcepk0o8(chr(539 - 491) + '\157' + chr(51) + '\x30' + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + '\x35', 0b1000), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(8134 - 8023) + chr(51) + chr(2087 - 2037) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\157' + '\067' + '\065', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(51) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(800 - 752) + chr(0b1101111) + chr(303 - 254) + chr(53) + chr(0b10 + 0o60), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b101010 + 0o12) + chr(1766 - 1711), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\062' + '\061' + chr(761 - 710), 0b1000), nzTpIcepk0o8(chr(0b0 + 0o60) + '\x6f' + chr(51) + chr(436 - 382) + chr(752 - 703), 30267 - 30259), nzTpIcepk0o8('\060' + chr(12221 - 12110) + '\063' + chr(1387 - 1339) + chr(0b11100 + 0o26), 11305 - 11297), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(3008 - 2897) + chr(935 - 886) + chr(51) + chr(0b110100), 8), nzTpIcepk0o8('\x30' + '\157' + '\062' + '\x36' + chr(0b110101), 8), nzTpIcepk0o8('\060' + '\x6f' + chr(1601 - 1551) + chr(0b100101 + 0o21) + chr(48), 32955 - 32947), nzTpIcepk0o8(chr(1653 - 1605) + chr(111) + '\062' + chr(2017 - 1967) + '\x36', ord("\x08")), nzTpIcepk0o8('\x30' + chr(2597 - 2486) + chr(49) + chr(0b110000 + 0o0) + chr(0b100001 + 0o26), 22410 - 22402), nzTpIcepk0o8(chr(810 - 762) + chr(0b1101111) + chr(0b110010) + '\x33' + chr(1853 - 1799), 8), nzTpIcepk0o8(chr(0b110000) + chr(3327 - 3216) + chr(0b110011) + '\063', 0b1000), nzTpIcepk0o8(chr(1922 - 1874) + chr(6971 - 6860) + chr(460 - 410) + chr(51) + chr(53), 8235 - 8227), nzTpIcepk0o8(chr(848 - 800) + '\157' + chr(0b110001) + chr(50) + '\x37', 10018 - 10010), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x33' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(2181 - 2133) + '\157' + '\x33' + chr(54) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(2230 - 2180) + chr(52) + chr(485 - 431), 0b1000), nzTpIcepk0o8(chr(1881 - 1833) + chr(5811 - 5700) + '\x31' + chr(0b110111) + '\064', 30659 - 30651), nzTpIcepk0o8(chr(1490 - 1442) + chr(111) + chr(0b110010) + '\x37' + chr(1854 - 1800), 37617 - 37609), nzTpIcepk0o8('\060' + chr(187 - 76) + '\x32' + chr(0b11010 + 0o27) + chr(0b100001 + 0o17), 0b1000), nzTpIcepk0o8(chr(48) + chr(5832 - 5721) + chr(0b110011) + chr(0b110100) + chr(49), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(111) + chr(0b110101) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x81'), '\144' + chr(0b1100101) + chr(0b1100011) + '\157' + chr(3579 - 3479) + chr(0b1100101))(chr(8843 - 8726) + chr(13425 - 13309) + chr(0b1100110) + '\x2d' + chr(0b100111 + 0o21)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def dKGB_D8bRjTr(hXMPsSrOQzbh, D4jR2wOica_L): GLrEIRZcriOt = (r77m5kqjrLu0, a1OKib2z6_ZD, tv12s0ilVxz6) return [iMfNCng1AEjw for iMfNCng1AEjw in D4jR2wOica_L if roI3spqORKae(iMfNCng1AEjw, roI3spqORKae(ES5oEprVxulp(b'\xc0_\xea\xd0b\xd9\xea/N\xca\xb8\x94t;'), '\x64' + chr(101) + chr(0b1100011) + '\x6f' + chr(5778 - 5678) + chr(0b111101 + 0o50))(chr(480 - 363) + '\x74' + chr(8339 - 8237) + chr(0b101101) + '\x38')) and (not roI3spqORKae(iMfNCng1AEjw, roI3spqORKae(ES5oEprVxulp(b'\xce\\\xfa\xf65\xdb\xf9>I\xc0\x94\xc3'), chr(4485 - 4385) + chr(101) + chr(0b1010111 + 0o14) + chr(5960 - 5849) + '\x64' + chr(0b11110 + 0o107))('\x75' + chr(0b111101 + 0o67) + '\146' + '\055' + chr(0b111000 + 0o0)))) and (not suIjIS24Zkqw(iMfNCng1AEjw, uZMSAKOQcM6E)) and (not suIjIS24Zkqw(iMfNCng1AEjw, zV1UFPNU_lWN)) and (MJ07XsN5uFgW(iMfNCng1AEjw) not in GLrEIRZcriOt)]
lrq3000/pyFileFixity
pyFileFixity/lib/gooey/gui/action_sorter.py
ActionSorter.get_flag_style_optionals
def get_flag_style_optionals(self, actions): """ Gets all instances of "flag" type options. i.e. options which either store a const, or store boolean style options (e.g. StoreTrue). Types: _StoreTrueAction _StoreFalseAction _StoreConst """ return [action for action in actions if isinstance(action, _StoreTrueAction) or isinstance(action, _StoreFalseAction) or isinstance(action, _StoreConstAction)]
python
def get_flag_style_optionals(self, actions): """ Gets all instances of "flag" type options. i.e. options which either store a const, or store boolean style options (e.g. StoreTrue). Types: _StoreTrueAction _StoreFalseAction _StoreConst """ return [action for action in actions if isinstance(action, _StoreTrueAction) or isinstance(action, _StoreFalseAction) or isinstance(action, _StoreConstAction)]
[ "def", "get_flag_style_optionals", "(", "self", ",", "actions", ")", ":", "return", "[", "action", "for", "action", "in", "actions", "if", "isinstance", "(", "action", ",", "_StoreTrueAction", ")", "or", "isinstance", "(", "action", ",", "_StoreFalseAction", ")", "or", "isinstance", "(", "action", ",", "_StoreConstAction", ")", "]" ]
Gets all instances of "flag" type options. i.e. options which either store a const, or store boolean style options (e.g. StoreTrue). Types: _StoreTrueAction _StoreFalseAction _StoreConst
[ "Gets", "all", "instances", "of", "flag", "type", "options", ".", "i", ".", "e", ".", "options", "which", "either", "store", "a", "const", "or", "store", "boolean", "style", "options", "(", "e", ".", "g", ".", "StoreTrue", ")", ".", "Types", ":", "_StoreTrueAction", "_StoreFalseAction", "_StoreConst" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/gooey/gui/action_sorter.py#L122-L136
train
Returns all instances of flag type options.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E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kv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(111) + chr(0b1 + 0o57), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + chr(51) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1101111) + chr(1308 - 1259) + chr(0b100 + 0o63) + chr(1243 - 1191), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(54) + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(8848 - 8737) + chr(49) + chr(48) + chr(0b1 + 0o65), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b11 + 0o57) + '\x31' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + chr(52) + chr(51), 0b1000), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b111110 + 0o61) + '\x37' + chr(0b10111 + 0o32), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(457 - 403) + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100101 + 0o112) + chr(0b110001 + 0o2) + '\065' + '\x34', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(51) + '\067', 3670 - 3662), nzTpIcepk0o8(chr(1156 - 1108) + '\x6f' + chr(0b110011) + chr(0b110000), 27332 - 27324), nzTpIcepk0o8(chr(48) + chr(0b1011101 + 0o22) + chr(0b110011) + chr(49) + chr(1989 - 1938), 0b1000), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(1089 - 978) + chr(53) + '\065', 24449 - 24441), nzTpIcepk0o8('\x30' + chr(0b101011 + 0o104) + '\x31' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(1495 - 1384) + chr(1042 - 991) + chr(0b10100 + 0o42) + chr(51), 0b1000), nzTpIcepk0o8(chr(0b10 + 0o56) + '\x6f' + chr(51) + chr(692 - 638), ord("\x08")), nzTpIcepk0o8(chr(768 - 720) + chr(0b1000 + 0o147) + chr(2355 - 2306) + chr(54) + '\062', 12717 - 12709), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + '\x36' + chr(52), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\062' + chr(1423 - 1374) + chr(618 - 570), 0b1000), nzTpIcepk0o8(chr(48) + chr(4275 - 4164) + '\x31' + chr(2654 - 2600) + chr(1126 - 1078), 20539 - 20531), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + chr(851 - 797) + '\x31', 4175 - 4167), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\x6f' + '\061' + chr(50) + chr(1009 - 956), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(52) + chr(263 - 214), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10011 + 0o36) + '\x35' + chr(0b100010 + 0o17), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\062' + '\067' + chr(50), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + chr(49) + chr(621 - 570), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b110011 + 0o74) + chr(49) + chr(2637 - 2582) + '\x36', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10110 + 0o34) + chr(979 - 931) + chr(0b110011), 7503 - 7495), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + chr(48) + '\067', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b110101 + 0o72) + '\062' + chr(0b110111) + '\x33', 0b1000), nzTpIcepk0o8(chr(148 - 100) + chr(0b1101111) + '\x32' + chr(55) + chr(52), 0o10), nzTpIcepk0o8(chr(624 - 576) + chr(0b1101111) + '\x33' + '\066' + chr(52), 8), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(9954 - 9843) + chr(0b110000 + 0o3) + chr(53) + chr(0b101110 + 0o2), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x31' + chr(1546 - 1496) + chr(0b10111 + 0o36), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1001010 + 0o45) + chr(88 - 37) + chr(52) + '\061', ord("\x08")), nzTpIcepk0o8(chr(1738 - 1690) + chr(0b1101111) + chr(331 - 280) + '\x30' + '\x34', 15071 - 15063), nzTpIcepk0o8('\x30' + '\x6f' + chr(1460 - 1410) + chr(0b101100 + 0o7) + chr(52), 0b1000), nzTpIcepk0o8(chr(2185 - 2137) + chr(10887 - 10776) + '\x32' + chr(839 - 789) + chr(1367 - 1313), 0o10), nzTpIcepk0o8(chr(2255 - 2207) + chr(0b1101111) + chr(2401 - 2351) + chr(0b101110 + 0o10) + chr(48), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(111) + chr(0b110101) + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'.'), chr(0b1000111 + 0o35) + '\x65' + '\x63' + '\x6f' + '\x64' + '\x65')(chr(117) + chr(10403 - 10287) + '\146' + '\x2d' + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def jGTMHGzo31LF(hXMPsSrOQzbh, D4jR2wOica_L): return [iMfNCng1AEjw for iMfNCng1AEjw in D4jR2wOica_L if suIjIS24Zkqw(iMfNCng1AEjw, tv12s0ilVxz6) or suIjIS24Zkqw(iMfNCng1AEjw, a1OKib2z6_ZD) or suIjIS24Zkqw(iMfNCng1AEjw, r77m5kqjrLu0)]
lrq3000/pyFileFixity
pyFileFixity/lib/gooey/gui/imageutil.py
resize_bitmap
def resize_bitmap(parent, _bitmap, target_height): ''' Resizes a bitmap to a height of 89 pixels (the size of the top panel), while keeping aspect ratio in tact ''' image = wx.ImageFromBitmap(_bitmap) _width, _height = image.GetSize() if _height < target_height: return wx.StaticBitmap(parent, -1, wx.BitmapFromImage(image)) ratio = float(_width) / _height image = image.Scale(target_height * ratio, target_height, wx.IMAGE_QUALITY_HIGH) return wx.StaticBitmap(parent, -1, wx.BitmapFromImage(image))
python
def resize_bitmap(parent, _bitmap, target_height): ''' Resizes a bitmap to a height of 89 pixels (the size of the top panel), while keeping aspect ratio in tact ''' image = wx.ImageFromBitmap(_bitmap) _width, _height = image.GetSize() if _height < target_height: return wx.StaticBitmap(parent, -1, wx.BitmapFromImage(image)) ratio = float(_width) / _height image = image.Scale(target_height * ratio, target_height, wx.IMAGE_QUALITY_HIGH) return wx.StaticBitmap(parent, -1, wx.BitmapFromImage(image))
[ "def", "resize_bitmap", "(", "parent", ",", "_bitmap", ",", "target_height", ")", ":", "image", "=", "wx", ".", "ImageFromBitmap", "(", "_bitmap", ")", "_width", ",", "_height", "=", "image", ".", "GetSize", "(", ")", "if", "_height", "<", "target_height", ":", "return", "wx", ".", "StaticBitmap", "(", "parent", ",", "-", "1", ",", "wx", ".", "BitmapFromImage", "(", "image", ")", ")", "ratio", "=", "float", "(", "_width", ")", "/", "_height", "image", "=", "image", ".", "Scale", "(", "target_height", "*", "ratio", ",", "target_height", ",", "wx", ".", "IMAGE_QUALITY_HIGH", ")", "return", "wx", ".", "StaticBitmap", "(", "parent", ",", "-", "1", ",", "wx", ".", "BitmapFromImage", "(", "image", ")", ")" ]
Resizes a bitmap to a height of 89 pixels (the size of the top panel), while keeping aspect ratio in tact
[ "Resizes", "a", "bitmap", "to", "a", "height", "of", "89", "pixels", "(", "the", "size", "of", "the", "top", "panel", ")", "while", "keeping", "aspect", "ratio", "in", "tact" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/gooey/gui/imageutil.py#L16-L28
train
Resizes a bitmap to a height of 89 pixels while keeping aspect ratio in tact
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPq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TMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(11542 - 11431) + chr(0b110111 + 0o0) + chr(658 - 603), 0b1000), nzTpIcepk0o8(chr(48) + chr(9553 - 9442) + chr(0b1011 + 0o46) + chr(1062 - 1007) + '\x35', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1336 - 1287) + chr(0b110111) + '\061', 46810 - 46802), nzTpIcepk0o8('\x30' + '\157' + '\062' + chr(55) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\062' + chr(54 - 4) + chr(0b110010), 47250 - 47242), nzTpIcepk0o8(chr(48) + chr(6513 - 6402) + chr(51) + '\061' + '\065', ord("\x08")), nzTpIcepk0o8(chr(2195 - 2147) + chr(0b1101111) + '\x32' + chr(0b110 + 0o60), 0b1000), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\x6f' + '\062' + chr(2177 - 2124) + '\061', 1448 - 1440), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(425 - 375) + '\x31' + '\x37', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + '\063' + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(0b101000 + 0o12) + chr(49), 30717 - 30709), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b0 + 0o65) + chr(51), 0b1000), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(8402 - 8291) + chr(50), 45095 - 45087), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + '\064' + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\x6f' + chr(0b110011) + chr(0b0 + 0o63) + chr(0b110010), 61163 - 61155), nzTpIcepk0o8('\x30' + chr(0b1100 + 0o143) + chr(0b110001) + chr(0b110111) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b10011 + 0o35) + '\157' + '\062' + '\064' + chr(49), 17831 - 17823), nzTpIcepk0o8('\x30' + chr(0b110001 + 0o76) + chr(50) + '\062' + chr(2509 - 2457), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b11101 + 0o25) + chr(0b110100) + chr(0b110100), 0b1000), nzTpIcepk0o8('\060' + chr(3770 - 3659) + chr(0b1011 + 0o50) + chr(0b110010) + chr(0b10100 + 0o36), 9173 - 9165), nzTpIcepk0o8(chr(48) + chr(111) + '\066' + chr(0b110000), 44126 - 44118), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b101001 + 0o14) + chr(49), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + '\065' + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\060' + chr(678 - 567) + chr(121 - 70) + chr(0b110001) + chr(0b110011), 62083 - 62075), nzTpIcepk0o8('\x30' + chr(0b100010 + 0o115) + chr(0b110010) + '\x31' + '\060', 3752 - 3744), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(111) + chr(0b100100 + 0o16) + chr(851 - 797), 8), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + chr(957 - 904) + chr(0b101011 + 0o13), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(2422 - 2369) + chr(1723 - 1669), 8), nzTpIcepk0o8(chr(736 - 688) + chr(0b1011110 + 0o21) + chr(1445 - 1390) + chr(0b100111 + 0o14), 46111 - 46103), nzTpIcepk0o8(chr(1938 - 1890) + chr(8304 - 8193) + chr(564 - 515) + chr(48) + '\062', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b100 + 0o153) + chr(0b110010) + chr(55) + '\064', 0o10), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(402 - 347) + chr(2160 - 2109), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1000100 + 0o53) + chr(50) + chr(0b10 + 0o65) + '\x32', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x32' + '\x30' + chr(0b100101 + 0o20), 0o10), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(111) + chr(0b10010 + 0o37) + '\063' + chr(580 - 530), 0o10), nzTpIcepk0o8('\x30' + chr(4658 - 4547) + chr(52) + chr(53), 0o10), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(111) + chr(1045 - 990) + chr(0b100101 + 0o13), ord("\x08")), nzTpIcepk0o8('\060' + chr(4696 - 4585) + chr(49) + chr(49) + chr(0b101110 + 0o3), 61482 - 61474), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(55) + chr(49), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b10111 + 0o130) + chr(0b110 + 0o54) + '\x36' + chr(0b110101), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b11110 + 0o121) + chr(0b110101) + '\x30', 54940 - 54932)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x11'), chr(0b1011111 + 0o5) + chr(0b111010 + 0o53) + chr(2227 - 2128) + chr(919 - 808) + chr(0b1100100) + chr(0b1100101))(chr(117) + '\164' + chr(102) + chr(539 - 494) + chr(367 - 311)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Xba8xHNCc0sY(aY0lxtg5akD2, PiKhKu4Wc8Pb, EcTw9O4_qUYD): qqETtneJqWI2 = FHAk5xm055cs.ImageFromBitmap(PiKhKu4Wc8Pb) (NNvii0hN6A_9, I6_RSXfHcrjm) = qqETtneJqWI2.GetSize() if I6_RSXfHcrjm < EcTw9O4_qUYD: return roI3spqORKae(FHAk5xm055cs, roI3spqORKae(ES5oEprVxulp(b'l\t\x18\xca\xfb\xaeT\xc0\xfb\xf30['), '\x64' + chr(7719 - 7618) + chr(1901 - 1802) + '\157' + '\x64' + chr(101))(chr(0b1000100 + 0o61) + chr(12236 - 12120) + chr(102) + chr(0b10010 + 0o33) + chr(2801 - 2745)))(aY0lxtg5akD2, -nzTpIcepk0o8(chr(1479 - 1431) + chr(10197 - 10086) + '\x31', 0b1000), roI3spqORKae(FHAk5xm055cs, roI3spqORKae(ES5oEprVxulp(b'}\x14\r\xd3\xf3\xbdP\xdb\xe0\xf3\x18Fc\xc1\xbf'), '\x64' + chr(4280 - 4179) + chr(3222 - 3123) + chr(0b1101111) + chr(903 - 803) + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(102) + '\x2d' + chr(2322 - 2266)))(qqETtneJqWI2)) Lvpnycks9bvh = jLW6pRf2DSRk(NNvii0hN6A_9) / I6_RSXfHcrjm qqETtneJqWI2 = qqETtneJqWI2.Scale(EcTw9O4_qUYD * Lvpnycks9bvh, EcTw9O4_qUYD, FHAk5xm055cs.IMAGE_QUALITY_HIGH) return roI3spqORKae(FHAk5xm055cs, roI3spqORKae(ES5oEprVxulp(b'l\t\x18\xca\xfb\xaeT\xc0\xfb\xf30['), chr(4216 - 4116) + chr(8011 - 7910) + chr(0b1100011) + chr(7495 - 7384) + '\144' + chr(5395 - 5294))('\165' + chr(0b1101110 + 0o6) + chr(0b1001 + 0o135) + chr(0b101101) + chr(56)))(aY0lxtg5akD2, -nzTpIcepk0o8(chr(1187 - 1139) + chr(111) + chr(49), 8), roI3spqORKae(FHAk5xm055cs, roI3spqORKae(ES5oEprVxulp(b'}\x14\r\xd3\xf3\xbdP\xdb\xe0\xf3\x18Fc\xc1\xbf'), chr(0b1100100) + chr(6552 - 6451) + chr(6837 - 6738) + chr(0b11110 + 0o121) + '\144' + chr(3602 - 3501))('\x75' + chr(116) + '\146' + chr(0b110 + 0o47) + chr(0b101101 + 0o13)))(qqETtneJqWI2))
lrq3000/pyFileFixity
pyFileFixity/lib/distance/distance/_iterators.py
ilevenshtein
def ilevenshtein(seq1, seqs, max_dist=-1): """Compute the Levenshtein distance between the sequence `seq1` and the series of sequences `seqs`. `seq1`: the reference sequence `seqs`: a series of sequences (can be a generator) `max_dist`: if provided and > 0, only the sequences which distance from the reference sequence is lower or equal to this value will be returned. The return value is a series of pairs (distance, sequence). The sequence objects in `seqs` are expected to be of the same kind than the reference sequence in the C implementation; the same holds true for `ifast_comp`. """ for seq2 in seqs: dist = levenshtein(seq1, seq2, max_dist=max_dist) if dist != -1: yield dist, seq2
python
def ilevenshtein(seq1, seqs, max_dist=-1): """Compute the Levenshtein distance between the sequence `seq1` and the series of sequences `seqs`. `seq1`: the reference sequence `seqs`: a series of sequences (can be a generator) `max_dist`: if provided and > 0, only the sequences which distance from the reference sequence is lower or equal to this value will be returned. The return value is a series of pairs (distance, sequence). The sequence objects in `seqs` are expected to be of the same kind than the reference sequence in the C implementation; the same holds true for `ifast_comp`. """ for seq2 in seqs: dist = levenshtein(seq1, seq2, max_dist=max_dist) if dist != -1: yield dist, seq2
[ "def", "ilevenshtein", "(", "seq1", ",", "seqs", ",", "max_dist", "=", "-", "1", ")", ":", "for", "seq2", "in", "seqs", ":", "dist", "=", "levenshtein", "(", "seq1", ",", "seq2", ",", "max_dist", "=", "max_dist", ")", "if", "dist", "!=", "-", "1", ":", "yield", "dist", ",", "seq2" ]
Compute the Levenshtein distance between the sequence `seq1` and the series of sequences `seqs`. `seq1`: the reference sequence `seqs`: a series of sequences (can be a generator) `max_dist`: if provided and > 0, only the sequences which distance from the reference sequence is lower or equal to this value will be returned. The return value is a series of pairs (distance, sequence). The sequence objects in `seqs` are expected to be of the same kind than the reference sequence in the C implementation; the same holds true for `ifast_comp`.
[ "Compute", "the", "Levenshtein", "distance", "between", "the", "sequence", "seq1", "and", "the", "series", "of", "sequences", "seqs", ".", "seq1", ":", "the", "reference", "sequence", "seqs", ":", "a", "series", "of", "sequences", "(", "can", "be", "a", "generator", ")", "max_dist", ":", "if", "provided", "and", ">", "0", "only", "the", "sequences", "which", "distance", "from", "the", "reference", "sequence", "is", "lower", "or", "equal", "to", "this", "value", "will", "be", "returned", ".", "The", "return", "value", "is", "a", "series", "of", "pairs", "(", "distance", "sequence", ")", ".", "The", "sequence", "objects", "in", "seqs", "are", "expected", "to", "be", "of", "the", "same", "kind", "than", "the", "reference", "sequence", "in", "the", "C", "implementation", ";", "the", "same", "holds", "true", "for", "ifast_comp", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/distance/distance/_iterators.py#L3-L21
train
Compute the Levenshtein distance between the sequence seq1 and the series sequences seqs.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBS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roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(420 - 372) + chr(0b1001100 + 0o43) + chr(0b110001) + chr(1108 - 1053) + chr(160 - 105), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(412 - 363) + chr(0b11000 + 0o34), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b10010 + 0o41) + '\067' + chr(55), 51398 - 51390), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + '\x31' + chr(0b1 + 0o62), 29505 - 29497), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b1101111) + chr(796 - 746) + chr(0b10110 + 0o35) + '\067', 0b1000), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b1101111) + chr(1377 - 1327) + '\066' + chr(0b111 + 0o51), 58310 - 58302), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110110) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b1101 + 0o46) + chr(2250 - 2195) + '\066', ord("\x08")), nzTpIcepk0o8(chr(1102 - 1054) + chr(0b1101111) + chr(0b110010) + chr(50) + '\066', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + '\x33' + chr(848 - 795), ord("\x08")), nzTpIcepk0o8('\060' + chr(11639 - 11528) + '\x31' + chr(0b110111) + '\x31', 57720 - 57712), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(514 - 403) + chr(0b110001) + chr(0b110000) + chr(0b110110), 59541 - 59533), nzTpIcepk0o8('\060' + chr(111) + '\062' + '\x32' + chr(52), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(2161 - 2112) + chr(2193 - 2145) + '\060', 26386 - 26378), nzTpIcepk0o8('\x30' + '\x6f' + '\x36' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b11001 + 0o126) + chr(1651 - 1602) + chr(491 - 439) + '\067', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1644 - 1593) + chr(49) + '\067', 0o10), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1101111) + '\x32' + '\x34' + chr(0b110111), 0b1000), nzTpIcepk0o8('\060' + chr(4323 - 4212) + chr(50) + '\x37' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(1923 - 1875) + chr(0b1011010 + 0o25) + chr(0b10 + 0o57) + '\065' + '\067', 0o10), nzTpIcepk0o8(chr(1378 - 1330) + '\x6f' + '\x31' + chr(0b10100 + 0o35) + chr(0b1110 + 0o46), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b0 + 0o62) + '\063', 0o10), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\157' + chr(51) + chr(55) + chr(0b101 + 0o62), 8), nzTpIcepk0o8(chr(0b11 + 0o55) + '\x6f' + chr(231 - 182) + chr(2319 - 2270) + chr(0b1100 + 0o51), 36370 - 36362), nzTpIcepk0o8(chr(0b110000) + chr(0b100001 + 0o116) + chr(52) + chr(0b11100 + 0o30), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(356 - 307) + '\067' + chr(0b1 + 0o61), 0o10), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(10896 - 10785) + '\x32' + '\067' + chr(2315 - 2262), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + '\060', 12348 - 12340), nzTpIcepk0o8('\x30' + '\157' + chr(0b100100 + 0o17) + chr(0b110011) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(1926 - 1878) + '\x6f' + chr(0b111 + 0o54) + chr(54) + chr(51), 54723 - 54715), nzTpIcepk0o8(chr(0b110000) + chr(0b111000 + 0o67) + chr(0b11111 + 0o24) + '\x37' + '\067', 8), nzTpIcepk0o8('\x30' + '\x6f' + '\061', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101110 + 0o1) + '\062' + chr(0b10000 + 0o43) + chr(0b110001), 0o10), nzTpIcepk0o8('\060' + chr(10539 - 10428) + '\062' + '\063' + chr(0b100010 + 0o21), 0b1000), nzTpIcepk0o8('\x30' + chr(7974 - 7863) + chr(352 - 300) + '\063', 10148 - 10140), nzTpIcepk0o8(chr(916 - 868) + '\157' + chr(0b110011) + chr(686 - 636) + chr(0b101 + 0o54), ord("\x08")), nzTpIcepk0o8(chr(245 - 197) + chr(0b1001 + 0o146) + chr(1666 - 1614) + chr(53), 2570 - 2562), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + '\067' + chr(49), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101011 + 0o4) + chr(0b110 + 0o54) + chr(0b110100) + chr(0b101111 + 0o10), 8), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1010000 + 0o37) + '\x31' + chr(671 - 620) + '\x31', 13721 - 13713)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(226 - 178) + chr(111) + chr(1956 - 1903) + '\060', 62534 - 62526)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'Q'), '\144' + chr(8512 - 8411) + chr(5446 - 5347) + chr(6462 - 6351) + '\144' + '\x65')(chr(12249 - 12132) + '\164' + chr(0b1100110) + chr(0b101101) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def zpkqCN99VsLB(Z07cYIkH3qqX, LmTSN4iJgDMb, DUgz9ygnpZiS=-nzTpIcepk0o8('\060' + '\x6f' + chr(0b111 + 0o52), 8)): for _oKJXqrc_wFk in LmTSN4iJgDMb: Kt39bH0WF46E = cjon8Nic5jM2(Z07cYIkH3qqX, _oKJXqrc_wFk, max_dist=DUgz9ygnpZiS) if Kt39bH0WF46E != -nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001), 8): yield (Kt39bH0WF46E, _oKJXqrc_wFk)
lrq3000/pyFileFixity
pyFileFixity/lib/distance/distance/_iterators.py
ifast_comp
def ifast_comp(seq1, seqs, transpositions=False): """Return an iterator over all the sequences in `seqs` which distance from `seq1` is lower or equal to 2. The sequences which distance from the reference sequence is higher than that are dropped. `seq1`: the reference sequence. `seqs`: a series of sequences (can be a generator) `transpositions` has the same sense than in `fast_comp`. The return value is a series of pairs (distance, sequence). You might want to call `sorted()` on the iterator to get the results in a significant order: >>> g = ifast_comp("foo", ["fo", "bar", "foob", "foo", "foobaz"]) >>> sorted(g) [(0, 'foo'), (1, 'fo'), (1, 'foob')] """ for seq2 in seqs: dist = fast_comp(seq1, seq2, transpositions) if dist != -1: yield dist, seq2
python
def ifast_comp(seq1, seqs, transpositions=False): """Return an iterator over all the sequences in `seqs` which distance from `seq1` is lower or equal to 2. The sequences which distance from the reference sequence is higher than that are dropped. `seq1`: the reference sequence. `seqs`: a series of sequences (can be a generator) `transpositions` has the same sense than in `fast_comp`. The return value is a series of pairs (distance, sequence). You might want to call `sorted()` on the iterator to get the results in a significant order: >>> g = ifast_comp("foo", ["fo", "bar", "foob", "foo", "foobaz"]) >>> sorted(g) [(0, 'foo'), (1, 'fo'), (1, 'foob')] """ for seq2 in seqs: dist = fast_comp(seq1, seq2, transpositions) if dist != -1: yield dist, seq2
[ "def", "ifast_comp", "(", "seq1", ",", "seqs", ",", "transpositions", "=", "False", ")", ":", "for", "seq2", "in", "seqs", ":", "dist", "=", "fast_comp", "(", "seq1", ",", "seq2", ",", "transpositions", ")", "if", "dist", "!=", "-", "1", ":", "yield", "dist", ",", "seq2" ]
Return an iterator over all the sequences in `seqs` which distance from `seq1` is lower or equal to 2. The sequences which distance from the reference sequence is higher than that are dropped. `seq1`: the reference sequence. `seqs`: a series of sequences (can be a generator) `transpositions` has the same sense than in `fast_comp`. The return value is a series of pairs (distance, sequence). You might want to call `sorted()` on the iterator to get the results in a significant order: >>> g = ifast_comp("foo", ["fo", "bar", "foob", "foo", "foobaz"]) >>> sorted(g) [(0, 'foo'), (1, 'fo'), (1, 'foob')]
[ "Return", "an", "iterator", "over", "all", "the", "sequences", "in", "seqs", "which", "distance", "from", "seq1", "is", "lower", "or", "equal", "to", "2", ".", "The", "sequences", "which", "distance", "from", "the", "reference", "sequence", "is", "higher", "than", "that", "are", "dropped", ".", "seq1", ":", "the", "reference", "sequence", ".", "seqs", ":", "a", "series", "of", "sequences", "(", "can", "be", "a", "generator", ")", "transpositions", "has", "the", "same", "sense", "than", "in", "fast_comp", ".", "The", "return", "value", "is", "a", "series", "of", "pairs", "(", "distance", "sequence", ")", ".", "You", "might", "want", "to", "call", "sorted", "()", "on", "the", "iterator", "to", "get", "the", "results", "in", "a", "significant", "order", ":", ">>>", "g", "=", "ifast_comp", "(", "foo", "[", "fo", "bar", "foob", "foo", "foobaz", "]", ")", ">>>", "sorted", "(", "g", ")", "[", "(", "0", "foo", ")", "(", "1", "fo", ")", "(", "1", "foob", ")", "]" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/distance/distance/_iterators.py#L24-L45
train
Return an iterator over all the sequences in seqs which distance from the seq1 is lower or equal to 2.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNH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O2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(442 - 391) + chr(2196 - 2142) + chr(1825 - 1774), 0b1000), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\x6f' + '\x32' + '\x31' + chr(0b10100 + 0o37), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b111 + 0o150) + '\063' + '\x36' + '\x30', 0b1000), nzTpIcepk0o8('\060' + chr(8484 - 8373) + '\x33' + chr(48) + chr(0b100100 + 0o23), 0o10), nzTpIcepk0o8('\x30' + chr(11621 - 11510) + chr(0b110001) + chr(2283 - 2235) + '\x35', 0b1000), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(3526 - 3415) + chr(51) + '\066' + chr(2195 - 2147), 8), nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(51) + '\062', 0o10), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(1689 - 1578) + chr(0b1111 + 0o42) + chr(0b1 + 0o64) + chr(1657 - 1603), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(48) + chr(1631 - 1579), ord("\x08")), nzTpIcepk0o8(chr(1050 - 1002) + '\x6f' + chr(0b110011) + chr(55) + '\x35', 50452 - 50444), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(111) + '\062' + chr(0b10011 + 0o37) + '\063', 20001 - 19993), nzTpIcepk0o8(chr(470 - 422) + '\157' + chr(50) + chr(0b101110 + 0o2) + '\065', 0o10), nzTpIcepk0o8('\060' + chr(1256 - 1145) + chr(0b100110 + 0o16), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x37' + '\066', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\063' + chr(1147 - 1092) + '\x36', 0o10), nzTpIcepk0o8(chr(48) + chr(0b100011 + 0o114) + chr(0b1 + 0o60) + chr(0b11110 + 0o31) + chr(0b1001 + 0o56), 43748 - 43740), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + '\x37' + chr(2382 - 2331), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1010111 + 0o30) + chr(0b10 + 0o64) + chr(0b100111 + 0o15), ord("\x08")), nzTpIcepk0o8(chr(798 - 750) + chr(8075 - 7964) + chr(2331 - 2280) + '\062' + chr(0b100101 + 0o14), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + chr(0b110000) + '\x35', 33271 - 33263), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\x6f' + chr(0b110010) + chr(0b11001 + 0o31) + chr(0b1010 + 0o47), 55563 - 55555), nzTpIcepk0o8('\x30' + chr(0b111110 + 0o61) + '\061' + chr(0b100 + 0o57) + chr(0b11111 + 0o25), ord("\x08")), nzTpIcepk0o8(chr(526 - 478) + '\157' + chr(0b10101 + 0o36) + chr(162 - 108) + chr(50), 58413 - 58405), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + chr(52) + '\067', 33080 - 33072), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101100 + 0o12) + '\x33', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(601 - 547), 35242 - 35234), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x34' + chr(189 - 138), 0b1000), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b100111 + 0o110) + '\063' + chr(49) + '\063', 0o10), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(10582 - 10471) + chr(51) + chr(0b1011 + 0o47) + chr(0b11001 + 0o33), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b100111 + 0o110) + '\x34' + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(0b110101 + 0o72) + chr(0b100100 + 0o16) + '\x30' + '\066', ord("\x08")), nzTpIcepk0o8(chr(1070 - 1022) + '\x6f' + chr(0b110011) + chr(0b10100 + 0o40) + chr(0b1000 + 0o51), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b11001 + 0o30) + '\x37' + chr(0b10010 + 0o45), 8), nzTpIcepk0o8('\060' + '\157' + chr(0b101001 + 0o14), 0o10), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b10011 + 0o134) + chr(0b110010) + '\066' + '\x34', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1100100 + 0o13) + chr(0b110001 + 0o0) + chr(1247 - 1194), 0o10), nzTpIcepk0o8('\x30' + chr(0b111101 + 0o62) + '\x33' + chr(0b1000 + 0o51), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(2266 - 2217) + chr(0b110011) + chr(50), 39364 - 39356), nzTpIcepk0o8(chr(1205 - 1157) + chr(0b1101111) + chr(1466 - 1416) + '\x37' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(428 - 380) + chr(111) + chr(378 - 327) + chr(0b110001) + '\x37', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b11010 + 0o26) + '\x6f' + chr(0b1011 + 0o52) + chr(0b10100 + 0o34), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xdd'), chr(2577 - 2477) + '\x65' + chr(4159 - 4060) + chr(111) + chr(100) + chr(101))('\165' + '\164' + chr(0b1010100 + 0o22) + '\055' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def aIJEYOUTqlyS(Z07cYIkH3qqX, LmTSN4iJgDMb, x09q9B5A1QK4=nzTpIcepk0o8(chr(48) + chr(5157 - 5046) + chr(1835 - 1787), 0b1000)): for _oKJXqrc_wFk in LmTSN4iJgDMb: Kt39bH0WF46E = Hfaf4QyR76h_(Z07cYIkH3qqX, _oKJXqrc_wFk, x09q9B5A1QK4) if Kt39bH0WF46E != -nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001), 0o10): yield (Kt39bH0WF46E, _oKJXqrc_wFk)
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/pympler/summary.py
summarize
def summarize(objects): """Summarize an objects list. Return a list of lists, whereas each row consists of:: [str(type), number of objects of this type, total size of these objects]. No guarantee regarding the order is given. """ count = {} total_size = {} for o in objects: otype = _repr(o) if otype in count: count[otype] += 1 total_size[otype] += _getsizeof(o) else: count[otype] = 1 total_size[otype] = _getsizeof(o) rows = [] for otype in count: rows.append([otype, count[otype], total_size[otype]]) return rows
python
def summarize(objects): """Summarize an objects list. Return a list of lists, whereas each row consists of:: [str(type), number of objects of this type, total size of these objects]. No guarantee regarding the order is given. """ count = {} total_size = {} for o in objects: otype = _repr(o) if otype in count: count[otype] += 1 total_size[otype] += _getsizeof(o) else: count[otype] = 1 total_size[otype] = _getsizeof(o) rows = [] for otype in count: rows.append([otype, count[otype], total_size[otype]]) return rows
[ "def", "summarize", "(", "objects", ")", ":", "count", "=", "{", "}", "total_size", "=", "{", "}", "for", "o", "in", "objects", ":", "otype", "=", "_repr", "(", "o", ")", "if", "otype", "in", "count", ":", "count", "[", "otype", "]", "+=", "1", "total_size", "[", "otype", "]", "+=", "_getsizeof", "(", "o", ")", "else", ":", "count", "[", "otype", "]", "=", "1", "total_size", "[", "otype", "]", "=", "_getsizeof", "(", "o", ")", "rows", "=", "[", "]", "for", "otype", "in", "count", ":", "rows", ".", "append", "(", "[", "otype", ",", "count", "[", "otype", "]", ",", "total_size", "[", "otype", "]", "]", ")", "return", "rows" ]
Summarize an objects list. Return a list of lists, whereas each row consists of:: [str(type), number of objects of this type, total size of these objects]. No guarantee regarding the order is given.
[ "Summarize", "an", "objects", "list", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/summary.py#L112-L134
train
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eP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(669 - 619) + chr(2194 - 2140) + '\x30', 0o10), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(1486 - 1438) + chr(1863 - 1815), 0o10), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\157' + chr(0b110001) + '\x34' + chr(0b10111 + 0o40), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110111) + chr(1553 - 1500), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b10111 + 0o130) + chr(419 - 368) + chr(0b110100) + chr(52), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(49) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(1182 - 1134) + chr(0b1101111) + chr(1968 - 1918) + '\x34' + chr(1849 - 1798), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + '\x35' + chr(0b100010 + 0o23), 694 - 686), nzTpIcepk0o8(chr(187 - 139) + '\157' + chr(51) + chr(2153 - 2101) + '\x33', 63979 - 63971), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + chr(0b1011 + 0o50) + '\x32', 0b1000), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(111) + '\x33' + chr(0b110010) + chr(48), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(1687 - 1637) + chr(1979 - 1927), 42587 - 42579), nzTpIcepk0o8(chr(48) + '\157' + chr(0b1001 + 0o53) + chr(0b1000 + 0o54), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + chr(54) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(7208 - 7097) + chr(0b110011) + chr(48) + '\065', 46181 - 46173), nzTpIcepk0o8('\x30' + chr(0b1011001 + 0o26) + '\x31' + chr(1795 - 1742) + chr(0b1111 + 0o41), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + chr(2817 - 2762) + chr(2461 - 2408), 0b1000), nzTpIcepk0o8(chr(520 - 472) + chr(0b110000 + 0o77) + chr(49) + chr(0b10000 + 0o46) + '\x36', 63877 - 63869), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(717 - 668) + chr(55) + chr(51), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(1094 - 1045) + '\060' + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(1465 - 1417) + chr(4086 - 3975) + '\062' + chr(0b110111) + chr(0b110011), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(0b111 + 0o53) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110111) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b100101 + 0o16) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + '\063' + chr(1685 - 1635), 8), nzTpIcepk0o8(chr(48) + chr(0b10110 + 0o131) + '\066' + chr(0b110101), 32147 - 32139), nzTpIcepk0o8(chr(48) + chr(10192 - 10081) + chr(2099 - 2050) + '\062' + chr(1843 - 1793), 64236 - 64228), nzTpIcepk0o8(chr(541 - 493) + '\x6f' + chr(2140 - 2090) + chr(0b101110 + 0o7) + '\x36', 0b1000), nzTpIcepk0o8(chr(1523 - 1475) + chr(12179 - 12068) + '\x33' + chr(0b110111) + chr(0b11011 + 0o26), 61082 - 61074), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1011010 + 0o25) + chr(0b101100 + 0o5) + chr(0b110010) + chr(0b100011 + 0o17), 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(371 - 320) + '\062' + chr(1682 - 1629), 30113 - 30105), nzTpIcepk0o8(chr(48) + '\157' + chr(0b100111 + 0o15) + '\063', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b111111 + 0o60) + chr(1516 - 1461) + chr(2076 - 2024), 0o10), nzTpIcepk0o8(chr(905 - 857) + '\x6f' + chr(0b11 + 0o60) + chr(52) + chr(0b110011), 8), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(10991 - 10880) + chr(50) + '\061' + chr(1233 - 1179), 51598 - 51590), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(0b1101111) + chr(0b101010 + 0o12) + chr(0b11010 + 0o32), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(0b110001) + chr(970 - 920), 51931 - 51923), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b1010111 + 0o30) + chr(49) + '\066', 43117 - 43109), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(111) + chr(0b110011) + chr(0b110000) + '\x36', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + chr(1397 - 1347) + chr(0b110111), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b11001 + 0o34) + chr(0b1010 + 0o46), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x9e'), chr(100) + '\x65' + chr(99) + chr(0b1010110 + 0o31) + chr(0b1000 + 0o134) + chr(0b1011111 + 0o6))('\165' + '\164' + chr(0b1100110) + chr(45) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def UJ8TugYqrmuA(unFw4B5pa4XN): sQSWKlURp7QK = {} Noy3xbqUPU67 = {} for WgZUEOuIyTUO in unFw4B5pa4XN: UkCmpjs4fcMo = unzbAI29YRAb(WgZUEOuIyTUO) if UkCmpjs4fcMo in sQSWKlURp7QK: sQSWKlURp7QK[UkCmpjs4fcMo] += nzTpIcepk0o8('\060' + chr(111) + chr(0b110001), 1462 - 1454) Noy3xbqUPU67[UkCmpjs4fcMo] += kACApO6fjbcK(WgZUEOuIyTUO) else: sQSWKlURp7QK[UkCmpjs4fcMo] = nzTpIcepk0o8('\060' + '\157' + chr(974 - 925), 8) Noy3xbqUPU67[UkCmpjs4fcMo] = kACApO6fjbcK(WgZUEOuIyTUO) AUW_CJJJXKka = [] for UkCmpjs4fcMo in sQSWKlURp7QK: roI3spqORKae(AUW_CJJJXKka, roI3spqORKae(ES5oEprVxulp(b'\xf8\x144\t\x9cm\xe4\x82\x89\xf5\x85a'), chr(0b1100100 + 0o0) + '\145' + chr(0b1100011) + chr(0b1101111) + chr(0b1001111 + 0o25) + '\x65')(chr(0b1110101) + chr(0b1010000 + 0o44) + chr(102) + '\x2d' + '\x38'))([UkCmpjs4fcMo, sQSWKlURp7QK[UkCmpjs4fcMo], Noy3xbqUPU67[UkCmpjs4fcMo]]) return AUW_CJJJXKka
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/pympler/summary.py
get_diff
def get_diff(left, right): """Get the difference of two summaries. Subtracts the values of the right summary from the values of the left summary. If similar rows appear on both sides, the are included in the summary with 0 for number of elements and total size. If the number of elements of a row of the diff is 0, but the total size is not, it means that objects likely have changed, but not there number, thus resulting in a changed size. """ res = [] for row_r in right: found = False for row_l in left: if row_r[0] == row_l[0]: res.append([row_r[0], row_r[1] - row_l[1], row_r[2] - row_l[2]]) found = True if not found: res.append(row_r) for row_l in left: found = False for row_r in right: if row_l[0] == row_r[0]: found = True if not found: res.append([row_l[0], -row_l[1], -row_l[2]]) return res
python
def get_diff(left, right): """Get the difference of two summaries. Subtracts the values of the right summary from the values of the left summary. If similar rows appear on both sides, the are included in the summary with 0 for number of elements and total size. If the number of elements of a row of the diff is 0, but the total size is not, it means that objects likely have changed, but not there number, thus resulting in a changed size. """ res = [] for row_r in right: found = False for row_l in left: if row_r[0] == row_l[0]: res.append([row_r[0], row_r[1] - row_l[1], row_r[2] - row_l[2]]) found = True if not found: res.append(row_r) for row_l in left: found = False for row_r in right: if row_l[0] == row_r[0]: found = True if not found: res.append([row_l[0], -row_l[1], -row_l[2]]) return res
[ "def", "get_diff", "(", "left", ",", "right", ")", ":", "res", "=", "[", "]", "for", "row_r", "in", "right", ":", "found", "=", "False", "for", "row_l", "in", "left", ":", "if", "row_r", "[", "0", "]", "==", "row_l", "[", "0", "]", ":", "res", ".", "append", "(", "[", "row_r", "[", "0", "]", ",", "row_r", "[", "1", "]", "-", "row_l", "[", "1", "]", ",", "row_r", "[", "2", "]", "-", "row_l", "[", "2", "]", "]", ")", "found", "=", "True", "if", "not", "found", ":", "res", ".", "append", "(", "row_r", ")", "for", "row_l", "in", "left", ":", "found", "=", "False", "for", "row_r", "in", "right", ":", "if", "row_l", "[", "0", "]", "==", "row_r", "[", "0", "]", ":", "found", "=", "True", "if", "not", "found", ":", "res", ".", "append", "(", "[", "row_l", "[", "0", "]", ",", "-", "row_l", "[", "1", "]", ",", "-", "row_l", "[", "2", "]", "]", ")", "return", "res" ]
Get the difference of two summaries. Subtracts the values of the right summary from the values of the left summary. If similar rows appear on both sides, the are included in the summary with 0 for number of elements and total size. If the number of elements of a row of the diff is 0, but the total size is not, it means that objects likely have changed, but not there number, thus resulting in a changed size.
[ "Get", "the", "difference", "of", "two", "summaries", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/summary.py#L136-L165
train
Get the difference of two summaries.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d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7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + chr(48) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(111) + '\061' + '\x32', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b110110 + 0o71) + '\x33' + '\060' + chr(1669 - 1615), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(52) + chr(2047 - 1992), 0o10), nzTpIcepk0o8(chr(1675 - 1627) + chr(0b110101 + 0o72) + chr(0b10011 + 0o37) + chr(0b110111) + chr(1092 - 1041), 0o10), nzTpIcepk0o8(chr(0b0 + 0o60) + '\157' + '\063' + '\063' + chr(53), 13520 - 13512), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(53), 62000 - 61992), nzTpIcepk0o8(chr(48) + chr(10836 - 10725) + chr(0b110011) + '\063' + '\x37', 0b1000), nzTpIcepk0o8(chr(2128 - 2080) + '\157' + chr(1088 - 1037) + chr(0b110001) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(559 - 448) + '\x33' + '\061' + chr(0b110111), 42604 - 42596), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + chr(0b11111 + 0o21) + chr(48), 3995 - 3987), nzTpIcepk0o8(chr(0b110000) + chr(0b1100101 + 0o12) + chr(54) + '\067', ord("\x08")), nzTpIcepk0o8(chr(1443 - 1395) + chr(0b1101111) + chr(49) + chr(2572 - 2519) + chr(53), 0o10), nzTpIcepk0o8(chr(2153 - 2105) + '\x6f' + '\x32' + '\063' + '\061', 50508 - 50500), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2074 - 2024) + '\x30', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x33' + chr(0b110110) + '\x35', 0o10), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(5011 - 4900) + chr(52) + chr(0b101 + 0o53), 49963 - 49955), nzTpIcepk0o8('\060' + '\157' + chr(1963 - 1910) + chr(2526 - 2473), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + '\x33' + chr(52), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b10111 + 0o32) + chr(2520 - 2468) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b111011 + 0o64) + chr(0b110001) + chr(979 - 924) + chr(0b110011), 21131 - 21123), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + '\x31' + chr(52), 0o10), nzTpIcepk0o8('\x30' + chr(3850 - 3739) + chr(0b110011) + chr(0b101010 + 0o11), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(867 - 813) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + chr(0b110000) + chr(0b100101 + 0o17), 0b1000), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\x6f' + chr(1102 - 1053) + '\x35' + chr(48), 16758 - 16750), nzTpIcepk0o8('\060' + '\157' + chr(0b11101 + 0o26) + chr(0b110010) + chr(0b11011 + 0o27), ord("\x08")), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(5031 - 4920) + chr(716 - 667) + '\067' + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + chr(4177 - 4066) + '\063' + chr(0b11011 + 0o33) + chr(2830 - 2775), 0b1000), nzTpIcepk0o8(chr(1043 - 995) + chr(0b100101 + 0o112) + '\x33' + chr(0b100010 + 0o22) + chr(1788 - 1738), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\063' + chr(0b10000 + 0o44) + chr(49), 0o10), nzTpIcepk0o8('\060' + '\157' + '\x32' + '\064' + chr(778 - 725), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011 + 0o0) + chr(55) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b1011 + 0o50) + chr(53) + chr(0b0 + 0o63), ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(11472 - 11361) + chr(0b110010 + 0o1) + '\060' + chr(0b110101), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\x36' + '\062', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110011) + '\063' + chr(514 - 466), 4734 - 4726), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + chr(55) + chr(0b10001 + 0o44), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(10114 - 10003) + '\062' + chr(0b110110) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(625 - 574) + chr(50) + '\060', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(10594 - 10483) + '\x35' + chr(48), 47885 - 47877)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xac'), chr(1466 - 1366) + chr(2564 - 2463) + '\x63' + chr(0b11110 + 0o121) + chr(0b1100100) + chr(0b1100101))(chr(0b11011 + 0o132) + chr(116) + '\146' + chr(45) + chr(0b0 + 0o70)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def XZErZR_om10z(ZJRgJr1hTjIz, HDutv6NlG_yf): _XdQFJpnzJor = [] for C1EUdzZaZTtL in HDutv6NlG_yf: yGnyZM4lBnhJ = nzTpIcepk0o8(chr(0b1111 + 0o41) + '\157' + '\060', 0o10) for Kj72QrJbJpnX in ZJRgJr1hTjIz: if C1EUdzZaZTtL[nzTpIcepk0o8('\060' + chr(111) + '\060', 8)] == Kj72QrJbJpnX[nzTpIcepk0o8(chr(0b110000) + '\157' + '\x30', 8)]: roI3spqORKae(_XdQFJpnzJor, roI3spqORKae(ES5oEprVxulp(b'\xca^\x95\xd3\xc3\xbaB\xb0\xa7\xa0\x15\x02'), chr(0b1100100) + chr(101) + '\143' + '\157' + '\x64' + '\145')(chr(117) + chr(0b10110 + 0o136) + chr(0b1100110) + '\055' + '\x38'))([C1EUdzZaZTtL[nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b1001110 + 0o41) + '\x30', 8)], C1EUdzZaZTtL[nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(2911 - 2800) + chr(1456 - 1407), ord("\x08"))] - Kj72QrJbJpnX[nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49), 8)], C1EUdzZaZTtL[nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(2756 - 2645) + chr(0b110010), 0o10)] - Kj72QrJbJpnX[nzTpIcepk0o8(chr(48) + chr(111) + '\062', 8)]]) yGnyZM4lBnhJ = nzTpIcepk0o8('\x30' + chr(111) + chr(49), 8) if not yGnyZM4lBnhJ: roI3spqORKae(_XdQFJpnzJor, roI3spqORKae(ES5oEprVxulp(b'\xca^\x95\xd3\xc3\xbaB\xb0\xa7\xa0\x15\x02'), '\144' + '\145' + chr(2160 - 2061) + chr(0b1101011 + 0o4) + chr(0b1100100) + '\x65')('\165' + '\x74' + '\x66' + chr(0b101101) + '\x38'))(C1EUdzZaZTtL) for Kj72QrJbJpnX in ZJRgJr1hTjIz: yGnyZM4lBnhJ = nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(10093 - 9982) + chr(0b110000), 8) for C1EUdzZaZTtL in HDutv6NlG_yf: if Kj72QrJbJpnX[nzTpIcepk0o8('\x30' + '\x6f' + chr(48), 8)] == C1EUdzZaZTtL[nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1603 - 1555), 8)]: yGnyZM4lBnhJ = nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31', 8) if not yGnyZM4lBnhJ: roI3spqORKae(_XdQFJpnzJor, roI3spqORKae(ES5oEprVxulp(b'\xca^\x95\xd3\xc3\xbaB\xb0\xa7\xa0\x15\x02'), chr(100) + '\x65' + chr(99) + chr(0b1000011 + 0o54) + '\144' + chr(0b111011 + 0o52))(chr(0b10100 + 0o141) + chr(116) + chr(0b1100110) + '\055' + chr(56)))([Kj72QrJbJpnX[nzTpIcepk0o8('\x30' + chr(111) + chr(48), 8)], -Kj72QrJbJpnX[nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31', 8)], -Kj72QrJbJpnX[nzTpIcepk0o8('\060' + '\x6f' + '\062', 8)]]) return _XdQFJpnzJor
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/pympler/summary.py
print_
def print_(rows, limit=15, sort='size', order='descending'): """Print the rows as a summary. Keyword arguments: limit -- the maximum number of elements to be listed sort -- sort elements by 'size', 'type', or '#' order -- sort 'ascending' or 'descending' """ localrows = [] for row in rows: localrows.append(list(row)) # input validation sortby = ['type', '#', 'size'] if sort not in sortby: raise ValueError("invalid sort, should be one of" + str(sortby)) orders = ['ascending', 'descending'] if order not in orders: raise ValueError("invalid order, should be one of" + str(orders)) # sort rows if sortby.index(sort) == 0: if order == "ascending": localrows.sort(key=lambda x: _repr(x[0])) elif order == "descending": localrows.sort(key=lambda x: _repr(x[0]), reverse=True) else: if order == "ascending": localrows.sort(key=lambda x: x[sortby.index(sort)]) elif order == "descending": localrows.sort(key=lambda x: x[sortby.index(sort)], reverse=True) # limit rows localrows = localrows[0:limit] for row in localrows: row[2] = stringutils.pp(row[2]) # print rows localrows.insert(0,["types", "# objects", "total size"]) _print_table(localrows)
python
def print_(rows, limit=15, sort='size', order='descending'): """Print the rows as a summary. Keyword arguments: limit -- the maximum number of elements to be listed sort -- sort elements by 'size', 'type', or '#' order -- sort 'ascending' or 'descending' """ localrows = [] for row in rows: localrows.append(list(row)) # input validation sortby = ['type', '#', 'size'] if sort not in sortby: raise ValueError("invalid sort, should be one of" + str(sortby)) orders = ['ascending', 'descending'] if order not in orders: raise ValueError("invalid order, should be one of" + str(orders)) # sort rows if sortby.index(sort) == 0: if order == "ascending": localrows.sort(key=lambda x: _repr(x[0])) elif order == "descending": localrows.sort(key=lambda x: _repr(x[0]), reverse=True) else: if order == "ascending": localrows.sort(key=lambda x: x[sortby.index(sort)]) elif order == "descending": localrows.sort(key=lambda x: x[sortby.index(sort)], reverse=True) # limit rows localrows = localrows[0:limit] for row in localrows: row[2] = stringutils.pp(row[2]) # print rows localrows.insert(0,["types", "# objects", "total size"]) _print_table(localrows)
[ "def", "print_", "(", "rows", ",", "limit", "=", "15", ",", "sort", "=", "'size'", ",", "order", "=", "'descending'", ")", ":", "localrows", "=", "[", "]", "for", "row", "in", "rows", ":", "localrows", ".", "append", "(", "list", "(", "row", ")", ")", "# input validation", "sortby", "=", "[", "'type'", ",", "'#'", ",", "'size'", "]", "if", "sort", "not", "in", "sortby", ":", "raise", "ValueError", "(", "\"invalid sort, should be one of\"", "+", "str", "(", "sortby", ")", ")", "orders", "=", "[", "'ascending'", ",", "'descending'", "]", "if", "order", "not", "in", "orders", ":", "raise", "ValueError", "(", "\"invalid order, should be one of\"", "+", "str", "(", "orders", ")", ")", "# sort rows", "if", "sortby", ".", "index", "(", "sort", ")", "==", "0", ":", "if", "order", "==", "\"ascending\"", ":", "localrows", ".", "sort", "(", "key", "=", "lambda", "x", ":", "_repr", "(", "x", "[", "0", "]", ")", ")", "elif", "order", "==", "\"descending\"", ":", "localrows", ".", "sort", "(", "key", "=", "lambda", "x", ":", "_repr", "(", "x", "[", "0", "]", ")", ",", "reverse", "=", "True", ")", "else", ":", "if", "order", "==", "\"ascending\"", ":", "localrows", ".", "sort", "(", "key", "=", "lambda", "x", ":", "x", "[", "sortby", ".", "index", "(", "sort", ")", "]", ")", "elif", "order", "==", "\"descending\"", ":", "localrows", ".", "sort", "(", "key", "=", "lambda", "x", ":", "x", "[", "sortby", ".", "index", "(", "sort", ")", "]", ",", "reverse", "=", "True", ")", "# limit rows", "localrows", "=", "localrows", "[", "0", ":", "limit", "]", "for", "row", "in", "localrows", ":", "row", "[", "2", "]", "=", "stringutils", ".", "pp", "(", "row", "[", "2", "]", ")", "# print rows", "localrows", ".", "insert", "(", "0", ",", "[", "\"types\"", ",", "\"# objects\"", ",", "\"total size\"", "]", ")", "_print_table", "(", "localrows", ")" ]
Print the rows as a summary. Keyword arguments: limit -- the maximum number of elements to be listed sort -- sort elements by 'size', 'type', or '#' order -- sort 'ascending' or 'descending'
[ "Print", "the", "rows", "as", "a", "summary", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/summary.py#L167-L202
train
Print the rows as a summary.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zf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Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + '\x31' + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(11172 - 11061) + chr(0b1110 + 0o45) + chr(0b100100 + 0o14) + chr(0b110011), 15989 - 15981), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(54) + chr(0b110010 + 0o2), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111 + 0o0) + '\063' + '\x36', 0o10), nzTpIcepk0o8(chr(48) + chr(5198 - 5087) + chr(52) + '\x30', 0o10), nzTpIcepk0o8('\060' + '\157' + '\x31' + '\063' + chr(50), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(1701 - 1650) + chr(0b100100 + 0o23), 57376 - 57368), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(2050 - 1998) + chr(1246 - 1196), 0b1000), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b110 + 0o151) + chr(49) + chr(0b10011 + 0o37) + '\x33', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + chr(0b110011) + '\060', 0o10), nzTpIcepk0o8(chr(1222 - 1174) + chr(111) + chr(0b110010) + chr(0b10011 + 0o43) + chr(2298 - 2243), ord("\x08")), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(0b1010010 + 0o35) + chr(91 - 41) + chr(0b110000) + chr(54), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + '\x30' + chr(0b100010 + 0o20), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(111) + chr(0b110011) + chr(0b101101 + 0o10) + chr(49), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\064', 45945 - 45937), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b110101 + 0o72) + chr(0b101100 + 0o5) + chr(1773 - 1721) + chr(0b110110 + 0o1), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1010011 + 0o34) + '\063' + chr(1347 - 1298) + chr(0b110110), 8), nzTpIcepk0o8(chr(2068 - 2020) + '\157' + '\061' + '\x34' + chr(823 - 773), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110110) + chr(54), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(313 - 263) + '\x37' + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(1305 - 1257) + '\157' + '\x33' + chr(49) + '\061', 0o10), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\157' + '\063' + chr(54) + chr(0b110001), 5068 - 5060), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + '\067' + chr(50), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + '\061' + chr(83 - 34), 8), nzTpIcepk0o8('\060' + chr(0b1110 + 0o141) + chr(50) + '\x37' + '\067', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(0b110010) + chr(792 - 742), 0o10), nzTpIcepk0o8('\x30' + chr(6357 - 6246) + chr(0b110001 + 0o1) + '\x37' + chr(52), ord("\x08")), nzTpIcepk0o8(chr(307 - 259) + '\x6f' + '\x36' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(1069 - 1021) + chr(4992 - 4881) + '\x31' + chr(1781 - 1732) + '\062', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x36' + '\x32', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1769 - 1719) + chr(0b100 + 0o57) + chr(0b110010 + 0o1), 55390 - 55382), nzTpIcepk0o8(chr(393 - 345) + chr(0b1101111) + chr(0b100001 + 0o22) + chr(370 - 315) + chr(0b110000), 10115 - 10107), nzTpIcepk0o8('\x30' + chr(0b1000011 + 0o54) + chr(1677 - 1624) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\157' + chr(0b100000 + 0o27) + chr(0b11110 + 0o23), 16112 - 16104), nzTpIcepk0o8(chr(0b110000) + chr(0b10011 + 0o134) + chr(504 - 454) + chr(0b11100 + 0o33) + '\x31', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(49) + '\063', 0b1000), nzTpIcepk0o8(chr(1129 - 1081) + chr(111) + chr(0b110010) + chr(0b110111) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(2250 - 2202) + chr(2007 - 1896) + chr(0b11111 + 0o22) + chr(55) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(735 - 685) + chr(2552 - 2497) + chr(1631 - 1582), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(1415 - 1304) + chr(1791 - 1738) + chr(0b101000 + 0o10), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xe0'), chr(0b111111 + 0o45) + '\145' + '\143' + chr(0b1101111) + '\144' + chr(0b10100 + 0o121))(chr(0b100000 + 0o125) + '\164' + '\x66' + '\055' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def XS1j34tEKo31(AUW_CJJJXKka, gXahiMxE912j=nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + chr(49) + '\x37', 26243 - 26235), ZfRO3c5LI_Bg=roI3spqORKae(ES5oEprVxulp(b'\xbd\xaa\x0e{'), '\144' + chr(101) + chr(0b1100011) + '\157' + '\x64' + chr(0b1100101))(chr(7636 - 7519) + '\x74' + chr(0b111100 + 0o52) + '\x2d' + '\x38'), gwJk_IgdwKDy=roI3spqORKae(ES5oEprVxulp(b'\xaa\xa6\x07}E4;\x8b=?'), '\x64' + chr(9421 - 9320) + chr(3170 - 3071) + chr(0b1011011 + 0o24) + chr(100) + '\x65')(chr(117) + chr(116) + chr(0b1010101 + 0o21) + '\x2d' + '\070')): JUiWSbpkEQfR = [] for o6UWUO21mH25 in AUW_CJJJXKka: roI3spqORKae(JUiWSbpkEQfR, roI3spqORKae(ES5oEprVxulp(b"\x86\x97'*X=\x18\x8d97\xe2\xb3"), chr(4252 - 4152) + chr(0b1100101) + '\143' + chr(111) + '\144' + chr(101))('\x75' + chr(116) + chr(102) + chr(0b101101) + '\x38'))(H4NoA26ON7iG(o6UWUO21mH25)) z7mNMyB5i1rQ = [roI3spqORKae(ES5oEprVxulp(b'\xba\xba\x04{'), chr(0b1001110 + 0o26) + '\145' + '\x63' + chr(111) + chr(100) + '\145')(chr(0b11101 + 0o130) + '\164' + chr(0b1100110) + chr(1934 - 1889) + chr(2773 - 2717)), roI3spqORKae(ES5oEprVxulp(b'\xed'), chr(2211 - 2111) + chr(101) + chr(0b1100011) + '\157' + '\x64' + chr(7759 - 7658))('\165' + chr(0b1110100) + chr(0b111001 + 0o55) + chr(45) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\xbd\xaa\x0e{'), chr(0b11011 + 0o111) + chr(0b1010011 + 0o22) + chr(0b1100011) + chr(4928 - 4817) + '\144' + '\x65')('\x75' + chr(0b1110100) + '\x66' + '\x2d' + '\070')] if ZfRO3c5LI_Bg not in z7mNMyB5i1rQ: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xa7\xad\x02\x7fL3;\xc2 7\xc5\xf2n\xc9w\x0f\xa1\x17Z\xda\xe9\x93\x9f\xe9\xd0~\xf7\x9c^,'), chr(0b100111 + 0o75) + chr(0b1101 + 0o130) + chr(0b11101 + 0o106) + chr(0b101111 + 0o100) + chr(0b1100100) + '\x65')(chr(4994 - 4877) + '\x74' + chr(2675 - 2573) + '\x2d' + chr(56)) + N9zlRy29S1SS(z7mNMyB5i1rQ)) GoGxv4EvORHe = [roI3spqORKae(ES5oEprVxulp(b'\xaf\xb0\x17{N>6\x8c4'), chr(100) + chr(101) + '\x63' + '\157' + '\x64' + '\145')(chr(0b1110101) + '\x74' + '\x66' + chr(0b1110 + 0o37) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xaa\xa6\x07}E4;\x8b=?'), chr(6527 - 6427) + '\145' + chr(0b10100 + 0o117) + '\157' + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(116) + '\x66' + chr(245 - 200) + '\070')] if gwJk_IgdwKDy not in GoGxv4EvORHe: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xa7\xad\x02\x7fL3;\xc2<*\xd3\xe30\xc5$\x14\xa6\rC\xd2\xad\xd1\x98\xac\x9f\x7f\xfc\xd9\x11%T'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(0b1101111) + '\x64' + chr(101))('\x75' + '\164' + chr(0b110101 + 0o61) + '\x2d' + '\070') + N9zlRy29S1SS(GoGxv4EvORHe)) if roI3spqORKae(z7mNMyB5i1rQ, roI3spqORKae(ES5oEprVxulp(b'\x94\xb3\x12P\x15.\x0c\xae2\x02\xcd\xe3'), chr(0b1100100) + chr(101) + '\x63' + chr(0b1010011 + 0o34) + '\x64' + chr(0b1100101))('\165' + chr(116) + chr(0b1100110) + chr(0b10010 + 0o33) + chr(0b111000)))(ZfRO3c5LI_Bg) == nzTpIcepk0o8('\060' + chr(5538 - 5427) + chr(0b110000), 0o10): if gwJk_IgdwKDy == roI3spqORKae(ES5oEprVxulp(b'\xaf\xb0\x17{N>6\x8c4'), chr(2490 - 2390) + '\x65' + chr(0b1100011) + chr(0b1010111 + 0o30) + chr(0b1100100) + '\145')('\x75' + chr(0b1110100) + chr(0b1100110) + '\055' + chr(56)): roI3spqORKae(JUiWSbpkEQfR, roI3spqORKae(ES5oEprVxulp(b'\xbd\xac\x06j'), '\x64' + chr(9918 - 9817) + chr(3171 - 3072) + '\157' + '\144' + chr(0b1100101))('\165' + chr(116) + chr(0b1100110) + '\x2d' + chr(0b111000)))(key=lambda bI5jsQ9OkQtj: unzbAI29YRAb(bI5jsQ9OkQtj[nzTpIcepk0o8(chr(2204 - 2156) + chr(0b1100101 + 0o12) + '\060', 8)])) elif gwJk_IgdwKDy == roI3spqORKae(ES5oEprVxulp(b'\xaa\xa6\x07}E4;\x8b=?'), chr(0b1 + 0o143) + chr(0b1111 + 0o126) + chr(99) + '\157' + chr(0b1000011 + 0o41) + chr(0b1100101))('\x75' + chr(4608 - 4492) + '\146' + '\055' + chr(56)): roI3spqORKae(JUiWSbpkEQfR, roI3spqORKae(ES5oEprVxulp(b'\xbd\xac\x06j'), chr(0b10110 + 0o116) + chr(5578 - 5477) + chr(0b1100011) + '\157' + '\x64' + chr(101))(chr(117) + chr(2188 - 2072) + '\146' + chr(0b1111 + 0o36) + chr(56)))(key=lambda bI5jsQ9OkQtj: unzbAI29YRAb(bI5jsQ9OkQtj[nzTpIcepk0o8(chr(0b110000) + chr(1937 - 1826) + '\060', 8)]), reverse=nzTpIcepk0o8(chr(0b10000 + 0o40) + '\x6f' + chr(1585 - 1536), 0b1000)) elif gwJk_IgdwKDy == roI3spqORKae(ES5oEprVxulp(b'\xaf\xb0\x17{N>6\x8c4'), chr(0b100110 + 0o76) + '\x65' + '\x63' + chr(0b1000011 + 0o54) + chr(100) + '\145')(chr(117) + chr(0b1110100) + '\146' + '\055' + chr(2075 - 2019)): roI3spqORKae(JUiWSbpkEQfR, roI3spqORKae(ES5oEprVxulp(b'\xbd\xac\x06j'), chr(0b1100100) + chr(101) + '\x63' + chr(6065 - 5954) + '\144' + chr(0b100111 + 0o76))(chr(117) + chr(116) + chr(0b101010 + 0o74) + '\x2d' + chr(0b10110 + 0o42)))(key=lambda bI5jsQ9OkQtj: bI5jsQ9OkQtj[roI3spqORKae(z7mNMyB5i1rQ, roI3spqORKae(ES5oEprVxulp(b'\x94\xb3\x12P\x15.\x0c\xae2\x02\xcd\xe3'), chr(9198 - 9098) + '\145' + chr(5760 - 5661) + chr(0b1000111 + 0o50) + chr(5775 - 5675) + chr(1780 - 1679))(chr(6399 - 6282) + chr(0b1110100) + chr(0b1100110) + chr(45) + chr(1264 - 1208)))(ZfRO3c5LI_Bg)]) elif gwJk_IgdwKDy == roI3spqORKae(ES5oEprVxulp(b'\xaa\xa6\x07}E4;\x8b=?'), chr(100) + '\x65' + '\143' + chr(0b100111 + 0o110) + '\x64' + chr(0b100011 + 0o102))(chr(0b111010 + 0o73) + chr(116) + chr(0b11000 + 0o116) + chr(0b101101) + '\070'): roI3spqORKae(JUiWSbpkEQfR, roI3spqORKae(ES5oEprVxulp(b'\xbd\xac\x06j'), '\144' + chr(0b1100101) + '\x63' + chr(6722 - 6611) + chr(0b1011010 + 0o12) + chr(0b111001 + 0o54))('\x75' + '\x74' + chr(1954 - 1852) + chr(0b101 + 0o50) + chr(642 - 586)))(key=lambda bI5jsQ9OkQtj: bI5jsQ9OkQtj[roI3spqORKae(z7mNMyB5i1rQ, roI3spqORKae(ES5oEprVxulp(b'\x94\xb3\x12P\x15.\x0c\xae2\x02\xcd\xe3'), chr(0b11 + 0o141) + chr(0b110111 + 0o56) + '\x63' + '\x6f' + chr(2005 - 1905) + chr(0b1100101))(chr(0b1110101) + chr(0b1001 + 0o153) + chr(102) + chr(45) + chr(56)))(ZfRO3c5LI_Bg)], reverse=nzTpIcepk0o8(chr(0b11011 + 0o25) + '\157' + chr(0b101 + 0o54), 8)) JUiWSbpkEQfR = JUiWSbpkEQfR[nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(111) + chr(48), 8):gXahiMxE912j] for o6UWUO21mH25 in JUiWSbpkEQfR: o6UWUO21mH25[nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(111) + chr(50), 0b1000)] = FaW9ryP1LYNC.pp(o6UWUO21mH25[nzTpIcepk0o8('\060' + chr(0b101100 + 0o103) + chr(0b110010), 8)]) roI3spqORKae(JUiWSbpkEQfR, roI3spqORKae(ES5oEprVxulp(b'\xa7\xad\x07{R.'), chr(0b10011 + 0o121) + chr(0b110001 + 0o64) + chr(6549 - 6450) + '\x6f' + chr(0b1100100) + chr(3194 - 3093))('\x75' + chr(116) + '\x66' + chr(57 - 12) + chr(0b10101 + 0o43)))(nzTpIcepk0o8(chr(48) + chr(0b10111 + 0o130) + chr(1581 - 1533), 8), [roI3spqORKae(ES5oEprVxulp(b'\xba\xba\x04{S'), chr(4113 - 4013) + chr(101) + chr(99) + '\157' + chr(100) + chr(9558 - 9457))(chr(0b1101000 + 0o15) + chr(6382 - 6266) + chr(0b1100110) + '\x2d' + chr(682 - 626)), roI3spqORKae(ES5oEprVxulp(b'\xed\xe3\x1b|J?<\x96 '), chr(100) + chr(0b100011 + 0o102) + chr(0b111 + 0o134) + chr(0b1100001 + 0o16) + '\x64' + '\x65')(chr(117) + chr(4513 - 4397) + chr(0b1100110) + '\x2d' + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xba\xac\x00\x7fLz,\x8b)='), chr(100) + chr(1318 - 1217) + chr(99) + chr(0b1100 + 0o143) + chr(5505 - 5405) + chr(101))('\x75' + '\164' + chr(0b1100110) + '\x2d' + chr(56))]) pxCQmAihT770(JUiWSbpkEQfR)
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/pympler/summary.py
_print_table
def _print_table(rows, header=True): """Print a list of lists as a pretty table. Keyword arguments: header -- if True the first row is treated as a table header inspired by http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/267662 """ border = "=" # vertical delimiter vdelim = " | " # padding nr. of spaces are left around the longest element in the # column padding = 1 # may be left,center,right justify = 'right' justify = {'left' : str.ljust, 'center' : str.center, 'right' : str.rjust}[justify.lower()] # calculate column widths (longest item in each col # plus "padding" nr of spaces on both sides) cols = zip(*rows) colWidths = [max([len(str(item))+2*padding for item in col]) for col in cols] borderline = vdelim.join([w*border for w in colWidths]) for row in rows: print(vdelim.join([justify(str(item),width) for (item,width) in zip(row,colWidths)])) if header: print(borderline) header=False
python
def _print_table(rows, header=True): """Print a list of lists as a pretty table. Keyword arguments: header -- if True the first row is treated as a table header inspired by http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/267662 """ border = "=" # vertical delimiter vdelim = " | " # padding nr. of spaces are left around the longest element in the # column padding = 1 # may be left,center,right justify = 'right' justify = {'left' : str.ljust, 'center' : str.center, 'right' : str.rjust}[justify.lower()] # calculate column widths (longest item in each col # plus "padding" nr of spaces on both sides) cols = zip(*rows) colWidths = [max([len(str(item))+2*padding for item in col]) for col in cols] borderline = vdelim.join([w*border for w in colWidths]) for row in rows: print(vdelim.join([justify(str(item),width) for (item,width) in zip(row,colWidths)])) if header: print(borderline) header=False
[ "def", "_print_table", "(", "rows", ",", "header", "=", "True", ")", ":", "border", "=", "\"=\"", "# vertical delimiter", "vdelim", "=", "\" | \"", "# padding nr. of spaces are left around the longest element in the", "# column", "padding", "=", "1", "# may be left,center,right", "justify", "=", "'right'", "justify", "=", "{", "'left'", ":", "str", ".", "ljust", ",", "'center'", ":", "str", ".", "center", ",", "'right'", ":", "str", ".", "rjust", "}", "[", "justify", ".", "lower", "(", ")", "]", "# calculate column widths (longest item in each col", "# plus \"padding\" nr of spaces on both sides)", "cols", "=", "zip", "(", "*", "rows", ")", "colWidths", "=", "[", "max", "(", "[", "len", "(", "str", "(", "item", ")", ")", "+", "2", "*", "padding", "for", "item", "in", "col", "]", ")", "for", "col", "in", "cols", "]", "borderline", "=", "vdelim", ".", "join", "(", "[", "w", "*", "border", "for", "w", "in", "colWidths", "]", ")", "for", "row", "in", "rows", ":", "print", "(", "vdelim", ".", "join", "(", "[", "justify", "(", "str", "(", "item", ")", ",", "width", ")", "for", "(", "item", ",", "width", ")", "in", "zip", "(", "row", ",", "colWidths", ")", "]", ")", ")", "if", "header", ":", "print", "(", "borderline", ")", "header", "=", "False" ]
Print a list of lists as a pretty table. Keyword arguments: header -- if True the first row is treated as a table header inspired by http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/267662
[ "Print", "a", "list", "of", "lists", "as", "a", "pretty", "table", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/summary.py#L204-L232
train
Print a list of lists as a pretty table.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmF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DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + '\062' + chr(51), 0b1000), nzTpIcepk0o8(chr(1193 - 1145) + chr(0b100111 + 0o110) + chr(49) + chr(49) + chr(48), 0b1000), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(111) + chr(50) + chr(49) + chr(0b1011 + 0o46), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + '\x31' + '\065', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + chr(49) + chr(52), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(0b110011) + '\x32', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + chr(0b110101), 46981 - 46973), nzTpIcepk0o8(chr(48) + chr(11908 - 11797) + chr(0b110010) + '\063', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + chr(51) + '\x37', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + chr(2022 - 1971) + chr(999 - 948), 0o10), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b101 + 0o152) + '\065' + chr(78 - 26), 0b1000), nzTpIcepk0o8(chr(903 - 855) + chr(111) + chr(52) + chr(49), 5396 - 5388), nzTpIcepk0o8(chr(0b110000) + chr(0b1011110 + 0o21) + '\x33' + chr(0b110010) + chr(50), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1822 - 1771) + '\x36' + chr(0b100111 + 0o13), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b101110 + 0o5) + chr(54), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + '\x35' + '\x35', 0o10), nzTpIcepk0o8(chr(1838 - 1790) + chr(111) + chr(0b110011) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(111) + '\x33' + '\x32' + '\x31', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(55) + chr(0b110011), 46713 - 46705), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(662 - 612) + '\067', 0o10), nzTpIcepk0o8(chr(1926 - 1878) + '\157' + '\067' + chr(0b110100 + 0o0), 0b1000), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\157' + '\067' + '\x30', 59811 - 59803), nzTpIcepk0o8(chr(48) + chr(0b1011010 + 0o25) + chr(0b100110 + 0o20) + chr(48), 665 - 657), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(0b110111) + chr(0b11001 + 0o32), 0o10), nzTpIcepk0o8(chr(48) + chr(0b11 + 0o154) + '\x33' + '\x34', 0o10), nzTpIcepk0o8(chr(576 - 528) + chr(0b1101111) + chr(1933 - 1882) + chr(2220 - 2166) + chr(50), 8), nzTpIcepk0o8(chr(1335 - 1287) + chr(111) + '\x32' + '\x31' + '\x34', 8), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(0b110011) + '\061', 2162 - 2154), nzTpIcepk0o8(chr(0b110000) + chr(10625 - 10514) + '\065' + chr(52), 8), nzTpIcepk0o8(chr(985 - 937) + '\157' + '\064' + chr(53), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(576 - 527) + chr(54) + chr(2124 - 2071), 46030 - 46022), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b111001 + 0o66) + '\x31' + chr(0b1011 + 0o53), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(1188 - 1133), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + chr(0b110100) + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001 + 0o2) + '\x33', 0o10), nzTpIcepk0o8(chr(107 - 59) + chr(111) + chr(0b110001) + '\064' + chr(661 - 607), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + '\060' + '\064', 0o10), nzTpIcepk0o8(chr(830 - 782) + chr(0b1101111) + '\x33' + chr(53) + chr(254 - 200), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b10000 + 0o41) + chr(52) + chr(54), 8), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(111) + chr(0b110010) + '\063' + chr(50), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1773 - 1725) + chr(0b1010001 + 0o36) + '\x35' + chr(48), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xfd'), chr(0b10111 + 0o115) + '\x65' + chr(0b1100011) + chr(7706 - 7595) + '\x64' + chr(9534 - 9433))(chr(0b10010 + 0o143) + '\164' + chr(0b1100110) + chr(0b101101) + chr(931 - 875)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def pxCQmAihT770(AUW_CJJJXKka, jkp_M8Pp8CIt=nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001), 0b1000)): JBBblcuB3OqR = roI3spqORKae(ES5oEprVxulp(b'\xee'), '\x64' + chr(5249 - 5148) + chr(0b1011110 + 0o5) + '\x6f' + '\144' + '\x65')(chr(117) + chr(3985 - 3869) + chr(1828 - 1726) + chr(0b101101) + '\x38') ijkMtqWn4iZA = roI3spqORKae(ES5oEprVxulp(b'\xf34\xa9'), '\x64' + '\x65' + chr(0b10010 + 0o121) + chr(1358 - 1247) + chr(100) + chr(0b1100101))(chr(117) + chr(4682 - 4566) + chr(4527 - 4425) + chr(285 - 240) + '\x38') UXh69pZlc4If = nzTpIcepk0o8('\x30' + '\157' + chr(49), 8) F0EKHrnVmG9O = roI3spqORKae(ES5oEprVxulp(b'\xa1!\xee\xe5\xf8'), chr(0b1010011 + 0o21) + chr(101) + '\x63' + '\157' + chr(0b1001110 + 0o26) + '\145')(chr(8547 - 8430) + chr(1907 - 1791) + '\146' + chr(45) + chr(56)) F0EKHrnVmG9O = {roI3spqORKae(ES5oEprVxulp(b'\xbf-\xef\xf9'), chr(0b1100100) + chr(101) + chr(8791 - 8692) + chr(111) + chr(0b110000 + 0o64) + '\145')(chr(0b101000 + 0o115) + chr(9799 - 9683) + chr(0b111001 + 0o55) + '\055' + chr(1691 - 1635)): N9zlRy29S1SS.ljust, roI3spqORKae(ES5oEprVxulp(b'\xb0-\xe7\xf9\xe9\xe8'), chr(0b1100100) + '\x65' + chr(99) + chr(7687 - 7576) + '\144' + chr(5968 - 5867))('\165' + chr(0b1110 + 0o146) + '\146' + chr(45) + '\070'): N9zlRy29S1SS.YAVVfOMUvAIv, roI3spqORKae(ES5oEprVxulp(b'\xa1!\xee\xe5\xf8'), chr(7551 - 7451) + chr(0b1000001 + 0o44) + chr(99) + '\157' + chr(100) + chr(101))(chr(13605 - 13488) + chr(116) + '\146' + '\x2d' + chr(548 - 492)): N9zlRy29S1SS.rjust}[F0EKHrnVmG9O.Xn8ENWMZdIRt()] Y2QfnnvVOo8E = TxMFWa_Xzviv(*AUW_CJJJXKka) ufUJ6s7zSuwh = [KV9ckIhroIia([ftfygxgFas5X(N9zlRy29S1SS(IZ1I2J8X1CQz)) + nzTpIcepk0o8('\x30' + '\x6f' + chr(50), 0o10) * UXh69pZlc4If for IZ1I2J8X1CQz in hRTUxJgvuslu]) for hRTUxJgvuslu in Y2QfnnvVOo8E] ArOG4war07qt = ijkMtqWn4iZA.Y4yM9BcfTCNq([sm7_CLmeWGR7 * JBBblcuB3OqR for sm7_CLmeWGR7 in ufUJ6s7zSuwh]) for o6UWUO21mH25 in AUW_CJJJXKka: v8jsMqaYV6U2(roI3spqORKae(ijkMtqWn4iZA, roI3spqORKae(ES5oEprVxulp(b'\x8a|\xf0\xc0\xb5\xd8~u\xcb\x98bP'), chr(0b100101 + 0o77) + chr(0b111100 + 0o51) + chr(0b10101 + 0o116) + chr(0b1101111) + chr(5243 - 5143) + chr(0b11101 + 0o110))(chr(117) + '\164' + '\146' + '\055' + chr(1994 - 1938)))([F0EKHrnVmG9O(N9zlRy29S1SS(IZ1I2J8X1CQz), dH3vcKdvgBu0) for (IZ1I2J8X1CQz, dH3vcKdvgBu0) in TxMFWa_Xzviv(o6UWUO21mH25, ufUJ6s7zSuwh)])) if jkp_M8Pp8CIt: v8jsMqaYV6U2(ArOG4war07qt) jkp_M8Pp8CIt = nzTpIcepk0o8(chr(0b1100 + 0o44) + '\x6f' + chr(0b110000), 59271 - 59263)
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/pympler/summary.py
_repr
def _repr(o, verbosity=1): """Get meaning object representation. This function should be used when the simple str(o) output would result in too general data. E.g. "<type 'instance'" is less meaningful than "instance: Foo". Keyword arguments: verbosity -- if True the first row is treated as a table header """ res = "" t = type(o) if (verbosity == 0) or (t not in representations): res = str(t) else: verbosity -= 1 if len(representations[t]) < verbosity: verbosity = len(representations[t]) - 1 res = representations[t][verbosity](o) res = address.sub('', res) res = type_prefix.sub('', res) res = type_suffix.sub('', res) return res
python
def _repr(o, verbosity=1): """Get meaning object representation. This function should be used when the simple str(o) output would result in too general data. E.g. "<type 'instance'" is less meaningful than "instance: Foo". Keyword arguments: verbosity -- if True the first row is treated as a table header """ res = "" t = type(o) if (verbosity == 0) or (t not in representations): res = str(t) else: verbosity -= 1 if len(representations[t]) < verbosity: verbosity = len(representations[t]) - 1 res = representations[t][verbosity](o) res = address.sub('', res) res = type_prefix.sub('', res) res = type_suffix.sub('', res) return res
[ "def", "_repr", "(", "o", ",", "verbosity", "=", "1", ")", ":", "res", "=", "\"\"", "t", "=", "type", "(", "o", ")", "if", "(", "verbosity", "==", "0", ")", "or", "(", "t", "not", "in", "representations", ")", ":", "res", "=", "str", "(", "t", ")", "else", ":", "verbosity", "-=", "1", "if", "len", "(", "representations", "[", "t", "]", ")", "<", "verbosity", ":", "verbosity", "=", "len", "(", "representations", "[", "t", "]", ")", "-", "1", "res", "=", "representations", "[", "t", "]", "[", "verbosity", "]", "(", "o", ")", "res", "=", "address", ".", "sub", "(", "''", ",", "res", ")", "res", "=", "type_prefix", ".", "sub", "(", "''", ",", "res", ")", "res", "=", "type_suffix", ".", "sub", "(", "''", ",", "res", ")", "return", "res" ]
Get meaning object representation. This function should be used when the simple str(o) output would result in too general data. E.g. "<type 'instance'" is less meaningful than "instance: Foo". Keyword arguments: verbosity -- if True the first row is treated as a table header
[ "Get", "meaning", "object", "representation", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/summary.py#L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2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + '\157' + chr(50) + chr(0b101101 + 0o7) + chr(48), 5694 - 5686), nzTpIcepk0o8(chr(48) + chr(0b1101111 + 0o0) + '\x32' + '\x37' + '\064', 0b1000), nzTpIcepk0o8('\060' + chr(893 - 782) + '\x32' + chr(0b110011) + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + chr(0b11000 + 0o31) + '\066', 54944 - 54936), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1101111) + '\x33' + chr(0b101001 + 0o10) + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + '\x33' + chr(1045 - 993), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + chr(50) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(51) + chr(499 - 447) + '\067', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10010 + 0o40) + '\064', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(356 - 307) + chr(50) + chr(1244 - 1192), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2327 - 2275) + chr(917 - 865), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101110 + 0o1) + chr(0b110001) + chr(0b110101) + chr(54), 0b1000), nzTpIcepk0o8(chr(1305 - 1257) + '\x6f' + chr(1308 - 1257) + chr(54) + chr(51), 13620 - 13612), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1000 + 0o147) + chr(0b1011 + 0o46) + '\x30' + chr(1202 - 1152), ord("\x08")), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(111) + chr(51) + chr(0b110111) + chr(0b1100 + 0o46), 32116 - 32108), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b11011 + 0o30) + '\064' + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + chr(12103 - 11992) + '\x31' + chr(0b110111) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(292 - 181) + chr(0b110111) + chr(248 - 200), 0b1000), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(111) + chr(287 - 236) + '\x34' + chr(0b110110), 41915 - 41907), nzTpIcepk0o8('\x30' + chr(111) + '\061' + chr(0b110110) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(1858 - 1810) + chr(0b1101111) + '\x33' + chr(0b110001) + chr(0b110101), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(1388 - 1336) + '\061', 45118 - 45110), nzTpIcepk0o8('\060' + chr(10330 - 10219) + chr(0b11010 + 0o30) + chr(0b110 + 0o52), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(52) + chr(0b100111 + 0o14), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + '\x31' + '\x31', 41494 - 41486), nzTpIcepk0o8(chr(2128 - 2080) + chr(111) + chr(0b110011) + chr(0b101010 + 0o12) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101100 + 0o3) + '\x33' + '\x36' + chr(0b100 + 0o62), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1 + 0o156) + chr(50) + chr(52) + '\065', ord("\x08")), nzTpIcepk0o8(chr(2277 - 2229) + '\157' + chr(0b0 + 0o65) + chr(1979 - 1926), 26537 - 26529), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110 + 0o54) + chr(0b110101) + chr(2577 - 2524), 0o10), nzTpIcepk0o8(chr(2276 - 2228) + chr(8012 - 7901) + chr(0b111 + 0o54) + chr(2866 - 2812) + chr(933 - 879), 8), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(5702 - 5591) + chr(54) + chr(0b110010), 9540 - 9532), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001 + 0o2) + chr(0b110111) + chr(2161 - 2107), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x32' + '\060' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\x6f' + '\061' + chr(547 - 495) + chr(48), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1011 + 0o144) + chr(52) + chr(2581 - 2530), 11239 - 11231), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x33' + chr(0b100101 + 0o13) + chr(0b110010), 34630 - 34622), nzTpIcepk0o8(chr(503 - 455) + chr(11477 - 11366) + chr(51) + '\063' + chr(662 - 612), 0o10), nzTpIcepk0o8('\060' + chr(10312 - 10201) + chr(0b100 + 0o57) + '\065' + chr(49), 0o10), nzTpIcepk0o8('\x30' + chr(0b1011001 + 0o26) + chr(1707 - 1658) + '\x32' + '\065', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(111) + '\065' + chr(48), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x8e'), chr(0b111001 + 0o53) + chr(101) + '\143' + '\157' + chr(100) + chr(276 - 175))(chr(0b1110101) + '\x74' + chr(4795 - 4693) + '\055' + chr(0b111000 + 0o0)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def unzbAI29YRAb(WgZUEOuIyTUO, FqWPd120bAUG=nzTpIcepk0o8('\060' + chr(0b11101 + 0o122) + '\x31', 0o10)): _XdQFJpnzJor = roI3spqORKae(ES5oEprVxulp(b''), chr(0b1100100) + '\x65' + chr(99) + '\x6f' + '\x64' + '\145')(chr(11218 - 11101) + chr(0b1110100) + chr(0b1100110) + '\x2d' + '\070') h3Vc_4wxEbgd = MJ07XsN5uFgW(WgZUEOuIyTUO) if FqWPd120bAUG == nzTpIcepk0o8(chr(160 - 112) + chr(0b1101111) + '\060', 0b1000) or h3Vc_4wxEbgd not in qMH6E6SpdyrZ: _XdQFJpnzJor = N9zlRy29S1SS(h3Vc_4wxEbgd) else: FqWPd120bAUG -= nzTpIcepk0o8(chr(48) + '\x6f' + chr(49), 8) if ftfygxgFas5X(qMH6E6SpdyrZ[h3Vc_4wxEbgd]) < FqWPd120bAUG: FqWPd120bAUG = ftfygxgFas5X(qMH6E6SpdyrZ[h3Vc_4wxEbgd]) - nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b101100 + 0o5), 8) _XdQFJpnzJor = qMH6E6SpdyrZ[h3Vc_4wxEbgd][FqWPd120bAUG](WgZUEOuIyTUO) _XdQFJpnzJor = en8jF5h3sD4W._zPndKq6xMgp(roI3spqORKae(ES5oEprVxulp(b''), '\x64' + chr(0b1001001 + 0o34) + '\x63' + chr(0b1100010 + 0o15) + '\144' + chr(9363 - 9262))(chr(0b111110 + 0o67) + chr(116) + chr(782 - 680) + chr(0b1110 + 0o37) + chr(1934 - 1878)), _XdQFJpnzJor) _XdQFJpnzJor = _EvKW5GohfcG._zPndKq6xMgp(roI3spqORKae(ES5oEprVxulp(b''), chr(0b1001110 + 0o26) + chr(101) + chr(0b1100011) + chr(12005 - 11894) + '\144' + '\x65')(chr(0b1110101) + chr(11980 - 11864) + chr(0b110001 + 0o65) + chr(1116 - 1071) + chr(2690 - 2634)), _XdQFJpnzJor) _XdQFJpnzJor = mdNTD66OUCZ5._zPndKq6xMgp(roI3spqORKae(ES5oEprVxulp(b''), '\144' + '\x65' + chr(0b1100011) + chr(0b1011110 + 0o21) + chr(0b1100100) + '\x65')('\x75' + '\164' + chr(102) + chr(1191 - 1146) + chr(56)), _XdQFJpnzJor) return _XdQFJpnzJor
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/pympler/summary.py
_traverse
def _traverse(summary, function, *args): """Traverse all objects of a summary and call function with each as a parameter. Using this function, the following objects will be traversed: - the summary - each row - each item of a row """ function(summary, *args) for row in summary: function(row, *args) for item in row: function(item, *args)
python
def _traverse(summary, function, *args): """Traverse all objects of a summary and call function with each as a parameter. Using this function, the following objects will be traversed: - the summary - each row - each item of a row """ function(summary, *args) for row in summary: function(row, *args) for item in row: function(item, *args)
[ "def", "_traverse", "(", "summary", ",", "function", ",", "*", "args", ")", ":", "function", "(", "summary", ",", "*", "args", ")", "for", "row", "in", "summary", ":", "function", "(", "row", ",", "*", "args", ")", "for", "item", "in", "row", ":", "function", "(", "item", ",", "*", "args", ")" ]
Traverse all objects of a summary and call function with each as a parameter. Using this function, the following objects will be traversed: - the summary - each row - each item of a row
[ "Traverse", "all", "objects", "of", "a", "summary", "and", "call", "function", "with", "each", "as", "a", "parameter", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/summary.py#L268-L281
train
Traverse all objects of a summary and call function with each as a parameter.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT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ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1695 - 1647) + chr(3031 - 2920) + '\065', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(2597 - 2545) + chr(54), 16587 - 16579), nzTpIcepk0o8(chr(0b110000) + chr(0b100001 + 0o116) + chr(52), 39855 - 39847), nzTpIcepk0o8('\x30' + chr(3187 - 3076) + '\x33' + chr(1331 - 1282) + '\060', ord("\x08")), nzTpIcepk0o8(chr(594 - 546) + chr(0b111111 + 0o60) + '\x32' + '\064' + chr(53), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(49) + chr(0b110100 + 0o0) + chr(0b101101 + 0o7), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(11645 - 11534) + '\061' + '\063' + chr(55), 38281 - 38273), nzTpIcepk0o8(chr(2278 - 2230) + chr(0b10000 + 0o137) + chr(2313 - 2263) + chr(0b11000 + 0o33) + chr(55), 0o10), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1101111) + '\x32' + chr(2373 - 2322) + chr(0b101001 + 0o13), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(0b110111) + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(0b1011100 + 0o23) + '\x33' + chr(0b1110 + 0o46) + chr(0b110000 + 0o3), 0b1000), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\x6f' + '\x33' + chr(0b10 + 0o60) + chr(0b110000), 0o10), nzTpIcepk0o8('\x30' + chr(0b1 + 0o156) + chr(50) + chr(54), 59736 - 59728), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b1000 + 0o53) + chr(0b100 + 0o55) + chr(51), 0o10), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(8547 - 8436) + '\062' + '\x37' + '\064', ord("\x08")), nzTpIcepk0o8(chr(1154 - 1106) + chr(0b1101111) + chr(53) + '\063', 18391 - 18383), nzTpIcepk0o8(chr(2200 - 2152) + '\157' + chr(94 - 43) + chr(1496 - 1448) + '\062', 0b1000), nzTpIcepk0o8(chr(495 - 447) + chr(0b110 + 0o151) + chr(0b100001 + 0o21) + chr(0b11111 + 0o27), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1752 - 1702) + chr(0b110111) + chr(1508 - 1459), 34617 - 34609), nzTpIcepk0o8(chr(559 - 511) + chr(111) + chr(50) + '\061' + chr(1770 - 1720), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(0b110000) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(0b100000 + 0o26) + '\x36', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10110 + 0o34) + chr(55) + chr(0b10100 + 0o43), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001 + 0o1) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + chr(0b11 + 0o55) + chr(1638 - 1584), 0b1000), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(111) + chr(51) + chr(1446 - 1396) + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(8692 - 8581) + '\x33' + '\x31' + chr(52), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + chr(0b110001) + '\066', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x35' + chr(932 - 883), 0b1000), nzTpIcepk0o8(chr(174 - 126) + chr(0b110000 + 0o77) + chr(645 - 595) + chr(1833 - 1784) + chr(0b101 + 0o60), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + '\x37' + '\063', 27052 - 27044), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + chr(52) + chr(49), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1542 - 1491) + chr(0b10100 + 0o34) + '\x31', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\x31' + chr(0b110111 + 0o0) + chr(0b110001), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b10110 + 0o37), 8), nzTpIcepk0o8(chr(0b110000) + chr(11633 - 11522) + '\x32' + '\x36' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(48) + chr(3539 - 3428) + chr(1948 - 1897) + chr(1436 - 1385) + '\062', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\062' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(751 - 702) + chr(677 - 627) + chr(0b10101 + 0o34), 33584 - 33576), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + '\062', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\065' + chr(48), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'+'), chr(100) + '\145' + '\143' + chr(3476 - 3365) + chr(100) + chr(5720 - 5619))(chr(117) + chr(0b1110100) + chr(0b1100 + 0o132) + '\055' + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def C0MzLArSyZn7(QEXp0HPqz7Se, FGXEL9Pjw9PS, *eemPYp2vtTSr): FGXEL9Pjw9PS(QEXp0HPqz7Se, *eemPYp2vtTSr) for o6UWUO21mH25 in QEXp0HPqz7Se: FGXEL9Pjw9PS(o6UWUO21mH25, *eemPYp2vtTSr) for IZ1I2J8X1CQz in o6UWUO21mH25: FGXEL9Pjw9PS(IZ1I2J8X1CQz, *eemPYp2vtTSr)
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/pympler/summary.py
_subtract
def _subtract(summary, o): """Remove object o from the summary by subtracting it's size.""" found = False row = [_repr(o), 1, _getsizeof(o)] for r in summary: if r[0] == row[0]: (r[1], r[2]) = (r[1] - row[1], r[2] - row[2]) found = True if not found: summary.append([row[0], -row[1], -row[2]]) return summary
python
def _subtract(summary, o): """Remove object o from the summary by subtracting it's size.""" found = False row = [_repr(o), 1, _getsizeof(o)] for r in summary: if r[0] == row[0]: (r[1], r[2]) = (r[1] - row[1], r[2] - row[2]) found = True if not found: summary.append([row[0], -row[1], -row[2]]) return summary
[ "def", "_subtract", "(", "summary", ",", "o", ")", ":", "found", "=", "False", "row", "=", "[", "_repr", "(", "o", ")", ",", "1", ",", "_getsizeof", "(", "o", ")", "]", "for", "r", "in", "summary", ":", "if", "r", "[", "0", "]", "==", "row", "[", "0", "]", ":", "(", "r", "[", "1", "]", ",", "r", "[", "2", "]", ")", "=", "(", "r", "[", "1", "]", "-", "row", "[", "1", "]", ",", "r", "[", "2", "]", "-", "row", "[", "2", "]", ")", "found", "=", "True", "if", "not", "found", ":", "summary", ".", "append", "(", "[", "row", "[", "0", "]", ",", "-", "row", "[", "1", "]", ",", "-", "row", "[", "2", "]", "]", ")", "return", "summary" ]
Remove object o from the summary by subtracting it's size.
[ "Remove", "object", "o", "from", "the", "summary", "by", "subtracting", "it", "s", "size", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/summary.py#L283-L293
train
Remove object o from the summary by subtracting it s size.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDE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ning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(6285 - 6174) + '\061' + chr(787 - 738) + '\x34', 0o10), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(111) + chr(49) + chr(350 - 297) + '\065', 0b1000), nzTpIcepk0o8(chr(2072 - 2024) + chr(0b1101111) + chr(1775 - 1726) + chr(0b100000 + 0o27) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(511 - 457) + chr(993 - 939), 0b1000), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(6669 - 6558) + chr(0b10001 + 0o42) + chr(875 - 820), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(1960 - 1910) + chr(2482 - 2427) + chr(50), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + chr(55) + chr(2480 - 2427), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + '\067' + chr(52), ord("\x08")), nzTpIcepk0o8(chr(267 - 219) + '\x6f' + chr(0b10110 + 0o33) + chr(956 - 908) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + '\066' + chr(1045 - 994), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + chr(0b1 + 0o65) + chr(0b110011), 38990 - 38982), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + '\065', 36873 - 36865), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110110) + '\x32', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + '\x37' + chr(1458 - 1407), ord("\x08")), nzTpIcepk0o8(chr(2183 - 2135) + chr(0b1101111) + chr(165 - 112) + chr(0b110000), 30912 - 30904), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(3897 - 3786) + chr(1534 - 1483) + chr(205 - 150) + chr(50), 0b1000), nzTpIcepk0o8(chr(1293 - 1245) + '\157' + chr(51) + '\066' + chr(0b10 + 0o60), 0b1000), nzTpIcepk0o8(chr(48) + chr(952 - 841) + chr(0b110001) + chr(49) + chr(48), 54847 - 54839), nzTpIcepk0o8(chr(582 - 534) + chr(6922 - 6811) + '\x31' + chr(0b1010 + 0o55) + '\061', 0b1000), nzTpIcepk0o8(chr(1731 - 1683) + chr(111) + chr(0b101100 + 0o6) + chr(0b110110) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1001011 + 0o44) + chr(0b110001) + '\x36' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(707 - 659) + chr(111) + chr(55) + chr(676 - 623), 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1101111) + chr(0b110011) + chr(0b11101 + 0o25) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\064' + '\065', 0o10), nzTpIcepk0o8(chr(943 - 895) + chr(0b1101111) + chr(1614 - 1564) + chr(51) + '\x34', 0o10), nzTpIcepk0o8('\060' + chr(9597 - 9486) + chr(151 - 98) + chr(49), 52506 - 52498), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(1484 - 1373) + chr(54) + chr(50), 8), nzTpIcepk0o8(chr(1446 - 1398) + chr(111) + chr(0b101110 + 0o4) + '\x36' + chr(0b110110 + 0o1), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\062' + chr(54), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(525 - 473) + chr(269 - 217), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(1206 - 1152) + chr(376 - 324), 8), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(111) + '\061' + chr(0b1101 + 0o51) + '\x35', 0o10), nzTpIcepk0o8(chr(1647 - 1599) + '\x6f' + '\061' + '\067' + '\x33', 0o10), nzTpIcepk0o8(chr(102 - 54) + '\157' + chr(0b110011) + chr(1174 - 1123) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + chr(0b1111 + 0o44) + '\064', 0o10), nzTpIcepk0o8('\060' + chr(6671 - 6560) + chr(51) + chr(0b101000 + 0o11), ord("\x08")), nzTpIcepk0o8(chr(984 - 936) + '\x6f' + '\x32' + chr(0b100000 + 0o24) + '\062', 14123 - 14115), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110101) + chr(52), 40340 - 40332), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1100 + 0o143) + chr(0b11 + 0o61) + chr(0b110001), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b1101 + 0o43) + '\x6f' + chr(0b110101) + '\x30', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'b'), chr(0b1100100) + chr(101) + '\143' + chr(11043 - 10932) + chr(0b1011001 + 0o13) + '\145')(chr(9738 - 9621) + '\164' + '\x66' + chr(45) + chr(1055 - 999)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def cBcuRfcPxnyT(QEXp0HPqz7Se, WgZUEOuIyTUO): yGnyZM4lBnhJ = nzTpIcepk0o8(chr(48) + '\157' + '\060', 9663 - 9655) o6UWUO21mH25 = [unzbAI29YRAb(WgZUEOuIyTUO), nzTpIcepk0o8(chr(1669 - 1621) + chr(0b1101000 + 0o7) + '\061', 0b1000), kACApO6fjbcK(WgZUEOuIyTUO)] for LCrwg7lcbmU9 in QEXp0HPqz7Se: if LCrwg7lcbmU9[nzTpIcepk0o8('\x30' + '\157' + '\x30', 8)] == o6UWUO21mH25[nzTpIcepk0o8('\060' + chr(7124 - 7013) + chr(386 - 338), 8)]: (LCrwg7lcbmU9[nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1101111) + chr(247 - 198), 8)], LCrwg7lcbmU9[nzTpIcepk0o8(chr(48) + chr(0b11001 + 0o126) + '\x32', 0o10)]) = (LCrwg7lcbmU9[nzTpIcepk0o8('\060' + chr(10517 - 10406) + chr(49), 8)] - o6UWUO21mH25[nzTpIcepk0o8(chr(377 - 329) + chr(111) + chr(0b11 + 0o56), 8)], LCrwg7lcbmU9[nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010), 8)] - o6UWUO21mH25[nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32', 8)]) yGnyZM4lBnhJ = nzTpIcepk0o8('\060' + chr(111) + chr(49), 8) if not yGnyZM4lBnhJ: roI3spqORKae(QEXp0HPqz7Se, roI3spqORKae(ES5oEprVxulp(b'\x049.\x82g\xdd\xba\xd3+\x1c\xe6('), chr(0b1011101 + 0o7) + chr(101) + chr(0b1001111 + 0o24) + '\157' + chr(0b1100100) + chr(0b1010100 + 0o21))(chr(0b1110101) + chr(0b101011 + 0o111) + '\146' + chr(612 - 567) + chr(0b10001 + 0o47)))([o6UWUO21mH25[nzTpIcepk0o8('\x30' + chr(111) + chr(48), 8)], -o6UWUO21mH25[nzTpIcepk0o8(chr(487 - 439) + chr(0b1101111) + chr(1217 - 1168), 8)], -o6UWUO21mH25[nzTpIcepk0o8(chr(48) + chr(0b1101100 + 0o3) + chr(0b1001 + 0o51), 8)]]) return QEXp0HPqz7Se
lrq3000/pyFileFixity
pyFileFixity/rfigc.py
check_structure
def check_structure(filepath): """Returns False if the file is okay, None if file format is unsupported by PIL/PILLOW, or returns an error string if the file is corrupt.""" #http://stackoverflow.com/questions/1401527/how-do-i-programmatically-check-whether-an-image-png-jpeg-or-gif-is-corrupted/1401565#1401565 # Check structure only for images (not supported for other types currently) if filepath.lower().endswith(tuple(img_filter)): try: #try: im = PIL.Image.open(filepath) #except IOError: # File format not supported by PIL, we skip the check_structure - ARG this is also raised if a supported image file is corrupted... #print("File: %s: DETECTNOPE" % filepath) #return None im.verify() # If an error occurred, the structure is corrupted except Exception as e: return str(e) # Else no exception, there's no corruption return False # Else the format does not currently support structure checking, we just return None to signal we didin't check else: return None
python
def check_structure(filepath): """Returns False if the file is okay, None if file format is unsupported by PIL/PILLOW, or returns an error string if the file is corrupt.""" #http://stackoverflow.com/questions/1401527/how-do-i-programmatically-check-whether-an-image-png-jpeg-or-gif-is-corrupted/1401565#1401565 # Check structure only for images (not supported for other types currently) if filepath.lower().endswith(tuple(img_filter)): try: #try: im = PIL.Image.open(filepath) #except IOError: # File format not supported by PIL, we skip the check_structure - ARG this is also raised if a supported image file is corrupted... #print("File: %s: DETECTNOPE" % filepath) #return None im.verify() # If an error occurred, the structure is corrupted except Exception as e: return str(e) # Else no exception, there's no corruption return False # Else the format does not currently support structure checking, we just return None to signal we didin't check else: return None
[ "def", "check_structure", "(", "filepath", ")", ":", "#http://stackoverflow.com/questions/1401527/how-do-i-programmatically-check-whether-an-image-png-jpeg-or-gif-is-corrupted/1401565#1401565", "# Check structure only for images (not supported for other types currently)", "if", "filepath", ".", "lower", "(", ")", ".", "endswith", "(", "tuple", "(", "img_filter", ")", ")", ":", "try", ":", "#try:", "im", "=", "PIL", ".", "Image", ".", "open", "(", "filepath", ")", "#except IOError: # File format not supported by PIL, we skip the check_structure - ARG this is also raised if a supported image file is corrupted...", "#print(\"File: %s: DETECTNOPE\" % filepath)", "#return None", "im", ".", "verify", "(", ")", "# If an error occurred, the structure is corrupted", "except", "Exception", "as", "e", ":", "return", "str", "(", "e", ")", "# Else no exception, there's no corruption", "return", "False", "# Else the format does not currently support structure checking, we just return None to signal we didin't check", "else", ":", "return", "None" ]
Returns False if the file is okay, None if file format is unsupported by PIL/PILLOW, or returns an error string if the file is corrupt.
[ "Returns", "False", "if", "the", "file", "is", "okay", "None", "if", "file", "format", "is", "unsupported", "by", "PIL", "/", "PILLOW", "or", "returns", "an", "error", "string", "if", "the", "file", "is", "corrupt", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/rfigc.py#L76-L96
train
Checks if the file is okay returns False if the file is not okay None if the file is corrupt
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_H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tJqMV,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101111) + chr(0b110011) + '\063', 52524 - 52516), nzTpIcepk0o8(chr(48) + '\157' + '\062' + chr(51) + chr(0b101011 + 0o5), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(3609 - 3498) + chr(296 - 246) + chr(51) + '\060', 8), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1101111) + chr(49) + chr(0b100001 + 0o22) + chr(2611 - 2558), 31734 - 31726), nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(361 - 308) + '\064', 15686 - 15678), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b1101111) + chr(50) + '\060', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + '\060' + '\063', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100111 + 0o110) + '\061' + chr(0b110000) + chr(985 - 932), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(0b101010 + 0o15) + chr(638 - 590), 0b1000), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\x6f' + chr(278 - 227) + chr(0b11010 + 0o35) + chr(0b101011 + 0o14), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + chr(444 - 393) + chr(0b110001), 6477 - 6469), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(111) + '\x33' + chr(0b110010) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(2168 - 2120) + '\x6f' + '\x32' + '\061' + chr(53), 0o10), nzTpIcepk0o8(chr(1763 - 1715) + '\x6f' + chr(2595 - 2544) + chr(0b110001) + chr(0b110101 + 0o2), 55728 - 55720), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b1101111) + chr(0b110001) + '\062' + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + '\x30', 8), nzTpIcepk0o8(chr(194 - 146) + chr(0b1010111 + 0o30) + '\x33' + chr(0b110011) + chr(0b110010), 49562 - 49554), nzTpIcepk0o8('\x30' + '\157' + chr(2312 - 2262) + chr(0b100010 + 0o21) + chr(0b110110), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b100 + 0o57) + '\x37' + chr(0b110000), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110111), 57215 - 57207), nzTpIcepk0o8(chr(48) + chr(6348 - 6237) + chr(1790 - 1739) + chr(0b100011 + 0o22) + '\x34', 21970 - 21962), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(0b110110) + chr(0b110101), 56835 - 56827), nzTpIcepk0o8(chr(1076 - 1028) + chr(6679 - 6568) + chr(0b110010) + '\060' + chr(48), 0o10), nzTpIcepk0o8('\x30' + chr(9288 - 9177) + '\061' + '\063' + chr(879 - 827), 0o10), nzTpIcepk0o8('\x30' + chr(6767 - 6656) + '\063' + '\x31' + chr(0b100000 + 0o26), 8284 - 8276), nzTpIcepk0o8('\x30' + '\157' + '\062' + '\063' + '\x37', 47565 - 47557), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(816 - 763) + chr(0b110110), 32249 - 32241), nzTpIcepk0o8(chr(0b110000) + chr(10801 - 10690) + chr(0b10000 + 0o47) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\063' + '\x32' + chr(0b110100 + 0o1), 0o10), nzTpIcepk0o8('\x30' + chr(8250 - 8139) + chr(50) + '\062' + '\x31', 61979 - 61971), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b1001011 + 0o44) + chr(49) + chr(0b110110 + 0o1) + chr(2122 - 2068), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + '\x37' + '\063', 0b1000), nzTpIcepk0o8(chr(1491 - 1443) + chr(0b111111 + 0o60) + chr(0b110001) + '\x30' + chr(1346 - 1295), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2021 - 1972) + chr(0b11100 + 0o30) + '\x36', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\x37' + chr(0b110111), 23169 - 23161), nzTpIcepk0o8('\060' + chr(8604 - 8493) + '\x33' + '\x36' + '\063', 0o10), nzTpIcepk0o8('\x30' + chr(1258 - 1147) + chr(0b110001 + 0o0) + chr(0b100010 + 0o21) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(491 - 443) + chr(8373 - 8262) + chr(2393 - 2344) + '\061' + chr(244 - 190), 0o10), nzTpIcepk0o8(chr(1902 - 1854) + '\x6f' + chr(0b110010) + chr(49) + chr(1765 - 1710), 9178 - 9170), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + chr(0b110100) + chr(2349 - 2299), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b1101111) + '\x35' + chr(1798 - 1750), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'5'), chr(100) + '\x65' + '\x63' + chr(2311 - 2200) + chr(0b1100100) + chr(813 - 712))(chr(117) + chr(11747 - 11631) + '\146' + chr(0b101101) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def N8zlHtNUrnmh(EbbNb3b9066e): if roI3spqORKae(EbbNb3b9066e.lower(), roI3spqORKae(ES5oEprVxulp(b'R\xa1\xfe\x16\xe5S\x02\t\x99\x8a\x93\xa2'), chr(0b1100100) + '\x65' + chr(0b1100011) + '\x6f' + '\144' + '\145')('\165' + chr(0b1110100) + chr(3901 - 3799) + chr(0b100101 + 0o10) + chr(0b100110 + 0o22)))(nfNqtJL5aRaY(sHhxMPamza6c)): try: AreS5V4GZTfl = rxEYfVGqVgcX.Image.DnU3Rq9N5ala(EbbNb3b9066e) roI3spqORKae(AreS5V4GZTfl, roI3spqORKae(ES5oEprVxulp(b'L\xf6\xaa\x16\xd8Zz\x14\x8f\xb7\x8c\x80'), chr(100) + chr(101) + '\x63' + chr(111) + chr(0b1100100) + '\x65')(chr(5979 - 5862) + chr(0b1110100) + '\146' + chr(1011 - 966) + chr(0b111000)))() except zfo2Sgkz3IVJ as wgf0sgcu_xPL: return N9zlRy29S1SS(wgf0sgcu_xPL) return nzTpIcepk0o8(chr(48) + chr(6664 - 6553) + '\x30', 30761 - 30753) else: return None
lrq3000/pyFileFixity
pyFileFixity/rfigc.py
generate_hashes
def generate_hashes(filepath, blocksize=65536): '''Generate several hashes (md5 and sha1) in a single sweep of the file. Using two hashes lowers the probability of collision and false negative (file modified but the hash is the same). Supports big files by streaming blocks by blocks to the hasher automatically. Blocksize can be any multiple of 128.''' # Init hashers hasher_md5 = hashlib.md5() hasher_sha1 = hashlib.sha1() # Read the file blocks by blocks with open(filepath, 'rb') as afile: buf = afile.read(blocksize) while len(buf) > 0: # Compute both hashes at the same time hasher_md5.update(buf) hasher_sha1.update(buf) # Load the next data block from file buf = afile.read(blocksize) return (hasher_md5.hexdigest(), hasher_sha1.hexdigest())
python
def generate_hashes(filepath, blocksize=65536): '''Generate several hashes (md5 and sha1) in a single sweep of the file. Using two hashes lowers the probability of collision and false negative (file modified but the hash is the same). Supports big files by streaming blocks by blocks to the hasher automatically. Blocksize can be any multiple of 128.''' # Init hashers hasher_md5 = hashlib.md5() hasher_sha1 = hashlib.sha1() # Read the file blocks by blocks with open(filepath, 'rb') as afile: buf = afile.read(blocksize) while len(buf) > 0: # Compute both hashes at the same time hasher_md5.update(buf) hasher_sha1.update(buf) # Load the next data block from file buf = afile.read(blocksize) return (hasher_md5.hexdigest(), hasher_sha1.hexdigest())
[ "def", "generate_hashes", "(", "filepath", ",", "blocksize", "=", "65536", ")", ":", "# Init hashers", "hasher_md5", "=", "hashlib", ".", "md5", "(", ")", "hasher_sha1", "=", "hashlib", ".", "sha1", "(", ")", "# Read the file blocks by blocks", "with", "open", "(", "filepath", ",", "'rb'", ")", "as", "afile", ":", "buf", "=", "afile", ".", "read", "(", "blocksize", ")", "while", "len", "(", "buf", ")", ">", "0", ":", "# Compute both hashes at the same time", "hasher_md5", ".", "update", "(", "buf", ")", "hasher_sha1", ".", "update", "(", "buf", ")", "# Load the next data block from file", "buf", "=", "afile", ".", "read", "(", "blocksize", ")", "return", "(", "hasher_md5", ".", "hexdigest", "(", ")", ",", "hasher_sha1", ".", "hexdigest", "(", ")", ")" ]
Generate several hashes (md5 and sha1) in a single sweep of the file. Using two hashes lowers the probability of collision and false negative (file modified but the hash is the same). Supports big files by streaming blocks by blocks to the hasher automatically. Blocksize can be any multiple of 128.
[ "Generate", "several", "hashes", "(", "md5", "and", "sha1", ")", "in", "a", "single", "sweep", "of", "the", "file", ".", "Using", "two", "hashes", "lowers", "the", "probability", "of", "collision", "and", "false", "negative", "(", "file", "modified", "but", "the", "hash", "is", "the", "same", ")", ".", "Supports", "big", "files", "by", "streaming", "blocks", "by", "blocks", "to", "the", "hasher", "automatically", ".", "Blocksize", "can", "be", "any", "multiple", "of", "128", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/rfigc.py#L98-L112
train
Generate several hashes at a single sweep of the file.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ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2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + chr(50) + chr(471 - 418), 0b1000), nzTpIcepk0o8(chr(561 - 513) + '\x6f' + '\x31' + chr(0b110110) + '\x33', 0o10), nzTpIcepk0o8('\060' + '\157' + '\062' + chr(53), 0o10), nzTpIcepk0o8(chr(2166 - 2118) + chr(0b1100100 + 0o13) + '\x31' + chr(2620 - 2565) + chr(0b10001 + 0o37), ord("\x08")), nzTpIcepk0o8('\060' + chr(5920 - 5809) + chr(0b10 + 0o57) + '\060' + chr(55), 3431 - 3423), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b111 + 0o54) + chr(51) + chr(0b110000), 18969 - 18961), nzTpIcepk0o8('\060' + chr(112 - 1) + '\062' + '\x30' + '\062', 47401 - 47393), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101110 + 0o5) + '\x33' + chr(54), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + chr(0b110110) + '\065', 0b1000), nzTpIcepk0o8(chr(48) + chr(1078 - 967) + chr(1064 - 1010) + chr(0b1001 + 0o51), 29075 - 29067), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x35', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1 + 0o156) + chr(0b1001 + 0o50) + chr(49) + chr(181 - 128), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(260 - 211) + '\x33' + '\x33', 0o10), nzTpIcepk0o8(chr(1007 - 959) + chr(8081 - 7970) + chr(0b1010 + 0o47) + '\062' + chr(0b110001), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(0b110101) + chr(2547 - 2492), 0b1000), nzTpIcepk0o8(chr(1609 - 1561) + chr(0b1101111) + '\x33' + chr(0b110100) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(867 - 819) + chr(9052 - 8941) + chr(0b11100 + 0o33) + chr(0b101 + 0o60), 6587 - 6579), nzTpIcepk0o8(chr(1900 - 1852) + chr(111) + chr(0b101110 + 0o3) + chr(52) + chr(54), 34431 - 34423), nzTpIcepk0o8(chr(0b10110 + 0o32) + '\x6f' + chr(50) + chr(0b110010) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(51) + chr(0b11000 + 0o32), 0o10), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(111) + chr(176 - 126) + chr(0b100010 + 0o21) + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\062' + '\060' + chr(837 - 785), 0b1000), nzTpIcepk0o8(chr(355 - 307) + '\157' + '\062' + '\060' + chr(50), 8), nzTpIcepk0o8('\x30' + chr(0b1001110 + 0o41) + '\x33' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b101011 + 0o104) + chr(1064 - 1013) + '\066' + chr(898 - 848), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b11111 + 0o120) + '\x37' + chr(1371 - 1318), 8), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + chr(0b110010) + chr(54) + '\062', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + '\063' + chr(0b100 + 0o56), 32677 - 32669), nzTpIcepk0o8('\060' + chr(7619 - 7508) + '\x35' + '\062', ord("\x08")), nzTpIcepk0o8(chr(1712 - 1664) + chr(6909 - 6798) + chr(0b1011 + 0o50), ord("\x08")), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\157' + '\x31' + chr(0b110000) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(206 - 158) + chr(111) + chr(0b110010) + chr(0b110111) + '\064', 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1101111) + chr(0b100 + 0o55) + '\065' + '\063', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + chr(0b110100) + '\x31', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(3788 - 3677) + chr(0b100101 + 0o14) + chr(0b10010 + 0o44) + chr(2098 - 2044), ord("\x08")), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b1101111) + '\062' + '\x31' + chr(0b10011 + 0o36), 0b1000), nzTpIcepk0o8(chr(793 - 745) + chr(0b1101111) + chr(677 - 622) + chr(2502 - 2447), 0b1000), nzTpIcepk0o8('\060' + chr(0b1001000 + 0o47) + '\062' + chr(0b100111 + 0o12) + chr(48), 0b1000), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(2601 - 2490) + '\061' + chr(0b110000) + chr(0b1100 + 0o50), 8), nzTpIcepk0o8(chr(48) + '\157' + chr(0b11000 + 0o37), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\157' + chr(0b101010 + 0o13) + chr(48), 27226 - 27218)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xbb'), '\x64' + '\x65' + chr(5860 - 5761) + '\x6f' + '\x64' + '\x65')(chr(117) + chr(10465 - 10349) + chr(0b1100110) + chr(0b10010 + 0o33) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def CO7LPUcm_Ouk(EbbNb3b9066e, ZcKogJN6rdxb=nzTpIcepk0o8(chr(0b1110 + 0o42) + '\157' + chr(0b110010) + chr(0b110000) + chr(48) + chr(48) + chr(48) + '\060', 0o10)): dJdicvHMMSO6 = SDv77BhJq2mr.UkKAQVUUW5oH() Vs25eWXKtjA9 = SDv77BhJq2mr.PV_6_udOPlJH() with DnU3Rq9N5ala(EbbNb3b9066e, roI3spqORKae(ES5oEprVxulp(b'\xe7\x11'), chr(0b1100100) + chr(0b110100 + 0o61) + chr(99) + '\157' + chr(0b1010001 + 0o23) + '\145')(chr(0b1100000 + 0o25) + chr(116) + chr(0b111010 + 0o54) + chr(0b101101) + '\070')) as WqvT4cQxqenW: nIuXIilShoNQ = WqvT4cQxqenW.eoXknH7XUn7m(ZcKogJN6rdxb) while ftfygxgFas5X(nIuXIilShoNQ) > nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x30', 0o10): roI3spqORKae(dJdicvHMMSO6, roI3spqORKae(ES5oEprVxulp(b'\xdf,~J\x0e\x81\xc0\xef\xd6Wt#'), chr(100) + chr(0b1011010 + 0o13) + chr(99) + chr(2466 - 2355) + chr(100) + '\145')(chr(7294 - 7177) + chr(116) + '\x66' + chr(0b0 + 0o55) + chr(56)))(nIuXIilShoNQ) roI3spqORKae(Vs25eWXKtjA9, roI3spqORKae(ES5oEprVxulp(b'\xdf,~J\x0e\x81\xc0\xef\xd6Wt#'), chr(0b1100100) + chr(5553 - 5452) + chr(0b10000 + 0o123) + chr(111) + '\144' + chr(101))('\165' + '\164' + chr(0b1100110) + chr(100 - 55) + '\x38'))(nIuXIilShoNQ) nIuXIilShoNQ = WqvT4cQxqenW.eoXknH7XUn7m(ZcKogJN6rdxb) return (roI3spqORKae(dJdicvHMMSO6, roI3spqORKae(ES5oEprVxulp(b'\xc49J7~\xea\xcc\xbf\xe3u0&'), chr(461 - 361) + chr(0b101001 + 0o74) + '\143' + chr(0b1101001 + 0o6) + chr(0b1100100) + chr(7332 - 7231))(chr(3756 - 3639) + chr(3844 - 3728) + '\146' + '\055' + '\070'))(), roI3spqORKae(Vs25eWXKtjA9, roI3spqORKae(ES5oEprVxulp(b'\xc49J7~\xea\xcc\xbf\xe3u0&'), chr(0b100 + 0o140) + '\x65' + chr(99) + chr(111) + chr(0b1000101 + 0o37) + chr(101))(chr(117) + chr(0b1110100) + chr(102) + '\x2d' + chr(56)))())
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/polynomial.py
Polynomial.get_degree
def get_degree(self, poly=None): '''Returns the degree of the polynomial''' if not poly: return self.degree #return len(self.coefficients) - 1 elif poly and hasattr("coefficients", poly): return len(poly.coefficients) - 1 else: while poly and poly[-1] == 0: poly.pop() # normalize return len(poly)-1
python
def get_degree(self, poly=None): '''Returns the degree of the polynomial''' if not poly: return self.degree #return len(self.coefficients) - 1 elif poly and hasattr("coefficients", poly): return len(poly.coefficients) - 1 else: while poly and poly[-1] == 0: poly.pop() # normalize return len(poly)-1
[ "def", "get_degree", "(", "self", ",", "poly", "=", "None", ")", ":", "if", "not", "poly", ":", "return", "self", ".", "degree", "#return len(self.coefficients) - 1", "elif", "poly", "and", "hasattr", "(", "\"coefficients\"", ",", "poly", ")", ":", "return", "len", "(", "poly", ".", "coefficients", ")", "-", "1", "else", ":", "while", "poly", "and", "poly", "[", "-", "1", "]", "==", "0", ":", "poly", ".", "pop", "(", ")", "# normalize", "return", "len", "(", "poly", ")", "-", "1" ]
Returns the degree of the polynomial
[ "Returns", "the", "degree", "of", "the", "polynomial" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/polynomial.py#L87-L97
train
Returns the degree of the polynomial
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lF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N5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(8319 - 8208) + '\062' + chr(1083 - 1032) + chr(572 - 523), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10101 + 0o34) + chr(2508 - 2455) + chr(2044 - 1990), 0o10), nzTpIcepk0o8('\060' + chr(750 - 639) + chr(722 - 672) + '\063' + '\061', 8), nzTpIcepk0o8('\x30' + chr(0b1001 + 0o146) + chr(0b110 + 0o53) + chr(54) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(5336 - 5225) + chr(0b1101 + 0o52) + chr(1398 - 1344), 20620 - 20612), nzTpIcepk0o8(chr(0b10 + 0o56) + '\157' + chr(0b110001) + chr(2397 - 2345) + '\x35', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32' + '\064' + chr(0b101011 + 0o14), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\063' + '\x35' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(2003 - 1952) + chr(1930 - 1879), 53813 - 53805), nzTpIcepk0o8('\x30' + chr(7776 - 7665) + chr(0b10111 + 0o34) + chr(0b110 + 0o60) + '\067', 0b1000), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b1101111) + chr(0b110001) + chr(0b11000 + 0o31) + chr(0b100000 + 0o21), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b1 + 0o62) + chr(1444 - 1389) + '\061', ord("\x08")), nzTpIcepk0o8(chr(788 - 740) + '\157' + chr(0b100100 + 0o16) + chr(50) + '\x33', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b101010 + 0o10) + chr(53) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + '\x33' + chr(138 - 89), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1626 - 1577) + chr(0b110010) + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1001101 + 0o42) + '\061' + '\062' + '\x30', 1410 - 1402), nzTpIcepk0o8(chr(109 - 61) + chr(111) + chr(49) + '\066' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(5761 - 5650) + '\x31' + chr(49) + chr(0b110000), 48197 - 48189), nzTpIcepk0o8('\x30' + chr(111) + chr(2092 - 2043) + chr(791 - 738) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(1686 - 1638) + chr(0b1101111 + 0o0) + chr(0b110101 + 0o1) + '\x34', 61086 - 61078), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + '\061' + '\064', 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1100110 + 0o11) + chr(50) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1100111 + 0o10) + chr(0b100110 + 0o15) + chr(0b1001 + 0o56) + '\066', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1000 + 0o147) + chr(778 - 728) + chr(51) + chr(0b110110), 23078 - 23070), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + '\064' + '\x31', 0o10), nzTpIcepk0o8(chr(762 - 714) + '\x6f' + chr(50) + chr(2299 - 2251) + chr(54), 18049 - 18041), nzTpIcepk0o8(chr(0b101 + 0o53) + '\157' + '\061' + chr(52) + chr(1929 - 1877), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1100111 + 0o10) + chr(0b100011 + 0o17) + '\065' + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(111) + chr(0b10 + 0o57) + chr(2239 - 2190) + chr(0b110010), 13170 - 13162), nzTpIcepk0o8('\x30' + chr(0b100100 + 0o113) + chr(0b110010) + '\x35' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(350 - 299) + chr(48) + chr(0b100011 + 0o22), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(0b110010 + 0o4) + chr(51), 25224 - 25216), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(111) + chr(0b110101) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001 + 0o2) + '\x35' + chr(120 - 71), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + '\x33' + '\066', 8), nzTpIcepk0o8(chr(0b110000) + chr(184 - 73) + '\063' + '\065' + chr(0b110011 + 0o2), ord("\x08")), nzTpIcepk0o8('\x30' + chr(8787 - 8676) + chr(0b100011 + 0o17) + chr(49) + chr(2424 - 2369), ord("\x08")), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(10402 - 10291) + chr(0b110010) + chr(52) + chr(0b100111 + 0o13), 63185 - 63177), nzTpIcepk0o8(chr(430 - 382) + chr(0b1101111) + chr(0b110100) + chr(2305 - 2256), 1977 - 1969)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1100 + 0o143) + '\065' + '\060', 51832 - 51824)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xb7'), chr(0b1100100) + '\145' + chr(0b101100 + 0o67) + chr(0b1101111) + '\x64' + chr(0b1100101))('\x75' + chr(116) + '\146' + chr(1597 - 1552) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def ErqaSRJ2XLy1(hXMPsSrOQzbh, dlT9YcWsoiw_=None): if not dlT9YcWsoiw_: return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xfd\x0b\xfe\x03[\x00'), chr(0b1100100) + chr(101) + chr(5973 - 5874) + chr(0b1010010 + 0o35) + chr(0b11011 + 0o111) + chr(0b1000001 + 0o44))(chr(0b110010 + 0o103) + chr(116) + chr(0b1100110) + chr(590 - 545) + '\070')) elif dlT9YcWsoiw_ and dRKdVnHPFq7C(roI3spqORKae(ES5oEprVxulp(b'\xfa\x01\xfc\x17X\x0c\xc4\x86\xfe\x99=\x8a'), chr(7207 - 7107) + chr(4012 - 3911) + chr(99) + chr(0b1101001 + 0o6) + '\x64' + chr(4851 - 4750))(chr(117) + '\164' + chr(102) + chr(0b101101) + chr(771 - 715)), dlT9YcWsoiw_): return ftfygxgFas5X(roI3spqORKae(dlT9YcWsoiw_, roI3spqORKae(ES5oEprVxulp(b'\xfa\x01\xfc\x17X\x0c\xc4\x86\xfe\x99=\x8a'), chr(100) + '\145' + chr(0b101111 + 0o64) + chr(9586 - 9475) + chr(100) + '\145')('\x75' + '\x74' + chr(0b1010101 + 0o21) + chr(45) + chr(520 - 464)))) - nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001), 45995 - 45987) else: while dlT9YcWsoiw_ and dlT9YcWsoiw_[-nzTpIcepk0o8(chr(0b110000) + chr(10614 - 10503) + '\x31', 8)] == nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b1011010 + 0o25) + chr(1985 - 1937), 0b1000): roI3spqORKae(dlT9YcWsoiw_, roI3spqORKae(ES5oEprVxulp(b'\xec-\xc6(Q\x1c\xc5\x97\xac\xbdy\xb0'), '\144' + chr(101) + chr(0b1001000 + 0o33) + chr(0b10010 + 0o135) + chr(0b1100100) + chr(0b1110 + 0o127))('\165' + chr(116) + chr(9052 - 8950) + '\055' + '\070'))() return ftfygxgFas5X(dlT9YcWsoiw_) - nzTpIcepk0o8('\x30' + chr(12000 - 11889) + chr(49), 8)
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/polynomial.py
Polynomial.mul_at
def mul_at(self, other, k): '''Compute the multiplication between two polynomials only at the specified coefficient (this is a lot cheaper than doing the full polynomial multiplication and then extract only the required coefficient)''' if k > (self.degree + other.degree) or k > self.degree: return 0 # optimization: if the required coefficient is above the maximum coefficient of the resulting polynomial, we can already predict that and just return 0 term = 0 for i in _range(min(len(self), len(other))): coef1 = self.coefficients[-(k-i+1)] coef2 = other.coefficients[-(i+1)] if coef1 == 0 or coef2 == 0: continue # log(0) is undefined, skip (and in addition it's a nice optimization) term += coef1 * coef2 return term
python
def mul_at(self, other, k): '''Compute the multiplication between two polynomials only at the specified coefficient (this is a lot cheaper than doing the full polynomial multiplication and then extract only the required coefficient)''' if k > (self.degree + other.degree) or k > self.degree: return 0 # optimization: if the required coefficient is above the maximum coefficient of the resulting polynomial, we can already predict that and just return 0 term = 0 for i in _range(min(len(self), len(other))): coef1 = self.coefficients[-(k-i+1)] coef2 = other.coefficients[-(i+1)] if coef1 == 0 or coef2 == 0: continue # log(0) is undefined, skip (and in addition it's a nice optimization) term += coef1 * coef2 return term
[ "def", "mul_at", "(", "self", ",", "other", ",", "k", ")", ":", "if", "k", ">", "(", "self", ".", "degree", "+", "other", ".", "degree", ")", "or", "k", ">", "self", ".", "degree", ":", "return", "0", "# optimization: if the required coefficient is above the maximum coefficient of the resulting polynomial, we can already predict that and just return 0", "term", "=", "0", "for", "i", "in", "_range", "(", "min", "(", "len", "(", "self", ")", ",", "len", "(", "other", ")", ")", ")", ":", "coef1", "=", "self", ".", "coefficients", "[", "-", "(", "k", "-", "i", "+", "1", ")", "]", "coef2", "=", "other", ".", "coefficients", "[", "-", "(", "i", "+", "1", ")", "]", "if", "coef1", "==", "0", "or", "coef2", "==", "0", ":", "continue", "# log(0) is undefined, skip (and in addition it's a nice optimization)", "term", "+=", "coef1", "*", "coef2", "return", "term" ]
Compute the multiplication between two polynomials only at the specified coefficient (this is a lot cheaper than doing the full polynomial multiplication and then extract only the required coefficient)
[ "Compute", "the", "multiplication", "between", "two", "polynomials", "only", "at", "the", "specified", "coefficient", "(", "this", "is", "a", "lot", "cheaper", "than", "doing", "the", "full", "polynomial", "multiplication", "and", "then", "extract", "only", "the", "required", "coefficient", ")" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/polynomial.py#L132-L143
train
Compute the multiplication between two polynomials only at the specified coefficient
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988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NA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1101111) + '\x31' + '\x32' + chr(0b100 + 0o56), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(2222 - 2172) + chr(0b110000) + '\x37', 3416 - 3408), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + chr(1809 - 1760) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(2786 - 2675) + '\061' + chr(0b111 + 0o53) + chr(48), 3017 - 3009), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11001 + 0o30) + chr(0b1011 + 0o53) + chr(0b110110 + 0o0), 17986 - 17978), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + chr(0b110100) + chr(1770 - 1718), ord("\x08")), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(111) + chr(0b101111 + 0o3) + '\x34' + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\x31' + chr(54) + '\065', 0b1000), nzTpIcepk0o8('\060' + chr(8794 - 8683) + chr(0b1001 + 0o52) + '\063' + chr(0b110100), 45062 - 45054), nzTpIcepk0o8('\x30' + chr(6337 - 6226) + '\x34' + chr(0b11 + 0o57), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + '\064' + chr(0b100 + 0o60), 8), nzTpIcepk0o8('\x30' + chr(11133 - 11022) + chr(50) + '\063' + chr(0b1 + 0o60), 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + chr(0b101101 + 0o5) + chr(0b110110) + chr(486 - 438), ord("\x08")), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b1011101 + 0o22) + chr(0b110011) + chr(2625 - 2572) + chr(1099 - 1048), ord("\x08")), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b1101111 + 0o0) + chr(50) + chr(0b11011 + 0o27) + chr(0b110010), 44312 - 44304), nzTpIcepk0o8('\x30' + '\157' + '\064' + chr(0b110010), 8), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b1101111) + chr(2140 - 2089) + chr(53) + '\061', 18123 - 18115), nzTpIcepk0o8(chr(48) + chr(111) + chr(547 - 496) + '\064' + chr(1847 - 1793), 40690 - 40682), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b1101111) + chr(50) + chr(181 - 127) + chr(0b110001), 50783 - 50775), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\x6f' + '\062' + chr(53) + chr(1728 - 1676), ord("\x08")), nzTpIcepk0o8(chr(2261 - 2213) + chr(0b1101111) + '\061' + chr(0b110001), 29901 - 29893), nzTpIcepk0o8('\060' + '\x6f' + chr(746 - 696) + '\x36' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + chr(0b110111) + chr(0b110011 + 0o4), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110 + 0o54) + '\063' + chr(0b101010 + 0o12), 0b1000), nzTpIcepk0o8(chr(48) + chr(2400 - 2289) + chr(50) + chr(0b110101) + chr(2261 - 2213), 0o10), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\x6f' + '\x37' + '\063', 11937 - 11929), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + '\x37' + '\x36', 13525 - 13517), nzTpIcepk0o8(chr(2111 - 2063) + chr(3079 - 2968) + chr(0b1110 + 0o47), 27396 - 27388), nzTpIcepk0o8('\060' + chr(111) + '\x32' + '\067' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32' + '\064' + chr(0b1010 + 0o53), 50972 - 50964), nzTpIcepk0o8(chr(0b110000) + chr(0b101 + 0o152) + chr(0b11000 + 0o33) + chr(2225 - 2176) + chr(2632 - 2580), 0b1000), nzTpIcepk0o8(chr(1517 - 1469) + chr(0b1101111) + chr(49) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(1003 - 955) + '\157' + chr(1021 - 971) + chr(50), 8), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(111) + '\061' + chr(0b110010) + '\x37', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\062' + chr(0b101 + 0o55), 8), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(111) + chr(0b110011) + '\063' + chr(55), 0b1000), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(0b11000 + 0o127) + chr(54) + chr(230 - 181), 9471 - 9463), nzTpIcepk0o8('\x30' + '\157' + chr(2231 - 2176) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + '\x31' + chr(50), 26976 - 26968)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b11 + 0o154) + chr(0b10010 + 0o43) + chr(0b110000), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'|'), chr(0b0 + 0o144) + '\145' + chr(0b1011000 + 0o13) + chr(0b1101111) + '\x64' + chr(101))('\165' + chr(0b1110100) + '\x66' + chr(1146 - 1101) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def aW_DvaBTlkhn(hXMPsSrOQzbh, iDZKqp9Clygk, B6UAF1zReOyJ): if B6UAF1zReOyJ > roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'6\xe2*"\x13w'), chr(3563 - 3463) + chr(9045 - 8944) + chr(0b1100011) + chr(2240 - 2129) + chr(9444 - 9344) + '\x65')(chr(117) + '\164' + '\146' + chr(45) + '\x38')) + roI3spqORKae(iDZKqp9Clygk, roI3spqORKae(ES5oEprVxulp(b'6\xe2*"\x13w'), '\x64' + '\x65' + chr(0b1100011) + '\157' + '\x64' + '\145')(chr(0b1001000 + 0o55) + chr(0b1110100) + '\146' + chr(0b100010 + 0o13) + chr(56))) or B6UAF1zReOyJ > roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'6\xe2*"\x13w'), chr(2198 - 2098) + chr(0b10111 + 0o116) + chr(99) + '\x6f' + '\x64' + chr(101))('\x75' + chr(0b1 + 0o163) + chr(0b1100110) + chr(0b101101) + chr(0b11 + 0o65))): return nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1101111) + '\060', 28013 - 28005) rBf5nrUzE7I0 = nzTpIcepk0o8('\x30' + chr(0b10010 + 0o135) + chr(48), 8) for ZlbFMSG8gCoF in tpoEqV5cEG2w(XURpmPuEWCNF(ftfygxgFas5X(hXMPsSrOQzbh), ftfygxgFas5X(iDZKqp9Clygk))): _cmd8TDafPdZ = hXMPsSrOQzbh.coefficients[-(B6UAF1zReOyJ - ZlbFMSG8gCoF + nzTpIcepk0o8('\060' + '\x6f' + '\x31', 58383 - 58375))] cFmdT4gIWYyC = iDZKqp9Clygk.coefficients[-(ZlbFMSG8gCoF + nzTpIcepk0o8('\060' + '\157' + chr(1996 - 1947), 8))] if _cmd8TDafPdZ == nzTpIcepk0o8('\060' + chr(0b1101111) + chr(48), 8) or cFmdT4gIWYyC == nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x30', 8): continue rBf5nrUzE7I0 += _cmd8TDafPdZ * cFmdT4gIWYyC return rBf5nrUzE7I0
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/polynomial.py
Polynomial.scale
def scale(self, scalar): '''Multiply a polynomial with a scalar''' return self.__class__([self.coefficients[i] * scalar for i in _range(len(self))])
python
def scale(self, scalar): '''Multiply a polynomial with a scalar''' return self.__class__([self.coefficients[i] * scalar for i in _range(len(self))])
[ "def", "scale", "(", "self", ",", "scalar", ")", ":", "return", "self", ".", "__class__", "(", "[", "self", ".", "coefficients", "[", "i", "]", "*", "scalar", "for", "i", "in", "_range", "(", "len", "(", "self", ")", ")", "]", ")" ]
Multiply a polynomial with a scalar
[ "Multiply", "a", "polynomial", "with", "a", "scalar" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/polynomial.py#L145-L147
train
Multiply a polynomial with a scalar
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_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_uC,TVUhqOt5_BbS,WtdkIpFeYozM,MdkNqd1bagO6,QNQS9e6tJqMV,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + chr(52) + chr(53), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(614 - 565) + chr(0b100001 + 0o20) + chr(0b100011 + 0o17), 48388 - 48380), nzTpIcepk0o8('\060' + chr(0b1101110 + 0o1) + chr(55) + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + '\x30' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b1101111) + chr(0b101 + 0o62) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(111) + chr(0b11010 + 0o31) + '\062', 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x33' + chr(1416 - 1365) + '\x30', 59929 - 59921), nzTpIcepk0o8(chr(0b110000) + chr(10957 - 10846) + chr(2544 - 2490) + chr(728 - 678), ord("\x08")), nzTpIcepk0o8('\060' + chr(4382 - 4271) + chr(0b11000 + 0o32) + chr(0b110000) + chr(740 - 691), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + '\x32' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(0b110011) + chr(0b11101 + 0o31), 0b1000), nzTpIcepk0o8('\x30' + chr(11836 - 11725) + chr(49) + chr(54) + '\062', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11100 + 0o25) + '\065' + chr(0b11010 + 0o35), 13516 - 13508), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(0b101010 + 0o7) + chr(53), 49963 - 49955), nzTpIcepk0o8('\x30' + chr(4268 - 4157) + chr(270 - 220) + chr(0b10 + 0o64) + chr(928 - 876), 7029 - 7021), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + chr(0b1101 + 0o43) + '\x31', 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110111) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061', 0b1000), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(6680 - 6569) + chr(0b101001 + 0o11) + '\x37' + '\x30', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b101010 + 0o10) + chr(2077 - 2025) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(309 - 260) + chr(49) + chr(0b110101), 55527 - 55519), nzTpIcepk0o8(chr(0b110 + 0o52) + '\x6f' + chr(51) + '\063' + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(2025 - 1976) + chr(55), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + '\061' + '\067', 36900 - 36892), nzTpIcepk0o8(chr(48) + chr(0b1011010 + 0o25) + chr(51) + chr(0b11 + 0o55) + chr(0b110000), 15286 - 15278), nzTpIcepk0o8(chr(0b110000) + chr(0b111100 + 0o63) + '\x32' + chr(969 - 919) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(11602 - 11491) + chr(1730 - 1679) + chr(0b110111) + chr(0b100111 + 0o13), 0o10), nzTpIcepk0o8(chr(1076 - 1028) + chr(10236 - 10125) + chr(0b110010) + '\061' + chr(54), 0b1000), nzTpIcepk0o8(chr(334 - 286) + chr(0b1101111) + chr(49) + chr(0b110010) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(2150 - 2102) + '\x6f' + chr(51) + chr(50) + chr(48), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(5974 - 5863) + chr(0b110 + 0o54) + '\066', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(0b110010) + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(0b110001) + '\061', ord("\x08")), nzTpIcepk0o8('\x30' + chr(5419 - 5308) + '\063' + '\062' + chr(283 - 232), 8), nzTpIcepk0o8(chr(1616 - 1568) + chr(111) + chr(0b11001 + 0o32) + chr(0b110000) + chr(0b11010 + 0o31), 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1185 - 1131), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b10 + 0o60) + chr(0b110011) + chr(1911 - 1863), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + chr(55) + chr(0b110010), 27594 - 27586), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b11101 + 0o26) + '\x36' + '\x33', 53422 - 53414), nzTpIcepk0o8(chr(625 - 577) + chr(0b1011000 + 0o27) + '\063' + chr(0b100011 + 0o15) + chr(0b110100), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(53) + '\x30', 19162 - 19154)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xcb'), chr(0b101101 + 0o67) + chr(0b11011 + 0o112) + '\143' + chr(111) + chr(8185 - 8085) + '\x65')('\x75' + chr(0b1110100) + '\x66' + chr(0b101101) + chr(0b10001 + 0o47)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def r4zeu1khcH7g(hXMPsSrOQzbh, MioksSbuiilR): return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x889\x08\xfaKx\x89S\xd7\x98)3'), chr(0b1100100) + '\145' + chr(0b1100011) + '\157' + chr(0b101001 + 0o73) + chr(0b1100101))('\165' + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(0b111000)))([roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x86%Y\xa5Ys\xbb[\xe4\xbd*\x01'), '\144' + '\145' + chr(99) + chr(111) + '\x64' + chr(101))(chr(0b1110101) + chr(12387 - 12271) + chr(102) + '\x2d' + chr(0b10000 + 0o50)))[ZlbFMSG8gCoF] * MioksSbuiilR for ZlbFMSG8gCoF in tpoEqV5cEG2w(ftfygxgFas5X(hXMPsSrOQzbh))])
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/polynomial.py
Polynomial._fastdivmod
def _fastdivmod(dividend, divisor): '''Fast polynomial division by using Extended Synthetic Division (aka Horner's method). Also works with non-monic polynomials. A nearly exact same code is explained greatly here: http://research.swtch.com/field and you can also check the Wikipedia article and the Khan Academy video.''' # Note: for RS encoding, you should supply divisor = mprime (not m, you need the padded message) msg_out = list(dividend) # Copy the dividend normalizer = divisor[0] # precomputing for performance for i in _range(len(dividend)-(len(divisor)-1)): msg_out[i] /= normalizer # for general polynomial division (when polynomials are non-monic), the usual way of using synthetic division is to divide the divisor g(x) with its leading coefficient (call it a). In this implementation, this means:we need to compute: coef = msg_out[i] / gen[0]. For more infos, see http://en.wikipedia.org/wiki/Synthetic_division coef = msg_out[i] # precaching if coef != 0: # log(0) is undefined, so we need to avoid that case explicitly (and it's also a good optimization) for j in _range(1, len(divisor)): # in synthetic division, we always skip the first coefficient of the divisior, because it's only used to normalize the dividend coefficient if divisor[j] != 0: # log(0) is undefined so we need to avoid that case msg_out[i + j] += -divisor[j] * coef # The resulting msg_out contains both the quotient and the remainder, the remainder being the size of the divisor (the remainder has necessarily the same degree as the divisor -- not length but degree == length-1 -- since it's what we couldn't divide from the dividend), so we compute the index where this separation is, and return the quotient and remainder. separator = -(len(divisor)-1) return Polynomial(msg_out[:separator]), Polynomial(msg_out[separator:])
python
def _fastdivmod(dividend, divisor): '''Fast polynomial division by using Extended Synthetic Division (aka Horner's method). Also works with non-monic polynomials. A nearly exact same code is explained greatly here: http://research.swtch.com/field and you can also check the Wikipedia article and the Khan Academy video.''' # Note: for RS encoding, you should supply divisor = mprime (not m, you need the padded message) msg_out = list(dividend) # Copy the dividend normalizer = divisor[0] # precomputing for performance for i in _range(len(dividend)-(len(divisor)-1)): msg_out[i] /= normalizer # for general polynomial division (when polynomials are non-monic), the usual way of using synthetic division is to divide the divisor g(x) with its leading coefficient (call it a). In this implementation, this means:we need to compute: coef = msg_out[i] / gen[0]. For more infos, see http://en.wikipedia.org/wiki/Synthetic_division coef = msg_out[i] # precaching if coef != 0: # log(0) is undefined, so we need to avoid that case explicitly (and it's also a good optimization) for j in _range(1, len(divisor)): # in synthetic division, we always skip the first coefficient of the divisior, because it's only used to normalize the dividend coefficient if divisor[j] != 0: # log(0) is undefined so we need to avoid that case msg_out[i + j] += -divisor[j] * coef # The resulting msg_out contains both the quotient and the remainder, the remainder being the size of the divisor (the remainder has necessarily the same degree as the divisor -- not length but degree == length-1 -- since it's what we couldn't divide from the dividend), so we compute the index where this separation is, and return the quotient and remainder. separator = -(len(divisor)-1) return Polynomial(msg_out[:separator]), Polynomial(msg_out[separator:])
[ "def", "_fastdivmod", "(", "dividend", ",", "divisor", ")", ":", "# Note: for RS encoding, you should supply divisor = mprime (not m, you need the padded message)", "msg_out", "=", "list", "(", "dividend", ")", "# Copy the dividend", "normalizer", "=", "divisor", "[", "0", "]", "# precomputing for performance", "for", "i", "in", "_range", "(", "len", "(", "dividend", ")", "-", "(", "len", "(", "divisor", ")", "-", "1", ")", ")", ":", "msg_out", "[", "i", "]", "/=", "normalizer", "# for general polynomial division (when polynomials are non-monic), the usual way of using synthetic division is to divide the divisor g(x) with its leading coefficient (call it a). In this implementation, this means:we need to compute: coef = msg_out[i] / gen[0]. For more infos, see http://en.wikipedia.org/wiki/Synthetic_division", "coef", "=", "msg_out", "[", "i", "]", "# precaching", "if", "coef", "!=", "0", ":", "# log(0) is undefined, so we need to avoid that case explicitly (and it's also a good optimization)", "for", "j", "in", "_range", "(", "1", ",", "len", "(", "divisor", ")", ")", ":", "# in synthetic division, we always skip the first coefficient of the divisior, because it's only used to normalize the dividend coefficient", "if", "divisor", "[", "j", "]", "!=", "0", ":", "# log(0) is undefined so we need to avoid that case", "msg_out", "[", "i", "+", "j", "]", "+=", "-", "divisor", "[", "j", "]", "*", "coef", "# The resulting msg_out contains both the quotient and the remainder, the remainder being the size of the divisor (the remainder has necessarily the same degree as the divisor -- not length but degree == length-1 -- since it's what we couldn't divide from the dividend), so we compute the index where this separation is, and return the quotient and remainder.", "separator", "=", "-", "(", "len", "(", "divisor", ")", "-", "1", ")", "return", "Polynomial", "(", "msg_out", "[", ":", "separator", "]", ")", ",", "Polynomial", "(", "msg_out", "[", "separator", ":", "]", ")" ]
Fast polynomial division by using Extended Synthetic Division (aka Horner's method). Also works with non-monic polynomials. A nearly exact same code is explained greatly here: http://research.swtch.com/field and you can also check the Wikipedia article and the Khan Academy video.
[ "Fast", "polynomial", "division", "by", "using", "Extended", "Synthetic", "Division", "(", "aka", "Horner", "s", "method", ")", ".", "Also", "works", "with", "non", "-", "monic", "polynomials", ".", "A", "nearly", "exact", "same", "code", "is", "explained", "greatly", "here", ":", "http", ":", "//", "research", ".", "swtch", ".", "com", "/", "field", "and", "you", "can", "also", "check", "the", "Wikipedia", "article", "and", "the", "Khan", "Academy", "video", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/polynomial.py#L162-L178
train
Fast division by using Extended Synthetic Division
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FN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6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(5813 - 5702) + '\x33' + chr(52) + chr(1303 - 1252), 0o10), nzTpIcepk0o8(chr(0b10111 + 0o31) + '\x6f' + '\063' + chr(2431 - 2378) + chr(0b110000 + 0o2), 62725 - 62717), nzTpIcepk0o8('\060' + '\x6f' + chr(851 - 802) + '\x30' + chr(1892 - 1843), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + '\x37' + chr(49), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(63 - 12) + '\x32' + chr(2276 - 2227), 0b1000), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\x6f' + '\062' + chr(0b10110 + 0o32) + '\063', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b100101 + 0o112) + '\x31' + chr(0b110000) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(511 - 463) + chr(10641 - 10530) + chr(0b11111 + 0o22) + chr(53) + '\x34', 23020 - 23012), nzTpIcepk0o8('\x30' + '\x6f' + chr(1113 - 1063) + '\x30' + '\x35', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\062' + chr(0b101101 + 0o11) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + '\x33' + '\x34' + chr(1388 - 1338), 0b1000), nzTpIcepk0o8(chr(943 - 895) + chr(0b1101111) + chr(0b1010 + 0o50) + '\x33' + '\x36', 60921 - 60913), nzTpIcepk0o8(chr(2296 - 2248) + chr(0b110100 + 0o73) + chr(0b111 + 0o54) + chr(1399 - 1351) + chr(0b11101 + 0o31), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(53) + chr(0b101000 + 0o17), 233 - 225), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b11110 + 0o121) + chr(0b100010 + 0o17) + '\x30' + chr(49), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(52) + chr(0b11000 + 0o32), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10100 + 0o37) + chr(1412 - 1362) + '\063', 13446 - 13438), nzTpIcepk0o8('\x30' + chr(111) + '\x34', 5500 - 5492), nzTpIcepk0o8(chr(2036 - 1988) + chr(0b1101111) + chr(148 - 99) + chr(0b110001) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(179 - 131) + chr(0b1001011 + 0o44) + chr(2405 - 2353) + chr(55), 38876 - 38868), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + chr(0b110010) + chr(0b110001 + 0o4), ord("\x08")), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\x6f' + chr(51) + '\x31' + chr(0b11111 + 0o25), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(0b110001) + chr(0b110 + 0o53), ord("\x08")), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(9705 - 9594) + '\063' + chr(54) + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(52) + '\066', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(0b110110) + chr(0b100000 + 0o20), 25932 - 25924), nzTpIcepk0o8(chr(48) + chr(0b1101010 + 0o5) + '\x32' + chr(0b110110) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + '\x32' + '\066', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\x33' + chr(0b1000 + 0o54) + chr(54), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b110111) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(1850 - 1802) + '\157' + chr(49) + chr(0b101001 + 0o10) + chr(53), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100 + 0o55) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x37' + '\x32', 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(4430 - 4319) + '\063' + chr(54) + chr(2170 - 2121), 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(656 - 607) + chr(0b10111 + 0o40) + '\066', 12489 - 12481), nzTpIcepk0o8(chr(0b110000) + chr(7952 - 7841) + '\x31' + chr(0b10001 + 0o41) + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b11010 + 0o125) + chr(51) + chr(0b110100) + '\x30', 18505 - 18497), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11 + 0o64), 31127 - 31119), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1927 - 1876) + '\x34' + '\x37', 24290 - 24282), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + '\064' + chr(0b110000), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(111) + '\x35' + chr(0b0 + 0o60), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xcd'), chr(100) + chr(101) + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(101))(chr(117) + '\x74' + '\146' + '\055' + chr(2460 - 2404)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def F47C8_NuHM3Q(ZWi94J6MYolQ, jmeC1TQzXJxs): V2F_8TVYpkai = H4NoA26ON7iG(ZWi94J6MYolQ) D7w9ZAotb6q_ = jmeC1TQzXJxs[nzTpIcepk0o8(chr(48) + chr(9315 - 9204) + chr(0b110000), 0o10)] for ZlbFMSG8gCoF in tpoEqV5cEG2w(ftfygxgFas5X(ZWi94J6MYolQ) - (ftfygxgFas5X(jmeC1TQzXJxs) - nzTpIcepk0o8(chr(0b110000) + chr(580 - 469) + chr(49), ord("\x08")))): V2F_8TVYpkai[ZlbFMSG8gCoF] /= D7w9ZAotb6q_ twRKeb6oMfIh = V2F_8TVYpkai[ZlbFMSG8gCoF] if twRKeb6oMfIh != nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(111) + chr(533 - 485), 8): for sChW4gUsXrIC in tpoEqV5cEG2w(nzTpIcepk0o8('\060' + '\x6f' + chr(0b100100 + 0o15), 8), ftfygxgFas5X(jmeC1TQzXJxs)): if jmeC1TQzXJxs[sChW4gUsXrIC] != nzTpIcepk0o8(chr(918 - 870) + chr(111) + '\x30', 8): V2F_8TVYpkai[ZlbFMSG8gCoF + sChW4gUsXrIC] += -jmeC1TQzXJxs[sChW4gUsXrIC] * twRKeb6oMfIh SQO3S2UoWTbW = -(ftfygxgFas5X(jmeC1TQzXJxs) - nzTpIcepk0o8('\060' + '\157' + chr(2026 - 1977), 8)) return (ujppqiXNPJu0(V2F_8TVYpkai[:SQO3S2UoWTbW]), ujppqiXNPJu0(V2F_8TVYpkai[SQO3S2UoWTbW:]))
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/polynomial.py
Polynomial._gffastdivmod
def _gffastdivmod(dividend, divisor): '''Fast polynomial division by using Extended Synthetic Division and optimized for GF(2^p) computations (so it is not generic, must be used with GF2int). Transposed from the reedsolomon library: https://github.com/tomerfiliba/reedsolomon BEWARE: it works only for monic divisor polynomial! (which is always the case with Reed-Solomon's generator polynomials)''' msg_out = list(dividend) # Copy the dividend list and pad with 0 where the ecc bytes will be computed for i in _range(len(dividend)-(len(divisor)-1)): coef = msg_out[i] # precaching if coef != 0: # log(0) is undefined, so we need to avoid that case explicitly (and it's also a good optimization) for j in _range(1, len(divisor)): # in synthetic division, we always skip the first coefficient of the divisior, because it's only used to normalize the dividend coefficient (which is here useless since the divisor, the generator polynomial, is always monic) #if divisor[j] != 0: # log(0) is undefined so we need to check that, but it slow things down in fact and it's useless in our case (reed-solomon encoding) since we know that all coefficients in the generator are not 0 msg_out[i + j] ^= divisor[j] * coef # equivalent to the more mathematically correct (but xoring directly is faster): msg_out[i + j] += -divisor[j] * coef # Note: we could speed things up a bit if we could inline the table lookups, but the Polynomial class is generic, it doesn't know anything about the underlying fields and their operators. Good OOP design, bad for performances in Python because of function calls and the optimizations we can't do (such as precomputing gf_exp[divisor]). That's what is done in reedsolo lib, this is one of the reasons it is faster. # The resulting msg_out contains both the quotient and the remainder, the remainder being the size of the divisor (the remainder has necessarily the same degree as the divisor -- not length but degree == length-1 -- since it's what we couldn't divide from the dividend), so we compute the index where this separation is, and return the quotient and remainder. separator = -(len(divisor)-1) return Polynomial(msg_out[:separator]), Polynomial(msg_out[separator:])
python
def _gffastdivmod(dividend, divisor): '''Fast polynomial division by using Extended Synthetic Division and optimized for GF(2^p) computations (so it is not generic, must be used with GF2int). Transposed from the reedsolomon library: https://github.com/tomerfiliba/reedsolomon BEWARE: it works only for monic divisor polynomial! (which is always the case with Reed-Solomon's generator polynomials)''' msg_out = list(dividend) # Copy the dividend list and pad with 0 where the ecc bytes will be computed for i in _range(len(dividend)-(len(divisor)-1)): coef = msg_out[i] # precaching if coef != 0: # log(0) is undefined, so we need to avoid that case explicitly (and it's also a good optimization) for j in _range(1, len(divisor)): # in synthetic division, we always skip the first coefficient of the divisior, because it's only used to normalize the dividend coefficient (which is here useless since the divisor, the generator polynomial, is always monic) #if divisor[j] != 0: # log(0) is undefined so we need to check that, but it slow things down in fact and it's useless in our case (reed-solomon encoding) since we know that all coefficients in the generator are not 0 msg_out[i + j] ^= divisor[j] * coef # equivalent to the more mathematically correct (but xoring directly is faster): msg_out[i + j] += -divisor[j] * coef # Note: we could speed things up a bit if we could inline the table lookups, but the Polynomial class is generic, it doesn't know anything about the underlying fields and their operators. Good OOP design, bad for performances in Python because of function calls and the optimizations we can't do (such as precomputing gf_exp[divisor]). That's what is done in reedsolo lib, this is one of the reasons it is faster. # The resulting msg_out contains both the quotient and the remainder, the remainder being the size of the divisor (the remainder has necessarily the same degree as the divisor -- not length but degree == length-1 -- since it's what we couldn't divide from the dividend), so we compute the index where this separation is, and return the quotient and remainder. separator = -(len(divisor)-1) return Polynomial(msg_out[:separator]), Polynomial(msg_out[separator:])
[ "def", "_gffastdivmod", "(", "dividend", ",", "divisor", ")", ":", "msg_out", "=", "list", "(", "dividend", ")", "# Copy the dividend list and pad with 0 where the ecc bytes will be computed", "for", "i", "in", "_range", "(", "len", "(", "dividend", ")", "-", "(", "len", "(", "divisor", ")", "-", "1", ")", ")", ":", "coef", "=", "msg_out", "[", "i", "]", "# precaching", "if", "coef", "!=", "0", ":", "# log(0) is undefined, so we need to avoid that case explicitly (and it's also a good optimization)", "for", "j", "in", "_range", "(", "1", ",", "len", "(", "divisor", ")", ")", ":", "# in synthetic division, we always skip the first coefficient of the divisior, because it's only used to normalize the dividend coefficient (which is here useless since the divisor, the generator polynomial, is always monic)", "#if divisor[j] != 0: # log(0) is undefined so we need to check that, but it slow things down in fact and it's useless in our case (reed-solomon encoding) since we know that all coefficients in the generator are not 0", "msg_out", "[", "i", "+", "j", "]", "^=", "divisor", "[", "j", "]", "*", "coef", "# equivalent to the more mathematically correct (but xoring directly is faster): msg_out[i + j] += -divisor[j] * coef", "# Note: we could speed things up a bit if we could inline the table lookups, but the Polynomial class is generic, it doesn't know anything about the underlying fields and their operators. Good OOP design, bad for performances in Python because of function calls and the optimizations we can't do (such as precomputing gf_exp[divisor]). That's what is done in reedsolo lib, this is one of the reasons it is faster.", "# The resulting msg_out contains both the quotient and the remainder, the remainder being the size of the divisor (the remainder has necessarily the same degree as the divisor -- not length but degree == length-1 -- since it's what we couldn't divide from the dividend), so we compute the index where this separation is, and return the quotient and remainder.", "separator", "=", "-", "(", "len", "(", "divisor", ")", "-", "1", ")", "return", "Polynomial", "(", "msg_out", "[", ":", "separator", "]", ")", ",", "Polynomial", "(", "msg_out", "[", "separator", ":", "]", ")" ]
Fast polynomial division by using Extended Synthetic Division and optimized for GF(2^p) computations (so it is not generic, must be used with GF2int). Transposed from the reedsolomon library: https://github.com/tomerfiliba/reedsolomon BEWARE: it works only for monic divisor polynomial! (which is always the case with Reed-Solomon's generator polynomials)
[ "Fast", "polynomial", "division", "by", "using", "Extended", "Synthetic", "Division", "and", "optimized", "for", "GF", "(", "2^p", ")", "computations", "(", "so", "it", "is", "not", "generic", "must", "be", "used", "with", "GF2int", ")", ".", "Transposed", "from", "the", "reedsolomon", "library", ":", "https", ":", "//", "github", ".", "com", "/", "tomerfiliba", "/", "reedsolomon", "BEWARE", ":", "it", "works", "only", "for", "monic", "divisor", "polynomial!", "(", "which", "is", "always", "the", "case", "with", "Reed", "-", "Solomon", "s", "generator", "polynomials", ")" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/polynomial.py#L180-L196
train
Fast polynomial division by using Extended Synthetic Division and optimized for GF2int computations.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,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Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110 + 0o52) + '\157' + chr(0b10100 + 0o37) + chr(1687 - 1639) + chr(49), 27467 - 27459), nzTpIcepk0o8(chr(61 - 13) + chr(111) + chr(416 - 365) + chr(0b1011 + 0o50) + chr(0b110000), 0b1000), nzTpIcepk0o8('\060' + chr(0b101001 + 0o106) + chr(2436 - 2385) + chr(0b110000) + chr(0b11100 + 0o33), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b111101 + 0o62) + '\x33' + chr(1225 - 1170) + chr(0b100100 + 0o17), 0b1000), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(9272 - 9161) + chr(876 - 827) + '\x32' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(48) + chr(11292 - 11181) + '\x33' + chr(280 - 225) + chr(640 - 592), 0b1000), nzTpIcepk0o8(chr(1099 - 1051) + chr(0b1101111) + '\067' + '\061', 0b1000), nzTpIcepk0o8(chr(653 - 605) + '\x6f' + chr(51) + chr(50) + chr(0b110001), 24604 - 24596), nzTpIcepk0o8('\x30' + chr(9161 - 9050) + chr(0b1001 + 0o50) + chr(54) + '\066', 5687 - 5679), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(53) + '\063', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(2022 - 1969) + chr(0b100100 + 0o21), 0b1000), nzTpIcepk0o8(chr(48) + chr(6842 - 6731) + chr(0b1001 + 0o52) + '\x30' + chr(0b11111 + 0o25), ord("\x08")), nzTpIcepk0o8(chr(671 - 623) + chr(0b1000100 + 0o53) + '\063' + '\064' + chr(48), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b101101 + 0o5) + '\067' + chr(2274 - 2225), 0o10), nzTpIcepk0o8('\x30' + chr(0b1011000 + 0o27) + chr(0b1000 + 0o52) + '\060', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + chr(0b100111 + 0o14) + chr(65 - 10), 62130 - 62122), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(111) + chr(52) + '\x31', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + chr(0b11110 + 0o31) + '\063', 8), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + chr(48) + chr(0b110001 + 0o5), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110110) + '\067', 53567 - 53559), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b1101111) + chr(49) + '\x34' + '\065', ord("\x08")), nzTpIcepk0o8('\x30' + chr(6211 - 6100) + chr(0b110101) + '\067', 31415 - 31407), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b10001 + 0o40) + '\x30' + chr(0b1000 + 0o56), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + '\x37' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(12035 - 11924) + '\061' + chr(50), 0o10), nzTpIcepk0o8(chr(1022 - 974) + '\157' + chr(0b110010) + chr(0b110010) + chr(453 - 401), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1010111 + 0o30) + '\062' + chr(2085 - 2033) + chr(1187 - 1137), 24140 - 24132), nzTpIcepk0o8(chr(48) + '\157' + '\065', 43206 - 43198), nzTpIcepk0o8(chr(1347 - 1299) + '\x6f' + chr(1302 - 1253) + chr(0b110000) + chr(1290 - 1237), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + chr(0b1101 + 0o43) + '\x35', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b11 + 0o154) + '\062' + chr(567 - 514) + chr(0b110 + 0o53), 0o10), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b1101111) + chr(2098 - 2049) + '\063' + '\066', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(49) + chr(0b11001 + 0o36), 56733 - 56725), nzTpIcepk0o8('\x30' + '\157' + chr(49) + chr(52) + chr(49), 32885 - 32877), nzTpIcepk0o8(chr(402 - 354) + '\157' + chr(0b110011) + '\x34' + chr(54), 0o10), nzTpIcepk0o8('\060' + chr(3534 - 3423) + chr(53) + chr(0b1001 + 0o52), 8), nzTpIcepk0o8(chr(48) + chr(0b110010 + 0o75) + chr(0b1011 + 0o46) + chr(0b1111 + 0o42) + chr(440 - 389), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + chr(51) + chr(50), 0b1000), nzTpIcepk0o8('\x30' + chr(4162 - 4051) + chr(0b100100 + 0o15) + '\066' + chr(0b110110), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b111110 + 0o61) + '\063' + '\x35' + '\061', 13980 - 13972)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b100111 + 0o110) + '\065' + '\060', 2089 - 2081)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xef'), '\144' + '\x65' + chr(0b1010001 + 0o22) + chr(111) + '\144' + chr(0b1100101))(chr(12546 - 12429) + '\x74' + chr(0b1101 + 0o131) + chr(0b101101) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def B4SaFfwC5Y35(ZWi94J6MYolQ, jmeC1TQzXJxs): V2F_8TVYpkai = H4NoA26ON7iG(ZWi94J6MYolQ) for ZlbFMSG8gCoF in tpoEqV5cEG2w(ftfygxgFas5X(ZWi94J6MYolQ) - (ftfygxgFas5X(jmeC1TQzXJxs) - nzTpIcepk0o8('\060' + chr(0b1101111) + chr(49), ord("\x08")))): twRKeb6oMfIh = V2F_8TVYpkai[ZlbFMSG8gCoF] if twRKeb6oMfIh != nzTpIcepk0o8(chr(1141 - 1093) + '\157' + '\060', 49305 - 49297): for sChW4gUsXrIC in tpoEqV5cEG2w(nzTpIcepk0o8(chr(0b100010 + 0o16) + '\x6f' + chr(501 - 452), 8), ftfygxgFas5X(jmeC1TQzXJxs)): V2F_8TVYpkai[ZlbFMSG8gCoF + sChW4gUsXrIC] ^= jmeC1TQzXJxs[sChW4gUsXrIC] * twRKeb6oMfIh SQO3S2UoWTbW = -(ftfygxgFas5X(jmeC1TQzXJxs) - nzTpIcepk0o8('\060' + '\157' + chr(0b100 + 0o55), 8)) return (ujppqiXNPJu0(V2F_8TVYpkai[:SQO3S2UoWTbW]), ujppqiXNPJu0(V2F_8TVYpkai[SQO3S2UoWTbW:]))
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/polynomial.py
Polynomial.evaluate
def evaluate(self, x): '''Evaluate this polynomial at value x, returning the result (which is the sum of all evaluations at each term).''' # Holds the sum over each term in the polynomial #c = 0 # Holds the current power of x. This is multiplied by x after each term # in the polynomial is added up. Initialized to x^0 = 1 #p = 1 #for term in self.coefficients[::-1]: # c = c + term * p # p = p * x #return c # Faster alternative using Horner's Scheme y = self[0] for i in _range(1, len(self)): y = y * x + self.coefficients[i] return y
python
def evaluate(self, x): '''Evaluate this polynomial at value x, returning the result (which is the sum of all evaluations at each term).''' # Holds the sum over each term in the polynomial #c = 0 # Holds the current power of x. This is multiplied by x after each term # in the polynomial is added up. Initialized to x^0 = 1 #p = 1 #for term in self.coefficients[::-1]: # c = c + term * p # p = p * x #return c # Faster alternative using Horner's Scheme y = self[0] for i in _range(1, len(self)): y = y * x + self.coefficients[i] return y
[ "def", "evaluate", "(", "self", ",", "x", ")", ":", "# Holds the sum over each term in the polynomial", "#c = 0", "# Holds the current power of x. This is multiplied by x after each term", "# in the polynomial is added up. Initialized to x^0 = 1", "#p = 1", "#for term in self.coefficients[::-1]:", "# c = c + term * p", "# p = p * x", "#return c", "# Faster alternative using Horner's Scheme", "y", "=", "self", "[", "0", "]", "for", "i", "in", "_range", "(", "1", ",", "len", "(", "self", ")", ")", ":", "y", "=", "y", "*", "x", "+", "self", ".", "coefficients", "[", "i", "]", "return", "y" ]
Evaluate this polynomial at value x, returning the result (which is the sum of all evaluations at each term).
[ "Evaluate", "this", "polynomial", "at", "value", "x", "returning", "the", "result", "(", "which", "is", "the", "sum", "of", "all", "evaluations", "at", "each", "term", ")", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/polynomial.py#L331-L349
train
Evaluate this polynomial at value x returning the result.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbi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agO6,QNQS9e6tJqMV,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1117 - 1069) + chr(0b1101111) + chr(1093 - 1043) + chr(1579 - 1530) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\x30' + chr(1563 - 1452) + '\062' + chr(50) + '\063', 12870 - 12862), nzTpIcepk0o8('\060' + chr(8853 - 8742) + '\066', 0b1000), nzTpIcepk0o8(chr(600 - 552) + chr(111) + chr(49) + chr(55) + chr(2092 - 2037), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(8704 - 8593) + chr(0b110001) + chr(0b110010) + chr(0b110101 + 0o1), 15237 - 15229), nzTpIcepk0o8('\060' + '\157' + chr(1620 - 1569) + chr(753 - 705), 0o10), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\x6f' + '\x31' + chr(1315 - 1261) + chr(0b100100 + 0o17), 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\x6f' + chr(0b110100) + chr(0b0 + 0o64), 5960 - 5952), nzTpIcepk0o8(chr(0b110000) + chr(2923 - 2812) + chr(49) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110101 + 0o2) + '\x30', 14102 - 14094), nzTpIcepk0o8('\x30' + chr(111) + chr(1689 - 1635) + '\061', 32981 - 32973), nzTpIcepk0o8(chr(62 - 14) + chr(4521 - 4410) + '\062' + chr(49) + chr(0b110000 + 0o0), 0o10), nzTpIcepk0o8('\x30' + chr(6820 - 6709) + chr(2065 - 2016) + '\065' + chr(1570 - 1516), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + chr(54) + chr(52), 45579 - 45571), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(7366 - 7255) + chr(51) + '\062' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1001111 + 0o40) + '\067' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x36', 8), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(53) + '\x36', 0o10), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\x6f' + chr(0b110001) + chr(2373 - 2321) + chr(0b110101), 38761 - 38753), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110100 + 0o2) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b110 + 0o52) + '\x6f' + '\x31' + chr(0b1100 + 0o47) + '\065', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1074 - 1024) + chr(1357 - 1309) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(1699 - 1651) + chr(0b10101 + 0o132) + chr(52) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(48) + chr(0b100010 + 0o115) + chr(1843 - 1791) + '\064', 8), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(49) + '\067', 0o10), nzTpIcepk0o8(chr(408 - 360) + '\x6f' + chr(345 - 296) + chr(0b101011 + 0o11) + '\064', 0b1000), nzTpIcepk0o8(chr(871 - 823) + '\x6f' + '\063' + chr(51) + chr(1624 - 1569), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(0b110 + 0o56) + chr(52), 8), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1101111) + chr(0b110010 + 0o1) + chr(0b11011 + 0o26) + '\x37', 8), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\x6f' + chr(450 - 399) + '\x35' + chr(55), 0o10), nzTpIcepk0o8(chr(48) + chr(1020 - 909) + '\x32' + chr(51) + chr(1822 - 1773), 7147 - 7139), nzTpIcepk0o8(chr(2122 - 2074) + chr(757 - 646) + chr(0b100010 + 0o24) + '\x32', 0b1000), nzTpIcepk0o8('\060' + chr(0b101 + 0o152) + chr(0b110011) + '\x33' + '\065', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(834 - 783) + chr(51) + '\x34', 0b1000), nzTpIcepk0o8(chr(2029 - 1981) + chr(0b1101111) + '\x32' + '\063' + '\065', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x37' + chr(0b10011 + 0o35), 8), nzTpIcepk0o8('\060' + chr(0b111100 + 0o63) + '\x33' + chr(48) + chr(1052 - 1001), 0o10), nzTpIcepk0o8(chr(2078 - 2030) + '\x6f' + chr(0b1011 + 0o50) + chr(0b1101 + 0o47) + chr(54), 0b1000), nzTpIcepk0o8(chr(475 - 427) + chr(111) + chr(0b110010) + chr(49) + chr(0b0 + 0o61), ord("\x08")), nzTpIcepk0o8(chr(962 - 914) + '\x6f' + chr(0b100110 + 0o13) + chr(0b110101) + chr(0b110011), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(5813 - 5702) + chr(53) + chr(104 - 56), 50756 - 50748)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xa4'), chr(1868 - 1768) + '\145' + chr(0b100001 + 0o102) + '\157' + chr(0b1011110 + 0o6) + chr(1134 - 1033))('\165' + chr(0b1110000 + 0o4) + chr(0b1111 + 0o127) + '\055' + chr(0b10100 + 0o44)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def SVKnebZUhpql(hXMPsSrOQzbh, bI5jsQ9OkQtj): Fi3yzxctM1zW = hXMPsSrOQzbh[nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b11010 + 0o26), 0o10)] for ZlbFMSG8gCoF in tpoEqV5cEG2w(nzTpIcepk0o8(chr(0b110000) + chr(0b110 + 0o151) + chr(49), 0b1000), ftfygxgFas5X(hXMPsSrOQzbh)): Fi3yzxctM1zW = Fi3yzxctM1zW * bI5jsQ9OkQtj + hXMPsSrOQzbh.coefficients[ZlbFMSG8gCoF] return Fi3yzxctM1zW
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/polynomial.py
Polynomial.evaluate_array
def evaluate_array(self, x): '''Simple way of evaluating a polynomial at value x, but here we return both the full array (evaluated at each polynomial position) and the sum''' x_gf = self.coefficients[0].__class__(x) arr = [self.coefficients[-i]*x_gf**(i-1) for i in _range(len(self), 0, -1)] # if x == 1: arr = sum(self.coefficients) return arr, sum(arr)
python
def evaluate_array(self, x): '''Simple way of evaluating a polynomial at value x, but here we return both the full array (evaluated at each polynomial position) and the sum''' x_gf = self.coefficients[0].__class__(x) arr = [self.coefficients[-i]*x_gf**(i-1) for i in _range(len(self), 0, -1)] # if x == 1: arr = sum(self.coefficients) return arr, sum(arr)
[ "def", "evaluate_array", "(", "self", ",", "x", ")", ":", "x_gf", "=", "self", ".", "coefficients", "[", "0", "]", ".", "__class__", "(", "x", ")", "arr", "=", "[", "self", ".", "coefficients", "[", "-", "i", "]", "*", "x_gf", "**", "(", "i", "-", "1", ")", "for", "i", "in", "_range", "(", "len", "(", "self", ")", ",", "0", ",", "-", "1", ")", "]", "# if x == 1: arr = sum(self.coefficients)", "return", "arr", ",", "sum", "(", "arr", ")" ]
Simple way of evaluating a polynomial at value x, but here we return both the full array (evaluated at each polynomial position) and the sum
[ "Simple", "way", "of", "evaluating", "a", "polynomial", "at", "value", "x", "but", "here", "we", "return", "both", "the", "full", "array", "(", "evaluated", "at", "each", "polynomial", "position", ")", "and", "the", "sum" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/polynomial.py#L351-L356
train
Simple way of evaluating a polynomial at value x but here we return both the full array and the sum of the array
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkH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O67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + chr(0b110111) + chr(0b10 + 0o56), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1111 + 0o140) + chr(0b110001 + 0o2) + '\x33' + chr(0b11110 + 0o30), 9094 - 9086), nzTpIcepk0o8(chr(0b110000) + chr(0b1100001 + 0o16) + chr(49) + chr(0b110010 + 0o5) + chr(0b110000 + 0o6), 1622 - 1614), nzTpIcepk0o8('\060' + chr(2283 - 2172) + chr(1439 - 1389) + chr(158 - 105) + '\x30', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b110101 + 0o72) + chr(0b110110) + chr(52), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(1507 - 1396) + chr(0b10101 + 0o36) + chr(0b1001 + 0o52) + '\066', 8), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110000 + 0o7) + chr(0b101000 + 0o13), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + chr(0b110110) + chr(0b1011 + 0o52), 0o10), nzTpIcepk0o8(chr(48) + chr(6736 - 6625) + chr(239 - 188) + '\066' + chr(1344 - 1295), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(1132 - 1083) + chr(2271 - 2217) + chr(100 - 51), 12501 - 12493), nzTpIcepk0o8(chr(48) + chr(7353 - 7242) + chr(0b11000 + 0o32) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(1413 - 1365) + chr(111) + '\x32' + chr(48) + '\060', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(352 - 300), 38595 - 38587), nzTpIcepk0o8(chr(48) + '\157' + chr(49) + chr(55) + chr(0b0 + 0o60), 8), nzTpIcepk0o8('\060' + '\x6f' + '\062' + chr(50) + '\x31', 55300 - 55292), nzTpIcepk0o8(chr(227 - 179) + chr(0b11000 + 0o127) + chr(51) + chr(0b1111 + 0o47) + chr(51), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(53) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\x6f' + '\061' + chr(0b110110 + 0o0) + chr(61 - 6), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + chr(49) + chr(50), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\062' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(48) + chr(2840 - 2729) + chr(0b11111 + 0o22) + chr(1605 - 1555) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\x6f' + chr(50) + chr(0b110100) + chr(0b110100), 0o10), nzTpIcepk0o8('\060' + chr(7947 - 7836) + chr(0b101011 + 0o6) + chr(1051 - 1000) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(1137 - 1089) + chr(0b1101111) + chr(55) + chr(50), 24815 - 24807), nzTpIcepk0o8(chr(0b110000) + chr(7092 - 6981) + chr(2252 - 2202) + '\063' + chr(55), 0o10), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\x6f' + chr(0b11011 + 0o32) + chr(2496 - 2442), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(2543 - 2491) + chr(935 - 883), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + chr(1055 - 1001), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(0b110111) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100110 + 0o15) + chr(2675 - 2622) + chr(0b110001), 20841 - 20833), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + '\061' + chr(96 - 47), 61528 - 61520), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1993 - 1941), 8), nzTpIcepk0o8('\x30' + chr(0b11001 + 0o126) + chr(1473 - 1423) + chr(54) + chr(0b110000), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + chr(55) + chr(1363 - 1308), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(1459 - 1411) + chr(0b10 + 0o65), ord("\x08")), nzTpIcepk0o8(chr(1016 - 968) + chr(0b1100100 + 0o13) + '\x32' + chr(0b110001) + chr(408 - 360), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(946 - 835) + chr(0b110100) + chr(48), 19181 - 19173), nzTpIcepk0o8(chr(308 - 260) + '\x6f' + chr(49) + '\065' + chr(1903 - 1848), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + chr(0b101000 + 0o12) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b110 + 0o151) + '\061' + '\063', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b1001000 + 0o47) + '\x35' + chr(0b1001 + 0o47), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'V'), chr(0b1100100) + chr(0b11101 + 0o110) + '\143' + chr(111) + '\x64' + chr(0b10010 + 0o123))(chr(13459 - 13342) + '\x74' + chr(102) + '\x2d' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def BAzsKOIaKFPu(hXMPsSrOQzbh, bI5jsQ9OkQtj): L5uf7udNRyie = hXMPsSrOQzbh.coefficients[nzTpIcepk0o8(chr(761 - 713) + chr(111) + '\x30', 0o10)].ms49tbQaVKwA(bI5jsQ9OkQtj) JaZEP80kXwoT = [hXMPsSrOQzbh.coefficients[-ZlbFMSG8gCoF] * L5uf7udNRyie ** (ZlbFMSG8gCoF - nzTpIcepk0o8('\x30' + '\x6f' + '\x31', ord("\x08"))) for ZlbFMSG8gCoF in tpoEqV5cEG2w(ftfygxgFas5X(hXMPsSrOQzbh), nzTpIcepk0o8('\x30' + chr(1110 - 999) + chr(0b110000), 8), -nzTpIcepk0o8(chr(48) + '\157' + '\061', 8))] return (JaZEP80kXwoT, oclC8DLjA_lV(JaZEP80kXwoT))
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/polynomial.py
Polynomial.derive
def derive(self): '''Compute the formal derivative of the polynomial: sum(i*coeff[i] x^(i-1))''' #res = [0] * (len(self)-1) # pre-allocate the list, it will be one item shorter because the constant coefficient (x^0) will be removed #for i in _range(2, len(self)+1): # start at 2 to skip the first coeff which is useless since it's a constant (x^0) so we +1, and because we work in reverse (lower coefficients are on the right) so +1 again #res[-(i-1)] = (i-1) * self[-i] # self[-i] == coeff[i] and i-1 is the x exponent (eg: x^1, x^2, x^3, etc.) #return Polynomial(res) # One liner way to do it (also a bit faster too) #return Polynomial( [(i-1) * self[-i] for i in _range(2, len(self)+1)][::-1] ) # Another faster version L = len(self)-1 return Polynomial( [(L-i) * self[i] for i in _range(0, len(self)-1)] )
python
def derive(self): '''Compute the formal derivative of the polynomial: sum(i*coeff[i] x^(i-1))''' #res = [0] * (len(self)-1) # pre-allocate the list, it will be one item shorter because the constant coefficient (x^0) will be removed #for i in _range(2, len(self)+1): # start at 2 to skip the first coeff which is useless since it's a constant (x^0) so we +1, and because we work in reverse (lower coefficients are on the right) so +1 again #res[-(i-1)] = (i-1) * self[-i] # self[-i] == coeff[i] and i-1 is the x exponent (eg: x^1, x^2, x^3, etc.) #return Polynomial(res) # One liner way to do it (also a bit faster too) #return Polynomial( [(i-1) * self[-i] for i in _range(2, len(self)+1)][::-1] ) # Another faster version L = len(self)-1 return Polynomial( [(L-i) * self[i] for i in _range(0, len(self)-1)] )
[ "def", "derive", "(", "self", ")", ":", "#res = [0] * (len(self)-1) # pre-allocate the list, it will be one item shorter because the constant coefficient (x^0) will be removed", "#for i in _range(2, len(self)+1): # start at 2 to skip the first coeff which is useless since it's a constant (x^0) so we +1, and because we work in reverse (lower coefficients are on the right) so +1 again", "#res[-(i-1)] = (i-1) * self[-i] # self[-i] == coeff[i] and i-1 is the x exponent (eg: x^1, x^2, x^3, etc.)", "#return Polynomial(res)", "# One liner way to do it (also a bit faster too)", "#return Polynomial( [(i-1) * self[-i] for i in _range(2, len(self)+1)][::-1] )", "# Another faster version", "L", "=", "len", "(", "self", ")", "-", "1", "return", "Polynomial", "(", "[", "(", "L", "-", "i", ")", "*", "self", "[", "i", "]", "for", "i", "in", "_range", "(", "0", ",", "len", "(", "self", ")", "-", "1", ")", "]", ")" ]
Compute the formal derivative of the polynomial: sum(i*coeff[i] x^(i-1))
[ "Compute", "the", "formal", "derivative", "of", "the", "polynomial", ":", "sum", "(", "i", "*", "coeff", "[", "i", "]", "x^", "(", "i", "-", "1", "))" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/polynomial.py#L358-L369
train
Compute the formal derivative of the polynomial
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7e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Warning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\157' + chr(0b1011 + 0o50) + '\065' + chr(48), 4629 - 4621), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(2569 - 2458) + chr(0b110011) + '\060' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1000000 + 0o57) + chr(0b11100 + 0o32) + chr(295 - 242), ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(808 - 697) + chr(0b110000 + 0o2) + '\061', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + chr(0b10101 + 0o34) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(0b100011 + 0o114) + '\063' + chr(0b110101) + '\064', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + '\062' + chr(0b10101 + 0o41), 0b1000), nzTpIcepk0o8(chr(772 - 724) + '\157' + chr(0b110000 + 0o2) + chr(0b110101 + 0o0) + '\x34', 3503 - 3495), nzTpIcepk0o8('\x30' + '\157' + '\064' + chr(1625 - 1570), 0b1000), nzTpIcepk0o8(chr(2219 - 2171) + chr(6897 - 6786) + chr(0b11010 + 0o30) + '\067' + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(0b110010 + 0o4) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(10231 - 10120) + chr(0b1000 + 0o52) + '\x36' + chr(0b100100 + 0o14), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(711 - 660), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b11110 + 0o121) + chr(0b10011 + 0o36) + '\x35' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b100 + 0o54) + '\157' + chr(1555 - 1506) + '\x34' + chr(0b10100 + 0o42), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + '\061' + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(1199 - 1088) + chr(1939 - 1888) + chr(48) + chr(916 - 868), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(0b100001 + 0o17) + chr(1489 - 1441), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10001 + 0o44) + chr(0b1000 + 0o57), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + '\x37' + chr(939 - 887), 0o10), nzTpIcepk0o8('\x30' + chr(0b110 + 0o151) + chr(0b110011) + chr(0b101011 + 0o14) + chr(1686 - 1632), 19538 - 19530), nzTpIcepk0o8(chr(201 - 153) + '\x6f' + '\x31' + chr(51) + chr(714 - 662), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x33' + chr(53) + chr(53), 0o10), nzTpIcepk0o8(chr(1051 - 1003) + '\x6f' + chr(579 - 528) + '\x31' + chr(0b110111), 12490 - 12482), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + '\062' + chr(2299 - 2251), 0b1000), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(111) + chr(0b101110 + 0o5) + chr(0b11111 + 0o23) + '\064', 0b1000), nzTpIcepk0o8(chr(1582 - 1534) + '\x6f' + chr(0b1 + 0o64) + '\x36', 64120 - 64112), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(111) + chr(0b110001) + chr(387 - 336) + '\x32', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + '\x37' + '\x35', 24257 - 24249), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + chr(0b1100 + 0o47) + chr(0b1000 + 0o52), 8), nzTpIcepk0o8('\060' + chr(111) + '\x32' + '\x34' + chr(0b110011), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b101100 + 0o6) + chr(50) + chr(2726 - 2672), 8), nzTpIcepk0o8(chr(517 - 469) + chr(5110 - 4999) + chr(1030 - 979) + '\x31', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + '\060' + chr(0b100100 + 0o22), ord("\x08")), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\157' + '\061' + '\x35' + chr(2089 - 2038), 0b1000), nzTpIcepk0o8('\060' + chr(0b0 + 0o157) + chr(2335 - 2284) + chr(51) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b110111) + chr(0b10101 + 0o34), 5678 - 5670), nzTpIcepk0o8(chr(48) + chr(0b100101 + 0o112) + '\x34', 0b1000), nzTpIcepk0o8(chr(1545 - 1497) + '\157' + chr(1857 - 1806) + chr(0b110110) + chr(51), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + chr(0b110111) + chr(53), 2909 - 2901)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b1101111) + chr(0b110011 + 0o2) + chr(0b110000), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xc6'), '\x64' + chr(101) + chr(99) + chr(0b1101111) + chr(0b100110 + 0o76) + '\x65')(chr(117) + chr(2100 - 1984) + chr(4698 - 4596) + chr(0b11011 + 0o22) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def BP_Vvw9qXyAC(hXMPsSrOQzbh): QkRI2ibxeUAu = ftfygxgFas5X(hXMPsSrOQzbh) - nzTpIcepk0o8(chr(0b1 + 0o57) + '\x6f' + chr(2253 - 2204), 50895 - 50887) return ujppqiXNPJu0([(QkRI2ibxeUAu - ZlbFMSG8gCoF) * hXMPsSrOQzbh[ZlbFMSG8gCoF] for ZlbFMSG8gCoF in tpoEqV5cEG2w(nzTpIcepk0o8('\x30' + chr(111) + chr(1464 - 1416), ord("\x08")), ftfygxgFas5X(hXMPsSrOQzbh) - nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(7159 - 7048) + '\061', 8))])
lrq3000/pyFileFixity
pyFileFixity/structural_adaptive_ecc.py
feature_scaling
def feature_scaling(x, xmin, xmax, a=0, b=1): '''Generalized feature scaling (useful for variable error correction rate calculation)''' return a + float(x - xmin) * (b - a) / (xmax - xmin)
python
def feature_scaling(x, xmin, xmax, a=0, b=1): '''Generalized feature scaling (useful for variable error correction rate calculation)''' return a + float(x - xmin) * (b - a) / (xmax - xmin)
[ "def", "feature_scaling", "(", "x", ",", "xmin", ",", "xmax", ",", "a", "=", "0", ",", "b", "=", "1", ")", ":", "return", "a", "+", "float", "(", "x", "-", "xmin", ")", "*", "(", "b", "-", "a", ")", "/", "(", "xmax", "-", "xmin", ")" ]
Generalized feature scaling (useful for variable error correction rate calculation)
[ "Generalized", "feature", "scaling", "(", "useful", "for", "variable", "error", "correction", "rate", "calculation", ")" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/structural_adaptive_ecc.py#L91-L93
train
Generalized feature scaling
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRf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26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(0b1010000 + 0o37) + '\061' + '\065' + chr(0b1111 + 0o47), 0o10), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(5330 - 5219) + chr(51) + chr(0b10110 + 0o37) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(2303 - 2255) + '\x6f' + chr(50) + chr(0b110001) + '\x30', 0o10), nzTpIcepk0o8(chr(48) + chr(6266 - 6155) + chr(0b110001) + chr(55) + chr(682 - 634), 0o10), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(7300 - 7189) + chr(0b1 + 0o66) + '\x36', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + '\x36' + '\x34', 0b1000), nzTpIcepk0o8(chr(1432 - 1384) + '\157' + '\x34' + '\x36', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + chr(0b110101) + chr(0b110101), 49217 - 49209), nzTpIcepk0o8(chr(1785 - 1737) + '\157' + chr(1311 - 1260) + chr(360 - 308) + '\065', 0o10), nzTpIcepk0o8('\x30' + chr(0b111111 + 0o60) + chr(0b110010) + '\x32' + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\x6f' + '\x33' + chr(159 - 111) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(920 - 869) + '\x31' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(0b1101111) + chr(2087 - 2038) + chr(52) + '\060', 0b1000), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(11321 - 11210) + chr(0b10101 + 0o35) + chr(185 - 130), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + chr(0b110100) + chr(0b110100), 58324 - 58316), nzTpIcepk0o8(chr(0b110000) + chr(0b1100100 + 0o13) + chr(50) + '\x30' + chr(2125 - 2076), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + chr(0b101011 + 0o5) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(770 - 720) + chr(0b110100) + '\066', 2929 - 2921), nzTpIcepk0o8(chr(48) + '\157' + '\063' + chr(0b1000 + 0o57) + chr(852 - 799), 52274 - 52266), nzTpIcepk0o8(chr(0b100 + 0o54) + '\157' + '\063' + '\060' + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(48) + chr(0b110101), 23700 - 23692), nzTpIcepk0o8(chr(48) + '\157' + '\x32' + chr(403 - 353) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\157' + chr(794 - 745) + chr(49) + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100 + 0o55) + chr(0b1 + 0o61) + chr(1409 - 1359), 18462 - 18454), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + chr(0b110001) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\x6f' + chr(0b110001) + '\065', ord("\x08")), nzTpIcepk0o8(chr(2304 - 2256) + chr(0b10010 + 0o135) + '\063' + chr(0b100010 + 0o20) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(54) + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b11100 + 0o26) + chr(0b1101 + 0o52), 8), nzTpIcepk0o8('\x30' + chr(111) + '\061' + chr(0b110100) + chr(50), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1010001 + 0o36) + chr(0b110010) + chr(1442 - 1388) + chr(1040 - 986), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(859 - 808) + '\x30' + chr(0b110010), 8), nzTpIcepk0o8(chr(230 - 182) + chr(0b10010 + 0o135) + chr(52) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1000000 + 0o57) + '\063' + '\x36' + chr(127 - 77), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b110001 + 0o76) + chr(51) + chr(0b11110 + 0o24) + '\067', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1 + 0o156) + chr(51) + chr(0b110111) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\157' + '\063' + chr(2995 - 2940), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100001 + 0o20) + chr(51) + '\067', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b101001 + 0o10) + chr(261 - 211) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + chr(0b1011 + 0o45) + '\x32', 53180 - 53172)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1514 - 1466) + chr(0b1101111) + chr(0b110101) + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'@'), '\x64' + '\145' + '\x63' + '\x6f' + '\x64' + chr(101))(chr(117) + '\x74' + chr(3621 - 3519) + '\x2d' + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Tnth0qHjTfzw(bI5jsQ9OkQtj, xq9Cm2xGJKft, itamR4vvwOYz, AQ9ceR9AaoT1=nzTpIcepk0o8(chr(511 - 463) + '\x6f' + '\x30', 0o10), xFDEVQn5qSdh=nzTpIcepk0o8(chr(0b1010 + 0o46) + '\x6f' + '\x31', 14294 - 14286)): return AQ9ceR9AaoT1 + jLW6pRf2DSRk(bI5jsQ9OkQtj - xq9Cm2xGJKft) * (xFDEVQn5qSdh - AQ9ceR9AaoT1) / (itamR4vvwOYz - xq9Cm2xGJKft)
lrq3000/pyFileFixity
pyFileFixity/structural_adaptive_ecc.py
entry_fields
def entry_fields(file, entry_pos, field_delim="\xFF"): '''From an ecc entry position (a list with starting and ending positions), extract the metadata fields (filename, filesize, ecc for both), and the starting/ending positions of the ecc stream (containing variably encoded blocks of hash and ecc per blocks of the original file's header)''' # Read the the beginning of the ecc entry blocksize = 65535 file.seek(entry_pos[0]) entry = file.read(blocksize) entry = entry.lstrip(field_delim) # if there was some slight adjustment error (example: the last ecc block of the last file was the field_delim, then we will start with a field_delim, and thus we need to remove the trailing field_delim which is useless and will make the field detection buggy). This is not really a big problem for the previous file's ecc block: the missing ecc characters (which were mistaken for a field_delim), will just be missing (so we will lose a bit of resiliency for the last block of the previous file, but that's not a huge issue, the correction can still rely on the other characters). # TODO: do in a while loop in case the filename is really big (bigger than blocksize) - or in case we add intra-ecc for filename # Find metadata fields delimiters positions # TODO: automate this part, just give in argument the number of field_delim to find, and the func will find the x field_delims (the number needs to be specified in argument because the field_delim can maybe be found wrongly inside the ecc stream, which we don't want) first = entry.find(field_delim) second = entry.find(field_delim, first+len(field_delim)) third = entry.find(field_delim, second+len(field_delim)) fourth = entry.find(field_delim, third+len(field_delim)) # Note: we do not try to find all the field delimiters because we optimize here: we just walk the string to find the exact number of field_delim we are looking for, and after we stop, no need to walk through the whole string. # Extract the content of the fields # Metadata fields relfilepath = entry[:first] filesize = entry[first+len(field_delim):second] relfilepath_ecc = entry[second+len(field_delim):third] filesize_ecc = entry[third+len(field_delim):fourth] # Ecc stream field (aka ecc blocks) ecc_field_pos = [entry_pos[0]+fourth+len(field_delim), entry_pos[1]] # return the starting and ending position of the rest of the ecc track, which contains blocks of hash/ecc of the original file's content. # Place the cursor at the beginning of the ecc_field file.seek(ecc_field_pos[0]) # Try to convert to an int, an error may happen try: filesize = int(filesize) except Exception, e: print("Exception when trying to detect the filesize in ecc field (it may be corrupted), skipping: ") print(e) #filesize = 0 # avoid setting to 0, we keep as an int so that we can try to fix using intra-ecc # entries = [ {"message":, "ecc":, "hash":}, etc.] return {"relfilepath": relfilepath, "relfilepath_ecc": relfilepath_ecc, "filesize": filesize, "filesize_ecc": filesize_ecc, "ecc_field_pos": ecc_field_pos}
python
def entry_fields(file, entry_pos, field_delim="\xFF"): '''From an ecc entry position (a list with starting and ending positions), extract the metadata fields (filename, filesize, ecc for both), and the starting/ending positions of the ecc stream (containing variably encoded blocks of hash and ecc per blocks of the original file's header)''' # Read the the beginning of the ecc entry blocksize = 65535 file.seek(entry_pos[0]) entry = file.read(blocksize) entry = entry.lstrip(field_delim) # if there was some slight adjustment error (example: the last ecc block of the last file was the field_delim, then we will start with a field_delim, and thus we need to remove the trailing field_delim which is useless and will make the field detection buggy). This is not really a big problem for the previous file's ecc block: the missing ecc characters (which were mistaken for a field_delim), will just be missing (so we will lose a bit of resiliency for the last block of the previous file, but that's not a huge issue, the correction can still rely on the other characters). # TODO: do in a while loop in case the filename is really big (bigger than blocksize) - or in case we add intra-ecc for filename # Find metadata fields delimiters positions # TODO: automate this part, just give in argument the number of field_delim to find, and the func will find the x field_delims (the number needs to be specified in argument because the field_delim can maybe be found wrongly inside the ecc stream, which we don't want) first = entry.find(field_delim) second = entry.find(field_delim, first+len(field_delim)) third = entry.find(field_delim, second+len(field_delim)) fourth = entry.find(field_delim, third+len(field_delim)) # Note: we do not try to find all the field delimiters because we optimize here: we just walk the string to find the exact number of field_delim we are looking for, and after we stop, no need to walk through the whole string. # Extract the content of the fields # Metadata fields relfilepath = entry[:first] filesize = entry[first+len(field_delim):second] relfilepath_ecc = entry[second+len(field_delim):third] filesize_ecc = entry[third+len(field_delim):fourth] # Ecc stream field (aka ecc blocks) ecc_field_pos = [entry_pos[0]+fourth+len(field_delim), entry_pos[1]] # return the starting and ending position of the rest of the ecc track, which contains blocks of hash/ecc of the original file's content. # Place the cursor at the beginning of the ecc_field file.seek(ecc_field_pos[0]) # Try to convert to an int, an error may happen try: filesize = int(filesize) except Exception, e: print("Exception when trying to detect the filesize in ecc field (it may be corrupted), skipping: ") print(e) #filesize = 0 # avoid setting to 0, we keep as an int so that we can try to fix using intra-ecc # entries = [ {"message":, "ecc":, "hash":}, etc.] return {"relfilepath": relfilepath, "relfilepath_ecc": relfilepath_ecc, "filesize": filesize, "filesize_ecc": filesize_ecc, "ecc_field_pos": ecc_field_pos}
[ "def", "entry_fields", "(", "file", ",", "entry_pos", ",", "field_delim", "=", "\"\\xFF\"", ")", ":", "# Read the the beginning of the ecc entry", "blocksize", "=", "65535", "file", ".", "seek", "(", "entry_pos", "[", "0", "]", ")", "entry", "=", "file", ".", "read", "(", "blocksize", ")", "entry", "=", "entry", ".", "lstrip", "(", "field_delim", ")", "# if there was some slight adjustment error (example: the last ecc block of the last file was the field_delim, then we will start with a field_delim, and thus we need to remove the trailing field_delim which is useless and will make the field detection buggy). This is not really a big problem for the previous file's ecc block: the missing ecc characters (which were mistaken for a field_delim), will just be missing (so we will lose a bit of resiliency for the last block of the previous file, but that's not a huge issue, the correction can still rely on the other characters).", "# TODO: do in a while loop in case the filename is really big (bigger than blocksize) - or in case we add intra-ecc for filename", "# Find metadata fields delimiters positions", "# TODO: automate this part, just give in argument the number of field_delim to find, and the func will find the x field_delims (the number needs to be specified in argument because the field_delim can maybe be found wrongly inside the ecc stream, which we don't want)", "first", "=", "entry", ".", "find", "(", "field_delim", ")", "second", "=", "entry", ".", "find", "(", "field_delim", ",", "first", "+", "len", "(", "field_delim", ")", ")", "third", "=", "entry", ".", "find", "(", "field_delim", ",", "second", "+", "len", "(", "field_delim", ")", ")", "fourth", "=", "entry", ".", "find", "(", "field_delim", ",", "third", "+", "len", "(", "field_delim", ")", ")", "# Note: we do not try to find all the field delimiters because we optimize here: we just walk the string to find the exact number of field_delim we are looking for, and after we stop, no need to walk through the whole string.", "# Extract the content of the fields", "# Metadata fields", "relfilepath", "=", "entry", "[", ":", "first", "]", "filesize", "=", "entry", "[", "first", "+", "len", "(", "field_delim", ")", ":", "second", "]", "relfilepath_ecc", "=", "entry", "[", "second", "+", "len", "(", "field_delim", ")", ":", "third", "]", "filesize_ecc", "=", "entry", "[", "third", "+", "len", "(", "field_delim", ")", ":", "fourth", "]", "# Ecc stream field (aka ecc blocks)", "ecc_field_pos", "=", "[", "entry_pos", "[", "0", "]", "+", "fourth", "+", "len", "(", "field_delim", ")", ",", "entry_pos", "[", "1", "]", "]", "# return the starting and ending position of the rest of the ecc track, which contains blocks of hash/ecc of the original file's content.", "# Place the cursor at the beginning of the ecc_field", "file", ".", "seek", "(", "ecc_field_pos", "[", "0", "]", ")", "# Try to convert to an int, an error may happen", "try", ":", "filesize", "=", "int", "(", "filesize", ")", "except", "Exception", ",", "e", ":", "print", "(", "\"Exception when trying to detect the filesize in ecc field (it may be corrupted), skipping: \"", ")", "print", "(", "e", ")", "#filesize = 0 # avoid setting to 0, we keep as an int so that we can try to fix using intra-ecc", "# entries = [ {\"message\":, \"ecc\":, \"hash\":}, etc.]", "return", "{", "\"relfilepath\"", ":", "relfilepath", ",", "\"relfilepath_ecc\"", ":", "relfilepath_ecc", ",", "\"filesize\"", ":", "filesize", ",", "\"filesize_ecc\"", ":", "filesize_ecc", ",", "\"ecc_field_pos\"", ":", "ecc_field_pos", "}" ]
From an ecc entry position (a list with starting and ending positions), extract the metadata fields (filename, filesize, ecc for both), and the starting/ending positions of the ecc stream (containing variably encoded blocks of hash and ecc per blocks of the original file's header)
[ "From", "an", "ecc", "entry", "position", "(", "a", "list", "with", "starting", "and", "ending", "positions", ")", "extract", "the", "metadata", "fields", "(", "filename", "filesize", "ecc", "for", "both", ")", "and", "the", "starting", "/", "ending", "positions", "of", "the", "ecc", "stream", "(", "containing", "variably", "encoded", "blocks", "of", "hash", "and", "ecc", "per", "blocks", "of", "the", "original", "file", "s", "header", ")" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/structural_adaptive_ecc.py#L97-L135
train
Extract the metadata fields from an ecc entry position.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZI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Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1101111) + chr(51) + chr(50) + '\063', 46168 - 46160), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + '\066' + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\x30' + chr(9450 - 9339) + chr(0b110010) + chr(50) + chr(415 - 365), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(4725 - 4614) + '\063' + chr(1508 - 1459) + chr(1341 - 1288), 0o10), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\x6f' + chr(785 - 734) + chr(0b1011 + 0o45) + chr(0b1101 + 0o43), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(2540 - 2489) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(1554 - 1506) + chr(10978 - 10867) + '\063' + '\x31' + chr(0b11111 + 0o21), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11100 + 0o26) + chr(0b100001 + 0o26) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(5435 - 5324) + '\x36' + chr(0b110000 + 0o3), 0o10), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b1101111) + '\064' + '\062', 58598 - 58590), nzTpIcepk0o8('\x30' + '\157' + chr(0b10101 + 0o36) + chr(330 - 275) + '\067', 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\063' + chr(52) + chr(0b110011 + 0o2), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1010110 + 0o31) + chr(0b100110 + 0o15) + chr(0b101010 + 0o14) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\064' + '\065', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1000010 + 0o55) + chr(0b110011) + '\063' + chr(0b10001 + 0o45), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(53) + chr(729 - 681), ord("\x08")), nzTpIcepk0o8('\060' + chr(10589 - 10478) + '\x31' + '\x33' + chr(50), 0o10), nzTpIcepk0o8(chr(2275 - 2227) + chr(111) + '\062' + chr(887 - 836) + chr(0b100100 + 0o15), ord("\x08")), nzTpIcepk0o8(chr(1776 - 1728) + chr(111) + '\x33' + chr(51) + '\066', 8), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\157' + chr(51) + '\x36' + chr(0b110110), 0o10), nzTpIcepk0o8('\x30' + chr(10606 - 10495) + chr(0b101000 + 0o13) + chr(55) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b1101010 + 0o5) + chr(50) + '\x34' + chr(52), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(0b110101) + '\065', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + '\065' + chr(2330 - 2275), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2032 - 1983) + chr(1148 - 1099) + '\x35', 0o10), nzTpIcepk0o8('\x30' + chr(741 - 630) + '\x31' + chr(2525 - 2471) + '\060', 8), nzTpIcepk0o8(chr(1777 - 1729) + '\x6f' + chr(0b110011) + chr(0b110011) + '\067', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b101111 + 0o100) + chr(1876 - 1821) + chr(2682 - 2628), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\061' + '\062' + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x31' + chr(51) + chr(672 - 617), ord("\x08")), nzTpIcepk0o8(chr(1490 - 1442) + '\x6f' + chr(51) + chr(0b100000 + 0o20) + chr(0b110001 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + chr(0b110111) + chr(0b11010 + 0o26), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1001000 + 0o47) + '\063' + chr(0b110100) + chr(51), 0b1000), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(269 - 158) + chr(0b110011) + chr(53), 0o10), nzTpIcepk0o8(chr(48) + chr(5639 - 5528) + chr(2187 - 2133) + chr(52), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(51) + chr(0b110111), 0b1000), nzTpIcepk0o8('\060' + chr(0b11100 + 0o123) + chr(0b110111) + chr(2168 - 2119), 42680 - 42672), nzTpIcepk0o8(chr(1224 - 1176) + '\x6f' + '\067' + '\062', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(3382 - 3271) + chr(1329 - 1279) + '\067' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b110001 + 0o76) + '\061' + chr(0b11010 + 0o35) + '\065', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1037 - 984) + chr(0b10100 + 0o34), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xfd'), chr(272 - 172) + chr(0b111001 + 0o54) + chr(7981 - 7882) + '\157' + '\144' + '\x65')(chr(117) + '\x74' + chr(6257 - 6155) + chr(0b101101) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def L5VpeflZtpOn(GtsVUCYulgYX, tdSgScBDzRLp, dxKk_1MnXGzU=roI3spqORKae(ES5oEprVxulp(b'\x10\xcf'), chr(100) + '\145' + chr(0b1100011) + '\x6f' + chr(100) + chr(101))('\165' + chr(0b1110100) + chr(0b1010100 + 0o22) + '\055' + chr(56))): ZcKogJN6rdxb = nzTpIcepk0o8(chr(48) + chr(6783 - 6672) + chr(49) + chr(0b100111 + 0o20) + '\067' + '\x37' + chr(412 - 357) + '\x37', 0o10) roI3spqORKae(GtsVUCYulgYX, roI3spqORKae(ES5oEprVxulp(b'\xa0\x15\xf7\xa6'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(10675 - 10564) + chr(6706 - 6606) + '\145')(chr(3555 - 3438) + chr(0b1110100) + '\x66' + chr(45) + '\070'))(tdSgScBDzRLp[nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110000), 32768 - 32760)]) eTfWnO_8KfiX = GtsVUCYulgYX.eoXknH7XUn7m(ZcKogJN6rdxb) eTfWnO_8KfiX = eTfWnO_8KfiX.aEgdU9zDXvuR(dxKk_1MnXGzU) N04_Yk27K3ME = eTfWnO_8KfiX.mlLPzxww6J51(dxKk_1MnXGzU) ZUQ3HHnCqJA6 = eTfWnO_8KfiX.mlLPzxww6J51(dxKk_1MnXGzU, N04_Yk27K3ME + ftfygxgFas5X(dxKk_1MnXGzU)) wO9NcgTf_ER4 = eTfWnO_8KfiX.mlLPzxww6J51(dxKk_1MnXGzU, ZUQ3HHnCqJA6 + ftfygxgFas5X(dxKk_1MnXGzU)) igo4vqVQ4dQl = eTfWnO_8KfiX.mlLPzxww6J51(dxKk_1MnXGzU, wO9NcgTf_ER4 + ftfygxgFas5X(dxKk_1MnXGzU)) jJey7cPvLSKB = eTfWnO_8KfiX[:N04_Yk27K3ME] lcPFaKwNJJye = eTfWnO_8KfiX[N04_Yk27K3ME + ftfygxgFas5X(dxKk_1MnXGzU):ZUQ3HHnCqJA6] KDbj5oAxkxq7 = eTfWnO_8KfiX[ZUQ3HHnCqJA6 + ftfygxgFas5X(dxKk_1MnXGzU):wO9NcgTf_ER4] tVLgvUffywvE = eTfWnO_8KfiX[wO9NcgTf_ER4 + ftfygxgFas5X(dxKk_1MnXGzU):igo4vqVQ4dQl] FPJVmB0EJa6b = [tdSgScBDzRLp[nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110000), 8)] + igo4vqVQ4dQl + ftfygxgFas5X(dxKk_1MnXGzU), tdSgScBDzRLp[nzTpIcepk0o8('\060' + chr(932 - 821) + chr(248 - 199), 0b1000)]] roI3spqORKae(GtsVUCYulgYX, roI3spqORKae(ES5oEprVxulp(b'\xa0\x15\xf7\xa6'), '\144' + chr(0b1010110 + 0o17) + '\143' + '\x6f' + chr(0b100111 + 0o75) + chr(101))(chr(0b111010 + 0o73) + chr(4384 - 4268) + chr(102) + chr(45) + chr(56)))(FPJVmB0EJa6b[nzTpIcepk0o8('\x30' + chr(825 - 714) + chr(48), 8)]) try: lcPFaKwNJJye = nzTpIcepk0o8(lcPFaKwNJJye) except zfo2Sgkz3IVJ as wgf0sgcu_xPL: v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\x96\x08\xf1\xa8\xb0n\xa1\xd2]\x02\x88\x8d\x95K\xfe\x1c(\xe0\xb7\x98\x9e\x84\x19\xc0m\x14\xbaJ7<\xb0\xd8\x97uQ?_S\xd3\x18\xa0\x19\xe8\xa8\xe0s\xa6\x9dVA\x9c\xc5\x96L\xbb\x04>\xb9\xf6\x9f\x8d\x84\x00\xce4P\xbd[r<\xab\x8a\x91hDk\\^\x96Q\xf3\x03\xf9\xa4\xb0j\xa1\xd3T\x18\xdf'), chr(100) + chr(4056 - 3955) + '\143' + chr(111) + '\144' + '\x65')(chr(0b1110101) + chr(116) + chr(0b1000101 + 0o41) + '\x2d' + chr(0b111000))) v8jsMqaYV6U2(wgf0sgcu_xPL) return {roI3spqORKae(ES5oEprVxulp(b'\xa1\x15\xfe\xab\xa9v\xad\xcdRV\x97'), '\144' + chr(101) + chr(0b1100011) + chr(0b1101010 + 0o5) + chr(0b1100100) + chr(101))(chr(1821 - 1704) + '\x74' + '\146' + chr(1997 - 1952) + chr(1763 - 1707)): jJey7cPvLSKB, roI3spqORKae(ES5oEprVxulp(b'\xa1\x15\xfe\xab\xa9v\xad\xcdRV\x97\xba\x95F\xbd'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(0b1010110 + 0o31) + chr(100) + chr(0b1000010 + 0o43))(chr(8318 - 8201) + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(0b111000)): KDbj5oAxkxq7, roI3spqORKae(ES5oEprVxulp(b'\xb5\x19\xfe\xa8\xb3s\xb2\xd8'), chr(100) + '\x65' + '\x63' + chr(0b1100111 + 0o10) + '\x64' + chr(0b1001101 + 0o30))(chr(10801 - 10684) + chr(116) + chr(102) + chr(45) + chr(56)): lcPFaKwNJJye, roI3spqORKae(ES5oEprVxulp(b'\xb5\x19\xfe\xa8\xb3s\xb2\xd8lG\x9c\x86'), '\144' + chr(101) + chr(99) + chr(0b10000 + 0o137) + chr(6031 - 5931) + chr(0b1100101))(chr(1081 - 964) + '\164' + '\x66' + '\055' + '\070'): tVLgvUffywvE, roI3spqORKae(ES5oEprVxulp(b'\xb6\x13\xf1\x92\xa6s\xad\xd1W}\x8f\x8a\x83'), '\x64' + '\145' + chr(0b1100011) + '\157' + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(9733 - 9631) + '\x2d' + chr(0b1 + 0o67)): FPJVmB0EJa6b}
lrq3000/pyFileFixity
pyFileFixity/structural_adaptive_ecc.py
stream_entry_assemble
def stream_entry_assemble(hasher, file, eccfile, entry_fields, max_block_size, header_size, resilience_rates, constantmode=False): '''From an entry with its parameters (filename, filesize), assemble a list of each block from the original file along with the relative hash and ecc for easy processing later.''' # Cut the header and the ecc entry into blocks, and then assemble them so that we can easily process block by block eccfile.seek(entry_fields["ecc_field_pos"][0]) curpos = file.tell() ecc_curpos = eccfile.tell() while (ecc_curpos < entry_fields["ecc_field_pos"][1]): # continue reading the input file until we reach the position of the previously detected ending marker # Compute the current rate, depending on where we are inside the input file (headers? later stage?) if curpos < header_size or constantmode: # header stage: constant rate rate = resilience_rates[0] else: # later stage 2 or 3: progressive rate rate = feature_scaling(curpos, header_size, entry_fields["filesize"], resilience_rates[1], resilience_rates[2]) # find the rate for the current stream of data (interpolate between stage 2 and stage 3 rates depending on the cursor position in the file) # From the rate, compute the ecc parameters ecc_params = compute_ecc_params(max_block_size, rate, hasher) # Extract the message block from input file, given the computed ecc parameters mes = file.read(ecc_params["message_size"]) if len(mes) == 0: return # quit if message is empty (reached end-of-file), this is a safeguard if ecc pos ending was miscalculated (we thus only need the starting position to be correct) buf = eccfile.read(ecc_params["hash_size"]+ecc_params["ecc_size"]) hash = buf[:ecc_params["hash_size"]] ecc = buf[ecc_params["hash_size"]:] yield {"message": mes, "hash": hash, "ecc": ecc, "rate": rate, "ecc_params": ecc_params, "curpos": curpos, "ecc_curpos": ecc_curpos} # Prepare for the next iteration of the loop curpos = file.tell() ecc_curpos = eccfile.tell() # Just a quick safe guard against ecc ending marker misdetection file.seek(0, os.SEEK_END) # alternative way of finding the total size: go to the end of the file size = file.tell() if curpos < size: print("WARNING: end of ecc track reached but not the end of file! Either the ecc ending marker was misdetected, or either the file hash changed! Some blocks maybe may not have been properly checked!")
python
def stream_entry_assemble(hasher, file, eccfile, entry_fields, max_block_size, header_size, resilience_rates, constantmode=False): '''From an entry with its parameters (filename, filesize), assemble a list of each block from the original file along with the relative hash and ecc for easy processing later.''' # Cut the header and the ecc entry into blocks, and then assemble them so that we can easily process block by block eccfile.seek(entry_fields["ecc_field_pos"][0]) curpos = file.tell() ecc_curpos = eccfile.tell() while (ecc_curpos < entry_fields["ecc_field_pos"][1]): # continue reading the input file until we reach the position of the previously detected ending marker # Compute the current rate, depending on where we are inside the input file (headers? later stage?) if curpos < header_size or constantmode: # header stage: constant rate rate = resilience_rates[0] else: # later stage 2 or 3: progressive rate rate = feature_scaling(curpos, header_size, entry_fields["filesize"], resilience_rates[1], resilience_rates[2]) # find the rate for the current stream of data (interpolate between stage 2 and stage 3 rates depending on the cursor position in the file) # From the rate, compute the ecc parameters ecc_params = compute_ecc_params(max_block_size, rate, hasher) # Extract the message block from input file, given the computed ecc parameters mes = file.read(ecc_params["message_size"]) if len(mes) == 0: return # quit if message is empty (reached end-of-file), this is a safeguard if ecc pos ending was miscalculated (we thus only need the starting position to be correct) buf = eccfile.read(ecc_params["hash_size"]+ecc_params["ecc_size"]) hash = buf[:ecc_params["hash_size"]] ecc = buf[ecc_params["hash_size"]:] yield {"message": mes, "hash": hash, "ecc": ecc, "rate": rate, "ecc_params": ecc_params, "curpos": curpos, "ecc_curpos": ecc_curpos} # Prepare for the next iteration of the loop curpos = file.tell() ecc_curpos = eccfile.tell() # Just a quick safe guard against ecc ending marker misdetection file.seek(0, os.SEEK_END) # alternative way of finding the total size: go to the end of the file size = file.tell() if curpos < size: print("WARNING: end of ecc track reached but not the end of file! Either the ecc ending marker was misdetected, or either the file hash changed! Some blocks maybe may not have been properly checked!")
[ "def", "stream_entry_assemble", "(", "hasher", ",", "file", ",", "eccfile", ",", "entry_fields", ",", "max_block_size", ",", "header_size", ",", "resilience_rates", ",", "constantmode", "=", "False", ")", ":", "# Cut the header and the ecc entry into blocks, and then assemble them so that we can easily process block by block", "eccfile", ".", "seek", "(", "entry_fields", "[", "\"ecc_field_pos\"", "]", "[", "0", "]", ")", "curpos", "=", "file", ".", "tell", "(", ")", "ecc_curpos", "=", "eccfile", ".", "tell", "(", ")", "while", "(", "ecc_curpos", "<", "entry_fields", "[", "\"ecc_field_pos\"", "]", "[", "1", "]", ")", ":", "# continue reading the input file until we reach the position of the previously detected ending marker", "# Compute the current rate, depending on where we are inside the input file (headers? later stage?)", "if", "curpos", "<", "header_size", "or", "constantmode", ":", "# header stage: constant rate", "rate", "=", "resilience_rates", "[", "0", "]", "else", ":", "# later stage 2 or 3: progressive rate", "rate", "=", "feature_scaling", "(", "curpos", ",", "header_size", ",", "entry_fields", "[", "\"filesize\"", "]", ",", "resilience_rates", "[", "1", "]", ",", "resilience_rates", "[", "2", "]", ")", "# find the rate for the current stream of data (interpolate between stage 2 and stage 3 rates depending on the cursor position in the file)", "# From the rate, compute the ecc parameters", "ecc_params", "=", "compute_ecc_params", "(", "max_block_size", ",", "rate", ",", "hasher", ")", "# Extract the message block from input file, given the computed ecc parameters", "mes", "=", "file", ".", "read", "(", "ecc_params", "[", "\"message_size\"", "]", ")", "if", "len", "(", "mes", ")", "==", "0", ":", "return", "# quit if message is empty (reached end-of-file), this is a safeguard if ecc pos ending was miscalculated (we thus only need the starting position to be correct)", "buf", "=", "eccfile", ".", "read", "(", "ecc_params", "[", "\"hash_size\"", "]", "+", "ecc_params", "[", "\"ecc_size\"", "]", ")", "hash", "=", "buf", "[", ":", "ecc_params", "[", "\"hash_size\"", "]", "]", "ecc", "=", "buf", "[", "ecc_params", "[", "\"hash_size\"", "]", ":", "]", "yield", "{", "\"message\"", ":", "mes", ",", "\"hash\"", ":", "hash", ",", "\"ecc\"", ":", "ecc", ",", "\"rate\"", ":", "rate", ",", "\"ecc_params\"", ":", "ecc_params", ",", "\"curpos\"", ":", "curpos", ",", "\"ecc_curpos\"", ":", "ecc_curpos", "}", "# Prepare for the next iteration of the loop", "curpos", "=", "file", ".", "tell", "(", ")", "ecc_curpos", "=", "eccfile", ".", "tell", "(", ")", "# Just a quick safe guard against ecc ending marker misdetection", "file", ".", "seek", "(", "0", ",", "os", ".", "SEEK_END", ")", "# alternative way of finding the total size: go to the end of the file", "size", "=", "file", ".", "tell", "(", ")", "if", "curpos", "<", "size", ":", "print", "(", "\"WARNING: end of ecc track reached but not the end of file! Either the ecc ending marker was misdetected, or either the file hash changed! Some blocks maybe may not have been properly checked!\"", ")" ]
From an entry with its parameters (filename, filesize), assemble a list of each block from the original file along with the relative hash and ecc for easy processing later.
[ "From", "an", "entry", "with", "its", "parameters", "(", "filename", "filesize", ")", "assemble", "a", "list", "of", "each", "block", "from", "the", "original", "file", "along", "with", "the", "relative", "hash", "and", "ecc", "for", "easy", "processing", "later", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/structural_adaptive_ecc.py#L137-L165
train
Assemble a list of each entry from the original file along with the relative h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RlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(111) + chr(507 - 457) + chr(50), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100111 + 0o10) + chr(0b100101 + 0o16) + '\x35' + '\064', 4683 - 4675), nzTpIcepk0o8(chr(248 - 200) + '\157' + chr(0b110011) + chr(2821 - 2766), 28518 - 28510), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(56 - 3), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b11011 + 0o26) + chr(0b110101) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(111) + chr(49) + chr(50) + '\064', 0b1000), nzTpIcepk0o8('\x30' + chr(0b100101 + 0o112) + chr(50) + '\x35' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(409 - 361) + '\157' + chr(380 - 330) + '\061' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + '\157' + chr(0b100 + 0o55) + '\x37' + chr(0b110011), 0b1000), nzTpIcepk0o8('\060' + chr(0b11111 + 0o120) + chr(1180 - 1126) + '\x37', 0b1000), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\157' + chr(139 - 90), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(8865 - 8754) + '\x32' + '\066' + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\x30' + chr(7824 - 7713) + '\x35' + chr(1858 - 1806), 41415 - 41407), nzTpIcepk0o8(chr(760 - 712) + '\x6f' + chr(0b101001 + 0o11) + chr(50) + chr(537 - 487), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b1011 + 0o50) + '\x30', 0b1000), nzTpIcepk0o8('\060' + chr(0b11111 + 0o120) + chr(0b10110 + 0o34) + chr(0b110010) + '\061', 57953 - 57945), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1101111) + chr(1797 - 1748) + '\064' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b1 + 0o61) + '\x31' + '\x35', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1010 + 0o145) + chr(0b10111 + 0o34) + chr(0b110100) + '\x33', 0o10), nzTpIcepk0o8(chr(764 - 716) + chr(0b1101111) + chr(0b110001) + chr(51) + chr(0b110100), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\063' + chr(1295 - 1243) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\x6f' + chr(51) + '\x32' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(5330 - 5219) + chr(1349 - 1298) + chr(0b1110 + 0o44) + chr(49), 19091 - 19083), nzTpIcepk0o8('\060' + chr(0b101011 + 0o104) + chr(0b110010) + chr(0b100011 + 0o24) + chr(379 - 331), 0b1000), nzTpIcepk0o8('\x30' + chr(9682 - 9571) + '\061' + '\x31' + chr(53), 15529 - 15521), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + chr(2302 - 2248), 52819 - 52811), nzTpIcepk0o8(chr(48) + chr(4596 - 4485) + chr(0b101010 + 0o15) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b0 + 0o60) + '\x6f' + '\063' + chr(0b110010) + chr(458 - 410), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + chr(1324 - 1270) + chr(0b10100 + 0o42), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1100 + 0o143) + chr(0b110110) + '\064', 0o10), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b110 + 0o151) + chr(0b110010) + '\x36' + chr(0b11110 + 0o31), 55260 - 55252), nzTpIcepk0o8(chr(2273 - 2225) + chr(0b1101 + 0o142) + chr(50) + chr(0b11101 + 0o31) + chr(2846 - 2791), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + '\062' + chr(642 - 588), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(55) + chr(0b101101 + 0o7), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(0b110100) + '\062', 0b1000), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(111) + chr(51) + '\063' + '\x30', 6075 - 6067), nzTpIcepk0o8('\060' + '\x6f' + chr(0b11101 + 0o25) + chr(0b110000) + chr(55), 33369 - 33361), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b101000 + 0o11) + '\067' + '\061', 4891 - 4883), nzTpIcepk0o8('\060' + chr(111) + '\061' + '\x32' + '\061', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\x31' + chr(50) + '\x31', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(111) + '\x35' + chr(48), 38670 - 38662)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'<'), chr(0b101 + 0o137) + '\145' + '\x63' + chr(0b1101111) + chr(7138 - 7038) + chr(0b1010010 + 0o23))('\165' + '\164' + '\x66' + '\055' + chr(0b110100 + 0o4)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def fDFgV7TU2Pa7(h8kTNaNwezOL, GtsVUCYulgYX, iIl4G3YXuY9o, L5VpeflZtpOn, aFuNB1dLSUC3, eiRfbpdID8sX, j07uY1Bt0lPq, vlHtgCDJ62XP=nzTpIcepk0o8(chr(48) + chr(1348 - 1237) + '\060', ord("\x08"))): roI3spqORKae(iIl4G3YXuY9o, roI3spqORKae(ES5oEprVxulp(b'a\x89zv'), chr(100) + chr(8148 - 8047) + chr(0b111010 + 0o51) + '\157' + '\144' + chr(0b1100101))(chr(0b1100110 + 0o17) + chr(0b1110100) + chr(102) + '\x2d' + chr(0b111000)))(L5VpeflZtpOn[roI3spqORKae(ES5oEprVxulp(b'w\x8f|B\t=\xcd\xe3\x1fhq\xdc_'), chr(4866 - 4766) + '\x65' + chr(0b1100011) + chr(0b1010111 + 0o30) + '\144' + chr(0b1100101))('\165' + chr(339 - 223) + chr(0b1 + 0o145) + '\x2d' + '\070')][nzTpIcepk0o8(chr(0b110000) + chr(111) + '\060', 8)]) VPOrXoxQL_e5 = GtsVUCYulgYX.tell() RisFPvKPaAqp = iIl4G3YXuY9o.tell() while RisFPvKPaAqp < L5VpeflZtpOn[roI3spqORKae(ES5oEprVxulp(b'w\x8f|B\t=\xcd\xe3\x1fhq\xdc_'), chr(0b1100100) + chr(101) + chr(99) + chr(111) + chr(100) + chr(0b111101 + 0o50))('\165' + '\164' + '\x66' + '\055' + chr(0b111000))][nzTpIcepk0o8('\060' + chr(0b10000 + 0o137) + '\061', 8)]: if VPOrXoxQL_e5 < eiRfbpdID8sX or vlHtgCDJ62XP: TUhPdsFPKBWT = j07uY1Bt0lPq[nzTpIcepk0o8('\x30' + chr(111) + chr(1212 - 1164), 8)] else: TUhPdsFPKBWT = Tnth0qHjTfzw(VPOrXoxQL_e5, eiRfbpdID8sX, L5VpeflZtpOn[roI3spqORKae(ES5oEprVxulp(b't\x85sx\x1c=\xd2\xea'), chr(100) + '\x65' + chr(99) + chr(111) + '\x64' + chr(0b1100101))(chr(10849 - 10732) + chr(0b11100 + 0o130) + '\146' + chr(0b1010 + 0o43) + chr(56))], j07uY1Bt0lPq[nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31', 8)], j07uY1Bt0lPq[nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010), 0b1000)]) MkSrP5tpUKF1 = AriG7oSWPBu5(aFuNB1dLSUC3, TUhPdsFPKBWT, h8kTNaNwezOL) mq1Fd56_rjoR = GtsVUCYulgYX.eoXknH7XUn7m(MkSrP5tpUKF1[roI3spqORKae(ES5oEprVxulp(b'\x7f\x89ln\x0e3\xcd\xd0\x08^{\xd6'), '\x64' + chr(8675 - 8574) + '\x63' + '\x6f' + chr(0b1100100) + chr(0b111111 + 0o46))(chr(0b1101111 + 0o6) + '\164' + chr(7734 - 7632) + chr(0b101101) + '\x38')]) if ftfygxgFas5X(mq1Fd56_rjoR) == nzTpIcepk0o8('\060' + '\157' + chr(0b110000), 8): return nIuXIilShoNQ = iIl4G3YXuY9o.eoXknH7XUn7m(MkSrP5tpUKF1[roI3spqORKae(ES5oEprVxulp(b"z\x8dlu0'\xc1\xf5\x1e"), '\x64' + chr(0b1100101) + chr(9058 - 8959) + '\157' + chr(0b1010101 + 0o17) + chr(0b1100101))(chr(6391 - 6274) + chr(116) + chr(4182 - 4080) + chr(0b101101) + '\070')] + MkSrP5tpUKF1[roI3spqORKae(ES5oEprVxulp(b'w\x8f|B\x1c=\xd2\xea'), chr(0b1000 + 0o134) + '\145' + chr(99) + chr(111) + chr(6415 - 6315) + chr(101))('\x75' + chr(116) + chr(0b1100110) + '\x2d' + '\x38')]) dMJNtLk2mncQ = nIuXIilShoNQ[:MkSrP5tpUKF1[roI3spqORKae(ES5oEprVxulp(b"z\x8dlu0'\xc1\xf5\x1e"), '\144' + chr(0b101101 + 0o70) + chr(0b1100011) + chr(0b1101000 + 0o7) + chr(100) + chr(0b1100 + 0o131))(chr(117) + chr(0b1101111 + 0o5) + '\x66' + chr(0b101 + 0o50) + chr(0b11101 + 0o33))]] cRb7OGyXJeT1 = nIuXIilShoNQ[MkSrP5tpUKF1[roI3spqORKae(ES5oEprVxulp(b"z\x8dlu0'\xc1\xf5\x1e"), chr(7688 - 7588) + '\x65' + chr(6210 - 6111) + chr(8695 - 8584) + chr(0b1100100) + '\x65')(chr(117) + chr(0b110100 + 0o100) + chr(697 - 595) + chr(0b101101) + '\x38')]:] yield {roI3spqORKae(ES5oEprVxulp(b'\x7f\x89ln\x0e3\xcd'), '\x64' + '\x65' + chr(108 - 9) + chr(6849 - 6738) + chr(100) + '\x65')('\165' + chr(0b101001 + 0o113) + chr(102) + '\055' + chr(0b111000)): mq1Fd56_rjoR, roI3spqORKae(ES5oEprVxulp(b'z\x8dlu'), chr(0b1100100) + '\145' + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(0b1100010 + 0o3))(chr(0b1110101) + '\x74' + chr(0b1100 + 0o132) + chr(45) + chr(56)): dMJNtLk2mncQ, roI3spqORKae(ES5oEprVxulp(b'w\x8f|'), chr(0b1100100) + chr(101) + '\143' + chr(0b1100010 + 0o15) + '\x64' + chr(0b1100101))(chr(0b100011 + 0o122) + '\x74' + chr(0b1100110) + chr(0b100 + 0o51) + '\x38'): cRb7OGyXJeT1, roI3spqORKae(ES5oEprVxulp(b'`\x8dkx'), '\x64' + chr(101) + '\143' + chr(111) + '\144' + chr(0b1011001 + 0o14))('\x75' + '\164' + '\146' + '\x2d' + chr(0b111000)): TUhPdsFPKBWT, roI3spqORKae(ES5oEprVxulp(b'w\x8f|B\x1f5\xda\xee\x16D'), chr(9636 - 9536) + chr(3870 - 3769) + '\x63' + chr(111) + chr(100) + '\145')('\x75' + '\x74' + chr(0b1100 + 0o132) + chr(45) + '\x38'): MkSrP5tpUKF1, roI3spqORKae(ES5oEprVxulp(b"q\x99mm\x00'"), chr(100) + chr(8421 - 8320) + chr(99) + '\157' + chr(100) + chr(779 - 678))(chr(117) + chr(0b1110100) + '\146' + chr(45) + chr(56)): VPOrXoxQL_e5, roI3spqORKae(ES5oEprVxulp(b'w\x8f|B\x0c!\xda\xff\x14D'), chr(100) + chr(0b1100101) + chr(4501 - 4402) + chr(0b1101111) + '\x64' + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(646 - 544) + '\x2d' + chr(1413 - 1357)): RisFPvKPaAqp} VPOrXoxQL_e5 = GtsVUCYulgYX.tell() RisFPvKPaAqp = iIl4G3YXuY9o.tell() roI3spqORKae(GtsVUCYulgYX, roI3spqORKae(ES5oEprVxulp(b'a\x89zv'), '\144' + chr(520 - 419) + '\x63' + chr(9759 - 9648) + chr(0b1100100) + chr(0b1100101))('\x75' + '\x74' + chr(102) + '\055' + chr(202 - 146)))(nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11011 + 0o25), 8), roI3spqORKae(aHUqKstZLeS6, roI3spqORKae(ES5oEprVxulp(b'A\xa9ZV0\x11\xe6\xcb'), chr(100) + '\x65' + chr(0b1100011) + '\x6f' + chr(100) + '\x65')(chr(117) + '\x74' + chr(1851 - 1749) + '\055' + chr(0b100001 + 0o27)))) e1HrJaQHACnl = GtsVUCYulgYX.tell() if VPOrXoxQL_e5 < e1HrJaQHACnl: v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'E\xadMS&\x1a\xef\xb5[Ro\xd7\x0c\xfd~\xb1\x04\xee\x80|\x91\xa7\xb0\xdb&>J\xb5\xd7W\xdf\xd2\xb2\x1c\x00\xad\xf3Y?>f\xccku\nt\xcd\xe1\x1f\x17n\xd5\x0c\xf4q\xfd\x04\xac\xc3\x19\x8c\xa1\xb9\xdd?>L\xb8\xd3\x14\xd2\xd4\xb5\x1c\x07\xb6\xe3\x10?62\x81~o\x041\xda\xaf\x0cVr\x93A\xfbk\xf5\x04\xf9\x86?\x91\xb0\xb5\x94mqJ\xf0\xd3]\xc3\xdf\xb3NB\xac\xef\x1cq7{\x80z=\x075\xdb\xe7[Ti\xd2B\xf5}\xf5@\xad\xb03\x88\xb0\xf1\xda!q[\xbb\xc5\x14\xda\xd6\xaf^\x07\xf8\xea\x18(q|\x83k=\x075\xde\xea[Ud\xd6B\xb2h\xe3\x0e\xfd\x86.\x89\xac\xf1\xdb%{[\xbb\xd3P\x96'), chr(100) + '\145' + chr(0b1001011 + 0o30) + '\157' + '\x64' + '\145')('\x75' + chr(116) + '\146' + chr(45) + chr(295 - 239)))
lrq3000/pyFileFixity
pyFileFixity/structural_adaptive_ecc.py
stream_compute_ecc_hash
def stream_compute_ecc_hash(ecc_manager, hasher, file, max_block_size, header_size, resilience_rates): '''Generate a stream of hash/ecc blocks, of variable encoding rate and size, given a file.''' curpos = file.tell() # init the reading cursor at the beginning of the file # Find the total size to know when to stop #size = os.fstat(file.fileno()).st_size # old way of doing it, doesn't work with StringIO objects file.seek(0, os.SEEK_END) # alternative way of finding the total size: go to the end of the file size = file.tell() file.seek(0, curpos) # place the reading cursor back at the beginning of the file # Main encoding loop while curpos < size: # Continue encoding while we do not reach the end of the file # Calculating the encoding rate if curpos < header_size: # if we are still reading the file's header, we use a constant rate rate = resilience_rates[0] else: # else we use a progressive rate for the rest of the file the we calculate on-the-fly depending on our current reading cursor position in the file rate = feature_scaling(curpos, header_size, size, resilience_rates[1], resilience_rates[2]) # find the rate for the current stream of data (interpolate between stage 2 and stage 3 rates depending on the cursor position in the file) # Compute the ecc parameters given the calculated rate ecc_params = compute_ecc_params(max_block_size, rate, hasher) #ecc_manager = ECCMan(max_block_size, ecc_params["message_size"]) # not necessary to create an ecc manager anymore, as it is very costly. Now we can specify a value for k on the fly (tables for all possible values of k are pre-generated in the reed-solomon libraries) # Compute the ecc and hash for the current message block mes = file.read(ecc_params["message_size"]) hash = hasher.hash(mes) ecc = ecc_manager.encode(mes, k=ecc_params["message_size"]) #print("mes %i (%i) - ecc %i (%i) - hash %i (%i)" % (len(mes), message_size, len(ecc), ecc_params["ecc_size"], len(hash), ecc_params["hash_size"])) # DEBUGLINE # Return the result yield [hash, ecc, ecc_params] # Prepare for next iteration curpos = file.tell()
python
def stream_compute_ecc_hash(ecc_manager, hasher, file, max_block_size, header_size, resilience_rates): '''Generate a stream of hash/ecc blocks, of variable encoding rate and size, given a file.''' curpos = file.tell() # init the reading cursor at the beginning of the file # Find the total size to know when to stop #size = os.fstat(file.fileno()).st_size # old way of doing it, doesn't work with StringIO objects file.seek(0, os.SEEK_END) # alternative way of finding the total size: go to the end of the file size = file.tell() file.seek(0, curpos) # place the reading cursor back at the beginning of the file # Main encoding loop while curpos < size: # Continue encoding while we do not reach the end of the file # Calculating the encoding rate if curpos < header_size: # if we are still reading the file's header, we use a constant rate rate = resilience_rates[0] else: # else we use a progressive rate for the rest of the file the we calculate on-the-fly depending on our current reading cursor position in the file rate = feature_scaling(curpos, header_size, size, resilience_rates[1], resilience_rates[2]) # find the rate for the current stream of data (interpolate between stage 2 and stage 3 rates depending on the cursor position in the file) # Compute the ecc parameters given the calculated rate ecc_params = compute_ecc_params(max_block_size, rate, hasher) #ecc_manager = ECCMan(max_block_size, ecc_params["message_size"]) # not necessary to create an ecc manager anymore, as it is very costly. Now we can specify a value for k on the fly (tables for all possible values of k are pre-generated in the reed-solomon libraries) # Compute the ecc and hash for the current message block mes = file.read(ecc_params["message_size"]) hash = hasher.hash(mes) ecc = ecc_manager.encode(mes, k=ecc_params["message_size"]) #print("mes %i (%i) - ecc %i (%i) - hash %i (%i)" % (len(mes), message_size, len(ecc), ecc_params["ecc_size"], len(hash), ecc_params["hash_size"])) # DEBUGLINE # Return the result yield [hash, ecc, ecc_params] # Prepare for next iteration curpos = file.tell()
[ "def", "stream_compute_ecc_hash", "(", "ecc_manager", ",", "hasher", ",", "file", ",", "max_block_size", ",", "header_size", ",", "resilience_rates", ")", ":", "curpos", "=", "file", ".", "tell", "(", ")", "# init the reading cursor at the beginning of the file", "# Find the total size to know when to stop", "#size = os.fstat(file.fileno()).st_size # old way of doing it, doesn't work with StringIO objects", "file", ".", "seek", "(", "0", ",", "os", ".", "SEEK_END", ")", "# alternative way of finding the total size: go to the end of the file", "size", "=", "file", ".", "tell", "(", ")", "file", ".", "seek", "(", "0", ",", "curpos", ")", "# place the reading cursor back at the beginning of the file", "# Main encoding loop", "while", "curpos", "<", "size", ":", "# Continue encoding while we do not reach the end of the file", "# Calculating the encoding rate", "if", "curpos", "<", "header_size", ":", "# if we are still reading the file's header, we use a constant rate", "rate", "=", "resilience_rates", "[", "0", "]", "else", ":", "# else we use a progressive rate for the rest of the file the we calculate on-the-fly depending on our current reading cursor position in the file", "rate", "=", "feature_scaling", "(", "curpos", ",", "header_size", ",", "size", ",", "resilience_rates", "[", "1", "]", ",", "resilience_rates", "[", "2", "]", ")", "# find the rate for the current stream of data (interpolate between stage 2 and stage 3 rates depending on the cursor position in the file)", "# Compute the ecc parameters given the calculated rate", "ecc_params", "=", "compute_ecc_params", "(", "max_block_size", ",", "rate", ",", "hasher", ")", "#ecc_manager = ECCMan(max_block_size, ecc_params[\"message_size\"]) # not necessary to create an ecc manager anymore, as it is very costly. Now we can specify a value for k on the fly (tables for all possible values of k are pre-generated in the reed-solomon libraries)", "# Compute the ecc and hash for the current message block", "mes", "=", "file", ".", "read", "(", "ecc_params", "[", "\"message_size\"", "]", ")", "hash", "=", "hasher", ".", "hash", "(", "mes", ")", "ecc", "=", "ecc_manager", ".", "encode", "(", "mes", ",", "k", "=", "ecc_params", "[", "\"message_size\"", "]", ")", "#print(\"mes %i (%i) - ecc %i (%i) - hash %i (%i)\" % (len(mes), message_size, len(ecc), ecc_params[\"ecc_size\"], len(hash), ecc_params[\"hash_size\"])) # DEBUGLINE", "# Return the result", "yield", "[", "hash", ",", "ecc", ",", "ecc_params", "]", "# Prepare for next iteration", "curpos", "=", "file", ".", "tell", "(", ")" ]
Generate a stream of hash/ecc blocks, of variable encoding rate and size, given a file.
[ "Generate", "a", "stream", "of", "hash", "/", "ecc", "blocks", "of", "variable", "encoding", "rate", "and", "size", "given", "a", "file", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/structural_adaptive_ecc.py#L167-L196
train
Generate a stream of hash and ecc blocks of variable encoding rate and size given a file.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcq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FUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(111) + '\062' + '\x32' + chr(0b11 + 0o57), 16279 - 16271), nzTpIcepk0o8(chr(0b110000) + chr(0b1001110 + 0o41) + '\061' + '\x30' + chr(49), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + chr(50) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b100 + 0o55) + chr(2041 - 1988) + '\x33', 0b1000), nzTpIcepk0o8(chr(407 - 359) + chr(851 - 740) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1100101 + 0o12) + chr(0b1011 + 0o50) + chr(0b110010) + chr(0b110000), 6603 - 6595), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + '\x31' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(867 - 819) + chr(111) + chr(62 - 8), 18321 - 18313), nzTpIcepk0o8(chr(48) + chr(0b10110 + 0o131) + '\x31' + chr(2201 - 2153) + chr(0b100100 + 0o20), 50184 - 50176), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101100 + 0o3) + chr(924 - 873) + chr(0b100011 + 0o16) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(2184 - 2135) + chr(49) + chr(0b1111 + 0o43), 53251 - 53243), nzTpIcepk0o8(chr(0b110000) + chr(0b110001 + 0o76) + '\x37' + chr(0b10100 + 0o34), 0o10), nzTpIcepk0o8('\x30' + chr(0b1010000 + 0o37) + '\x32' + '\064' + chr(0b1010 + 0o55), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\061' + chr(51) + '\064', 62244 - 62236), nzTpIcepk0o8(chr(256 - 208) + chr(0b1101 + 0o142) + '\x31' + chr(0b110011) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(48) + chr(9231 - 9120) + chr(52) + '\066', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\063' + chr(980 - 929) + chr(0b0 + 0o66), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b100 + 0o57) + chr(1455 - 1404) + chr(107 - 52), ord("\x08")), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(5985 - 5874) + chr(1296 - 1247) + chr(0b110011) + chr(0b10000 + 0o41), 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(1935 - 1887), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1011010 + 0o25) + chr(0b101111 + 0o5) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + chr(2028 - 1980) + '\066', 18287 - 18279), nzTpIcepk0o8(chr(48) + chr(0b1001111 + 0o40) + '\x31' + chr(300 - 247), 56575 - 56567), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\x6f' + '\061' + '\065' + chr(53), 43704 - 43696), nzTpIcepk0o8('\x30' + chr(2293 - 2182) + '\x32' + chr(0b10001 + 0o37), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(9132 - 9021) + chr(0b110011) + chr(0b110001) + chr(50), 8), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1101111) + chr(126 - 75) + '\x35' + chr(48), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(0b110111) + chr(0b110001 + 0o5), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x36' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(54) + '\x33', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2371 - 2321) + chr(53) + '\065', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + chr(0b1000 + 0o52) + '\x32', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1101011 + 0o4) + chr(0b10110 + 0o41) + '\063', 0o10), nzTpIcepk0o8('\x30' + chr(0b1011000 + 0o27) + chr(51) + chr(1955 - 1902) + chr(53), 11442 - 11434), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + chr(50) + '\064', 36280 - 36272), nzTpIcepk0o8('\x30' + chr(111) + chr(911 - 860) + '\x35' + '\x34', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101 + 0o142) + '\061' + chr(0b100111 + 0o15) + chr(0b110000), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101110 + 0o1) + chr(0b110000 + 0o3) + '\x36' + chr(51), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b101101 + 0o10) + chr(48), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xbc'), chr(0b1100100) + chr(101) + chr(5392 - 5293) + '\x6f' + '\144' + chr(0b111010 + 0o53))(chr(8919 - 8802) + '\164' + chr(0b1100110) + chr(0b101011 + 0o2) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def XZzmhKc1uKOe(T4uueMjpG87b, h8kTNaNwezOL, GtsVUCYulgYX, aFuNB1dLSUC3, eiRfbpdID8sX, j07uY1Bt0lPq): VPOrXoxQL_e5 = GtsVUCYulgYX.tell() roI3spqORKae(GtsVUCYulgYX, roI3spqORKae(ES5oEprVxulp(b'\xe1$\xb0\x00'), chr(7818 - 7718) + chr(0b11100 + 0o111) + chr(99) + chr(8488 - 8377) + chr(100) + chr(0b1100101))(chr(0b1110101) + '\x74' + '\146' + chr(1339 - 1294) + chr(0b111000)))(nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b101 + 0o53), 8), roI3spqORKae(aHUqKstZLeS6, roI3spqORKae(ES5oEprVxulp(b'\xc1\x04\x90 [\x95\x07B'), '\x64' + chr(0b1100010 + 0o3) + '\x63' + chr(0b101111 + 0o100) + '\x64' + '\x65')('\x75' + '\x74' + chr(0b1001001 + 0o35) + '\x2d' + chr(56)))) e1HrJaQHACnl = GtsVUCYulgYX.tell() roI3spqORKae(GtsVUCYulgYX, roI3spqORKae(ES5oEprVxulp(b'\xe1$\xb0\x00'), chr(0b1100000 + 0o4) + chr(0b1100101) + chr(99) + chr(0b1101010 + 0o5) + '\144' + '\145')('\x75' + chr(0b110 + 0o156) + chr(0b1100110) + chr(45) + '\070'))(nzTpIcepk0o8(chr(48) + chr(10734 - 10623) + chr(1928 - 1880), 8), VPOrXoxQL_e5) while VPOrXoxQL_e5 < e1HrJaQHACnl: if VPOrXoxQL_e5 < eiRfbpdID8sX: TUhPdsFPKBWT = j07uY1Bt0lPq[nzTpIcepk0o8('\x30' + chr(111) + chr(0b110000), 8)] else: TUhPdsFPKBWT = Tnth0qHjTfzw(VPOrXoxQL_e5, eiRfbpdID8sX, e1HrJaQHACnl, j07uY1Bt0lPq[nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001), 0o10)], j07uY1Bt0lPq[nzTpIcepk0o8(chr(0b111 + 0o51) + '\x6f' + chr(0b110010), 18592 - 18584)]) MkSrP5tpUKF1 = AriG7oSWPBu5(aFuNB1dLSUC3, TUhPdsFPKBWT, h8kTNaNwezOL) mq1Fd56_rjoR = GtsVUCYulgYX.eoXknH7XUn7m(MkSrP5tpUKF1[roI3spqORKae(ES5oEprVxulp(b'\xff$\xa6\x18e\xb7,Y7w\xb0/'), chr(100) + chr(0b1100101) + chr(99) + '\x6f' + chr(0b1011011 + 0o11) + chr(101))(chr(117) + '\164' + chr(102) + '\x2d' + chr(0b111000))]) dMJNtLk2mncQ = h8kTNaNwezOL.dMJNtLk2mncQ(mq1Fd56_rjoR) cRb7OGyXJeT1 = T4uueMjpG87b.YqIaRFfeo4Ha(mq1Fd56_rjoR, k=MkSrP5tpUKF1[roI3spqORKae(ES5oEprVxulp(b'\xff$\xa6\x18e\xb7,Y7w\xb0/'), '\x64' + chr(101) + chr(9569 - 9470) + chr(0b1101111) + chr(100) + '\x65')(chr(0b1000111 + 0o56) + chr(0b1110 + 0o146) + '\146' + chr(0b101101) + chr(0b110100 + 0o4))]) yield [dMJNtLk2mncQ, cRb7OGyXJeT1, MkSrP5tpUKF1] VPOrXoxQL_e5 = GtsVUCYulgYX.tell()
lrq3000/pyFileFixity
pyFileFixity/structural_adaptive_ecc.py
compute_ecc_hash_from_string
def compute_ecc_hash_from_string(string, ecc_manager, hasher, max_block_size, resilience_rate): '''Generate a concatenated string of ecc stream of hash/ecc blocks, of constant encoding rate, given a string. NOTE: resilience_rate here is constant, you need to supply only one rate, between 0.0 and 1.0. The encoding rate will then be constant, like in header_ecc.py.''' fpfile = StringIO(string) ecc_stream = ''.join( [str(x[1]) for x in stream_compute_ecc_hash(ecc_manager, hasher, fpfile, max_block_size, len(string), [resilience_rate])] ) # "hack" the function by tricking it to always use a constant rate, by setting the header_size=len(relfilepath), and supplying the resilience_rate_intra instead of resilience_rate_s1 (the one for header) return ecc_stream
python
def compute_ecc_hash_from_string(string, ecc_manager, hasher, max_block_size, resilience_rate): '''Generate a concatenated string of ecc stream of hash/ecc blocks, of constant encoding rate, given a string. NOTE: resilience_rate here is constant, you need to supply only one rate, between 0.0 and 1.0. The encoding rate will then be constant, like in header_ecc.py.''' fpfile = StringIO(string) ecc_stream = ''.join( [str(x[1]) for x in stream_compute_ecc_hash(ecc_manager, hasher, fpfile, max_block_size, len(string), [resilience_rate])] ) # "hack" the function by tricking it to always use a constant rate, by setting the header_size=len(relfilepath), and supplying the resilience_rate_intra instead of resilience_rate_s1 (the one for header) return ecc_stream
[ "def", "compute_ecc_hash_from_string", "(", "string", ",", "ecc_manager", ",", "hasher", ",", "max_block_size", ",", "resilience_rate", ")", ":", "fpfile", "=", "StringIO", "(", "string", ")", "ecc_stream", "=", "''", ".", "join", "(", "[", "str", "(", "x", "[", "1", "]", ")", "for", "x", "in", "stream_compute_ecc_hash", "(", "ecc_manager", ",", "hasher", ",", "fpfile", ",", "max_block_size", ",", "len", "(", "string", ")", ",", "[", "resilience_rate", "]", ")", "]", ")", "# \"hack\" the function by tricking it to always use a constant rate, by setting the header_size=len(relfilepath), and supplying the resilience_rate_intra instead of resilience_rate_s1 (the one for header)", "return", "ecc_stream" ]
Generate a concatenated string of ecc stream of hash/ecc blocks, of constant encoding rate, given a string. NOTE: resilience_rate here is constant, you need to supply only one rate, between 0.0 and 1.0. The encoding rate will then be constant, like in header_ecc.py.
[ "Generate", "a", "concatenated", "string", "of", "ecc", "stream", "of", "hash", "/", "ecc", "blocks", "of", "constant", "encoding", "rate", "given", "a", "string", ".", "NOTE", ":", "resilience_rate", "here", "is", "constant", "you", "need", "to", "supply", "only", "one", "rate", "between", "0", ".", "0", "and", "1", ".", "0", ".", "The", "encoding", "rate", "will", "then", "be", "constant", "like", "in", "header_ecc", ".", "py", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/structural_adaptive_ecc.py#L198-L203
train
Generate a concatenated string of ecc stream of hash blocks of constant encoding rate given a string.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW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A_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(111) + chr(0b100 + 0o57) + '\x33' + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(1171 - 1122) + chr(0b110001) + chr(0b110101), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b1 + 0o65) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(0b110111) + chr(0b110000), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101001 + 0o11) + chr(2540 - 2488) + chr(2501 - 2448), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(2031 - 1982) + chr(48) + chr(1947 - 1898), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b0 + 0o157) + chr(0b110001) + '\x32' + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(940 - 892) + chr(0b1101111) + chr(266 - 215) + '\065' + chr(1513 - 1465), 0b1000), nzTpIcepk0o8(chr(901 - 853) + chr(0b1101111) + '\061' + chr(0b110100) + chr(0b110011), 7811 - 7803), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(111) + chr(49) + '\x36' + chr(0b110101), 27093 - 27085), nzTpIcepk0o8('\060' + chr(2516 - 2405) + '\061' + chr(55) + '\065', 56139 - 56131), nzTpIcepk0o8('\x30' + chr(4938 - 4827) + '\x33' + chr(49) + chr(48), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110000 + 0o3), 64459 - 64451), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + '\066' + chr(0b10101 + 0o37), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x30', 0b1000), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(892 - 781) + chr(2298 - 2247) + chr(0b110011 + 0o1) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1111 + 0o43) + chr(0b101100 + 0o7), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x36' + chr(258 - 204), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(0b110011) + '\064', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + '\060' + '\x35', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + chr(0b110000) + '\x36', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + '\x32' + chr(48), 0o10), nzTpIcepk0o8('\060' + chr(0b111010 + 0o65) + chr(972 - 920) + chr(1883 - 1835), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(2313 - 2263) + '\x37' + chr(0b110 + 0o52), 43360 - 43352), nzTpIcepk0o8('\060' + chr(5095 - 4984) + chr(0b110010) + chr(0b100011 + 0o15) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b10100 + 0o133) + chr(51) + chr(1691 - 1640) + '\x35', 53960 - 53952), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + '\063' + chr(0b101001 + 0o7), 0o10), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1100100 + 0o13) + '\x32' + chr(540 - 488) + '\065', 8), nzTpIcepk0o8(chr(0b11001 + 0o27) + '\x6f' + '\061' + chr(1260 - 1212) + chr(2005 - 1957), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100000 + 0o117) + chr(1405 - 1355) + '\061' + '\064', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + chr(0b110010) + chr(0b110010 + 0o4), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b11 + 0o56) + '\063' + chr(874 - 819), ord("\x08")), nzTpIcepk0o8(chr(2298 - 2250) + chr(0b1101111) + '\061' + '\x32' + chr(0b110000), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b111100 + 0o63) + chr(1644 - 1593), 8), nzTpIcepk0o8(chr(0b110000) + chr(976 - 865) + chr(49) + chr(0b11001 + 0o27) + '\x36', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + '\x36' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b0 + 0o62) + chr(0b101101 + 0o4) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\157' + '\x31' + '\065' + chr(1507 - 1454), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(176 - 127) + chr(0b100110 + 0o12) + chr(49), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(416 - 368) + chr(0b1100101 + 0o12) + chr(0b110101) + chr(0b1000 + 0o50), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf6'), '\x64' + chr(101) + chr(9439 - 9340) + '\157' + '\144' + chr(8659 - 8558))(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(0b101101) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def UCOYpRpLuXxZ(aji3jF4_nqWL, T4uueMjpG87b, h8kTNaNwezOL, aFuNB1dLSUC3, mBuRdPg66Os0): ptsFGOnZrlBW = jPb_jAbkIToX(aji3jF4_nqWL) qxlKqx7Inm22 = roI3spqORKae(ES5oEprVxulp(b''), chr(0b1100100) + '\145' + chr(1138 - 1039) + chr(5865 - 5754) + chr(0b1100100) + chr(8115 - 8014))('\165' + chr(0b1110100) + '\146' + '\x2d' + '\x38').Y4yM9BcfTCNq([N9zlRy29S1SS(bI5jsQ9OkQtj[nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11001 + 0o30), 0o10)]) for bI5jsQ9OkQtj in XZzmhKc1uKOe(T4uueMjpG87b, h8kTNaNwezOL, ptsFGOnZrlBW, aFuNB1dLSUC3, ftfygxgFas5X(aji3jF4_nqWL), [mBuRdPg66Os0])]) return qxlKqx7Inm22
lrq3000/pyFileFixity
pyFileFixity/structural_adaptive_ecc.py
ecc_correct_intra_stream
def ecc_correct_intra_stream(ecc_manager_intra, ecc_params_intra, hasher_intra, resilience_rate_intra, field, ecc, enable_erasures=False, erasures_char="\x00", only_erasures=False, max_block_size=65535): """ Correct an intra-field with its corresponding intra-ecc if necessary """ # convert strings to StringIO object so that we can trick our ecc reading functions that normally works only on files fpfile = StringIO(field) fpfile_ecc = StringIO(ecc) fpentry_p = {"ecc_field_pos": [0, len(field)]} # create a fake entry_pos so that the ecc reading function works correctly # Prepare variables field_correct = [] # will store each block of the corrected (or already correct) filepath fcorrupted = False # check if field was corrupted fcorrected = True # check if field was corrected (if it was corrupted) errmsg = '' # Decode each block of the filepath for e in stream_entry_assemble(hasher_intra, fpfile, fpfile_ecc, fpentry_p, max_block_size, len(field), [resilience_rate_intra], constantmode=True): # Check if this block of the filepath is OK, if yes then we just copy it over if ecc_manager_intra.check(e["message"], e["ecc"]): field_correct.append(e["message"]) else: # Else this block is corrupted, we will try to fix it using the ecc fcorrupted = True # Repair the message block and the ecc try: repaired_block, repaired_ecc = ecc_manager_intra.decode(e["message"], e["ecc"], enable_erasures=enable_erasures, erasures_char=erasures_char, only_erasures=only_erasures) except (ReedSolomonError, RSCodecError), exc: # the reedsolo lib may raise an exception when it can't decode. We ensure that we can still continue to decode the rest of the file, and the other files. repaired_block = None repaired_ecc = None errmsg += "- Error: metadata field at offset %i: %s\n" % (entry_pos[0], exc) # Check if the block was successfully repaired: if yes then we copy the repaired block... if repaired_block is not None and ecc_manager_intra.check(repaired_block, repaired_ecc): field_correct.append(repaired_block) else: # ... else it failed, then we copy the original corrupted block and report an error later field_correct.append(e["message"]) fcorrected = False # Join all the blocks into one string to build the final filepath if isinstance(field_correct[0], bytearray): field_correct = [str(x) for x in field_correct] # workaround when using --ecc_algo 3 or 4, because we get a list of bytearrays instead of str field = ''.join(field_correct) # Report errors return (field, fcorrupted, fcorrected, errmsg)
python
def ecc_correct_intra_stream(ecc_manager_intra, ecc_params_intra, hasher_intra, resilience_rate_intra, field, ecc, enable_erasures=False, erasures_char="\x00", only_erasures=False, max_block_size=65535): """ Correct an intra-field with its corresponding intra-ecc if necessary """ # convert strings to StringIO object so that we can trick our ecc reading functions that normally works only on files fpfile = StringIO(field) fpfile_ecc = StringIO(ecc) fpentry_p = {"ecc_field_pos": [0, len(field)]} # create a fake entry_pos so that the ecc reading function works correctly # Prepare variables field_correct = [] # will store each block of the corrected (or already correct) filepath fcorrupted = False # check if field was corrupted fcorrected = True # check if field was corrected (if it was corrupted) errmsg = '' # Decode each block of the filepath for e in stream_entry_assemble(hasher_intra, fpfile, fpfile_ecc, fpentry_p, max_block_size, len(field), [resilience_rate_intra], constantmode=True): # Check if this block of the filepath is OK, if yes then we just copy it over if ecc_manager_intra.check(e["message"], e["ecc"]): field_correct.append(e["message"]) else: # Else this block is corrupted, we will try to fix it using the ecc fcorrupted = True # Repair the message block and the ecc try: repaired_block, repaired_ecc = ecc_manager_intra.decode(e["message"], e["ecc"], enable_erasures=enable_erasures, erasures_char=erasures_char, only_erasures=only_erasures) except (ReedSolomonError, RSCodecError), exc: # the reedsolo lib may raise an exception when it can't decode. We ensure that we can still continue to decode the rest of the file, and the other files. repaired_block = None repaired_ecc = None errmsg += "- Error: metadata field at offset %i: %s\n" % (entry_pos[0], exc) # Check if the block was successfully repaired: if yes then we copy the repaired block... if repaired_block is not None and ecc_manager_intra.check(repaired_block, repaired_ecc): field_correct.append(repaired_block) else: # ... else it failed, then we copy the original corrupted block and report an error later field_correct.append(e["message"]) fcorrected = False # Join all the blocks into one string to build the final filepath if isinstance(field_correct[0], bytearray): field_correct = [str(x) for x in field_correct] # workaround when using --ecc_algo 3 or 4, because we get a list of bytearrays instead of str field = ''.join(field_correct) # Report errors return (field, fcorrupted, fcorrected, errmsg)
[ "def", "ecc_correct_intra_stream", "(", "ecc_manager_intra", ",", "ecc_params_intra", ",", "hasher_intra", ",", "resilience_rate_intra", ",", "field", ",", "ecc", ",", "enable_erasures", "=", "False", ",", "erasures_char", "=", "\"\\x00\"", ",", "only_erasures", "=", "False", ",", "max_block_size", "=", "65535", ")", ":", "# convert strings to StringIO object so that we can trick our ecc reading functions that normally works only on files", "fpfile", "=", "StringIO", "(", "field", ")", "fpfile_ecc", "=", "StringIO", "(", "ecc", ")", "fpentry_p", "=", "{", "\"ecc_field_pos\"", ":", "[", "0", ",", "len", "(", "field", ")", "]", "}", "# create a fake entry_pos so that the ecc reading function works correctly", "# Prepare variables", "field_correct", "=", "[", "]", "# will store each block of the corrected (or already correct) filepath", "fcorrupted", "=", "False", "# check if field was corrupted", "fcorrected", "=", "True", "# check if field was corrected (if it was corrupted)", "errmsg", "=", "''", "# Decode each block of the filepath", "for", "e", "in", "stream_entry_assemble", "(", "hasher_intra", ",", "fpfile", ",", "fpfile_ecc", ",", "fpentry_p", ",", "max_block_size", ",", "len", "(", "field", ")", ",", "[", "resilience_rate_intra", "]", ",", "constantmode", "=", "True", ")", ":", "# Check if this block of the filepath is OK, if yes then we just copy it over", "if", "ecc_manager_intra", ".", "check", "(", "e", "[", "\"message\"", "]", ",", "e", "[", "\"ecc\"", "]", ")", ":", "field_correct", ".", "append", "(", "e", "[", "\"message\"", "]", ")", "else", ":", "# Else this block is corrupted, we will try to fix it using the ecc", "fcorrupted", "=", "True", "# Repair the message block and the ecc", "try", ":", "repaired_block", ",", "repaired_ecc", "=", "ecc_manager_intra", ".", "decode", "(", "e", "[", "\"message\"", "]", ",", "e", "[", "\"ecc\"", "]", ",", "enable_erasures", "=", "enable_erasures", ",", "erasures_char", "=", "erasures_char", ",", "only_erasures", "=", "only_erasures", ")", "except", "(", "ReedSolomonError", ",", "RSCodecError", ")", ",", "exc", ":", "# the reedsolo lib may raise an exception when it can't decode. We ensure that we can still continue to decode the rest of the file, and the other files.", "repaired_block", "=", "None", "repaired_ecc", "=", "None", "errmsg", "+=", "\"- Error: metadata field at offset %i: %s\\n\"", "%", "(", "entry_pos", "[", "0", "]", ",", "exc", ")", "# Check if the block was successfully repaired: if yes then we copy the repaired block...", "if", "repaired_block", "is", "not", "None", "and", "ecc_manager_intra", ".", "check", "(", "repaired_block", ",", "repaired_ecc", ")", ":", "field_correct", ".", "append", "(", "repaired_block", ")", "else", ":", "# ... else it failed, then we copy the original corrupted block and report an error later", "field_correct", ".", "append", "(", "e", "[", "\"message\"", "]", ")", "fcorrected", "=", "False", "# Join all the blocks into one string to build the final filepath", "if", "isinstance", "(", "field_correct", "[", "0", "]", ",", "bytearray", ")", ":", "field_correct", "=", "[", "str", "(", "x", ")", "for", "x", "in", "field_correct", "]", "# workaround when using --ecc_algo 3 or 4, because we get a list of bytearrays instead of str", "field", "=", "''", ".", "join", "(", "field_correct", ")", "# Report errors", "return", "(", "field", ",", "fcorrupted", ",", "fcorrected", ",", "errmsg", ")" ]
Correct an intra-field with its corresponding intra-ecc if necessary
[ "Correct", "an", "intra", "-", "field", "with", "its", "corresponding", "intra", "-", "ecc", "if", "necessary" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/structural_adaptive_ecc.py#L205-L240
train
Correct an intra - field with its corresponding intra - ecc if necessary
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2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w,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1733 - 1685) + chr(236 - 125) + chr(0b101000 + 0o15), 0b1000), nzTpIcepk0o8(chr(48) + chr(2494 - 2383) + '\x31', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\x33' + '\x35' + chr(0b110011), 19166 - 19158), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x34' + '\061', 0b1000), nzTpIcepk0o8('\x30' + chr(1687 - 1576) + chr(0b110001) + chr(53) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b111111 + 0o60) + chr(1039 - 989) + chr(0b101011 + 0o6) + '\x30', 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(2269 - 2220) + chr(0b110000) + chr(48), 0b1000), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1101111) + chr(949 - 899) + chr(0b110010 + 0o2) + chr(0b110000), 23193 - 23185), nzTpIcepk0o8(chr(48) + chr(6499 - 6388) + chr(51) + chr(0b1001 + 0o54) + '\066', 0o10), nzTpIcepk0o8(chr(2032 - 1984) + chr(111) + chr(648 - 597) + chr(0b110000) + '\060', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + '\x34', 0o10), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(5813 - 5702) + chr(0b110001) + chr(0b110000) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(1909 - 1861) + '\157' + chr(49) + '\x31' + '\062', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + chr(0b110000) + '\064', 51971 - 51963), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + '\x35' + '\x36', 8), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1101111) + chr(0b110001) + chr(0b110111) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(111) + chr(49) + '\x35' + chr(0b110011), 0o10), nzTpIcepk0o8('\060' + chr(11663 - 11552) + chr(0b110110) + '\x36', 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(48) + chr(0b100 + 0o57), 5857 - 5849), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10 + 0o61) + chr(51) + chr(0b100000 + 0o24), ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b100100 + 0o113) + '\x31' + '\062' + chr(0b101111 + 0o3), 17838 - 17830), nzTpIcepk0o8(chr(269 - 221) + chr(2769 - 2658) + '\062' + chr(54) + '\x31', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + '\x37' + chr(1252 - 1197), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1001010 + 0o45) + chr(1099 - 1048) + '\x36' + chr(49), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1150 - 1099) + chr(0b110010) + '\x31', 59368 - 59360), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101100 + 0o5) + chr(48) + chr(54), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\066' + '\x31', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1001010 + 0o45) + chr(0b0 + 0o62) + chr(1129 - 1075) + '\060', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(0b10111 + 0o34) + chr(1435 - 1382), 48089 - 48081), nzTpIcepk0o8(chr(0b10011 + 0o35) + '\x6f' + '\063' + '\065' + '\x34', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(215 - 104) + chr(0b1111 + 0o42) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(1780 - 1732) + '\x6f' + '\061' + chr(49) + chr(1717 - 1669), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(577 - 526) + chr(0b110001) + chr(51), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x31' + '\x32' + chr(0b11111 + 0o24), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + chr(52) + chr(795 - 740), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b10001 + 0o41) + chr(52) + chr(279 - 230), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011 + 0o0) + chr(537 - 486) + chr(660 - 605), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1011100 + 0o23) + '\067' + '\x32', 43530 - 43522), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(3001 - 2946) + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + chr(8253 - 8142) + chr(49) + chr(0b110010) + '\062', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1554 - 1506) + '\x6f' + '\x35' + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'+'), '\x64' + chr(101) + chr(4694 - 4595) + '\x6f' + '\144' + chr(101))(chr(3387 - 3270) + chr(0b1000100 + 0o60) + chr(0b1100110) + '\055' + chr(1235 - 1179)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def qalOKY2mKULl(Zlh40UFXTuD3, YSdDD9XiLtz0, Dy02x6Z_qZge, MWOoS1GXjd_8, uF4zwjUGNIxR, cRb7OGyXJeT1, hCiBMg59xw7h=nzTpIcepk0o8('\060' + '\x6f' + chr(479 - 431), ord("\x08")), lV6296g7ANLG=roI3spqORKae(ES5oEprVxulp(b'\x05'), '\144' + '\145' + chr(0b10011 + 0o120) + '\x6f' + chr(1978 - 1878) + '\x65')('\x75' + '\x74' + chr(0b1011101 + 0o11) + '\055' + chr(2735 - 2679)), Xz01uG11ClMN=nzTpIcepk0o8('\x30' + '\x6f' + chr(2211 - 2163), 8), aFuNB1dLSUC3=nzTpIcepk0o8('\060' + chr(111) + chr(1462 - 1413) + '\067' + chr(55) + chr(0b11010 + 0o35) + '\x37' + chr(55), ord("\x08"))): ptsFGOnZrlBW = jPb_jAbkIToX(uF4zwjUGNIxR) Q0p17vcaRlZO = jPb_jAbkIToX(cRb7OGyXJeT1) u43UC4E_3D5I = {roI3spqORKae(ES5oEprVxulp(b'`b\x88~\n\xe1%\xcc\x8a\x9fl-9'), chr(100) + '\x65' + '\x63' + chr(6308 - 6197) + chr(100) + chr(101))(chr(0b1100111 + 0o16) + '\x74' + '\146' + chr(1092 - 1047) + '\x38'): [nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + chr(0b11100 + 0o24), 8), ftfygxgFas5X(uF4zwjUGNIxR)]} WpHfZvjYOOSY = [] dodFPUwjEbM7 = nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x30', 8) VMNJgrPsQUNw = nzTpIcepk0o8(chr(1126 - 1078) + chr(111) + chr(225 - 176), 8) pYILIPKP5WV3 = roI3spqORKae(ES5oEprVxulp(b''), chr(6244 - 6144) + '\145' + '\x63' + chr(10929 - 10818) + '\144' + '\145')(chr(117) + '\164' + chr(3471 - 3369) + chr(756 - 711) + chr(3087 - 3031)) for wgf0sgcu_xPL in fDFgV7TU2Pa7(Dy02x6Z_qZge, ptsFGOnZrlBW, Q0p17vcaRlZO, u43UC4E_3D5I, aFuNB1dLSUC3, ftfygxgFas5X(uF4zwjUGNIxR), [MWOoS1GXjd_8], constantmode=nzTpIcepk0o8('\060' + chr(111) + chr(1911 - 1862), 8)): if roI3spqORKae(Zlh40UFXTuD3, roI3spqORKae(ES5oEprVxulp(b'Q`\x83v\x1d\xc1q\xeb\x9d\xaan\x18'), chr(0b110111 + 0o55) + chr(0b1100101) + chr(0b111000 + 0o53) + chr(111) + chr(0b1100100) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(4562 - 4460) + chr(45) + chr(0b111000)))(wgf0sgcu_xPL[roI3spqORKae(ES5oEprVxulp(b'hd\x98R\r\xef%'), chr(0b1100100) + chr(0b1100101) + chr(0b1010111 + 0o14) + chr(111) + '\144' + '\x65')('\165' + '\164' + chr(0b1100001 + 0o5) + chr(853 - 808) + '\x38')], wgf0sgcu_xPL[roI3spqORKae(ES5oEprVxulp(b'`b\x88'), chr(100) + '\145' + chr(7139 - 7040) + chr(0b1010110 + 0o31) + '\144' + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(0b1100100 + 0o2) + chr(1169 - 1124) + chr(56))]): roI3spqORKae(WpHfZvjYOOSY, roI3spqORKae(ES5oEprVxulp(b'MU\xb8\x15\x14\xef\x07\xcf\x84\xafIw'), '\144' + chr(0b1100101) + chr(7399 - 7300) + '\157' + chr(0b1101 + 0o127) + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + '\055' + chr(0b111000)))(wgf0sgcu_xPL[roI3spqORKae(ES5oEprVxulp(b'hd\x98R\r\xef%'), chr(0b101010 + 0o72) + '\145' + '\x63' + chr(0b1101111) + '\144' + '\145')(chr(0b1100 + 0o151) + '\x74' + chr(0b1100110) + '\055' + chr(0b0 + 0o70))]) else: dodFPUwjEbM7 = nzTpIcepk0o8(chr(0b110000) + chr(2242 - 2131) + chr(0b10011 + 0o36), 8) try: (hJlQI63r3vBE, zMCCYjzhI_sz) = Zlh40UFXTuD3.lfbFsdWlT3MB(wgf0sgcu_xPL[roI3spqORKae(ES5oEprVxulp(b'hd\x98R\r\xef%'), chr(0b1000000 + 0o44) + '\145' + chr(7527 - 7428) + '\x6f' + '\x64' + chr(0b1011010 + 0o13))(chr(0b1110101) + '\164' + chr(0b1100110) + '\055' + chr(0b111000))], wgf0sgcu_xPL[roI3spqORKae(ES5oEprVxulp(b'`b\x88'), chr(0b1100100) + chr(0b1100101) + '\x63' + '\157' + chr(0b1100100) + chr(0b111000 + 0o55))(chr(0b1001111 + 0o46) + chr(8171 - 8055) + '\146' + chr(0b101101) + '\070')], enable_erasures=hCiBMg59xw7h, erasures_char=lV6296g7ANLG, only_erasures=Xz01uG11ClMN) except (m6bqPbBYhVl1, saHP7IgNNjQg) as UmlM4OyLHmCY: hJlQI63r3vBE = None zMCCYjzhI_sz = None pYILIPKP5WV3 += roI3spqORKae(ES5oEprVxulp(b'(!\xaeS\x1e\xe72\x9a\xce\xady6+ \x8f\t\n\x16%\xb57\xdd\xdb\xd1\xb02\x11\xdf\xfb\x8a\x7f-\xbfsB\xc8\xe5\x1a\x18!\x0f'), '\x64' + '\x65' + chr(185 - 86) + chr(4306 - 4195) + '\x64' + chr(4430 - 4329))(chr(0b1110101) + '\164' + '\146' + chr(254 - 209) + '\070') % (tdSgScBDzRLp[nzTpIcepk0o8(chr(140 - 92) + '\157' + chr(183 - 135), 8)], UmlM4OyLHmCY) if hJlQI63r3vBE is not None and roI3spqORKae(Zlh40UFXTuD3, roI3spqORKae(ES5oEprVxulp(b'Q`\x83v\x1d\xc1q\xeb\x9d\xaan\x18'), chr(100) + chr(0b1100101) + chr(99) + chr(0b1101111) + '\x64' + chr(101))(chr(0b101001 + 0o114) + chr(0b1110100) + chr(0b1100110) + chr(0b10100 + 0o31) + chr(0b11000 + 0o40)))(hJlQI63r3vBE, zMCCYjzhI_sz): roI3spqORKae(WpHfZvjYOOSY, roI3spqORKae(ES5oEprVxulp(b'MU\xb8\x15\x14\xef\x07\xcf\x84\xafIw'), chr(7330 - 7230) + chr(101) + '\x63' + chr(3296 - 3185) + chr(0b1100100) + chr(0b1100101))(chr(117) + '\164' + '\x66' + chr(0b101101) + chr(0b111000)))(hJlQI63r3vBE) else: roI3spqORKae(WpHfZvjYOOSY, roI3spqORKae(ES5oEprVxulp(b'MU\xb8\x15\x14\xef\x07\xcf\x84\xafIw'), '\144' + chr(483 - 382) + '\143' + chr(111) + chr(0b1100100) + '\145')(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(0b100110 + 0o7) + chr(56)))(wgf0sgcu_xPL[roI3spqORKae(ES5oEprVxulp(b'hd\x98R\r\xef%'), '\x64' + chr(0b101101 + 0o70) + chr(0b1100011) + '\157' + '\144' + '\x65')(chr(117) + chr(0b1110100) + chr(0b1011011 + 0o13) + '\055' + chr(0b111000))]) VMNJgrPsQUNw = nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(5807 - 5696) + chr(0b110000), 8) if suIjIS24Zkqw(WpHfZvjYOOSY[nzTpIcepk0o8(chr(48) + chr(1421 - 1310) + chr(48), 8)], MdkNqd1bagO6): WpHfZvjYOOSY = [N9zlRy29S1SS(bI5jsQ9OkQtj) for bI5jsQ9OkQtj in WpHfZvjYOOSY] uF4zwjUGNIxR = roI3spqORKae(ES5oEprVxulp(b''), chr(100) + chr(4660 - 4559) + '\x63' + chr(5793 - 5682) + chr(0b1100000 + 0o4) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b10111 + 0o117) + '\x2d' + '\x38').Y4yM9BcfTCNq(WpHfZvjYOOSY) return (uF4zwjUGNIxR, dodFPUwjEbM7, VMNJgrPsQUNw, pYILIPKP5WV3)
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/memory_profiler.py
memory_usage
def memory_usage(proc=-1, interval=.1, timeout=None, run_in_place=False): """ Return the memory usage of a process or piece of code Parameters ---------- proc : {int, string, tuple}, optional The process to monitor. Can be given by a PID, by a string containing a filename or by a tuple. The tuple should contain three values (f, args, kw) specifies to run the function f(*args, **kw). Set to -1 (default) for current process. interval : float, optional timeout : float, optional run_in_place : boolean, optional. False by default If False fork the process and retrieve timings from a different process. You shouldn't need to change this unless you are affected by this (http://blog.vene.ro/2012/07/04/on-why-my-memit-fails-on-osx) bug. Returns ------- mm : list of integers, size less than num memory usage, in KB """ ret = [] if timeout is not None: max_iter = timeout / interval elif isinstance(proc, int): # external process and no timeout max_iter = 1 else: # for a Python function wait until it finishes max_iter = float('inf') if str(proc).endswith('.py'): filename = _find_script(proc) with open(filename) as f: proc = f.read() raise NotImplementedError if isinstance(proc, (list, tuple)): if len(proc) == 1: f, args, kw = (proc[0], (), {}) elif len(proc) == 2: f, args, kw = (proc[0], proc[1], {}) elif len(proc) == 3: f, args, kw = (proc[0], proc[1], proc[2]) else: raise ValueError try: import multiprocessing except ImportError: print ('WARNING: cannot import module `multiprocessing`. Forcing to' ' run inplace.') # force inplace run_in_place = True if run_in_place: import threading main_thread = threading.Thread(target=f, args=args, kwargs=kw) else: main_thread = multiprocessing.Process(target=f, args=args, kwargs=kw) i = 0 main_thread.start() pid = getattr(main_thread, 'pid', os.getpid()) while i < max_iter and main_thread.is_alive(): m = _get_memory(pid) ret.append(m) time.sleep(interval) i += 1 main_thread.join() else: # external process if proc == -1: proc = os.getpid() if max_iter == -1: max_iter = 1 for _ in range(max_iter): ret.append(_get_memory(proc)) time.sleep(interval) return ret
python
def memory_usage(proc=-1, interval=.1, timeout=None, run_in_place=False): """ Return the memory usage of a process or piece of code Parameters ---------- proc : {int, string, tuple}, optional The process to monitor. Can be given by a PID, by a string containing a filename or by a tuple. The tuple should contain three values (f, args, kw) specifies to run the function f(*args, **kw). Set to -1 (default) for current process. interval : float, optional timeout : float, optional run_in_place : boolean, optional. False by default If False fork the process and retrieve timings from a different process. You shouldn't need to change this unless you are affected by this (http://blog.vene.ro/2012/07/04/on-why-my-memit-fails-on-osx) bug. Returns ------- mm : list of integers, size less than num memory usage, in KB """ ret = [] if timeout is not None: max_iter = timeout / interval elif isinstance(proc, int): # external process and no timeout max_iter = 1 else: # for a Python function wait until it finishes max_iter = float('inf') if str(proc).endswith('.py'): filename = _find_script(proc) with open(filename) as f: proc = f.read() raise NotImplementedError if isinstance(proc, (list, tuple)): if len(proc) == 1: f, args, kw = (proc[0], (), {}) elif len(proc) == 2: f, args, kw = (proc[0], proc[1], {}) elif len(proc) == 3: f, args, kw = (proc[0], proc[1], proc[2]) else: raise ValueError try: import multiprocessing except ImportError: print ('WARNING: cannot import module `multiprocessing`. Forcing to' ' run inplace.') # force inplace run_in_place = True if run_in_place: import threading main_thread = threading.Thread(target=f, args=args, kwargs=kw) else: main_thread = multiprocessing.Process(target=f, args=args, kwargs=kw) i = 0 main_thread.start() pid = getattr(main_thread, 'pid', os.getpid()) while i < max_iter and main_thread.is_alive(): m = _get_memory(pid) ret.append(m) time.sleep(interval) i += 1 main_thread.join() else: # external process if proc == -1: proc = os.getpid() if max_iter == -1: max_iter = 1 for _ in range(max_iter): ret.append(_get_memory(proc)) time.sleep(interval) return ret
[ "def", "memory_usage", "(", "proc", "=", "-", "1", ",", "interval", "=", ".1", ",", "timeout", "=", "None", ",", "run_in_place", "=", "False", ")", ":", "ret", "=", "[", "]", "if", "timeout", "is", "not", "None", ":", "max_iter", "=", "timeout", "/", "interval", "elif", "isinstance", "(", "proc", ",", "int", ")", ":", "# external process and no timeout", "max_iter", "=", "1", "else", ":", "# for a Python function wait until it finishes", "max_iter", "=", "float", "(", "'inf'", ")", "if", "str", "(", "proc", ")", ".", "endswith", "(", "'.py'", ")", ":", "filename", "=", "_find_script", "(", "proc", ")", "with", "open", "(", "filename", ")", "as", "f", ":", "proc", "=", "f", ".", "read", "(", ")", "raise", "NotImplementedError", "if", "isinstance", "(", "proc", ",", "(", "list", ",", "tuple", ")", ")", ":", "if", "len", "(", "proc", ")", "==", "1", ":", "f", ",", "args", ",", "kw", "=", "(", "proc", "[", "0", "]", ",", "(", ")", ",", "{", "}", ")", "elif", "len", "(", "proc", ")", "==", "2", ":", "f", ",", "args", ",", "kw", "=", "(", "proc", "[", "0", "]", ",", "proc", "[", "1", "]", ",", "{", "}", ")", "elif", "len", "(", "proc", ")", "==", "3", ":", "f", ",", "args", ",", "kw", "=", "(", "proc", "[", "0", "]", ",", "proc", "[", "1", "]", ",", "proc", "[", "2", "]", ")", "else", ":", "raise", "ValueError", "try", ":", "import", "multiprocessing", "except", "ImportError", ":", "print", "(", "'WARNING: cannot import module `multiprocessing`. Forcing to'", "' run inplace.'", ")", "# force inplace", "run_in_place", "=", "True", "if", "run_in_place", ":", "import", "threading", "main_thread", "=", "threading", ".", "Thread", "(", "target", "=", "f", ",", "args", "=", "args", ",", "kwargs", "=", "kw", ")", "else", ":", "main_thread", "=", "multiprocessing", ".", "Process", "(", "target", "=", "f", ",", "args", "=", "args", ",", "kwargs", "=", "kw", ")", "i", "=", "0", "main_thread", ".", "start", "(", ")", "pid", "=", "getattr", "(", "main_thread", ",", "'pid'", ",", "os", ".", "getpid", "(", ")", ")", "while", "i", "<", "max_iter", "and", "main_thread", ".", "is_alive", "(", ")", ":", "m", "=", "_get_memory", "(", "pid", ")", "ret", ".", "append", "(", "m", ")", "time", ".", "sleep", "(", "interval", ")", "i", "+=", "1", "main_thread", ".", "join", "(", ")", "else", ":", "# external process", "if", "proc", "==", "-", "1", ":", "proc", "=", "os", ".", "getpid", "(", ")", "if", "max_iter", "==", "-", "1", ":", "max_iter", "=", "1", "for", "_", "in", "range", "(", "max_iter", ")", ":", "ret", ".", "append", "(", "_get_memory", "(", "proc", ")", ")", "time", ".", "sleep", "(", "interval", ")", "return", "ret" ]
Return the memory usage of a process or piece of code Parameters ---------- proc : {int, string, tuple}, optional The process to monitor. Can be given by a PID, by a string containing a filename or by a tuple. The tuple should contain three values (f, args, kw) specifies to run the function f(*args, **kw). Set to -1 (default) for current process. interval : float, optional timeout : float, optional run_in_place : boolean, optional. False by default If False fork the process and retrieve timings from a different process. You shouldn't need to change this unless you are affected by this (http://blog.vene.ro/2012/07/04/on-why-my-memit-fails-on-osx) bug. Returns ------- mm : list of integers, size less than num memory usage, in KB
[ "Return", "the", "memory", "usage", "of", "a", "process", "or", "piece", "of", "code" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/memory_profiler.py#L49-L134
train
Return the memory usage of a process or piece of code.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNE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dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1283 - 1235) + chr(7588 - 7477) + chr(768 - 717) + '\x36' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(1096 - 1048) + chr(9826 - 9715) + chr(1115 - 1066) + chr(49) + chr(52), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(2020 - 1971) + '\064' + chr(2650 - 2596), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + '\x37' + '\x37', 0o10), nzTpIcepk0o8('\x30' + chr(7192 - 7081) + chr(51) + chr(49) + chr(2294 - 2243), 0b1000), nzTpIcepk0o8(chr(48) + chr(9217 - 9106) + chr(752 - 702) + chr(0b1100 + 0o46) + chr(2694 - 2641), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + chr(0b100001 + 0o24) + '\063', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + chr(49) + chr(1572 - 1522), 20704 - 20696), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b1011011 + 0o24) + '\062' + chr(0b101011 + 0o11), 56167 - 56159), nzTpIcepk0o8(chr(1899 - 1851) + chr(0b1001001 + 0o46) + '\x37' + chr(869 - 816), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(0b101011 + 0o12) + chr(0b10101 + 0o37), 0b1000), nzTpIcepk0o8(chr(1889 - 1841) + chr(111) + '\x33' + chr(0b10010 + 0o37) + chr(0b110000), 37782 - 37774), nzTpIcepk0o8(chr(497 - 449) + chr(111) + '\x32' + '\060' + chr(0b10001 + 0o46), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + chr(1309 - 1260) + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(1685 - 1635) + chr(854 - 804) + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\x30' + chr(10536 - 10425) + chr(0b11011 + 0o30) + chr(0b110001) + chr(617 - 566), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110100) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(2291 - 2243) + chr(111) + '\062' + chr(2278 - 2225) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(1440 - 1392) + '\157' + chr(50) + chr(2040 - 1990) + '\x32', 0b1000), nzTpIcepk0o8(chr(1693 - 1645) + chr(0b1101111) + '\061' + '\062', 0b1000), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\x6f' + '\063' + chr(0b100000 + 0o25) + chr(50), 0o10), nzTpIcepk0o8('\x30' + chr(1808 - 1697) + chr(0b110011), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10111 + 0o36) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b101010 + 0o105) + chr(49) + '\x31', 0b1000), nzTpIcepk0o8('\060' + chr(11109 - 10998) + chr(0b1011 + 0o50) + chr(0b110001 + 0o0), 9247 - 9239), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(2433 - 2322) + '\x32' + chr(0b110011) + '\065', 17676 - 17668), nzTpIcepk0o8(chr(2135 - 2087) + '\x6f' + chr(0b110101) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(55), 0o10), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b111011 + 0o64) + '\061', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110101) + chr(0b110101), 3036 - 3028), nzTpIcepk0o8('\060' + chr(111) + chr(0b101 + 0o56) + '\x31' + '\062', 8), nzTpIcepk0o8('\060' + chr(0b110101 + 0o72) + '\x33' + '\x33' + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b100 + 0o55) + '\061' + chr(0b111 + 0o55), 8), nzTpIcepk0o8(chr(997 - 949) + chr(0b1101111) + '\062' + '\063' + '\066', 14880 - 14872), nzTpIcepk0o8(chr(689 - 641) + chr(0b1100010 + 0o15) + '\062' + chr(713 - 662) + chr(52), 52709 - 52701), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + '\064' + chr(1277 - 1229), 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1101111) + '\x37' + '\066', 0o10), nzTpIcepk0o8(chr(1689 - 1641) + chr(111) + chr(0b1100 + 0o45) + chr(716 - 662) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(5303 - 5192) + chr(0b110011) + chr(49) + chr(52), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b101110 + 0o6), 14141 - 14133)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(53) + chr(0b110000), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xda'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(2912 - 2812) + chr(6377 - 6276))('\165' + chr(10650 - 10534) + chr(0b1100110) + '\055' + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def DXLPk5uz7J0x(z5dkfUwj281f=-nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31', 8), n1CVRUxWAiaX=0.1, ACACUUFQsMpr=None, KmgADvwV9ril=nzTpIcepk0o8(chr(48) + chr(0b10000 + 0o137) + chr(261 - 213), 0o10)): PvvMx4JvMX6J = [] if ACACUUFQsMpr is not None: DYHvCav3CqQ0 = ACACUUFQsMpr / n1CVRUxWAiaX elif suIjIS24Zkqw(z5dkfUwj281f, nzTpIcepk0o8): DYHvCav3CqQ0 = nzTpIcepk0o8('\060' + chr(0b101000 + 0o107) + '\061', 8) else: DYHvCav3CqQ0 = jLW6pRf2DSRk(roI3spqORKae(ES5oEprVxulp(b'\x9d"\x00'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(0b1110101) + '\164' + chr(102) + chr(0b101101) + chr(0b111000))) if roI3spqORKae(N9zlRy29S1SS(z5dkfUwj281f), roI3spqORKae(ES5oEprVxulp(b'\xbdu\x00\xb4\x82\xd6\xea\x86uH\xe6\xba'), chr(0b1100100) + '\145' + chr(0b1100011) + '\157' + chr(2342 - 2242) + chr(0b100101 + 0o100))(chr(0b1110001 + 0o4) + '\164' + chr(0b100110 + 0o100) + '\055' + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\xda<\x1f'), chr(0b1100100) + chr(0b1100101) + '\143' + '\157' + chr(1123 - 1023) + chr(101))(chr(0b1110101) + chr(4074 - 3958) + chr(8016 - 7914) + chr(0b11101 + 0o20) + chr(2053 - 1997))): FxZHtXEolYsL = ykviIFXSXRpq(z5dkfUwj281f) with DnU3Rq9N5ala(FxZHtXEolYsL) as _R8IKF5IwAfX: z5dkfUwj281f = _R8IKF5IwAfX.eoXknH7XUn7m() raise Y1otPTwLRJvi if suIjIS24Zkqw(z5dkfUwj281f, (H4NoA26ON7iG, nfNqtJL5aRaY)): if ftfygxgFas5X(z5dkfUwj281f) == nzTpIcepk0o8(chr(48) + chr(0b100010 + 0o115) + chr(49), 8): (_R8IKF5IwAfX, eemPYp2vtTSr, n_DqV9fOWrXc) = (z5dkfUwj281f[nzTpIcepk0o8(chr(1685 - 1637) + chr(0b1101111) + chr(2262 - 2214), 8)], (), {}) elif ftfygxgFas5X(z5dkfUwj281f) == nzTpIcepk0o8('\x30' + chr(6228 - 6117) + chr(50), 36884 - 36876): (_R8IKF5IwAfX, eemPYp2vtTSr, n_DqV9fOWrXc) = (z5dkfUwj281f[nzTpIcepk0o8(chr(0b110000) + chr(11055 - 10944) + chr(421 - 373), 8)], z5dkfUwj281f[nzTpIcepk0o8(chr(48) + '\157' + chr(49), 8)], {}) elif ftfygxgFas5X(z5dkfUwj281f) == nzTpIcepk0o8(chr(1986 - 1938) + chr(5515 - 5404) + chr(0b11110 + 0o25), 8): (_R8IKF5IwAfX, eemPYp2vtTSr, n_DqV9fOWrXc) = (z5dkfUwj281f[nzTpIcepk0o8('\x30' + chr(7827 - 7716) + chr(0b110000), 8)], z5dkfUwj281f[nzTpIcepk0o8(chr(93 - 45) + chr(0b1010110 + 0o31) + chr(0b10011 + 0o36), 8)], z5dkfUwj281f[nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(11322 - 11211) + chr(0b0 + 0o62), 8)]) else: raise WbNHlDKpyPtQ try: (e2bv_unE0JHk,) = (zGgTE_CdZfvi(roI3spqORKae(ES5oEprVxulp(b'\x999\n\x8b\xa2\xe5\xd9\xa5wX\xdf\xbb\xee\xe5\xf3'), chr(100) + chr(2302 - 2201) + chr(99) + chr(111) + chr(3798 - 3698) + chr(101))(chr(117) + chr(116) + '\x66' + chr(788 - 743) + chr(0b100000 + 0o30))),) except fPFTJxVnGShv: v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\xa3\r4\xb1\x82\xdb\xec\xf04^\xcd\xa6\xe9\xe4\xe0\xebH\xc3\xe2e\x98w\tdv\xf9[kd\r\xaa\xb79\xf2\xe8\xc9N\x06\xa3g\x91?\x15\x96\xa5\xf2\xcb\xe44{\xc3\xba\xe4\xe2\xfa\xac\x01\xda\xfd*\x98vG)p\xf3^k`N\xaf\xf4'), chr(0b1100100) + chr(0b101 + 0o140) + chr(0b101111 + 0o64) + chr(6774 - 6663) + chr(0b1100100) + '\145')(chr(0b1010 + 0o153) + '\x74' + chr(0b1100110) + '\055' + chr(0b111000))) KmgADvwV9ril = nzTpIcepk0o8(chr(48) + '\157' + '\061', 8) if KmgADvwV9ril: (AJpnP_EvcD_Q,) = (zGgTE_CdZfvi(roI3spqORKae(ES5oEprVxulp(b'\x80$\x14\x9a\xaa\xf1\xc2\xa4s'), '\144' + chr(378 - 277) + chr(0b1100011) + '\157' + chr(100) + chr(8071 - 7970))(chr(0b1101 + 0o150) + '\x74' + chr(102) + '\055' + chr(0b111000))),) wdAR0NzOpk9B = AJpnP_EvcD_Q.Thread(target=_R8IKF5IwAfX, args=eemPYp2vtTSr, kwargs=n_DqV9fOWrXc) else: wdAR0NzOpk9B = e2bv_unE0JHk.Process(target=_R8IKF5IwAfX, args=eemPYp2vtTSr, kwargs=n_DqV9fOWrXc) ZlbFMSG8gCoF = nzTpIcepk0o8(chr(48) + '\x6f' + chr(1181 - 1133), 8) roI3spqORKae(wdAR0NzOpk9B, roI3spqORKae(ES5oEprVxulp(b'\xbf\x1d\x04\xb7\x8d\xc1\xc8\xa6Kq\xe7\xb1'), '\144' + chr(2944 - 2843) + '\143' + chr(0b1101111) + chr(0b1011111 + 0o5) + chr(101))('\165' + chr(11042 - 10926) + '\146' + '\x2d' + chr(0b10110 + 0o42)))() DvWXOSonGyAy = roI3spqORKae(wdAR0NzOpk9B, roI3spqORKae(ES5oEprVxulp(b'\x84%\x02'), '\x64' + chr(101) + '\143' + chr(0b1101111) + chr(100) + '\145')('\x75' + '\x74' + chr(0b11100 + 0o112) + '\x2d' + chr(0b10111 + 0o41)), aHUqKstZLeS6.getpid()) while ZlbFMSG8gCoF < DYHvCav3CqQ0 and roI3spqORKae(wdAR0NzOpk9B, roI3spqORKae(ES5oEprVxulp(b'\xac\x1eU\xa9\xa4\xcf\xff\xfaQm\xc0\xfd'), '\144' + chr(0b1100101) + chr(0b1100011) + '\157' + '\x64' + chr(0b1100101))(chr(12506 - 12389) + chr(116) + chr(0b1011000 + 0o16) + chr(0b101101) + chr(0b110 + 0o62)))(): tF75nqoNENFL = JwyEHFGJiKBu(DvWXOSonGyAy) roI3spqORKae(PvvMx4JvMX6J, roI3spqORKae(ES5oEprVxulp(b'\xbc\x185\xcb\xb3\xf2\xec\xa5~R\xf9\xfd'), chr(0b11 + 0o141) + chr(101) + chr(6188 - 6089) + chr(0b1011101 + 0o22) + '\144' + '\145')(chr(8506 - 8389) + chr(10106 - 9990) + chr(0b1100110) + chr(0b1100 + 0o41) + chr(0b100111 + 0o21)))(tF75nqoNENFL) roI3spqORKae(oprIvDIRQyCb, roI3spqORKae(ES5oEprVxulp(b'\x87 \x03\x9a\xbb'), chr(0b1010010 + 0o22) + chr(0b10000 + 0o125) + '\143' + chr(111) + chr(6027 - 5927) + '\145')('\x75' + chr(116) + chr(102) + '\055' + chr(56 - 0)))(n1CVRUxWAiaX) ZlbFMSG8gCoF += nzTpIcepk0o8(chr(0b110000) + chr(0b1011100 + 0o23) + chr(0b101111 + 0o2), 8) roI3spqORKae(wdAR0NzOpk9B, roI3spqORKae(ES5oEprVxulp(b'\xadx\x1f\xb2\xf2\xd7\xc8\xac@~\xe2\xb9'), chr(0b10110 + 0o116) + '\x65' + '\143' + chr(858 - 747) + chr(0b1100100) + chr(5546 - 5445))(chr(10774 - 10657) + '\x74' + chr(0b100110 + 0o100) + '\x2d' + chr(3056 - 3000)))() else: if z5dkfUwj281f == -nzTpIcepk0o8('\x30' + chr(111) + chr(0b1001 + 0o50), 8): z5dkfUwj281f = aHUqKstZLeS6.getpid() if DYHvCav3CqQ0 == -nzTpIcepk0o8('\060' + '\157' + '\061', 8): DYHvCav3CqQ0 = nzTpIcepk0o8(chr(616 - 568) + chr(5762 - 5651) + chr(49), 8) for zIqcgNgQ9U6F in bbT2xIe5pzk7(DYHvCav3CqQ0): roI3spqORKae(PvvMx4JvMX6J, roI3spqORKae(ES5oEprVxulp(b'\xbc\x185\xcb\xb3\xf2\xec\xa5~R\xf9\xfd'), '\144' + '\145' + '\143' + chr(0b1101111) + chr(7131 - 7031) + chr(101))(chr(0b1110101 + 0o0) + chr(11978 - 11862) + '\146' + '\x2d' + chr(56)))(JwyEHFGJiKBu(z5dkfUwj281f)) roI3spqORKae(oprIvDIRQyCb, roI3spqORKae(ES5oEprVxulp(b'\x87 \x03\x9a\xbb'), chr(3204 - 3104) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(8823 - 8722))(chr(0b1110101) + chr(0b1110100) + chr(9970 - 9868) + chr(0b101101) + chr(56)))(n1CVRUxWAiaX) return PvvMx4JvMX6J
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/memory_profiler.py
_find_script
def _find_script(script_name): """ Find the script. If the input is not a file, then $PATH will be searched. """ if os.path.isfile(script_name): return script_name path = os.getenv('PATH', os.defpath).split(os.pathsep) for dir in path: if dir == '': continue fn = os.path.join(dir, script_name) if os.path.isfile(fn): return fn print >> sys.stderr, 'Could not find script {0}'.format(script_name) raise SystemExit(1)
python
def _find_script(script_name): """ Find the script. If the input is not a file, then $PATH will be searched. """ if os.path.isfile(script_name): return script_name path = os.getenv('PATH', os.defpath).split(os.pathsep) for dir in path: if dir == '': continue fn = os.path.join(dir, script_name) if os.path.isfile(fn): return fn print >> sys.stderr, 'Could not find script {0}'.format(script_name) raise SystemExit(1)
[ "def", "_find_script", "(", "script_name", ")", ":", "if", "os", ".", "path", ".", "isfile", "(", "script_name", ")", ":", "return", "script_name", "path", "=", "os", ".", "getenv", "(", "'PATH'", ",", "os", ".", "defpath", ")", ".", "split", "(", "os", ".", "pathsep", ")", "for", "dir", "in", "path", ":", "if", "dir", "==", "''", ":", "continue", "fn", "=", "os", ".", "path", ".", "join", "(", "dir", ",", "script_name", ")", "if", "os", ".", "path", ".", "isfile", "(", "fn", ")", ":", "return", "fn", "print", ">>", "sys", ".", "stderr", ",", "'Could not find script {0}'", ".", "format", "(", "script_name", ")", "raise", "SystemExit", "(", "1", ")" ]
Find the script. If the input is not a file, then $PATH will be searched.
[ "Find", "the", "script", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/memory_profiler.py#L140-L156
train
Find the script in the PATH.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DB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paIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b101101 + 0o6) + chr(0b100000 + 0o22) + chr(0b110011), 19800 - 19792), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + '\064' + '\060', 0o10), nzTpIcepk0o8(chr(514 - 466) + '\x6f' + chr(51) + '\061', 0b1000), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b1001010 + 0o45) + chr(0b110011) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(8752 - 8641) + chr(0b1110 + 0o45) + chr(2430 - 2377) + '\066', 43457 - 43449), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + '\x34' + chr(54), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(51) + '\066' + chr(48), 0o10), nzTpIcepk0o8(chr(2241 - 2193) + chr(0b1101111) + '\061' + chr(0b10100 + 0o42) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(1909 - 1861) + chr(0b1011011 + 0o24) + chr(50) + '\062' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + '\067' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b1101 + 0o43) + '\x6f' + chr(0b11001 + 0o32) + '\x31' + chr(0b110111), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\062', 56010 - 56002), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110101) + '\062', 0o10), nzTpIcepk0o8('\060' + chr(0b1000100 + 0o53) + chr(0b110001) + '\060', 43643 - 43635), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + '\067' + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11110 + 0o25) + chr(53) + chr(51), 0o10), nzTpIcepk0o8('\060' + '\157' + '\x34' + chr(51), 32960 - 32952), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(0b110111) + chr(339 - 286), 30165 - 30157), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b111 + 0o53) + chr(0b110011 + 0o2), 3118 - 3110), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + chr(0b1000 + 0o53) + chr(0b101110 + 0o3), 2638 - 2630), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1810 - 1759) + chr(0b100 + 0o55) + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1010011 + 0o34) + chr(0b1101 + 0o52) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(2226 - 2178) + chr(9439 - 9328) + '\061' + chr(0b110101) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(1426 - 1378) + chr(0b1101111) + chr(0b100111 + 0o12) + chr(1148 - 1096) + chr(0b1111 + 0o41), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x35' + '\066', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + '\062' + chr(0b11 + 0o62), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + chr(50) + chr(0b110111), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + chr(0b110001) + '\063', 0b1000), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\x6f' + chr(0b110001) + chr(0b110011) + chr(2440 - 2387), 0o10), nzTpIcepk0o8('\x30' + chr(3086 - 2975) + chr(50) + chr(0b110010) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(51) + '\066' + chr(1478 - 1428), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + chr(756 - 705) + '\x32', 33402 - 33394), nzTpIcepk0o8(chr(1160 - 1112) + chr(111) + chr(1338 - 1285) + chr(1241 - 1191), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010 + 0o1) + chr(0b110100 + 0o0), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\063', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + '\x36' + '\x36', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b111001 + 0o66) + chr(465 - 414) + chr(0b110001) + chr(0b10000 + 0o41), 4593 - 4585), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + '\x33' + chr(0b110000), 297 - 289), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + chr(0b110001) + '\x37', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1000100 + 0o53) + chr(0b110011) + '\x33' + '\067', 1358 - 1350)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(111) + chr(2707 - 2654) + chr(0b1101 + 0o43), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xfd'), chr(100) + '\145' + chr(99) + chr(0b1101111) + chr(100) + '\145')(chr(0b110 + 0o157) + chr(116) + chr(0b1000110 + 0o40) + chr(0b101101) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def ykviIFXSXRpq(pEp2JLC1aVml): if roI3spqORKae(aHUqKstZLeS6.path, roI3spqORKae(ES5oEprVxulp(b'\xba\x93\x7fw\x82\xc3'), '\x64' + chr(0b1100101) + chr(5849 - 5750) + chr(111) + chr(0b1100100) + chr(101))(chr(117) + '\164' + chr(102) + chr(0b101101) + chr(0b10010 + 0o46)))(pEp2JLC1aVml): return pEp2JLC1aVml _pSYqrosNb95 = aHUqKstZLeS6.getenv(roI3spqORKae(ES5oEprVxulp(b'\x83\xa1MV'), '\x64' + chr(440 - 339) + '\143' + '\x6f' + chr(0b1100100) + '\145')(chr(0b1110101) + chr(12989 - 12873) + '\146' + chr(45) + chr(0b101111 + 0o11)), aHUqKstZLeS6.defpath).LfRrQOxuDvnC(aHUqKstZLeS6.pathsep) for iJbw0iNQ06Xw in _pSYqrosNb95: if iJbw0iNQ06Xw == roI3spqORKae(ES5oEprVxulp(b''), chr(4858 - 4758) + chr(0b1100101) + chr(0b1001000 + 0o33) + chr(10768 - 10657) + chr(0b110101 + 0o57) + chr(7941 - 7840))('\x75' + chr(9023 - 8907) + chr(0b1010 + 0o134) + '\055' + chr(56)): continue oo8448oP2LJ8 = aHUqKstZLeS6.path.Y4yM9BcfTCNq(iJbw0iNQ06Xw, pEp2JLC1aVml) if roI3spqORKae(aHUqKstZLeS6.path, roI3spqORKae(ES5oEprVxulp(b'\xba\x93\x7fw\x82\xc3'), chr(100) + chr(0b1100101) + '\143' + '\x6f' + '\144' + chr(0b100000 + 0o105))(chr(0b11011 + 0o132) + '\164' + chr(0b1100110) + chr(0b101101) + chr(0b111000)))(oo8448oP2LJ8): return oo8448oP2LJ8 (v8jsMqaYV6U2 >> roI3spqORKae(bpyfpu4kTbwL, roI3spqORKae(ES5oEprVxulp(b'\xbc\xb2*j\xaf\xd5\x9e9\xd5\xca\xa2D'), chr(480 - 380) + chr(101) + '\143' + '\157' + chr(0b1100100) + '\x65')(chr(0b1110101) + '\164' + chr(390 - 288) + chr(45) + '\070')), roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\x90\x8flr\x8a\x86\x9e\x19\xe0\x9a\xa9kDl[\x98@\x0f|\xe9\xbf\x1e\x12PS'), chr(100) + chr(0b1100101) + chr(0b1100011) + '\157' + chr(5041 - 4941) + '\145')('\x75' + '\164' + '\146' + chr(45) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\xa2\xd3*U\xa9\x95\x96\x19\xc5\xe5\x8cH'), chr(100) + '\x65' + '\143' + chr(0b101111 + 0o100) + '\x64' + chr(0b1100101))(chr(6990 - 6873) + chr(0b1100001 + 0o23) + chr(0b10100 + 0o122) + chr(1661 - 1616) + chr(0b111000)))(pEp2JLC1aVml)) raise UIHY5MV5X5uS(nzTpIcepk0o8(chr(988 - 940) + chr(0b1100000 + 0o17) + '\x31', 0o10))
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/memory_profiler.py
magic_memit
def magic_memit(self, line=''): """Measure memory usage of a Python statement Usage, in line mode: %memit [-ir<R>t<T>] statement Options: -r<R>: repeat the loop iteration <R> times and take the best result. Default: 1 -i: run the code in the current environment, without forking a new process. This is required on some MacOS versions of Accelerate if your line contains a call to `np.dot`. -t<T>: timeout after <T> seconds. Unused if `-i` is active. Default: None Examples -------- :: In [1]: import numpy as np In [2]: %memit np.zeros(1e7) maximum of 1: 76.402344 MB per loop In [3]: %memit np.ones(1e6) maximum of 1: 7.820312 MB per loop In [4]: %memit -r 10 np.empty(1e8) maximum of 10: 0.101562 MB per loop In [5]: memit -t 3 while True: pass; Subprocess timed out. Subprocess timed out. Subprocess timed out. ERROR: all subprocesses exited unsuccessfully. Try again with the `-i` option. maximum of 1: -inf MB per loop """ opts, stmt = self.parse_options(line, 'r:t:i', posix=False, strict=False) repeat = int(getattr(opts, 'r', 1)) if repeat < 1: repeat == 1 timeout = int(getattr(opts, 't', 0)) if timeout <= 0: timeout = None run_in_place = hasattr(opts, 'i') mem_usage = memory_usage((_func_exec, (stmt, self.shell.user_ns)), timeout=timeout, run_in_place=run_in_place) if mem_usage: print('maximum of %d: %f MB per loop' % (repeat, max(mem_usage))) else: print('ERROR: could not read memory usage, try with a lower interval or more iterations')
python
def magic_memit(self, line=''): """Measure memory usage of a Python statement Usage, in line mode: %memit [-ir<R>t<T>] statement Options: -r<R>: repeat the loop iteration <R> times and take the best result. Default: 1 -i: run the code in the current environment, without forking a new process. This is required on some MacOS versions of Accelerate if your line contains a call to `np.dot`. -t<T>: timeout after <T> seconds. Unused if `-i` is active. Default: None Examples -------- :: In [1]: import numpy as np In [2]: %memit np.zeros(1e7) maximum of 1: 76.402344 MB per loop In [3]: %memit np.ones(1e6) maximum of 1: 7.820312 MB per loop In [4]: %memit -r 10 np.empty(1e8) maximum of 10: 0.101562 MB per loop In [5]: memit -t 3 while True: pass; Subprocess timed out. Subprocess timed out. Subprocess timed out. ERROR: all subprocesses exited unsuccessfully. Try again with the `-i` option. maximum of 1: -inf MB per loop """ opts, stmt = self.parse_options(line, 'r:t:i', posix=False, strict=False) repeat = int(getattr(opts, 'r', 1)) if repeat < 1: repeat == 1 timeout = int(getattr(opts, 't', 0)) if timeout <= 0: timeout = None run_in_place = hasattr(opts, 'i') mem_usage = memory_usage((_func_exec, (stmt, self.shell.user_ns)), timeout=timeout, run_in_place=run_in_place) if mem_usage: print('maximum of %d: %f MB per loop' % (repeat, max(mem_usage))) else: print('ERROR: could not read memory usage, try with a lower interval or more iterations')
[ "def", "magic_memit", "(", "self", ",", "line", "=", "''", ")", ":", "opts", ",", "stmt", "=", "self", ".", "parse_options", "(", "line", ",", "'r:t:i'", ",", "posix", "=", "False", ",", "strict", "=", "False", ")", "repeat", "=", "int", "(", "getattr", "(", "opts", ",", "'r'", ",", "1", ")", ")", "if", "repeat", "<", "1", ":", "repeat", "==", "1", "timeout", "=", "int", "(", "getattr", "(", "opts", ",", "'t'", ",", "0", ")", ")", "if", "timeout", "<=", "0", ":", "timeout", "=", "None", "run_in_place", "=", "hasattr", "(", "opts", ",", "'i'", ")", "mem_usage", "=", "memory_usage", "(", "(", "_func_exec", ",", "(", "stmt", ",", "self", ".", "shell", ".", "user_ns", ")", ")", ",", "timeout", "=", "timeout", ",", "run_in_place", "=", "run_in_place", ")", "if", "mem_usage", ":", "print", "(", "'maximum of %d: %f MB per loop'", "%", "(", "repeat", ",", "max", "(", "mem_usage", ")", ")", ")", "else", ":", "print", "(", "'ERROR: could not read memory usage, try with a lower interval or more iterations'", ")" ]
Measure memory usage of a Python statement Usage, in line mode: %memit [-ir<R>t<T>] statement Options: -r<R>: repeat the loop iteration <R> times and take the best result. Default: 1 -i: run the code in the current environment, without forking a new process. This is required on some MacOS versions of Accelerate if your line contains a call to `np.dot`. -t<T>: timeout after <T> seconds. Unused if `-i` is active. Default: None Examples -------- :: In [1]: import numpy as np In [2]: %memit np.zeros(1e7) maximum of 1: 76.402344 MB per loop In [3]: %memit np.ones(1e6) maximum of 1: 7.820312 MB per loop In [4]: %memit -r 10 np.empty(1e8) maximum of 10: 0.101562 MB per loop In [5]: memit -t 3 while True: pass; Subprocess timed out. Subprocess timed out. Subprocess timed out. ERROR: all subprocesses exited unsuccessfully. Try again with the `-i` option. maximum of 1: -inf MB per loop
[ "Measure", "memory", "usage", "of", "a", "Python", "statement" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/memory_profiler.py#L483-L538
train
Measure memory usage of a Python statement.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2W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6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(0b1101111) + '\063' + chr(0b110001) + chr(50), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(52) + chr(0b110111), 12251 - 12243), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\060', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1111 + 0o140) + '\x32' + '\061' + '\063', 60502 - 60494), nzTpIcepk0o8('\060' + chr(111) + chr(0b11000 + 0o30), 8), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(8743 - 8632) + chr(491 - 440) + chr(0b100110 + 0o17), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(3592 - 3481) + chr(0b1100 + 0o45) + chr(0b100010 + 0o16) + '\x30', 17634 - 17626), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1101111) + '\062' + chr(52), 3425 - 3417), nzTpIcepk0o8('\060' + '\157' + '\063' + chr(0b110 + 0o53) + chr(0b110101), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(519 - 470) + chr(0b101011 + 0o7) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + chr(0b11001 + 0o33) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(7859 - 7748) + chr(0b101 + 0o54) + '\x30' + '\063', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\066' + chr(48), 0b1000), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\x6f' + chr(984 - 934) + chr(51) + '\064', 0b1000), nzTpIcepk0o8(chr(48) + chr(3061 - 2950) + chr(0b1011 + 0o47) + chr(0b110000 + 0o6) + '\067', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b11010 + 0o125) + chr(50) + chr(211 - 161) + '\x30', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\061' + '\064', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10100 + 0o37) + chr(0b110100) + chr(0b100001 + 0o24), 18905 - 18897), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + '\063' + '\x34', 18146 - 18138), nzTpIcepk0o8('\060' + chr(0b100111 + 0o110) + '\066' + '\x34', 43503 - 43495), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\x6f' + chr(0b110010) + '\063', 10960 - 10952), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + chr(0b100 + 0o56) + chr(1732 - 1683), 27029 - 27021), nzTpIcepk0o8(chr(1619 - 1571) + chr(0b1000101 + 0o52) + '\x33' + chr(0b111 + 0o57) + chr(52), 59495 - 59487), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(111) + chr(0b110010) + chr(0b1001 + 0o54) + chr(107 - 59), 61448 - 61440), nzTpIcepk0o8(chr(1190 - 1142) + chr(4034 - 3923) + chr(51) + chr(0b101 + 0o56) + '\x32', 0o10), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(0b10011 + 0o43) + chr(0b110101), 19994 - 19986), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(9540 - 9429) + chr(0b101010 + 0o7) + '\x31' + chr(0b110110), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b10100 + 0o37) + '\x36' + chr(0b110001), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + '\x33', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\x34' + chr(873 - 819), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(0b110001) + '\x30', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b110011 + 0o74) + chr(557 - 508) + chr(565 - 517), ord("\x08")), nzTpIcepk0o8(chr(551 - 503) + '\x6f' + chr(1102 - 1051) + '\x37' + chr(0b110011 + 0o2), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(527 - 476) + chr(0b110101) + chr(0b1101 + 0o43), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + '\063' + chr(0b110 + 0o57), 0b1000), nzTpIcepk0o8(chr(1396 - 1348) + chr(111) + chr(1793 - 1742) + '\x30' + '\x37', 23278 - 23270), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(51) + chr(0b110011), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(49) + chr(0b110010) + '\062', 53638 - 53630), nzTpIcepk0o8(chr(0b110000) + chr(232 - 121) + chr(0b10110 + 0o34) + '\x34' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + chr(53) + chr(0b11111 + 0o30), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\157' + chr(53) + chr(0b10011 + 0o35), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xe4'), chr(0b1100100) + chr(101) + '\x63' + chr(6631 - 6520) + chr(100) + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(102) + '\x2d' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def lenBPxcZ5oJT(hXMPsSrOQzbh, ffiOpFBWGmZU=roI3spqORKae(ES5oEprVxulp(b''), chr(100) + chr(101) + '\143' + chr(10522 - 10411) + chr(7645 - 7545) + '\x65')(chr(0b1100101 + 0o20) + chr(10972 - 10856) + chr(1987 - 1885) + '\055' + chr(56))): (M8wfvmpEewAe, dXKgvffmCzuz) = hXMPsSrOQzbh.parse_options(ffiOpFBWGmZU, roI3spqORKae(ES5oEprVxulp(b'\xb8\x1dt\xb1i'), chr(100) + chr(101) + chr(3635 - 3536) + '\157' + chr(302 - 202) + chr(101))('\165' + chr(116) + chr(2755 - 2653) + chr(45) + chr(0b111000)), posix=nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1101111) + '\060', 8), strict=nzTpIcepk0o8(chr(0b101101 + 0o3) + '\157' + chr(762 - 714), 8)) FYWu4jHPffdX = nzTpIcepk0o8(roI3spqORKae(M8wfvmpEewAe, roI3spqORKae(ES5oEprVxulp(b'\xb8'), '\144' + chr(101) + chr(0b11001 + 0o112) + chr(0b1010011 + 0o34) + chr(0b110101 + 0o57) + chr(4078 - 3977))(chr(117) + chr(0b1110100) + '\146' + '\055' + chr(1447 - 1391)), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001), 0o10))) if FYWu4jHPffdX < nzTpIcepk0o8(chr(261 - 213) + chr(4348 - 4237) + '\061', 8): FYWu4jHPffdX == nzTpIcepk0o8(chr(2278 - 2230) + chr(0b100 + 0o153) + chr(0b110001 + 0o0), 8) ACACUUFQsMpr = nzTpIcepk0o8(roI3spqORKae(M8wfvmpEewAe, roI3spqORKae(ES5oEprVxulp(b'\xbe'), chr(0b1100100) + chr(0b1100101) + chr(0b111010 + 0o51) + chr(0b101110 + 0o101) + '\x64' + '\145')('\x75' + chr(701 - 585) + '\146' + chr(0b11110 + 0o17) + '\x38'), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b110 + 0o151) + '\060', 8))) if ACACUUFQsMpr <= nzTpIcepk0o8(chr(0b101001 + 0o7) + '\x6f' + chr(48), 8): ACACUUFQsMpr = None KmgADvwV9ril = dRKdVnHPFq7C(M8wfvmpEewAe, roI3spqORKae(ES5oEprVxulp(b'\xa3'), chr(3636 - 3536) + chr(0b101111 + 0o66) + chr(0b110111 + 0o54) + '\x6f' + chr(0b1010101 + 0o17) + '\145')(chr(0b110110 + 0o77) + chr(0b101101 + 0o107) + '\146' + chr(45) + '\x38')) VoCTb9mIphJq = DXLPk5uz7J0x((hub6a5Rf8XJ0, (dXKgvffmCzuz, hXMPsSrOQzbh.shell.user_ns)), timeout=ACACUUFQsMpr, run_in_place=KmgADvwV9ril) if VoCTb9mIphJq: v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\xa7Fx\xe2mh-4\xa27\x84fT\xa6\x97\xb5j\xc5\x91v3\xe1\x91\xda\xfa\x19!\x9e{'), chr(0b10111 + 0o115) + '\145' + chr(4224 - 4125) + chr(0b1101111) + '\144' + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(45) + chr(0b111000)) % (FYWu4jHPffdX, KV9ckIhroIia(VoCTb9mIphJq))) else: v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b"\x8fuR\xc4R'`w\xa2$\xc8'\x10\xf2\xd8\xe4,\x97\xb9Uw\xb1\x99\xcd\xb7\x1a<\x88+S;i\x9a\x8dq\xe7o \xdb\x8f\xbdNt\xe3 |`x\xa2&\xc11\x10\xf5\xd9\xe4i\x97\xaaU\x7f\xb1\x9b\xda\xfa\x18!\x83n\x06!|\x98\x9a<\xb3r=\xcc\xdc"), '\144' + chr(101) + chr(0b1100011) + chr(0b1101111) + '\144' + '\145')('\x75' + chr(7181 - 7065) + chr(0b1100110) + '\x2d' + '\070'))
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/memory_profiler.py
LineProfiler.add_function
def add_function(self, func): """ Record line profiling information for the given Python function. """ try: # func_code does not exist in Python3 code = func.__code__ except AttributeError: import warnings warnings.warn("Could not extract a code object for the object %r" % (func,)) return if code not in self.code_map: self.code_map[code] = {} self.functions.append(func)
python
def add_function(self, func): """ Record line profiling information for the given Python function. """ try: # func_code does not exist in Python3 code = func.__code__ except AttributeError: import warnings warnings.warn("Could not extract a code object for the object %r" % (func,)) return if code not in self.code_map: self.code_map[code] = {} self.functions.append(func)
[ "def", "add_function", "(", "self", ",", "func", ")", ":", "try", ":", "# func_code does not exist in Python3", "code", "=", "func", ".", "__code__", "except", "AttributeError", ":", "import", "warnings", "warnings", ".", "warn", "(", "\"Could not extract a code object for the object %r\"", "%", "(", "func", ",", ")", ")", "return", "if", "code", "not", "in", "self", ".", "code_map", ":", "self", ".", "code_map", "[", "code", "]", "=", "{", "}", "self", ".", "functions", ".", "append", "(", "func", ")" ]
Record line profiling information for the given Python function.
[ "Record", "line", "profiling", "information", "for", "the", "given", "Python", "function", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/memory_profiler.py#L177-L190
train
Add a Python function to the line profiling information.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGf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jIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b101100 + 0o4) + '\157' + chr(50) + '\067' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(2051 - 2003) + chr(0b1101111) + chr(2060 - 2010) + chr(0b110000) + chr(1206 - 1154), 0b1000), nzTpIcepk0o8(chr(48) + chr(5462 - 5351) + chr(55) + chr(0b101111 + 0o6), 0o10), nzTpIcepk0o8('\060' + chr(0b11110 + 0o121) + chr(0b11111 + 0o22) + '\063' + '\062', 5918 - 5910), nzTpIcepk0o8(chr(931 - 883) + chr(111) + '\062' + chr(0b100101 + 0o14) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(948 - 900) + chr(0b1101111) + '\x33' + '\061' + chr(52), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(49) + '\x30', 0o10), nzTpIcepk0o8(chr(48) + chr(7357 - 7246) + chr(0b11010 + 0o32) + '\x32', 0o10), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1100111 + 0o10) + chr(50) + chr(2155 - 2101), 2078 - 2070), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + '\x31' + '\060', 8), nzTpIcepk0o8(chr(437 - 389) + '\x6f' + chr(2796 - 2742) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100001 + 0o116) + '\x31' + chr(49) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1101111) + '\x37' + '\065', 8), nzTpIcepk0o8('\060' + chr(0b110100 + 0o73) + '\x32' + '\067' + '\067', 56730 - 56722), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\157' + chr(51) + '\065' + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(1358 - 1307) + chr(0b100 + 0o62) + chr(0b1111 + 0o44), 0o10), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\157' + chr(1722 - 1671) + chr(50) + '\061', 0b1000), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(11136 - 11025) + chr(1358 - 1307) + chr(121 - 71) + chr(2368 - 2315), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(525 - 475) + '\061' + chr(873 - 823), 0o10), nzTpIcepk0o8(chr(1816 - 1768) + chr(0b1101111) + chr(50) + '\x35' + chr(0b110100), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\063' + chr(0b100111 + 0o12) + chr(0b110111), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(0b1100 + 0o44) + chr(0b0 + 0o64), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x32' + chr(50) + chr(977 - 926), ord("\x08")), nzTpIcepk0o8(chr(1609 - 1561) + chr(0b1100011 + 0o14) + '\x32' + chr(0b10010 + 0o45) + chr(0b110000), 44534 - 44526), nzTpIcepk0o8('\x30' + '\x6f' + chr(1779 - 1730) + chr(0b100010 + 0o21) + '\062', 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + chr(0b110101) + chr(1833 - 1785), ord("\x08")), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\157' + '\062' + chr(873 - 825) + '\065', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b101110 + 0o3) + chr(49) + '\x31', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(0b100111 + 0o11) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(1488 - 1440) + chr(111) + chr(0b110011) + '\x33' + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(2085 - 2037) + chr(0b1101111) + chr(0b110011) + chr(52) + chr(378 - 329), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + '\x32' + chr(2358 - 2309), 31908 - 31900), nzTpIcepk0o8(chr(48) + chr(0b1011111 + 0o20) + chr(49) + chr(0b1110 + 0o50), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(0b110000) + chr(2255 - 2203), 65152 - 65144), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(111) + chr(0b110001) + chr(55) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(2006 - 1958) + chr(0b10 + 0o155) + chr(0b110001) + chr(0b110000) + chr(0b100001 + 0o17), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(10732 - 10621) + chr(1295 - 1245) + '\x33' + chr(51), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + chr(703 - 650) + chr(0b110111), 18115 - 18107), nzTpIcepk0o8(chr(48) + '\157' + '\067' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(333 - 285) + chr(0b1000100 + 0o53) + chr(880 - 831) + '\067' + chr(0b110000), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b101100 + 0o11) + chr(0b10101 + 0o33), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x97'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(0b1101111) + chr(0b111010 + 0o52) + chr(7303 - 7202))(chr(117) + chr(116) + '\146' + '\055' + chr(0b1011 + 0o55)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def HuLjhBKylsu5(hXMPsSrOQzbh, h0klhChk4Vv6): try: MJEGgvK3nnE9 = h0klhChk4Vv6.jMep1LQHSakB except bIsJhlpYrrU2: (EyN62Frii5S5,) = (zGgTE_CdZfvi(roI3spqORKae(ES5oEprVxulp(b'\xce\xe5O4\xe6\xa2\xafQ'), chr(100) + '\145' + '\x63' + '\157' + chr(4343 - 4243) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(2102 - 2000) + chr(0b100011 + 0o12) + chr(56))),) roI3spqORKae(EyN62Frii5S5, roI3spqORKae(ES5oEprVxulp(b'\xca\xcel\x0c\xd0\x84\xb9q/\xaeQ6'), chr(0b111111 + 0o45) + chr(101) + chr(0b1001000 + 0o33) + chr(111) + '\x64' + '\145')('\165' + chr(116) + chr(3491 - 3389) + '\055' + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\xfa\xebH6\xeb\xec\xa6Mb\xe8S4I\xcd\x8a\x90\xa5\xf5\xeb\x8c\xac+\xf7\xddz\xc7\xe7#\xa4\xbe\x95\xb1h\xab\x0e`\xef\xc7[X\xd6\xe6W?\xec\xb8\xe8\x07d'), chr(0b1011100 + 0o10) + '\145' + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(0b1100101))('\x75' + '\164' + chr(291 - 189) + chr(0b101101) + chr(2718 - 2662)) % (h0klhChk4Vv6,)) return if MJEGgvK3nnE9 not in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xda\xebY?\xd0\xa1\xa9R'), chr(5885 - 5785) + chr(101) + '\143' + chr(0b11111 + 0o120) + chr(7371 - 7271) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b1100011 + 0o3) + chr(0b1 + 0o54) + '\070')): hXMPsSrOQzbh.QFE6ZSBAwrMw[MJEGgvK3nnE9] = {} roI3spqORKae(hXMPsSrOQzbh.functions, roI3spqORKae(ES5oEprVxulp(b'\xf1\xd0nn\xf7\xab\x8fM|\xa7cy'), '\x64' + chr(0b1010001 + 0o24) + chr(99) + '\157' + chr(0b1000 + 0o134) + chr(0b1100101))('\165' + '\164' + '\x66' + chr(1842 - 1797) + '\070'))(h0klhChk4Vv6)
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/memory_profiler.py
LineProfiler.wrap_function
def wrap_function(self, func): """ Wrap a function to profile it. """ def f(*args, **kwds): self.enable_by_count() try: result = func(*args, **kwds) finally: self.disable_by_count() return result return f
python
def wrap_function(self, func): """ Wrap a function to profile it. """ def f(*args, **kwds): self.enable_by_count() try: result = func(*args, **kwds) finally: self.disable_by_count() return result return f
[ "def", "wrap_function", "(", "self", ",", "func", ")", ":", "def", "f", "(", "*", "args", ",", "*", "*", "kwds", ")", ":", "self", ".", "enable_by_count", "(", ")", "try", ":", "result", "=", "func", "(", "*", "args", ",", "*", "*", "kwds", ")", "finally", ":", "self", ".", "disable_by_count", "(", ")", "return", "result", "return", "f" ]
Wrap a function to profile it.
[ "Wrap", "a", "function", "to", "profile", "it", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/memory_profiler.py#L192-L203
train
Wrap a function to profile it.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8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Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(828 - 778) + chr(0b110110) + chr(1618 - 1570), 35363 - 35355), nzTpIcepk0o8('\x30' + chr(9633 - 9522) + chr(50) + chr(51) + '\061', 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(2055 - 2006) + '\x30' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b1100 + 0o50) + '\065', 64791 - 64783), nzTpIcepk0o8(chr(1714 - 1666) + '\x6f' + '\x32' + '\x35' + chr(0b1001 + 0o52), 53769 - 53761), nzTpIcepk0o8(chr(667 - 619) + '\157' + '\061' + chr(51), 1785 - 1777), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(0b1101111) + chr(0b110011) + chr(50) + chr(0b110001), 46263 - 46255), nzTpIcepk0o8(chr(793 - 745) + chr(0b1101111) + chr(50) + chr(0b110100) + '\x34', 54203 - 54195), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + '\x35' + '\x37', 0o10), nzTpIcepk0o8('\060' + chr(3532 - 3421) + chr(0b100010 + 0o20) + chr(1434 - 1385) + chr(863 - 810), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b10000 + 0o42) + chr(54) + '\x32', 0b1000), nzTpIcepk0o8(chr(219 - 171) + chr(10969 - 10858) + chr(0b110001) + chr(55) + chr(2278 - 2229), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + '\061' + chr(53), 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\157' + chr(756 - 701) + chr(0b10101 + 0o36), 0o10), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b10100 + 0o133) + chr(49) + chr(0b1101 + 0o43) + '\064', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(2472 - 2421) + chr(50), 0o10), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\157' + chr(146 - 97) + chr(0b110110) + chr(52), 37707 - 37699), nzTpIcepk0o8(chr(48) + '\x6f' + chr(54) + chr(53), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(1699 - 1650) + chr(0b110101) + chr(52), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(980 - 930) + chr(55) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + '\062' + '\064', 0b1000), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\157' + chr(0b100001 + 0o20) + '\x31' + chr(0b110111), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1011101 + 0o22) + chr(0b110011) + chr(1913 - 1865) + chr(128 - 77), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(317 - 269) + '\x6f' + chr(0b101101 + 0o5) + '\066' + chr(54), 15232 - 15224), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(373 - 320) + chr(0b110110), 43741 - 43733), nzTpIcepk0o8('\060' + '\x6f' + '\063' + '\066' + chr(0b100010 + 0o16), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + chr(139 - 86), ord("\x08")), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + chr(50) + '\067' + chr(0b110101), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + chr(51) + chr(0b10011 + 0o43), 0o10), nzTpIcepk0o8(chr(1229 - 1181) + chr(0b110011 + 0o74) + '\062' + chr(51) + chr(49), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b0 + 0o62) + chr(0b101011 + 0o6) + '\x37', 0b1000), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1101111) + chr(0b100111 + 0o12) + chr(2829 - 2775) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + chr(0b110010) + '\x30', ord("\x08")), nzTpIcepk0o8('\x30' + chr(8906 - 8795) + chr(0b11110 + 0o23) + chr(0b110011) + chr(695 - 644), 0o10), nzTpIcepk0o8(chr(886 - 838) + '\x6f' + chr(0b110001) + chr(271 - 222) + '\063', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(0b10101 + 0o42) + chr(0b11011 + 0o32), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1610 - 1561) + '\x35' + chr(202 - 150), 8), nzTpIcepk0o8(chr(653 - 605) + chr(11525 - 11414) + chr(0b110001) + chr(49) + chr(54), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\x6f' + chr(53) + chr(2048 - 2000), 55447 - 55439)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x9e'), '\x64' + chr(0b1100101) + chr(99) + chr(111) + '\144' + chr(0b101010 + 0o73))('\165' + '\164' + chr(4426 - 4324) + chr(0b10001 + 0o34) + chr(0b100011 + 0o25)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def bWm26bHdkhSl(hXMPsSrOQzbh, h0klhChk4Vv6): def _R8IKF5IwAfX(*eemPYp2vtTSr, **TRoKXhn8KxPi): roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xd5\xf7$G\xc7n\x8e\xc6\x16\xd2\xd1\x16p#O'), chr(0b1100100) + '\145' + chr(99) + chr(111) + chr(0b1100100) + '\x65')(chr(117) + chr(116) + '\x66' + chr(74 - 29) + chr(56)))() try: POx95m7SPOVy = h0klhChk4Vv6(*eemPYp2vtTSr, **TRoKXhn8KxPi) finally: roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xd4\xf06D\xc9g\xb4\xfb\r\xf4\xed\x1aj8U0'), chr(0b1100001 + 0o3) + '\x65' + chr(0b11 + 0o140) + chr(111) + chr(8125 - 8025) + chr(6400 - 6299))(chr(0b1110101) + chr(11640 - 11524) + chr(0b111000 + 0o56) + chr(423 - 378) + chr(56)))() return POx95m7SPOVy return _R8IKF5IwAfX
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/memory_profiler.py
LineProfiler.runctx
def runctx(self, cmd, globals, locals): """ Profile a single executable statement in the given namespaces. """ self.enable_by_count() try: exec(cmd, globals, locals) finally: self.disable_by_count() return self
python
def runctx(self, cmd, globals, locals): """ Profile a single executable statement in the given namespaces. """ self.enable_by_count() try: exec(cmd, globals, locals) finally: self.disable_by_count() return self
[ "def", "runctx", "(", "self", ",", "cmd", ",", "globals", ",", "locals", ")", ":", "self", ".", "enable_by_count", "(", ")", "try", ":", "exec", "(", "cmd", ",", "globals", ",", "locals", ")", "finally", ":", "self", ".", "disable_by_count", "(", ")", "return", "self" ]
Profile a single executable statement in the given namespaces.
[ "Profile", "a", "single", "executable", "statement", "in", "the", "given", "namespaces", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/memory_profiler.py#L212-L220
train
Profile a single executable statement in the given namespaces.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,U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T_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(52) + '\063', 0o10), nzTpIcepk0o8('\060' + chr(7861 - 7750) + '\063' + '\062' + chr(0b110010), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + chr(53) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(1576 - 1528) + chr(111) + chr(2583 - 2532) + chr(0b100011 + 0o21) + chr(2179 - 2131), 3489 - 3481), nzTpIcepk0o8('\x30' + chr(111) + '\067' + chr(2000 - 1945), ord("\x08")), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(11186 - 11075) + chr(640 - 590) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + chr(1495 - 1440) + chr(0b11011 + 0o33), 0o10), nzTpIcepk0o8(chr(522 - 474) + chr(10521 - 10410) + chr(51) + chr(0b110101) + '\063', ord("\x08")), nzTpIcepk0o8(chr(508 - 460) + '\157' + chr(0b100110 + 0o21) + chr(0b11111 + 0o23), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + '\x35' + chr(0b110011), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(0b110011 + 0o0) + chr(0b110101), 0o10), nzTpIcepk0o8('\x30' + chr(5769 - 5658) + chr(81 - 32) + chr(49) + chr(0b1110 + 0o44), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(52) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(3400 - 3289) + chr(2203 - 2154) + '\x36' + chr(1689 - 1641), 4166 - 4158), nzTpIcepk0o8('\060' + chr(0b100 + 0o153) + '\062' + '\x31' + chr(53), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + '\064' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + '\061' + chr(54 - 6), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\063' + chr(54), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b11111 + 0o23) + '\067' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(790 - 742) + '\157' + chr(0b1111 + 0o44) + chr(2743 - 2689) + chr(1572 - 1522), 0b1000), nzTpIcepk0o8(chr(2247 - 2199) + chr(0b1101111) + '\x33' + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\063' + chr(54) + chr(129 - 76), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(51) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\x6f' + chr(0b110010) + chr(0b101110 + 0o10) + chr(0b1001 + 0o54), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(523 - 468) + '\064', 0o10), nzTpIcepk0o8('\x30' + chr(4935 - 4824) + chr(1291 - 1241) + chr(1773 - 1718), ord("\x08")), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(1758 - 1647) + chr(0b101111 + 0o2) + '\065' + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(0b110011) + '\x35', 53720 - 53712), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(0b110000) + chr(0b110000 + 0o0), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x31' + chr(0b10010 + 0o36) + '\066', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(1702 - 1654) + chr(8803 - 8692) + '\x35' + chr(0b101001 + 0o15), 0b1000), nzTpIcepk0o8(chr(1046 - 998) + chr(111) + chr(0b100111 + 0o20) + chr(0b100101 + 0o17), 8), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1101111) + '\066' + chr(738 - 690), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b11011 + 0o30) + chr(53) + chr(255 - 201), 0o10), nzTpIcepk0o8('\060' + chr(3940 - 3829) + '\x33' + chr(0b1000 + 0o55), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2267 - 2213) + chr(0b101011 + 0o6), 42500 - 42492), nzTpIcepk0o8(chr(48) + chr(0b1000101 + 0o52) + chr(2143 - 2093) + chr(834 - 783) + '\065', 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + chr(53) + chr(52), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x33' + chr(52) + chr(1695 - 1645), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(111) + chr(2239 - 2186) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\r'), '\144' + chr(101) + chr(0b100101 + 0o76) + chr(6604 - 6493) + '\144' + '\x65')('\x75' + chr(5124 - 5008) + '\x66' + '\055' + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def QXxv0t3fqltv(hXMPsSrOQzbh, mD44XHfr1PSC, CFUos7dinCa7, y0cCpS6dh4OT): roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'F\xbc\x8c\x82Sp\xe1\x89C\xb4\xbe%\x10\x1e\xf9'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(1962 - 1851) + chr(0b1100100) + chr(310 - 209))(chr(1674 - 1557) + '\x74' + chr(0b1000100 + 0o42) + chr(821 - 776) + '\070'))() try: _9cznYtBZk6k(mD44XHfr1PSC, CFUos7dinCa7, y0cCpS6dh4OT) finally: roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'G\xbb\x9e\x81]y\xdb\xb4X\x92\x82)\n\x05\xe3\x17'), '\x64' + chr(101) + '\143' + '\x6f' + chr(100) + '\x65')(chr(3820 - 3703) + '\164' + chr(4740 - 4638) + chr(1642 - 1597) + '\070'))() return hXMPsSrOQzbh
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/memory_profiler.py
LineProfiler.runcall
def runcall(self, func, *args, **kw): """ Profile a single function call. """ # XXX where is this used ? can be removed ? self.enable_by_count() try: return func(*args, **kw) finally: self.disable_by_count()
python
def runcall(self, func, *args, **kw): """ Profile a single function call. """ # XXX where is this used ? can be removed ? self.enable_by_count() try: return func(*args, **kw) finally: self.disable_by_count()
[ "def", "runcall", "(", "self", ",", "func", ",", "*", "args", ",", "*", "*", "kw", ")", ":", "# XXX where is this used ? can be removed ?", "self", ".", "enable_by_count", "(", ")", "try", ":", "return", "func", "(", "*", "args", ",", "*", "*", "kw", ")", "finally", ":", "self", ".", "disable_by_count", "(", ")" ]
Profile a single function call.
[ "Profile", "a", "single", "function", "call", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/memory_profiler.py#L222-L230
train
Profile a single function call.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ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FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1024 - 976) + chr(11109 - 10998) + chr(1157 - 1107) + chr(0b110011) + '\065', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\x33' + '\061' + chr(0b100011 + 0o15), 0o10), nzTpIcepk0o8(chr(544 - 496) + chr(11829 - 11718) + '\062' + chr(2476 - 2425), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + '\x36' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b1010 + 0o47) + chr(0b1010 + 0o55) + '\064', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b110100 + 0o73) + chr(51) + chr(1777 - 1727) + chr(0b110111), 20371 - 20363), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10011 + 0o40) + chr(48) + '\061', 50332 - 50324), nzTpIcepk0o8('\x30' + '\157' + '\x36' + chr(55), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110101) + '\067', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(1445 - 1334) + chr(0b110001) + '\062' + chr(1079 - 1024), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1011011 + 0o24) + '\x37' + '\x30', 0o10), nzTpIcepk0o8(chr(1924 - 1876) + chr(111) + '\x31' + chr(0b100101 + 0o13) + '\x31', ord("\x08")), nzTpIcepk0o8('\x30' + chr(6808 - 6697) + chr(0b1101 + 0o47) + '\x30', 1952 - 1944), nzTpIcepk0o8(chr(465 - 417) + chr(8568 - 8457) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + '\x37' + chr(51), 63001 - 62993), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b11 + 0o57) + '\067' + chr(0b101011 + 0o5), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x31' + '\x35' + chr(0b11111 + 0o30), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b1 + 0o60) + chr(0b10001 + 0o46) + chr(50), 59237 - 59229), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b100111 + 0o110) + '\062' + '\063' + '\x36', 14447 - 14439), nzTpIcepk0o8('\x30' + chr(111) + '\061' + chr(0b110110) + '\065', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b100000 + 0o22) + '\066' + chr(0b10011 + 0o43), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1100 + 0o143) + chr(51) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + chr(0b110011), 0b1000), nzTpIcepk0o8('\060' + chr(9922 - 9811) + chr(0b101 + 0o56) + chr(0b110101 + 0o1) + '\x37', 0o10), nzTpIcepk0o8('\060' + chr(5721 - 5610) + '\062' + chr(0b110100) + chr(1986 - 1931), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + '\066' + chr(0b0 + 0o61), 0o10), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b1011100 + 0o23) + '\067' + '\061', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + '\x33' + chr(0b101 + 0o56), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(11041 - 10930) + chr(0b11 + 0o57) + '\x36' + chr(55), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x34' + chr(0b11110 + 0o26), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(55) + chr(1311 - 1261), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(456 - 407) + chr(52) + '\x36', 16084 - 16076), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + '\062' + chr(0b11111 + 0o22), ord("\x08")), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(5340 - 5229) + chr(2477 - 2427) + '\064' + chr(53), 0o10), nzTpIcepk0o8('\x30' + chr(7749 - 7638) + chr(0b101111 + 0o4) + chr(0b110010) + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(3097 - 2986) + chr(0b110011) + chr(0b10011 + 0o40) + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + '\x37' + '\066', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b10111 + 0o130) + chr(0b10110 + 0o33) + chr(492 - 443), 18958 - 18950), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(111) + '\062' + '\065' + '\x32', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(0b100110 + 0o15) + '\x36', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\157' + chr(395 - 342) + chr(0b110000), 581 - 573)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xb3'), chr(0b1001100 + 0o30) + chr(0b1001000 + 0o35) + chr(99) + chr(0b1101111) + '\x64' + chr(7277 - 7176))('\x75' + '\164' + chr(0b1100110) + chr(45) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def xFOS87ccDXNq(hXMPsSrOQzbh, h0klhChk4Vv6, *eemPYp2vtTSr, **n_DqV9fOWrXc): roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf8\xa6r\x14\x10\xb2\x9eUV\x08[.Uk\x8f'), chr(100) + chr(101) + chr(99) + chr(111) + chr(0b1100100) + '\x65')('\165' + '\164' + chr(102) + '\055' + chr(0b100111 + 0o21)))() try: return h0klhChk4Vv6(*eemPYp2vtTSr, **n_DqV9fOWrXc) finally: roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf9\xa1`\x17\x1e\xbb\xa4hM.g"Op\x95\xcc'), chr(2242 - 2142) + chr(9063 - 8962) + chr(0b1100011) + chr(111) + '\144' + chr(101))(chr(0b10110 + 0o137) + '\164' + '\x66' + chr(45) + '\070'))()
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/memory_profiler.py
LineProfiler.disable_by_count
def disable_by_count(self): """ Disable the profiler if the number of disable requests matches the number of enable requests. """ if self.enable_count > 0: self.enable_count -= 1 if self.enable_count == 0: self.disable()
python
def disable_by_count(self): """ Disable the profiler if the number of disable requests matches the number of enable requests. """ if self.enable_count > 0: self.enable_count -= 1 if self.enable_count == 0: self.disable()
[ "def", "disable_by_count", "(", "self", ")", ":", "if", "self", ".", "enable_count", ">", "0", ":", "self", ".", "enable_count", "-=", "1", "if", "self", ".", "enable_count", "==", "0", ":", "self", ".", "disable", "(", ")" ]
Disable the profiler if the number of disable requests matches the number of enable requests.
[ "Disable", "the", "profiler", "if", "the", "number", "of", "disable", "requests", "matches", "the", "number", "of", "enable", "requests", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/memory_profiler.py#L239-L246
train
Disable the profiler if the number of disable requests matches the number of enable requests.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4Uf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,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(581 - 470) + chr(50) + chr(1814 - 1764) + chr(2734 - 2681), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1907 - 1856) + '\064' + '\x37', 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x32' + '\x36' + chr(0b1101 + 0o51), 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1101111) + '\x32' + chr(0b110011) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\157' + chr(0b101100 + 0o6) + chr(0b110001 + 0o4) + chr(2335 - 2280), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(48) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(1044 - 996) + chr(8414 - 8303) + '\x32' + chr(51) + '\067', 52405 - 52397), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(0b100000 + 0o22) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(1258 - 1210) + '\157' + chr(1295 - 1246) + chr(0b110011) + chr(0b1011 + 0o52), 40552 - 40544), nzTpIcepk0o8(chr(510 - 462) + '\x6f' + chr(0b1010 + 0o50) + '\060' + '\x30', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(53) + chr(50), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + chr(50) + chr(0b10010 + 0o45), 64093 - 64085), nzTpIcepk0o8('\060' + chr(9489 - 9378) + '\061' + chr(52) + chr(0b10000 + 0o40), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b100101 + 0o112) + '\063' + '\064' + '\062', 14306 - 14298), nzTpIcepk0o8('\060' + '\157' + chr(0b110010 + 0o0) + '\x33' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + chr(0b110000 + 0o2) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + '\x32' + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(189 - 141) + chr(111) + chr(2344 - 2293) + '\064' + chr(940 - 886), 0o10), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b1101111) + chr(0b100011 + 0o20) + chr(0b110001) + '\x31', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110110) + chr(48), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + chr(54) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(48) + chr(2649 - 2538) + chr(0b110101) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2237 - 2187) + '\060' + '\060', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110000 + 0o5) + chr(50), 8), nzTpIcepk0o8(chr(2009 - 1961) + chr(6542 - 6431) + chr(49) + chr(55) + '\067', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1548 - 1499) + '\064', 0b1000), nzTpIcepk0o8(chr(1509 - 1461) + '\157' + chr(0b10111 + 0o40) + chr(2612 - 2560), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(2480 - 2430) + '\x35' + chr(494 - 445), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1100110 + 0o11) + '\x31' + chr(289 - 239) + chr(0b101001 + 0o16), 8), nzTpIcepk0o8('\x30' + chr(0b11 + 0o154) + '\062' + '\x36' + chr(2469 - 2417), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1011100 + 0o23) + chr(0b110001) + '\x30' + chr(1592 - 1540), 58137 - 58129), nzTpIcepk0o8(chr(2123 - 2075) + chr(111) + '\061' + '\x37' + chr(0b11 + 0o56), 0b1000), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1001101 + 0o42) + chr(1833 - 1782) + '\060', 0b1000), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\157' + chr(51) + chr(72 - 22) + chr(943 - 892), 0o10), nzTpIcepk0o8('\x30' + chr(2518 - 2407) + chr(1765 - 1712), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + chr(0b100001 + 0o21) + '\066', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100001 + 0o24) + chr(0b101000 + 0o12), 8), nzTpIcepk0o8(chr(0b1 + 0o57) + '\157' + chr(0b10010 + 0o40) + chr(0b100110 + 0o21) + chr(0b110000 + 0o5), 0o10), nzTpIcepk0o8(chr(731 - 683) + chr(111) + '\x31' + '\066' + chr(53), 33405 - 33397)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110101) + chr(183 - 135), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xbb'), chr(0b1100100) + chr(7187 - 7086) + chr(0b1100011) + '\157' + chr(100) + '\x65')(chr(10347 - 10230) + chr(5560 - 5444) + '\x66' + chr(374 - 329) + chr(0b100011 + 0o25)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def zXeVQzOtLzXP(hXMPsSrOQzbh): if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf0\x89\xd7\xfb\xc3\xa5\xc042\xf5D\xa3'), chr(100) + chr(0b1100101) + chr(6023 - 5924) + chr(0b11 + 0o154) + chr(7286 - 7186) + chr(101))(chr(0b100101 + 0o120) + '\164' + chr(0b1000000 + 0o46) + chr(0b101101) + chr(0b111000))) > nzTpIcepk0o8(chr(1814 - 1766) + '\x6f' + '\x30', 0b1000): hXMPsSrOQzbh.XJhFd_X5ExOv -= nzTpIcepk0o8('\x30' + '\157' + chr(49), 59190 - 59182) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xcd\xad\xde\xdf\xcb\x9f\xc7b\x18\xf8e\xa1'), chr(0b10011 + 0o121) + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(1995 - 1895) + chr(101))(chr(0b10100 + 0o141) + chr(9348 - 9232) + chr(0b1001101 + 0o31) + chr(1071 - 1026) + chr(2905 - 2849))) == nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1171 - 1123), 8): roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf1\x8e\xc5\xf8\xcd\xac\xfa'), chr(0b1010000 + 0o24) + '\145' + '\x63' + chr(0b1101111) + '\144' + chr(2685 - 2584))(chr(2500 - 2383) + chr(116) + '\146' + chr(0b101101) + chr(0b111000)))()
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/memory_profiler.py
LineProfiler.trace_memory_usage
def trace_memory_usage(self, frame, event, arg): """Callback for sys.settrace""" if event in ('line', 'return') and frame.f_code in self.code_map: lineno = frame.f_lineno if event == 'return': lineno += 1 entry = self.code_map[frame.f_code].setdefault(lineno, []) entry.append(_get_memory(os.getpid())) return self.trace_memory_usage
python
def trace_memory_usage(self, frame, event, arg): """Callback for sys.settrace""" if event in ('line', 'return') and frame.f_code in self.code_map: lineno = frame.f_lineno if event == 'return': lineno += 1 entry = self.code_map[frame.f_code].setdefault(lineno, []) entry.append(_get_memory(os.getpid())) return self.trace_memory_usage
[ "def", "trace_memory_usage", "(", "self", ",", "frame", ",", "event", ",", "arg", ")", ":", "if", "event", "in", "(", "'line'", ",", "'return'", ")", "and", "frame", ".", "f_code", "in", "self", ".", "code_map", ":", "lineno", "=", "frame", ".", "f_lineno", "if", "event", "==", "'return'", ":", "lineno", "+=", "1", "entry", "=", "self", ".", "code_map", "[", "frame", ".", "f_code", "]", ".", "setdefault", "(", "lineno", ",", "[", "]", ")", "entry", ".", "append", "(", "_get_memory", "(", "os", ".", "getpid", "(", ")", ")", ")", "return", "self", ".", "trace_memory_usage" ]
Callback for sys.settrace
[ "Callback", "for", "sys", ".", "settrace" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/memory_profiler.py#L248-L257
train
Callback for sys. settrace
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBM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,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(0b1010000 + 0o37) + chr(460 - 407) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(824 - 774) + '\x31' + chr(0b101101 + 0o3), 12803 - 12795), nzTpIcepk0o8('\060' + chr(0b1100001 + 0o16) + '\062' + chr(51) + chr(0b110011), 34893 - 34885), nzTpIcepk0o8(chr(159 - 111) + chr(0b1101111) + '\x32' + chr(809 - 759) + '\x34', 0o10), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1101111) + chr(1470 - 1417) + '\065', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100 + 0o63) + chr(0b100 + 0o57), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\063' + chr(0b110011) + '\064', 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1101111) + chr(1924 - 1875) + chr(0b110010) + chr(0b101 + 0o55), 29405 - 29397), nzTpIcepk0o8('\060' + '\157' + chr(0b10010 + 0o37) + chr(53) + chr(0b11 + 0o56), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100111 + 0o15) + chr(2310 - 2260), ord("\x08")), nzTpIcepk0o8(chr(1127 - 1079) + chr(0b1101111) + '\x31' + '\x30' + chr(2335 - 2282), 0b1000), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(111) + '\x32' + chr(1177 - 1122) + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1011110 + 0o21) + chr(1203 - 1153) + chr(0b100110 + 0o16) + chr(1940 - 1889), 0o10), nzTpIcepk0o8('\060' + chr(1410 - 1299) + chr(0b110010) + chr(0b110011) + chr(0b100110 + 0o21), 53036 - 53028), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b100 + 0o56) + chr(636 - 582) + chr(0b10001 + 0o40), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + chr(0b1000 + 0o50) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x35' + chr(0b100111 + 0o15), 8), nzTpIcepk0o8(chr(329 - 281) + chr(0b1101111) + '\x32' + chr(1692 - 1638) + '\065', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\063' + '\064' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + chr(0b110110) + chr(797 - 744), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(2095 - 2045) + chr(0b10100 + 0o34) + '\065', 0o10), nzTpIcepk0o8('\x30' + chr(0b1100111 + 0o10) + chr(51) + chr(1939 - 1887), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b111 + 0o150) + chr(441 - 391) + '\x34' + '\x32', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(11004 - 10893) + chr(53) + chr(1030 - 978), 8), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\x6f' + chr(0b11000 + 0o33) + chr(563 - 513) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(501 - 453) + '\157' + chr(0b10000 + 0o47) + chr(0b110001), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b1110 + 0o43) + chr(0b100010 + 0o24) + chr(436 - 385), ord("\x08")), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1101111) + chr(1337 - 1286) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\x6f' + '\063' + chr(54), 57271 - 57263), nzTpIcepk0o8(chr(524 - 476) + chr(0b1101111) + chr(49) + chr(0b110011) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(6367 - 6256) + chr(0b110110) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + '\x34', 50259 - 50251), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110110) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(5606 - 5495) + chr(0b101101 + 0o4) + chr(54) + '\x32', 4532 - 4524), nzTpIcepk0o8(chr(2193 - 2145) + chr(4264 - 4153) + '\x32' + chr(835 - 786) + chr(0b110110), 4005 - 3997), nzTpIcepk0o8('\060' + '\157' + '\x32' + chr(49) + chr(0b110110), 8), nzTpIcepk0o8(chr(2170 - 2122) + chr(0b11 + 0o154) + chr(0b110010) + '\066' + chr(49), 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10001 + 0o40) + chr(50) + chr(691 - 640), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(1577 - 1525) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(1168 - 1117) + chr(0b10011 + 0o35) + chr(0b110000 + 0o2), 50526 - 50518)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1001111 + 0o40) + '\x35' + '\060', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x02'), chr(0b1000 + 0o134) + chr(101) + chr(4891 - 4792) + chr(0b110101 + 0o72) + chr(9447 - 9347) + '\145')('\x75' + '\164' + chr(0b1100110) + '\x2d' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def RLQiiRVAp0Ky(hXMPsSrOQzbh, KZ4ew2qs1HTO, D4ybylS07yGH, S6EI_gyMl2nC): if D4ybylS07yGH in (roI3spqORKae(ES5oEprVxulp(b'@\xe1\xf5\xf1'), chr(100) + '\x65' + chr(99) + '\157' + '\x64' + chr(0b10110 + 0o117))(chr(117) + chr(0b1010000 + 0o44) + chr(9737 - 9635) + chr(0b101101) + chr(0b111000 + 0o0)), roI3spqORKae(ES5oEprVxulp(b'^\xed\xef\xe1_U'), chr(0b1100100) + '\x65' + chr(3779 - 3680) + chr(9537 - 9426) + chr(654 - 554) + chr(101))(chr(0b1110101) + '\x74' + chr(0b110110 + 0o60) + '\055' + chr(0b11001 + 0o37))) and roI3spqORKae(KZ4ew2qs1HTO, roI3spqORKae(ES5oEprVxulp(b'J\xd7\xf8\xfbI^'), chr(0b1100100) + chr(6639 - 6538) + chr(0b100000 + 0o103) + chr(8779 - 8668) + chr(100) + chr(6802 - 6701))(chr(0b1001101 + 0o50) + '\164' + '\x66' + chr(0b100101 + 0o10) + chr(0b0 + 0o70))) in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'}\xce\xde\xa2wh\x9e\x13\x1eP\x08\xc9'), chr(0b1001001 + 0o33) + chr(101) + chr(7849 - 7750) + chr(111) + chr(100) + chr(0b1100101))('\x75' + '\x74' + '\x66' + chr(522 - 477) + chr(0b111000))): soyUrUW37Gvb = KZ4ew2qs1HTO.f_lineno if D4ybylS07yGH == roI3spqORKae(ES5oEprVxulp(b'^\xed\xef\xe1_U'), '\144' + '\145' + '\143' + chr(7051 - 6940) + '\144' + chr(7535 - 7434))(chr(3468 - 3351) + chr(116) + '\x66' + chr(45) + chr(56)): soyUrUW37Gvb += nzTpIcepk0o8('\x30' + chr(111) + chr(0b100110 + 0o13), 0o10) eTfWnO_8KfiX = hXMPsSrOQzbh.code_map[KZ4ew2qs1HTO.f_code].ze0JMuK9roWS(soyUrUW37Gvb, []) roI3spqORKae(eTfWnO_8KfiX, roI3spqORKae(ES5oEprVxulp(b'd\xdc\xc8\xa0U\\\x9b=\x03M\x10\x8b'), '\x64' + chr(285 - 184) + '\143' + chr(0b1101111) + '\x64' + chr(2614 - 2513))('\165' + chr(0b10110 + 0o136) + chr(102) + chr(0b101001 + 0o4) + '\070'))(JwyEHFGJiKBu(roI3spqORKae(aHUqKstZLeS6, roI3spqORKae(ES5oEprVxulp(b'K\xed\xef\xe4D_'), '\144' + '\145' + chr(0b1100011) + chr(111) + '\x64' + chr(0b1100101))('\x75' + '\164' + chr(5671 - 5569) + chr(45) + chr(0b111000)))())) return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'X\xfa\xfa\xf7Hd\xb17\x04M7\xc7\xfc\xea\xc2\xe2K\xd0'), chr(2991 - 2891) + chr(0b1100101) + chr(0b111011 + 0o50) + chr(0b1101111) + chr(0b1100100) + chr(0b1000111 + 0o36))(chr(117) + chr(0b1110100) + chr(102) + chr(0b101101) + '\x38'))
lrq3000/pyFileFixity
setup.py
parse_makefile_aliases
def parse_makefile_aliases(filepath): ''' Parse a makefile to find commands and substitute variables. Expects a makefile with only aliases and a line return between each command. Returns a dict, with a list of commands for each alias. ''' # -- Parsing the Makefile using ConfigParser # Adding a fake section to make the Makefile a valid Ini file ini_str = '[root]\n' with open(filepath, 'r') as fd: ini_str = ini_str + fd.read().replace('@make ', '') ini_fp = StringIO.StringIO(ini_str) # Parse using ConfigParser config = ConfigParser.RawConfigParser() config.readfp(ini_fp) # Fetch the list of aliases aliases = config.options('root') # -- Extracting commands for each alias commands = {} for alias in aliases: # strip the first line return, and then split by any line return commands[alias] = config.get('root', alias).lstrip('\n').split('\n') # -- Commands substitution # Loop until all aliases are substituted by their commands: # Check each command of each alias, and if there is one command that is to # be substituted by an alias, try to do it right away. If this is not # possible because this alias itself points to other aliases , then stop # and put the current alias back in the queue to be processed again later. # Create the queue of aliases to process aliases_todo = commands.keys() # Create the dict that will hold the full commands commands_new = {} # Loop until we have processed all aliases while aliases_todo: # Pick the first alias in the queue alias = aliases_todo.pop(0) # Create a new entry in the resulting dict commands_new[alias] = [] # For each command of this alias for cmd in commands[alias]: # Ignore self-referencing (alias points to itself) if cmd == alias: pass # Substitute full command elif cmd in aliases and cmd in commands_new: # Append all the commands referenced by the alias commands_new[alias].extend(commands_new[cmd]) # Delay substituting another alias, waiting for the other alias to # be substituted first elif cmd in aliases and cmd not in commands_new: # Delete the current entry to avoid other aliases # to reference this one wrongly (as it is empty) del commands_new[alias] aliases_todo.append(alias) break # Full command (no aliases) else: commands_new[alias].append(cmd) commands = commands_new del commands_new # -- Prepending prefix to avoid conflicts with standard setup.py commands # for alias in commands.keys(): # commands['make_'+alias] = commands[alias] # del commands[alias] return commands
python
def parse_makefile_aliases(filepath): ''' Parse a makefile to find commands and substitute variables. Expects a makefile with only aliases and a line return between each command. Returns a dict, with a list of commands for each alias. ''' # -- Parsing the Makefile using ConfigParser # Adding a fake section to make the Makefile a valid Ini file ini_str = '[root]\n' with open(filepath, 'r') as fd: ini_str = ini_str + fd.read().replace('@make ', '') ini_fp = StringIO.StringIO(ini_str) # Parse using ConfigParser config = ConfigParser.RawConfigParser() config.readfp(ini_fp) # Fetch the list of aliases aliases = config.options('root') # -- Extracting commands for each alias commands = {} for alias in aliases: # strip the first line return, and then split by any line return commands[alias] = config.get('root', alias).lstrip('\n').split('\n') # -- Commands substitution # Loop until all aliases are substituted by their commands: # Check each command of each alias, and if there is one command that is to # be substituted by an alias, try to do it right away. If this is not # possible because this alias itself points to other aliases , then stop # and put the current alias back in the queue to be processed again later. # Create the queue of aliases to process aliases_todo = commands.keys() # Create the dict that will hold the full commands commands_new = {} # Loop until we have processed all aliases while aliases_todo: # Pick the first alias in the queue alias = aliases_todo.pop(0) # Create a new entry in the resulting dict commands_new[alias] = [] # For each command of this alias for cmd in commands[alias]: # Ignore self-referencing (alias points to itself) if cmd == alias: pass # Substitute full command elif cmd in aliases and cmd in commands_new: # Append all the commands referenced by the alias commands_new[alias].extend(commands_new[cmd]) # Delay substituting another alias, waiting for the other alias to # be substituted first elif cmd in aliases and cmd not in commands_new: # Delete the current entry to avoid other aliases # to reference this one wrongly (as it is empty) del commands_new[alias] aliases_todo.append(alias) break # Full command (no aliases) else: commands_new[alias].append(cmd) commands = commands_new del commands_new # -- Prepending prefix to avoid conflicts with standard setup.py commands # for alias in commands.keys(): # commands['make_'+alias] = commands[alias] # del commands[alias] return commands
[ "def", "parse_makefile_aliases", "(", "filepath", ")", ":", "# -- Parsing the Makefile using ConfigParser", "# Adding a fake section to make the Makefile a valid Ini file", "ini_str", "=", "'[root]\\n'", "with", "open", "(", "filepath", ",", "'r'", ")", "as", "fd", ":", "ini_str", "=", "ini_str", "+", "fd", ".", "read", "(", ")", ".", "replace", "(", "'@make '", ",", "''", ")", "ini_fp", "=", "StringIO", ".", "StringIO", "(", "ini_str", ")", "# Parse using ConfigParser", "config", "=", "ConfigParser", ".", "RawConfigParser", "(", ")", "config", ".", "readfp", "(", "ini_fp", ")", "# Fetch the list of aliases", "aliases", "=", "config", ".", "options", "(", "'root'", ")", "# -- Extracting commands for each alias", "commands", "=", "{", "}", "for", "alias", "in", "aliases", ":", "# strip the first line return, and then split by any line return", "commands", "[", "alias", "]", "=", "config", ".", "get", "(", "'root'", ",", "alias", ")", ".", "lstrip", "(", "'\\n'", ")", ".", "split", "(", "'\\n'", ")", "# -- Commands substitution", "# Loop until all aliases are substituted by their commands:", "# Check each command of each alias, and if there is one command that is to", "# be substituted by an alias, try to do it right away. If this is not", "# possible because this alias itself points to other aliases , then stop", "# and put the current alias back in the queue to be processed again later.", "# Create the queue of aliases to process", "aliases_todo", "=", "commands", ".", "keys", "(", ")", "# Create the dict that will hold the full commands", "commands_new", "=", "{", "}", "# Loop until we have processed all aliases", "while", "aliases_todo", ":", "# Pick the first alias in the queue", "alias", "=", "aliases_todo", ".", "pop", "(", "0", ")", "# Create a new entry in the resulting dict", "commands_new", "[", "alias", "]", "=", "[", "]", "# For each command of this alias", "for", "cmd", "in", "commands", "[", "alias", "]", ":", "# Ignore self-referencing (alias points to itself)", "if", "cmd", "==", "alias", ":", "pass", "# Substitute full command", "elif", "cmd", "in", "aliases", "and", "cmd", "in", "commands_new", ":", "# Append all the commands referenced by the alias", "commands_new", "[", "alias", "]", ".", "extend", "(", "commands_new", "[", "cmd", "]", ")", "# Delay substituting another alias, waiting for the other alias to", "# be substituted first", "elif", "cmd", "in", "aliases", "and", "cmd", "not", "in", "commands_new", ":", "# Delete the current entry to avoid other aliases", "# to reference this one wrongly (as it is empty)", "del", "commands_new", "[", "alias", "]", "aliases_todo", ".", "append", "(", "alias", ")", "break", "# Full command (no aliases)", "else", ":", "commands_new", "[", "alias", "]", ".", "append", "(", "cmd", ")", "commands", "=", "commands_new", "del", "commands_new", "# -- Prepending prefix to avoid conflicts with standard setup.py commands", "# for alias in commands.keys():", "# commands['make_'+alias] = commands[alias]", "# del commands[alias]", "return", "commands" ]
Parse a makefile to find commands and substitute variables. Expects a makefile with only aliases and a line return between each command. Returns a dict, with a list of commands for each alias.
[ "Parse", "a", "makefile", "to", "find", "commands", "and", "substitute", "variables", ".", "Expects", "a", "makefile", "with", "only", "aliases", "and", "a", "line", "return", "between", "each", "command", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/setup.py#L30-L101
train
Parse a makefile to find commands and substitute variables. Expects a makefile with only aliases and a line return between each command and each alias. Returns a dict with a list of commands for each alias.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJx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,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1742 - 1694) + chr(6607 - 6496) + chr(0b110001) + chr(1576 - 1524) + chr(0b110110), 23776 - 23768), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\x6f' + chr(0b10 + 0o61) + chr(55) + chr(0b110000 + 0o3), 0o10), nzTpIcepk0o8(chr(48) + chr(480 - 369) + '\063' + '\065' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(1834 - 1786) + chr(9094 - 8983) + chr(0b10 + 0o60) + chr(0b110001) + chr(0b110110), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(766 - 717) + chr(0b110001) + '\067', 0o10), nzTpIcepk0o8(chr(1042 - 994) + chr(0b1101111) + '\x33' + chr(535 - 485) + '\062', 0b1000), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1101111) + chr(0b110011) + chr(49), 0b1000), nzTpIcepk0o8(chr(66 - 18) + '\157' + '\063' + '\060' + '\x32', 0b1000), nzTpIcepk0o8(chr(480 - 432) + chr(111) + chr(0b1000 + 0o53) + chr(0b110000) + chr(0b100110 + 0o14), 8), nzTpIcepk0o8('\x30' + chr(0b110010 + 0o75) + chr(0b110011) + chr(0b110100) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(55), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(0b1100 + 0o46) + chr(50), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(54), 3641 - 3633), nzTpIcepk0o8(chr(0b110000) + chr(0b111000 + 0o67) + '\061' + '\x32' + chr(0b10100 + 0o40), ord("\x08")), nzTpIcepk0o8(chr(290 - 242) + chr(8219 - 8108) + '\062' + '\x33' + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + chr(0b11 + 0o62) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(2006 - 1958) + chr(8869 - 8758) + '\x31' + chr(55) + chr(0b10101 + 0o36), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110101) + chr(2238 - 2188), 50884 - 50876), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + chr(0b110111) + '\x35', 15980 - 15972), nzTpIcepk0o8(chr(48) + chr(0b10100 + 0o133) + chr(0b10100 + 0o40) + '\067', ord("\x08")), nzTpIcepk0o8('\060' + chr(7692 - 7581) + chr(50) + '\x32' + chr(53), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(53) + '\060', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101110 + 0o1) + '\061' + chr(0b1110 + 0o42) + '\067', 0o10), nzTpIcepk0o8(chr(108 - 60) + '\157' + '\062' + chr(0b110000) + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1001111 + 0o40) + '\063' + chr(0b101 + 0o61) + '\063', 4268 - 4260), nzTpIcepk0o8('\x30' + chr(111) + '\063' + chr(0b110011) + chr(0b110010), 36641 - 36633), nzTpIcepk0o8(chr(789 - 741) + '\x6f' + chr(0b1000 + 0o53) + chr(0b100 + 0o54) + chr(49), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b0 + 0o62) + '\063', 40228 - 40220), nzTpIcepk0o8(chr(719 - 671) + chr(0b101100 + 0o103) + chr(51) + chr(55) + chr(0b100110 + 0o12), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(177 - 127) + '\066' + '\065', 0o10), nzTpIcepk0o8(chr(48) + chr(0b101010 + 0o105) + chr(1304 - 1251) + chr(49), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1000001 + 0o56) + chr(49) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(12204 - 12093) + '\062' + chr(0b1 + 0o61), 26578 - 26570), nzTpIcepk0o8(chr(48) + chr(111) + chr(282 - 232) + chr(0b1001 + 0o54) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b100001 + 0o116) + chr(0b110001) + chr(0b101101 + 0o10) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(10482 - 10371) + chr(0b110001) + '\x30' + '\067', 8), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1101111) + chr(0b101100 + 0o5) + chr(54) + chr(635 - 581), 28866 - 28858), nzTpIcepk0o8('\060' + chr(111) + chr(1997 - 1947) + chr(522 - 473) + '\066', 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b1001 + 0o51) + '\062' + chr(0b100110 + 0o15), 0o10), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(2439 - 2328) + chr(50) + chr(0b11101 + 0o25) + chr(2644 - 2591), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(111) + '\065' + chr(48), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'H'), '\144' + chr(2464 - 2363) + chr(0b1100011) + chr(2414 - 2303) + '\x64' + '\145')(chr(8964 - 8847) + chr(0b110100 + 0o100) + chr(0b1100011 + 0o3) + chr(0b101101) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def dEH6rfeRCKOf(EbbNb3b9066e): dZuvgy6Kf9EC = roI3spqORKae(ES5oEprVxulp(b'=\x89\x86\xe1;\x8f\x13'), '\x64' + '\145' + '\x63' + chr(111) + chr(100) + chr(0b110010 + 0o63))(chr(0b1110101) + '\164' + chr(0b1100110) + chr(0b101101) + '\070') with DnU3Rq9N5ala(EbbNb3b9066e, roI3spqORKae(ES5oEprVxulp(b'\x14'), chr(0b1100100) + chr(0b1100101) + chr(733 - 634) + chr(111) + '\144' + chr(0b1001100 + 0o31))(chr(671 - 554) + chr(0b10010 + 0o142) + chr(102) + chr(0b101101) + chr(1549 - 1493))) as RW6jRKOlF6C5: dZuvgy6Kf9EC = dZuvgy6Kf9EC + RW6jRKOlF6C5.read().E91dbqOZXBpJ(roI3spqORKae(ES5oEprVxulp(b'&\x96\x88\xe5*\xf2'), chr(0b1100100) + '\145' + '\143' + chr(3611 - 3500) + '\x64' + chr(0b1100101))(chr(0b100010 + 0o123) + '\x74' + '\146' + '\055' + '\x38'), roI3spqORKae(ES5oEprVxulp(b''), '\144' + chr(101) + chr(99) + chr(0b100011 + 0o114) + chr(0b11 + 0o141) + chr(0b1100101))(chr(12786 - 12669) + chr(0b110001 + 0o103) + chr(102) + chr(0b100101 + 0o10) + chr(56))) IFDHvWXdH0UA = jPb_jAbkIToX.StringIO(dZuvgy6Kf9EC) kgkKUcD36lls = ahImOlLYltiR.RawConfigParser() roI3spqORKae(kgkKUcD36lls, roI3spqORKae(ES5oEprVxulp(b'\x14\x9e\x88\xea)\xa2'), '\144' + chr(0b1100101) + chr(9797 - 9698) + chr(111) + chr(0b1100100) + chr(0b10110 + 0o117))(chr(7177 - 7060) + chr(116) + '\x66' + chr(774 - 729) + chr(56)))(IFDHvWXdH0UA) jEuYqBGFUpyY = kgkKUcD36lls.gpUDAok9rMxr(roI3spqORKae(ES5oEprVxulp(b'\x14\x94\x86\xfa'), chr(0b1100100) + chr(5962 - 5861) + '\143' + chr(111) + chr(100) + '\x65')(chr(0b1110101) + chr(116) + chr(0b1000 + 0o136) + '\055' + chr(0b110000 + 0o10))) WUie0wM82IpJ = {} for zbn4GgOuHNch in jEuYqBGFUpyY: WUie0wM82IpJ[zbn4GgOuHNch] = kgkKUcD36lls.get(roI3spqORKae(ES5oEprVxulp(b'\x14\x94\x86\xfa'), '\144' + chr(101) + chr(0b1001000 + 0o33) + chr(0b1101111) + chr(100) + chr(0b1011011 + 0o12))(chr(0b1110101) + '\164' + chr(0b1000000 + 0o46) + chr(0b101101) + '\x38'), zbn4GgOuHNch).lstrip(roI3spqORKae(ES5oEprVxulp(b'l'), '\144' + '\145' + chr(0b111000 + 0o53) + '\x6f' + chr(0b11110 + 0o106) + '\145')(chr(0b1110101) + '\x74' + chr(255 - 153) + chr(45) + '\x38')).LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b'l'), '\144' + chr(0b1100101) + chr(99) + chr(111) + '\x64' + '\145')(chr(0b1110101) + chr(0b1110100) + '\x66' + '\x2d' + chr(0b10111 + 0o41))) VQNmTc8VtJWh = WUie0wM82IpJ.keys() VvIvynjBNf4e = {} while VQNmTc8VtJWh: zbn4GgOuHNch = VQNmTc8VtJWh.uC_Yoybx7J0I(nzTpIcepk0o8(chr(48) + chr(0b111110 + 0o61) + chr(0b110000), 0b1000)) VvIvynjBNf4e[zbn4GgOuHNch] = [] for mD44XHfr1PSC in WUie0wM82IpJ[zbn4GgOuHNch]: if mD44XHfr1PSC == zbn4GgOuHNch: pass elif mD44XHfr1PSC in jEuYqBGFUpyY and mD44XHfr1PSC in VvIvynjBNf4e: roI3spqORKae(VvIvynjBNf4e[zbn4GgOuHNch], roI3spqORKae(ES5oEprVxulp(b'2\xa4\xda\xc3 \xb6U\x95\x9d\xa2}#'), chr(0b100010 + 0o102) + chr(0b1010101 + 0o20) + chr(6851 - 6752) + '\157' + chr(100) + '\x65')(chr(4489 - 4372) + chr(116) + chr(2409 - 2307) + chr(1365 - 1320) + chr(0b101000 + 0o20)))(VvIvynjBNf4e[mD44XHfr1PSC]) elif mD44XHfr1PSC in jEuYqBGFUpyY and mD44XHfr1PSC not in VvIvynjBNf4e: del VvIvynjBNf4e[zbn4GgOuHNch] roI3spqORKae(VQNmTc8VtJWh, roI3spqORKae(ES5oEprVxulp(b'.\xaf\xba\xba7\xb5^\xad\xa8\x8fJg'), chr(5913 - 5813) + chr(0b11010 + 0o113) + chr(0b1100011) + chr(0b101001 + 0o106) + chr(0b1100100) + chr(8222 - 8121))('\165' + chr(9475 - 9359) + '\x66' + chr(0b101101) + chr(0b111000)))(zbn4GgOuHNch) break else: roI3spqORKae(VvIvynjBNf4e[zbn4GgOuHNch], roI3spqORKae(ES5oEprVxulp(b'.\xaf\xba\xba7\xb5^\xad\xa8\x8fJg'), chr(100) + chr(0b111000 + 0o55) + '\x63' + chr(0b1101111) + '\x64' + chr(0b111110 + 0o47))(chr(117) + '\164' + chr(0b1100110) + chr(0b100110 + 0o7) + chr(0b111000)))(mD44XHfr1PSC) WUie0wM82IpJ = VvIvynjBNf4e del VvIvynjBNf4e return WUie0wM82IpJ
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/kthread.py
KThread.start
def start(self): """Start the thread.""" self.__run_backup = self.run self.run = self.__run # Force the Thread to install our trace. threading.Thread.start(self)
python
def start(self): """Start the thread.""" self.__run_backup = self.run self.run = self.__run # Force the Thread to install our trace. threading.Thread.start(self)
[ "def", "start", "(", "self", ")", ":", "self", ".", "__run_backup", "=", "self", ".", "run", "self", ".", "run", "=", "self", ".", "__run", "# Force the Thread to install our trace.", "threading", ".", "Thread", ".", "start", "(", "self", ")" ]
Start the thread.
[ "Start", "the", "thread", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/kthread.py#L43-L47
train
Start the thread.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf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5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b1000 + 0o50) + '\157' + '\061' + '\062' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(1508 - 1460) + chr(0b1001011 + 0o44) + chr(1685 - 1635) + '\064' + '\060', 0b1000), nzTpIcepk0o8('\060' + chr(11304 - 11193) + '\062' + '\x34' + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(10224 - 10113) + '\x32' + '\067' + chr(1655 - 1605), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10000 + 0o43) + chr(0b1000 + 0o55) + '\x34', 9419 - 9411), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + chr(54) + chr(0b110000 + 0o2), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100001 + 0o20) + '\x32' + '\x34', 32843 - 32835), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + '\x31' + '\064', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b10000 + 0o137) + chr(1461 - 1412) + chr(295 - 244), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + '\x33' + chr(0b110101), 1755 - 1747), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\063' + '\x36' + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1010101 + 0o32) + chr(217 - 166) + '\x34' + chr(0b1100 + 0o46), 32281 - 32273), nzTpIcepk0o8(chr(1145 - 1097) + chr(111) + chr(50) + chr(0b110100) + chr(2509 - 2457), 26480 - 26472), nzTpIcepk0o8(chr(2058 - 2010) + '\x6f' + chr(0b110001) + chr(1858 - 1807) + chr(2443 - 2392), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(55) + chr(977 - 927), 17529 - 17521), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\157' + '\061' + chr(0b110111), 11404 - 11396), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(54) + chr(389 - 340), 36150 - 36142), nzTpIcepk0o8(chr(345 - 297) + chr(0b1101111) + '\x33' + chr(0b110001 + 0o2) + chr(0b110001), 24165 - 24157), nzTpIcepk0o8('\x30' + chr(11747 - 11636) + '\x32' + chr(2543 - 2489) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + '\063' + chr(556 - 504), 0b1000), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(111) + chr(0b110001) + chr(0b10101 + 0o42) + chr(0b110101), 54819 - 54811), nzTpIcepk0o8('\x30' + chr(0b1000110 + 0o51) + '\x32' + chr(0b111 + 0o56) + chr(53), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(1098 - 1048) + chr(1227 - 1175) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + '\063' + chr(0b11100 + 0o26) + '\x30', 0b1000), nzTpIcepk0o8('\060' + chr(12130 - 12019) + chr(0b110011) + chr(55) + '\x32', 0b1000), nzTpIcepk0o8(chr(1016 - 968) + chr(0b1101111) + chr(0b110010) + chr(0b110000) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(1158 - 1110) + chr(0b10001 + 0o136) + '\x33' + chr(0b110100), 0b1000), nzTpIcepk0o8('\060' + chr(0b111 + 0o150) + chr(0b110001) + chr(0b110100) + chr(1499 - 1447), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(1991 - 1880) + chr(51) + chr(0b110010) + chr(1498 - 1449), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(53) + chr(0b11010 + 0o34), ord("\x08")), nzTpIcepk0o8('\x30' + chr(3723 - 3612) + chr(0b1011 + 0o46) + chr(0b11 + 0o62) + chr(0b11011 + 0o34), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + chr(51) + '\x37', 17802 - 17794), nzTpIcepk0o8('\x30' + chr(0b1100 + 0o143) + chr(0b111 + 0o54) + chr(2302 - 2251) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\157' + '\x33' + chr(0b110011) + chr(53), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(386 - 335) + chr(1930 - 1876) + '\x33', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110011) + '\x33' + chr(913 - 858), ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(111) + chr(50) + chr(0b110101) + '\x34', 47095 - 47087), nzTpIcepk0o8('\x30' + chr(0b111111 + 0o60) + chr(268 - 217) + chr(293 - 238) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(774 - 663) + chr(0b110111) + chr(0b101110 + 0o5), ord("\x08")), nzTpIcepk0o8(chr(1195 - 1147) + chr(0b1101111) + '\x32' + chr(0b110101) + '\061', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(5340 - 5229) + chr(53) + chr(0b110 + 0o52), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'x'), '\x64' + '\145' + chr(99) + '\x6f' + chr(2042 - 1942) + chr(101))(chr(117) + '\164' + chr(102) + chr(623 - 578) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def KQbHFTcl_LKy(hXMPsSrOQzbh): hXMPsSrOQzbh.jF7bwneuB3ej = hXMPsSrOQzbh.qnPOIdBQJdzY hXMPsSrOQzbh.qnPOIdBQJdzY = hXMPsSrOQzbh.__run roI3spqORKae(AJpnP_EvcD_Q.Thread, roI3spqORKae(ES5oEprVxulp(b'\x1d\xf1\xc5\xf2\xaa\xa67 T\xd1\xbc\x9b'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(111) + chr(0b1100100) + chr(0b110011 + 0o62))('\165' + '\164' + '\146' + chr(0b101101) + chr(0b111000)))(hXMPsSrOQzbh)
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/kthread.py
KThread.__run
def __run(self): """Hacked run function, which installs the trace.""" sys.settrace(self.globaltrace) self.__run_backup() self.run = self.__run_backup
python
def __run(self): """Hacked run function, which installs the trace.""" sys.settrace(self.globaltrace) self.__run_backup() self.run = self.__run_backup
[ "def", "__run", "(", "self", ")", ":", "sys", ".", "settrace", "(", "self", ".", "globaltrace", ")", "self", ".", "__run_backup", "(", ")", "self", ".", "run", "=", "self", ".", "__run_backup" ]
Hacked run function, which installs the trace.
[ "Hacked", "run", "function", "which", "installs", "the", "trace", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/kthread.py#L49-L53
train
Hacked run function which installs the trace.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7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t9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(111) + chr(0b100000 + 0o25) + chr(1553 - 1502), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + chr(51) + chr(1362 - 1310), 0b1000), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(3805 - 3694) + chr(1332 - 1284), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(916 - 867) + chr(0b110110) + chr(2047 - 1998), 41045 - 41037), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\064' + chr(0b11000 + 0o30), ord("\x08")), nzTpIcepk0o8('\060' + chr(12153 - 12042) + chr(50) + chr(0b110110), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(0b10110 + 0o35) + chr(0b1010 + 0o46), 16121 - 16113), nzTpIcepk0o8(chr(2028 - 1980) + chr(111) + '\x31' + chr(1885 - 1834) + chr(537 - 488), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b100110 + 0o13) + '\x35' + '\060', 0o10), nzTpIcepk0o8('\x30' + chr(0b11101 + 0o122) + chr(123 - 70) + chr(843 - 790), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + chr(0b101100 + 0o7), 0b1000), nzTpIcepk0o8(chr(1552 - 1504) + chr(0b1101111) + chr(50) + chr(159 - 106) + '\x32', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\x31' + '\062', 0b1000), nzTpIcepk0o8(chr(160 - 112) + chr(111) + chr(50) + '\x36' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b100011 + 0o114) + chr(0b110001) + '\x33' + chr(2276 - 2226), 33099 - 33091), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + chr(48) + '\062', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1010001 + 0o36) + '\x31' + chr(0b101101 + 0o12) + '\x34', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2431 - 2380) + chr(0b110111) + '\x34', 50626 - 50618), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + chr(51) + chr(51), 0o10), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(7480 - 7369) + chr(0b1110 + 0o45) + '\061' + chr(0b110000), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(55) + '\062', 58102 - 58094), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2876 - 2821), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1100 + 0o143) + '\063' + '\066', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + '\061' + chr(0b101 + 0o54), 30611 - 30603), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\x6f' + '\063' + chr(0b110010) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1100010 + 0o15) + chr(0b101001 + 0o10) + chr(0b110010) + '\067', ord("\x08")), nzTpIcepk0o8('\x30' + chr(12276 - 12165) + '\x33' + chr(0b11 + 0o61), 0o10), nzTpIcepk0o8(chr(48) + chr(0b111010 + 0o65) + chr(0b101110 + 0o3) + chr(523 - 470) + '\x35', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\x30' + chr(5595 - 5484) + chr(0b110010) + '\x33' + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + '\x32' + '\066', 33996 - 33988), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(248 - 137) + chr(188 - 137) + chr(0b110001) + chr(781 - 730), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1100111 + 0o10) + '\063' + chr(0b110010) + chr(49), 0o10), nzTpIcepk0o8(chr(2195 - 2147) + chr(0b1000000 + 0o57) + '\x31' + chr(49) + chr(49), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2195 - 2146) + '\x36' + chr(48), 0b1000), nzTpIcepk0o8('\x30' + chr(0b11110 + 0o121) + '\x36' + chr(0b110100), 36446 - 36438), nzTpIcepk0o8(chr(48) + chr(170 - 59) + chr(51) + chr(0b1 + 0o66), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b101 + 0o56) + chr(1108 - 1059), 0b1000), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b1101111) + '\062' + chr(0b110000) + chr(0b11011 + 0o30), ord("\x08")), nzTpIcepk0o8(chr(1223 - 1175) + chr(5214 - 5103) + chr(50) + chr(0b110111) + '\x37', 30544 - 30536)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(111) + chr(0b110101) + chr(0b100 + 0o54), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x05'), chr(100) + chr(0b1011010 + 0o13) + '\143' + '\157' + chr(0b1100100) + '\145')(chr(0b1110101) + '\x74' + chr(0b10001 + 0o125) + '\x2d' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def zL1PYYd4pLEk(hXMPsSrOQzbh): roI3spqORKae(bpyfpu4kTbwL, roI3spqORKae(ES5oEprVxulp(b'X9t\x05Rw;<'), chr(0b111000 + 0o54) + '\145' + chr(0b1100011) + '\157' + chr(100) + chr(101))(chr(0b1110101) + chr(288 - 172) + chr(0b1100110) + '\055' + chr(56)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'L0o\x13Az,+\tNn'), '\x64' + chr(101) + chr(0b11001 + 0o112) + chr(0b1101111) + chr(9108 - 9008) + chr(101))('\x75' + chr(0b1100000 + 0o24) + chr(102) + chr(0b100011 + 0o12) + chr(553 - 497)))) roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'A\x1a7\x13Wx=,*\x1en\xc0'), chr(3782 - 3682) + '\145' + '\x63' + '\x6f' + '\x64' + chr(101))(chr(6050 - 5933) + '\x74' + chr(102) + chr(45) + '\070'))() hXMPsSrOQzbh.qnPOIdBQJdzY = hXMPsSrOQzbh.jF7bwneuB3ej
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/pympler/mprofile.py
MProfiler.codepoint_included
def codepoint_included(self, codepoint): """Check if codepoint matches any of the defined codepoints.""" if self.codepoints == None: return True for cp in self.codepoints: mismatch = False for i in range(len(cp)): if (cp[i] is not None) and (cp[i] != codepoint[i]): mismatch = True break if not mismatch: return True return False
python
def codepoint_included(self, codepoint): """Check if codepoint matches any of the defined codepoints.""" if self.codepoints == None: return True for cp in self.codepoints: mismatch = False for i in range(len(cp)): if (cp[i] is not None) and (cp[i] != codepoint[i]): mismatch = True break if not mismatch: return True return False
[ "def", "codepoint_included", "(", "self", ",", "codepoint", ")", ":", "if", "self", ".", "codepoints", "==", "None", ":", "return", "True", "for", "cp", "in", "self", ".", "codepoints", ":", "mismatch", "=", "False", "for", "i", "in", "range", "(", "len", "(", "cp", ")", ")", ":", "if", "(", "cp", "[", "i", "]", "is", "not", "None", ")", "and", "(", "cp", "[", "i", "]", "!=", "codepoint", "[", "i", "]", ")", ":", "mismatch", "=", "True", "break", "if", "not", "mismatch", ":", "return", "True", "return", "False" ]
Check if codepoint matches any of the defined codepoints.
[ "Check", "if", "codepoint", "matches", "any", "of", "the", "defined", "codepoints", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/mprofile.py#L49-L61
train
Check if codepoint is included in the current codepoints.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFa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q9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(111) + '\061' + chr(55) + chr(0b101 + 0o60), 43235 - 43227), nzTpIcepk0o8(chr(48) + chr(0b1101001 + 0o6) + '\x31' + chr(0b110110), 566 - 558), nzTpIcepk0o8(chr(0b1110 + 0o42) + '\x6f' + chr(0b1100 + 0o46) + '\066' + chr(48), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(1486 - 1437) + chr(0b100000 + 0o22) + '\064', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(2226 - 2176) + '\064' + chr(50), 61881 - 61873), nzTpIcepk0o8(chr(779 - 731) + chr(111) + chr(0b101011 + 0o7) + chr(0b10101 + 0o40) + chr(2671 - 2619), 0b1000), nzTpIcepk0o8(chr(1283 - 1235) + chr(7048 - 6937) + '\061' + chr(2676 - 2621), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + chr(52) + '\063', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + chr(0b10011 + 0o44) + chr(0b100000 + 0o24), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110000), 0b1000), nzTpIcepk0o8('\060' + chr(0b10010 + 0o135) + chr(0b10101 + 0o34) + chr(52) + '\x30', 24335 - 24327), nzTpIcepk0o8(chr(1877 - 1829) + chr(8959 - 8848) + chr(1577 - 1522) + '\065', 41705 - 41697), nzTpIcepk0o8(chr(1762 - 1714) + chr(0b110101 + 0o72) + chr(1359 - 1309) + chr(51) + chr(0b11100 + 0o27), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(0b110110) + chr(613 - 561), 51432 - 51424), nzTpIcepk0o8(chr(48) + chr(945 - 834) + chr(0b100010 + 0o21) + chr(52) + '\x30', 43201 - 43193), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + '\064', 50061 - 50053), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + chr(0b100001 + 0o20) + chr(1237 - 1182), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + '\064' + chr(52), 0o10), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(9509 - 9398) + '\x32' + chr(479 - 428) + chr(790 - 738), 0o10), nzTpIcepk0o8('\x30' + chr(11396 - 11285) + chr(0b110010) + chr(1003 - 952) + chr(0b11101 + 0o27), 8), nzTpIcepk0o8('\060' + '\x6f' + chr(559 - 507) + chr(0b1 + 0o63), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b100100 + 0o16) + '\x30', 18189 - 18181), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b10000 + 0o41) + chr(0b110111) + chr(0b110100), 8), nzTpIcepk0o8('\x30' + chr(111) + chr(0b1100 + 0o46) + chr(0b11110 + 0o26) + '\060', 0o10), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(7810 - 7699) + chr(49) + chr(263 - 211) + '\063', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x31' + chr(0b110000) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1000001 + 0o56) + chr(0b110010) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(2116 - 2068) + chr(0b1101111) + '\x32' + chr(73 - 21) + chr(0b110001), 40579 - 40571), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(48) + chr(2382 - 2329), 3863 - 3855), nzTpIcepk0o8(chr(0b110000) + chr(5648 - 5537) + chr(0b1111 + 0o44) + chr(0b1010 + 0o47) + chr(2112 - 2064), 0b1000), nzTpIcepk0o8('\060' + chr(6324 - 6213) + '\x31' + chr(0b110110) + chr(0b111 + 0o53), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + chr(0b110111) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(0b11111 + 0o120) + chr(0b110101 + 0o0) + '\x32', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b11101 + 0o25) + chr(54) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\x6f' + '\065' + chr(54), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(49) + chr(1844 - 1791) + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2077 - 2026) + '\x32' + chr(53), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1142 - 1091) + chr(825 - 777) + chr(0b110011), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(496 - 446) + chr(0b10011 + 0o37) + chr(0b110110), 23791 - 23783), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(111) + chr(68 - 19) + chr(55) + chr(0b110001), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(8030 - 7919) + chr(2201 - 2148) + chr(2136 - 2088), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'S'), '\144' + '\x65' + chr(0b1110 + 0o125) + '\157' + chr(0b1100100) + chr(101))(chr(117) + '\164' + '\x66' + chr(0b101101) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def DTamX2VFFu57(hXMPsSrOQzbh, BDoGyJWcapxi): if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x1ea\xd41\xd2\xc3f\xcd\x08s'), chr(0b1100100) + chr(3753 - 3652) + chr(0b1100011) + chr(2323 - 2212) + chr(0b1100100) + '\145')(chr(7322 - 7205) + '\164' + '\146' + '\055' + chr(910 - 854))) is None: return nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b111 + 0o52), ord("\x08")) for qVRzukfNtlOc in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x1ea\xd41\xd2\xc3f\xcd\x08s'), chr(0b110010 + 0o62) + chr(1538 - 1437) + chr(99) + '\x6f' + chr(185 - 85) + chr(460 - 359))(chr(0b1110101) + chr(0b1100011 + 0o21) + '\146' + '\x2d' + '\x38')): vG_D5BqM4zEY = nzTpIcepk0o8('\x30' + chr(0b1000001 + 0o56) + chr(996 - 948), 8) for ZlbFMSG8gCoF in bbT2xIe5pzk7(ftfygxgFas5X(qVRzukfNtlOc)): if qVRzukfNtlOc[ZlbFMSG8gCoF] is not None and qVRzukfNtlOc[ZlbFMSG8gCoF] != BDoGyJWcapxi[ZlbFMSG8gCoF]: vG_D5BqM4zEY = nzTpIcepk0o8('\x30' + '\x6f' + '\061', 8) break if not vG_D5BqM4zEY: return nzTpIcepk0o8(chr(0b1 + 0o57) + '\x6f' + '\061', 8) return nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x30', 8)
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/pympler/mprofile.py
MProfiler.profile
def profile(self, frame, event, arg): #PYCHOK arg requ. to match signature """Profiling method used to profile matching codepoints and events.""" if (self.events == None) or (event in self.events): frame_info = inspect.getframeinfo(frame) cp = (frame_info[0], frame_info[2], frame_info[1]) if self.codepoint_included(cp): objects = muppy.get_objects() size = muppy.get_size(objects) if cp not in self.memories: self.memories[cp] = [0,0,0,0] self.memories[cp][0] = 1 self.memories[cp][1] = size self.memories[cp][2] = size else: self.memories[cp][0] += 1 if self.memories[cp][1] > size: self.memories[cp][1] = size if self.memories[cp][2] < size: self.memories[cp][2] = size
python
def profile(self, frame, event, arg): #PYCHOK arg requ. to match signature """Profiling method used to profile matching codepoints and events.""" if (self.events == None) or (event in self.events): frame_info = inspect.getframeinfo(frame) cp = (frame_info[0], frame_info[2], frame_info[1]) if self.codepoint_included(cp): objects = muppy.get_objects() size = muppy.get_size(objects) if cp not in self.memories: self.memories[cp] = [0,0,0,0] self.memories[cp][0] = 1 self.memories[cp][1] = size self.memories[cp][2] = size else: self.memories[cp][0] += 1 if self.memories[cp][1] > size: self.memories[cp][1] = size if self.memories[cp][2] < size: self.memories[cp][2] = size
[ "def", "profile", "(", "self", ",", "frame", ",", "event", ",", "arg", ")", ":", "#PYCHOK arg requ. to match signature", "if", "(", "self", ".", "events", "==", "None", ")", "or", "(", "event", "in", "self", ".", "events", ")", ":", "frame_info", "=", "inspect", ".", "getframeinfo", "(", "frame", ")", "cp", "=", "(", "frame_info", "[", "0", "]", ",", "frame_info", "[", "2", "]", ",", "frame_info", "[", "1", "]", ")", "if", "self", ".", "codepoint_included", "(", "cp", ")", ":", "objects", "=", "muppy", ".", "get_objects", "(", ")", "size", "=", "muppy", ".", "get_size", "(", "objects", ")", "if", "cp", "not", "in", "self", ".", "memories", ":", "self", ".", "memories", "[", "cp", "]", "=", "[", "0", ",", "0", ",", "0", ",", "0", "]", "self", ".", "memories", "[", "cp", "]", "[", "0", "]", "=", "1", "self", ".", "memories", "[", "cp", "]", "[", "1", "]", "=", "size", "self", ".", "memories", "[", "cp", "]", "[", "2", "]", "=", "size", "else", ":", "self", ".", "memories", "[", "cp", "]", "[", "0", "]", "+=", "1", "if", "self", ".", "memories", "[", "cp", "]", "[", "1", "]", ">", "size", ":", "self", ".", "memories", "[", "cp", "]", "[", "1", "]", "=", "size", "if", "self", ".", "memories", "[", "cp", "]", "[", "2", "]", "<", "size", ":", "self", ".", "memories", "[", "cp", "]", "[", "2", "]", "=", "size" ]
Profiling method used to profile matching codepoints and events.
[ "Profiling", "method", "used", "to", "profile", "matching", "codepoints", "and", "events", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/mprofile.py#L63-L81
train
Profiling method used to profile matching codepoints and events.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKpyPtQ,z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,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(111) + '\x32' + chr(51) + chr(0b110001 + 0o0), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(1812 - 1761) + chr(0b110101) + chr(0b110111), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + chr(0b110101) + chr(0b1 + 0o62), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b0 + 0o157) + chr(0b110011) + chr(52) + '\x34', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(1549 - 1497) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + '\062' + chr(0b101100 + 0o12), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2249 - 2199) + chr(1325 - 1273) + chr(51), 58932 - 58924), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(401 - 290) + '\x32' + chr(957 - 909) + chr(0b100100 + 0o17), 47859 - 47851), nzTpIcepk0o8('\x30' + '\157' + chr(0b1100 + 0o47) + chr(0b11111 + 0o24) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(1613 - 1565) + '\157' + chr(0b110010) + '\x32' + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(7198 - 7087) + chr(0b100110 + 0o14) + '\062' + '\x34', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x34' + chr(1419 - 1365), 0b1000), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(7764 - 7653) + '\x33' + '\064' + '\x34', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1100011 + 0o14) + chr(1095 - 1045) + chr(0b110000) + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + '\x30' + '\064', ord("\x08")), nzTpIcepk0o8('\060' + chr(2035 - 1924) + '\x32' + chr(53) + chr(1514 - 1462), 59055 - 59047), nzTpIcepk0o8(chr(48) + chr(0b1000011 + 0o54) + chr(0b110001) + '\x34' + chr(55), 36670 - 36662), nzTpIcepk0o8(chr(1224 - 1176) + chr(111) + '\063' + '\061' + '\x30', 62232 - 62224), nzTpIcepk0o8(chr(48) + chr(10928 - 10817) + '\x31' + '\x30', 0o10), nzTpIcepk0o8('\x30' + chr(9014 - 8903) + '\x33' + '\x36' + chr(1199 - 1146), ord("\x08")), nzTpIcepk0o8(chr(161 - 113) + chr(111) + chr(51) + '\x33' + chr(55), 0o10), nzTpIcepk0o8(chr(2087 - 2039) + chr(0b1001110 + 0o41) + chr(1811 - 1760) + '\x31' + chr(1595 - 1547), 8), nzTpIcepk0o8(chr(476 - 428) + chr(111) + chr(2063 - 2014) + chr(0b110111) + chr(49), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + '\x33' + chr(0b110100), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(218 - 168) + '\x31' + chr(51), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\061' + '\x33' + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + chr(49) + '\x34' + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x37' + chr(0b110100), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\063' + '\063' + chr(0b111 + 0o56), 0o10), nzTpIcepk0o8('\x30' + chr(4340 - 4229) + '\065' + chr(0b101111 + 0o4), 50910 - 50902), nzTpIcepk0o8('\x30' + chr(0b1000101 + 0o52) + chr(50) + '\066' + chr(2521 - 2467), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(616 - 505) + chr(735 - 684) + chr(0b110000) + chr(612 - 557), 55900 - 55892), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(49) + chr(0b100111 + 0o14), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(0b110010) + chr(52), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b100010 + 0o115) + chr(0b100001 + 0o22) + '\x35' + chr(946 - 892), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(0b10011 + 0o37) + chr(0b1111 + 0o45), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10010 + 0o37) + '\x30' + '\x33', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(0b110101) + '\x36', 51470 - 51462), nzTpIcepk0o8(chr(1940 - 1892) + '\x6f' + chr(1138 - 1089) + '\064' + chr(2039 - 1991), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + '\064' + chr(0b1000 + 0o56), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(786 - 738) + '\x6f' + chr(0b110101) + chr(0b110000), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xb7'), chr(0b111111 + 0o45) + '\x65' + chr(0b1011111 + 0o4) + chr(111) + chr(3143 - 3043) + '\145')(chr(10960 - 10843) + '\x74' + chr(874 - 772) + '\x2d' + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def nQ8dle22Rrpj(hXMPsSrOQzbh, KZ4ew2qs1HTO, D4ybylS07yGH, S6EI_gyMl2nC): if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xef\x9b\xe2\xd1\xb0\xc6\xee\xcc\x82\xda\xa0d'), '\x64' + chr(5195 - 5094) + '\x63' + chr(111) + chr(0b110000 + 0o64) + '\x65')(chr(117) + chr(0b1001101 + 0o47) + chr(0b1100110) + chr(0b101101) + '\070')) is None or D4ybylS07yGH in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xef\x9b\xe2\xd1\xb0\xc6\xee\xcc\x82\xda\xa0d'), chr(4814 - 4714) + chr(0b100000 + 0o105) + chr(0b1100011) + chr(0b1101010 + 0o5) + '\144' + chr(0b1100101))(chr(1020 - 903) + '\164' + '\x66' + chr(0b1100 + 0o41) + chr(0b100001 + 0o27))): JaYdO7vsQjJS = fqyA_Zm6qdLB.getframeinfo(KZ4ew2qs1HTO) qVRzukfNtlOc = (JaYdO7vsQjJS[nzTpIcepk0o8(chr(1198 - 1150) + '\157' + chr(568 - 520), 0b1000)], JaYdO7vsQjJS[nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062', 0b1000)], JaYdO7vsQjJS[nzTpIcepk0o8('\060' + chr(3778 - 3667) + chr(0b1010 + 0o47), 0b1000)]) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xfa\x80\xcf\x81\x95\xf9\xca\xed\xac\xca\xfdH\x87\xec\xb1\xc8\x02\xac'), chr(0b1100100) + '\x65' + chr(0b1 + 0o142) + '\157' + '\144' + chr(101))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(45) + '\x38'))(qVRzukfNtlOc): unFw4B5pa4XN = r2192KZcn6mq.get_objects() e1HrJaQHACnl = r2192KZcn6mq.get_size(unFw4B5pa4XN) if qVRzukfNtlOc not in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf4\x8a\xc6\x8b\x97\xff\xc6\xf0'), chr(100) + chr(0b1000 + 0o135) + chr(1869 - 1770) + chr(0b1101111) + '\x64' + '\145')(chr(117) + chr(9907 - 9791) + chr(0b1100110) + chr(45) + '\070')): hXMPsSrOQzbh.tBIOG0sI9vxf[qVRzukfNtlOc] = [nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1101111) + '\x30', 8), nzTpIcepk0o8(chr(0b110000) + chr(5997 - 5886) + chr(2084 - 2036), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1001011 + 0o44) + chr(0b11110 + 0o22), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(110 - 62), 8)] hXMPsSrOQzbh.tBIOG0sI9vxf[qVRzukfNtlOc][nzTpIcepk0o8('\x30' + chr(7871 - 7760) + chr(48), 8)] = nzTpIcepk0o8('\060' + chr(0b10011 + 0o134) + chr(748 - 699), 8) hXMPsSrOQzbh.tBIOG0sI9vxf[qVRzukfNtlOc][nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(3368 - 3257) + chr(0b110001), 8)] = e1HrJaQHACnl hXMPsSrOQzbh.tBIOG0sI9vxf[qVRzukfNtlOc][nzTpIcepk0o8(chr(0b0 + 0o60) + chr(3506 - 3395) + chr(1409 - 1359), 8)] = e1HrJaQHACnl else: hXMPsSrOQzbh.tBIOG0sI9vxf[qVRzukfNtlOc][nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(111) + chr(0b101100 + 0o4), 8)] += nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001), 8) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xed\xad\xe2\xab\xa2\xa6\xd0\xca\xe1\xe3\xec@'), chr(0b11111 + 0o105) + chr(0b111110 + 0o47) + chr(1459 - 1360) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(0b10 + 0o163) + '\x74' + '\x66' + chr(45) + '\070'))[qVRzukfNtlOc][nzTpIcepk0o8('\060' + chr(111) + '\x31', 8)] > e1HrJaQHACnl: hXMPsSrOQzbh.tBIOG0sI9vxf[qVRzukfNtlOc][nzTpIcepk0o8(chr(0b11011 + 0o25) + '\157' + chr(1788 - 1739), 8)] = e1HrJaQHACnl if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xed\xad\xe2\xab\xa2\xa6\xd0\xca\xe1\xe3\xec@'), chr(0b1100100) + chr(0b101101 + 0o70) + '\x63' + '\157' + chr(7724 - 7624) + '\145')('\165' + chr(116) + chr(102) + chr(0b101101) + chr(0b111000)))[qVRzukfNtlOc][nzTpIcepk0o8('\060' + '\x6f' + '\x32', 8)] < e1HrJaQHACnl: hXMPsSrOQzbh.tBIOG0sI9vxf[qVRzukfNtlOc][nzTpIcepk0o8('\x30' + '\x6f' + chr(50), 8)] = e1HrJaQHACnl
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/functionprofiler.py
runprofile
def runprofile(mainfunction, output, timeout = 0, calibrate=False): ''' Run the functions profiler and save the result If timeout is greater than 0, the profile will automatically stops after timeout seconds ''' if noprofiler == True: print('ERROR: profiler and/or pstats library missing ! Please install it (probably package named python-profile) before running a profiling !') return False # This is the main function for profiling def _profile(): profile.run(mainfunction, output) print('=> RUNNING FUNCTIONS PROFILER\n\n'); sys.stdout.flush(); # Calibrate the profiler (only use this if the profiler produces some funny stuff, but calibration can also produce even more funny stuff with the latest cProfile of Python v2.7! So you should only enable calibration if necessary) if calibrate: print('Calibrating the profiler...'); sys.stdout.flush(); cval = calibrateprofile() print('Calibration found value : %s' % cval); sys.stdout.flush(); print('Initializing the profiler...'); sys.stdout.flush(); # Run in timeout mode (if the function cannot ends by itself, this is the best mode: the function must ends for the profile to be saved) if timeout > 0: pthread = KThread(target=_profile) # we open the function with the profiler, in a special killable thread (see below why) print('Will now run the profiling and terminate it in %s seconds. Results will be saved in %s' % (str(timeout), str(output))); sys.stdout.flush(); print('\nCountdown:'); sys.stdout.flush(); for i in range(0,5): print(str(5-i)) sys.stdout.flush() time.sleep(1) print('0\nStarting to profile...'); sys.stdout.flush(); pthread.start() # starting the thread time.sleep(float(timeout)) # after this amount of seconds, the thread gets killed and the profiler will end its job print('\n\nFinishing the profile and saving to the file %s' % str(output)); sys.stdout.flush(); pthread.kill() # we must end the main function in order for the profiler to output its results (if we didn't launch a thread and just closed the process, it would have done no result) # Run in full length mode (we run the function until it ends) else: print("Running the profiler, please wait until the process terminates by itself (if you forcequit before, the profile won't be saved)") _profile() print('=> Functions Profile done !') return True
python
def runprofile(mainfunction, output, timeout = 0, calibrate=False): ''' Run the functions profiler and save the result If timeout is greater than 0, the profile will automatically stops after timeout seconds ''' if noprofiler == True: print('ERROR: profiler and/or pstats library missing ! Please install it (probably package named python-profile) before running a profiling !') return False # This is the main function for profiling def _profile(): profile.run(mainfunction, output) print('=> RUNNING FUNCTIONS PROFILER\n\n'); sys.stdout.flush(); # Calibrate the profiler (only use this if the profiler produces some funny stuff, but calibration can also produce even more funny stuff with the latest cProfile of Python v2.7! So you should only enable calibration if necessary) if calibrate: print('Calibrating the profiler...'); sys.stdout.flush(); cval = calibrateprofile() print('Calibration found value : %s' % cval); sys.stdout.flush(); print('Initializing the profiler...'); sys.stdout.flush(); # Run in timeout mode (if the function cannot ends by itself, this is the best mode: the function must ends for the profile to be saved) if timeout > 0: pthread = KThread(target=_profile) # we open the function with the profiler, in a special killable thread (see below why) print('Will now run the profiling and terminate it in %s seconds. Results will be saved in %s' % (str(timeout), str(output))); sys.stdout.flush(); print('\nCountdown:'); sys.stdout.flush(); for i in range(0,5): print(str(5-i)) sys.stdout.flush() time.sleep(1) print('0\nStarting to profile...'); sys.stdout.flush(); pthread.start() # starting the thread time.sleep(float(timeout)) # after this amount of seconds, the thread gets killed and the profiler will end its job print('\n\nFinishing the profile and saving to the file %s' % str(output)); sys.stdout.flush(); pthread.kill() # we must end the main function in order for the profiler to output its results (if we didn't launch a thread and just closed the process, it would have done no result) # Run in full length mode (we run the function until it ends) else: print("Running the profiler, please wait until the process terminates by itself (if you forcequit before, the profile won't be saved)") _profile() print('=> Functions Profile done !') return True
[ "def", "runprofile", "(", "mainfunction", ",", "output", ",", "timeout", "=", "0", ",", "calibrate", "=", "False", ")", ":", "if", "noprofiler", "==", "True", ":", "print", "(", "'ERROR: profiler and/or pstats library missing ! Please install it (probably package named python-profile) before running a profiling !'", ")", "return", "False", "# This is the main function for profiling", "def", "_profile", "(", ")", ":", "profile", ".", "run", "(", "mainfunction", ",", "output", ")", "print", "(", "'=> RUNNING FUNCTIONS PROFILER\\n\\n'", ")", "sys", ".", "stdout", ".", "flush", "(", ")", "# Calibrate the profiler (only use this if the profiler produces some funny stuff, but calibration can also produce even more funny stuff with the latest cProfile of Python v2.7! So you should only enable calibration if necessary)", "if", "calibrate", ":", "print", "(", "'Calibrating the profiler...'", ")", "sys", ".", "stdout", ".", "flush", "(", ")", "cval", "=", "calibrateprofile", "(", ")", "print", "(", "'Calibration found value : %s'", "%", "cval", ")", "sys", ".", "stdout", ".", "flush", "(", ")", "print", "(", "'Initializing the profiler...'", ")", "sys", ".", "stdout", ".", "flush", "(", ")", "# Run in timeout mode (if the function cannot ends by itself, this is the best mode: the function must ends for the profile to be saved)", "if", "timeout", ">", "0", ":", "pthread", "=", "KThread", "(", "target", "=", "_profile", ")", "# we open the function with the profiler, in a special killable thread (see below why)", "print", "(", "'Will now run the profiling and terminate it in %s seconds. Results will be saved in %s'", "%", "(", "str", "(", "timeout", ")", ",", "str", "(", "output", ")", ")", ")", "sys", ".", "stdout", ".", "flush", "(", ")", "print", "(", "'\\nCountdown:'", ")", "sys", ".", "stdout", ".", "flush", "(", ")", "for", "i", "in", "range", "(", "0", ",", "5", ")", ":", "print", "(", "str", "(", "5", "-", "i", ")", ")", "sys", ".", "stdout", ".", "flush", "(", ")", "time", ".", "sleep", "(", "1", ")", "print", "(", "'0\\nStarting to profile...'", ")", "sys", ".", "stdout", ".", "flush", "(", ")", "pthread", ".", "start", "(", ")", "# starting the thread", "time", ".", "sleep", "(", "float", "(", "timeout", ")", ")", "# after this amount of seconds, the thread gets killed and the profiler will end its job", "print", "(", "'\\n\\nFinishing the profile and saving to the file %s'", "%", "str", "(", "output", ")", ")", "sys", ".", "stdout", ".", "flush", "(", ")", "pthread", ".", "kill", "(", ")", "# we must end the main function in order for the profiler to output its results (if we didn't launch a thread and just closed the process, it would have done no result)", "# Run in full length mode (we run the function until it ends)", "else", ":", "print", "(", "\"Running the profiler, please wait until the process terminates by itself (if you forcequit before, the profile won't be saved)\"", ")", "_profile", "(", ")", "print", "(", "'=> Functions Profile done !'", ")", "return", "True" ]
Run the functions profiler and save the result If timeout is greater than 0, the profile will automatically stops after timeout seconds
[ "Run", "the", "functions", "profiler", "and", "save", "the", "result", "If", "timeout", "is", "greater", "than", "0", "the", "profile", "will", "automatically", "stops", "after", "timeout", "seconds" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/functionprofiler.py#L52-L89
train
Runs profiling and saves the result in a file.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXI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LAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(111) + chr(51) + '\x37' + '\x32', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(2179 - 2126) + chr(49), 59790 - 59782), nzTpIcepk0o8('\060' + chr(971 - 860) + chr(0b101000 + 0o12) + '\x34' + '\x30', 23666 - 23658), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(4524 - 4413) + chr(55) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(0b1111 + 0o45) + chr(51), 28917 - 28909), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(0b1011 + 0o51) + chr(0b110010 + 0o1), 0b1000), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(10134 - 10023) + chr(949 - 900) + chr(0b110010) + chr(53), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b11100 + 0o123) + '\x31' + chr(52) + chr(0b11111 + 0o23), 0b1000), nzTpIcepk0o8('\060' + chr(10078 - 9967) + chr(305 - 253) + chr(1281 - 1227), 62242 - 62234), nzTpIcepk0o8('\x30' + '\157' + chr(53) + chr(0b100100 + 0o20), 43792 - 43784), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b100110 + 0o21) + chr(0b100101 + 0o13), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100001 + 0o22) + chr(55) + chr(2442 - 2387), 19225 - 19217), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(0b110000) + chr(55), 25143 - 25135), nzTpIcepk0o8(chr(2284 - 2236) + chr(0b1 + 0o156) + chr(50) + chr(0b10111 + 0o40) + '\063', 20732 - 20724), nzTpIcepk0o8(chr(196 - 148) + chr(0b1101111) + chr(53) + chr(0b10000 + 0o43), 25231 - 25223), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + '\x33' + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + chr(2253 - 2201) + '\x32', 7592 - 7584), nzTpIcepk0o8(chr(79 - 31) + chr(0b1101001 + 0o6) + chr(0b100 + 0o55) + chr(0b10101 + 0o33) + chr(2223 - 2168), 0o10), nzTpIcepk0o8('\060' + chr(11184 - 11073) + chr(515 - 466) + '\060' + chr(1403 - 1349), 0o10), nzTpIcepk0o8(chr(48) + chr(0b11110 + 0o121) + chr(0b10101 + 0o35) + chr(48) + '\x36', 47703 - 47695), nzTpIcepk0o8(chr(48) + '\x6f' + chr(105 - 55) + chr(0b110111), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110111) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(374 - 325) + chr(0b10 + 0o65) + chr(0b101 + 0o55), 0b1000), nzTpIcepk0o8(chr(0b101 + 0o53) + '\157' + chr(0b110010) + chr(0b101110 + 0o10) + chr(55), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + chr(55) + '\x33', 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(0b110110) + chr(2293 - 2241), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x34' + chr(0b110001 + 0o0), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + chr(0b100110 + 0o21) + chr(0b110010 + 0o2), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10101 + 0o40) + chr(51), 8), nzTpIcepk0o8('\060' + '\157' + chr(0b101011 + 0o10) + '\x34' + '\065', 46449 - 46441), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x36', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(2179 - 2130) + chr(745 - 690) + '\064', 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10011 + 0o37) + chr(0b101111 + 0o3) + chr(1312 - 1264), 0o10), nzTpIcepk0o8(chr(0b10 + 0o56) + '\157' + '\x36' + chr(1546 - 1495), 0b1000), nzTpIcepk0o8(chr(48) + chr(11982 - 11871) + '\x31' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(1383 - 1335) + '\x6f' + chr(0b110010) + chr(2684 - 2629) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1010110 + 0o31) + '\061' + chr(49) + chr(50), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + '\063' + chr(54), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(1884 - 1831) + chr(1609 - 1558), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(509 - 459) + chr(49) + '\062', 63378 - 63370)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(2048 - 2000) + chr(0b1011001 + 0o26) + '\065' + chr(1197 - 1149), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd4'), chr(100) + chr(0b100011 + 0o102) + chr(0b1100011) + chr(8332 - 8221) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + '\x74' + '\x66' + '\x2d' + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def XUajM2ZqQ0Vc(atrFn_O0uaxV, toKQXlEvBKaK, ACACUUFQsMpr=nzTpIcepk0o8('\x30' + chr(111) + '\x30', ord("\x08")), zRBUec4_rEnv=nzTpIcepk0o8('\x30' + chr(111) + '\x30', 8)): if LLrLEH_DLkyH: v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\xbf{\xf2w1\xd9u\x12TC^\x96\xeb\xdeY\xb8\xc3)"\xa9xLZ\xc7\xc8\xc0@\x08X\xc5j\x15\xf2Aj\xca3\xfeF\xe3\x89Z\xc9V\x04\xc3tBv@]\x9e\xf4\xde\x0b\xf1\xcc42\xe7{RZ\xde\xcf\x94\t\x0cY\x8ad\x1d\xf2_r\x98:\xbfH\xe1\x9bN\xc5\x18\r\x828\x07B\x0cH\x86\xf3\xd3D\xf6\x8f74\xe9qW\x16\xd2\x92\x94C\x19M\x8at\x19\xb0A~\xd6$\xb7E\xed\xdaH\x80H\x11\x8c3\x0bJEV\x98\xa7\x9a'), chr(0b1100100) + chr(6838 - 6737) + chr(8759 - 8660) + '\157' + '\144' + '\145')(chr(117) + chr(0b1000101 + 0o57) + '\x66' + chr(0b101011 + 0o2) + chr(1193 - 1137))) return nzTpIcepk0o8(chr(2282 - 2234) + chr(9825 - 9714) + chr(1293 - 1245), 8) def uJrjep0Dwwjo(): roI3spqORKae(nQ8dle22Rrpj, roI3spqORKae(ES5oEprVxulp(b'\x8bG\xf0w*\x87\x173lHB\xa6'), chr(0b101111 + 0o65) + '\x65' + '\x63' + chr(7695 - 7584) + chr(0b1100100) + chr(101))(chr(0b1110101) + chr(7418 - 7302) + chr(7165 - 7063) + chr(0b101101) + chr(56)))(atrFn_O0uaxV, toKQXlEvBKaK) v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\xc7\x17\x80j6\xad\x1b+hk\x18\xb9\xd2\xf5h\xcc\xeb\x08\x08\xd57n(\xf8\xfd\xfdm9y\xef\x0c'), chr(0b11 + 0o141) + '\145' + '\143' + '\157' + '\144' + '\145')(chr(0b1110101) + chr(0b1110100) + chr(5897 - 5795) + chr(0b11000 + 0o25) + '\x38')) roI3spqORKae(bpyfpu4kTbwL.stdout, roI3spqORKae(ES5oEprVxulp(b'\x91~\xd0A!\x91\x035d\\K\xba'), chr(544 - 444) + chr(101) + chr(0b1100011) + chr(3753 - 3642) + chr(0b100101 + 0o77) + chr(0b1100101))(chr(117) + '\x74' + chr(0b1100110) + '\055' + chr(56)))() if zRBUec4_rEnv: v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\xb9H\xccQ\x01\x914\x16OB_\xdf\xf3\xd3N\xb8\xd25)\xe0~R\x1f\xc5\x95\x9a\x0f'), '\x64' + chr(7538 - 7437) + chr(0b100000 + 0o103) + chr(0b110000 + 0o77) + chr(0b1100100) + '\x65')('\165' + '\x74' + chr(7845 - 7743) + chr(155 - 110) + chr(2071 - 2015))) roI3spqORKae(bpyfpu4kTbwL.stdout, roI3spqORKae(ES5oEprVxulp(b'\x91~\xd0A!\x91\x035d\\K\xba'), '\144' + '\145' + '\x63' + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(2203 - 2086) + chr(116) + chr(0b1100110) + '\x2d' + '\x38'))() z0tNQNYWD5Vh = VVbr31qxny4U() v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\xb9H\xccQ\x01\x914\x16OCV\xdf\xe1\xd4^\xf6\xc6g0\xe7{K\x1f\x97\x81\x94\x04\x0f'), chr(0b111100 + 0o50) + '\145' + chr(6401 - 6302) + '\157' + chr(100) + chr(237 - 136))('\165' + chr(13287 - 13171) + chr(0b1001000 + 0o36) + '\x2d' + chr(0b111000)) % z0tNQNYWD5Vh) roI3spqORKae(bpyfpu4kTbwL.stdout, roI3spqORKae(ES5oEprVxulp(b'\x91~\xd0A!\x91\x035d\\K\xba'), chr(0b111011 + 0o51) + chr(101) + chr(99) + '\157' + chr(8917 - 8817) + '\x65')(chr(117) + chr(116) + '\146' + chr(1956 - 1911) + chr(0b111000)))() v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\xb3G\xc9L\n\x829\x0b\\EV\x98\xa7\xcfC\xfd\x8274\xe9qW\x16\xd2\xc9\x9a\x0fR'), chr(850 - 750) + '\145' + '\x63' + chr(0b10011 + 0o134) + chr(7005 - 6905) + chr(0b101100 + 0o71))('\165' + chr(3366 - 3250) + chr(0b1 + 0o145) + chr(45) + '\070')) roI3spqORKae(bpyfpu4kTbwL.stdout, roI3spqORKae(ES5oEprVxulp(b'\x91~\xd0A!\x91\x035d\\K\xba'), chr(552 - 452) + '\145' + chr(0b1100011) + chr(0b111010 + 0o65) + '\144' + '\145')('\165' + '\164' + '\x66' + chr(401 - 356) + '\070'))() if ACACUUFQsMpr > nzTpIcepk0o8('\060' + '\x6f' + '\x30', 8): icOGRATL4kRC = iTO8DIrdwljJ(target=uJrjep0Dwwjo) v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\xad@\xccTC\x8d:\x15\x06^M\x91\xa7\xcfC\xfd\x8274\xe9qW\x16\xde\xd5\xd3\x01\x1dE\x81&\x08\xf5Af\xd1$\xbf_\xef\xda@\xd4\x18\n\x8duGU\x0cK\x9a\xe4\xd4E\xfc\xd1if\xd4rM\x0f\xdb\xcf\xc7\x01\x0bB\x89j\\\xf2V+\xcb+\xa8N\xee\xda@\xce\x18F\x90'), '\144' + '\x65' + chr(0b1100011) + chr(0b1001010 + 0o45) + chr(4371 - 4271) + chr(2218 - 2117))(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(0b1011 + 0o42) + '\070') % (N9zlRy29S1SS(ACACUUFQsMpr), N9zlRy29S1SS(toKQXlEvBKaK))) roI3spqORKae(bpyfpu4kTbwL.stdout, roI3spqORKae(ES5oEprVxulp(b'\x91~\xd0A!\x91\x035d\\K\xba'), chr(0b1100100) + '\x65' + '\143' + '\157' + chr(100) + '\x65')('\165' + '\164' + '\x66' + chr(0b100111 + 0o6) + chr(56)))() v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\xf0j\xcfM\r\x971\rQB\x02'), chr(0b1100100) + '\x65' + chr(99) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(0b1000 + 0o155) + chr(116) + chr(0b1100110) + chr(0b101101) + chr(2862 - 2806))) roI3spqORKae(bpyfpu4kTbwL.stdout, roI3spqORKae(ES5oEprVxulp(b'\x91~\xd0A!\x91\x035d\\K\xba'), chr(100) + '\x65' + chr(99) + chr(0b1101111) + chr(100) + chr(1655 - 1554))(chr(117) + chr(8255 - 8139) + '\x66' + '\055' + chr(0b111000)))() for ZlbFMSG8gCoF in bbT2xIe5pzk7(nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1049 - 1001), 8), nzTpIcepk0o8('\060' + '\x6f' + chr(53), 25580 - 25572)): v8jsMqaYV6U2(N9zlRy29S1SS(nzTpIcepk0o8('\060' + '\157' + '\065', 8) - ZlbFMSG8gCoF)) roI3spqORKae(bpyfpu4kTbwL.stdout, roI3spqORKae(ES5oEprVxulp(b'\x91~\xd0A!\x91\x035d\\K\xba'), chr(472 - 372) + chr(2171 - 2070) + chr(717 - 618) + chr(111) + chr(9907 - 9807) + '\145')(chr(117) + '\164' + chr(102) + chr(0b11 + 0o52) + chr(56)))() roI3spqORKae(oprIvDIRQyCb, roI3spqORKae(ES5oEprVxulp(b'\x89E\xc5]\x13'), chr(0b111 + 0o135) + '\x65' + chr(99) + chr(0b1101111) + chr(5150 - 5050) + '\145')(chr(117) + '\164' + chr(9152 - 9050) + '\055' + '\070'))(nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001), ord("\x08"))) v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\xca#\xf3L\x02\x91!\x0bHK\x18\x8b\xe8\x9b[\xea\xcd!/\xear\x10T\x99'), '\x64' + '\x65' + chr(3957 - 3858) + chr(111) + chr(775 - 675) + '\x65')(chr(10570 - 10453) + chr(4031 - 3915) + '\x66' + '\x2d' + chr(0b100001 + 0o27))) roI3spqORKae(bpyfpu4kTbwL.stdout, roI3spqORKae(ES5oEprVxulp(b'\x91~\xd0A!\x91\x035d\\K\xba'), chr(5133 - 5033) + chr(0b1100101) + '\143' + chr(0b1101111) + chr(0b1100100) + '\x65')('\165' + '\164' + chr(0b1100110) + chr(0b101101) + chr(56)))() roI3spqORKae(icOGRATL4kRC, roI3spqORKae(ES5oEprVxulp(b'\xb1x\xc2p%\xb76\x0ey`s\x86'), chr(0b1010101 + 0o17) + '\x65' + '\143' + '\157' + '\144' + chr(10006 - 9905))(chr(0b1110101) + chr(12785 - 12669) + chr(0b101101 + 0o71) + '\055' + chr(0b1101 + 0o53)))() roI3spqORKae(oprIvDIRQyCb, roI3spqORKae(ES5oEprVxulp(b'\x89E\xc5]\x13'), chr(100) + '\x65' + chr(8398 - 8299) + chr(11966 - 11855) + chr(0b1111 + 0o125) + chr(4790 - 4689))(chr(0b1110101) + chr(12594 - 12478) + chr(168 - 66) + chr(0b10011 + 0o32) + chr(0b111000)))(jLW6pRf2DSRk(ACACUUFQsMpr)) v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\xf0#\xe6Q\r\x8a&\nOB_\xdf\xf3\xd3N\xb8\xd25)\xe0~R\x1f\x97\xda\xdaE\\X\x84p\x15\xfeT+\xcc%\xfe_\xe2\x9f\t\xc6Q\x0f\x86uGU'), '\x64' + '\145' + '\143' + chr(4864 - 4753) + chr(0b110110 + 0o56) + chr(0b110001 + 0o64))('\165' + chr(116) + '\146' + '\055' + chr(0b111000)) % N9zlRy29S1SS(toKQXlEvBKaK)) roI3spqORKae(bpyfpu4kTbwL.stdout, roI3spqORKae(ES5oEprVxulp(b'\x91~\xd0A!\x91\x035d\\K\xba'), chr(100) + chr(0b1000001 + 0o44) + '\143' + chr(8054 - 7943) + chr(100) + '\x65')(chr(117) + chr(175 - 59) + '\146' + chr(45) + chr(1405 - 1349)))() roI3spqORKae(icOGRATL4kRC, roI3spqORKae(ES5oEprVxulp(b'\x91@\xccT'), chr(0b111010 + 0o52) + chr(0b1100101) + '\x63' + chr(0b11010 + 0o125) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(116) + '\x66' + '\x2d' + '\x38'))() else: v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b"\xa8\\\xceV\n\x8d2BRD]\xdf\xf7\xc9D\xfe\xcb+#\xf4;\x1e\n\xdb\xde\xd5R\x19\x0b\x92g\x15\xe4\x13~\xd6>\xb7G\xaa\x8eA\xc5\x18\x13\x91:\x01C_K\xdf\xf3\xdeY\xf5\xcb)'\xf2rMZ\xd5\xc2\x94H\x08X\x80j\x1a\xb0\x1bb\xdej\xa7D\xff\xdaO\xcfJ\x00\x86$\x17OX\x18\x9d\xe2\xddD\xea\xc7kf\xf2\x7f[Z\xc7\xc9\xdbG\x15G\x80&\x0b\xff],\xccj\xbcN\xaa\x89H\xd6]\x07\xca"), chr(100) + chr(0b1000100 + 0o41) + chr(0b1100011) + chr(2035 - 1924) + chr(0b1100100) + chr(0b11000 + 0o115))('\x75' + '\164' + chr(0b11110 + 0o110) + chr(45) + chr(56))) uJrjep0Dwwjo() v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\xc7\x17\x80~\x16\x8d6\x16OCV\x8c\xa7\xebY\xf7\xc4.*\xe37Z\x15\xd9\xde\x94\x00'), chr(0b1100100) + chr(1150 - 1049) + '\143' + '\157' + '\144' + chr(101))(chr(117) + chr(116) + chr(0b101010 + 0o74) + chr(0b100111 + 0o6) + '\070')) return nzTpIcepk0o8(chr(1276 - 1228) + chr(0b1000 + 0o147) + chr(0b101111 + 0o2), 8)
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/functionprofiler.py
calibrateprofile
def calibrateprofile(): ''' Calibrate the profiler (necessary to have non negative and more exact values) ''' pr = profile.Profile() calib = [] crepeat = 10 for i in range(crepeat): calib.append(pr.calibrate(10000)) final = sum(calib) / crepeat profile.Profile.bias = final # Apply computed bias to all Profile instances created hereafter return final
python
def calibrateprofile(): ''' Calibrate the profiler (necessary to have non negative and more exact values) ''' pr = profile.Profile() calib = [] crepeat = 10 for i in range(crepeat): calib.append(pr.calibrate(10000)) final = sum(calib) / crepeat profile.Profile.bias = final # Apply computed bias to all Profile instances created hereafter return final
[ "def", "calibrateprofile", "(", ")", ":", "pr", "=", "profile", ".", "Profile", "(", ")", "calib", "=", "[", "]", "crepeat", "=", "10", "for", "i", "in", "range", "(", "crepeat", ")", ":", "calib", ".", "append", "(", "pr", ".", "calibrate", "(", "10000", ")", ")", "final", "=", "sum", "(", "calib", ")", "/", "crepeat", "profile", ".", "Profile", ".", "bias", "=", "final", "# Apply computed bias to all Profile instances created hereafter", "return", "final" ]
Calibrate the profiler (necessary to have non negative and more exact values)
[ "Calibrate", "the", "profiler", "(", "necessary", "to", "have", "non", "negative", "and", "more", "exact", "values", ")" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/functionprofiler.py#L91-L102
train
Calibrate the profiler and return the final value
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4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U,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(111) + '\x34' + chr(55), 36999 - 36991), nzTpIcepk0o8('\060' + '\157' + chr(0b10100 + 0o37) + chr(2355 - 2302) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(968 - 920) + chr(0b1101111) + chr(0b110001) + chr(0b11011 + 0o25) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b110010 + 0o75) + chr(2107 - 2056) + chr(0b110100) + chr(55), 0o10), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(0b10111 + 0o34) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(1360 - 1312) + '\061', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(744 - 694) + chr(52) + chr(0b110110), 30018 - 30010), nzTpIcepk0o8(chr(0b110000) + chr(0b10001 + 0o136) + '\x34' + chr(0b110010 + 0o0), 0o10), nzTpIcepk0o8(chr(410 - 362) + chr(0b101101 + 0o102) + chr(0b11000 + 0o33) + chr(49) + '\x37', 0o10), nzTpIcepk0o8(chr(633 - 585) + chr(0b1101011 + 0o4) + chr(49) + chr(0b101000 + 0o16) + '\x34', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1010101 + 0o32) + chr(0b1011 + 0o47) + chr(0b110010) + chr(0b110100), 65370 - 65362), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\157' + chr(51) + chr(51) + '\064', 0b1000), nzTpIcepk0o8(chr(1326 - 1278) + '\157' + '\x33' + chr(0b10011 + 0o36), 10167 - 10159), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(111) + chr(52) + '\064', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b100010 + 0o17) + '\066' + chr(52), 8), nzTpIcepk0o8('\x30' + chr(0b1100010 + 0o15) + chr(0b10010 + 0o40) + chr(0b110000) + '\062', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(52) + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(7593 - 7482) + chr(51) + chr(1778 - 1729) + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000 + 0o0) + '\157' + chr(919 - 870) + '\x34' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b1101111) + '\x33' + chr(1821 - 1773) + chr(213 - 164), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1001111 + 0o40) + '\061' + '\x36' + chr(0b10100 + 0o42), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1 + 0o156) + chr(49) + '\x35' + chr(0b110001), 0o10), nzTpIcepk0o8('\x30' + chr(113 - 2) + chr(0b110011) + chr(0b110111) + chr(0b11100 + 0o27), 0o10), nzTpIcepk0o8(chr(0b1101 + 0o43) + '\x6f' + '\065', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1001001 + 0o46) + '\063' + '\x36' + chr(0b1111 + 0o42), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x32' + chr(2439 - 2385), 30222 - 30214), nzTpIcepk0o8(chr(1377 - 1329) + chr(0b101001 + 0o106) + '\x32' + chr(638 - 589), 0o10), nzTpIcepk0o8(chr(1099 - 1051) + chr(0b11010 + 0o125) + chr(0b110010) + '\063' + chr(0b110111), 16297 - 16289), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x32' + chr(0b101100 + 0o10) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\062' + chr(886 - 837) + chr(0b101010 + 0o13), 0b1000), nzTpIcepk0o8(chr(2096 - 2048) + '\157' + chr(931 - 880) + '\061' + '\x35', 0o10), nzTpIcepk0o8('\060' + chr(0b10000 + 0o137) + chr(55) + chr(54), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b100011 + 0o20) + '\x31' + chr(48), 31154 - 31146), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(111) + '\061' + chr(0b10110 + 0o35) + '\061', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1085 - 1035) + chr(1744 - 1689) + chr(499 - 447), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(0b100101 + 0o14) + '\064', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(51) + chr(0b1011 + 0o54) + chr(0b110010), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + chr(2443 - 2391) + chr(51), 20467 - 20459), nzTpIcepk0o8(chr(48) + chr(3276 - 3165) + '\x31' + chr(0b100010 + 0o20) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1010111 + 0o30) + chr(1234 - 1184) + chr(0b110100) + chr(50), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(5239 - 5128) + chr(890 - 837) + chr(1338 - 1290), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\t'), chr(0b110100 + 0o60) + '\145' + chr(0b100001 + 0o102) + chr(0b1101111) + chr(0b1100100) + chr(0b1001001 + 0o34))(chr(12892 - 12775) + '\164' + '\x66' + chr(45) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def VVbr31qxny4U(): FRkhMNj4RQb_ = nQ8dle22Rrpj.Profile() WmQE2ranTsCc = [] qamdLHSpCND6 = nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(111) + chr(49) + '\062', 29501 - 29493) for ZlbFMSG8gCoF in bbT2xIe5pzk7(qamdLHSpCND6): roI3spqORKae(WmQE2ranTsCc, roI3spqORKae(ES5oEprVxulp(b'o\xbb\x15\xd3#\xe6\xe1M\xa5\x1b\xc1\xe9'), chr(5753 - 5653) + chr(101) + '\x63' + chr(5186 - 5075) + chr(962 - 862) + '\x65')('\165' + '\164' + chr(3773 - 3671) + '\055' + chr(56)))(roI3spqORKae(FRkhMNj4RQb_, roI3spqORKae(ES5oEprVxulp(b'D\x8e*\x8e9\xf3\xc7V\xaa'), chr(100) + chr(3614 - 3513) + '\143' + chr(3726 - 3615) + chr(9630 - 9530) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b1011110 + 0o10) + '\x2d' + chr(0b111000)))(nzTpIcepk0o8(chr(48) + chr(0b1100100 + 0o13) + '\062' + chr(51) + '\064' + chr(50) + chr(0b111 + 0o51), ord("\x08")))) QvpgD08pqr2q = oclC8DLjA_lV(WmQE2ranTsCc) / qamdLHSpCND6 nQ8dle22Rrpj.Profile.gNPmnEzB7YJo = QvpgD08pqr2q return QvpgD08pqr2q
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/functionprofiler.py
parseprofile
def parseprofile(profilelog, out): ''' Parse a profile log and print the result on screen ''' file = open(out, 'w') # opening the output file print('Opening the profile in %s...' % profilelog) p = pstats.Stats(profilelog, stream=file) # parsing the profile with pstats, and output everything to the file print('Generating the stats, please wait...') file.write("=== All stats:\n") p.strip_dirs().sort_stats(-1).print_stats() file.write("=== Cumulative time:\n") p.sort_stats('cumulative').print_stats(100) file.write("=== Time:\n") p.sort_stats('time').print_stats(100) file.write("=== Time + cumulative time:\n") p.sort_stats('time', 'cum').print_stats(.5, 'init') file.write("=== Callees:\n") p.print_callees() file.write("=== Callers:\n") p.print_callers() #p.print_callers(.5, 'init') #p.add('fooprof') file.close() print('Stats generated and saved to %s.' % out) print('Everything is done. Exiting')
python
def parseprofile(profilelog, out): ''' Parse a profile log and print the result on screen ''' file = open(out, 'w') # opening the output file print('Opening the profile in %s...' % profilelog) p = pstats.Stats(profilelog, stream=file) # parsing the profile with pstats, and output everything to the file print('Generating the stats, please wait...') file.write("=== All stats:\n") p.strip_dirs().sort_stats(-1).print_stats() file.write("=== Cumulative time:\n") p.sort_stats('cumulative').print_stats(100) file.write("=== Time:\n") p.sort_stats('time').print_stats(100) file.write("=== Time + cumulative time:\n") p.sort_stats('time', 'cum').print_stats(.5, 'init') file.write("=== Callees:\n") p.print_callees() file.write("=== Callers:\n") p.print_callers() #p.print_callers(.5, 'init') #p.add('fooprof') file.close() print('Stats generated and saved to %s.' % out) print('Everything is done. Exiting')
[ "def", "parseprofile", "(", "profilelog", ",", "out", ")", ":", "file", "=", "open", "(", "out", ",", "'w'", ")", "# opening the output file", "print", "(", "'Opening the profile in %s...'", "%", "profilelog", ")", "p", "=", "pstats", ".", "Stats", "(", "profilelog", ",", "stream", "=", "file", ")", "# parsing the profile with pstats, and output everything to the file", "print", "(", "'Generating the stats, please wait...'", ")", "file", ".", "write", "(", "\"=== All stats:\\n\"", ")", "p", ".", "strip_dirs", "(", ")", ".", "sort_stats", "(", "-", "1", ")", ".", "print_stats", "(", ")", "file", ".", "write", "(", "\"=== Cumulative time:\\n\"", ")", "p", ".", "sort_stats", "(", "'cumulative'", ")", ".", "print_stats", "(", "100", ")", "file", ".", "write", "(", "\"=== Time:\\n\"", ")", "p", ".", "sort_stats", "(", "'time'", ")", ".", "print_stats", "(", "100", ")", "file", ".", "write", "(", "\"=== Time + cumulative time:\\n\"", ")", "p", ".", "sort_stats", "(", "'time'", ",", "'cum'", ")", ".", "print_stats", "(", ".5", ",", "'init'", ")", "file", ".", "write", "(", "\"=== Callees:\\n\"", ")", "p", ".", "print_callees", "(", ")", "file", ".", "write", "(", "\"=== Callers:\\n\"", ")", "p", ".", "print_callers", "(", ")", "#p.print_callers(.5, 'init')", "#p.add('fooprof')", "file", ".", "close", "(", ")", "print", "(", "'Stats generated and saved to %s.'", "%", "out", ")", "print", "(", "'Everything is done. Exiting'", ")" ]
Parse a profile log and print the result on screen
[ "Parse", "a", "profile", "log", "and", "print", "the", "result", "on", "screen" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/functionprofiler.py#L104-L129
train
Parse a profile log and print the result on screen
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs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bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(9952 - 9841) + '\x32' + '\065' + '\067', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(1917 - 1868) + '\064' + chr(0b1011 + 0o53), 0b1000), nzTpIcepk0o8('\060' + chr(9709 - 9598) + chr(51) + '\060' + chr(53), 40708 - 40700), nzTpIcepk0o8(chr(0b110000) + chr(0b1001001 + 0o46) + chr(769 - 715), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(204 - 154) + chr(48) + '\065', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(0b11101 + 0o26), 58867 - 58859), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + '\x32' + '\065', 23462 - 23454), nzTpIcepk0o8('\x30' + chr(0b1100001 + 0o16) + chr(51) + chr(0b110000) + chr(2135 - 2084), 48811 - 48803), nzTpIcepk0o8(chr(48) + chr(6439 - 6328) + chr(0b111 + 0o52) + '\x32' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(936 - 888) + chr(0b1101111) + '\061' + chr(50) + chr(0b100100 + 0o17), 19717 - 19709), nzTpIcepk0o8(chr(2116 - 2068) + chr(111) + chr(0b110010) + chr(0b110111) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100 + 0o57) + chr(841 - 793) + chr(51), 8), nzTpIcepk0o8('\060' + chr(2865 - 2754) + chr(0b11 + 0o56) + '\063' + '\063', 42513 - 42505), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + chr(48) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + '\x31' + '\062', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b11111 + 0o120) + chr(1089 - 1038) + '\066', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(52) + chr(0b100010 + 0o22), 61735 - 61727), nzTpIcepk0o8(chr(810 - 762) + chr(0b1101111) + chr(0b100000 + 0o23) + '\x35' + chr(0b100000 + 0o21), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(0b110100) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10111 + 0o33) + chr(0b110001) + chr(243 - 190), 0o10), nzTpIcepk0o8(chr(364 - 316) + chr(111) + chr(0b101111 + 0o2) + '\067' + chr(0b100111 + 0o15), ord("\x08")), nzTpIcepk0o8(chr(1526 - 1478) + chr(7931 - 7820) + chr(360 - 308), 0b1000), nzTpIcepk0o8(chr(2245 - 2197) + chr(0b1101111) + chr(0b11000 + 0o37) + chr(0b11 + 0o60), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b111001 + 0o66) + chr(2268 - 2218) + chr(0b11000 + 0o35) + chr(1544 - 1492), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11000 + 0o31) + chr(49) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(1377 - 1329) + '\x6f' + chr(54) + '\066', 59433 - 59425), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(111) + '\063' + chr(2241 - 2191) + '\064', 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + chr(0b101011 + 0o7) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\157' + '\x33' + chr(0b100101 + 0o13) + chr(0b110110), 65000 - 64992), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + '\x35', 57864 - 57856), nzTpIcepk0o8('\x30' + chr(111) + '\063' + chr(2515 - 2462) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + '\067' + chr(50), 0o10), nzTpIcepk0o8(chr(55 - 7) + '\157' + chr(0b110011) + chr(51) + chr(801 - 753), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11011 + 0o30) + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + chr(5336 - 5225) + '\x33' + chr(0b100111 + 0o16) + '\061', 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b101 + 0o55) + '\x32' + '\x35', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + '\x35' + '\x36', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + '\061' + chr(0b11001 + 0o33), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\062' + '\x34' + '\x31', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(1106 - 1055) + '\x34' + chr(2130 - 2081), 60027 - 60019)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\157' + chr(0b110101) + chr(0b101100 + 0o4), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x81'), chr(692 - 592) + '\x65' + '\143' + '\x6f' + chr(0b1 + 0o143) + '\x65')(chr(0b10101 + 0o140) + chr(0b1110100) + '\146' + '\055' + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def hI5wfsF0Lrwm(MX9wh8wnFoyI, VwOu8WkJ9cpc): GtsVUCYulgYX = DnU3Rq9N5ala(VwOu8WkJ9cpc, roI3spqORKae(ES5oEprVxulp(b'\xd8'), '\144' + '\x65' + chr(99) + '\157' + chr(0b1100100) + chr(3613 - 3512))('\x75' + chr(0b1010001 + 0o43) + chr(102) + chr(45) + '\x38')) v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\xe0\x16\xa0h\xecu2\xe3";\xd9\xe3+\xb2\xe5x\xcd\x85\x80\xad\x15j\x1b\x89:\x18\xfa;'), chr(525 - 425) + chr(0b0 + 0o145) + chr(0b1010000 + 0o23) + chr(0b1101111) + chr(100) + chr(0b111111 + 0o46))('\x75' + chr(0b1110100) + '\x66' + '\055' + chr(0b1000 + 0o60)) % MX9wh8wnFoyI) fSdw5wwLo9MO = v06tntER88PM.Stats(MX9wh8wnFoyI, stream=GtsVUCYulgYX) v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\xe8\x03\xabc\xf7z!\xaa84\x9c\xb73\xa5\xaam\xd0\x88\x91\xfeP$K\xc0,W\xa7p\xe6j\x8e\x13\xac7\xc7\xbb'), chr(100) + chr(0b1100101) + chr(9189 - 9090) + '\x6f' + chr(3477 - 3377) + '\145')('\x75' + '\164' + chr(1438 - 1336) + chr(0b101101) + '\070')) roI3spqORKae(GtsVUCYulgYX, roI3spqORKae(ES5oEprVxulp(b'\xc2\n\xf5n\xedk#\xf2\x1a#\xcd\xf1'), '\144' + chr(3641 - 3540) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(7473 - 7372))(chr(0b11001 + 0o134) + chr(116) + '\x66' + chr(45) + '\070'))(roI3spqORKae(ES5oEprVxulp(b"\x92[\xf8&\xc4w9\xe3%'\xdd\xb7(\xfa\x80"), chr(0b1100100) + '\x65' + '\143' + chr(111) + '\x64' + '\145')('\165' + '\164' + '\146' + '\x2d' + '\070')) roI3spqORKae(fSdw5wwLo9MO.strip_dirs().sort_stats(-nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001), 0b1000)), roI3spqORKae(ES5oEprVxulp(b"\xdf\x14\xach\xf1D&\xb77'\xcf"), chr(0b1101 + 0o127) + '\x65' + chr(8773 - 8674) + chr(111) + chr(100) + '\145')(chr(117) + '\164' + chr(102) + chr(0b1000 + 0o45) + chr(0b111000)))() roI3spqORKae(GtsVUCYulgYX, roI3spqORKae(ES5oEprVxulp(b'\xc2\n\xf5n\xedk#\xf2\x1a#\xcd\xf1'), chr(0b1100100) + '\x65' + '\x63' + chr(4061 - 3950) + chr(100) + '\145')(chr(1524 - 1407) + chr(12411 - 12295) + '\146' + chr(45) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'\x92[\xf8&\xc6n8\xb6:2\xc8\xaa-\xa5\xaaj\xcd\x84\x80\xb7v'), '\x64' + chr(3284 - 3183) + chr(0b1100011) + chr(0b1010000 + 0o37) + chr(0b1010000 + 0o24) + chr(0b100101 + 0o100))(chr(3967 - 3850) + chr(7031 - 6915) + chr(0b1100110) + '\055' + chr(1031 - 975))) roI3spqORKae(fSdw5wwLo9MO.sort_stats(roI3spqORKae(ES5oEprVxulp(b'\xcc\x13\xa8s\xe9z!\xaa 6'), '\144' + chr(0b1100101) + '\x63' + chr(111) + chr(100) + '\145')('\165' + chr(0b1110100) + chr(0b1011101 + 0o11) + chr(45) + '\x38')), roI3spqORKae(ES5oEprVxulp(b"\xdf\x14\xach\xf1D&\xb77'\xcf"), '\144' + chr(101) + chr(0b1011110 + 0o5) + chr(0b1101111) + '\144' + chr(0b1100101))('\x75' + chr(0b1110100) + chr(102) + chr(356 - 311) + '\x38'))(nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + chr(0b110100) + '\064', 0o10)) roI3spqORKae(GtsVUCYulgYX, roI3spqORKae(ES5oEprVxulp(b'\xc2\n\xf5n\xedk#\xf2\x1a#\xcd\xf1'), chr(2379 - 2279) + '\x65' + chr(0b1100011) + '\x6f' + chr(0b1101 + 0o127) + '\145')(chr(0b1100100 + 0o21) + chr(1637 - 1521) + chr(0b1100110) + chr(1779 - 1734) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\x92[\xf8&\xd1r8\xa6lY'), chr(100) + chr(8391 - 8290) + chr(0b1001011 + 0o30) + '\x6f' + '\144' + chr(0b1100101))(chr(117) + chr(0b10000 + 0o144) + chr(102) + chr(547 - 502) + chr(657 - 601))) roI3spqORKae(fSdw5wwLo9MO.sort_stats(roI3spqORKae(ES5oEprVxulp(b'\xdb\x0f\xa8c'), '\x64' + chr(9113 - 9012) + chr(0b10 + 0o141) + chr(111) + '\144' + '\145')(chr(216 - 99) + chr(10417 - 10301) + chr(0b1000111 + 0o37) + '\x2d' + '\x38')), roI3spqORKae(ES5oEprVxulp(b"\xdf\x14\xach\xf1D&\xb77'\xcf"), chr(100) + '\145' + chr(8405 - 8306) + chr(111) + chr(100) + '\x65')('\165' + chr(0b1110100) + '\146' + chr(456 - 411) + '\070'))(nzTpIcepk0o8('\x30' + '\157' + chr(49) + chr(0b110100) + chr(1233 - 1181), 8)) roI3spqORKae(GtsVUCYulgYX, roI3spqORKae(ES5oEprVxulp(b'\xc2\n\xf5n\xedk#\xf2\x1a#\xcd\xf1'), chr(0b1100100) + chr(3124 - 3023) + chr(99) + chr(111) + '\x64' + chr(7802 - 7701))('\165' + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\x92[\xf8&\xd1r8\xa6vx\x9c\xa0.\xad\xffr\xc5\x9d\x8c\xfb\x19$O\xc5$S\xee\x1f'), '\144' + chr(101) + '\x63' + chr(0b1101111) + '\x64' + chr(101))(chr(0b1101010 + 0o13) + chr(0b1011101 + 0o27) + chr(0b1100110) + '\x2d' + chr(0b100 + 0o64))) roI3spqORKae(fSdw5wwLo9MO.sort_stats(roI3spqORKae(ES5oEprVxulp(b'\xdb\x0f\xa8c'), chr(0b10011 + 0o121) + chr(0b1100101) + chr(0b11111 + 0o104) + chr(0b1100 + 0o143) + chr(0b1001010 + 0o32) + '\x65')(chr(0b111000 + 0o75) + '\x74' + chr(102) + '\x2d' + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xcc\x13\xa8'), chr(8579 - 8479) + chr(2954 - 2853) + chr(99) + '\x6f' + chr(100) + '\x65')(chr(0b100011 + 0o122) + '\164' + '\x66' + chr(45) + '\x38')), roI3spqORKae(ES5oEprVxulp(b"\xdf\x14\xach\xf1D&\xb77'\xcf"), '\x64' + chr(0b1100101) + '\x63' + chr(111) + chr(0b1100100) + chr(0b1100001 + 0o4))(chr(828 - 711) + chr(0b11110 + 0o126) + chr(0b1010111 + 0o17) + '\x2d' + chr(56)))(0.5, roI3spqORKae(ES5oEprVxulp(b'\xc6\x08\xacr'), chr(0b100010 + 0o102) + '\145' + chr(7333 - 7234) + '\157' + '\x64' + '\145')(chr(0b10011 + 0o142) + chr(0b1110100) + chr(102) + chr(0b101101) + '\x38')) roI3spqORKae(GtsVUCYulgYX, roI3spqORKae(ES5oEprVxulp(b'\xc2\n\xf5n\xedk#\xf2\x1a#\xcd\xf1'), '\144' + '\145' + chr(4760 - 4661) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))('\165' + '\164' + chr(102) + chr(0b100110 + 0o7) + chr(739 - 683)))(roI3spqORKae(ES5oEprVxulp(b'\x92[\xf8&\xc6z9\xaf36\xcf\xf9Q'), '\x64' + chr(10192 - 10091) + chr(99) + '\157' + chr(100) + chr(0b1011111 + 0o6))('\165' + chr(0b1110100) + '\x66' + '\x2d' + chr(56))) roI3spqORKae(fSdw5wwLo9MO, roI3spqORKae(ES5oEprVxulp(b'\xdf\x14\xach\xf1D6\xa2:?\xd9\xa6('), chr(0b10010 + 0o122) + '\x65' + chr(99) + chr(0b1101111 + 0o0) + chr(3454 - 3354) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(0b11100 + 0o112) + chr(0b1001 + 0o44) + '\x38'))() roI3spqORKae(GtsVUCYulgYX, roI3spqORKae(ES5oEprVxulp(b'\xc2\n\xf5n\xedk#\xf2\x1a#\xcd\xf1'), chr(0b101110 + 0o66) + chr(0b1100101) + chr(99) + chr(0b111011 + 0o64) + chr(0b1100100) + chr(2369 - 2268))('\x75' + chr(116) + chr(4090 - 3988) + chr(749 - 704) + chr(912 - 856)))(roI3spqORKae(ES5oEprVxulp(b'\x92[\xf8&\xc6z9\xaf3!\xcf\xf9Q'), chr(3906 - 3806) + chr(101) + '\x63' + '\157' + '\144' + chr(1196 - 1095))(chr(0b1110101) + '\x74' + '\146' + chr(45) + chr(56))) roI3spqORKae(fSdw5wwLo9MO, roI3spqORKae(ES5oEprVxulp(b'\xdf\x14\xach\xf1D6\xa2:?\xd9\xb1('), chr(3664 - 3564) + chr(0b101010 + 0o73) + chr(99) + chr(0b1010000 + 0o37) + '\144' + chr(0b1010000 + 0o25))(chr(12811 - 12694) + '\x74' + chr(0b1010100 + 0o22) + chr(0b101101) + '\070'))() roI3spqORKae(GtsVUCYulgYX, roI3spqORKae(ES5oEprVxulp(b'\xf5\x03\xb41\xc6x3\xfa\x037\x84\xa9'), chr(100) + '\145' + '\143' + '\x6f' + chr(0b1100100) + chr(101))(chr(0b1110101) + '\164' + chr(0b11100 + 0o112) + chr(45) + chr(56)))() v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\xfc\x12\xa4r\xf6;2\xa686\xce\xa2/\xa5\xee>\xc5\x87\x81\xad\x0feM\xc9-\x16\xa0z\xe68\x9cT'), chr(0b111101 + 0o47) + '\x65' + chr(0b1000010 + 0o41) + chr(111) + chr(0b1100100) + '\x65')(chr(0b1110 + 0o147) + '\x74' + '\146' + chr(0b100101 + 0o10) + chr(0b111000)) % VwOu8WkJ9cpc) v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\xea\x10\xa0t\xfco=\xaa84\x9c\xaa(\xe0\xeeq\xca\x8c\xcb\xad9|R\xd8 X\xb3'), '\x64' + chr(0b111011 + 0o52) + chr(99) + '\157' + chr(0b110101 + 0o57) + chr(101))('\x75' + chr(0b11001 + 0o133) + chr(0b1000011 + 0o43) + chr(1694 - 1649) + chr(0b111000)))
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/functionprofiler.py
browseprofile
def browseprofile(profilelog): ''' Browse interactively a profile log in console ''' print('Starting the pstats profile browser...\n') try: browser = ProfileBrowser(profilelog) print >> browser.stream, "Welcome to the profile statistics browser. Type help to get started." browser.cmdloop() print >> browser.stream, "Goodbye." except KeyboardInterrupt: pass
python
def browseprofile(profilelog): ''' Browse interactively a profile log in console ''' print('Starting the pstats profile browser...\n') try: browser = ProfileBrowser(profilelog) print >> browser.stream, "Welcome to the profile statistics browser. Type help to get started." browser.cmdloop() print >> browser.stream, "Goodbye." except KeyboardInterrupt: pass
[ "def", "browseprofile", "(", "profilelog", ")", ":", "print", "(", "'Starting the pstats profile browser...\\n'", ")", "try", ":", "browser", "=", "ProfileBrowser", "(", "profilelog", ")", "print", ">>", "browser", ".", "stream", ",", "\"Welcome to the profile statistics browser. Type help to get started.\"", "browser", ".", "cmdloop", "(", ")", "print", ">>", "browser", ".", "stream", ",", "\"Goodbye.\"", "except", "KeyboardInterrupt", ":", "pass" ]
Browse interactively a profile log in console
[ "Browse", "interactively", "a", "profile", "log", "in", "console" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/functionprofiler.py#L131-L142
train
Browse profile log in console
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,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zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b10110 + 0o32) + '\x6f' + chr(51) + chr(54) + chr(0b10100 + 0o36), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b1001 + 0o52) + '\x31' + '\067', 33012 - 33004), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1000110 + 0o51) + chr(1844 - 1794) + '\065' + '\x34', 37728 - 37720), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + '\x36' + '\x34', 0b1000), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\157' + chr(59 - 9) + chr(51) + chr(676 - 621), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b11110 + 0o25) + chr(0b100010 + 0o25) + chr(2231 - 2176), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\064' + chr(0b11101 + 0o24), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + '\x33' + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(402 - 354) + '\157' + '\x31' + '\x30' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1001011 + 0o44) + chr(1521 - 1471) + '\x34' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2466 - 2413) + chr(353 - 298), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + chr(0b101000 + 0o15) + chr(50), 10708 - 10700), nzTpIcepk0o8(chr(2289 - 2241) + chr(111) + '\x33' + chr(2517 - 2465) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + chr(0b110100) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(1616 - 1568) + chr(4963 - 4852) + chr(2215 - 2164) + '\063' + chr(48), 2639 - 2631), nzTpIcepk0o8('\060' + chr(7014 - 6903) + chr(0b11101 + 0o24) + chr(0b10000 + 0o42) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(0b110100) + chr(0b110001), 0o10), nzTpIcepk0o8('\060' + chr(0b11011 + 0o124) + chr(0b110001) + chr(55) + chr(1880 - 1831), 0o10), nzTpIcepk0o8(chr(48) + chr(481 - 370) + chr(49) + chr(0b110101) + '\x33', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + chr(53) + chr(722 - 671), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + chr(326 - 272) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\061' + '\062' + '\x32', 19037 - 19029), nzTpIcepk0o8('\060' + chr(111) + '\x32' + '\063' + '\062', 8), nzTpIcepk0o8('\060' + '\157' + chr(0b1011 + 0o46) + chr(0b10100 + 0o41) + chr(0b1000 + 0o54), 58176 - 58168), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10110 + 0o33) + chr(370 - 316) + chr(456 - 403), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1001100 + 0o43) + '\062' + chr(0b110011) + '\063', 0b1000), nzTpIcepk0o8('\060' + chr(0b1000111 + 0o50) + chr(49) + '\063' + '\x32', 0o10), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b1101111) + chr(51) + chr(595 - 547), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(1539 - 1488) + chr(2436 - 2386) + chr(605 - 554), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x31' + chr(0b1 + 0o62) + chr(0b100010 + 0o21), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\065' + chr(49), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x32' + chr(0b110000) + chr(52), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b101001 + 0o10) + '\061', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10101 + 0o36) + '\061' + '\063', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + '\067' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(1235 - 1187) + '\x6f' + chr(1589 - 1540) + '\063', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(11389 - 11278) + chr(53) + chr(0b110100 + 0o3), 8), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + '\x36' + '\x33', 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b110 + 0o151) + chr(0b110001) + chr(1923 - 1875), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b100011 + 0o114) + chr(49) + chr(49) + chr(50), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(53) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xdc'), chr(8767 - 8667) + chr(1279 - 1178) + chr(99) + '\157' + chr(0b1100100) + '\x65')(chr(0b1010010 + 0o43) + '\164' + chr(0b1100110) + chr(556 - 511) + chr(0b11000 + 0o40)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def cqclRLeNZPS1(MX9wh8wnFoyI): v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\xa1\xbb\xcd\x06\xeb\x96O\xfdb\xd7G\x0f\xc6\x17\xab$\x00\r\x18\xcb\x81 \xf5\n\x1c\xf7?8\xb1)F\xf3z\xae\x8f%\x01]\x02'), chr(0b1100100) + '\x65' + '\143' + '\x6f' + '\144' + '\145')(chr(117) + chr(0b1110100) + '\x66' + '\055' + '\x38')) try: w0tVDbVONQY_ = GckbFbsOtbqk(MX9wh8wnFoyI) (v8jsMqaYV6U2 >> roI3spqORKae(w0tVDbVONQY_, roI3spqORKae(ES5oEprVxulp(b'\x88\xbb\xefG\xd0\xcd{\xc2/\xd0e\x18'), chr(861 - 761) + '\x65' + chr(99) + chr(0b1101111) + chr(0b1100100) + '\145')('\x75' + '\164' + '\146' + chr(0b101001 + 0o4) + chr(0b110010 + 0o6))), roI3spqORKae(ES5oEprVxulp(b'\xa5\xaa\xc0\x17\xf0\x92D\xba6\xcc\x0f\x1e\x8e\x02\xf8 \x13\x16\r\x82\x9d7\xba\x1f\x01\xfa.q\xa0/@\xe7z\xeb\x9fy@\x04{/\x80\xe1\x8c \xe6\x8fD\xba*\xc6C\x1a\xc6\x13\xb7p\x06\x1c\x1f\xcb\x82&\xfb\x1e\x01\xfe>6'), '\144' + '\145' + chr(0b1100011) + chr(0b111101 + 0o62) + '\x64' + chr(0b1100101))('\x75' + chr(0b1011111 + 0o25) + '\x66' + chr(362 - 317) + '\x38')) roI3spqORKae(w0tVDbVONQY_, roI3spqORKae(ES5oEprVxulp(b'\x91\xa2\xc8\x18\xf0\x90Q'), '\x64' + chr(0b100111 + 0o76) + '\143' + chr(0b1101111) + chr(0b1011000 + 0o14) + chr(0b100000 + 0o105))(chr(0b1001101 + 0o50) + chr(116) + '\x66' + chr(1168 - 1123) + chr(0b100110 + 0o22)))() (v8jsMqaYV6U2 >> roI3spqORKae(w0tVDbVONQY_, roI3spqORKae(ES5oEprVxulp(b'\x88\xbb\xefG\xd0\xcd{\xc2/\xd0e\x18'), '\x64' + chr(0b1100101) + chr(0b1100011) + '\x6f' + '\x64' + chr(0b1010101 + 0o20))(chr(0b1011100 + 0o31) + '\x74' + chr(102) + chr(1121 - 1076) + chr(0b100100 + 0o24))), roI3spqORKae(ES5oEprVxulp(b'\xb5\xa0\xc3\x10\xfd\x86D\xb4'), chr(0b1100100) + chr(0b1100101) + '\x63' + '\157' + chr(100) + chr(0b1100101))(chr(0b1110101) + chr(0b1000 + 0o154) + '\x66' + chr(0b100100 + 0o11) + '\x38')) except Fc8q2OvvlH7d: pass
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/functionprofiler.py
browseprofilegui
def browseprofilegui(profilelog): ''' Browse interactively a profile log in GUI using RunSnakeRun and SquareMap ''' from runsnakerun import runsnake # runsnakerun needs wxPython lib, if it's not available then we can pass if we don't want a GUI. RunSnakeRun is only used for GUI visualisation, not for profiling (and you can still use pstats for console browsing) app = runsnake.RunSnakeRunApp(0) app.OnInit(profilelog) #app.OnInit() app.MainLoop()
python
def browseprofilegui(profilelog): ''' Browse interactively a profile log in GUI using RunSnakeRun and SquareMap ''' from runsnakerun import runsnake # runsnakerun needs wxPython lib, if it's not available then we can pass if we don't want a GUI. RunSnakeRun is only used for GUI visualisation, not for profiling (and you can still use pstats for console browsing) app = runsnake.RunSnakeRunApp(0) app.OnInit(profilelog) #app.OnInit() app.MainLoop()
[ "def", "browseprofilegui", "(", "profilelog", ")", ":", "from", "runsnakerun", "import", "runsnake", "# runsnakerun needs wxPython lib, if it's not available then we can pass if we don't want a GUI. RunSnakeRun is only used for GUI visualisation, not for profiling (and you can still use pstats for console browsing)", "app", "=", "runsnake", ".", "RunSnakeRunApp", "(", "0", ")", "app", ".", "OnInit", "(", "profilelog", ")", "#app.OnInit()", "app", ".", "MainLoop", "(", ")" ]
Browse interactively a profile log in GUI using RunSnakeRun and SquareMap
[ "Browse", "interactively", "a", "profile", "log", "in", "GUI", "using", "RunSnakeRun", "and", "SquareMap" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/functionprofiler.py#L144-L152
train
Browse a profile log in GUI using RunSnakeRun and SquareMap
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYS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3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(1396 - 1285) + chr(49) + chr(1121 - 1066) + '\060', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + chr(49), 25523 - 25515), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + chr(49) + chr(54), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + '\x35' + chr(51), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100111 + 0o10) + '\063' + chr(1551 - 1503), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\061' + '\x36' + chr(986 - 936), 16129 - 16121), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(2272 - 2219) + '\x34', 0b1000), nzTpIcepk0o8('\x30' + chr(8732 - 8621) + chr(0b101111 + 0o3) + chr(55) + chr(636 - 585), 0b1000), nzTpIcepk0o8(chr(372 - 324) + chr(534 - 423) + chr(1093 - 1042) + chr(0b100101 + 0o22), 50360 - 50352), nzTpIcepk0o8(chr(0b110000) + chr(0b1 + 0o156) + chr(511 - 456) + '\065', ord("\x08")), nzTpIcepk0o8(chr(379 - 331) + chr(111) + chr(1286 - 1235) + '\x35', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1338 - 1288) + chr(0b110101) + '\061', 0o10), nzTpIcepk0o8(chr(652 - 604) + chr(0b11010 + 0o125) + chr(0b11100 + 0o25) + chr(0b101000 + 0o17), 58420 - 58412), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + chr(0b110111) + '\x36', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\x32' + chr(55) + chr(888 - 836), 0o10), nzTpIcepk0o8(chr(1958 - 1910) + chr(4654 - 4543) + chr(50) + '\x32' + chr(0b1111 + 0o45), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1010101 + 0o32) + chr(0b110010) + chr(1589 - 1534) + chr(2957 - 2902), 50112 - 50104), nzTpIcepk0o8(chr(1246 - 1198) + chr(11635 - 11524) + '\062' + chr(0b1001 + 0o54) + chr(0b1 + 0o63), 63084 - 63076), nzTpIcepk0o8(chr(2054 - 2006) + chr(0b1000010 + 0o55) + chr(49) + chr(53) + chr(0b1101 + 0o47), 43728 - 43720), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(7230 - 7119) + '\x32' + '\x35' + chr(0b100111 + 0o11), 0b1000), nzTpIcepk0o8(chr(750 - 702) + chr(2500 - 2389) + chr(0b10110 + 0o34) + chr(2775 - 2720) + chr(0b110010), 0b1000), nzTpIcepk0o8('\060' + chr(1318 - 1207) + chr(1441 - 1392) + '\x37' + '\x33', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + chr(52) + chr(0b11000 + 0o37), ord("\x08")), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b101101 + 0o102) + chr(51) + '\064' + chr(1591 - 1539), 0b1000), nzTpIcepk0o8('\x30' + chr(4346 - 4235) + chr(49) + chr(1716 - 1665) + chr(2477 - 2422), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + '\x37' + chr(2454 - 2403), 8), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(111) + '\061' + chr(0b110101) + chr(1398 - 1344), ord("\x08")), nzTpIcepk0o8('\060' + chr(8408 - 8297) + chr(0b11011 + 0o27) + chr(0b110100) + '\064', 0o10), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\x6f' + chr(1903 - 1854) + '\065' + chr(1794 - 1740), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(1636 - 1588) + chr(0b1101111 + 0o0) + chr(2400 - 2351) + chr(484 - 435) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2085 - 2030) + chr(0b110001 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(8579 - 8468) + chr(0b110010) + chr(2111 - 2062) + '\x30', 0o10), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(111) + chr(0b110000 + 0o1) + chr(1848 - 1796) + '\x37', 18879 - 18871), nzTpIcepk0o8(chr(48) + '\x6f' + chr(174 - 121) + chr(1428 - 1375), 0b1000), nzTpIcepk0o8('\060' + chr(218 - 107) + chr(0b100 + 0o55) + chr(52) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(762 - 714) + chr(5565 - 5454) + '\062' + chr(0b110101) + '\065', 45449 - 45441), nzTpIcepk0o8(chr(0b110000) + chr(2560 - 2449) + '\062', 0o10), nzTpIcepk0o8(chr(0b0 + 0o60) + '\157' + chr(0b100111 + 0o12) + chr(50) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(413 - 365) + chr(0b1101111) + chr(1479 - 1429) + chr(2469 - 2414), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(2201 - 2153) + chr(111) + chr(0b110101) + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'V'), chr(9732 - 9632) + '\x65' + chr(99) + chr(0b1101111) + chr(6256 - 6156) + '\145')(chr(117) + chr(0b111111 + 0o65) + chr(0b110000 + 0o66) + '\x2d' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def lOEFNB96v95c(MX9wh8wnFoyI): (u89nElzcg6Nn,) = (roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'\n|\xa0\x98v\x13\x87\xdemHs'), '\x64' + '\x65' + '\x63' + '\157' + '\144' + chr(0b111001 + 0o54))('\x75' + chr(6695 - 6579) + chr(7319 - 7217) + chr(0b101101) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\n|\xa0\x98v\x13\x87\xde'), chr(0b1100100) + '\x65' + chr(99) + chr(7298 - 7187) + '\x64' + '\145')('\165' + '\x74' + chr(8282 - 8180) + '\x2d' + chr(2500 - 2444))), roI3spqORKae(ES5oEprVxulp(b'\n|\xa0\x98v\x13\x87\xde'), chr(100) + chr(0b1100101) + chr(0b10110 + 0o115) + '\x6f' + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(56))),) JmjeLO9VwkLI = u89nElzcg6Nn.RunSnakeRunApp(nzTpIcepk0o8(chr(48) + chr(11907 - 11796) + chr(0b1000 + 0o50), ord("\x08"))) roI3spqORKae(JmjeLO9VwkLI, roI3spqORKae(ES5oEprVxulp(b'7g\x87\x85q\x06'), '\144' + chr(101) + chr(99) + chr(10969 - 10858) + chr(2744 - 2644) + '\x65')('\165' + '\x74' + chr(102) + chr(1114 - 1069) + chr(0b11 + 0o65)))(MX9wh8wnFoyI) roI3spqORKae(JmjeLO9VwkLI, roI3spqORKae(ES5oEprVxulp(b'5h\xa7\x85T\x1d\x83\xcb'), chr(3389 - 3289) + chr(0b1100101) + chr(0b1100011) + chr(0b1101010 + 0o5) + '\144' + '\x65')(chr(117) + chr(0b1110100) + '\x66' + chr(45) + chr(0b111000)))()
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/ff.py
rwh_primes1
def rwh_primes1(n): # http://stackoverflow.com/questions/2068372/fastest-way-to-list-all-primes-below-n-in-python/3035188#3035188 ''' Returns a list of primes < n ''' sieve = [True] * (n/2) for i in _range(3,int(n**0.5)+1,2): if sieve[i/2]: sieve[i*i/2::i] = [False] * ((n-i*i-1)/(2*i)+1) return [2] + [2*i+1 for i in _range(1,n/2) if sieve[i]]
python
def rwh_primes1(n): # http://stackoverflow.com/questions/2068372/fastest-way-to-list-all-primes-below-n-in-python/3035188#3035188 ''' Returns a list of primes < n ''' sieve = [True] * (n/2) for i in _range(3,int(n**0.5)+1,2): if sieve[i/2]: sieve[i*i/2::i] = [False] * ((n-i*i-1)/(2*i)+1) return [2] + [2*i+1 for i in _range(1,n/2) if sieve[i]]
[ "def", "rwh_primes1", "(", "n", ")", ":", "# http://stackoverflow.com/questions/2068372/fastest-way-to-list-all-primes-below-n-in-python/3035188#3035188", "sieve", "=", "[", "True", "]", "*", "(", "n", "/", "2", ")", "for", "i", "in", "_range", "(", "3", ",", "int", "(", "n", "**", "0.5", ")", "+", "1", ",", "2", ")", ":", "if", "sieve", "[", "i", "/", "2", "]", ":", "sieve", "[", "i", "*", "i", "/", "2", ":", ":", "i", "]", "=", "[", "False", "]", "*", "(", "(", "n", "-", "i", "*", "i", "-", "1", ")", "/", "(", "2", "*", "i", ")", "+", "1", ")", "return", "[", "2", "]", "+", "[", "2", "*", "i", "+", "1", "for", "i", "in", "_range", "(", "1", ",", "n", "/", "2", ")", "if", "sieve", "[", "i", "]", "]" ]
Returns a list of primes < n
[ "Returns", "a", "list", "of", "primes", "<", "n" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/ff.py#L60-L67
train
Returns a list of primes < n
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9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dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + '\157' + chr(0b110 + 0o55) + chr(0b110010) + '\x32', 39685 - 39677), nzTpIcepk0o8(chr(403 - 355) + '\157' + chr(0b11111 + 0o23) + chr(0b10101 + 0o37) + chr(0b11001 + 0o35), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(50) + chr(0b10100 + 0o34), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(0b1101 + 0o46) + '\x35', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(0b1010 + 0o50) + '\065', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + chr(0b110011) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + chr(0b10100 + 0o37) + '\x30', 0b1000), nzTpIcepk0o8(chr(1529 - 1481) + chr(111) + chr(0b110010) + '\067' + chr(49), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(0b11000 + 0o33) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(2100 - 1989) + '\x31' + '\064', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + chr(53) + chr(52), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10011 + 0o37) + chr(0b11000 + 0o31) + chr(55), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(982 - 934) + chr(281 - 233), 49920 - 49912), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + chr(0b110100), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2255 - 2204) + '\066' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1414 - 1365) + chr(0b110100) + chr(0b110110 + 0o1), ord("\x08")), nzTpIcepk0o8(chr(1989 - 1941) + chr(6053 - 5942) + chr(49) + chr(0b1001 + 0o51) + '\x35', 0o10), nzTpIcepk0o8('\x30' + '\157' + '\062' + chr(0b110100) + chr(54), 8), nzTpIcepk0o8(chr(48) + chr(0b1100011 + 0o14) + chr(1400 - 1350) + '\x36' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(457 - 409) + '\157' + '\x37' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(1508 - 1460) + chr(11068 - 10957) + '\x31' + chr(0b110010) + '\061', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + chr(52) + '\x35', 23797 - 23789), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b100111 + 0o14) + chr(2099 - 2051), 23349 - 23341), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\x6f' + '\063' + chr(929 - 878) + '\x33', 1317 - 1309), nzTpIcepk0o8(chr(2084 - 2036) + '\x6f' + '\061' + chr(1910 - 1856) + chr(50), 0o10), nzTpIcepk0o8(chr(48) + chr(10345 - 10234) + '\x31' + chr(0b11000 + 0o33) + chr(0b110101), 41183 - 41175), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b101000 + 0o11) + '\x35' + chr(745 - 694), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101001 + 0o11) + chr(51) + '\x30', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(1473 - 1422) + chr(48) + chr(0b110000), 8), nzTpIcepk0o8(chr(242 - 194) + chr(6166 - 6055) + chr(1723 - 1674) + chr(2520 - 2469) + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(409 - 298) + chr(49) + chr(54) + '\067', 0b1000), nzTpIcepk0o8(chr(876 - 828) + '\x6f' + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + chr(6209 - 6098) + chr(0b110011) + chr(52) + '\x34', 31936 - 31928), nzTpIcepk0o8('\x30' + chr(0b101011 + 0o104) + chr(0b110111) + chr(1803 - 1748), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x34' + chr(0b11001 + 0o35), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(990 - 939) + chr(0b110000) + chr(1252 - 1198), 0o10), nzTpIcepk0o8(chr(48) + chr(11490 - 11379) + chr(1672 - 1622) + chr(0b1011 + 0o45) + chr(318 - 263), 37407 - 37399), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\157' + chr(0b110010) + chr(0b110000) + chr(0b110000), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(2357 - 2306) + chr(51), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110 + 0o55) + chr(50) + chr(53), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b1010101 + 0o32) + chr(983 - 930) + chr(1279 - 1231), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xfc'), '\144' + chr(6782 - 6681) + chr(0b1100011) + chr(0b1101111) + chr(2782 - 2682) + '\145')('\165' + chr(0b1000011 + 0o61) + '\x66' + chr(45) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def n4VoqWZPobZq(NoZxuO7wjArS): YY7jrjV1nd1k = [nzTpIcepk0o8(chr(710 - 662) + '\157' + '\x31', 33320 - 33312)] * (NoZxuO7wjArS / nzTpIcepk0o8('\060' + chr(0b1101111) + chr(277 - 227), 48155 - 48147)) for ZlbFMSG8gCoF in tpoEqV5cEG2w(nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(111) + chr(264 - 213), 0o10), nzTpIcepk0o8(NoZxuO7wjArS ** 0.5) + nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(809 - 760), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010), 8)): if YY7jrjV1nd1k[ZlbFMSG8gCoF / nzTpIcepk0o8(chr(90 - 42) + chr(111) + chr(50), 8)]: YY7jrjV1nd1k[ZlbFMSG8gCoF * ZlbFMSG8gCoF / nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010), 8)::ZlbFMSG8gCoF] = [nzTpIcepk0o8('\060' + chr(5150 - 5039) + chr(0b110000), 0o10)] * ((NoZxuO7wjArS - ZlbFMSG8gCoF * ZlbFMSG8gCoF - nzTpIcepk0o8(chr(0b11011 + 0o25) + '\x6f' + chr(0b110001), 8)) / (nzTpIcepk0o8(chr(848 - 800) + '\157' + chr(0b101010 + 0o10), 8) * ZlbFMSG8gCoF) + nzTpIcepk0o8('\060' + '\157' + '\x31', 8)) return [nzTpIcepk0o8('\060' + '\x6f' + chr(1525 - 1475), 8)] + [nzTpIcepk0o8(chr(48) + chr(3462 - 3351) + chr(0b110001 + 0o1), 8) * ZlbFMSG8gCoF + nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061', 8) for ZlbFMSG8gCoF in tpoEqV5cEG2w(nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061', 8), NoZxuO7wjArS / nzTpIcepk0o8(chr(48) + '\x6f' + '\062', 8)) if YY7jrjV1nd1k[ZlbFMSG8gCoF]]
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/ff.py
find_prime_polynomials
def find_prime_polynomials(generator=2, c_exp=8, fast_primes=False, single=False): '''Compute the list of prime polynomials for the given generator and galois field characteristic exponent.''' # fast_primes will output less results but will be significantly faster. # single will output the first prime polynomial found, so if all you want is to just find one prime polynomial to generate the LUT for Reed-Solomon to work, then just use that. # A prime polynomial (necessarily irreducible) is necessary to reduce the multiplications in the Galois Field, so as to avoid overflows. # Why do we need a "prime polynomial"? Can't we just reduce modulo 255 (for GF(2^8) for example)? Because we need the values to be unique. # For example: if the generator (alpha) = 2 and c_exp = 8 (GF(2^8) == GF(256)), then the generated Galois Field (0, 1, α, α^1, α^2, ..., α^(p-1)) will be galois field it becomes 0, 1, 2, 4, 8, 16, etc. However, upon reaching 128, the next value will be doubled (ie, next power of 2), which will give 256. Then we must reduce, because we have overflowed above the maximum value of 255. But, if we modulo 255, this will generate 256 == 1. Then 2, 4, 8, 16, etc. giving us a repeating pattern of numbers. This is very bad, as it's then not anymore a bijection (ie, a non-zero value doesn't have a unique index). That's why we can't just modulo 255, but we need another number above 255, which is called the prime polynomial. # Why so much hassle? Because we are using precomputed look-up tables for multiplication: instead of multiplying a*b, we precompute alpha^a, alpha^b and alpha^(a+b), so that we can just use our lookup table at alpha^(a+b) and get our result. But just like in our original field we had 0,1,2,...,p-1 distinct unique values, in our "LUT" field using alpha we must have unique distinct values (we don't care that they are different from the original field as long as they are unique and distinct). That's why we need to avoid duplicated values, and to avoid duplicated values we need to use a prime irreducible polynomial. # Here is implemented a bruteforce approach to find all these prime polynomials, by generating every possible prime polynomials (ie, every integers between field_charac+1 and field_charac*2), and then we build the whole Galois Field, and we reject the candidate prime polynomial if it duplicates even one value or if it generates a value above field_charac (ie, cause an overflow). # Note that this algorithm is slow if the field is too big (above 12), because it's an exhaustive search algorithm. There are probabilistic approaches, and almost surely prime approaches, but there is no determistic polynomial time algorithm to find irreducible monic polynomials. More info can be found at: http://people.mpi-inf.mpg.de/~csaha/lectures/lec9.pdf # Another faster algorithm may be found at Adleman, Leonard M., and Hendrik W. Lenstra. "Finding irreducible polynomials over finite fields." Proceedings of the eighteenth annual ACM symposium on Theory of computing. ACM, 1986. # Prepare the finite field characteristic (2^p - 1), this also represent the maximum possible value in this field root_charac = 2 # we're in GF(2) field_charac = int(root_charac**c_exp - 1) field_charac_next = int(root_charac**(c_exp+1) - 1) prim_candidates = [] if fast_primes: prim_candidates = rwh_primes1(field_charac_next) # generate maybe prime polynomials and check later if they really are irreducible prim_candidates = [x for x in prim_candidates if x > field_charac] # filter out too small primes else: prim_candidates = _range(field_charac+2, field_charac_next, root_charac) # try each possible prime polynomial, but skip even numbers (because divisible by 2 so necessarily not irreducible) # Start of the main loop correct_primes = [] for prim in prim_candidates: # try potential candidates primitive irreducible polys seen = bytearray(field_charac+1) # memory variable to indicate if a value was already generated in the field (value at index x is set to 1) or not (set to 0 by default) conflict = False # flag to know if there was at least one conflict # Second loop, build the whole Galois Field x = GF2int(1) for i in _range(field_charac): # Compute the next value in the field (ie, the next power of alpha/generator) x = x.multiply(generator, prim, field_charac+1) # Rejection criterion: if the value overflowed (above field_charac) or is a duplicate of a previously generated power of alpha, then we reject this polynomial (not prime) if x > field_charac or seen[x] == 1: conflict = True break # Else we flag this value as seen (to maybe detect future duplicates), and we continue onto the next power of alpha else: seen[x] = 1 # End of the second loop: if there's no conflict (no overflow nor duplicated value), this is a prime polynomial! if not conflict: correct_primes.append(prim) if single: return prim # Return the list of all prime polynomials return correct_primes
python
def find_prime_polynomials(generator=2, c_exp=8, fast_primes=False, single=False): '''Compute the list of prime polynomials for the given generator and galois field characteristic exponent.''' # fast_primes will output less results but will be significantly faster. # single will output the first prime polynomial found, so if all you want is to just find one prime polynomial to generate the LUT for Reed-Solomon to work, then just use that. # A prime polynomial (necessarily irreducible) is necessary to reduce the multiplications in the Galois Field, so as to avoid overflows. # Why do we need a "prime polynomial"? Can't we just reduce modulo 255 (for GF(2^8) for example)? Because we need the values to be unique. # For example: if the generator (alpha) = 2 and c_exp = 8 (GF(2^8) == GF(256)), then the generated Galois Field (0, 1, α, α^1, α^2, ..., α^(p-1)) will be galois field it becomes 0, 1, 2, 4, 8, 16, etc. However, upon reaching 128, the next value will be doubled (ie, next power of 2), which will give 256. Then we must reduce, because we have overflowed above the maximum value of 255. But, if we modulo 255, this will generate 256 == 1. Then 2, 4, 8, 16, etc. giving us a repeating pattern of numbers. This is very bad, as it's then not anymore a bijection (ie, a non-zero value doesn't have a unique index). That's why we can't just modulo 255, but we need another number above 255, which is called the prime polynomial. # Why so much hassle? Because we are using precomputed look-up tables for multiplication: instead of multiplying a*b, we precompute alpha^a, alpha^b and alpha^(a+b), so that we can just use our lookup table at alpha^(a+b) and get our result. But just like in our original field we had 0,1,2,...,p-1 distinct unique values, in our "LUT" field using alpha we must have unique distinct values (we don't care that they are different from the original field as long as they are unique and distinct). That's why we need to avoid duplicated values, and to avoid duplicated values we need to use a prime irreducible polynomial. # Here is implemented a bruteforce approach to find all these prime polynomials, by generating every possible prime polynomials (ie, every integers between field_charac+1 and field_charac*2), and then we build the whole Galois Field, and we reject the candidate prime polynomial if it duplicates even one value or if it generates a value above field_charac (ie, cause an overflow). # Note that this algorithm is slow if the field is too big (above 12), because it's an exhaustive search algorithm. There are probabilistic approaches, and almost surely prime approaches, but there is no determistic polynomial time algorithm to find irreducible monic polynomials. More info can be found at: http://people.mpi-inf.mpg.de/~csaha/lectures/lec9.pdf # Another faster algorithm may be found at Adleman, Leonard M., and Hendrik W. Lenstra. "Finding irreducible polynomials over finite fields." Proceedings of the eighteenth annual ACM symposium on Theory of computing. ACM, 1986. # Prepare the finite field characteristic (2^p - 1), this also represent the maximum possible value in this field root_charac = 2 # we're in GF(2) field_charac = int(root_charac**c_exp - 1) field_charac_next = int(root_charac**(c_exp+1) - 1) prim_candidates = [] if fast_primes: prim_candidates = rwh_primes1(field_charac_next) # generate maybe prime polynomials and check later if they really are irreducible prim_candidates = [x for x in prim_candidates if x > field_charac] # filter out too small primes else: prim_candidates = _range(field_charac+2, field_charac_next, root_charac) # try each possible prime polynomial, but skip even numbers (because divisible by 2 so necessarily not irreducible) # Start of the main loop correct_primes = [] for prim in prim_candidates: # try potential candidates primitive irreducible polys seen = bytearray(field_charac+1) # memory variable to indicate if a value was already generated in the field (value at index x is set to 1) or not (set to 0 by default) conflict = False # flag to know if there was at least one conflict # Second loop, build the whole Galois Field x = GF2int(1) for i in _range(field_charac): # Compute the next value in the field (ie, the next power of alpha/generator) x = x.multiply(generator, prim, field_charac+1) # Rejection criterion: if the value overflowed (above field_charac) or is a duplicate of a previously generated power of alpha, then we reject this polynomial (not prime) if x > field_charac or seen[x] == 1: conflict = True break # Else we flag this value as seen (to maybe detect future duplicates), and we continue onto the next power of alpha else: seen[x] = 1 # End of the second loop: if there's no conflict (no overflow nor duplicated value), this is a prime polynomial! if not conflict: correct_primes.append(prim) if single: return prim # Return the list of all prime polynomials return correct_primes
[ "def", "find_prime_polynomials", "(", "generator", "=", "2", ",", "c_exp", "=", "8", ",", "fast_primes", "=", "False", ",", "single", "=", "False", ")", ":", "# fast_primes will output less results but will be significantly faster.", "# single will output the first prime polynomial found, so if all you want is to just find one prime polynomial to generate the LUT for Reed-Solomon to work, then just use that.", "# A prime polynomial (necessarily irreducible) is necessary to reduce the multiplications in the Galois Field, so as to avoid overflows.", "# Why do we need a \"prime polynomial\"? Can't we just reduce modulo 255 (for GF(2^8) for example)? Because we need the values to be unique.", "# For example: if the generator (alpha) = 2 and c_exp = 8 (GF(2^8) == GF(256)), then the generated Galois Field (0, 1, α, α^1, α^2, ..., α^(p-1)) will be galois field it becomes 0, 1, 2, 4, 8, 16, etc. However, upon reaching 128, the next value will be doubled (ie, next power of 2), which will give 256. Then we must reduce, because we have overflowed above the maximum value of 255. But, if we modulo 255, this will generate 256 == 1. Then 2, 4, 8, 16, etc. giving us a repeating pattern of numbers. This is very bad, as it's then not anymore a bijection (ie, a non-zero value doesn't have a unique index). That's why we can't just modulo 255, but we need another number above 255, which is called the prime polynomial.", "# Why so much hassle? Because we are using precomputed look-up tables for multiplication: instead of multiplying a*b, we precompute alpha^a, alpha^b and alpha^(a+b), so that we can just use our lookup table at alpha^(a+b) and get our result. But just like in our original field we had 0,1,2,...,p-1 distinct unique values, in our \"LUT\" field using alpha we must have unique distinct values (we don't care that they are different from the original field as long as they are unique and distinct). That's why we need to avoid duplicated values, and to avoid duplicated values we need to use a prime irreducible polynomial.", "# Here is implemented a bruteforce approach to find all these prime polynomials, by generating every possible prime polynomials (ie, every integers between field_charac+1 and field_charac*2), and then we build the whole Galois Field, and we reject the candidate prime polynomial if it duplicates even one value or if it generates a value above field_charac (ie, cause an overflow).", "# Note that this algorithm is slow if the field is too big (above 12), because it's an exhaustive search algorithm. There are probabilistic approaches, and almost surely prime approaches, but there is no determistic polynomial time algorithm to find irreducible monic polynomials. More info can be found at: http://people.mpi-inf.mpg.de/~csaha/lectures/lec9.pdf", "# Another faster algorithm may be found at Adleman, Leonard M., and Hendrik W. Lenstra. \"Finding irreducible polynomials over finite fields.\" Proceedings of the eighteenth annual ACM symposium on Theory of computing. ACM, 1986.", "# Prepare the finite field characteristic (2^p - 1), this also represent the maximum possible value in this field", "root_charac", "=", "2", "# we're in GF(2)", "field_charac", "=", "int", "(", "root_charac", "**", "c_exp", "-", "1", ")", "field_charac_next", "=", "int", "(", "root_charac", "**", "(", "c_exp", "+", "1", ")", "-", "1", ")", "prim_candidates", "=", "[", "]", "if", "fast_primes", ":", "prim_candidates", "=", "rwh_primes1", "(", "field_charac_next", ")", "# generate maybe prime polynomials and check later if they really are irreducible", "prim_candidates", "=", "[", "x", "for", "x", "in", "prim_candidates", "if", "x", ">", "field_charac", "]", "# filter out too small primes", "else", ":", "prim_candidates", "=", "_range", "(", "field_charac", "+", "2", ",", "field_charac_next", ",", "root_charac", ")", "# try each possible prime polynomial, but skip even numbers (because divisible by 2 so necessarily not irreducible)", "# Start of the main loop", "correct_primes", "=", "[", "]", "for", "prim", "in", "prim_candidates", ":", "# try potential candidates primitive irreducible polys", "seen", "=", "bytearray", "(", "field_charac", "+", "1", ")", "# memory variable to indicate if a value was already generated in the field (value at index x is set to 1) or not (set to 0 by default)", "conflict", "=", "False", "# flag to know if there was at least one conflict", "# Second loop, build the whole Galois Field", "x", "=", "GF2int", "(", "1", ")", "for", "i", "in", "_range", "(", "field_charac", ")", ":", "# Compute the next value in the field (ie, the next power of alpha/generator)", "x", "=", "x", ".", "multiply", "(", "generator", ",", "prim", ",", "field_charac", "+", "1", ")", "# Rejection criterion: if the value overflowed (above field_charac) or is a duplicate of a previously generated power of alpha, then we reject this polynomial (not prime)", "if", "x", ">", "field_charac", "or", "seen", "[", "x", "]", "==", "1", ":", "conflict", "=", "True", "break", "# Else we flag this value as seen (to maybe detect future duplicates), and we continue onto the next power of alpha", "else", ":", "seen", "[", "x", "]", "=", "1", "# End of the second loop: if there's no conflict (no overflow nor duplicated value), this is a prime polynomial!", "if", "not", "conflict", ":", "correct_primes", ".", "append", "(", "prim", ")", "if", "single", ":", "return", "prim", "# Return the list of all prime polynomials", "return", "correct_primes" ]
Compute the list of prime polynomials for the given generator and galois field characteristic exponent.
[ "Compute", "the", "list", "of", "prime", "polynomials", "for", "the", "given", "generator", "and", "galois", "field", "characteristic", "exponent", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/ff.py#L69-L121
train
Compute the list of prime polynomials for the given generator and galois field characteristic exponent.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5Ku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Nqd1bagO6,QNQS9e6tJqMV,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1734 - 1686) + '\x6f' + chr(652 - 602) + '\062' + chr(2381 - 2330), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1010010 + 0o35) + '\x32' + '\067' + chr(1770 - 1719), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + chr(50) + '\x32', 0o10), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1101111) + chr(55) + chr(0b100 + 0o62), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + '\x34' + '\x32', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1000 + 0o147) + chr(0b10011 + 0o41) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(1996 - 1948) + chr(0b111011 + 0o64) + chr(0b1 + 0o61) + chr(0b110110) + chr(54), 60048 - 60040), nzTpIcepk0o8(chr(0b110000) + chr(0b10110 + 0o131) + chr(51) + chr(785 - 731), 65438 - 65430), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + chr(2258 - 2206) + '\063', 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\062' + '\x36' + chr(960 - 909), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1000011 + 0o54) + '\x31' + chr(55), 41576 - 41568), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(111) + '\066' + chr(53), 46670 - 46662), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11001 + 0o30) + chr(2554 - 2500) + chr(0b10000 + 0o44), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1010100 + 0o33) + chr(50) + '\065' + '\063', 23997 - 23989), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(944 - 833) + chr(1373 - 1323) + '\063' + chr(0b110011), 64900 - 64892), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(111) + '\061' + chr(48) + '\066', 0b1000), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b1001100 + 0o43) + chr(51) + '\066', 8), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(1051 - 940) + chr(0b11 + 0o56) + '\x37' + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(0b110101) + chr(0b11001 + 0o33), 28088 - 28080), nzTpIcepk0o8(chr(0b110000) + chr(0b101011 + 0o104) + '\x35' + '\064', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + '\062' + '\x33', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + chr(52) + chr(0b110001 + 0o6), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(50) + chr(0b101 + 0o55) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b110101) + '\066', 5542 - 5534), nzTpIcepk0o8(chr(0b110000) + chr(0b100010 + 0o115) + chr(0b1010 + 0o51), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010) + chr(0b101110 + 0o6) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(1071 - 1023) + chr(0b1001010 + 0o45) + chr(50) + chr(50), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + '\065' + '\060', 44587 - 44579), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + '\064' + '\x30', 0o10), nzTpIcepk0o8(chr(48) + chr(10853 - 10742) + '\x35', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + chr(0b110100) + '\x31', 50775 - 50767), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b101011 + 0o6) + '\067' + chr(0b110101), 9446 - 9438), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1310 - 1261) + '\x37' + '\x35', 8), nzTpIcepk0o8(chr(1263 - 1215) + '\157' + chr(0b100 + 0o55) + chr(51) + chr(1296 - 1241), 0o10), nzTpIcepk0o8(chr(1283 - 1235) + '\x6f' + chr(0b101011 + 0o7) + '\063' + chr(0b110111), 0o10), nzTpIcepk0o8('\x30' + chr(0b1000000 + 0o57) + '\061' + chr(54), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + chr(0b110110) + chr(0b111 + 0o53), ord("\x08")), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(111) + '\062' + chr(0b110 + 0o56) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + chr(2525 - 2471), 8), nzTpIcepk0o8('\x30' + chr(9207 - 9096) + '\x33' + chr(0b10000 + 0o46) + chr(751 - 702), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1871 - 1823) + chr(0b1101111) + '\x35' + chr(0b100101 + 0o13), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xbd'), '\144' + '\x65' + chr(0b1011110 + 0o5) + chr(0b1101111) + chr(0b0 + 0o144) + '\145')('\165' + chr(11555 - 11439) + chr(0b1001100 + 0o32) + chr(0b1101 + 0o40) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def b5ykkfBJeszl(utrvLf8Qjpjk=nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101110 + 0o1) + '\x32', ord("\x08")), kOldCzQvrHFu=nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(1340 - 1229) + chr(0b110001) + chr(48), ord("\x08")), N1z7gruMyc63=nzTpIcepk0o8(chr(0b110000) + chr(0b100000 + 0o117) + chr(0b100010 + 0o16), 0b1000), sMOkKa20uKiC=nzTpIcepk0o8(chr(797 - 749) + chr(5391 - 5280) + '\x30', 8)): bXeJIzx5uNzM = nzTpIcepk0o8(chr(48) + chr(2523 - 2412) + chr(2339 - 2289), 8) r2S5hBmJ_9QZ = nzTpIcepk0o8(bXeJIzx5uNzM ** kOldCzQvrHFu - nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061', 0o10)) fNbpCSM5Albu = nzTpIcepk0o8(bXeJIzx5uNzM ** (kOldCzQvrHFu + nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(111) + chr(49), 8)) - nzTpIcepk0o8('\060' + chr(6451 - 6340) + chr(49), 8)) SRSIAzAagKpR = [] if N1z7gruMyc63: SRSIAzAagKpR = n4VoqWZPobZq(fNbpCSM5Albu) SRSIAzAagKpR = [bI5jsQ9OkQtj for bI5jsQ9OkQtj in SRSIAzAagKpR if bI5jsQ9OkQtj > r2S5hBmJ_9QZ] else: SRSIAzAagKpR = tpoEqV5cEG2w(r2S5hBmJ_9QZ + nzTpIcepk0o8('\060' + chr(0b1011011 + 0o24) + chr(0b110010), 8), fNbpCSM5Albu, bXeJIzx5uNzM) e9lWo8kw1Fip = [] for NX_Q3jNq1TRI in SRSIAzAagKpR: Exa2os6rsBY0 = MdkNqd1bagO6(r2S5hBmJ_9QZ + nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061', 8)) iOdbm50gY9eE = nzTpIcepk0o8('\x30' + '\x6f' + '\x30', 8) bI5jsQ9OkQtj = ZiH1BRUzc8JN(nzTpIcepk0o8(chr(442 - 394) + chr(0b1101111) + chr(1161 - 1112), 8)) for ZlbFMSG8gCoF in tpoEqV5cEG2w(r2S5hBmJ_9QZ): bI5jsQ9OkQtj = bI5jsQ9OkQtj.multiply(utrvLf8Qjpjk, NX_Q3jNq1TRI, r2S5hBmJ_9QZ + nzTpIcepk0o8('\x30' + '\157' + '\x31', 8)) if bI5jsQ9OkQtj > r2S5hBmJ_9QZ or Exa2os6rsBY0[bI5jsQ9OkQtj] == nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31', 8): iOdbm50gY9eE = nzTpIcepk0o8(chr(0b10 + 0o56) + '\157' + '\061', 8) break else: Exa2os6rsBY0[bI5jsQ9OkQtj] = nzTpIcepk0o8('\x30' + chr(0b1011000 + 0o27) + '\061', 8) if not iOdbm50gY9eE: roI3spqORKae(e9lWo8kw1Fip, roI3spqORKae(ES5oEprVxulp(b'\xdb\xef\x81\n\x1a@\xf1q\x89\xdcZ\x00'), chr(0b1100100) + chr(101) + '\x63' + '\157' + '\144' + chr(0b1100101))(chr(0b1110101) + '\164' + '\x66' + chr(1043 - 998) + '\070'))(NX_Q3jNq1TRI) if sMOkKa20uKiC: return NX_Q3jNq1TRI return e9lWo8kw1Fip
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/ff.py
init_lut
def init_lut(generator=3, prim=0x11b, c_exp=8): '''Precompute the logarithm and anti-log (look-up) tables for faster computation later, using the provided primitive polynomial. These tables are used for multiplication/division since addition/substraction are simple XOR operations inside GF of characteristic 2. The basic idea is quite simple: since b**(log_b(x), log_b(y)) == x * y given any number b (the base or generator of the logarithm), then we can use any number b to precompute logarithm and anti-log (exponentiation) tables to use for multiplying two numbers x and y. That's why when we use a different base/generator number, the log and anti-log tables are drastically different, but the resulting computations are the same given any such tables. For more infos, see https://en.wikipedia.org/wiki/Finite_field_arithmetic#Implementation_tricks ''' # generator is the generator number (the "increment" that will be used to walk through the field by multiplication, this must be a prime number). This is basically the base of the logarithm/anti-log tables. Also often noted "alpha" in academic books. # prim is the primitive/prime (binary) polynomial and must be irreducible (it can't represented as the product of two smaller polynomials). It's a polynomial in the binary sense: each bit is a coefficient, but in fact it's an integer between 0 and 255, and not a list of gf values. For more infos: http://research.swtch.com/field # note that the choice of generator or prime polynomial doesn't matter very much: any two finite fields of size p^n have identical structure, even if they give the individual elements different names (ie, the coefficients of the codeword will be different, but the final result will be the same: you can always correct as many errors/erasures with any choice for those parameters). That's why it makes sense to refer to all the finite fields, and all decoders based on Reed-Solomon, of size p^n as one concept: GF(p^n). It can however impact sensibly the speed (because some parameters will generate sparser tables). global GF2int_exptable, GF2int_logtable, GF2_charac, GF2_c_exp GF2_charac = int(2**c_exp - 1) GF2_c_exp = int(c_exp) exptable = [-1] * (GF2_charac+1) # anti-log (exponential) table. The first two elements will always be [GF2int(1), generator] logtable = [-1] * (GF2_charac+1) # log table, log[0] is impossible and thus unused # Construct the anti-log table # It's basically the cumulative product of 1 by the generator number, on and on and on until you have walked through the whole field. # That's why exptable is always dense (all entries are filled), but logtable may be sparse (lots of empty values, because multiple logtable's entries point to the same exptable's entry). g = GF2int(1) for i in range(GF2_charac+1): # note that the last item of exptable will always be equal to the first item in the table, because g^p==g^0 because of the modulo p (we're in a finite field!). exptable[i] = g # compute anti-log for this value and store it in a table #logtable[g] = i # compute logtable at the same time as exptable (but log[1] will always be equal to g^255, which may be weird when compared to lists of logtables online but this is equivalent) g = g.multiply(generator, prim, GF2_charac+1) # equivalent to: g = generator**(i+1) # Construct the log table # Ignore the last element of the field because fields wrap back around. # The log of 1 can have two values: either g^0 (the exact value change depending on parameters) or it could be 255 (g^255=1) because of the wraparound # Note that either way, this does not change anything any output later (ie, the ecc symbols will be the same either way). for i, x in enumerate(exptable[:-1]): logtable[x] = i # Optimization: convert to integer arrays GF2int_exptable = array.array('i', exptable) GF2int_logtable = array.array('i', logtable) return GF2int_exptable, GF2int_logtable
python
def init_lut(generator=3, prim=0x11b, c_exp=8): '''Precompute the logarithm and anti-log (look-up) tables for faster computation later, using the provided primitive polynomial. These tables are used for multiplication/division since addition/substraction are simple XOR operations inside GF of characteristic 2. The basic idea is quite simple: since b**(log_b(x), log_b(y)) == x * y given any number b (the base or generator of the logarithm), then we can use any number b to precompute logarithm and anti-log (exponentiation) tables to use for multiplying two numbers x and y. That's why when we use a different base/generator number, the log and anti-log tables are drastically different, but the resulting computations are the same given any such tables. For more infos, see https://en.wikipedia.org/wiki/Finite_field_arithmetic#Implementation_tricks ''' # generator is the generator number (the "increment" that will be used to walk through the field by multiplication, this must be a prime number). This is basically the base of the logarithm/anti-log tables. Also often noted "alpha" in academic books. # prim is the primitive/prime (binary) polynomial and must be irreducible (it can't represented as the product of two smaller polynomials). It's a polynomial in the binary sense: each bit is a coefficient, but in fact it's an integer between 0 and 255, and not a list of gf values. For more infos: http://research.swtch.com/field # note that the choice of generator or prime polynomial doesn't matter very much: any two finite fields of size p^n have identical structure, even if they give the individual elements different names (ie, the coefficients of the codeword will be different, but the final result will be the same: you can always correct as many errors/erasures with any choice for those parameters). That's why it makes sense to refer to all the finite fields, and all decoders based on Reed-Solomon, of size p^n as one concept: GF(p^n). It can however impact sensibly the speed (because some parameters will generate sparser tables). global GF2int_exptable, GF2int_logtable, GF2_charac, GF2_c_exp GF2_charac = int(2**c_exp - 1) GF2_c_exp = int(c_exp) exptable = [-1] * (GF2_charac+1) # anti-log (exponential) table. The first two elements will always be [GF2int(1), generator] logtable = [-1] * (GF2_charac+1) # log table, log[0] is impossible and thus unused # Construct the anti-log table # It's basically the cumulative product of 1 by the generator number, on and on and on until you have walked through the whole field. # That's why exptable is always dense (all entries are filled), but logtable may be sparse (lots of empty values, because multiple logtable's entries point to the same exptable's entry). g = GF2int(1) for i in range(GF2_charac+1): # note that the last item of exptable will always be equal to the first item in the table, because g^p==g^0 because of the modulo p (we're in a finite field!). exptable[i] = g # compute anti-log for this value and store it in a table #logtable[g] = i # compute logtable at the same time as exptable (but log[1] will always be equal to g^255, which may be weird when compared to lists of logtables online but this is equivalent) g = g.multiply(generator, prim, GF2_charac+1) # equivalent to: g = generator**(i+1) # Construct the log table # Ignore the last element of the field because fields wrap back around. # The log of 1 can have two values: either g^0 (the exact value change depending on parameters) or it could be 255 (g^255=1) because of the wraparound # Note that either way, this does not change anything any output later (ie, the ecc symbols will be the same either way). for i, x in enumerate(exptable[:-1]): logtable[x] = i # Optimization: convert to integer arrays GF2int_exptable = array.array('i', exptable) GF2int_logtable = array.array('i', logtable) return GF2int_exptable, GF2int_logtable
[ "def", "init_lut", "(", "generator", "=", "3", ",", "prim", "=", "0x11b", ",", "c_exp", "=", "8", ")", ":", "# generator is the generator number (the \"increment\" that will be used to walk through the field by multiplication, this must be a prime number). This is basically the base of the logarithm/anti-log tables. Also often noted \"alpha\" in academic books.", "# prim is the primitive/prime (binary) polynomial and must be irreducible (it can't represented as the product of two smaller polynomials). It's a polynomial in the binary sense: each bit is a coefficient, but in fact it's an integer between 0 and 255, and not a list of gf values. For more infos: http://research.swtch.com/field", "# note that the choice of generator or prime polynomial doesn't matter very much: any two finite fields of size p^n have identical structure, even if they give the individual elements different names (ie, the coefficients of the codeword will be different, but the final result will be the same: you can always correct as many errors/erasures with any choice for those parameters). That's why it makes sense to refer to all the finite fields, and all decoders based on Reed-Solomon, of size p^n as one concept: GF(p^n). It can however impact sensibly the speed (because some parameters will generate sparser tables).", "global", "GF2int_exptable", ",", "GF2int_logtable", ",", "GF2_charac", ",", "GF2_c_exp", "GF2_charac", "=", "int", "(", "2", "**", "c_exp", "-", "1", ")", "GF2_c_exp", "=", "int", "(", "c_exp", ")", "exptable", "=", "[", "-", "1", "]", "*", "(", "GF2_charac", "+", "1", ")", "# anti-log (exponential) table. The first two elements will always be [GF2int(1), generator]", "logtable", "=", "[", "-", "1", "]", "*", "(", "GF2_charac", "+", "1", ")", "# log table, log[0] is impossible and thus unused", "# Construct the anti-log table", "# It's basically the cumulative product of 1 by the generator number, on and on and on until you have walked through the whole field.", "# That's why exptable is always dense (all entries are filled), but logtable may be sparse (lots of empty values, because multiple logtable's entries point to the same exptable's entry).", "g", "=", "GF2int", "(", "1", ")", "for", "i", "in", "range", "(", "GF2_charac", "+", "1", ")", ":", "# note that the last item of exptable will always be equal to the first item in the table, because g^p==g^0 because of the modulo p (we're in a finite field!).", "exptable", "[", "i", "]", "=", "g", "# compute anti-log for this value and store it in a table", "#logtable[g] = i # compute logtable at the same time as exptable (but log[1] will always be equal to g^255, which may be weird when compared to lists of logtables online but this is equivalent)", "g", "=", "g", ".", "multiply", "(", "generator", ",", "prim", ",", "GF2_charac", "+", "1", ")", "# equivalent to: g = generator**(i+1)", "# Construct the log table", "# Ignore the last element of the field because fields wrap back around.", "# The log of 1 can have two values: either g^0 (the exact value change depending on parameters) or it could be 255 (g^255=1) because of the wraparound", "# Note that either way, this does not change anything any output later (ie, the ecc symbols will be the same either way).", "for", "i", ",", "x", "in", "enumerate", "(", "exptable", "[", ":", "-", "1", "]", ")", ":", "logtable", "[", "x", "]", "=", "i", "# Optimization: convert to integer arrays", "GF2int_exptable", "=", "array", ".", "array", "(", "'i'", ",", "exptable", ")", "GF2int_logtable", "=", "array", ".", "array", "(", "'i'", ",", "logtable", ")", "return", "GF2int_exptable", ",", "GF2int_logtable" ]
Precompute the logarithm and anti-log (look-up) tables for faster computation later, using the provided primitive polynomial. These tables are used for multiplication/division since addition/substraction are simple XOR operations inside GF of characteristic 2. The basic idea is quite simple: since b**(log_b(x), log_b(y)) == x * y given any number b (the base or generator of the logarithm), then we can use any number b to precompute logarithm and anti-log (exponentiation) tables to use for multiplying two numbers x and y. That's why when we use a different base/generator number, the log and anti-log tables are drastically different, but the resulting computations are the same given any such tables. For more infos, see https://en.wikipedia.org/wiki/Finite_field_arithmetic#Implementation_tricks
[ "Precompute", "the", "logarithm", "and", "anti", "-", "log", "(", "look", "-", "up", ")", "tables", "for", "faster", "computation", "later", "using", "the", "provided", "primitive", "polynomial", ".", "These", "tables", "are", "used", "for", "multiplication", "/", "division", "since", "addition", "/", "substraction", "are", "simple", "XOR", "operations", "inside", "GF", "of", "characteristic", "2", ".", "The", "basic", "idea", "is", "quite", "simple", ":", "since", "b", "**", "(", "log_b", "(", "x", ")", "log_b", "(", "y", "))", "==", "x", "*", "y", "given", "any", "number", "b", "(", "the", "base", "or", "generator", "of", "the", "logarithm", ")", "then", "we", "can", "use", "any", "number", "b", "to", "precompute", "logarithm", "and", "anti", "-", "log", "(", "exponentiation", ")", "tables", "to", "use", "for", "multiplying", "two", "numbers", "x", "and", "y", ".", "That", "s", "why", "when", "we", "use", "a", "different", "base", "/", "generator", "number", "the", "log", "and", "anti", "-", "log", "tables", "are", "drastically", "different", "but", "the", "resulting", "computations", "are", "the", "same", "given", "any", "such", "tables", ".", "For", "more", "infos", "see", "https", ":", "//", "en", ".", "wikipedia", ".", "org", "/", "wiki", "/", "Finite_field_arithmetic#Implementation_tricks" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/ff.py#L123-L159
train
Initialize the logarithm and anti - log tables for fast computation later using the provided primitive polynomial.
GiP5xwVCF98Z,B3LV8Eo811Ma,b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ticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(2052 - 2004) + '\157' + chr(52) + chr(1411 - 1357), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(53) + chr(0b110101 + 0o0), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(1129 - 1078) + chr(0b110100) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(5202 - 5091) + '\062' + chr(485 - 436) + '\063', 4707 - 4699), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + '\060' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(431 - 383) + chr(111) + '\062' + chr(1779 - 1729) + chr(0b110101), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(270 - 220) + chr(373 - 325) + chr(684 - 632), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\063' + chr(0b1100 + 0o45) + chr(2282 - 2227), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + chr(1778 - 1730) + '\062', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(0b110110 + 0o0), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\157' + chr(2446 - 2393) + chr(529 - 476), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100000 + 0o23) + '\066' + '\062', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2366 - 2317) + chr(0b110110) + chr(268 - 219), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + chr(1181 - 1128) + '\065', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x36' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(5938 - 5827) + chr(0b110011) + chr(0b10010 + 0o41) + chr(0b110010), 28789 - 28781), nzTpIcepk0o8('\060' + '\157' + chr(1445 - 1394) + '\x31', 19780 - 19772), nzTpIcepk0o8(chr(0b11101 + 0o23) + '\x6f' + chr(829 - 778) + chr(1333 - 1284) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(613 - 565) + chr(0b1101111) + chr(1616 - 1567) + '\x32' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(817 - 765) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\x6f' + chr(1711 - 1661) + chr(1867 - 1818) + chr(2064 - 2015), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(985 - 936) + chr(0b110000 + 0o5) + chr(55), 51234 - 51226), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + chr(55) + chr(86 - 38), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1010101 + 0o32) + chr(0b110001) + '\066' + chr(50), 19333 - 19325), nzTpIcepk0o8('\x30' + '\157' + chr(190 - 140) + chr(0b110101) + chr(48), 932 - 924), nzTpIcepk0o8(chr(1853 - 1805) + '\157' + chr(51) + '\062' + chr(55), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + chr(55) + chr(0b100000 + 0o26), 1862 - 1854), nzTpIcepk0o8(chr(0b110000) + chr(2476 - 2365) + '\x33' + chr(0b11111 + 0o30) + '\x36', 0b1000), nzTpIcepk0o8(chr(1798 - 1750) + '\157' + '\x35' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + '\x36' + chr(50), 8), nzTpIcepk0o8('\060' + chr(0b11011 + 0o124) + '\x31' + '\x30' + chr(0b10000 + 0o41), 35901 - 35893), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(111) + chr(0b110010) + '\064' + chr(55), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(1450 - 1397) + chr(0b101011 + 0o6), 0o10), nzTpIcepk0o8(chr(361 - 313) + chr(0b1101111) + chr(49) + '\064' + chr(2078 - 2029), 28181 - 28173), nzTpIcepk0o8(chr(48) + chr(0b1100001 + 0o16) + chr(643 - 594) + chr(0b110000) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b1000100 + 0o53) + chr(49) + chr(55) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + chr(0b100010 + 0o17) + '\x31', 8), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(111) + chr(674 - 624) + chr(0b110011 + 0o2), 0b1000), nzTpIcepk0o8(chr(1559 - 1511) + chr(8740 - 8629) + '\062' + chr(0b100111 + 0o14) + '\x35', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(4924 - 4813) + '\065' + '\x30', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x08'), '\x64' + chr(101) + chr(9672 - 9573) + '\157' + chr(100) + chr(4926 - 4825))(chr(117) + chr(1014 - 898) + chr(4035 - 3933) + chr(0b101101) + chr(0b11101 + 0o33)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Z4uR94PzxUiH(utrvLf8Qjpjk=nzTpIcepk0o8(chr(48) + chr(0b111001 + 0o66) + chr(0b1011 + 0o50), 0o10), NX_Q3jNq1TRI=nzTpIcepk0o8('\060' + chr(0b1001 + 0o146) + '\x34' + '\063' + chr(1836 - 1785), ord("\x08")), kOldCzQvrHFu=nzTpIcepk0o8(chr(0b100111 + 0o11) + '\157' + '\061' + '\x30', 0b1000)): global jKH9lxogj4bQ, PuZIAQHc3IJ1, BJoPfT87cCoj, ATJABfA18PFP BJoPfT87cCoj = nzTpIcepk0o8(nzTpIcepk0o8(chr(0b100 + 0o54) + chr(0b1101111) + chr(50), 55518 - 55510) ** kOldCzQvrHFu - nzTpIcepk0o8(chr(48) + chr(111) + '\061', 0o10)) ATJABfA18PFP = nzTpIcepk0o8(kOldCzQvrHFu) VTD_Nm261K90 = [-nzTpIcepk0o8(chr(48) + '\157' + chr(0b111 + 0o52), 8)] * (BJoPfT87cCoj + nzTpIcepk0o8(chr(1637 - 1589) + '\157' + chr(0b101111 + 0o2), 8)) zAhBLRxbdOzA = [-nzTpIcepk0o8(chr(0b110000) + chr(0b100000 + 0o117) + chr(693 - 644), 8)] * (BJoPfT87cCoj + nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1458 - 1409), 8)) KQq7Z9J63zv1 = ZiH1BRUzc8JN(nzTpIcepk0o8(chr(64 - 16) + chr(111) + chr(0b110001), 8)) for ZlbFMSG8gCoF in bbT2xIe5pzk7(BJoPfT87cCoj + nzTpIcepk0o8(chr(0b100111 + 0o11) + '\x6f' + '\x31', 8)): VTD_Nm261K90[ZlbFMSG8gCoF] = KQq7Z9J63zv1 KQq7Z9J63zv1 = KQq7Z9J63zv1.multiply(utrvLf8Qjpjk, NX_Q3jNq1TRI, BJoPfT87cCoj + nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001), 8)) for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(VTD_Nm261K90[:-nzTpIcepk0o8('\060' + '\x6f' + '\x31', 8)]): zAhBLRxbdOzA[bI5jsQ9OkQtj] = ZlbFMSG8gCoF jKH9lxogj4bQ = Tn6rGr7XTM7t.Tn6rGr7XTM7t(roI3spqORKae(ES5oEprVxulp(b'O'), chr(0b1100100) + chr(0b1100100 + 0o1) + chr(99) + chr(2069 - 1958) + '\144' + '\x65')('\x75' + chr(0b1110100) + '\146' + chr(0b101101) + '\x38'), VTD_Nm261K90) PuZIAQHc3IJ1 = Tn6rGr7XTM7t.Tn6rGr7XTM7t(roI3spqORKae(ES5oEprVxulp(b'O'), chr(5931 - 5831) + '\145' + chr(0b111110 + 0o45) + chr(0b10010 + 0o135) + chr(100) + chr(0b1100101))('\x75' + '\164' + '\146' + chr(0b101101) + chr(0b1100 + 0o54)), zAhBLRxbdOzA) return (jKH9lxogj4bQ, PuZIAQHc3IJ1)
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/ff.py
GF2int._to_binpoly
def _to_binpoly(x): '''Convert a Galois Field's number into a nice polynomial''' if x <= 0: return "0" b = 1 # init to 2^0 = 1 c = [] # stores the degrees of each term of the polynomials i = 0 # counter for b = 2^i while x > 0: b = (1 << i) # generate a number power of 2: 2^0, 2^1, 2^2, ..., 2^i. Equivalent to b = 2^i if x & b : # then check if x is divisible by the power of 2. Equivalent to x % 2^i == 0 # If yes, then... c.append(i) # append this power (i, the exponent, gives us the coefficient) x ^= b # and compute the remainder of x / b i = i+1 # increment to compute the next power of 2 return " + ".join(["x^%i" % y for y in c[::-1]])
python
def _to_binpoly(x): '''Convert a Galois Field's number into a nice polynomial''' if x <= 0: return "0" b = 1 # init to 2^0 = 1 c = [] # stores the degrees of each term of the polynomials i = 0 # counter for b = 2^i while x > 0: b = (1 << i) # generate a number power of 2: 2^0, 2^1, 2^2, ..., 2^i. Equivalent to b = 2^i if x & b : # then check if x is divisible by the power of 2. Equivalent to x % 2^i == 0 # If yes, then... c.append(i) # append this power (i, the exponent, gives us the coefficient) x ^= b # and compute the remainder of x / b i = i+1 # increment to compute the next power of 2 return " + ".join(["x^%i" % y for y in c[::-1]])
[ "def", "_to_binpoly", "(", "x", ")", ":", "if", "x", "<=", "0", ":", "return", "\"0\"", "b", "=", "1", "# init to 2^0 = 1", "c", "=", "[", "]", "# stores the degrees of each term of the polynomials", "i", "=", "0", "# counter for b = 2^i", "while", "x", ">", "0", ":", "b", "=", "(", "1", "<<", "i", ")", "# generate a number power of 2: 2^0, 2^1, 2^2, ..., 2^i. Equivalent to b = 2^i", "if", "x", "&", "b", ":", "# then check if x is divisible by the power of 2. Equivalent to x % 2^i == 0", "# If yes, then...", "c", ".", "append", "(", "i", ")", "# append this power (i, the exponent, gives us the coefficient)", "x", "^=", "b", "# and compute the remainder of x / b", "i", "=", "i", "+", "1", "# increment to compute the next power of 2", "return", "\" + \"", ".", "join", "(", "[", "\"x^%i\"", "%", "y", "for", "y", "in", "c", "[", ":", ":", "-", "1", "]", "]", ")" ]
Convert a Galois Field's number into a nice polynomial
[ "Convert", "a", "Galois", "Field", "s", "number", "into", "a", "nice", "polynomial" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/ff.py#L250-L263
train
Convert a Galois Field s number into a nice polynomial
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW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A_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(10212 - 10101) + chr(2209 - 2154) + chr(802 - 753), 0o10), nzTpIcepk0o8(chr(351 - 303) + chr(0b1011000 + 0o27) + '\067' + chr(2075 - 2020), ord("\x08")), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(7323 - 7212) + '\062' + chr(563 - 513) + chr(0b11001 + 0o33), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1000101 + 0o52) + chr(53) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\066' + chr(0b110100), 0b1000), nzTpIcepk0o8('\060' + chr(8282 - 8171) + '\x31' + '\x32' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(0b1101111) + chr(51) + chr(1485 - 1436) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(55) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b100100 + 0o113) + '\x32' + '\061' + chr(0b110000 + 0o7), 0b1000), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(111) + '\063' + chr(856 - 803) + '\066', 46411 - 46403), nzTpIcepk0o8(chr(237 - 189) + chr(0b110010 + 0o75) + chr(0b11000 + 0o32) + chr(54) + chr(1788 - 1733), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b10101 + 0o132) + '\061' + '\062' + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(5033 - 4922) + chr(0b11100 + 0o25) + '\064' + chr(0b10101 + 0o41), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + chr(672 - 620) + chr(52), 0b1000), nzTpIcepk0o8(chr(861 - 813) + chr(0b1001111 + 0o40) + chr(0b10011 + 0o36) + chr(2647 - 2593), 0o10), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\x6f' + chr(867 - 818), 0o10), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\157' + chr(0b10000 + 0o43) + chr(52) + chr(51), 22665 - 22657), nzTpIcepk0o8('\060' + '\157' + chr(54) + chr(644 - 593), 16701 - 16693), nzTpIcepk0o8(chr(48) + chr(111) + '\x36' + chr(49), 0b1000), nzTpIcepk0o8(chr(2227 - 2179) + '\157' + chr(0b101111 + 0o2) + chr(0b110 + 0o52) + chr(1802 - 1747), 18806 - 18798), nzTpIcepk0o8(chr(1494 - 1446) + chr(0b1100101 + 0o12) + chr(49) + chr(54) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + chr(1095 - 1044) + '\x35', 63023 - 63015), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b10000 + 0o137) + chr(0b110001) + '\x37' + chr(0b110 + 0o57), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101010 + 0o11) + '\063' + chr(0b11101 + 0o24), 0b1000), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(2249 - 2138) + '\061' + '\065', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + chr(0b1010 + 0o50) + chr(930 - 882), 49675 - 49667), nzTpIcepk0o8('\x30' + chr(0b1000111 + 0o50) + chr(922 - 873), 8), nzTpIcepk0o8('\x30' + chr(111) + chr(369 - 320) + chr(54) + chr(0b110100), 8), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b1101111) + chr(50) + chr(0b100010 + 0o23) + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b110110 + 0o71) + '\x32' + '\x37' + chr(0b110101), 0o10), nzTpIcepk0o8('\060' + '\157' + '\x37' + chr(2817 - 2762), 8), nzTpIcepk0o8(chr(1008 - 960) + '\x6f' + chr(50) + chr(52) + chr(0b101010 + 0o11), 0o10), nzTpIcepk0o8(chr(671 - 623) + chr(0b111001 + 0o66) + '\063' + chr(53) + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(6611 - 6500) + chr(0b101110 + 0o5) + '\x30' + '\067', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001), 8), nzTpIcepk0o8(chr(2119 - 2071) + chr(0b1101111) + chr(795 - 744) + '\063' + chr(0b10101 + 0o37), 52378 - 52370), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + chr(0b110001) + chr(0b110011), 35247 - 35239), nzTpIcepk0o8('\x30' + chr(8251 - 8140) + chr(531 - 480) + chr(51) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(1044 - 996) + chr(111) + chr(0b110011) + chr(0b100111 + 0o15) + chr(0b110011 + 0o1), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x35' + chr(0b1010 + 0o46), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x17'), '\144' + '\145' + chr(1995 - 1896) + '\x6f' + chr(100) + chr(0b1100101))(chr(1510 - 1393) + chr(0b1110100) + chr(102) + '\055' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def VbByEnichoa_(bI5jsQ9OkQtj): if bI5jsQ9OkQtj <= nzTpIcepk0o8(chr(48) + chr(0b1101001 + 0o6) + chr(0b101000 + 0o10), 0o10): return roI3spqORKae(ES5oEprVxulp(b'\t'), chr(0b10000 + 0o124) + chr(8585 - 8484) + '\x63' + '\x6f' + '\x64' + chr(0b1100101))(chr(117) + chr(0b10010 + 0o142) + chr(102) + '\x2d' + '\x38') xFDEVQn5qSdh = nzTpIcepk0o8(chr(0b11111 + 0o21) + '\x6f' + chr(0b1001 + 0o50), 8) teUmM7cKWZUa = [] ZlbFMSG8gCoF = nzTpIcepk0o8(chr(0b100101 + 0o13) + '\157' + '\x30', 8) while bI5jsQ9OkQtj > nzTpIcepk0o8(chr(0b110000) + chr(0b1011010 + 0o25) + chr(0b110000), 8): xFDEVQn5qSdh = nzTpIcepk0o8('\x30' + chr(0b1100010 + 0o15) + chr(965 - 916), 8) << ZlbFMSG8gCoF if bI5jsQ9OkQtj & xFDEVQn5qSdh: roI3spqORKae(teUmM7cKWZUa, roI3spqORKae(ES5oEprVxulp(b'qk\xc7\x1bL6\x8b\x7f\xd1\xe0\xbb\x82'), '\x64' + chr(0b1100101) + '\143' + chr(111) + chr(100) + '\145')(chr(0b1110010 + 0o3) + '\x74' + chr(102) + chr(0b101101) + chr(0b111000)))(ZlbFMSG8gCoF) bI5jsQ9OkQtj ^= xFDEVQn5qSdh ZlbFMSG8gCoF = ZlbFMSG8gCoF + nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b100 + 0o55), 8) return roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\x19\x14\xb4'), chr(100) + '\x65' + chr(0b1100011) + chr(0b0 + 0o157) + '\x64' + chr(0b1100101))('\165' + chr(444 - 328) + chr(0b1100110) + '\x2d' + chr(56)), roI3spqORKae(ES5oEprVxulp(b'`\x0b\xedb\r\x13\xafv\xef\xcc\xa0\xc6'), chr(0b1100100) + chr(101) + chr(99) + chr(111) + '\x64' + chr(0b1011011 + 0o12))(chr(117) + chr(116) + chr(0b111000 + 0o56) + chr(0b100010 + 0o13) + '\x38'))([roI3spqORKae(ES5oEprVxulp(b'Aa\xb1F'), chr(100) + chr(0b1100101) + chr(8624 - 8525) + chr(7239 - 7128) + chr(0b1100100) + chr(0b1100101))('\x75' + '\x74' + chr(0b1100110) + chr(0b0 + 0o55) + chr(56)) % Fi3yzxctM1zW for Fi3yzxctM1zW in teUmM7cKWZUa[::-nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001), 8)]])
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/ff.py
GF2int.multiply
def multiply(a, b, prim=0x11b, field_charac_full=256, carryless=True): '''A slow multiply method. This method gives the same results as the other __mul__ method but without needing precomputed tables, thus it can be used to generate those tables. If prim is set to 0 and carryless=False, the function produces the result of a standard multiplication of integers (outside of a finite field, ie, no modular reduction and no carry-less operations). This procedure is called Russian Peasant Multiplication algorithm, which is just a general algorithm to multiply two integers together. The only two differences that you need to account for when doing multiplication in a finite field (as opposed to just integers) are: 1- carry-less addition and substraction (XOR in GF(2^p)) 2- modular reduction (to avoid duplicate values in the field) using a prime polynomial ''' r = 0 a = int(a) b = int(b) while b: # while b is not 0 if b & 1: r = r ^ a if carryless else r + a # b is odd, then add the corresponding a to r (the sum of all a's corresponding to odd b's will give the final product). Note that since we're in GF(2), the addition is in fact an XOR (very important because in GF(2) the multiplication and additions are carry-less, thus it changes the result!). b = b >> 1 # equivalent to b // 2 a = a << 1 # equivalent to a*2 if prim > 0 and a & field_charac_full: a = a ^ prim # GF modulo: if a >= 256 then apply modular reduction using the primitive polynomial (we just substract, but since the primitive number can be above 256 then we directly XOR). return GF2int(r)
python
def multiply(a, b, prim=0x11b, field_charac_full=256, carryless=True): '''A slow multiply method. This method gives the same results as the other __mul__ method but without needing precomputed tables, thus it can be used to generate those tables. If prim is set to 0 and carryless=False, the function produces the result of a standard multiplication of integers (outside of a finite field, ie, no modular reduction and no carry-less operations). This procedure is called Russian Peasant Multiplication algorithm, which is just a general algorithm to multiply two integers together. The only two differences that you need to account for when doing multiplication in a finite field (as opposed to just integers) are: 1- carry-less addition and substraction (XOR in GF(2^p)) 2- modular reduction (to avoid duplicate values in the field) using a prime polynomial ''' r = 0 a = int(a) b = int(b) while b: # while b is not 0 if b & 1: r = r ^ a if carryless else r + a # b is odd, then add the corresponding a to r (the sum of all a's corresponding to odd b's will give the final product). Note that since we're in GF(2), the addition is in fact an XOR (very important because in GF(2) the multiplication and additions are carry-less, thus it changes the result!). b = b >> 1 # equivalent to b // 2 a = a << 1 # equivalent to a*2 if prim > 0 and a & field_charac_full: a = a ^ prim # GF modulo: if a >= 256 then apply modular reduction using the primitive polynomial (we just substract, but since the primitive number can be above 256 then we directly XOR). return GF2int(r)
[ "def", "multiply", "(", "a", ",", "b", ",", "prim", "=", "0x11b", ",", "field_charac_full", "=", "256", ",", "carryless", "=", "True", ")", ":", "r", "=", "0", "a", "=", "int", "(", "a", ")", "b", "=", "int", "(", "b", ")", "while", "b", ":", "# while b is not 0", "if", "b", "&", "1", ":", "r", "=", "r", "^", "a", "if", "carryless", "else", "r", "+", "a", "# b is odd, then add the corresponding a to r (the sum of all a's corresponding to odd b's will give the final product). Note that since we're in GF(2), the addition is in fact an XOR (very important because in GF(2) the multiplication and additions are carry-less, thus it changes the result!).", "b", "=", "b", ">>", "1", "# equivalent to b // 2", "a", "=", "a", "<<", "1", "# equivalent to a*2", "if", "prim", ">", "0", "and", "a", "&", "field_charac_full", ":", "a", "=", "a", "^", "prim", "# GF modulo: if a >= 256 then apply modular reduction using the primitive polynomial (we just substract, but since the primitive number can be above 256 then we directly XOR).", "return", "GF2int", "(", "r", ")" ]
A slow multiply method. This method gives the same results as the other __mul__ method but without needing precomputed tables, thus it can be used to generate those tables. If prim is set to 0 and carryless=False, the function produces the result of a standard multiplication of integers (outside of a finite field, ie, no modular reduction and no carry-less operations). This procedure is called Russian Peasant Multiplication algorithm, which is just a general algorithm to multiply two integers together. The only two differences that you need to account for when doing multiplication in a finite field (as opposed to just integers) are: 1- carry-less addition and substraction (XOR in GF(2^p)) 2- modular reduction (to avoid duplicate values in the field) using a prime polynomial
[ "A", "slow", "multiply", "method", ".", "This", "method", "gives", "the", "same", "results", "as", "the", "other", "__mul__", "method", "but", "without", "needing", "precomputed", "tables", "thus", "it", "can", "be", "used", "to", "generate", "those", "tables", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/ff.py#L265-L287
train
A slow multiplication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PkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(2305 - 2250), 0o10), nzTpIcepk0o8(chr(159 - 111) + chr(3742 - 3631) + '\063' + chr(0b100110 + 0o16) + chr(48), 0o10), nzTpIcepk0o8(chr(1853 - 1805) + '\x6f' + '\x33' + chr(54) + '\060', 0b1000), nzTpIcepk0o8(chr(1780 - 1732) + chr(0b101000 + 0o107) + chr(50) + chr(1386 - 1335) + '\x30', 11256 - 11248), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(0b100000 + 0o26) + chr(52), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(0b110100) + chr(0b101 + 0o54), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(53) + chr(1858 - 1803), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b1011 + 0o50) + chr(0b100011 + 0o16) + '\x31', 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b10011 + 0o134) + chr(50) + '\063' + chr(2465 - 2414), ord("\x08")), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\157' + '\062' + '\065' + '\066', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b100010 + 0o115) + chr(1553 - 1503) + chr(0b1111 + 0o45), 26021 - 26013), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + '\066' + chr(1767 - 1718), 27616 - 27608), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + '\x36', 0b1000), nzTpIcepk0o8('\x30' + chr(558 - 447) + chr(49) + chr(1202 - 1152) + chr(0b110011), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b1 + 0o61) + '\061' + chr(0b110101), 13291 - 13283), nzTpIcepk0o8('\x30' + '\157' + chr(50) + chr(1253 - 1202) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101111) + '\062' + chr(49) + chr(54), 64318 - 64310), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(111) + chr(0b10 + 0o57) + '\065' + chr(0b100010 + 0o21), ord("\x08")), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\157' + '\x32' + chr(51) + chr(51), 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + '\063' + '\063', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1053 - 1002) + chr(724 - 673) + chr(0b10011 + 0o44), 0b1000), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\x6f' + chr(53) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(1723 - 1675) + chr(0b1101111) + chr(50) + chr(0b11011 + 0o25) + chr(55), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\063' + chr(0b100110 + 0o17) + chr(0b110010), 50240 - 50232), nzTpIcepk0o8('\060' + chr(11494 - 11383) + chr(2223 - 2173) + '\062' + chr(0b11001 + 0o27), 0o10), nzTpIcepk0o8('\060' + chr(6146 - 6035) + chr(49) + chr(0b110111) + '\x31', 10834 - 10826), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(51) + chr(54), 63329 - 63321), nzTpIcepk0o8(chr(1816 - 1768) + chr(7383 - 7272) + chr(51) + chr(0b110101) + chr(0b110011), 0b1000), nzTpIcepk0o8('\060' + chr(0b1111 + 0o140) + chr(0b10100 + 0o37) + chr(0b10110 + 0o33) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + chr(0b100001 + 0o26) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1011110 + 0o21) + chr(0b110010) + '\x32' + '\x35', 2476 - 2468), nzTpIcepk0o8('\060' + chr(111) + chr(0b10011 + 0o36) + chr(0b101010 + 0o12) + chr(49), 48882 - 48874), nzTpIcepk0o8('\060' + '\157' + '\066' + chr(0b101000 + 0o10), 2330 - 2322), nzTpIcepk0o8(chr(1884 - 1836) + '\157' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(48) + chr(4631 - 4520) + chr(50) + chr(50) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + '\064' + chr(1157 - 1109), 478 - 470), nzTpIcepk0o8(chr(48) + chr(0b100110 + 0o111) + chr(450 - 401) + chr(52) + chr(0b101 + 0o57), 63868 - 63860), nzTpIcepk0o8(chr(1890 - 1842) + '\157' + '\063' + chr(55) + chr(55), 0o10), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b1101111) + chr(1083 - 1034) + chr(0b110110) + chr(48), 0o10), nzTpIcepk0o8(chr(2297 - 2249) + chr(4521 - 4410) + chr(54) + '\x36', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\x6f' + chr(0b100100 + 0o21) + chr(0b10100 + 0o34), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'9'), '\144' + chr(783 - 682) + chr(0b110101 + 0o56) + chr(0b101011 + 0o104) + chr(0b1100100) + '\145')(chr(5434 - 5317) + chr(116) + chr(0b1100110) + '\055' + chr(286 - 230)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Jbww5BpwNUZT(AQ9ceR9AaoT1, xFDEVQn5qSdh, NX_Q3jNq1TRI=nzTpIcepk0o8(chr(0b110000) + chr(0b10100 + 0o133) + '\064' + chr(0b10110 + 0o35) + '\x33', ord("\x08")), uAnhB3Pbsp11=nzTpIcepk0o8(chr(48) + chr(0b1000011 + 0o54) + '\064' + '\060' + '\x30', 0o10), F4w4uHdQYgPJ=nzTpIcepk0o8(chr(48) + '\x6f' + chr(49), 0b1000)): LCrwg7lcbmU9 = nzTpIcepk0o8('\060' + chr(0b11000 + 0o127) + chr(0b110000), 0o10) AQ9ceR9AaoT1 = nzTpIcepk0o8(AQ9ceR9AaoT1) xFDEVQn5qSdh = nzTpIcepk0o8(xFDEVQn5qSdh) while xFDEVQn5qSdh: if xFDEVQn5qSdh & nzTpIcepk0o8(chr(0b110000) + chr(3087 - 2976) + chr(1506 - 1457), 8): LCrwg7lcbmU9 = LCrwg7lcbmU9 ^ AQ9ceR9AaoT1 if F4w4uHdQYgPJ else LCrwg7lcbmU9 + AQ9ceR9AaoT1 xFDEVQn5qSdh = xFDEVQn5qSdh >> nzTpIcepk0o8('\x30' + chr(111) + chr(0b1000 + 0o51), 8) AQ9ceR9AaoT1 = AQ9ceR9AaoT1 << nzTpIcepk0o8(chr(48) + '\157' + chr(1057 - 1008), 8) if NX_Q3jNq1TRI > nzTpIcepk0o8(chr(437 - 389) + chr(0b1000111 + 0o50) + chr(1524 - 1476), 8) and AQ9ceR9AaoT1 & uAnhB3Pbsp11: AQ9ceR9AaoT1 = AQ9ceR9AaoT1 ^ NX_Q3jNq1TRI return ZiH1BRUzc8JN(LCrwg7lcbmU9)
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/ff.py
GF2int.multiply_slow
def multiply_slow(x, y, prim=0x11b): '''Another equivalent (but even slower) way to compute multiplication in Galois Fields without using a precomputed look-up table. This is the form you will most often see in academic literature, by using the standard carry-less multiplication + modular reduction using an irreducible prime polynomial.''' ### Define bitwise carry-less operations as inner functions ### def cl_mult(x,y): '''Bitwise carry-less multiplication on integers''' z = 0 i = 0 while (y>>i) > 0: if y & (1<<i): z ^= x<<i i += 1 return z def bit_length(n): '''Compute the position of the most significant bit (1) of an integer. Equivalent to int.bit_length()''' bits = 0 while n >> bits: bits += 1 return bits def cl_div(dividend, divisor=None): '''Bitwise carry-less long division on integers and returns the remainder''' # Compute the position of the most significant bit for each integers dl1 = bit_length(dividend) dl2 = bit_length(divisor) # If the dividend is smaller than the divisor, just exit if dl1 < dl2: return dividend # Else, align the most significant 1 of the divisor to the most significant 1 of the dividend (by shifting the divisor) for i in _range(dl1-dl2,-1,-1): # Check that the dividend is divisible (useless for the first iteration but important for the next ones) if dividend & (1 << i+dl2-1): # If divisible, then shift the divisor to align the most significant bits and XOR (carry-less substraction) dividend ^= divisor << i return dividend ### Main GF multiplication routine ### # Multiply the gf numbers result = cl_mult(x,y) # Then do a modular reduction (ie, remainder from the division) with an irreducible primitive polynomial so that it stays inside GF bounds if prim > 0: result = cl_div(result, prim) return result
python
def multiply_slow(x, y, prim=0x11b): '''Another equivalent (but even slower) way to compute multiplication in Galois Fields without using a precomputed look-up table. This is the form you will most often see in academic literature, by using the standard carry-less multiplication + modular reduction using an irreducible prime polynomial.''' ### Define bitwise carry-less operations as inner functions ### def cl_mult(x,y): '''Bitwise carry-less multiplication on integers''' z = 0 i = 0 while (y>>i) > 0: if y & (1<<i): z ^= x<<i i += 1 return z def bit_length(n): '''Compute the position of the most significant bit (1) of an integer. Equivalent to int.bit_length()''' bits = 0 while n >> bits: bits += 1 return bits def cl_div(dividend, divisor=None): '''Bitwise carry-less long division on integers and returns the remainder''' # Compute the position of the most significant bit for each integers dl1 = bit_length(dividend) dl2 = bit_length(divisor) # If the dividend is smaller than the divisor, just exit if dl1 < dl2: return dividend # Else, align the most significant 1 of the divisor to the most significant 1 of the dividend (by shifting the divisor) for i in _range(dl1-dl2,-1,-1): # Check that the dividend is divisible (useless for the first iteration but important for the next ones) if dividend & (1 << i+dl2-1): # If divisible, then shift the divisor to align the most significant bits and XOR (carry-less substraction) dividend ^= divisor << i return dividend ### Main GF multiplication routine ### # Multiply the gf numbers result = cl_mult(x,y) # Then do a modular reduction (ie, remainder from the division) with an irreducible primitive polynomial so that it stays inside GF bounds if prim > 0: result = cl_div(result, prim) return result
[ "def", "multiply_slow", "(", "x", ",", "y", ",", "prim", "=", "0x11b", ")", ":", "### Define bitwise carry-less operations as inner functions ###", "def", "cl_mult", "(", "x", ",", "y", ")", ":", "'''Bitwise carry-less multiplication on integers'''", "z", "=", "0", "i", "=", "0", "while", "(", "y", ">>", "i", ")", ">", "0", ":", "if", "y", "&", "(", "1", "<<", "i", ")", ":", "z", "^=", "x", "<<", "i", "i", "+=", "1", "return", "z", "def", "bit_length", "(", "n", ")", ":", "'''Compute the position of the most significant bit (1) of an integer. Equivalent to int.bit_length()'''", "bits", "=", "0", "while", "n", ">>", "bits", ":", "bits", "+=", "1", "return", "bits", "def", "cl_div", "(", "dividend", ",", "divisor", "=", "None", ")", ":", "'''Bitwise carry-less long division on integers and returns the remainder'''", "# Compute the position of the most significant bit for each integers", "dl1", "=", "bit_length", "(", "dividend", ")", "dl2", "=", "bit_length", "(", "divisor", ")", "# If the dividend is smaller than the divisor, just exit", "if", "dl1", "<", "dl2", ":", "return", "dividend", "# Else, align the most significant 1 of the divisor to the most significant 1 of the dividend (by shifting the divisor)", "for", "i", "in", "_range", "(", "dl1", "-", "dl2", ",", "-", "1", ",", "-", "1", ")", ":", "# Check that the dividend is divisible (useless for the first iteration but important for the next ones)", "if", "dividend", "&", "(", "1", "<<", "i", "+", "dl2", "-", "1", ")", ":", "# If divisible, then shift the divisor to align the most significant bits and XOR (carry-less substraction)", "dividend", "^=", "divisor", "<<", "i", "return", "dividend", "### Main GF multiplication routine ###", "# Multiply the gf numbers", "result", "=", "cl_mult", "(", "x", ",", "y", ")", "# Then do a modular reduction (ie, remainder from the division) with an irreducible primitive polynomial so that it stays inside GF bounds", "if", "prim", ">", "0", ":", "result", "=", "cl_div", "(", "result", ",", "prim", ")", "return", "result" ]
Another equivalent (but even slower) way to compute multiplication in Galois Fields without using a precomputed look-up table. This is the form you will most often see in academic literature, by using the standard carry-less multiplication + modular reduction using an irreducible prime polynomial.
[ "Another", "equivalent", "(", "but", "even", "slower", ")", "way", "to", "compute", "multiplication", "in", "Galois", "Fields", "without", "using", "a", "precomputed", "look", "-", "up", "table", ".", "This", "is", "the", "form", "you", "will", "most", "often", "see", "in", "academic", "literature", "by", "using", "the", "standard", "carry", "-", "less", "multiplication", "+", "modular", "reduction", "using", "an", "irreducible", "prime", "polynomial", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib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WDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(0b1100011 + 0o14) + '\x37' + chr(2452 - 2399), 0o10), nzTpIcepk0o8(chr(452 - 404) + '\157' + '\062' + '\x30' + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(76 - 26) + chr(48) + '\x34', ord("\x08")), nzTpIcepk0o8('\060' + chr(5141 - 5030) + '\x33' + '\x32' + chr(1473 - 1424), 0o10), nzTpIcepk0o8(chr(837 - 789) + chr(12182 - 12071) + '\061' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(1051 - 1003) + '\157' + chr(49) + chr(52) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(1033 - 985) + chr(0b1101111) + chr(50) + '\063' + chr(0b101001 + 0o10), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(0b110110) + chr(0b110110), 32375 - 32367), nzTpIcepk0o8(chr(48) + chr(0b110110 + 0o71) + chr(0b101111 + 0o2) + chr(0b110100) + chr(1796 - 1747), 0o10), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(111) + '\x33' + chr(0b110100) + '\066', 37021 - 37013), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b10 + 0o155) + '\061' + chr(49) + chr(69 - 15), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b11 + 0o56) + chr(0b110111) + chr(0b1000 + 0o54), 0b1000), nzTpIcepk0o8('\060' + chr(1663 - 1552) + chr(0b110011) + chr(0b110100) + '\x36', 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + '\067' + chr(494 - 439), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + '\061' + chr(0b10111 + 0o40), 0b1000), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\x6f' + chr(0b0 + 0o63) + chr(0b110100) + '\064', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + chr(0b100001 + 0o21) + chr(51), 0o10), nzTpIcepk0o8(chr(1921 - 1873) + chr(0b1101111) + '\062' + chr(0b110101) + chr(0b11100 + 0o27), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\067' + chr(0b11001 + 0o31), 41163 - 41155), nzTpIcepk0o8(chr(553 - 505) + chr(111) + chr(0b1111 + 0o44) + chr(2133 - 2079) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + '\x6f' + '\065' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(111) + chr(1032 - 983) + chr(0b100110 + 0o13) + '\x33', 16725 - 16717), nzTpIcepk0o8(chr(484 - 436) + chr(0b1010110 + 0o31) + '\x33' + '\064' + '\060', 51890 - 51882), nzTpIcepk0o8(chr(488 - 440) + chr(5640 - 5529) + chr(1580 - 1530) + chr(750 - 702) + chr(0b11011 + 0o27), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b101111 + 0o4) + chr(0b100000 + 0o27) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11101 + 0o25) + chr(0b1 + 0o66) + chr(0b110000), 50632 - 50624), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(12129 - 12018) + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b11101 + 0o25) + chr(0b1100 + 0o44) + chr(566 - 514), 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1497 - 1446) + chr(52) + '\067', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(54) + chr(0b0 + 0o67), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(10601 - 10490) + chr(0b100 + 0o62) + chr(54), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b111 + 0o150) + chr(2007 - 1956) + chr(54) + chr(0b110000 + 0o5), 53097 - 53089), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(749 - 638) + chr(2523 - 2472) + chr(0b110101) + chr(54), 44617 - 44609), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + chr(0b110001) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b101000 + 0o107) + '\062' + '\x30' + chr(0b1101 + 0o43), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + chr(1434 - 1383) + '\063', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(55) + chr(0b11101 + 0o23), 26786 - 26778), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + '\x34' + chr(849 - 798), 30818 - 30810), nzTpIcepk0o8('\060' + '\157' + chr(52) + chr(0b10100 + 0o41), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b101101 + 0o102) + '\061' + '\062' + '\066', 13739 - 13731)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1607 - 1559) + chr(0b1101111) + chr(0b110101) + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x13'), chr(387 - 287) + '\x65' + chr(99) + '\x6f' + chr(0b1100100) + chr(5809 - 5708))(chr(0b1011000 + 0o35) + chr(116) + chr(9899 - 9797) + '\x2d' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def zGGmSTXs2BQX(bI5jsQ9OkQtj, Fi3yzxctM1zW, NX_Q3jNq1TRI=nzTpIcepk0o8(chr(1576 - 1528) + chr(10295 - 10184) + chr(453 - 401) + chr(51) + '\x33', 31522 - 31514)): def GgUNdRcqS1cG(bI5jsQ9OkQtj, Fi3yzxctM1zW): ZkpORfAzQ9Hw = nzTpIcepk0o8(chr(48) + chr(8892 - 8781) + chr(582 - 534), ord("\x08")) ZlbFMSG8gCoF = nzTpIcepk0o8(chr(2006 - 1958) + chr(588 - 477) + '\x30', 8) while Fi3yzxctM1zW >> ZlbFMSG8gCoF > nzTpIcepk0o8(chr(0b100000 + 0o20) + '\157' + chr(0b110000), 8): if Fi3yzxctM1zW & nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1023 - 974), 65500 - 65492) << ZlbFMSG8gCoF: ZkpORfAzQ9Hw ^= bI5jsQ9OkQtj << ZlbFMSG8gCoF ZlbFMSG8gCoF += nzTpIcepk0o8(chr(0b110000) + chr(0b1001001 + 0o46) + chr(0b11111 + 0o22), 8) return ZkpORfAzQ9Hw def xg_MIA7A135O(NoZxuO7wjArS): TFnKUIaosDDX = nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(6721 - 6610) + chr(1016 - 968), 8) while NoZxuO7wjArS >> TFnKUIaosDDX: TFnKUIaosDDX += nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(111) + '\x31', 8) return TFnKUIaosDDX def pgO_BfNaZi3U(ZWi94J6MYolQ, jmeC1TQzXJxs=None): UczHojZB8CMC = xg_MIA7A135O(ZWi94J6MYolQ) j5M87l_nDVWj = xg_MIA7A135O(jmeC1TQzXJxs) if UczHojZB8CMC < j5M87l_nDVWj: return ZWi94J6MYolQ for ZlbFMSG8gCoF in tpoEqV5cEG2w(UczHojZB8CMC - j5M87l_nDVWj, -nzTpIcepk0o8(chr(1130 - 1082) + chr(0b1101111) + chr(49), 8), -nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100001 + 0o20), 8)): if ZWi94J6MYolQ & nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49), 8) << ZlbFMSG8gCoF + j5M87l_nDVWj - nzTpIcepk0o8('\x30' + '\157' + chr(0b101011 + 0o6), 8): ZWi94J6MYolQ ^= jmeC1TQzXJxs << ZlbFMSG8gCoF return ZWi94J6MYolQ POx95m7SPOVy = GgUNdRcqS1cG(bI5jsQ9OkQtj, Fi3yzxctM1zW) if NX_Q3jNq1TRI > nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110000 + 0o0), 8): POx95m7SPOVy = pgO_BfNaZi3U(POx95m7SPOVy, NX_Q3jNq1TRI) return POx95m7SPOVy
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/runsnakerun/_meliaejson.py
loads
def loads( source ): """Load json structure from meliae from source Supports only the required structures to support loading meliae memory dumps """ source = source.strip() assert source.startswith( '{' ) assert source.endswith( '}' ) source = source[1:-1] result = {} for match in attr.finditer( source ): key = match.group('key') if match.group( 'list' ) is not None: value = [ int(x) for x in match.group( 'list' ).strip().replace(',',' ').split() ] elif match.group( 'int' ) is not None: value = int( match.group( 'int' )) elif match.group( 'string' ) is not None: def deescape( match ): return unichr( int( match.group(0)[2:], 16 )) value = match.group('string').decode( 'utf-8' ) value = escape.sub( deescape, value, ) value = simple_escape.sub( lambda x: x.group(1), value, ) else: raise RuntimeError( "Matched something we don't know how to process:", match.groupdict() ) result[key] = value return result
python
def loads( source ): """Load json structure from meliae from source Supports only the required structures to support loading meliae memory dumps """ source = source.strip() assert source.startswith( '{' ) assert source.endswith( '}' ) source = source[1:-1] result = {} for match in attr.finditer( source ): key = match.group('key') if match.group( 'list' ) is not None: value = [ int(x) for x in match.group( 'list' ).strip().replace(',',' ').split() ] elif match.group( 'int' ) is not None: value = int( match.group( 'int' )) elif match.group( 'string' ) is not None: def deescape( match ): return unichr( int( match.group(0)[2:], 16 )) value = match.group('string').decode( 'utf-8' ) value = escape.sub( deescape, value, ) value = simple_escape.sub( lambda x: x.group(1), value, ) else: raise RuntimeError( "Matched something we don't know how to process:", match.groupdict() ) result[key] = value return result
[ "def", "loads", "(", "source", ")", ":", "source", "=", "source", ".", "strip", "(", ")", "assert", "source", ".", "startswith", "(", "'{'", ")", "assert", "source", ".", "endswith", "(", "'}'", ")", "source", "=", "source", "[", "1", ":", "-", "1", "]", "result", "=", "{", "}", "for", "match", "in", "attr", ".", "finditer", "(", "source", ")", ":", "key", "=", "match", ".", "group", "(", "'key'", ")", "if", "match", ".", "group", "(", "'list'", ")", "is", "not", "None", ":", "value", "=", "[", "int", "(", "x", ")", "for", "x", "in", "match", ".", "group", "(", "'list'", ")", ".", "strip", "(", ")", ".", "replace", "(", "','", ",", "' '", ")", ".", "split", "(", ")", "]", "elif", "match", ".", "group", "(", "'int'", ")", "is", "not", "None", ":", "value", "=", "int", "(", "match", ".", "group", "(", "'int'", ")", ")", "elif", "match", ".", "group", "(", "'string'", ")", "is", "not", "None", ":", "def", "deescape", "(", "match", ")", ":", "return", "unichr", "(", "int", "(", "match", ".", "group", "(", "0", ")", "[", "2", ":", "]", ",", "16", ")", ")", "value", "=", "match", ".", "group", "(", "'string'", ")", ".", "decode", "(", "'utf-8'", ")", "value", "=", "escape", ".", "sub", "(", "deescape", ",", "value", ",", ")", "value", "=", "simple_escape", ".", "sub", "(", "lambda", "x", ":", "x", ".", "group", "(", "1", ")", ",", "value", ",", ")", "else", ":", "raise", "RuntimeError", "(", "\"Matched something we don't know how to process:\"", ",", "match", ".", "groupdict", "(", ")", ")", "result", "[", "key", "]", "=", "value", "return", "result" ]
Load json structure from meliae from source Supports only the required structures to support loading meliae memory dumps
[ "Load", "json", "structure", "from", "meliae", "from", "source", "Supports", "only", "the", "required", "structures", "to", "support", "loading", "meliae", "memory", "dumps" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/runsnakerun/_meliaejson.py#L40-L74
train
Load json structure from meliae from source Supports only the required structures to support loading meliae memory dumps
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBr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k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1101111) + '\x34', 0o10), nzTpIcepk0o8(chr(1115 - 1067) + chr(0b1010101 + 0o32) + '\x33' + chr(0b110110), 41877 - 41869), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10000 + 0o43) + '\061' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100101 + 0o17) + '\x34', 0o10), nzTpIcepk0o8(chr(48) + chr(6868 - 6757) + '\x33' + chr(0b110111) + chr(2083 - 2034), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(0b11110 + 0o23) + chr(54), 58 - 50), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + chr(51) + '\x34', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x32' + chr(2279 - 2228) + '\067', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1010011 + 0o34) + chr(130 - 80) + chr(1899 - 1845) + '\061', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110111) + '\061', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + '\067' + chr(0b10110 + 0o33), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(51), 0o10), nzTpIcepk0o8(chr(1989 - 1941) + chr(111) + chr(0b110001) + chr(0b100000 + 0o24) + chr(52), 0o10), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(111) + chr(50) + '\067' + chr(0b10100 + 0o35), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(2942 - 2831) + '\x35' + chr(53), 0o10), nzTpIcepk0o8(chr(1340 - 1292) + '\x6f' + '\062' + '\x31' + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\062' + chr(2825 - 2770) + '\x37', 0o10), nzTpIcepk0o8('\x30' + chr(0b101011 + 0o104) + '\063' + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b11100 + 0o33) + '\x32', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + '\x32' + chr(0b110111), 33068 - 33060), nzTpIcepk0o8('\x30' + '\157' + chr(0b11100 + 0o27) + chr(0b110001) + chr(0b10011 + 0o42), 15676 - 15668), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b101010 + 0o10) + chr(2343 - 2289) + chr(1889 - 1836), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b1010 + 0o51) + chr(332 - 279) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b1001001 + 0o46) + chr(0b110111) + chr(51), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(0b100100 + 0o17) + chr(51), 56375 - 56367), nzTpIcepk0o8(chr(812 - 764) + chr(0b1001100 + 0o43) + chr(1125 - 1074) + '\x37', 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\065' + chr(0b110011), 5533 - 5525), nzTpIcepk0o8('\060' + chr(111) + '\x37' + chr(0b10010 + 0o36), 18684 - 18676), nzTpIcepk0o8('\060' + '\x6f' + chr(0b0 + 0o61) + '\067' + '\062', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + chr(53) + chr(0b110011), 0b1000), nzTpIcepk0o8('\060' + chr(0b101001 + 0o106) + chr(51) + chr(0b110111) + chr(0b11000 + 0o33), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(53) + chr(0b110011 + 0o2), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + '\x32', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(0b110000) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\x6f' + '\x32' + '\x31' + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + chr(49) + '\060' + '\065', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(5034 - 4923) + '\061' + '\x31' + chr(2701 - 2647), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110000 + 0o7) + chr(0b100100 + 0o23), 62417 - 62409)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(8980 - 8869) + chr(53) + '\x30', 21152 - 21144)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'*'), chr(502 - 402) + chr(8080 - 7979) + chr(0b1100011) + chr(5598 - 5487) + '\x64' + chr(101))(chr(0b10000 + 0o145) + chr(116) + chr(0b1100110) + chr(1073 - 1028) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def OiapAM4bM0Ea(TRsEnjL8YDa6): TRsEnjL8YDa6 = TRsEnjL8YDa6.kdIDrcwZTCs5() assert roI3spqORKae(TRsEnjL8YDa6, roI3spqORKae(ES5oEprVxulp(b'wj\xa8V\x8d\xbd\xeb\xf6\xc5Q'), chr(0b1100100) + '\145' + chr(0b11010 + 0o111) + '\x6f' + chr(0b1100100) + chr(0b1011110 + 0o7))('\x75' + '\x74' + chr(2298 - 2196) + chr(0b11010 + 0o23) + chr(304 - 248)))(roI3spqORKae(ES5oEprVxulp(b'\x7f'), chr(0b1100011 + 0o1) + '\x65' + chr(0b1100011) + '\x6f' + chr(0b1010011 + 0o21) + '\145')('\165' + '\164' + '\x66' + chr(1236 - 1191) + chr(56))) assert roI3spqORKae(TRsEnjL8YDa6, roI3spqORKae(ES5oEprVxulp(b"M'\xafo\xb0\x8d\xdd\xd3\xd0L3y"), chr(959 - 859) + chr(0b1100101) + '\x63' + '\157' + chr(100) + chr(0b1100101))('\x75' + chr(9740 - 9624) + '\x66' + chr(0b10010 + 0o33) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'y'), chr(100) + chr(2696 - 2595) + chr(0b1100011) + '\x6f' + chr(100) + chr(101))('\x75' + chr(116) + chr(0b1100110) + '\x2d' + chr(2866 - 2810))) TRsEnjL8YDa6 = TRsEnjL8YDa6[nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(702 - 653), 0o10):-nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1011100 + 0o23) + '\061', 8)] POx95m7SPOVy = {} for hk9OijmiC_zA in roI3spqORKae(H7gzb3fKphmE, roI3spqORKae(ES5oEprVxulp(b'bw\xa7@\x90\xba\xf9\xed'), chr(0b111010 + 0o52) + chr(101) + chr(6798 - 6699) + chr(0b1101111) + '\144' + chr(101))(chr(0b1001001 + 0o54) + chr(0b1110100) + '\x66' + chr(0b11100 + 0o21) + chr(56)))(TRsEnjL8YDa6): QYodcsDtoGq7 = hk9OijmiC_zA.F9lJ8RbIonqb(roI3spqORKae(ES5oEprVxulp(b'o{\xb0'), chr(100) + chr(101) + '\143' + chr(0b1101111) + chr(100) + chr(0b1100101))(chr(2732 - 2615) + chr(0b1101100 + 0o10) + chr(102) + '\055' + chr(412 - 356))) if roI3spqORKae(hk9OijmiC_zA, roI3spqORKae(ES5oEprVxulp(b"B'\xa5n\xc1\x9c\xfe\xd6\xdeW\x08i"), chr(0b1100100) + '\145' + chr(0b1100000 + 0o3) + '\x6f' + chr(1615 - 1515) + chr(101))(chr(0b1000101 + 0o60) + chr(0b1110100) + '\146' + '\x2d' + chr(970 - 914)))(roI3spqORKae(ES5oEprVxulp(b'hw\xbaP'), chr(5815 - 5715) + chr(6303 - 6202) + chr(0b111111 + 0o44) + '\157' + chr(100) + chr(9232 - 9131))(chr(117) + chr(4261 - 4145) + chr(6550 - 6448) + chr(0b101101) + '\070')) is not None: uV9iBiw0y_Mp = [nzTpIcepk0o8(bI5jsQ9OkQtj) for bI5jsQ9OkQtj in hk9OijmiC_zA.group(roI3spqORKae(ES5oEprVxulp(b'hw\xbaP'), chr(0b10111 + 0o115) + chr(101) + chr(0b1100011) + chr(0b110110 + 0o71) + chr(2052 - 1952) + chr(0b1100101))(chr(1352 - 1235) + '\164' + '\x66' + '\055' + chr(1378 - 1322))).strip().replace(roI3spqORKae(ES5oEprVxulp(b'('), chr(148 - 48) + chr(101) + chr(0b1100011) + '\157' + chr(0b1001000 + 0o34) + '\145')(chr(11005 - 10888) + chr(116) + chr(0b100101 + 0o101) + '\055' + '\070'), roI3spqORKae(ES5oEprVxulp(b'$'), chr(9416 - 9316) + '\x65' + '\x63' + '\x6f' + '\x64' + chr(101))('\165' + chr(0b1110100) + chr(0b110100 + 0o62) + chr(45) + chr(0b111000))).LfRrQOxuDvnC()] elif roI3spqORKae(hk9OijmiC_zA, roI3spqORKae(ES5oEprVxulp(b"B'\xa5n\xc1\x9c\xfe\xd6\xdeW\x08i"), chr(0b1011 + 0o131) + chr(101) + chr(0b1100011) + '\157' + chr(0b110000 + 0o64) + chr(0b1100101))(chr(117) + chr(354 - 238) + chr(0b1100110) + chr(0b101101) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'mp\xbd'), '\144' + chr(6553 - 6452) + chr(0b1100000 + 0o3) + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(0b1011 + 0o152) + '\x74' + chr(4482 - 4380) + chr(0b1001 + 0o44) + chr(2144 - 2088))) is not None: uV9iBiw0y_Mp = nzTpIcepk0o8(hk9OijmiC_zA.F9lJ8RbIonqb(roI3spqORKae(ES5oEprVxulp(b'mp\xbd'), chr(0b1001100 + 0o30) + '\145' + chr(99) + '\x6f' + chr(0b1100100) + chr(0b1100101))('\x75' + chr(1520 - 1404) + chr(0b1100110) + chr(0b100010 + 0o13) + chr(1906 - 1850)))) elif roI3spqORKae(hk9OijmiC_zA, roI3spqORKae(ES5oEprVxulp(b"B'\xa5n\xc1\x9c\xfe\xd6\xdeW\x08i"), chr(100) + chr(0b1000101 + 0o40) + chr(99) + chr(111) + chr(0b1010010 + 0o22) + chr(101))(chr(0b1011111 + 0o26) + chr(0b1010000 + 0o44) + chr(0b1010000 + 0o26) + chr(0b101101) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'wj\xbbM\x97\xa9'), chr(0b10101 + 0o117) + '\x65' + '\143' + chr(9867 - 9756) + chr(0b110011 + 0o61) + chr(0b1001000 + 0o35))(chr(2073 - 1956) + chr(0b1110100) + '\146' + '\x2d' + '\070')) is not None: def iyqOMp9Ek_fT(hk9OijmiC_zA): return qNlAMSCEknCS(nzTpIcepk0o8(roI3spqORKae(hk9OijmiC_zA, roI3spqORKae(ES5oEprVxulp(b"B'\xa5n\xc1\x9c\xfe\xd6\xdeW\x08i"), '\144' + '\x65' + '\143' + chr(111) + '\x64' + chr(101))('\165' + chr(12081 - 11965) + '\146' + chr(45) + chr(0b111000)))(nzTpIcepk0o8(chr(227 - 179) + chr(0b1101111) + chr(0b110000), 0o10))[nzTpIcepk0o8(chr(48) + chr(0b1101000 + 0o7) + '\x32', 8):], nzTpIcepk0o8('\x30' + '\157' + '\062' + chr(0b1001 + 0o47), 36907 - 36899))) uV9iBiw0y_Mp = hk9OijmiC_zA.group(roI3spqORKae(ES5oEprVxulp(b'wj\xbbM\x97\xa9'), chr(0b1101 + 0o127) + chr(0b1100101) + chr(0b100 + 0o137) + chr(0b1101111) + chr(100) + chr(0b100101 + 0o100))(chr(0b1110101) + chr(116) + chr(418 - 316) + '\055' + '\070')).lfbFsdWlT3MB(roI3spqORKae(ES5oEprVxulp(b'qj\xaf\t\xc1'), chr(0b1011010 + 0o12) + '\x65' + chr(0b101000 + 0o73) + '\x6f' + '\x64' + chr(0b1100101))(chr(0b1100011 + 0o22) + chr(116) + chr(0b1100110) + chr(0b100100 + 0o11) + '\x38')) uV9iBiw0y_Mp = lfFf1I73PDZv._zPndKq6xMgp(iyqOMp9Ek_fT, uV9iBiw0y_Mp) uV9iBiw0y_Mp = LlgJSXmFl6Uk._zPndKq6xMgp(lambda bI5jsQ9OkQtj: bI5jsQ9OkQtj.F9lJ8RbIonqb(nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001), 8)), uV9iBiw0y_Mp) else: raise _1qUu0gKi9gH(roI3spqORKae(ES5oEprVxulp(b'I\x7f\xbdG\x91\xab\xf8\xbf\xc2V\x14n\x10\xd1D\xe4\xd8?M\xf2\xeda\xdal\xcfO\xfbtEW\r\x8b\x93Be\xa4\xfd*nOvq\xaaA\x8a\xbd\xa6'), chr(3706 - 3606) + '\145' + chr(7190 - 7091) + chr(0b1101111) + chr(0b1100100) + chr(755 - 654))(chr(0b1101001 + 0o14) + '\x74' + chr(102) + chr(0b100 + 0o51) + '\x38'), roI3spqORKae(hk9OijmiC_zA, roI3spqORKae(ES5oEprVxulp(b'cl\xa6Q\x89\xaa\xf5\xfc\xc5'), chr(6812 - 6712) + '\x65' + chr(0b110100 + 0o57) + '\x6f' + chr(8013 - 7913) + chr(3611 - 3510))(chr(0b1110101) + chr(0b1001110 + 0o46) + chr(102) + '\055' + chr(0b111000)))()) POx95m7SPOVy[QYodcsDtoGq7] = uV9iBiw0y_Mp return POx95m7SPOVy
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/rs.py
RSCoder.encode
def encode(self, message, poly=False, k=None, return_string=True): '''Encode a given string or list of values (between 0 and gf2_charac) with reed-solomon encoding. Returns a list of values (or a string if return_string is true) with the k message bytes and n-k parity bytes at the end. If a message is < k bytes long, it is assumed to be padded at the front with null bytes. The sequence returned is always n bytes long. If poly is not False, returns the encoded Polynomial object instead of the polynomial translated back to a string (useful for debugging) ''' n = self.n if not k: k = self.k if len(message)>k: raise ValueError("Message length is max %d. Message was %d" % (k, len(message))) # If we were given a string, convert to a list (important to support fields above 2^8) if isinstance(message, _str): message = [ord(x) for x in message] # Encode message as a polynomial: m = Polynomial([GF2int(x) for x in message]) # Shift polynomial up by n-k by multiplying by x^(n-k) to reserve the first n-k coefficients for the ecc. This effectively pad the message with \0 bytes for the lower coefficients (where the ecc will be placed). mprime = m * Polynomial([GF2int(1)] + [GF2int(0)]*(n-k)) # mprime = q*g + b for some q # so let's find b, the code word (ecc block): b = mprime % self.g[k] # Subtract out b, so now c = q*g, which is a way of xoring mprime and code word b, which is a way of just saying that we append the polynomial ecc code to the original message (we replace the padded 0 bytes of mprime with the code word) c = mprime - b # Since c is a multiple of g, it has (at least) n-k roots: α^1 through # α^(n-k) if not poly: # Turn the polynomial c back into a string ret = self._list_rjust(c.coefficients, n, 0) # rjust is useful for the nostrip feature if return_string and self.gf2_charac < 256: ret = self._list2str(ret) else: ret = c return ret
python
def encode(self, message, poly=False, k=None, return_string=True): '''Encode a given string or list of values (between 0 and gf2_charac) with reed-solomon encoding. Returns a list of values (or a string if return_string is true) with the k message bytes and n-k parity bytes at the end. If a message is < k bytes long, it is assumed to be padded at the front with null bytes. The sequence returned is always n bytes long. If poly is not False, returns the encoded Polynomial object instead of the polynomial translated back to a string (useful for debugging) ''' n = self.n if not k: k = self.k if len(message)>k: raise ValueError("Message length is max %d. Message was %d" % (k, len(message))) # If we were given a string, convert to a list (important to support fields above 2^8) if isinstance(message, _str): message = [ord(x) for x in message] # Encode message as a polynomial: m = Polynomial([GF2int(x) for x in message]) # Shift polynomial up by n-k by multiplying by x^(n-k) to reserve the first n-k coefficients for the ecc. This effectively pad the message with \0 bytes for the lower coefficients (where the ecc will be placed). mprime = m * Polynomial([GF2int(1)] + [GF2int(0)]*(n-k)) # mprime = q*g + b for some q # so let's find b, the code word (ecc block): b = mprime % self.g[k] # Subtract out b, so now c = q*g, which is a way of xoring mprime and code word b, which is a way of just saying that we append the polynomial ecc code to the original message (we replace the padded 0 bytes of mprime with the code word) c = mprime - b # Since c is a multiple of g, it has (at least) n-k roots: α^1 through # α^(n-k) if not poly: # Turn the polynomial c back into a string ret = self._list_rjust(c.coefficients, n, 0) # rjust is useful for the nostrip feature if return_string and self.gf2_charac < 256: ret = self._list2str(ret) else: ret = c return ret
[ "def", "encode", "(", "self", ",", "message", ",", "poly", "=", "False", ",", "k", "=", "None", ",", "return_string", "=", "True", ")", ":", "n", "=", "self", ".", "n", "if", "not", "k", ":", "k", "=", "self", ".", "k", "if", "len", "(", "message", ")", ">", "k", ":", "raise", "ValueError", "(", "\"Message length is max %d. Message was %d\"", "%", "(", "k", ",", "len", "(", "message", ")", ")", ")", "# If we were given a string, convert to a list (important to support fields above 2^8)", "if", "isinstance", "(", "message", ",", "_str", ")", ":", "message", "=", "[", "ord", "(", "x", ")", "for", "x", "in", "message", "]", "# Encode message as a polynomial:", "m", "=", "Polynomial", "(", "[", "GF2int", "(", "x", ")", "for", "x", "in", "message", "]", ")", "# Shift polynomial up by n-k by multiplying by x^(n-k) to reserve the first n-k coefficients for the ecc. This effectively pad the message with \\0 bytes for the lower coefficients (where the ecc will be placed).", "mprime", "=", "m", "*", "Polynomial", "(", "[", "GF2int", "(", "1", ")", "]", "+", "[", "GF2int", "(", "0", ")", "]", "*", "(", "n", "-", "k", ")", ")", "# mprime = q*g + b for some q", "# so let's find b, the code word (ecc block):", "b", "=", "mprime", "%", "self", ".", "g", "[", "k", "]", "# Subtract out b, so now c = q*g, which is a way of xoring mprime and code word b, which is a way of just saying that we append the polynomial ecc code to the original message (we replace the padded 0 bytes of mprime with the code word)", "c", "=", "mprime", "-", "b", "# Since c is a multiple of g, it has (at least) n-k roots: α^1 through", "# α^(n-k)", "if", "not", "poly", ":", "# Turn the polynomial c back into a string", "ret", "=", "self", ".", "_list_rjust", "(", "c", ".", "coefficients", ",", "n", ",", "0", ")", "# rjust is useful for the nostrip feature", "if", "return_string", "and", "self", ".", "gf2_charac", "<", "256", ":", "ret", "=", "self", ".", "_list2str", "(", "ret", ")", "else", ":", "ret", "=", "c", "return", "ret" ]
Encode a given string or list of values (between 0 and gf2_charac) with reed-solomon encoding. Returns a list of values (or a string if return_string is true) with the k message bytes and n-k parity bytes at the end. If a message is < k bytes long, it is assumed to be padded at the front with null bytes. The sequence returned is always n bytes long. If poly is not False, returns the encoded Polynomial object instead of the polynomial translated back to a string (useful for debugging)
[ "Encode", "a", "given", "string", "or", "list", "of", "values", "(", "between", "0", "and", "gf2_charac", ")", "with", "reed", "-", "solomon", "encoding", ".", "Returns", "a", "list", "of", "values", "(", "or", "a", "string", "if", "return_string", "is", "true", ")", "with", "the", "k", "message", "bytes", "and", "n", "-", "k", "parity", "bytes", "at", "the", "end", ".", "If", "a", "message", "is", "<", "k", "bytes", "long", "it", "is", "assumed", "to", "be", "padded", "at", "the", "front", "with", "null", "bytes", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/rs.py#L115-L162
train
Encode a given string or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aWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(0b1010001 + 0o36) + chr(0b110011) + '\x32' + chr(0b110111), 27658 - 27650), nzTpIcepk0o8(chr(0b110000) + chr(10602 - 10491) + '\062' + chr(0b110110) + '\067', 0o10), nzTpIcepk0o8(chr(48) + chr(8780 - 8669) + chr(49) + '\x33' + chr(980 - 931), 64 - 56), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + chr(1202 - 1148) + chr(0b101000 + 0o11), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x30', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1587 - 1538), 62100 - 62092), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(49) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(0b1101111) + chr(1068 - 1018) + chr(2392 - 2342), 8189 - 8181), nzTpIcepk0o8(chr(1703 - 1655) + chr(10988 - 10877) + '\x32' + '\067' + '\x35', 35365 - 35357), nzTpIcepk0o8(chr(48) + chr(111) + chr(2205 - 2154) + '\x33' + chr(0b11110 + 0o25), 63581 - 63573), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + chr(0b10111 + 0o31) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(0b10101 + 0o40) + chr(187 - 132), 0o10), nzTpIcepk0o8(chr(48) + chr(10569 - 10458) + chr(0b10111 + 0o33) + chr(55) + chr(0b110010 + 0o2), 0o10), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(111) + '\x31' + '\x37' + chr(49), 0b1000), nzTpIcepk0o8('\x30' + chr(226 - 115) + chr(1213 - 1159) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\x6f' + chr(0b110010) + chr(54) + '\x30', 0o10), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(0b1101111) + '\063' + '\060', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(50) + chr(475 - 427), 37371 - 37363), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(49) + '\x32', 0o10), nzTpIcepk0o8('\x30' + chr(0b1100110 + 0o11) + '\062' + '\x33' + '\064', 0o10), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(5081 - 4970) + chr(49) + chr(328 - 277) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(111) + '\062' + chr(49) + chr(0b110101), 30518 - 30510), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(0b110000) + '\066', 0b1000), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(6211 - 6100) + chr(0b110010) + chr(51) + '\061', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(2348 - 2297) + chr(1415 - 1366), 8), nzTpIcepk0o8(chr(500 - 452) + '\157' + '\062' + chr(0b101111 + 0o3) + '\x37', 0o10), nzTpIcepk0o8(chr(1732 - 1684) + chr(11952 - 11841) + chr(0b1110 + 0o45) + chr(51) + chr(625 - 571), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + chr(0b1111 + 0o50) + chr(0b110010), 53519 - 53511), nzTpIcepk0o8(chr(364 - 316) + chr(0b1101111) + chr(0b110010) + '\x30' + chr(55), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11110 + 0o24) + chr(0b100 + 0o61), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101011 + 0o4) + '\x31' + '\064' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(1547 - 1499) + '\157' + '\x31' + '\x35' + chr(0b110 + 0o54), 23912 - 23904), nzTpIcepk0o8(chr(2253 - 2205) + chr(0b1101111) + chr(0b110011) + chr(55) + chr(1114 - 1065), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + '\064', 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(7260 - 7149) + chr(50) + '\x37' + chr(0b110011), 25934 - 25926), nzTpIcepk0o8('\060' + chr(1023 - 912) + chr(2293 - 2238) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(762 - 714) + '\x6f' + chr(0b110010) + '\062', 8), nzTpIcepk0o8(chr(113 - 65) + chr(111) + chr(2205 - 2154) + chr(53) + '\x33', 21723 - 21715), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(2412 - 2358) + chr(0b11000 + 0o33), 0b1000), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1101111) + '\x32' + '\062' + chr(0b0 + 0o60), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x35' + chr(0b1110 + 0o42), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf9'), chr(100) + chr(0b1100101) + chr(3793 - 3694) + '\x6f' + chr(0b1100100 + 0o0) + '\x65')(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(0b11110 + 0o17) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def YqIaRFfeo4Ha(hXMPsSrOQzbh, FksNMH1w_ns6, dlT9YcWsoiw_=nzTpIcepk0o8('\060' + chr(0b1101111) + '\060', 8), B6UAF1zReOyJ=None, kM5Rg1n_7Gng=nzTpIcepk0o8('\x30' + '\157' + chr(0b110001), 8)): NoZxuO7wjArS = hXMPsSrOQzbh.NoZxuO7wjArS if not B6UAF1zReOyJ: B6UAF1zReOyJ = hXMPsSrOQzbh.B6UAF1zReOyJ if ftfygxgFas5X(FksNMH1w_ns6) > B6UAF1zReOyJ: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b"\x9a\xd2*\xc2af\xa92\xd1\xbe\xed\xc8\xc8\x11\x11\xd9kp'\xfd'\xadc\xfdw\xb7\x93\x1f\xf4f\x02\r\x9c4\xcc\\a\xcbV\xf4"), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(6536 - 6425) + chr(0b1010100 + 0o20) + '\145')('\165' + chr(0b1110100) + chr(3300 - 3198) + chr(885 - 840) + chr(0b111000)) % (B6UAF1zReOyJ, ftfygxgFas5X(FksNMH1w_ns6))) if suIjIS24Zkqw(FksNMH1w_ns6, O8PC_cn94aGO): FksNMH1w_ns6 = [RmKXV0QRcrJP(bI5jsQ9OkQtj) for bI5jsQ9OkQtj in FksNMH1w_ns6] tF75nqoNENFL = ujppqiXNPJu0([ZiH1BRUzc8JN(bI5jsQ9OkQtj) for bI5jsQ9OkQtj in FksNMH1w_ns6]) lcoY30YLdLXK = tF75nqoNENFL * ujppqiXNPJu0([ZiH1BRUzc8JN(nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10010 + 0o37), 8))] + [ZiH1BRUzc8JN(nzTpIcepk0o8('\060' + '\157' + chr(1433 - 1385), 8))] * (NoZxuO7wjArS - B6UAF1zReOyJ)) xFDEVQn5qSdh = lcoY30YLdLXK % hXMPsSrOQzbh.KQq7Z9J63zv1[B6UAF1zReOyJ] teUmM7cKWZUa = lcoY30YLdLXK - xFDEVQn5qSdh if not dlT9YcWsoiw_: PvvMx4JvMX6J = hXMPsSrOQzbh._list_rjust(teUmM7cKWZUa.coefficients, NoZxuO7wjArS, nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(111) + chr(0b110000), 8)) if kM5Rg1n_7Gng and roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xb0\xd1k\xeeci\xad`\xdc\xb8'), chr(0b1100100) + '\145' + chr(99) + chr(111) + '\144' + '\145')('\x75' + chr(0b1110100) + chr(102) + chr(0b10011 + 0o32) + '\070')) < nzTpIcepk0o8('\x30' + '\157' + '\x34' + chr(0b110000) + '\x30', ord("\x08")): PvvMx4JvMX6J = hXMPsSrOQzbh._list2str(PvvMx4JvMX6J) else: PvvMx4JvMX6J = teUmM7cKWZUa return PvvMx4JvMX6J
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/rs.py
RSCoder.check
def check(self, r, k=None): '''Verifies the codeword is valid by testing that the codeword (message+ecc) as a polynomial code divides g returns True/False ''' n = self.n if not k: k = self.k #h = self.h[k] g = self.g[k] # If we were given a string, convert to a list (important to support fields above 2^8) if isinstance(r, _str): r = [ord(x) for x in r] # Turn r into a polynomial c = Polynomial([GF2int(x) for x in r]) # This works too, but takes longer. Both checks are just as valid. #return (c*h)%gtimesh == Polynomial(x0=0) # Since all codewords are multiples of g, checking that codeword c divides g # suffices for validating a codeword. return c % g == Polynomial(x0=0)
python
def check(self, r, k=None): '''Verifies the codeword is valid by testing that the codeword (message+ecc) as a polynomial code divides g returns True/False ''' n = self.n if not k: k = self.k #h = self.h[k] g = self.g[k] # If we were given a string, convert to a list (important to support fields above 2^8) if isinstance(r, _str): r = [ord(x) for x in r] # Turn r into a polynomial c = Polynomial([GF2int(x) for x in r]) # This works too, but takes longer. Both checks are just as valid. #return (c*h)%gtimesh == Polynomial(x0=0) # Since all codewords are multiples of g, checking that codeword c divides g # suffices for validating a codeword. return c % g == Polynomial(x0=0)
[ "def", "check", "(", "self", ",", "r", ",", "k", "=", "None", ")", ":", "n", "=", "self", ".", "n", "if", "not", "k", ":", "k", "=", "self", ".", "k", "#h = self.h[k]", "g", "=", "self", ".", "g", "[", "k", "]", "# If we were given a string, convert to a list (important to support fields above 2^8)", "if", "isinstance", "(", "r", ",", "_str", ")", ":", "r", "=", "[", "ord", "(", "x", ")", "for", "x", "in", "r", "]", "# Turn r into a polynomial", "c", "=", "Polynomial", "(", "[", "GF2int", "(", "x", ")", "for", "x", "in", "r", "]", ")", "# This works too, but takes longer. Both checks are just as valid.", "#return (c*h)%gtimesh == Polynomial(x0=0)", "# Since all codewords are multiples of g, checking that codeword c divides g", "# suffices for validating a codeword.", "return", "c", "%", "g", "==", "Polynomial", "(", "x0", "=", "0", ")" ]
Verifies the codeword is valid by testing that the codeword (message+ecc) as a polynomial code divides g returns True/False
[ "Verifies", "the", "codeword", "is", "valid", "by", "testing", "that", "the", "codeword", "(", "message", "+", "ecc", ")", "as", "a", "polynomial", "code", "divides", "g", "returns", "True", "/", "False" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/rs.py#L202-L223
train
Verifies the codeword is valid by testing that the codeword r divides g returns True or False
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsO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Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + '\157' + '\x31' + chr(53) + chr(0b110100), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\x32' + chr(0b10101 + 0o41) + chr(840 - 790), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(0b110000) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + '\x33' + '\064', 0b1000), nzTpIcepk0o8(chr(0b110000 + 0o0) + '\x6f' + '\x33' + chr(0b101111 + 0o3) + chr(0b1000 + 0o56), 0b1000), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b1001001 + 0o46) + '\x33' + '\064' + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(3812 - 3701) + chr(0b110001) + '\x35' + chr(0b10111 + 0o36), 25620 - 25612), nzTpIcepk0o8(chr(48) + chr(11848 - 11737) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b1101111) + '\x33' + chr(49) + chr(0b11111 + 0o27), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + chr(0b110110) + chr(0b110000), 0o10), nzTpIcepk0o8('\060' + chr(4890 - 4779) + '\x32' + '\x31' + '\x30', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(12105 - 11994) + '\x32' + chr(54) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\x6f' + '\x31' + '\061' + chr(555 - 500), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b111100 + 0o63) + chr(1299 - 1248) + chr(1887 - 1838) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(696 - 647) + chr(0b110100) + chr(807 - 755), 0o10), nzTpIcepk0o8(chr(476 - 428) + chr(0b1101111) + '\x33' + chr(50) + '\060', 60600 - 60592), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + '\063' + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(9470 - 9359) + '\x34' + chr(140 - 88), 0b1000), nzTpIcepk0o8('\060' + chr(0b100111 + 0o110) + chr(0b110111) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(11911 - 11800) + chr(957 - 908) + chr(399 - 345) + chr(55), 64479 - 64471), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b1101111) + '\x33' + '\x34', 51454 - 51446), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(54) + chr(0b110111), 8), nzTpIcepk0o8('\x30' + chr(111) + chr(271 - 220) + chr(0b110101) + chr(0b10101 + 0o34), 0o10), nzTpIcepk0o8('\060' + chr(0b1101100 + 0o3) + '\x32' + chr(2729 - 2674) + chr(372 - 322), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + '\060' + '\x33', 62004 - 61996), nzTpIcepk0o8('\x30' + chr(7662 - 7551) + '\061' + '\066' + chr(0b111 + 0o55), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(859 - 808) + chr(0b110100) + chr(0b110100), 4478 - 4470), nzTpIcepk0o8(chr(2212 - 2164) + chr(9125 - 9014) + chr(0b110011) + chr(944 - 889) + chr(55), 42251 - 42243), nzTpIcepk0o8(chr(0b110000) + chr(0b111110 + 0o61) + '\x31' + chr(50) + chr(776 - 724), 30387 - 30379), nzTpIcepk0o8(chr(0b110000) + chr(0b1001110 + 0o41) + chr(0b10110 + 0o34) + chr(1900 - 1851) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + '\063' + chr(401 - 353), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + '\x30' + '\x35', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + '\x36' + chr(52), 13668 - 13660), nzTpIcepk0o8('\060' + '\157' + chr(50) + '\x35' + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + chr(55) + chr(55), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(54) + '\064', 46132 - 46124), nzTpIcepk0o8(chr(1223 - 1175) + '\157' + '\067', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + chr(576 - 524) + chr(0b100000 + 0o27), 40558 - 40550), nzTpIcepk0o8(chr(494 - 446) + chr(4863 - 4752) + chr(703 - 653) + '\066' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b1110 + 0o45) + chr(0b100100 + 0o14), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\x6f' + chr(53) + chr(0b110000), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'B'), chr(0b1100100) + '\x65' + chr(778 - 679) + chr(0b1011001 + 0o26) + '\x64' + '\145')(chr(117) + chr(116) + '\146' + chr(1282 - 1237) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def TahWqI1KsjrZ(hXMPsSrOQzbh, LCrwg7lcbmU9, B6UAF1zReOyJ=None): NoZxuO7wjArS = hXMPsSrOQzbh.NoZxuO7wjArS if not B6UAF1zReOyJ: B6UAF1zReOyJ = hXMPsSrOQzbh.B6UAF1zReOyJ KQq7Z9J63zv1 = hXMPsSrOQzbh.KQq7Z9J63zv1[B6UAF1zReOyJ] if suIjIS24Zkqw(LCrwg7lcbmU9, O8PC_cn94aGO): LCrwg7lcbmU9 = [RmKXV0QRcrJP(bI5jsQ9OkQtj) for bI5jsQ9OkQtj in LCrwg7lcbmU9] teUmM7cKWZUa = ujppqiXNPJu0([ZiH1BRUzc8JN(bI5jsQ9OkQtj) for bI5jsQ9OkQtj in LCrwg7lcbmU9]) return teUmM7cKWZUa % KQq7Z9J63zv1 == ujppqiXNPJu0(x0=nzTpIcepk0o8(chr(0b110000) + chr(0b1101000 + 0o7) + '\060', 15225 - 15217))
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/rs.py
RSCoder.check_fast
def check_fast(self, r, k=None): '''Fast check if there's any error in a message+ecc. Can be used before decoding, in addition to hashes to detect if the message was tampered, or after decoding to check that the message was fully recovered. returns True/False ''' n = self.n if not k: k = self.k #h = self.h[k] g = self.g[k] # If we were given a string, convert to a list (important to support fields above 2^8) if isinstance(r, _str): r = [ord(x) for x in r] # Turn r into a polynomial r = Polynomial([GF2int(x) for x in r]) # Compute the syndromes: sz = self._syndromes(r, k=k) # Checking that the syndrome is all 0 is sufficient to check if there are no more any errors in the decoded message #return all(int(x) == 0 for x in sz) return sz.coefficients.count(GF2int(0)) == len(sz)
python
def check_fast(self, r, k=None): '''Fast check if there's any error in a message+ecc. Can be used before decoding, in addition to hashes to detect if the message was tampered, or after decoding to check that the message was fully recovered. returns True/False ''' n = self.n if not k: k = self.k #h = self.h[k] g = self.g[k] # If we were given a string, convert to a list (important to support fields above 2^8) if isinstance(r, _str): r = [ord(x) for x in r] # Turn r into a polynomial r = Polynomial([GF2int(x) for x in r]) # Compute the syndromes: sz = self._syndromes(r, k=k) # Checking that the syndrome is all 0 is sufficient to check if there are no more any errors in the decoded message #return all(int(x) == 0 for x in sz) return sz.coefficients.count(GF2int(0)) == len(sz)
[ "def", "check_fast", "(", "self", ",", "r", ",", "k", "=", "None", ")", ":", "n", "=", "self", ".", "n", "if", "not", "k", ":", "k", "=", "self", ".", "k", "#h = self.h[k]", "g", "=", "self", ".", "g", "[", "k", "]", "# If we were given a string, convert to a list (important to support fields above 2^8)", "if", "isinstance", "(", "r", ",", "_str", ")", ":", "r", "=", "[", "ord", "(", "x", ")", "for", "x", "in", "r", "]", "# Turn r into a polynomial", "r", "=", "Polynomial", "(", "[", "GF2int", "(", "x", ")", "for", "x", "in", "r", "]", ")", "# Compute the syndromes:", "sz", "=", "self", ".", "_syndromes", "(", "r", ",", "k", "=", "k", ")", "# Checking that the syndrome is all 0 is sufficient to check if there are no more any errors in the decoded message", "#return all(int(x) == 0 for x in sz)", "return", "sz", ".", "coefficients", ".", "count", "(", "GF2int", "(", "0", ")", ")", "==", "len", "(", "sz", ")" ]
Fast check if there's any error in a message+ecc. Can be used before decoding, in addition to hashes to detect if the message was tampered, or after decoding to check that the message was fully recovered. returns True/False
[ "Fast", "check", "if", "there", "s", "any", "error", "in", "a", "message", "+", "ecc", ".", "Can", "be", "used", "before", "decoding", "in", "addition", "to", "hashes", "to", "detect", "if", "the", "message", "was", "tampered", "or", "after", "decoding", "to", "check", "that", "the", "message", "was", "fully", "recovered", ".", "returns", "True", "/", "False" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/rs.py#L225-L246
train
Fast check if there s any error in a message + ecc.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,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k2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(11309 - 11198) + chr(0b101011 + 0o5), 34136 - 34128), nzTpIcepk0o8('\x30' + chr(0b100110 + 0o111) + chr(0b101 + 0o54) + chr(49) + '\060', 0o10), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b1101100 + 0o3) + chr(0b110101) + '\x30', 12042 - 12034), nzTpIcepk0o8(chr(2170 - 2122) + '\x6f' + '\x33' + chr(0b110010) + chr(52), 23610 - 23602), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(53) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(808 - 760) + chr(12036 - 11925) + chr(0b100100 + 0o17) + chr(0b10110 + 0o35) + chr(0b10010 + 0o41), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + '\x33' + '\064', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110110) + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(573 - 524), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + '\x34' + chr(0b100100 + 0o17), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1906 - 1856) + chr(0b100101 + 0o20) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(111) + '\x31' + chr(0b11111 + 0o26) + chr(1179 - 1125), 50757 - 50749), nzTpIcepk0o8(chr(1906 - 1858) + chr(0b1101111) + chr(2484 - 2431), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\063' + '\x30' + '\061', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b1001 + 0o50) + chr(0b110100) + chr(54), 65341 - 65333), nzTpIcepk0o8(chr(0b110000 + 0o0) + '\157' + chr(1325 - 1275) + '\063' + chr(55), 0b1000), nzTpIcepk0o8(chr(105 - 57) + chr(111) + chr(0b100111 + 0o13) + chr(1294 - 1242), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + chr(1037 - 987) + chr(0b10 + 0o64), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1000111 + 0o50) + chr(0b0 + 0o61) + '\x34' + chr(0b110110), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(2595 - 2542) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110100) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\x6f' + chr(1773 - 1722) + '\x32' + chr(51), 44760 - 44752), nzTpIcepk0o8(chr(0b110000) + chr(0b1101101 + 0o2) + '\063' + '\067' + '\x33', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(55) + chr(2378 - 2323), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + '\x37' + chr(0b110111), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b0 + 0o62) + chr(0b110100) + '\x32', 0b1000), nzTpIcepk0o8('\x30' + chr(3598 - 3487) + '\x36' + chr(0b10001 + 0o45), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\065' + '\065', 0b1000), nzTpIcepk0o8(chr(1026 - 978) + chr(8157 - 8046) + chr(49) + chr(51) + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + '\x35' + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\x30' + chr(1134 - 1023) + chr(0b1001 + 0o51) + chr(0b1101 + 0o50) + chr(2496 - 2442), 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1824 - 1773) + chr(0b101111 + 0o6) + chr(1221 - 1167), 8), nzTpIcepk0o8('\060' + chr(111) + chr(268 - 217) + chr(51) + chr(0b1011 + 0o51), ord("\x08")), nzTpIcepk0o8('\060' + chr(7862 - 7751) + chr(0b101001 + 0o10) + chr(988 - 940) + chr(2237 - 2185), 0o10), nzTpIcepk0o8(chr(77 - 29) + chr(7811 - 7700) + chr(0b110011) + '\062' + chr(2036 - 1988), 22749 - 22741), nzTpIcepk0o8('\x30' + '\157' + chr(0b10101 + 0o36) + chr(0b110010) + chr(2359 - 2307), 8), nzTpIcepk0o8(chr(939 - 891) + chr(4304 - 4193) + '\x33' + chr(0b101010 + 0o13) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b100001 + 0o116) + '\067' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(111) + chr(0b100011 + 0o17) + chr(0b11101 + 0o25), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + chr(0b110001) + chr(0b11110 + 0o24), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\x6f' + '\065' + chr(0b11000 + 0o30), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'.'), '\x64' + chr(6261 - 6160) + '\x63' + '\157' + '\x64' + chr(101))(chr(0b1110101) + chr(0b111110 + 0o66) + chr(0b10101 + 0o121) + chr(0b101101) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def mWRR1G5RgcjL(hXMPsSrOQzbh, LCrwg7lcbmU9, B6UAF1zReOyJ=None): NoZxuO7wjArS = hXMPsSrOQzbh.NoZxuO7wjArS if not B6UAF1zReOyJ: B6UAF1zReOyJ = hXMPsSrOQzbh.B6UAF1zReOyJ KQq7Z9J63zv1 = hXMPsSrOQzbh.KQq7Z9J63zv1[B6UAF1zReOyJ] if suIjIS24Zkqw(LCrwg7lcbmU9, O8PC_cn94aGO): LCrwg7lcbmU9 = [RmKXV0QRcrJP(bI5jsQ9OkQtj) for bI5jsQ9OkQtj in LCrwg7lcbmU9] LCrwg7lcbmU9 = ujppqiXNPJu0([ZiH1BRUzc8JN(bI5jsQ9OkQtj) for bI5jsQ9OkQtj in LCrwg7lcbmU9]) G4U5vqz_1g79 = hXMPsSrOQzbh._syndromes(LCrwg7lcbmU9, k=B6UAF1zReOyJ) return roI3spqORKae(G4U5vqz_1g79.coefficients, roI3spqORKae(ES5oEprVxulp(b's\x19{\x83\xe3\xb7\xc9eq\x94\xff%'), chr(0b101101 + 0o67) + '\145' + '\143' + '\x6f' + chr(0b10 + 0o142) + '\x65')(chr(117) + '\x74' + chr(0b101101 + 0o71) + chr(0b101101) + chr(3096 - 3040)))(ZiH1BRUzc8JN(nzTpIcepk0o8('\060' + chr(1133 - 1022) + chr(0b100000 + 0o20), 8))) == ftfygxgFas5X(G4U5vqz_1g79)
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/rs.py
RSCoder.decode
def decode(self, r, nostrip=False, k=None, erasures_pos=None, only_erasures=False, return_string=True): '''Given a received string or byte array or list r of values between 0 and gf2_charac, attempts to decode it. If it's a valid codeword, or if there are no more than (n-k)/2 errors, the repaired message is returned. A message always has k bytes, if a message contained less it is left padded with null bytes. When decoded, these leading null bytes are stripped, but that can cause problems if decoding binary data. When nostrip is True, messages returned are always k bytes long. This is useful to make sure no data is lost when decoding binary data. Theoretically, we have R(x) = C(x) + E(x) + V(x), where R is the received message, C is the correct message without errors nor erasures, E are the errors and V the erasures. Thus the goal is to compute E and V from R, so that we can compute: C(x) = R(x) - E(x) - V(x), and then we have our original message! The main problem of decoding is to solve the so-called Key Equation, here we use Berlekamp-Massey. When stated in the language of spectral estimation, consists of a Fourier transform (syndrome computer), followed by a spectral analysis (Berlekamp-Massey or Euclidian algorithm), followed by an inverse Fourier transform (Chien search). (see Blahut, "Algebraic Codes for Data Transmission", 2003, chapter 7.6 Decoding in Time Domain). ''' n = self.n if not k: k = self.k # If we were given a string, convert to a list (important to support fields above 2^8) if isinstance(r, _str): r = [ord(x) for x in r] # Turn r into a polynomial rp = Polynomial([GF2int(x) for x in r]) if erasures_pos: # Convert string positions to coefficients positions for the algebra to work (see _find_erasures_locator(), ecc characters represent the first coefficients while the message is put last, so it's exactly the reverse of the string positions where the message is first and the ecc is last, thus it's just like if you read the message+ecc string in reverse) erasures_pos = [len(r)-1-x for x in erasures_pos] # Set erasures characters to null bytes # Note that you can just leave the original characters as they are, you don't need to set erased characters to null bytes for the decoding to work, but note that it won't help either (ie, fake erasures, meaning characters that were detected as erasures but actually aren't, will still "consume" one ecc symbol, even if you don't set them to null byte, this is because the syndrome is limited to n-k and thus you can't decode above this bound without a clever trick). # Example string containing a fake erasure: "hello sam" -> "ooooo sam" with erasures_pos = [0, 1, 2, 3, 4]. Here in fact the last erasure is fake because the original character also was "o" so if we detect "o" as an erasure, we will end up with one fake erasure. But setting it to null byte or not, it will still use up one ecc symbol, it will always be counted as a real erasure. If you're below the n-k bound, then the doceding will be ok. If you're above, then you can't do anything, the decoding won't work. Maybe todo: try to find a clever list decoding algorithm to account for fake erasures.... # Note: commented out so that the resulting omega (error evaluator polynomial) is the same as the erasure evaluator polynomial when decoding the same number of errors or erasures (ie, decoding 3 erasures only will give the same result as 3 errors only, with of course the errors/erasures on the same characters). #for erasure in erasures_pos: #rp[erasure] = GF2int(0) # Compute the syndromes: sz = self._syndromes(rp, k=k) if sz.coefficients.count(GF2int(0)) == len(sz): # the code is already valid, there's nothing to do # The last n-k bytes are parity ret = r[:-(n-k)] ecc = r[-(n-k):] if not nostrip: ret = self._list_lstrip(r[:-(n-k)], 0) if return_string and self.gf2_charac < 256: ret = self._list2str(ret) ecc = self._list2str(ecc) return ret, ecc # Erasures locator polynomial computation erasures_loc = None erasures_eval = None erasures_count = 0 if erasures_pos: erasures_count = len(erasures_pos) # Compute the erasure locator polynomial erasures_loc = self._find_erasures_locator(erasures_pos) # Compute the erasure evaluator polynomial erasures_eval = self._find_error_evaluator(sz, erasures_loc, k=k) if only_erasures: sigma = erasures_loc omega = erasures_eval else: # Find the error locator polynomial and error evaluator polynomial # using the Berlekamp-Massey algorithm # if erasures were supplied, BM will generate the errata (errors-and-erasures) locator and evaluator polynomials sigma, omega = self._berlekamp_massey(sz, k=k, erasures_loc=erasures_loc, erasures_eval=erasures_eval, erasures_count=erasures_count) omega = self._find_error_evaluator(sz, sigma, k=k) # we want to make sure that omega is correct (we know that sigma is always correct, but omega not really) # Now use Chien's procedure to find the error locations # j is an array of integers representing the positions of the errors, 0 # being the rightmost byte # X is a corresponding array of GF(2^8) values where X_i = alpha^(j_i) X, j = self._chien_search(sigma) # Sanity check: Cannot guarantee correct decoding of more than n-k errata (Singleton Bound, n-k being the minimum distance), and we cannot even check if it's correct (the syndrome will always be all 0 if we try to decode above the bound), thus it's better to just return the input as-is. if len(j) > n-k: ret = r[:-(n-k)] ecc = r[-(n-k):] if not nostrip: ret = self._list_lstrip(r[:-(n-k)], 0) if return_string and self.gf2_charac < 256: ret = self._list2str(ret) ecc = self._list2str(ecc) return ret, ecc # And finally, find the error magnitudes with Forney's Formula # Y is an array of GF(2^8) values corresponding to the error magnitude # at the position given by the j array Y = self._forney(omega, X) # Put the error and locations together to form the error polynomial # Note that an alternative would be to compute the error-spectrum polynomial E(x) which satisfies E(x)*Sigma(x) = 0 (mod x^n - 1) = Omega(x)(x^n - 1) -- see Blahut, Algebraic codes for data transmission Elist = [GF2int(0)] * self.gf2_charac if len(Y) >= len(j): # failsafe: if the number of erratas is higher than the number of coefficients in the magnitude polynomial, we failed! for i in _range(self.gf2_charac): # FIXME? is this really necessary to go to self.gf2_charac? len(rp) wouldn't be just enough? (since the goal is anyway to substract E to rp) if i in j: Elist[i] = Y[j.index(i)] E = Polynomial( Elist[::-1] ) # reverse the list because we used the coefficient degrees (j) instead of the error positions else: E = Polynomial() # And we get our real codeword! c = rp - E # Remember what we wrote above: R(x) = C(x) + E(x), so here to get back the original codeword C(x) = R(x) - E(x) ! (V(x) the erasures are here is included inside E(x)) if len(c) > len(r): c = rp # failsafe: in case the correction went totally wrong (we repaired padded null bytes instead of the message! thus we end up with a longer message than what we should have), then we just return the uncorrected message. Note: we compare the length of c with r on purpose, that's not an error: if we compare with rp, if the first few characters were erased (null bytes) in r, then in rp the Polynomial will automatically skip them, thus the length will always be smaller in that case. # Split the polynomial into two parts: the corrected message and the corrected ecc ret = c.coefficients[:-(n-k)] ecc = c.coefficients[-(n-k):] if nostrip: # Polynomial objects don't store leading 0 coefficients, so we # actually need to pad this to k bytes ret = self._list_rjust(ret, k, 0) if return_string and self.gf2_charac < 256: # automatically disable return_string if the field is above 255 (chr would fail, so it's up to the user to define the mapping) # Form it back into a string ret = self._list2str(ret) ecc = self._list2str(ecc) return ret, ecc
python
def decode(self, r, nostrip=False, k=None, erasures_pos=None, only_erasures=False, return_string=True): '''Given a received string or byte array or list r of values between 0 and gf2_charac, attempts to decode it. If it's a valid codeword, or if there are no more than (n-k)/2 errors, the repaired message is returned. A message always has k bytes, if a message contained less it is left padded with null bytes. When decoded, these leading null bytes are stripped, but that can cause problems if decoding binary data. When nostrip is True, messages returned are always k bytes long. This is useful to make sure no data is lost when decoding binary data. Theoretically, we have R(x) = C(x) + E(x) + V(x), where R is the received message, C is the correct message without errors nor erasures, E are the errors and V the erasures. Thus the goal is to compute E and V from R, so that we can compute: C(x) = R(x) - E(x) - V(x), and then we have our original message! The main problem of decoding is to solve the so-called Key Equation, here we use Berlekamp-Massey. When stated in the language of spectral estimation, consists of a Fourier transform (syndrome computer), followed by a spectral analysis (Berlekamp-Massey or Euclidian algorithm), followed by an inverse Fourier transform (Chien search). (see Blahut, "Algebraic Codes for Data Transmission", 2003, chapter 7.6 Decoding in Time Domain). ''' n = self.n if not k: k = self.k # If we were given a string, convert to a list (important to support fields above 2^8) if isinstance(r, _str): r = [ord(x) for x in r] # Turn r into a polynomial rp = Polynomial([GF2int(x) for x in r]) if erasures_pos: # Convert string positions to coefficients positions for the algebra to work (see _find_erasures_locator(), ecc characters represent the first coefficients while the message is put last, so it's exactly the reverse of the string positions where the message is first and the ecc is last, thus it's just like if you read the message+ecc string in reverse) erasures_pos = [len(r)-1-x for x in erasures_pos] # Set erasures characters to null bytes # Note that you can just leave the original characters as they are, you don't need to set erased characters to null bytes for the decoding to work, but note that it won't help either (ie, fake erasures, meaning characters that were detected as erasures but actually aren't, will still "consume" one ecc symbol, even if you don't set them to null byte, this is because the syndrome is limited to n-k and thus you can't decode above this bound without a clever trick). # Example string containing a fake erasure: "hello sam" -> "ooooo sam" with erasures_pos = [0, 1, 2, 3, 4]. Here in fact the last erasure is fake because the original character also was "o" so if we detect "o" as an erasure, we will end up with one fake erasure. But setting it to null byte or not, it will still use up one ecc symbol, it will always be counted as a real erasure. If you're below the n-k bound, then the doceding will be ok. If you're above, then you can't do anything, the decoding won't work. Maybe todo: try to find a clever list decoding algorithm to account for fake erasures.... # Note: commented out so that the resulting omega (error evaluator polynomial) is the same as the erasure evaluator polynomial when decoding the same number of errors or erasures (ie, decoding 3 erasures only will give the same result as 3 errors only, with of course the errors/erasures on the same characters). #for erasure in erasures_pos: #rp[erasure] = GF2int(0) # Compute the syndromes: sz = self._syndromes(rp, k=k) if sz.coefficients.count(GF2int(0)) == len(sz): # the code is already valid, there's nothing to do # The last n-k bytes are parity ret = r[:-(n-k)] ecc = r[-(n-k):] if not nostrip: ret = self._list_lstrip(r[:-(n-k)], 0) if return_string and self.gf2_charac < 256: ret = self._list2str(ret) ecc = self._list2str(ecc) return ret, ecc # Erasures locator polynomial computation erasures_loc = None erasures_eval = None erasures_count = 0 if erasures_pos: erasures_count = len(erasures_pos) # Compute the erasure locator polynomial erasures_loc = self._find_erasures_locator(erasures_pos) # Compute the erasure evaluator polynomial erasures_eval = self._find_error_evaluator(sz, erasures_loc, k=k) if only_erasures: sigma = erasures_loc omega = erasures_eval else: # Find the error locator polynomial and error evaluator polynomial # using the Berlekamp-Massey algorithm # if erasures were supplied, BM will generate the errata (errors-and-erasures) locator and evaluator polynomials sigma, omega = self._berlekamp_massey(sz, k=k, erasures_loc=erasures_loc, erasures_eval=erasures_eval, erasures_count=erasures_count) omega = self._find_error_evaluator(sz, sigma, k=k) # we want to make sure that omega is correct (we know that sigma is always correct, but omega not really) # Now use Chien's procedure to find the error locations # j is an array of integers representing the positions of the errors, 0 # being the rightmost byte # X is a corresponding array of GF(2^8) values where X_i = alpha^(j_i) X, j = self._chien_search(sigma) # Sanity check: Cannot guarantee correct decoding of more than n-k errata (Singleton Bound, n-k being the minimum distance), and we cannot even check if it's correct (the syndrome will always be all 0 if we try to decode above the bound), thus it's better to just return the input as-is. if len(j) > n-k: ret = r[:-(n-k)] ecc = r[-(n-k):] if not nostrip: ret = self._list_lstrip(r[:-(n-k)], 0) if return_string and self.gf2_charac < 256: ret = self._list2str(ret) ecc = self._list2str(ecc) return ret, ecc # And finally, find the error magnitudes with Forney's Formula # Y is an array of GF(2^8) values corresponding to the error magnitude # at the position given by the j array Y = self._forney(omega, X) # Put the error and locations together to form the error polynomial # Note that an alternative would be to compute the error-spectrum polynomial E(x) which satisfies E(x)*Sigma(x) = 0 (mod x^n - 1) = Omega(x)(x^n - 1) -- see Blahut, Algebraic codes for data transmission Elist = [GF2int(0)] * self.gf2_charac if len(Y) >= len(j): # failsafe: if the number of erratas is higher than the number of coefficients in the magnitude polynomial, we failed! for i in _range(self.gf2_charac): # FIXME? is this really necessary to go to self.gf2_charac? len(rp) wouldn't be just enough? (since the goal is anyway to substract E to rp) if i in j: Elist[i] = Y[j.index(i)] E = Polynomial( Elist[::-1] ) # reverse the list because we used the coefficient degrees (j) instead of the error positions else: E = Polynomial() # And we get our real codeword! c = rp - E # Remember what we wrote above: R(x) = C(x) + E(x), so here to get back the original codeword C(x) = R(x) - E(x) ! (V(x) the erasures are here is included inside E(x)) if len(c) > len(r): c = rp # failsafe: in case the correction went totally wrong (we repaired padded null bytes instead of the message! thus we end up with a longer message than what we should have), then we just return the uncorrected message. Note: we compare the length of c with r on purpose, that's not an error: if we compare with rp, if the first few characters were erased (null bytes) in r, then in rp the Polynomial will automatically skip them, thus the length will always be smaller in that case. # Split the polynomial into two parts: the corrected message and the corrected ecc ret = c.coefficients[:-(n-k)] ecc = c.coefficients[-(n-k):] if nostrip: # Polynomial objects don't store leading 0 coefficients, so we # actually need to pad this to k bytes ret = self._list_rjust(ret, k, 0) if return_string and self.gf2_charac < 256: # automatically disable return_string if the field is above 255 (chr would fail, so it's up to the user to define the mapping) # Form it back into a string ret = self._list2str(ret) ecc = self._list2str(ecc) return ret, ecc
[ "def", "decode", "(", "self", ",", "r", ",", "nostrip", "=", "False", ",", "k", "=", "None", ",", "erasures_pos", "=", "None", ",", "only_erasures", "=", "False", ",", "return_string", "=", "True", ")", ":", "n", "=", "self", ".", "n", "if", "not", "k", ":", "k", "=", "self", ".", "k", "# If we were given a string, convert to a list (important to support fields above 2^8)", "if", "isinstance", "(", "r", ",", "_str", ")", ":", "r", "=", "[", "ord", "(", "x", ")", "for", "x", "in", "r", "]", "# Turn r into a polynomial", "rp", "=", "Polynomial", "(", "[", "GF2int", "(", "x", ")", "for", "x", "in", "r", "]", ")", "if", "erasures_pos", ":", "# Convert string positions to coefficients positions for the algebra to work (see _find_erasures_locator(), ecc characters represent the first coefficients while the message is put last, so it's exactly the reverse of the string positions where the message is first and the ecc is last, thus it's just like if you read the message+ecc string in reverse)", "erasures_pos", "=", "[", "len", "(", "r", ")", "-", "1", "-", "x", "for", "x", "in", "erasures_pos", "]", "# Set erasures characters to null bytes", "# Note that you can just leave the original characters as they are, you don't need to set erased characters to null bytes for the decoding to work, but note that it won't help either (ie, fake erasures, meaning characters that were detected as erasures but actually aren't, will still \"consume\" one ecc symbol, even if you don't set them to null byte, this is because the syndrome is limited to n-k and thus you can't decode above this bound without a clever trick).", "# Example string containing a fake erasure: \"hello sam\" -> \"ooooo sam\" with erasures_pos = [0, 1, 2, 3, 4]. Here in fact the last erasure is fake because the original character also was \"o\" so if we detect \"o\" as an erasure, we will end up with one fake erasure. But setting it to null byte or not, it will still use up one ecc symbol, it will always be counted as a real erasure. If you're below the n-k bound, then the doceding will be ok. If you're above, then you can't do anything, the decoding won't work. Maybe todo: try to find a clever list decoding algorithm to account for fake erasures....", "# Note: commented out so that the resulting omega (error evaluator polynomial) is the same as the erasure evaluator polynomial when decoding the same number of errors or erasures (ie, decoding 3 erasures only will give the same result as 3 errors only, with of course the errors/erasures on the same characters).", "#for erasure in erasures_pos:", "#rp[erasure] = GF2int(0)", "# Compute the syndromes:", "sz", "=", "self", ".", "_syndromes", "(", "rp", ",", "k", "=", "k", ")", "if", "sz", ".", "coefficients", ".", "count", "(", "GF2int", "(", "0", ")", ")", "==", "len", "(", "sz", ")", ":", "# the code is already valid, there's nothing to do", "# The last n-k bytes are parity", "ret", "=", "r", "[", ":", "-", "(", "n", "-", "k", ")", "]", "ecc", "=", "r", "[", "-", "(", "n", "-", "k", ")", ":", "]", "if", "not", "nostrip", ":", "ret", "=", "self", ".", "_list_lstrip", "(", "r", "[", ":", "-", "(", "n", "-", "k", ")", "]", ",", "0", ")", "if", "return_string", "and", "self", ".", "gf2_charac", "<", "256", ":", "ret", "=", "self", ".", "_list2str", "(", "ret", ")", "ecc", "=", "self", ".", "_list2str", "(", "ecc", ")", "return", "ret", ",", "ecc", "# Erasures locator polynomial computation", "erasures_loc", "=", "None", "erasures_eval", "=", "None", "erasures_count", "=", "0", "if", "erasures_pos", ":", "erasures_count", "=", "len", "(", "erasures_pos", ")", "# Compute the erasure locator polynomial", "erasures_loc", "=", "self", ".", "_find_erasures_locator", "(", "erasures_pos", ")", "# Compute the erasure evaluator polynomial", "erasures_eval", "=", "self", ".", "_find_error_evaluator", "(", "sz", ",", "erasures_loc", ",", "k", "=", "k", ")", "if", "only_erasures", ":", "sigma", "=", "erasures_loc", "omega", "=", "erasures_eval", "else", ":", "# Find the error locator polynomial and error evaluator polynomial", "# using the Berlekamp-Massey algorithm", "# if erasures were supplied, BM will generate the errata (errors-and-erasures) locator and evaluator polynomials", "sigma", ",", "omega", "=", "self", ".", "_berlekamp_massey", "(", "sz", ",", "k", "=", "k", ",", "erasures_loc", "=", "erasures_loc", ",", "erasures_eval", "=", "erasures_eval", ",", "erasures_count", "=", "erasures_count", ")", "omega", "=", "self", ".", "_find_error_evaluator", "(", "sz", ",", "sigma", ",", "k", "=", "k", ")", "# we want to make sure that omega is correct (we know that sigma is always correct, but omega not really)", "# Now use Chien's procedure to find the error locations", "# j is an array of integers representing the positions of the errors, 0", "# being the rightmost byte", "# X is a corresponding array of GF(2^8) values where X_i = alpha^(j_i)", "X", ",", "j", "=", "self", ".", "_chien_search", "(", "sigma", ")", "# Sanity check: Cannot guarantee correct decoding of more than n-k errata (Singleton Bound, n-k being the minimum distance), and we cannot even check if it's correct (the syndrome will always be all 0 if we try to decode above the bound), thus it's better to just return the input as-is.", "if", "len", "(", "j", ")", ">", "n", "-", "k", ":", "ret", "=", "r", "[", ":", "-", "(", "n", "-", "k", ")", "]", "ecc", "=", "r", "[", "-", "(", "n", "-", "k", ")", ":", "]", "if", "not", "nostrip", ":", "ret", "=", "self", ".", "_list_lstrip", "(", "r", "[", ":", "-", "(", "n", "-", "k", ")", "]", ",", "0", ")", "if", "return_string", "and", "self", ".", "gf2_charac", "<", "256", ":", "ret", "=", "self", ".", "_list2str", "(", "ret", ")", "ecc", "=", "self", ".", "_list2str", "(", "ecc", ")", "return", "ret", ",", "ecc", "# And finally, find the error magnitudes with Forney's Formula", "# Y is an array of GF(2^8) values corresponding to the error magnitude", "# at the position given by the j array", "Y", "=", "self", ".", "_forney", "(", "omega", ",", "X", ")", "# Put the error and locations together to form the error polynomial", "# Note that an alternative would be to compute the error-spectrum polynomial E(x) which satisfies E(x)*Sigma(x) = 0 (mod x^n - 1) = Omega(x)(x^n - 1) -- see Blahut, Algebraic codes for data transmission", "Elist", "=", "[", "GF2int", "(", "0", ")", "]", "*", "self", ".", "gf2_charac", "if", "len", "(", "Y", ")", ">=", "len", "(", "j", ")", ":", "# failsafe: if the number of erratas is higher than the number of coefficients in the magnitude polynomial, we failed!", "for", "i", "in", "_range", "(", "self", ".", "gf2_charac", ")", ":", "# FIXME? is this really necessary to go to self.gf2_charac? len(rp) wouldn't be just enough? (since the goal is anyway to substract E to rp)", "if", "i", "in", "j", ":", "Elist", "[", "i", "]", "=", "Y", "[", "j", ".", "index", "(", "i", ")", "]", "E", "=", "Polynomial", "(", "Elist", "[", ":", ":", "-", "1", "]", ")", "# reverse the list because we used the coefficient degrees (j) instead of the error positions", "else", ":", "E", "=", "Polynomial", "(", ")", "# And we get our real codeword!", "c", "=", "rp", "-", "E", "# Remember what we wrote above: R(x) = C(x) + E(x), so here to get back the original codeword C(x) = R(x) - E(x) ! (V(x) the erasures are here is included inside E(x))", "if", "len", "(", "c", ")", ">", "len", "(", "r", ")", ":", "c", "=", "rp", "# failsafe: in case the correction went totally wrong (we repaired padded null bytes instead of the message! thus we end up with a longer message than what we should have), then we just return the uncorrected message. Note: we compare the length of c with r on purpose, that's not an error: if we compare with rp, if the first few characters were erased (null bytes) in r, then in rp the Polynomial will automatically skip them, thus the length will always be smaller in that case.", "# Split the polynomial into two parts: the corrected message and the corrected ecc", "ret", "=", "c", ".", "coefficients", "[", ":", "-", "(", "n", "-", "k", ")", "]", "ecc", "=", "c", ".", "coefficients", "[", "-", "(", "n", "-", "k", ")", ":", "]", "if", "nostrip", ":", "# Polynomial objects don't store leading 0 coefficients, so we", "# actually need to pad this to k bytes", "ret", "=", "self", ".", "_list_rjust", "(", "ret", ",", "k", ",", "0", ")", "if", "return_string", "and", "self", ".", "gf2_charac", "<", "256", ":", "# automatically disable return_string if the field is above 255 (chr would fail, so it's up to the user to define the mapping)", "# Form it back into a string ", "ret", "=", "self", ".", "_list2str", "(", "ret", ")", "ecc", "=", "self", ".", "_list2str", "(", "ecc", ")", "return", "ret", ",", "ecc" ]
Given a received string or byte array or list r of values between 0 and gf2_charac, attempts to decode it. If it's a valid codeword, or if there are no more than (n-k)/2 errors, the repaired message is returned. A message always has k bytes, if a message contained less it is left padded with null bytes. When decoded, these leading null bytes are stripped, but that can cause problems if decoding binary data. When nostrip is True, messages returned are always k bytes long. This is useful to make sure no data is lost when decoding binary data. Theoretically, we have R(x) = C(x) + E(x) + V(x), where R is the received message, C is the correct message without errors nor erasures, E are the errors and V the erasures. Thus the goal is to compute E and V from R, so that we can compute: C(x) = R(x) - E(x) - V(x), and then we have our original message! The main problem of decoding is to solve the so-called Key Equation, here we use Berlekamp-Massey. When stated in the language of spectral estimation, consists of a Fourier transform (syndrome computer), followed by a spectral analysis (Berlekamp-Massey or Euclidian algorithm), followed by an inverse Fourier transform (Chien search). (see Blahut, "Algebraic Codes for Data Transmission", 2003, chapter 7.6 Decoding in Time Domain).
[ "Given", "a", "received", "string", "or", "byte", "array", "or", "list", "r", "of", "values", "between", "0", "and", "gf2_charac", "attempts", "to", "decode", "it", ".", "If", "it", "s", "a", "valid", "codeword", "or", "if", "there", "are", "no", "more", "than", "(", "n", "-", "k", ")", "/", "2", "errors", "the", "repaired", "message", "is", "returned", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib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HWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110111) + '\067', 22780 - 22772), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + '\x32' + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(488 - 440) + chr(0b11011 + 0o124) + chr(50) + chr(53) + '\x31', 59278 - 59270), nzTpIcepk0o8(chr(293 - 245) + chr(0b1010101 + 0o32) + '\x31' + chr(50) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\x6f' + '\x33' + chr(49) + chr(931 - 878), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + '\x33', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(0b0 + 0o67) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(4536 - 4425) + chr(0b110010) + chr(0b110 + 0o53) + chr(48), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(0b110100) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(1172 - 1123) + chr(1269 - 1218) + '\x30', 0o10), nzTpIcepk0o8(chr(1764 - 1716) + chr(0b0 + 0o157) + chr(50) + '\x32' + chr(907 - 859), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100011 + 0o17) + chr(53) + '\x30', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b10011 + 0o134) + '\x31' + chr(0b101110 + 0o11) + chr(0b11111 + 0o26), 0o10), nzTpIcepk0o8(chr(2012 - 1964) + '\x6f' + chr(0b110011) + chr(0b110100) + chr(652 - 599), 0o10), nzTpIcepk0o8('\060' + chr(12040 - 11929) + chr(1693 - 1642) + chr(52) + chr(1985 - 1930), 0o10), nzTpIcepk0o8('\x30' + chr(0b101011 + 0o104) + chr(2068 - 2018) + '\x36' + chr(0b100 + 0o55), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(55) + chr(0b1111 + 0o42), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\061' + chr(51) + chr(0b110111), 2656 - 2648), nzTpIcepk0o8(chr(1167 - 1119) + '\x6f' + chr(0b101001 + 0o11) + chr(0b110101) + chr(54), 60232 - 60224), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1359 - 1310) + chr(55) + chr(52), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100000 + 0o17) + chr(49) + '\066' + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\060' + chr(8984 - 8873) + chr(49) + '\063' + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(0b110110) + chr(48), 26097 - 26089), nzTpIcepk0o8('\x30' + '\157' + '\063' + '\x35' + chr(0b11 + 0o57), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(1720 - 1670) + '\x30' + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b1101111) + '\x34' + chr(0b100100 + 0o15), ord("\x08")), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b1011100 + 0o23) + chr(50) + chr(52) + '\x37', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + '\063' + '\x30', 8), nzTpIcepk0o8('\060' + '\x6f' + chr(0b1111 + 0o50) + '\060', 0b1000), nzTpIcepk0o8(chr(790 - 742) + chr(2836 - 2725) + chr(0b110001) + chr(863 - 815) + chr(0b10010 + 0o36), ord("\x08")), nzTpIcepk0o8(chr(1356 - 1308) + '\157' + '\063' + '\066' + chr(248 - 200), 0b1000), nzTpIcepk0o8(chr(1876 - 1828) + chr(1238 - 1127) + chr(49) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1010010 + 0o35) + chr(51) + chr(1165 - 1113) + chr(0b10001 + 0o42), 3251 - 3243), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110111) + '\064', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + chr(49) + '\x37', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(53), 22731 - 22723), nzTpIcepk0o8(chr(221 - 173) + chr(6745 - 6634) + chr(0b100110 + 0o14) + chr(0b110100) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(2150 - 2102) + '\x6f' + chr(0b110010) + chr(48) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1101111) + chr(0b110010) + '\062' + chr(1413 - 1359), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\063' + chr(48) + '\x35', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1122 - 1074) + chr(111) + chr(529 - 476) + chr(0b110000), 38530 - 38522)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x11'), '\x64' + chr(101) + chr(0b1100011) + '\157' + chr(0b11011 + 0o111) + chr(5441 - 5340))(chr(117) + chr(0b1110100) + chr(0b110 + 0o140) + chr(45) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def lfbFsdWlT3MB(hXMPsSrOQzbh, LCrwg7lcbmU9, SwdwIa0ffLqX=nzTpIcepk0o8('\060' + chr(9142 - 9031) + chr(48), ord("\x08")), B6UAF1zReOyJ=None, umsrLhYf182Z=None, Xz01uG11ClMN=nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b1101111) + '\060', 8), kM5Rg1n_7Gng=nzTpIcepk0o8(chr(0b110000) + chr(0b1001011 + 0o44) + '\x31', ord("\x08"))): NoZxuO7wjArS = hXMPsSrOQzbh.NoZxuO7wjArS if not B6UAF1zReOyJ: B6UAF1zReOyJ = hXMPsSrOQzbh.B6UAF1zReOyJ if suIjIS24Zkqw(LCrwg7lcbmU9, O8PC_cn94aGO): LCrwg7lcbmU9 = [RmKXV0QRcrJP(bI5jsQ9OkQtj) for bI5jsQ9OkQtj in LCrwg7lcbmU9] VIodgqKJmL3O = ujppqiXNPJu0([ZiH1BRUzc8JN(bI5jsQ9OkQtj) for bI5jsQ9OkQtj in LCrwg7lcbmU9]) if umsrLhYf182Z: umsrLhYf182Z = [ftfygxgFas5X(LCrwg7lcbmU9) - nzTpIcepk0o8('\x30' + chr(8426 - 8315) + chr(0b101111 + 0o2), 8) - bI5jsQ9OkQtj for bI5jsQ9OkQtj in umsrLhYf182Z] G4U5vqz_1g79 = hXMPsSrOQzbh._syndromes(VIodgqKJmL3O, k=B6UAF1zReOyJ) if roI3spqORKae(G4U5vqz_1g79.coefficients, roI3spqORKae(ES5oEprVxulp(b'L\x84\xfa\x06\x86w*\xda\x96o\xc1\xe3'), chr(0b1100100) + chr(101) + '\143' + chr(0b10010 + 0o135) + chr(0b111110 + 0o46) + chr(8131 - 8030))('\165' + '\x74' + chr(102) + chr(0b101101) + chr(2641 - 2585)))(ZiH1BRUzc8JN(nzTpIcepk0o8(chr(1151 - 1103) + '\157' + chr(0b110000), 8))) == ftfygxgFas5X(G4U5vqz_1g79): PvvMx4JvMX6J = LCrwg7lcbmU9[:-(NoZxuO7wjArS - B6UAF1zReOyJ)] cRb7OGyXJeT1 = LCrwg7lcbmU9[-(NoZxuO7wjArS - B6UAF1zReOyJ):] if not SwdwIa0ffLqX: PvvMx4JvMX6J = hXMPsSrOQzbh._list_lstrip(LCrwg7lcbmU9[:-(NoZxuO7wjArS - B6UAF1zReOyJ)], nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(111) + chr(0b101111 + 0o1), 8)) if kM5Rg1n_7Gng and roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'X\xb3\x9b\x0e\xaes\x1e\xfa\x87;'), chr(0b1100100) + '\145' + chr(99) + '\157' + chr(0b110100 + 0o60) + chr(0b1011010 + 0o13))('\165' + '\164' + chr(0b1100110) + '\x2d' + chr(0b111000))) < nzTpIcepk0o8('\x30' + '\x6f' + '\064' + '\060' + '\060', 0o10): PvvMx4JvMX6J = hXMPsSrOQzbh._list2str(PvvMx4JvMX6J) cRb7OGyXJeT1 = hXMPsSrOQzbh._list2str(cRb7OGyXJeT1) return (PvvMx4JvMX6J, cRb7OGyXJeT1) c88QIkjOjka1 = None KxkovzKK3PcV = None oXiBv91nJT0c = nzTpIcepk0o8(chr(498 - 450) + chr(0b1100001 + 0o16) + chr(0b110000), 8) if umsrLhYf182Z: oXiBv91nJT0c = ftfygxgFas5X(umsrLhYf182Z) c88QIkjOjka1 = hXMPsSrOQzbh._find_erasures_locator(umsrLhYf182Z) KxkovzKK3PcV = hXMPsSrOQzbh._find_error_evaluator(G4U5vqz_1g79, c88QIkjOjka1, k=B6UAF1zReOyJ) if Xz01uG11ClMN: uc4gGmjAvJP3 = c88QIkjOjka1 KuyiJVsdK9em = KxkovzKK3PcV else: (uc4gGmjAvJP3, KuyiJVsdK9em) = hXMPsSrOQzbh._berlekamp_massey(G4U5vqz_1g79, k=B6UAF1zReOyJ, erasures_loc=c88QIkjOjka1, erasures_eval=KxkovzKK3PcV, erasures_count=oXiBv91nJT0c) KuyiJVsdK9em = hXMPsSrOQzbh._find_error_evaluator(G4U5vqz_1g79, uc4gGmjAvJP3, k=B6UAF1zReOyJ) (mxhyDqTAMpMC, sChW4gUsXrIC) = hXMPsSrOQzbh._chien_search(uc4gGmjAvJP3) if ftfygxgFas5X(sChW4gUsXrIC) > NoZxuO7wjArS - B6UAF1zReOyJ: PvvMx4JvMX6J = LCrwg7lcbmU9[:-(NoZxuO7wjArS - B6UAF1zReOyJ)] cRb7OGyXJeT1 = LCrwg7lcbmU9[-(NoZxuO7wjArS - B6UAF1zReOyJ):] if not SwdwIa0ffLqX: PvvMx4JvMX6J = hXMPsSrOQzbh._list_lstrip(LCrwg7lcbmU9[:-(NoZxuO7wjArS - B6UAF1zReOyJ)], nzTpIcepk0o8(chr(1174 - 1126) + chr(111) + chr(0b110000), 8)) if kM5Rg1n_7Gng and roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'X\xb3\x9b\x0e\xaes\x1e\xfa\x87;'), chr(100) + chr(0b1100101) + '\x63' + '\x6f' + '\x64' + chr(0b1100101))('\x75' + chr(116) + '\x66' + '\x2d' + '\x38')) < nzTpIcepk0o8(chr(1866 - 1818) + chr(0b1101111) + chr(0b100010 + 0o22) + '\x30' + '\x30', 8): PvvMx4JvMX6J = hXMPsSrOQzbh._list2str(PvvMx4JvMX6J) cRb7OGyXJeT1 = hXMPsSrOQzbh._list2str(cRb7OGyXJeT1) return (PvvMx4JvMX6J, cRb7OGyXJeT1) zWIjrOExuyqC = hXMPsSrOQzbh._forney(KuyiJVsdK9em, mxhyDqTAMpMC) a9TnDVA3d1_H = [ZiH1BRUzc8JN(nzTpIcepk0o8('\x30' + '\x6f' + chr(48), 8))] * hXMPsSrOQzbh.gf2_charac if ftfygxgFas5X(zWIjrOExuyqC) >= ftfygxgFas5X(sChW4gUsXrIC): for ZlbFMSG8gCoF in tpoEqV5cEG2w(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'X\xb3\x9b\x0e\xaes\x1e\xfa\x87;'), chr(0b1100100) + chr(0b1100101) + chr(0b1011101 + 0o6) + chr(0b1101111) + '\144' + chr(8270 - 8169))('\x75' + '\x74' + '\146' + chr(45) + chr(56)))): if ZlbFMSG8gCoF in sChW4gUsXrIC: a9TnDVA3d1_H[ZlbFMSG8gCoF] = zWIjrOExuyqC[sChW4gUsXrIC.ZpfN5tSLaZze(ZlbFMSG8gCoF)] L63iXCLJOwQn = ujppqiXNPJu0(a9TnDVA3d1_H[::-nzTpIcepk0o8('\x30' + chr(111) + '\x31', 8)]) else: L63iXCLJOwQn = ujppqiXNPJu0() teUmM7cKWZUa = VIodgqKJmL3O - L63iXCLJOwQn if ftfygxgFas5X(teUmM7cKWZUa) > ftfygxgFas5X(LCrwg7lcbmU9): teUmM7cKWZUa = VIodgqKJmL3O PvvMx4JvMX6J = teUmM7cKWZUa.coefficients[:-(NoZxuO7wjArS - B6UAF1zReOyJ)] cRb7OGyXJeT1 = teUmM7cKWZUa.coefficients[-(NoZxuO7wjArS - B6UAF1zReOyJ):] if SwdwIa0ffLqX: PvvMx4JvMX6J = hXMPsSrOQzbh._list_rjust(PvvMx4JvMX6J, B6UAF1zReOyJ, nzTpIcepk0o8(chr(0b110000) + chr(0b100000 + 0o117) + chr(0b111 + 0o51), 8)) if kM5Rg1n_7Gng and roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'X\xb3\x9b\x0e\xaes\x1e\xfa\x87;'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(1703 - 1592) + chr(100) + chr(5721 - 5620))('\165' + '\164' + chr(0b1100110) + chr(45) + '\x38')) < nzTpIcepk0o8(chr(1192 - 1144) + chr(111) + chr(52) + '\x30' + '\x30', 8): PvvMx4JvMX6J = hXMPsSrOQzbh._list2str(PvvMx4JvMX6J) cRb7OGyXJeT1 = hXMPsSrOQzbh._list2str(cRb7OGyXJeT1) return (PvvMx4JvMX6J, cRb7OGyXJeT1)
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/rs.py
RSCoder._list_lstrip
def _list_lstrip(self, L, val=0): '''Left strip the specified value''' for i in _range(len(L)): if L[i] != val: return L[i:]
python
def _list_lstrip(self, L, val=0): '''Left strip the specified value''' for i in _range(len(L)): if L[i] != val: return L[i:]
[ "def", "_list_lstrip", "(", "self", ",", "L", ",", "val", "=", "0", ")", ":", "for", "i", "in", "_range", "(", "len", "(", "L", ")", ")", ":", "if", "L", "[", "i", "]", "!=", "val", ":", "return", "L", "[", "i", ":", "]" ]
Left strip the specified value
[ "Left", "strip", "the", "specified", "value" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/rs.py#L495-L499
train
Left strip the specified value from the specified list.
GiP5xwVCF98Z,B3LV8Eo811Ma,b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ticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(111) + chr(0b1101 + 0o45) + chr(0b110100) + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b1100 + 0o45) + '\x31' + chr(782 - 729), 23695 - 23687), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(111) + chr(1968 - 1918) + chr(2083 - 2030) + '\x30', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + chr(2602 - 2549) + chr(2629 - 2575), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(54) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b100011 + 0o114) + '\065' + '\061', ord("\x08")), nzTpIcepk0o8('\060' + chr(11755 - 11644) + '\063' + chr(0b11001 + 0o31) + chr(448 - 393), 19254 - 19246), nzTpIcepk0o8(chr(952 - 904) + chr(0b1001111 + 0o40) + chr(0b110010 + 0o1) + chr(796 - 748), 0b1000), nzTpIcepk0o8(chr(280 - 232) + '\157' + chr(0b110011) + chr(0b110111) + chr(53), 0o10), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\x6f' + chr(49) + chr(829 - 774) + '\x31', 21412 - 21404), nzTpIcepk0o8('\x30' + '\157' + chr(51) + '\060', 8), nzTpIcepk0o8(chr(0b11101 + 0o23) + '\157' + '\062' + chr(0b10000 + 0o44) + chr(0b1110 + 0o42), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1010011 + 0o34) + chr(50) + chr(0b11011 + 0o26) + chr(51), 30907 - 30899), nzTpIcepk0o8(chr(48) + chr(3056 - 2945) + '\x31' + chr(2252 - 2201) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(1340 - 1292) + chr(5467 - 5356) + chr(0b110010) + chr(0b110010), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(464 - 414) + '\062', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\065' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(1765 - 1716) + chr(0b110110 + 0o0) + chr(0b110011), 37067 - 37059), nzTpIcepk0o8(chr(1273 - 1225) + chr(0b1101111) + chr(49) + chr(55) + chr(1354 - 1303), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\062' + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b10011 + 0o35) + '\157' + chr(0b110011) + chr(54) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + chr(0b101001 + 0o12) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(0b101011 + 0o7) + chr(1133 - 1083), 0o10), nzTpIcepk0o8(chr(48) + chr(5109 - 4998) + chr(50) + chr(0b110010) + chr(1428 - 1376), 0b1000), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b1000000 + 0o57) + '\x31' + '\063' + chr(0b10001 + 0o44), 8), nzTpIcepk0o8(chr(48) + chr(0b11010 + 0o125) + chr(0b1010 + 0o50) + '\x34' + chr(48), 8), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + '\066' + '\060', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(1494 - 1445) + '\x32' + chr(0b100111 + 0o15), ord("\x08")), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(6544 - 6433) + chr(0b110101) + '\065', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(4032 - 3921) + '\061', 0o10), nzTpIcepk0o8(chr(1555 - 1507) + '\x6f' + '\062' + '\060', 28291 - 28283), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + chr(0b110001), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(1524 - 1475) + chr(0b110100 + 0o3) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(55) + chr(0b110010), 12790 - 12782), nzTpIcepk0o8('\x30' + '\157' + '\061' + '\065' + chr(0b110110), 20599 - 20591), nzTpIcepk0o8('\060' + chr(111) + chr(0b101101 + 0o4) + chr(49) + chr(53), 8), nzTpIcepk0o8('\060' + chr(0b100100 + 0o113) + chr(49) + chr(50) + chr(0b11110 + 0o27), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x31' + '\x33' + chr(53), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + chr(51) + '\x34', 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + '\x33' + '\062', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110101) + chr(48), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x8a'), chr(0b1100100) + '\x65' + chr(99) + '\157' + chr(0b101010 + 0o72) + chr(0b1101 + 0o130))('\x75' + '\164' + chr(0b1100110) + chr(804 - 759) + chr(0b11111 + 0o31)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def MTaLh9wtSdjs(hXMPsSrOQzbh, QkRI2ibxeUAu, pXwvT17vr09s=nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(48), ord("\x08"))): for ZlbFMSG8gCoF in tpoEqV5cEG2w(ftfygxgFas5X(QkRI2ibxeUAu)): if QkRI2ibxeUAu[ZlbFMSG8gCoF] != pXwvT17vr09s: return QkRI2ibxeUAu[ZlbFMSG8gCoF:]
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/rs.py
RSCoder._list_rjust
def _list_rjust(self, L, width, fillchar=0): '''Left pad with the specified value to obtain a list of the specified width (length)''' length = max(0, width - len(L)) return [fillchar]*length + L
python
def _list_rjust(self, L, width, fillchar=0): '''Left pad with the specified value to obtain a list of the specified width (length)''' length = max(0, width - len(L)) return [fillchar]*length + L
[ "def", "_list_rjust", "(", "self", ",", "L", ",", "width", ",", "fillchar", "=", "0", ")", ":", "length", "=", "max", "(", "0", ",", "width", "-", "len", "(", "L", ")", ")", "return", "[", "fillchar", "]", "*", "length", "+", "L" ]
Left pad with the specified value to obtain a list of the specified width (length)
[ "Left", "pad", "with", "the", "specified", "value", "to", "obtain", "a", "list", "of", "the", "specified", "width", "(", "length", ")" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/rs.py#L501-L504
train
Left pad with the specified value to obtain a list of the specified width
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEe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3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1224 - 1176) + chr(111) + chr(0b11001 + 0o32) + chr(0b110110) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + '\063' + chr(103 - 53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + '\064' + chr(52), 0o10), nzTpIcepk0o8(chr(48) + chr(6466 - 6355) + chr(0b10001 + 0o40) + '\060' + chr(2119 - 2067), 0b1000), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\157' + '\063' + chr(50) + '\061', 0o10), nzTpIcepk0o8(chr(865 - 817) + chr(111) + chr(0b110001) + chr(1181 - 1130) + '\067', 43973 - 43965), nzTpIcepk0o8('\x30' + chr(0b11110 + 0o121) + chr(0b1110 + 0o43) + '\x35' + chr(666 - 613), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + '\063', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b111001 + 0o66) + '\x33' + chr(0b10101 + 0o37) + '\064', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\067' + chr(0b100011 + 0o17), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + '\x32' + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + '\063' + chr(0b110 + 0o55), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b110101 + 0o72) + chr(455 - 406) + '\065' + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x34' + '\x31', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + '\x32' + chr(0b10001 + 0o40), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b100011 + 0o114) + '\063' + '\x30' + '\060', 9771 - 9763), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + chr(0b110011) + '\061', 0o10), nzTpIcepk0o8(chr(377 - 329) + '\157' + chr(0b110010) + '\064' + '\065', 0b1000), nzTpIcepk0o8('\x30' + chr(1697 - 1586) + '\x37' + chr(2358 - 2306), 0o10), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(6394 - 6283) + '\061' + chr(0b100100 + 0o20) + '\x36', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + chr(0b100110 + 0o16) + chr(675 - 625), 2988 - 2980), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + '\x36' + '\063', 8), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101 + 0o56) + chr(48) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10011 + 0o40) + chr(0b110011) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(1541 - 1493) + chr(111) + '\x33' + chr(0b1100 + 0o45) + '\061', 6759 - 6751), nzTpIcepk0o8(chr(48) + chr(0b100010 + 0o115) + chr(1218 - 1166) + '\x37', 56528 - 56520), nzTpIcepk0o8(chr(48) + '\157' + chr(270 - 220) + '\x31' + chr(1852 - 1797), 21527 - 21519), nzTpIcepk0o8(chr(0b11001 + 0o27) + '\157' + chr(0b110001) + '\067' + chr(599 - 547), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b100110 + 0o13) + chr(0b11 + 0o56) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + chr(0b110101), 8290 - 8282), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\157' + '\067' + '\x36', 52288 - 52280), nzTpIcepk0o8('\060' + chr(0b110111 + 0o70) + chr(1410 - 1361) + '\062', 0o10), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\157' + chr(0b110001) + chr(49) + '\065', ord("\x08")), nzTpIcepk0o8('\060' + chr(4051 - 3940) + '\063' + '\063' + chr(55), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + chr(48) + chr(54), 40260 - 40252), nzTpIcepk0o8('\x30' + chr(1572 - 1461) + chr(878 - 828) + chr(0b110001) + chr(54), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\066' + chr(1058 - 1008), 41749 - 41741), nzTpIcepk0o8(chr(630 - 582) + chr(0b101 + 0o152) + chr(51) + '\062' + chr(0b100111 + 0o13), 53145 - 53137), nzTpIcepk0o8(chr(0b110000) + chr(3310 - 3199) + chr(0b110010) + chr(1985 - 1937), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10111 + 0o34) + '\064', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(111) + chr(0b111 + 0o56) + chr(48), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xdd'), '\144' + '\145' + '\x63' + chr(111) + chr(100) + chr(10157 - 10056))(chr(0b1100111 + 0o16) + chr(11071 - 10955) + chr(8410 - 8308) + chr(1240 - 1195) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def OBEPEucnKs68(hXMPsSrOQzbh, QkRI2ibxeUAu, dH3vcKdvgBu0, SylpOtbUtmm6=nzTpIcepk0o8(chr(678 - 630) + chr(9805 - 9694) + chr(0b100010 + 0o16), 15329 - 15321)): a1RCQZREo3Kd = KV9ckIhroIia(nzTpIcepk0o8(chr(1508 - 1460) + chr(0b1101111) + chr(0b11001 + 0o27), 8), dH3vcKdvgBu0 - ftfygxgFas5X(QkRI2ibxeUAu)) return [SylpOtbUtmm6] * a1RCQZREo3Kd + QkRI2ibxeUAu
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/rs.py
RSCoder._syndromes
def _syndromes(self, r, k=None): '''Given the received codeword r in the form of a Polynomial object, computes the syndromes and returns the syndrome polynomial. Mathematically, it's essentially equivalent to a Fourrier Transform (Chien search being the inverse). ''' n = self.n if not k: k = self.k # Note the + [GF2int(0)] : we add a 0 coefficient for the lowest degree (the constant). This effectively shifts the syndrome, and will shift every computations depending on the syndromes (such as the errors locator polynomial, errors evaluator polynomial, etc. but not the errors positions). # This is not necessary as anyway syndromes are defined such as there are only non-zero coefficients (the only 0 is the shift of the constant here) and subsequent computations will/must account for the shift by skipping the first iteration (eg, the often seen range(1, n-k+1)), but you can also avoid prepending the 0 coeff and adapt every subsequent computations to start from 0 instead of 1. return Polynomial( [r.evaluate( GF2int(self.generator)**(l+self.fcr) ) for l in _range(n-k-1, -1, -1)] + [GF2int(0)], keep_zero=True )
python
def _syndromes(self, r, k=None): '''Given the received codeword r in the form of a Polynomial object, computes the syndromes and returns the syndrome polynomial. Mathematically, it's essentially equivalent to a Fourrier Transform (Chien search being the inverse). ''' n = self.n if not k: k = self.k # Note the + [GF2int(0)] : we add a 0 coefficient for the lowest degree (the constant). This effectively shifts the syndrome, and will shift every computations depending on the syndromes (such as the errors locator polynomial, errors evaluator polynomial, etc. but not the errors positions). # This is not necessary as anyway syndromes are defined such as there are only non-zero coefficients (the only 0 is the shift of the constant here) and subsequent computations will/must account for the shift by skipping the first iteration (eg, the often seen range(1, n-k+1)), but you can also avoid prepending the 0 coeff and adapt every subsequent computations to start from 0 instead of 1. return Polynomial( [r.evaluate( GF2int(self.generator)**(l+self.fcr) ) for l in _range(n-k-1, -1, -1)] + [GF2int(0)], keep_zero=True )
[ "def", "_syndromes", "(", "self", ",", "r", ",", "k", "=", "None", ")", ":", "n", "=", "self", ".", "n", "if", "not", "k", ":", "k", "=", "self", ".", "k", "# Note the + [GF2int(0)] : we add a 0 coefficient for the lowest degree (the constant). This effectively shifts the syndrome, and will shift every computations depending on the syndromes (such as the errors locator polynomial, errors evaluator polynomial, etc. but not the errors positions).", "# This is not necessary as anyway syndromes are defined such as there are only non-zero coefficients (the only 0 is the shift of the constant here) and subsequent computations will/must account for the shift by skipping the first iteration (eg, the often seen range(1, n-k+1)), but you can also avoid prepending the 0 coeff and adapt every subsequent computations to start from 0 instead of 1.", "return", "Polynomial", "(", "[", "r", ".", "evaluate", "(", "GF2int", "(", "self", ".", "generator", ")", "**", "(", "l", "+", "self", ".", "fcr", ")", ")", "for", "l", "in", "_range", "(", "n", "-", "k", "-", "1", ",", "-", "1", ",", "-", "1", ")", "]", "+", "[", "GF2int", "(", "0", ")", "]", ",", "keep_zero", "=", "True", ")" ]
Given the received codeword r in the form of a Polynomial object, computes the syndromes and returns the syndrome polynomial. Mathematically, it's essentially equivalent to a Fourrier Transform (Chien search being the inverse).
[ "Given", "the", "received", "codeword", "r", "in", "the", "form", "of", "a", "Polynomial", "object", "computes", "the", "syndromes", "and", "returns", "the", "syndrome", "polynomial", ".", "Mathematically", "it", "s", "essentially", "equivalent", "to", "a", "Fourrier", "Transform", "(", "Chien", "search", "being", "the", "inverse", ")", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/rs.py#L506-L515
train
Given the received codeword r computes the syndromes and returns the syndrome polynomial.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0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jHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(111) + chr(0b1100 + 0o51) + chr(48), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + chr(0b110010) + '\x34', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\066' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(2060 - 2012) + chr(111) + chr(0b10011 + 0o37) + chr(0b1 + 0o63) + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\157' + '\x32' + chr(55) + chr(2013 - 1960), ord("\x08")), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(1551 - 1440) + '\x32' + chr(1050 - 999) + chr(2172 - 2121), ord("\x08")), nzTpIcepk0o8(chr(356 - 308) + chr(6752 - 6641) + chr(0b10011 + 0o37) + '\065' + '\x32', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1011000 + 0o27) + chr(0b110010) + '\x32' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(111) + chr(0b10111 + 0o32) + chr(1004 - 956) + chr(2195 - 2147), 21432 - 21424), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + chr(1607 - 1559) + '\x30', 8), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(0b110101) + chr(53), 0o10), nzTpIcepk0o8(chr(310 - 262) + chr(0b11111 + 0o120) + chr(1444 - 1394) + chr(49) + chr(0b100110 + 0o20), 58218 - 58210), nzTpIcepk0o8(chr(0b110000) + chr(0b1100111 + 0o10) + chr(53) + chr(2077 - 2022), 49576 - 49568), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(0b10000 + 0o44) + '\065', ord("\x08")), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(6076 - 5965) + '\061' + chr(1508 - 1460) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + chr(50) + chr(583 - 529), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\067', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100001 + 0o16) + '\x31' + '\067' + '\x35', 62199 - 62191), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(111) + chr(0b110001) + chr(572 - 519) + chr(593 - 540), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b101000 + 0o13), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b11 + 0o64) + chr(1988 - 1934), 37888 - 37880), nzTpIcepk0o8('\060' + '\x6f' + chr(450 - 400) + chr(0b110010) + '\x33', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + chr(387 - 335) + '\x32', 8), nzTpIcepk0o8(chr(0b110000) + chr(8681 - 8570) + '\062' + '\x32' + '\060', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + '\x33' + '\063', 8), nzTpIcepk0o8(chr(72 - 24) + '\x6f' + chr(0b110010) + chr(48) + chr(2074 - 2021), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + chr(1977 - 1928) + '\x34', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(1926 - 1877) + chr(1678 - 1629) + '\x32', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + chr(0b10011 + 0o36) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(1612 - 1564) + chr(0b1010000 + 0o37) + chr(0b101 + 0o54) + chr(0b10111 + 0o33) + chr(499 - 448), ord("\x08")), nzTpIcepk0o8(chr(767 - 719) + '\157' + chr(0b110011) + chr(48) + chr(55), 0o10), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b1111 + 0o140) + chr(0b0 + 0o61) + '\x34' + chr(53), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1010001 + 0o36) + '\064' + chr(0b1 + 0o63), ord("\x08")), nzTpIcepk0o8('\x30' + chr(3931 - 3820) + '\x32' + chr(0b11001 + 0o36) + '\x37', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + chr(0b10100 + 0o42) + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + chr(10525 - 10414) + chr(0b110001) + chr(2290 - 2240) + chr(0b101001 + 0o12), 8), nzTpIcepk0o8('\060' + '\157' + chr(1280 - 1230) + chr(0b110100) + '\064', 11590 - 11582), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(1499 - 1388) + '\x32' + chr(52), 0b1000), nzTpIcepk0o8(chr(82 - 34) + chr(111) + chr(0b110001) + '\062' + chr(680 - 626), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b1101111) + chr(53) + '\x30', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x06'), '\144' + chr(1584 - 1483) + chr(0b1100011) + chr(0b1010101 + 0o32) + chr(100) + chr(101))(chr(0b11100 + 0o131) + chr(116) + chr(0b11 + 0o143) + chr(0b1100 + 0o41) + chr(0b110001 + 0o7)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def WU_Cj34FA6gs(hXMPsSrOQzbh, LCrwg7lcbmU9, B6UAF1zReOyJ=None): NoZxuO7wjArS = hXMPsSrOQzbh.NoZxuO7wjArS if not B6UAF1zReOyJ: B6UAF1zReOyJ = hXMPsSrOQzbh.B6UAF1zReOyJ return ujppqiXNPJu0([roI3spqORKae(LCrwg7lcbmU9, roI3spqORKae(ES5oEprVxulp(b'{\x02z\xcc\xd8\xf9\xf0\xc0(0\x9c\xe2'), '\x64' + '\145' + '\143' + chr(111) + chr(9955 - 9855) + chr(0b1100101))('\165' + chr(0b1110100) + chr(0b1100110) + chr(991 - 946) + '\070'))(ZiH1BRUzc8JN(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'] C\xd4\xf1\xfd\x92\xc4*0\x87\xe5'), '\x64' + '\145' + '\143' + chr(111) + chr(0b1100100 + 0o0) + chr(0b1100101))('\165' + chr(0b1110100) + '\146' + '\055' + '\070'))) ** (fPrVrKACaFCC + roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'N7C'), chr(0b1100100) + '\x65' + chr(0b1000001 + 0o42) + '\x6f' + chr(100) + chr(6348 - 6247))(chr(0b1110101) + chr(0b1010000 + 0o44) + chr(10028 - 9926) + chr(758 - 713) + chr(56))))) for fPrVrKACaFCC in tpoEqV5cEG2w(NoZxuO7wjArS - B6UAF1zReOyJ - nzTpIcepk0o8(chr(1224 - 1176) + chr(6388 - 6277) + chr(0b110001), 0b1000), -nzTpIcepk0o8('\x30' + chr(111) + '\x31', 8), -nzTpIcepk0o8('\x30' + '\157' + chr(0b110001), 8))] + [ZiH1BRUzc8JN(nzTpIcepk0o8(chr(48) + '\157' + chr(0b110000), ord("\x08")))], keep_zero=nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1111 + 0o140) + chr(0b110001), 8))
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/rs.py
RSCoder._find_erasures_locator
def _find_erasures_locator(self, erasures_pos): '''Compute the erasures locator polynomial from the erasures positions (the positions must be relative to the x coefficient, eg: "hello worldxxxxxxxxx" is tampered to "h_ll_ worldxxxxxxxxx" with xxxxxxxxx being the ecc of length n-k=9, here the string positions are [1, 4], but the coefficients are reversed since the ecc characters are placed as the first coefficients of the polynomial, thus the coefficients of the erased characters are n-1 - [1, 4] = [18, 15] = erasures_loc to be specified as an argument.''' # See: http://ocw.usu.edu/Electrical_and_Computer_Engineering/Error_Control_Coding/lecture7.pdf and Blahut, Richard E. "Transform techniques for error control codes." IBM Journal of Research and development 23.3 (1979): 299-315. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.92.600&rep=rep1&type=pdf and also a MatLab implementation here: http://www.mathworks.com/matlabcentral/fileexchange/23567-reed-solomon-errors-and-erasures-decoder/content//RS_E_E_DEC.m erasures_loc = Polynomial([GF2int(1)]) # just to init because we will multiply, so it must be 1 so that the multiplication starts correctly without nulling any term # erasures_loc is very simple to compute: erasures_loc = prod(1 - x*alpha[j]**i) for i in erasures_pos and where alpha is the alpha chosen to evaluate polynomials (here in this library it's gf(3)). To generate c*x where c is a constant, we simply generate a Polynomial([c, 0]) where 0 is the constant and c is positionned to be the coefficient for x^1. See https://en.wikipedia.org/wiki/Forney_algorithm#Erasures for i in erasures_pos: erasures_loc = erasures_loc * (Polynomial([GF2int(1)]) - Polynomial([GF2int(self.generator)**i, 0])) return erasures_loc
python
def _find_erasures_locator(self, erasures_pos): '''Compute the erasures locator polynomial from the erasures positions (the positions must be relative to the x coefficient, eg: "hello worldxxxxxxxxx" is tampered to "h_ll_ worldxxxxxxxxx" with xxxxxxxxx being the ecc of length n-k=9, here the string positions are [1, 4], but the coefficients are reversed since the ecc characters are placed as the first coefficients of the polynomial, thus the coefficients of the erased characters are n-1 - [1, 4] = [18, 15] = erasures_loc to be specified as an argument.''' # See: http://ocw.usu.edu/Electrical_and_Computer_Engineering/Error_Control_Coding/lecture7.pdf and Blahut, Richard E. "Transform techniques for error control codes." IBM Journal of Research and development 23.3 (1979): 299-315. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.92.600&rep=rep1&type=pdf and also a MatLab implementation here: http://www.mathworks.com/matlabcentral/fileexchange/23567-reed-solomon-errors-and-erasures-decoder/content//RS_E_E_DEC.m erasures_loc = Polynomial([GF2int(1)]) # just to init because we will multiply, so it must be 1 so that the multiplication starts correctly without nulling any term # erasures_loc is very simple to compute: erasures_loc = prod(1 - x*alpha[j]**i) for i in erasures_pos and where alpha is the alpha chosen to evaluate polynomials (here in this library it's gf(3)). To generate c*x where c is a constant, we simply generate a Polynomial([c, 0]) where 0 is the constant and c is positionned to be the coefficient for x^1. See https://en.wikipedia.org/wiki/Forney_algorithm#Erasures for i in erasures_pos: erasures_loc = erasures_loc * (Polynomial([GF2int(1)]) - Polynomial([GF2int(self.generator)**i, 0])) return erasures_loc
[ "def", "_find_erasures_locator", "(", "self", ",", "erasures_pos", ")", ":", "# See: http://ocw.usu.edu/Electrical_and_Computer_Engineering/Error_Control_Coding/lecture7.pdf and Blahut, Richard E. \"Transform techniques for error control codes.\" IBM Journal of Research and development 23.3 (1979): 299-315. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.92.600&rep=rep1&type=pdf and also a MatLab implementation here: http://www.mathworks.com/matlabcentral/fileexchange/23567-reed-solomon-errors-and-erasures-decoder/content//RS_E_E_DEC.m", "erasures_loc", "=", "Polynomial", "(", "[", "GF2int", "(", "1", ")", "]", ")", "# just to init because we will multiply, so it must be 1 so that the multiplication starts correctly without nulling any term", "# erasures_loc is very simple to compute: erasures_loc = prod(1 - x*alpha[j]**i) for i in erasures_pos and where alpha is the alpha chosen to evaluate polynomials (here in this library it's gf(3)). To generate c*x where c is a constant, we simply generate a Polynomial([c, 0]) where 0 is the constant and c is positionned to be the coefficient for x^1. See https://en.wikipedia.org/wiki/Forney_algorithm#Erasures", "for", "i", "in", "erasures_pos", ":", "erasures_loc", "=", "erasures_loc", "*", "(", "Polynomial", "(", "[", "GF2int", "(", "1", ")", "]", ")", "-", "Polynomial", "(", "[", "GF2int", "(", "self", ".", "generator", ")", "**", "i", ",", "0", "]", ")", ")", "return", "erasures_loc" ]
Compute the erasures locator polynomial from the erasures positions (the positions must be relative to the x coefficient, eg: "hello worldxxxxxxxxx" is tampered to "h_ll_ worldxxxxxxxxx" with xxxxxxxxx being the ecc of length n-k=9, here the string positions are [1, 4], but the coefficients are reversed since the ecc characters are placed as the first coefficients of the polynomial, thus the coefficients of the erased characters are n-1 - [1, 4] = [18, 15] = erasures_loc to be specified as an argument.
[ "Compute", "the", "erasures", "locator", "polynomial", "from", "the", "erasures", "positions", "(", "the", "positions", "must", "be", "relative", "to", "the", "x", "coefficient", "eg", ":", "hello", "worldxxxxxxxxx", "is", "tampered", "to", "h_ll_", "worldxxxxxxxxx", "with", "xxxxxxxxx", "being", "the", "ecc", "of", "length", "n", "-", "k", "=", "9", "here", "the", "string", "positions", "are", "[", "1", "4", "]", "but", "the", "coefficients", "are", "reversed", "since", "the", "ecc", "characters", "are", "placed", "as", "the", "first", "coefficients", "of", "the", "polynomial", "thus", "the", "coefficients", "of", "the", "erased", "characters", "are", "n", "-", "1", "-", "[", "1", "4", "]", "=", "[", "18", "15", "]", "=", "erasures_loc", "to", "be", "specified", "as", "an", "argument", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/rs.py#L538-L545
train
Find the erasures locator polynomial from the erasures positions.
GiP5xwVCF98Z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wyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110111) + '\066', 42795 - 42787), nzTpIcepk0o8(chr(0b110000) + chr(3534 - 3423) + chr(0b110010) + '\x34' + chr(51), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(1113 - 1061) + chr(50), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b101011 + 0o6) + '\x30', 57667 - 57659), nzTpIcepk0o8('\060' + chr(0b1010001 + 0o36) + '\x31' + '\x31' + '\x33', 0b1000), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(111) + '\064' + chr(0b11000 + 0o31), ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(111) + '\063' + '\x37' + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\060', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1404 - 1355) + chr(0b110011) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(54) + '\060', 0b1000), nzTpIcepk0o8('\060' + '\157' + '\063' + chr(0b10111 + 0o35) + chr(48), 20560 - 20552), nzTpIcepk0o8('\060' + chr(1017 - 906) + '\062' + chr(1213 - 1159) + chr(0b101001 + 0o12), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + chr(0b1000 + 0o57) + chr(0b0 + 0o60), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1968 - 1913) + '\x30', 0b1000), nzTpIcepk0o8(chr(950 - 902) + chr(111) + '\061' + chr(0b110000) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\157' + chr(101 - 51) + '\x30' + '\x31', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + '\x36' + chr(55), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + '\x37' + '\x35', 50926 - 50918), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1603 - 1553) + chr(365 - 311) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b100 + 0o54) + '\157' + '\x37' + chr(800 - 747), 9535 - 9527), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110101) + '\065', 0o10), nzTpIcepk0o8(chr(2050 - 2002) + '\157' + chr(50) + chr(2307 - 2256) + '\064', 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x31' + '\x33' + chr(2821 - 2767), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(0b110011) + chr(1734 - 1685), 0o10), nzTpIcepk0o8('\x30' + chr(7141 - 7030) + chr(0b10110 + 0o40) + '\060', 8), nzTpIcepk0o8('\060' + '\157' + chr(2242 - 2191) + '\x33' + chr(48), 0o10), nzTpIcepk0o8(chr(0b111 + 0o51) + '\157' + chr(0b100000 + 0o22) + '\063' + chr(0b11001 + 0o30), ord("\x08")), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b1101111) + chr(0b110010) + chr(0b110100) + chr(110 - 57), 0b1000), nzTpIcepk0o8(chr(489 - 441) + chr(9830 - 9719) + chr(170 - 120) + chr(0b110110) + '\x30', 38479 - 38471), nzTpIcepk0o8('\060' + chr(0b100101 + 0o112) + '\x32' + chr(0b111 + 0o53) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\x30' + chr(3002 - 2891) + chr(720 - 669) + chr(0b110000) + '\x33', 41702 - 41694), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2405 - 2354) + chr(2358 - 2308) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(614 - 566) + chr(111) + '\x31' + '\x30' + chr(49), 52979 - 52971), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(54) + chr(0b110110), 26226 - 26218), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(0b100001 + 0o17) + chr(0b11001 + 0o33), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b110010 + 0o75) + '\x32' + chr(1577 - 1528) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + '\060' + chr(599 - 550), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + chr(0b110000) + '\x30', 0o10), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(3348 - 3237) + '\x33' + chr(0b101000 + 0o13) + chr(0b110001), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b1010010 + 0o35) + '\065' + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x10'), chr(2765 - 2665) + '\x65' + '\x63' + chr(0b11110 + 0o121) + chr(8699 - 8599) + '\x65')(chr(0b1100100 + 0o21) + '\x74' + chr(0b1100110) + chr(0b101100 + 0o1) + chr(0b1100 + 0o54)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def R9_q8SdNL5Nj(hXMPsSrOQzbh, umsrLhYf182Z): c88QIkjOjka1 = ujppqiXNPJu0([ZiH1BRUzc8JN(nzTpIcepk0o8(chr(149 - 101) + '\x6f' + chr(0b110001), ord("\x08")))]) for ZlbFMSG8gCoF in umsrLhYf182Z: c88QIkjOjka1 = c88QIkjOjka1 * (ujppqiXNPJu0([ZiH1BRUzc8JN(nzTpIcepk0o8('\060' + chr(111) + chr(49), 8))]) - ujppqiXNPJu0([ZiH1BRUzc8JN(hXMPsSrOQzbh.utrvLf8Qjpjk) ** ZlbFMSG8gCoF, nzTpIcepk0o8(chr(0b110000) + chr(0b1100001 + 0o16) + chr(0b11000 + 0o30), 8)])) return c88QIkjOjka1
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/rs.py
RSCoder._berlekamp_massey
def _berlekamp_massey(self, s, k=None, erasures_loc=None, erasures_eval=None, erasures_count=0): '''Computes and returns the errata (errors+erasures) locator polynomial (sigma) and the error evaluator polynomial (omega) at the same time. If the erasures locator is specified, we will return an errors-and-erasures locator polynomial and an errors-and-erasures evaluator polynomial, else it will compute only errors. With erasures in addition to errors, it can simultaneously decode up to v+2e <= (n-k) where v is the number of erasures and e the number of errors. Mathematically speaking, this is equivalent to a spectral analysis (see Blahut, "Algebraic Codes for Data Transmission", 2003, chapter 7.6 Decoding in Time Domain). The parameter s is the syndrome polynomial (syndromes encoded in a generator function) as returned by _syndromes. Notes: The error polynomial: E(x) = E_0 + E_1 x + ... + E_(n-1) x^(n-1) j_1, j_2, ..., j_s are the error positions. (There are at most s errors) Error location X_i is defined: X_i = α^(j_i) that is, the power of α (alpha) corresponding to the error location Error magnitude Y_i is defined: E_(j_i) that is, the coefficient in the error polynomial at position j_i Error locator polynomial: sigma(z) = Product( 1 - X_i * z, i=1..s ) roots are the reciprocals of the error locations ( 1/X_1, 1/X_2, ...) Error evaluator polynomial omega(z) is here computed at the same time as sigma, but it can also be constructed afterwards using the syndrome and sigma (see _find_error_evaluator() method). It can be seen that the algorithm tries to iteratively solve for the error locator polynomial by solving one equation after another and updating the error locator polynomial. If it turns out that it cannot solve the equation at some step, then it computes the error and weights it by the last non-zero discriminant found, and delays the weighted result to increase the polynomial degree by 1. Ref: "Reed Solomon Decoder: TMS320C64x Implementation" by Jagadeesh Sankaran, December 2000, Application Report SPRA686 The best paper I found describing the BM algorithm for errata (errors-and-erasures) evaluator computation is in "Algebraic Codes for Data Transmission", Richard E. Blahut, 2003. ''' # For errors-and-erasures decoding, see: "Algebraic Codes for Data Transmission", Richard E. Blahut, 2003 and (but it's less complete): Blahut, Richard E. "Transform techniques for error control codes." IBM Journal of Research and development 23.3 (1979): 299-315. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.92.600&rep=rep1&type=pdf and also a MatLab implementation here: http://www.mathworks.com/matlabcentral/fileexchange/23567-reed-solomon-errors-and-erasures-decoder/content//RS_E_E_DEC.m # also see: Blahut, Richard E. "A universal Reed-Solomon decoder." IBM Journal of Research and Development 28.2 (1984): 150-158. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.84.2084&rep=rep1&type=pdf # and another good alternative book with concrete programming examples: Jiang, Yuan. A practical guide to error-control coding using Matlab. Artech House, 2010. n = self.n if not k: k = self.k # Initialize, depending on if we include erasures or not: if erasures_loc: sigma = [ Polynomial(erasures_loc.coefficients) ] # copy erasures_loc by creating a new Polynomial, so that we initialize the errata locator polynomial with the erasures locator polynomial. B = [ Polynomial(erasures_loc.coefficients) ] omega = [ Polynomial(erasures_eval.coefficients) ] # to compute omega (the evaluator polynomial) at the same time, we also need to initialize it with the partial erasures evaluator polynomial A = [ Polynomial(erasures_eval.coefficients) ] # TODO: fix the initial value of the evaluator support polynomial, because currently the final omega is not correct (it contains higher order terms that should be removed by the end of BM) else: sigma = [ Polynomial([GF2int(1)]) ] # error locator polynomial. Also called Lambda in other notations. B = [ Polynomial([GF2int(1)]) ] # this is the error locator support/secondary polynomial, which is a funky way to say that it's just a temporary variable that will help us construct sigma, the error locator polynomial omega = [ Polynomial([GF2int(1)]) ] # error evaluator polynomial. We don't need to initialize it with erasures_loc, it will still work, because Delta is computed using sigma, which itself is correctly initialized with erasures if needed. A = [ Polynomial([GF2int(0)]) ] # this is the error evaluator support/secondary polynomial, to help us construct omega L = [ 0 ] # update flag: necessary variable to check when updating is necessary and to check bounds (to avoid wrongly eliminating the higher order terms). For more infos, see https://www.cs.duke.edu/courses/spring11/cps296.3/decoding_rs.pdf M = [ 0 ] # optional variable to check bounds (so that we do not mistakenly overwrite the higher order terms). This is not necessary, it's only an additional safe check. For more infos, see the presentation decoding_rs.pdf by Andrew Brown in the doc folder. # Fix the syndrome shifting: when computing the syndrome, some implementations may prepend a 0 coefficient for the lowest degree term (the constant). This is a case of syndrome shifting, thus the syndrome will be bigger than the number of ecc symbols (I don't know what purpose serves this shifting). If that's the case, then we need to account for the syndrome shifting when we use the syndrome such as inside BM, by skipping those prepended coefficients. # Another way to detect the shifting is to detect the 0 coefficients: by definition, a syndrome does not contain any 0 coefficient (except if there are no errors/erasures, in this case they are all 0). This however doesn't work with the modified Forney syndrome (that we do not use in this lib but it may be implemented in the future), which set to 0 the coefficients corresponding to erasures, leaving only the coefficients corresponding to errors. synd_shift = 0 if len(s) > (n-k): synd_shift = len(s) - (n-k) # Polynomial constants: ONE = Polynomial(z0=GF2int(1)) ZERO = Polynomial(z0=GF2int(0)) Z = Polynomial(z1=GF2int(1)) # used to shift polynomials, simply multiply your poly * Z to shift # Precaching s2 = ONE + s # Iteratively compute the polynomials n-k-erasures_count times. The last ones will be correct (since the algorithm refines the error/errata locator polynomial iteratively depending on the discrepancy, which is kind of a difference-from-correctness measure). for l in _range(0, n-k-erasures_count): # skip the first erasures_count iterations because we already computed the partial errata locator polynomial (by initializing with the erasures locator polynomial) K = erasures_count+l+synd_shift # skip the FIRST erasures_count iterations (not the last iterations, that's very important!) # Goal for each iteration: Compute sigma[l+1] and omega[l+1] such that # (1 + s)*sigma[l] == omega[l] in mod z^(K) # For this particular loop iteration, we have sigma[l] and omega[l], # and are computing sigma[l+1] and omega[l+1] # First find Delta, the non-zero coefficient of z^(K) in # (1 + s) * sigma[l] # Note that adding 1 to the syndrome s is not really necessary, you can do as well without. # This delta is valid for l (this iteration) only Delta = ( s2 * sigma[l] ).get_coefficient(K) # Delta is also known as the Discrepancy, and is always a scalar (not a polynomial). # Make it a polynomial of degree 0, just for ease of computation with polynomials sigma and omega. Delta = Polynomial(x0=Delta) # Can now compute sigma[l+1] and omega[l+1] from # sigma[l], omega[l], B[l], A[l], and Delta sigma.append( sigma[l] - Delta * Z * B[l] ) omega.append( omega[l] - Delta * Z * A[l] ) # Now compute the next support polynomials B and A # There are two ways to do this # This is based on a messy case analysis on the degrees of the four polynomials sigma, omega, A and B in order to minimize the degrees of A and B. For more infos, see https://www.cs.duke.edu/courses/spring10/cps296.3/decoding_rs_scribe.pdf # In fact it ensures that the degree of the final polynomials aren't too large. if Delta == ZERO or 2*L[l] > K+erasures_count \ or (2*L[l] == K+erasures_count and M[l] == 0): #if Delta == ZERO or len(sigma[l+1]) <= len(sigma[l]): # another way to compute when to update, and it doesn't require to maintain the update flag L # Rule A B.append( Z * B[l] ) A.append( Z * A[l] ) L.append( L[l] ) M.append( M[l] ) elif (Delta != ZERO and 2*L[l] < K+erasures_count) \ or (2*L[l] == K+erasures_count and M[l] != 0): # elif Delta != ZERO and len(sigma[l+1]) > len(sigma[l]): # another way to compute when to update, and it doesn't require to maintain the update flag L # Rule B B.append( sigma[l] // Delta ) A.append( omega[l] // Delta ) L.append( K - L[l] ) # the update flag L is tricky: in Blahut's schema, it's mandatory to use `L = K - L - erasures_count` (and indeed in a previous draft of this function, if you forgot to do `- erasures_count` it would lead to correcting only 2*(errors+erasures) <= (n-k) instead of 2*errors+erasures <= (n-k)), but in this latest draft, this will lead to a wrong decoding in some cases where it should correctly decode! Thus you should try with and without `- erasures_count` to update L on your own implementation and see which one works OK without producing wrong decoding failures. M.append( 1 - M[l] ) else: raise Exception("Code shouldn't have gotten here") # Hack to fix the simultaneous computation of omega, the errata evaluator polynomial: because A (the errata evaluator support polynomial) is not correctly initialized (I could not find any info in academic papers). So at the end, we get the correct errata evaluator polynomial omega + some higher order terms that should not be present, but since we know that sigma is always correct and the maximum degree should be the same as omega, we can fix omega by truncating too high order terms. if omega[-1].degree > sigma[-1].degree: omega[-1] = Polynomial(omega[-1].coefficients[-(sigma[-1].degree+1):]) # Debuglines, uncomment to show the result of every iterations #print "SIGMA BM" #for i,x in enumerate(sigma): #print i, ":", x # Return the last result of the iterations (since BM compute iteratively, the last iteration being correct - it may already be before, but we're not sure) return sigma[-1], omega[-1]
python
def _berlekamp_massey(self, s, k=None, erasures_loc=None, erasures_eval=None, erasures_count=0): '''Computes and returns the errata (errors+erasures) locator polynomial (sigma) and the error evaluator polynomial (omega) at the same time. If the erasures locator is specified, we will return an errors-and-erasures locator polynomial and an errors-and-erasures evaluator polynomial, else it will compute only errors. With erasures in addition to errors, it can simultaneously decode up to v+2e <= (n-k) where v is the number of erasures and e the number of errors. Mathematically speaking, this is equivalent to a spectral analysis (see Blahut, "Algebraic Codes for Data Transmission", 2003, chapter 7.6 Decoding in Time Domain). The parameter s is the syndrome polynomial (syndromes encoded in a generator function) as returned by _syndromes. Notes: The error polynomial: E(x) = E_0 + E_1 x + ... + E_(n-1) x^(n-1) j_1, j_2, ..., j_s are the error positions. (There are at most s errors) Error location X_i is defined: X_i = α^(j_i) that is, the power of α (alpha) corresponding to the error location Error magnitude Y_i is defined: E_(j_i) that is, the coefficient in the error polynomial at position j_i Error locator polynomial: sigma(z) = Product( 1 - X_i * z, i=1..s ) roots are the reciprocals of the error locations ( 1/X_1, 1/X_2, ...) Error evaluator polynomial omega(z) is here computed at the same time as sigma, but it can also be constructed afterwards using the syndrome and sigma (see _find_error_evaluator() method). It can be seen that the algorithm tries to iteratively solve for the error locator polynomial by solving one equation after another and updating the error locator polynomial. If it turns out that it cannot solve the equation at some step, then it computes the error and weights it by the last non-zero discriminant found, and delays the weighted result to increase the polynomial degree by 1. Ref: "Reed Solomon Decoder: TMS320C64x Implementation" by Jagadeesh Sankaran, December 2000, Application Report SPRA686 The best paper I found describing the BM algorithm for errata (errors-and-erasures) evaluator computation is in "Algebraic Codes for Data Transmission", Richard E. Blahut, 2003. ''' # For errors-and-erasures decoding, see: "Algebraic Codes for Data Transmission", Richard E. Blahut, 2003 and (but it's less complete): Blahut, Richard E. "Transform techniques for error control codes." IBM Journal of Research and development 23.3 (1979): 299-315. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.92.600&rep=rep1&type=pdf and also a MatLab implementation here: http://www.mathworks.com/matlabcentral/fileexchange/23567-reed-solomon-errors-and-erasures-decoder/content//RS_E_E_DEC.m # also see: Blahut, Richard E. "A universal Reed-Solomon decoder." IBM Journal of Research and Development 28.2 (1984): 150-158. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.84.2084&rep=rep1&type=pdf # and another good alternative book with concrete programming examples: Jiang, Yuan. A practical guide to error-control coding using Matlab. Artech House, 2010. n = self.n if not k: k = self.k # Initialize, depending on if we include erasures or not: if erasures_loc: sigma = [ Polynomial(erasures_loc.coefficients) ] # copy erasures_loc by creating a new Polynomial, so that we initialize the errata locator polynomial with the erasures locator polynomial. B = [ Polynomial(erasures_loc.coefficients) ] omega = [ Polynomial(erasures_eval.coefficients) ] # to compute omega (the evaluator polynomial) at the same time, we also need to initialize it with the partial erasures evaluator polynomial A = [ Polynomial(erasures_eval.coefficients) ] # TODO: fix the initial value of the evaluator support polynomial, because currently the final omega is not correct (it contains higher order terms that should be removed by the end of BM) else: sigma = [ Polynomial([GF2int(1)]) ] # error locator polynomial. Also called Lambda in other notations. B = [ Polynomial([GF2int(1)]) ] # this is the error locator support/secondary polynomial, which is a funky way to say that it's just a temporary variable that will help us construct sigma, the error locator polynomial omega = [ Polynomial([GF2int(1)]) ] # error evaluator polynomial. We don't need to initialize it with erasures_loc, it will still work, because Delta is computed using sigma, which itself is correctly initialized with erasures if needed. A = [ Polynomial([GF2int(0)]) ] # this is the error evaluator support/secondary polynomial, to help us construct omega L = [ 0 ] # update flag: necessary variable to check when updating is necessary and to check bounds (to avoid wrongly eliminating the higher order terms). For more infos, see https://www.cs.duke.edu/courses/spring11/cps296.3/decoding_rs.pdf M = [ 0 ] # optional variable to check bounds (so that we do not mistakenly overwrite the higher order terms). This is not necessary, it's only an additional safe check. For more infos, see the presentation decoding_rs.pdf by Andrew Brown in the doc folder. # Fix the syndrome shifting: when computing the syndrome, some implementations may prepend a 0 coefficient for the lowest degree term (the constant). This is a case of syndrome shifting, thus the syndrome will be bigger than the number of ecc symbols (I don't know what purpose serves this shifting). If that's the case, then we need to account for the syndrome shifting when we use the syndrome such as inside BM, by skipping those prepended coefficients. # Another way to detect the shifting is to detect the 0 coefficients: by definition, a syndrome does not contain any 0 coefficient (except if there are no errors/erasures, in this case they are all 0). This however doesn't work with the modified Forney syndrome (that we do not use in this lib but it may be implemented in the future), which set to 0 the coefficients corresponding to erasures, leaving only the coefficients corresponding to errors. synd_shift = 0 if len(s) > (n-k): synd_shift = len(s) - (n-k) # Polynomial constants: ONE = Polynomial(z0=GF2int(1)) ZERO = Polynomial(z0=GF2int(0)) Z = Polynomial(z1=GF2int(1)) # used to shift polynomials, simply multiply your poly * Z to shift # Precaching s2 = ONE + s # Iteratively compute the polynomials n-k-erasures_count times. The last ones will be correct (since the algorithm refines the error/errata locator polynomial iteratively depending on the discrepancy, which is kind of a difference-from-correctness measure). for l in _range(0, n-k-erasures_count): # skip the first erasures_count iterations because we already computed the partial errata locator polynomial (by initializing with the erasures locator polynomial) K = erasures_count+l+synd_shift # skip the FIRST erasures_count iterations (not the last iterations, that's very important!) # Goal for each iteration: Compute sigma[l+1] and omega[l+1] such that # (1 + s)*sigma[l] == omega[l] in mod z^(K) # For this particular loop iteration, we have sigma[l] and omega[l], # and are computing sigma[l+1] and omega[l+1] # First find Delta, the non-zero coefficient of z^(K) in # (1 + s) * sigma[l] # Note that adding 1 to the syndrome s is not really necessary, you can do as well without. # This delta is valid for l (this iteration) only Delta = ( s2 * sigma[l] ).get_coefficient(K) # Delta is also known as the Discrepancy, and is always a scalar (not a polynomial). # Make it a polynomial of degree 0, just for ease of computation with polynomials sigma and omega. Delta = Polynomial(x0=Delta) # Can now compute sigma[l+1] and omega[l+1] from # sigma[l], omega[l], B[l], A[l], and Delta sigma.append( sigma[l] - Delta * Z * B[l] ) omega.append( omega[l] - Delta * Z * A[l] ) # Now compute the next support polynomials B and A # There are two ways to do this # This is based on a messy case analysis on the degrees of the four polynomials sigma, omega, A and B in order to minimize the degrees of A and B. For more infos, see https://www.cs.duke.edu/courses/spring10/cps296.3/decoding_rs_scribe.pdf # In fact it ensures that the degree of the final polynomials aren't too large. if Delta == ZERO or 2*L[l] > K+erasures_count \ or (2*L[l] == K+erasures_count and M[l] == 0): #if Delta == ZERO or len(sigma[l+1]) <= len(sigma[l]): # another way to compute when to update, and it doesn't require to maintain the update flag L # Rule A B.append( Z * B[l] ) A.append( Z * A[l] ) L.append( L[l] ) M.append( M[l] ) elif (Delta != ZERO and 2*L[l] < K+erasures_count) \ or (2*L[l] == K+erasures_count and M[l] != 0): # elif Delta != ZERO and len(sigma[l+1]) > len(sigma[l]): # another way to compute when to update, and it doesn't require to maintain the update flag L # Rule B B.append( sigma[l] // Delta ) A.append( omega[l] // Delta ) L.append( K - L[l] ) # the update flag L is tricky: in Blahut's schema, it's mandatory to use `L = K - L - erasures_count` (and indeed in a previous draft of this function, if you forgot to do `- erasures_count` it would lead to correcting only 2*(errors+erasures) <= (n-k) instead of 2*errors+erasures <= (n-k)), but in this latest draft, this will lead to a wrong decoding in some cases where it should correctly decode! Thus you should try with and without `- erasures_count` to update L on your own implementation and see which one works OK without producing wrong decoding failures. M.append( 1 - M[l] ) else: raise Exception("Code shouldn't have gotten here") # Hack to fix the simultaneous computation of omega, the errata evaluator polynomial: because A (the errata evaluator support polynomial) is not correctly initialized (I could not find any info in academic papers). So at the end, we get the correct errata evaluator polynomial omega + some higher order terms that should not be present, but since we know that sigma is always correct and the maximum degree should be the same as omega, we can fix omega by truncating too high order terms. if omega[-1].degree > sigma[-1].degree: omega[-1] = Polynomial(omega[-1].coefficients[-(sigma[-1].degree+1):]) # Debuglines, uncomment to show the result of every iterations #print "SIGMA BM" #for i,x in enumerate(sigma): #print i, ":", x # Return the last result of the iterations (since BM compute iteratively, the last iteration being correct - it may already be before, but we're not sure) return sigma[-1], omega[-1]
[ "def", "_berlekamp_massey", "(", "self", ",", "s", ",", "k", "=", "None", ",", "erasures_loc", "=", "None", ",", "erasures_eval", "=", "None", ",", "erasures_count", "=", "0", ")", ":", "# For errors-and-erasures decoding, see: \"Algebraic Codes for Data Transmission\", Richard E. Blahut, 2003 and (but it's less complete): Blahut, Richard E. \"Transform techniques for error control codes.\" IBM Journal of Research and development 23.3 (1979): 299-315. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.92.600&rep=rep1&type=pdf and also a MatLab implementation here: http://www.mathworks.com/matlabcentral/fileexchange/23567-reed-solomon-errors-and-erasures-decoder/content//RS_E_E_DEC.m", "# also see: Blahut, Richard E. \"A universal Reed-Solomon decoder.\" IBM Journal of Research and Development 28.2 (1984): 150-158. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.84.2084&rep=rep1&type=pdf", "# and another good alternative book with concrete programming examples: Jiang, Yuan. A practical guide to error-control coding using Matlab. Artech House, 2010.", "n", "=", "self", ".", "n", "if", "not", "k", ":", "k", "=", "self", ".", "k", "# Initialize, depending on if we include erasures or not:", "if", "erasures_loc", ":", "sigma", "=", "[", "Polynomial", "(", "erasures_loc", ".", "coefficients", ")", "]", "# copy erasures_loc by creating a new Polynomial, so that we initialize the errata locator polynomial with the erasures locator polynomial.", "B", "=", "[", "Polynomial", "(", "erasures_loc", ".", "coefficients", ")", "]", "omega", "=", "[", "Polynomial", "(", "erasures_eval", ".", "coefficients", ")", "]", "# to compute omega (the evaluator polynomial) at the same time, we also need to initialize it with the partial erasures evaluator polynomial", "A", "=", "[", "Polynomial", "(", "erasures_eval", ".", "coefficients", ")", "]", "# TODO: fix the initial value of the evaluator support polynomial, because currently the final omega is not correct (it contains higher order terms that should be removed by the end of BM)", "else", ":", "sigma", "=", "[", "Polynomial", "(", "[", "GF2int", "(", "1", ")", "]", ")", "]", "# error locator polynomial. Also called Lambda in other notations.", "B", "=", "[", "Polynomial", "(", "[", "GF2int", "(", "1", ")", "]", ")", "]", "# this is the error locator support/secondary polynomial, which is a funky way to say that it's just a temporary variable that will help us construct sigma, the error locator polynomial", "omega", "=", "[", "Polynomial", "(", "[", "GF2int", "(", "1", ")", "]", ")", "]", "# error evaluator polynomial. We don't need to initialize it with erasures_loc, it will still work, because Delta is computed using sigma, which itself is correctly initialized with erasures if needed.", "A", "=", "[", "Polynomial", "(", "[", "GF2int", "(", "0", ")", "]", ")", "]", "# this is the error evaluator support/secondary polynomial, to help us construct omega", "L", "=", "[", "0", "]", "# update flag: necessary variable to check when updating is necessary and to check bounds (to avoid wrongly eliminating the higher order terms). For more infos, see https://www.cs.duke.edu/courses/spring11/cps296.3/decoding_rs.pdf", "M", "=", "[", "0", "]", "# optional variable to check bounds (so that we do not mistakenly overwrite the higher order terms). This is not necessary, it's only an additional safe check. For more infos, see the presentation decoding_rs.pdf by Andrew Brown in the doc folder.", "# Fix the syndrome shifting: when computing the syndrome, some implementations may prepend a 0 coefficient for the lowest degree term (the constant). This is a case of syndrome shifting, thus the syndrome will be bigger than the number of ecc symbols (I don't know what purpose serves this shifting). If that's the case, then we need to account for the syndrome shifting when we use the syndrome such as inside BM, by skipping those prepended coefficients.", "# Another way to detect the shifting is to detect the 0 coefficients: by definition, a syndrome does not contain any 0 coefficient (except if there are no errors/erasures, in this case they are all 0). This however doesn't work with the modified Forney syndrome (that we do not use in this lib but it may be implemented in the future), which set to 0 the coefficients corresponding to erasures, leaving only the coefficients corresponding to errors.", "synd_shift", "=", "0", "if", "len", "(", "s", ")", ">", "(", "n", "-", "k", ")", ":", "synd_shift", "=", "len", "(", "s", ")", "-", "(", "n", "-", "k", ")", "# Polynomial constants:", "ONE", "=", "Polynomial", "(", "z0", "=", "GF2int", "(", "1", ")", ")", "ZERO", "=", "Polynomial", "(", "z0", "=", "GF2int", "(", "0", ")", ")", "Z", "=", "Polynomial", "(", "z1", "=", "GF2int", "(", "1", ")", ")", "# used to shift polynomials, simply multiply your poly * Z to shift", "# Precaching", "s2", "=", "ONE", "+", "s", "# Iteratively compute the polynomials n-k-erasures_count times. The last ones will be correct (since the algorithm refines the error/errata locator polynomial iteratively depending on the discrepancy, which is kind of a difference-from-correctness measure).", "for", "l", "in", "_range", "(", "0", ",", "n", "-", "k", "-", "erasures_count", ")", ":", "# skip the first erasures_count iterations because we already computed the partial errata locator polynomial (by initializing with the erasures locator polynomial)", "K", "=", "erasures_count", "+", "l", "+", "synd_shift", "# skip the FIRST erasures_count iterations (not the last iterations, that's very important!)", "# Goal for each iteration: Compute sigma[l+1] and omega[l+1] such that", "# (1 + s)*sigma[l] == omega[l] in mod z^(K)", "# For this particular loop iteration, we have sigma[l] and omega[l],", "# and are computing sigma[l+1] and omega[l+1]", "# First find Delta, the non-zero coefficient of z^(K) in", "# (1 + s) * sigma[l]", "# Note that adding 1 to the syndrome s is not really necessary, you can do as well without.", "# This delta is valid for l (this iteration) only", "Delta", "=", "(", "s2", "*", "sigma", "[", "l", "]", ")", ".", "get_coefficient", "(", "K", ")", "# Delta is also known as the Discrepancy, and is always a scalar (not a polynomial).", "# Make it a polynomial of degree 0, just for ease of computation with polynomials sigma and omega.", "Delta", "=", "Polynomial", "(", "x0", "=", "Delta", ")", "# Can now compute sigma[l+1] and omega[l+1] from", "# sigma[l], omega[l], B[l], A[l], and Delta", "sigma", ".", "append", "(", "sigma", "[", "l", "]", "-", "Delta", "*", "Z", "*", "B", "[", "l", "]", ")", "omega", ".", "append", "(", "omega", "[", "l", "]", "-", "Delta", "*", "Z", "*", "A", "[", "l", "]", ")", "# Now compute the next support polynomials B and A", "# There are two ways to do this", "# This is based on a messy case analysis on the degrees of the four polynomials sigma, omega, A and B in order to minimize the degrees of A and B. For more infos, see https://www.cs.duke.edu/courses/spring10/cps296.3/decoding_rs_scribe.pdf", "# In fact it ensures that the degree of the final polynomials aren't too large.", "if", "Delta", "==", "ZERO", "or", "2", "*", "L", "[", "l", "]", ">", "K", "+", "erasures_count", "or", "(", "2", "*", "L", "[", "l", "]", "==", "K", "+", "erasures_count", "and", "M", "[", "l", "]", "==", "0", ")", ":", "#if Delta == ZERO or len(sigma[l+1]) <= len(sigma[l]): # another way to compute when to update, and it doesn't require to maintain the update flag L", "# Rule A", "B", ".", "append", "(", "Z", "*", "B", "[", "l", "]", ")", "A", ".", "append", "(", "Z", "*", "A", "[", "l", "]", ")", "L", ".", "append", "(", "L", "[", "l", "]", ")", "M", ".", "append", "(", "M", "[", "l", "]", ")", "elif", "(", "Delta", "!=", "ZERO", "and", "2", "*", "L", "[", "l", "]", "<", "K", "+", "erasures_count", ")", "or", "(", "2", "*", "L", "[", "l", "]", "==", "K", "+", "erasures_count", "and", "M", "[", "l", "]", "!=", "0", ")", ":", "# elif Delta != ZERO and len(sigma[l+1]) > len(sigma[l]): # another way to compute when to update, and it doesn't require to maintain the update flag L", "# Rule B", "B", ".", "append", "(", "sigma", "[", "l", "]", "//", "Delta", ")", "A", ".", "append", "(", "omega", "[", "l", "]", "//", "Delta", ")", "L", ".", "append", "(", "K", "-", "L", "[", "l", "]", ")", "# the update flag L is tricky: in Blahut's schema, it's mandatory to use `L = K - L - erasures_count` (and indeed in a previous draft of this function, if you forgot to do `- erasures_count` it would lead to correcting only 2*(errors+erasures) <= (n-k) instead of 2*errors+erasures <= (n-k)), but in this latest draft, this will lead to a wrong decoding in some cases where it should correctly decode! Thus you should try with and without `- erasures_count` to update L on your own implementation and see which one works OK without producing wrong decoding failures.", "M", ".", "append", "(", "1", "-", "M", "[", "l", "]", ")", "else", ":", "raise", "Exception", "(", "\"Code shouldn't have gotten here\"", ")", "# Hack to fix the simultaneous computation of omega, the errata evaluator polynomial: because A (the errata evaluator support polynomial) is not correctly initialized (I could not find any info in academic papers). So at the end, we get the correct errata evaluator polynomial omega + some higher order terms that should not be present, but since we know that sigma is always correct and the maximum degree should be the same as omega, we can fix omega by truncating too high order terms.", "if", "omega", "[", "-", "1", "]", ".", "degree", ">", "sigma", "[", "-", "1", "]", ".", "degree", ":", "omega", "[", "-", "1", "]", "=", "Polynomial", "(", "omega", "[", "-", "1", "]", ".", "coefficients", "[", "-", "(", "sigma", "[", "-", "1", "]", ".", "degree", "+", "1", ")", ":", "]", ")", "# Debuglines, uncomment to show the result of every iterations", "#print \"SIGMA BM\"", "#for i,x in enumerate(sigma):", "#print i, \":\", x", "# Return the last result of the iterations (since BM compute iteratively, the last iteration being correct - it may already be before, but we're not sure)", "return", "sigma", "[", "-", "1", "]", ",", "omega", "[", "-", "1", "]" ]
Computes and returns the errata (errors+erasures) locator polynomial (sigma) and the error evaluator polynomial (omega) at the same time. If the erasures locator is specified, we will return an errors-and-erasures locator polynomial and an errors-and-erasures evaluator polynomial, else it will compute only errors. With erasures in addition to errors, it can simultaneously decode up to v+2e <= (n-k) where v is the number of erasures and e the number of errors. Mathematically speaking, this is equivalent to a spectral analysis (see Blahut, "Algebraic Codes for Data Transmission", 2003, chapter 7.6 Decoding in Time Domain). The parameter s is the syndrome polynomial (syndromes encoded in a generator function) as returned by _syndromes. Notes: The error polynomial: E(x) = E_0 + E_1 x + ... + E_(n-1) x^(n-1) j_1, j_2, ..., j_s are the error positions. (There are at most s errors) Error location X_i is defined: X_i = α^(j_i) that is, the power of α (alpha) corresponding to the error location Error magnitude Y_i is defined: E_(j_i) that is, the coefficient in the error polynomial at position j_i Error locator polynomial: sigma(z) = Product( 1 - X_i * z, i=1..s ) roots are the reciprocals of the error locations ( 1/X_1, 1/X_2, ...) Error evaluator polynomial omega(z) is here computed at the same time as sigma, but it can also be constructed afterwards using the syndrome and sigma (see _find_error_evaluator() method). It can be seen that the algorithm tries to iteratively solve for the error locator polynomial by solving one equation after another and updating the error locator polynomial. If it turns out that it cannot solve the equation at some step, then it computes the error and weights it by the last non-zero discriminant found, and delays the weighted result to increase the polynomial degree by 1. Ref: "Reed Solomon Decoder: TMS320C64x Implementation" by Jagadeesh Sankaran, December 2000, Application Report SPRA686 The best paper I found describing the BM algorithm for errata (errors-and-erasures) evaluator computation is in "Algebraic Codes for Data Transmission", Richard E. Blahut, 2003.
[ "Computes", "and", "returns", "the", "errata", "(", "errors", "+", "erasures", ")", "locator", "polynomial", "(", "sigma", ")", "and", "the", "error", "evaluator", "polynomial", "(", "omega", ")", "at", "the", "same", "time", ".", "If", "the", "erasures", "locator", "is", "specified", "we", "will", "return", "an", "errors", "-", "and", "-", "erasures", "locator", "polynomial", "and", "an", "errors", "-", "and", "-", "erasures", "evaluator", "polynomial", "else", "it", "will", "compute", "only", "errors", ".", "With", "erasures", "in", "addition", "to", "errors", "it", "can", "simultaneously", "decode", "up", "to", "v", "+", "2e", "<", "=", "(", "n", "-", "k", ")", "where", "v", "is", "the", "number", "of", "erasures", "and", "e", "the", "number", "of", "errors", ".", "Mathematically", "speaking", "this", "is", "equivalent", "to", "a", "spectral", "analysis", "(", "see", "Blahut", "Algebraic", "Codes", "for", "Data", "Transmission", "2003", "chapter", "7", ".", "6", "Decoding", "in", "Time", "Domain", ")", ".", "The", "parameter", "s", "is", "the", "syndrome", "polynomial", "(", "syndromes", "encoded", "in", "a", "generator", "function", ")", "as", "returned", "by", "_syndromes", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/rs.py#L547-L673
train
Computes and returns the errata locator polynomial and error evaluator polynomial at the same time.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM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r8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\157' + chr(52) + chr(0b1111 + 0o47), 15814 - 15806), nzTpIcepk0o8('\060' + chr(0b111 + 0o150) + chr(349 - 297), ord("\x08")), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b11 + 0o154) + '\x33' + '\x36' + chr(1009 - 957), 0b1000), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(111) + '\063' + chr(0b1011 + 0o46) + chr(2141 - 2090), 20009 - 20001), nzTpIcepk0o8(chr(1465 - 1417) + '\x6f' + chr(879 - 830) + chr(0b110001) + chr(915 - 863), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(51) + chr(49) + '\x33', 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + chr(53) + chr(200 - 150), 0o10), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(5678 - 5567) + chr(0b110010) + '\060' + chr(0b100001 + 0o25), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b11100 + 0o123) + chr(158 - 106) + chr(0b100110 + 0o21), 0b1000), nzTpIcepk0o8(chr(1808 - 1760) + chr(0b1101111) + chr(1826 - 1775) + '\x31' + chr(51), 8), nzTpIcepk0o8('\060' + '\x6f' + chr(1908 - 1857) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b101110 + 0o3) + chr(51) + '\x32', 11033 - 11025), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + chr(50) + chr(0b11 + 0o55) + chr(54), 8), nzTpIcepk0o8(chr(1759 - 1711) + chr(0b1101111) + chr(49) + '\061', 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b1001 + 0o52) + chr(0b10111 + 0o37), ord("\x08")), nzTpIcepk0o8(chr(0b10111 + 0o31) + '\x6f' + chr(0b10011 + 0o40) + chr(0b110100) + chr(50), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + chr(0b110100) + chr(0b11111 + 0o25), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11100 + 0o27), ord("\x08")), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1001100 + 0o43) + chr(50) + chr(119 - 65) + chr(0b110000), 18449 - 18441), nzTpIcepk0o8(chr(985 - 937) + chr(111) + '\x31' + chr(0b11001 + 0o36) + '\x36', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(5717 - 5606) + chr(0b0 + 0o65) + chr(0b110010 + 0o0), 61258 - 61250), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(52) + chr(2584 - 2530), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + '\060' + chr(0b110000), 34669 - 34661), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2618 - 2566), 8), nzTpIcepk0o8(chr(699 - 651) + '\157' + chr(0b1111 + 0o43) + chr(0b110110) + '\066', 57489 - 57481), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1101111) + '\x33' + chr(0b10010 + 0o36) + chr(0b0 + 0o63), 32871 - 32863), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b1101111) + chr(0b110101) + chr(0b101101 + 0o5), 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(51) + chr(1222 - 1170) + chr(856 - 806), 8), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\157' + chr(1062 - 1012) + chr(49) + chr(52), 28105 - 28097), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1311 - 1260) + '\061' + chr(1277 - 1229), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b101000 + 0o12) + chr(0b11010 + 0o33) + '\063', 27487 - 27479), nzTpIcepk0o8(chr(610 - 562) + '\157' + '\061' + chr(49) + chr(0b110111), 59737 - 59729), nzTpIcepk0o8('\x30' + chr(111) + chr(1952 - 1903) + '\x34' + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(346 - 295) + chr(0b1110 + 0o50) + '\x30', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001 + 0o1) + '\x30' + chr(0b100101 + 0o16), 0o10), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(2394 - 2283) + chr(587 - 536) + chr(229 - 175) + '\067', ord("\x08")), nzTpIcepk0o8(chr(1843 - 1795) + '\x6f' + '\063' + chr(0b110111) + chr(0b110111), 19978 - 19970), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + '\063' + chr(1694 - 1639), 0b1000), nzTpIcepk0o8(chr(739 - 691) + '\x6f' + chr(49) + '\x35' + '\x35', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\064' + chr(1611 - 1561), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(111) + '\065' + '\x30', 54871 - 54863)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x08'), '\144' + '\x65' + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(101))(chr(0b1110101) + '\164' + '\146' + chr(0b101101) + chr(2136 - 2080)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def ivLGVqdnOhzV(hXMPsSrOQzbh, PmE5_h409JAA, B6UAF1zReOyJ=None, c88QIkjOjka1=None, KxkovzKK3PcV=None, oXiBv91nJT0c=nzTpIcepk0o8('\x30' + chr(111) + chr(1921 - 1873), 0b1000)): NoZxuO7wjArS = hXMPsSrOQzbh.NoZxuO7wjArS if not B6UAF1zReOyJ: B6UAF1zReOyJ = hXMPsSrOQzbh.B6UAF1zReOyJ if c88QIkjOjka1: uc4gGmjAvJP3 = [ujppqiXNPJu0(c88QIkjOjka1.coefficients)] TQ0u0KgwFXN5 = [ujppqiXNPJu0(c88QIkjOjka1.coefficients)] KuyiJVsdK9em = [ujppqiXNPJu0(KxkovzKK3PcV.coefficients)] MbjAvyP4Qyak = [ujppqiXNPJu0(KxkovzKK3PcV.coefficients)] else: uc4gGmjAvJP3 = [ujppqiXNPJu0([ZiH1BRUzc8JN(nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(111) + chr(0b11001 + 0o30), ord("\x08")))])] TQ0u0KgwFXN5 = [ujppqiXNPJu0([ZiH1BRUzc8JN(nzTpIcepk0o8(chr(1109 - 1061) + chr(4513 - 4402) + chr(200 - 151), 8))])] KuyiJVsdK9em = [ujppqiXNPJu0([ZiH1BRUzc8JN(nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31', 8))])] MbjAvyP4Qyak = [ujppqiXNPJu0([ZiH1BRUzc8JN(nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2104 - 2056), 8))])] QkRI2ibxeUAu = [nzTpIcepk0o8('\060' + '\x6f' + '\x30', 8)] lY8v4DfEhTNv = [nzTpIcepk0o8(chr(0b101000 + 0o10) + '\157' + '\x30', 8)] TAV7nzqrSsKx = nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110000), 8) if ftfygxgFas5X(PmE5_h409JAA) > NoZxuO7wjArS - B6UAF1zReOyJ: TAV7nzqrSsKx = ftfygxgFas5X(PmE5_h409JAA) - (NoZxuO7wjArS - B6UAF1zReOyJ) RSRXPprHa9uI = ujppqiXNPJu0(z0=ZiH1BRUzc8JN(nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1010 + 0o47), 8))) d402n7UwMyPB = ujppqiXNPJu0(z0=ZiH1BRUzc8JN(nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1101111) + '\x30', 8))) sEVgLUlRGUb0 = ujppqiXNPJu0(z1=ZiH1BRUzc8JN(nzTpIcepk0o8(chr(0b10010 + 0o36) + '\157' + chr(1801 - 1752), 8))) RWtImVdanJMG = RSRXPprHa9uI + PmE5_h409JAA for fPrVrKACaFCC in tpoEqV5cEG2w(nzTpIcepk0o8(chr(0b0 + 0o60) + chr(111) + chr(0b110000), 8), NoZxuO7wjArS - B6UAF1zReOyJ - oXiBv91nJT0c): tmj9o95fctlO = oXiBv91nJT0c + fPrVrKACaFCC + TAV7nzqrSsKx TR2zv0JOQLzi = (RWtImVdanJMG * uc4gGmjAvJP3[fPrVrKACaFCC]).get_coefficient(tmj9o95fctlO) TR2zv0JOQLzi = ujppqiXNPJu0(x0=TR2zv0JOQLzi) roI3spqORKae(uc4gGmjAvJP3, roI3spqORKae(ES5oEprVxulp(b'nP\xa7\xff4\xac-\xe9M\xa4Ho'), chr(0b111011 + 0o51) + chr(9799 - 9698) + '\143' + chr(11092 - 10981) + chr(0b1100100) + chr(5691 - 5590))(chr(0b1110101) + chr(116) + chr(1609 - 1507) + '\x2d' + chr(0b111000)))(uc4gGmjAvJP3[fPrVrKACaFCC] - TR2zv0JOQLzi * sEVgLUlRGUb0 * TQ0u0KgwFXN5[fPrVrKACaFCC]) roI3spqORKae(KuyiJVsdK9em, roI3spqORKae(ES5oEprVxulp(b'nP\xa7\xff4\xac-\xe9M\xa4Ho'), '\x64' + chr(101) + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(2492 - 2391))(chr(3360 - 3243) + chr(0b1110100) + '\x66' + chr(45) + chr(329 - 273)))(KuyiJVsdK9em[fPrVrKACaFCC] - TR2zv0JOQLzi * sEVgLUlRGUb0 * MbjAvyP4Qyak[fPrVrKACaFCC]) if TR2zv0JOQLzi == d402n7UwMyPB or nzTpIcepk0o8(chr(48) + chr(0b1000 + 0o147) + chr(50), 0b1000) * QkRI2ibxeUAu[fPrVrKACaFCC] > tmj9o95fctlO + oXiBv91nJT0c or (nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010), 8) * QkRI2ibxeUAu[fPrVrKACaFCC] == tmj9o95fctlO + oXiBv91nJT0c and lY8v4DfEhTNv[fPrVrKACaFCC] == nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(48), 8)): roI3spqORKae(TQ0u0KgwFXN5, roI3spqORKae(ES5oEprVxulp(b'nP\xa7\xff4\xac-\xe9M\xa4Ho'), '\x64' + chr(101) + '\x63' + chr(0b1101111) + chr(3883 - 3783) + chr(2834 - 2733))(chr(0b11101 + 0o130) + '\164' + chr(102) + chr(0b10 + 0o53) + chr(56)))(sEVgLUlRGUb0 * TQ0u0KgwFXN5[fPrVrKACaFCC]) roI3spqORKae(MbjAvyP4Qyak, roI3spqORKae(ES5oEprVxulp(b'nP\xa7\xff4\xac-\xe9M\xa4Ho'), chr(100) + chr(0b1100101) + chr(2507 - 2408) + chr(0b100001 + 0o116) + chr(0b111101 + 0o47) + chr(101))(chr(117) + chr(6791 - 6675) + chr(8236 - 8134) + '\x2d' + chr(0b111000)))(sEVgLUlRGUb0 * MbjAvyP4Qyak[fPrVrKACaFCC]) roI3spqORKae(QkRI2ibxeUAu, roI3spqORKae(ES5oEprVxulp(b'nP\xa7\xff4\xac-\xe9M\xa4Ho'), '\x64' + '\x65' + '\x63' + chr(111) + chr(100) + '\x65')(chr(6702 - 6585) + chr(0b1000000 + 0o64) + '\x66' + chr(0b101101) + '\070'))(QkRI2ibxeUAu[fPrVrKACaFCC]) roI3spqORKae(lY8v4DfEhTNv, roI3spqORKae(ES5oEprVxulp(b'nP\xa7\xff4\xac-\xe9M\xa4Ho'), chr(0b1100100) + chr(101) + '\143' + chr(0b1010001 + 0o36) + '\144' + chr(1208 - 1107))(chr(117) + '\164' + chr(102) + '\055' + chr(0b100010 + 0o26)))(lY8v4DfEhTNv[fPrVrKACaFCC]) elif TR2zv0JOQLzi != d402n7UwMyPB and nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(111) + chr(0b110010), 8) * QkRI2ibxeUAu[fPrVrKACaFCC] < tmj9o95fctlO + oXiBv91nJT0c or (nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(297 - 247), 8) * QkRI2ibxeUAu[fPrVrKACaFCC] == tmj9o95fctlO + oXiBv91nJT0c and lY8v4DfEhTNv[fPrVrKACaFCC] != nzTpIcepk0o8(chr(48) + chr(8459 - 8348) + chr(1740 - 1692), 8)): roI3spqORKae(TQ0u0KgwFXN5, roI3spqORKae(ES5oEprVxulp(b'nP\xa7\xff4\xac-\xe9M\xa4Ho'), '\x64' + chr(0b1 + 0o144) + '\x63' + '\x6f' + '\144' + chr(0b1011100 + 0o11))(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(0b101 + 0o50) + chr(0b111000)))(uc4gGmjAvJP3[fPrVrKACaFCC] // TR2zv0JOQLzi) roI3spqORKae(MbjAvyP4Qyak, roI3spqORKae(ES5oEprVxulp(b'nP\xa7\xff4\xac-\xe9M\xa4Ho'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(0b1101111) + chr(501 - 401) + chr(101))('\165' + '\164' + chr(102) + chr(0b101101) + '\x38'))(KuyiJVsdK9em[fPrVrKACaFCC] // TR2zv0JOQLzi) roI3spqORKae(QkRI2ibxeUAu, roI3spqORKae(ES5oEprVxulp(b'nP\xa7\xff4\xac-\xe9M\xa4Ho'), '\x64' + '\x65' + chr(0b1100011) + chr(111) + '\x64' + chr(0b1100001 + 0o4))('\165' + chr(116) + chr(0b1100100 + 0o2) + '\055' + chr(56)))(tmj9o95fctlO - QkRI2ibxeUAu[fPrVrKACaFCC]) roI3spqORKae(lY8v4DfEhTNv, roI3spqORKae(ES5oEprVxulp(b'nP\xa7\xff4\xac-\xe9M\xa4Ho'), chr(0b1100100) + chr(0b1100101) + '\143' + '\x6f' + chr(0b1000100 + 0o40) + chr(0b1100101))(chr(117) + chr(0b100010 + 0o122) + chr(102) + '\055' + chr(0b110000 + 0o10)))(nzTpIcepk0o8(chr(2128 - 2080) + chr(111) + '\x31', 8) - lY8v4DfEhTNv[fPrVrKACaFCC]) else: raise zfo2Sgkz3IVJ(roI3spqORKae(ES5oEprVxulp(b'ek\x90\xael\xb8\x02\xe9R\xa7y4\xa1}>\x8a\x85u\xd5^M\t\xf4p\xd3\xad\n\x8a\xe9\xba\xce'), chr(0b1000011 + 0o41) + '\x65' + chr(99) + chr(0b1011100 + 0o23) + chr(0b1100100) + '\x65')(chr(5547 - 5430) + chr(0b1001 + 0o153) + chr(0b101100 + 0o72) + chr(0b1011 + 0o42) + '\070')) if roI3spqORKae(KuyiJVsdK9em[-nzTpIcepk0o8(chr(0b110000) + chr(0b1010100 + 0o33) + '\x31', 8)], roI3spqORKae(ES5oEprVxulp(b'Ba\x93\xb9)\xae'), chr(100) + chr(8822 - 8721) + chr(0b100001 + 0o102) + chr(0b1101111) + chr(7307 - 7207) + '\145')(chr(0b101000 + 0o115) + chr(0b11111 + 0o125) + chr(102) + chr(0b101 + 0o50) + '\070')) > roI3spqORKae(uc4gGmjAvJP3[-nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061', 8)], roI3spqORKae(ES5oEprVxulp(b'Ba\x93\xb9)\xae'), chr(100) + '\145' + '\143' + '\x6f' + chr(5788 - 5688) + chr(0b1100101))('\x75' + chr(0b1110100) + chr(102) + '\055' + chr(2002 - 1946))): KuyiJVsdK9em[-nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49), 8)] = ujppqiXNPJu0(KuyiJVsdK9em[-nzTpIcepk0o8(chr(2090 - 2042) + '\x6f' + '\061', 8)].coefficients[-(uc4gGmjAvJP3[-nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b111010 + 0o65) + '\061', 8)].degree + nzTpIcepk0o8(chr(174 - 126) + chr(0b111001 + 0o66) + chr(1137 - 1088), 8)):]) return (uc4gGmjAvJP3[-nzTpIcepk0o8(chr(48) + '\x6f' + '\061', 8)], KuyiJVsdK9em[-nzTpIcepk0o8(chr(0b1011 + 0o45) + '\157' + '\x31', 8)])
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/rs.py
RSCoder._berlekamp_massey_fast
def _berlekamp_massey_fast(self, s, k=None, erasures_loc=None, erasures_eval=None, erasures_count=0): '''Faster implementation of errata (errors-and-erasures) Berlekamp-Massey. Returns the error locator polynomial (sigma) and the error evaluator polynomial (omega) with a faster implementation. ''' n = self.n if not k: k = self.k # Initialize, depending on if we include erasures or not: if erasures_loc: sigma = Polynomial(erasures_loc.coefficients) # copy erasures_loc by creating a new Polynomial, so that we initialize the errata locator polynomial with the erasures locator polynomial. sigmaprev = Polynomial(sigma.coefficients) B = Polynomial(sigma.coefficients) omega = Polynomial(erasures_eval.coefficients) # to compute omega (the evaluator polynomial) at the same time, we also need to initialize it with the partial erasures evaluator polynomial omegaprev = Polynomial(omega.coefficients) A = Polynomial(omega.coefficients) # TODO: fix the initial value of the evaluator support polynomial, because currently the final omega is not correct (it contains higher order terms that should be removed by the end of BM) else: sigma = sigmaprev = Polynomial([GF2int(1)]) # error locator polynomial. Also called Lambda in other notations. sigmaprev = Polynomial([GF2int(1)]) # we need the previous iteration to compute the next value of the support polynomials B = Polynomial([GF2int(1)]) # this is the error locator support/secondary polynomial, which is a funky way to say that it's just a temporary variable that will help us construct sigma, the error locator polynomial omega = omegaprev = Polynomial([GF2int(1)]) # error evaluator polynomial. We don't need to initialize it with erasures_loc, it will still work, because Delta is computed using sigma, which itself is correctly initialized with erasures if needed. omegaprev = Polynomial([GF2int(1)]) A = Polynomial([GF2int(0)]) # this is the error evaluator support/secondary polynomial, to help us construct omega L = 0 # update flag: necessary variable to check when updating is necessary and to check bounds (to avoid wrongly eliminating the higher order terms). For more infos, see https://www.cs.duke.edu/courses/spring11/cps296.3/decoding_rs.pdf #M = 0 # optional variable to check bounds (so that we do not mistakenly overwrite the higher order terms). This is not necessary, it's only an additional safe check. For more infos, see the presentation decoding_rs.pdf by Andrew Brown in the doc folder. # Fix the syndrome shifting: when computing the syndrome, some implementations may prepend a 0 coefficient for the lowest degree term (the constant). This is a case of syndrome shifting, thus the syndrome will be bigger than the number of ecc symbols (I don't know what purpose serves this shifting). If that's the case, then we need to account for the syndrome shifting when we use the syndrome such as inside BM, by skipping those prepended coefficients. # Another way to detect the shifting is to detect the 0 coefficients: by definition, a syndrome does not contain any 0 coefficient (except if there are no errors/erasures, in this case they are all 0). This however doesn't work with the modified Forney syndrome (that we do not use in this lib but it may be implemented in the future), which set to 0 the coefficients corresponding to erasures, leaving only the coefficients corresponding to errors. synd_shift = 0 if len(s) > (n-k): synd_shift = len(s) - (n-k) # Polynomial constants: ONE = Polynomial([GF2int(1)]) ZERO = GF2int(0) Z = Polynomial([GF2int(1), GF2int(0)]) # used to shift polynomials, simply multiply your poly * Z to shift # Precaching s2 = ONE+s # Iteratively compute the polynomials n-k-erasures_count times. The last ones will be correct (since the algorithm refines the error/errata locator polynomial iteratively depending on the discrepancy, which is kind of a difference-from-correctness measure). for l in _range(n-k-erasures_count): # skip the first erasures_count iterations because we already computed the partial errata locator polynomial (by initializing with the erasures locator polynomial) K = erasures_count+l+synd_shift # skip the FIRST erasures_count iterations (not the last iterations, that's very important!) # Goal for each iteration: Compute sigma[l+1] and omega[l+1] such that # (1 + s)*sigma[l] == omega[l] in mod z^(K) # For this particular loop iteration, we have sigma[l] and omega[l], # and are computing sigma[l+1] and omega[l+1] # First find Delta, the non-zero coefficient of z^(K) in # (1 + s) * sigma[l] # Note that adding 1 to the syndrome s is not really necessary, you can do as well without. # This delta is valid for l (this iteration) only Delta = s2.mul_at(sigma, K) # Delta is also known as the Discrepancy, and is always a scalar (not a polynomial). We just need one coefficient at a specific degree, so we can optimize by computing only the polynomial multiplication at this term, and skip the others. # Can now compute sigma[l+1] and omega[l+1] from # sigma[l], omega[l], B[l], A[l], and Delta sigmaprev = sigma omegaprev = omega sigma = sigma - (Z * B).scale(Delta) omega = omega - (Z * A).scale(Delta) # Now compute the next support polynomials B and A # There are two ways to do this # This is based on a messy case analysis on the degrees of the four polynomials sigma, omega, A and B in order to minimize the degrees of A and B. For more infos, see https://www.cs.duke.edu/courses/spring10/cps296.3/decoding_rs_scribe.pdf # In fact it ensures that the degree of the final polynomials aren't too large. if Delta == ZERO or 2*L > K+erasures_count: #or (2*L == K+erasures_count and M == 0): #if Delta == ZERO or len(sigma) <= len(sigmaprev): # another way to compute when to update, and it doesn't require to maintain the update flag L # Rule A B = Z * B A = Z * A #L = L #M = M else: #elif (Delta != ZERO and 2*L < K+erasures_count) \ # or (2*L == K+erasures_count and M != 0): # elif Delta != ZERO and len(sigma) > len(sigmaprev): # another way to compute when to update, and it doesn't require to maintain the update flag L # Rule B B = sigmaprev.scale(Delta.inverse()) A = omegaprev.scale(Delta.inverse()) L = K - L # the update flag L is tricky: in Blahut's schema, it's mandatory to use `L = K - L - erasures_count` (and indeed in a previous draft of this function, if you forgot to do `- erasures_count` it would lead to correcting only 2*(errors+erasures) <= (n-k) instead of 2*errors+erasures <= (n-k)), but in this latest draft, this will lead to a wrong decoding in some cases where it should correctly decode! Thus you should try with and without `- erasures_count` to update L on your own implementation and see which one works OK without producing wrong decoding failures. #M = 1 - M #else: # raise Exception("Code shouldn't have gotten here") # Hack to fix the simultaneous computation of omega, the errata evaluator polynomial: because A (the errata evaluator support polynomial) is not correctly initialized (I could not find any info in academic papers). So at the end, we get the correct errata evaluator polynomial omega + some higher order terms that should not be present, but since we know that sigma is always correct and the maximum degree should be the same as omega, we can fix omega by truncating too high order terms. if omega.degree > sigma.degree: omega = Polynomial(omega.coefficients[-(sigma.degree+1):]) # Return the last result of the iterations (since BM compute iteratively, the last iteration being correct - it may already be before, but we're not sure) return sigma, omega
python
def _berlekamp_massey_fast(self, s, k=None, erasures_loc=None, erasures_eval=None, erasures_count=0): '''Faster implementation of errata (errors-and-erasures) Berlekamp-Massey. Returns the error locator polynomial (sigma) and the error evaluator polynomial (omega) with a faster implementation. ''' n = self.n if not k: k = self.k # Initialize, depending on if we include erasures or not: if erasures_loc: sigma = Polynomial(erasures_loc.coefficients) # copy erasures_loc by creating a new Polynomial, so that we initialize the errata locator polynomial with the erasures locator polynomial. sigmaprev = Polynomial(sigma.coefficients) B = Polynomial(sigma.coefficients) omega = Polynomial(erasures_eval.coefficients) # to compute omega (the evaluator polynomial) at the same time, we also need to initialize it with the partial erasures evaluator polynomial omegaprev = Polynomial(omega.coefficients) A = Polynomial(omega.coefficients) # TODO: fix the initial value of the evaluator support polynomial, because currently the final omega is not correct (it contains higher order terms that should be removed by the end of BM) else: sigma = sigmaprev = Polynomial([GF2int(1)]) # error locator polynomial. Also called Lambda in other notations. sigmaprev = Polynomial([GF2int(1)]) # we need the previous iteration to compute the next value of the support polynomials B = Polynomial([GF2int(1)]) # this is the error locator support/secondary polynomial, which is a funky way to say that it's just a temporary variable that will help us construct sigma, the error locator polynomial omega = omegaprev = Polynomial([GF2int(1)]) # error evaluator polynomial. We don't need to initialize it with erasures_loc, it will still work, because Delta is computed using sigma, which itself is correctly initialized with erasures if needed. omegaprev = Polynomial([GF2int(1)]) A = Polynomial([GF2int(0)]) # this is the error evaluator support/secondary polynomial, to help us construct omega L = 0 # update flag: necessary variable to check when updating is necessary and to check bounds (to avoid wrongly eliminating the higher order terms). For more infos, see https://www.cs.duke.edu/courses/spring11/cps296.3/decoding_rs.pdf #M = 0 # optional variable to check bounds (so that we do not mistakenly overwrite the higher order terms). This is not necessary, it's only an additional safe check. For more infos, see the presentation decoding_rs.pdf by Andrew Brown in the doc folder. # Fix the syndrome shifting: when computing the syndrome, some implementations may prepend a 0 coefficient for the lowest degree term (the constant). This is a case of syndrome shifting, thus the syndrome will be bigger than the number of ecc symbols (I don't know what purpose serves this shifting). If that's the case, then we need to account for the syndrome shifting when we use the syndrome such as inside BM, by skipping those prepended coefficients. # Another way to detect the shifting is to detect the 0 coefficients: by definition, a syndrome does not contain any 0 coefficient (except if there are no errors/erasures, in this case they are all 0). This however doesn't work with the modified Forney syndrome (that we do not use in this lib but it may be implemented in the future), which set to 0 the coefficients corresponding to erasures, leaving only the coefficients corresponding to errors. synd_shift = 0 if len(s) > (n-k): synd_shift = len(s) - (n-k) # Polynomial constants: ONE = Polynomial([GF2int(1)]) ZERO = GF2int(0) Z = Polynomial([GF2int(1), GF2int(0)]) # used to shift polynomials, simply multiply your poly * Z to shift # Precaching s2 = ONE+s # Iteratively compute the polynomials n-k-erasures_count times. The last ones will be correct (since the algorithm refines the error/errata locator polynomial iteratively depending on the discrepancy, which is kind of a difference-from-correctness measure). for l in _range(n-k-erasures_count): # skip the first erasures_count iterations because we already computed the partial errata locator polynomial (by initializing with the erasures locator polynomial) K = erasures_count+l+synd_shift # skip the FIRST erasures_count iterations (not the last iterations, that's very important!) # Goal for each iteration: Compute sigma[l+1] and omega[l+1] such that # (1 + s)*sigma[l] == omega[l] in mod z^(K) # For this particular loop iteration, we have sigma[l] and omega[l], # and are computing sigma[l+1] and omega[l+1] # First find Delta, the non-zero coefficient of z^(K) in # (1 + s) * sigma[l] # Note that adding 1 to the syndrome s is not really necessary, you can do as well without. # This delta is valid for l (this iteration) only Delta = s2.mul_at(sigma, K) # Delta is also known as the Discrepancy, and is always a scalar (not a polynomial). We just need one coefficient at a specific degree, so we can optimize by computing only the polynomial multiplication at this term, and skip the others. # Can now compute sigma[l+1] and omega[l+1] from # sigma[l], omega[l], B[l], A[l], and Delta sigmaprev = sigma omegaprev = omega sigma = sigma - (Z * B).scale(Delta) omega = omega - (Z * A).scale(Delta) # Now compute the next support polynomials B and A # There are two ways to do this # This is based on a messy case analysis on the degrees of the four polynomials sigma, omega, A and B in order to minimize the degrees of A and B. For more infos, see https://www.cs.duke.edu/courses/spring10/cps296.3/decoding_rs_scribe.pdf # In fact it ensures that the degree of the final polynomials aren't too large. if Delta == ZERO or 2*L > K+erasures_count: #or (2*L == K+erasures_count and M == 0): #if Delta == ZERO or len(sigma) <= len(sigmaprev): # another way to compute when to update, and it doesn't require to maintain the update flag L # Rule A B = Z * B A = Z * A #L = L #M = M else: #elif (Delta != ZERO and 2*L < K+erasures_count) \ # or (2*L == K+erasures_count and M != 0): # elif Delta != ZERO and len(sigma) > len(sigmaprev): # another way to compute when to update, and it doesn't require to maintain the update flag L # Rule B B = sigmaprev.scale(Delta.inverse()) A = omegaprev.scale(Delta.inverse()) L = K - L # the update flag L is tricky: in Blahut's schema, it's mandatory to use `L = K - L - erasures_count` (and indeed in a previous draft of this function, if you forgot to do `- erasures_count` it would lead to correcting only 2*(errors+erasures) <= (n-k) instead of 2*errors+erasures <= (n-k)), but in this latest draft, this will lead to a wrong decoding in some cases where it should correctly decode! Thus you should try with and without `- erasures_count` to update L on your own implementation and see which one works OK without producing wrong decoding failures. #M = 1 - M #else: # raise Exception("Code shouldn't have gotten here") # Hack to fix the simultaneous computation of omega, the errata evaluator polynomial: because A (the errata evaluator support polynomial) is not correctly initialized (I could not find any info in academic papers). So at the end, we get the correct errata evaluator polynomial omega + some higher order terms that should not be present, but since we know that sigma is always correct and the maximum degree should be the same as omega, we can fix omega by truncating too high order terms. if omega.degree > sigma.degree: omega = Polynomial(omega.coefficients[-(sigma.degree+1):]) # Return the last result of the iterations (since BM compute iteratively, the last iteration being correct - it may already be before, but we're not sure) return sigma, omega
[ "def", "_berlekamp_massey_fast", "(", "self", ",", "s", ",", "k", "=", "None", ",", "erasures_loc", "=", "None", ",", "erasures_eval", "=", "None", ",", "erasures_count", "=", "0", ")", ":", "n", "=", "self", ".", "n", "if", "not", "k", ":", "k", "=", "self", ".", "k", "# Initialize, depending on if we include erasures or not:", "if", "erasures_loc", ":", "sigma", "=", "Polynomial", "(", "erasures_loc", ".", "coefficients", ")", "# copy erasures_loc by creating a new Polynomial, so that we initialize the errata locator polynomial with the erasures locator polynomial.", "sigmaprev", "=", "Polynomial", "(", "sigma", ".", "coefficients", ")", "B", "=", "Polynomial", "(", "sigma", ".", "coefficients", ")", "omega", "=", "Polynomial", "(", "erasures_eval", ".", "coefficients", ")", "# to compute omega (the evaluator polynomial) at the same time, we also need to initialize it with the partial erasures evaluator polynomial", "omegaprev", "=", "Polynomial", "(", "omega", ".", "coefficients", ")", "A", "=", "Polynomial", "(", "omega", ".", "coefficients", ")", "# TODO: fix the initial value of the evaluator support polynomial, because currently the final omega is not correct (it contains higher order terms that should be removed by the end of BM)", "else", ":", "sigma", "=", "sigmaprev", "=", "Polynomial", "(", "[", "GF2int", "(", "1", ")", "]", ")", "# error locator polynomial. Also called Lambda in other notations.", "sigmaprev", "=", "Polynomial", "(", "[", "GF2int", "(", "1", ")", "]", ")", "# we need the previous iteration to compute the next value of the support polynomials", "B", "=", "Polynomial", "(", "[", "GF2int", "(", "1", ")", "]", ")", "# this is the error locator support/secondary polynomial, which is a funky way to say that it's just a temporary variable that will help us construct sigma, the error locator polynomial", "omega", "=", "omegaprev", "=", "Polynomial", "(", "[", "GF2int", "(", "1", ")", "]", ")", "# error evaluator polynomial. We don't need to initialize it with erasures_loc, it will still work, because Delta is computed using sigma, which itself is correctly initialized with erasures if needed.", "omegaprev", "=", "Polynomial", "(", "[", "GF2int", "(", "1", ")", "]", ")", "A", "=", "Polynomial", "(", "[", "GF2int", "(", "0", ")", "]", ")", "# this is the error evaluator support/secondary polynomial, to help us construct omega", "L", "=", "0", "# update flag: necessary variable to check when updating is necessary and to check bounds (to avoid wrongly eliminating the higher order terms). For more infos, see https://www.cs.duke.edu/courses/spring11/cps296.3/decoding_rs.pdf", "#M = 0 # optional variable to check bounds (so that we do not mistakenly overwrite the higher order terms). This is not necessary, it's only an additional safe check. For more infos, see the presentation decoding_rs.pdf by Andrew Brown in the doc folder.", "# Fix the syndrome shifting: when computing the syndrome, some implementations may prepend a 0 coefficient for the lowest degree term (the constant). This is a case of syndrome shifting, thus the syndrome will be bigger than the number of ecc symbols (I don't know what purpose serves this shifting). If that's the case, then we need to account for the syndrome shifting when we use the syndrome such as inside BM, by skipping those prepended coefficients.", "# Another way to detect the shifting is to detect the 0 coefficients: by definition, a syndrome does not contain any 0 coefficient (except if there are no errors/erasures, in this case they are all 0). This however doesn't work with the modified Forney syndrome (that we do not use in this lib but it may be implemented in the future), which set to 0 the coefficients corresponding to erasures, leaving only the coefficients corresponding to errors.", "synd_shift", "=", "0", "if", "len", "(", "s", ")", ">", "(", "n", "-", "k", ")", ":", "synd_shift", "=", "len", "(", "s", ")", "-", "(", "n", "-", "k", ")", "# Polynomial constants:", "ONE", "=", "Polynomial", "(", "[", "GF2int", "(", "1", ")", "]", ")", "ZERO", "=", "GF2int", "(", "0", ")", "Z", "=", "Polynomial", "(", "[", "GF2int", "(", "1", ")", ",", "GF2int", "(", "0", ")", "]", ")", "# used to shift polynomials, simply multiply your poly * Z to shift", "# Precaching", "s2", "=", "ONE", "+", "s", "# Iteratively compute the polynomials n-k-erasures_count times. The last ones will be correct (since the algorithm refines the error/errata locator polynomial iteratively depending on the discrepancy, which is kind of a difference-from-correctness measure).", "for", "l", "in", "_range", "(", "n", "-", "k", "-", "erasures_count", ")", ":", "# skip the first erasures_count iterations because we already computed the partial errata locator polynomial (by initializing with the erasures locator polynomial)", "K", "=", "erasures_count", "+", "l", "+", "synd_shift", "# skip the FIRST erasures_count iterations (not the last iterations, that's very important!)", "# Goal for each iteration: Compute sigma[l+1] and omega[l+1] such that", "# (1 + s)*sigma[l] == omega[l] in mod z^(K)", "# For this particular loop iteration, we have sigma[l] and omega[l],", "# and are computing sigma[l+1] and omega[l+1]", "# First find Delta, the non-zero coefficient of z^(K) in", "# (1 + s) * sigma[l]", "# Note that adding 1 to the syndrome s is not really necessary, you can do as well without.", "# This delta is valid for l (this iteration) only", "Delta", "=", "s2", ".", "mul_at", "(", "sigma", ",", "K", ")", "# Delta is also known as the Discrepancy, and is always a scalar (not a polynomial). We just need one coefficient at a specific degree, so we can optimize by computing only the polynomial multiplication at this term, and skip the others.", "# Can now compute sigma[l+1] and omega[l+1] from", "# sigma[l], omega[l], B[l], A[l], and Delta", "sigmaprev", "=", "sigma", "omegaprev", "=", "omega", "sigma", "=", "sigma", "-", "(", "Z", "*", "B", ")", ".", "scale", "(", "Delta", ")", "omega", "=", "omega", "-", "(", "Z", "*", "A", ")", ".", "scale", "(", "Delta", ")", "# Now compute the next support polynomials B and A", "# There are two ways to do this", "# This is based on a messy case analysis on the degrees of the four polynomials sigma, omega, A and B in order to minimize the degrees of A and B. For more infos, see https://www.cs.duke.edu/courses/spring10/cps296.3/decoding_rs_scribe.pdf", "# In fact it ensures that the degree of the final polynomials aren't too large.", "if", "Delta", "==", "ZERO", "or", "2", "*", "L", ">", "K", "+", "erasures_count", ":", "#or (2*L == K+erasures_count and M == 0):", "#if Delta == ZERO or len(sigma) <= len(sigmaprev): # another way to compute when to update, and it doesn't require to maintain the update flag L", "# Rule A", "B", "=", "Z", "*", "B", "A", "=", "Z", "*", "A", "#L = L", "#M = M", "else", ":", "#elif (Delta != ZERO and 2*L < K+erasures_count) \\", "# or (2*L == K+erasures_count and M != 0):", "# elif Delta != ZERO and len(sigma) > len(sigmaprev): # another way to compute when to update, and it doesn't require to maintain the update flag L", "# Rule B", "B", "=", "sigmaprev", ".", "scale", "(", "Delta", ".", "inverse", "(", ")", ")", "A", "=", "omegaprev", ".", "scale", "(", "Delta", ".", "inverse", "(", ")", ")", "L", "=", "K", "-", "L", "# the update flag L is tricky: in Blahut's schema, it's mandatory to use `L = K - L - erasures_count` (and indeed in a previous draft of this function, if you forgot to do `- erasures_count` it would lead to correcting only 2*(errors+erasures) <= (n-k) instead of 2*errors+erasures <= (n-k)), but in this latest draft, this will lead to a wrong decoding in some cases where it should correctly decode! Thus you should try with and without `- erasures_count` to update L on your own implementation and see which one works OK without producing wrong decoding failures.", "#M = 1 - M", "#else:", "# raise Exception(\"Code shouldn't have gotten here\")", "# Hack to fix the simultaneous computation of omega, the errata evaluator polynomial: because A (the errata evaluator support polynomial) is not correctly initialized (I could not find any info in academic papers). So at the end, we get the correct errata evaluator polynomial omega + some higher order terms that should not be present, but since we know that sigma is always correct and the maximum degree should be the same as omega, we can fix omega by truncating too high order terms.", "if", "omega", ".", "degree", ">", "sigma", ".", "degree", ":", "omega", "=", "Polynomial", "(", "omega", ".", "coefficients", "[", "-", "(", "sigma", ".", "degree", "+", "1", ")", ":", "]", ")", "# Return the last result of the iterations (since BM compute iteratively, the last iteration being correct - it may already be before, but we're not sure)", "return", "sigma", ",", "omega" ]
Faster implementation of errata (errors-and-erasures) Berlekamp-Massey. Returns the error locator polynomial (sigma) and the error evaluator polynomial (omega) with a faster implementation.
[ "Faster", "implementation", "of", "errata", "(", "errors", "-", "and", "-", "erasures", ")", "Berlekamp", "-", "Massey", ".", "Returns", "the", "error", "locator", "polynomial", "(", "sigma", ")", "and", "the", "error", "evaluator", "polynomial", "(", "omega", ")", "with", "a", "faster", "implementation", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/rs.py#L675-L767
train
Faster implementation of errata ( errors - and - erasures ) Berlekamp - Massey.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aH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5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b100011 + 0o15) + '\x6f' + chr(0b110101) + '\x36', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + chr(0b110100) + chr(2248 - 2196), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b101 + 0o56) + '\x31' + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + chr(134 - 81) + chr(50), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x36' + '\x32', 0o10), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\157' + '\066' + chr(2083 - 2031), ord("\x08")), nzTpIcepk0o8(chr(1575 - 1527) + chr(10028 - 9917) + chr(0b110011) + chr(550 - 496), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\062' + chr(0b101000 + 0o10) + chr(339 - 288), 0o10), nzTpIcepk0o8(chr(664 - 616) + chr(2594 - 2483) + '\x36' + chr(0b100000 + 0o23), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b101011 + 0o6) + chr(0b110011) + '\x34', 8326 - 8318), nzTpIcepk0o8('\060' + '\157' + chr(0b110010), 62486 - 62478), nzTpIcepk0o8('\x30' + chr(4650 - 4539) + chr(1334 - 1284) + '\x34' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(317 - 269) + '\157' + chr(0b11110 + 0o23) + chr(52) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b110000 + 0o0) + '\x6f' + '\x32' + '\060' + chr(1507 - 1452), 0b1000), nzTpIcepk0o8(chr(0b1101 + 0o43) + '\157' + chr(0b101110 + 0o4) + chr(2062 - 2011) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(7765 - 7654) + chr(1612 - 1563) + '\x36' + chr(230 - 182), 0b1000), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(12121 - 12010) + chr(2304 - 2255) + '\x31' + chr(53), 62267 - 62259), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + '\x34' + chr(0b110000), 0o10), nzTpIcepk0o8('\060' + chr(2062 - 1951) + chr(50) + chr(0b110000) + chr(0b110101), 46528 - 46520), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b110010 + 0o75) + chr(0b110001) + chr(2732 - 2678) + '\x31', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b1000 + 0o51) + chr(48) + '\x30', 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x32' + '\x32' + chr(1085 - 1030), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1011000 + 0o27) + chr(0b110010) + chr(0b10011 + 0o35) + chr(2439 - 2388), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(111) + chr(2026 - 1976) + '\066' + chr(52), 33965 - 33957), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + '\066' + chr(49), 62311 - 62303), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10111 + 0o34) + chr(48) + chr(406 - 356), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(10822 - 10711) + chr(1849 - 1800) + '\x34' + chr(0b110 + 0o60), 0o10), nzTpIcepk0o8(chr(48) + chr(2571 - 2460) + chr(50) + chr(0b11011 + 0o33), 0o10), nzTpIcepk0o8('\060' + chr(0b1101011 + 0o4) + chr(1014 - 964) + chr(0b10100 + 0o35) + '\066', 17596 - 17588), nzTpIcepk0o8(chr(0b110000) + chr(6700 - 6589) + '\x33' + chr(0b11100 + 0o33) + chr(50), 0b1000), nzTpIcepk0o8('\060' + chr(11864 - 11753) + chr(0b101010 + 0o10) + '\060' + '\x31', 19403 - 19395), nzTpIcepk0o8(chr(1939 - 1891) + chr(0b1101110 + 0o1) + chr(49) + chr(1549 - 1501) + chr(734 - 682), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(1212 - 1163) + chr(0b110111), 2433 - 2425), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(606 - 555) + chr(1710 - 1661), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(52) + '\x33', 0o10), nzTpIcepk0o8('\060' + '\157' + '\063' + chr(0b10100 + 0o42), 8), nzTpIcepk0o8(chr(48) + chr(0b1010011 + 0o34) + '\x32' + chr(52), 0b1000), nzTpIcepk0o8('\x30' + chr(11985 - 11874) + chr(0b101101 + 0o6) + chr(49) + '\066', 0o10), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + chr(0b101010 + 0o7) + '\065', 4658 - 4650)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(8893 - 8782) + chr(2702 - 2649) + '\x30', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x00'), '\x64' + '\145' + '\x63' + chr(111) + chr(9657 - 9557) + chr(101))(chr(0b1110101) + chr(116) + chr(941 - 839) + chr(1898 - 1853) + chr(0b10000 + 0o50)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def U1zLBJ1_q5cv(hXMPsSrOQzbh, PmE5_h409JAA, B6UAF1zReOyJ=None, c88QIkjOjka1=None, KxkovzKK3PcV=None, oXiBv91nJT0c=nzTpIcepk0o8(chr(1240 - 1192) + chr(0b1100000 + 0o17) + '\x30', 48914 - 48906)): NoZxuO7wjArS = hXMPsSrOQzbh.NoZxuO7wjArS if not B6UAF1zReOyJ: B6UAF1zReOyJ = hXMPsSrOQzbh.B6UAF1zReOyJ if c88QIkjOjka1: uc4gGmjAvJP3 = ujppqiXNPJu0(c88QIkjOjka1.coefficients) asgRU8eQsipS = ujppqiXNPJu0(uc4gGmjAvJP3.coefficients) TQ0u0KgwFXN5 = ujppqiXNPJu0(uc4gGmjAvJP3.coefficients) KuyiJVsdK9em = ujppqiXNPJu0(KxkovzKK3PcV.coefficients) UlIqqbAyAOTh = ujppqiXNPJu0(KuyiJVsdK9em.coefficients) MbjAvyP4Qyak = ujppqiXNPJu0(KuyiJVsdK9em.coefficients) else: uc4gGmjAvJP3 = asgRU8eQsipS = ujppqiXNPJu0([ZiH1BRUzc8JN(nzTpIcepk0o8(chr(1402 - 1354) + chr(111) + '\061', 8))]) asgRU8eQsipS = ujppqiXNPJu0([ZiH1BRUzc8JN(nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061', 8))]) TQ0u0KgwFXN5 = ujppqiXNPJu0([ZiH1BRUzc8JN(nzTpIcepk0o8('\060' + '\x6f' + '\x31', 8))]) KuyiJVsdK9em = UlIqqbAyAOTh = ujppqiXNPJu0([ZiH1BRUzc8JN(nzTpIcepk0o8('\060' + chr(7183 - 7072) + '\061', 8))]) UlIqqbAyAOTh = ujppqiXNPJu0([ZiH1BRUzc8JN(nzTpIcepk0o8(chr(1408 - 1360) + '\157' + chr(0b110001), 8))]) MbjAvyP4Qyak = ujppqiXNPJu0([ZiH1BRUzc8JN(nzTpIcepk0o8(chr(48) + chr(111) + chr(48), 8))]) QkRI2ibxeUAu = nzTpIcepk0o8('\x30' + chr(1808 - 1697) + chr(0b100100 + 0o14), 8) TAV7nzqrSsKx = nzTpIcepk0o8(chr(48) + chr(9414 - 9303) + chr(0b110000), 8) if ftfygxgFas5X(PmE5_h409JAA) > NoZxuO7wjArS - B6UAF1zReOyJ: TAV7nzqrSsKx = ftfygxgFas5X(PmE5_h409JAA) - (NoZxuO7wjArS - B6UAF1zReOyJ) RSRXPprHa9uI = ujppqiXNPJu0([ZiH1BRUzc8JN(nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b11000 + 0o127) + chr(49), 8))]) d402n7UwMyPB = ZiH1BRUzc8JN(nzTpIcepk0o8('\060' + '\157' + '\x30', 8)) sEVgLUlRGUb0 = ujppqiXNPJu0([ZiH1BRUzc8JN(nzTpIcepk0o8(chr(1624 - 1576) + chr(0b1101111) + chr(0b1011 + 0o46), 8)), ZiH1BRUzc8JN(nzTpIcepk0o8('\x30' + '\157' + chr(0b110000), 8))]) RWtImVdanJMG = RSRXPprHa9uI + PmE5_h409JAA for fPrVrKACaFCC in tpoEqV5cEG2w(NoZxuO7wjArS - B6UAF1zReOyJ - oXiBv91nJT0c): tmj9o95fctlO = oXiBv91nJT0c + fPrVrKACaFCC + TAV7nzqrSsKx TR2zv0JOQLzi = RWtImVdanJMG.mul_at(uc4gGmjAvJP3, tmj9o95fctlO) asgRU8eQsipS = uc4gGmjAvJP3 UlIqqbAyAOTh = KuyiJVsdK9em uc4gGmjAvJP3 = uc4gGmjAvJP3 - (sEVgLUlRGUb0 * TQ0u0KgwFXN5).scale(TR2zv0JOQLzi) KuyiJVsdK9em = KuyiJVsdK9em - (sEVgLUlRGUb0 * MbjAvyP4Qyak).scale(TR2zv0JOQLzi) if TR2zv0JOQLzi == d402n7UwMyPB or nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(71 - 21), 8) * QkRI2ibxeUAu > tmj9o95fctlO + oXiBv91nJT0c: TQ0u0KgwFXN5 = sEVgLUlRGUb0 * TQ0u0KgwFXN5 MbjAvyP4Qyak = sEVgLUlRGUb0 * MbjAvyP4Qyak else: TQ0u0KgwFXN5 = asgRU8eQsipS.scale(TR2zv0JOQLzi.inverse()) MbjAvyP4Qyak = UlIqqbAyAOTh.scale(TR2zv0JOQLzi.inverse()) QkRI2ibxeUAu = tmj9o95fctlO - QkRI2ibxeUAu if roI3spqORKae(KuyiJVsdK9em, roI3spqORKae(ES5oEprVxulp(b'J\x81\xae\x18WQ'), chr(100) + chr(4096 - 3995) + '\143' + chr(111) + chr(8617 - 8517) + chr(284 - 183))(chr(0b1110101) + '\164' + '\146' + '\055' + chr(0b110010 + 0o6))) > roI3spqORKae(uc4gGmjAvJP3, roI3spqORKae(ES5oEprVxulp(b'J\x81\xae\x18WQ'), chr(0b1100 + 0o130) + chr(101) + chr(0b111100 + 0o47) + chr(111) + chr(8562 - 8462) + chr(101))(chr(0b101001 + 0o114) + chr(4030 - 3914) + '\x66' + chr(0b101101) + chr(700 - 644))): KuyiJVsdK9em = ujppqiXNPJu0(KuyiJVsdK9em.coefficients[-(uc4gGmjAvJP3.degree + nzTpIcepk0o8(chr(0b100111 + 0o11) + '\x6f' + chr(2195 - 2146), 8)):]) return (uc4gGmjAvJP3, KuyiJVsdK9em)
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/rs.py
RSCoder._find_error_evaluator
def _find_error_evaluator(self, synd, sigma, k=None): '''Compute the error (or erasures if you supply sigma=erasures locator polynomial) evaluator polynomial Omega from the syndrome and the error/erasures/errata locator Sigma. Omega is already computed at the same time as Sigma inside the Berlekamp-Massey implemented above, but in case you modify Sigma, you can recompute Omega afterwards using this method, or just ensure that Omega computed by BM is correct given Sigma (as long as syndrome and sigma are correct, omega will be correct).''' n = self.n if not k: k = self.k # Omega(x) = [ (1 + Synd(x)) * Error_loc(x) ] mod x^(n-k+1) # NOTE: I don't know why we do 1+Synd(x) here, from docs it seems just Synd(x) is enough (and in practice if you remove the "ONE +" it will still decode correcty) as advised by Blahut in Algebraic Codes for Data Transmission, but it seems it's an implementation detail here. #ONE = Polynomial([GF2int(1)]) #return ((ONE + synd) * sigma) % Polynomial([GF2int(1)] + [GF2int(0)] * (n-k+1)) # NOT CORRECT: in practice it works flawlessly with this implementation (primitive polynomial = 3), but if you use another primitive like in reedsolo lib, it doesn't work! Thus, I guess that adding ONE is not correct for the general case. return (synd * sigma) % Polynomial([GF2int(1)] + [GF2int(0)] * (n-k+1))
python
def _find_error_evaluator(self, synd, sigma, k=None): '''Compute the error (or erasures if you supply sigma=erasures locator polynomial) evaluator polynomial Omega from the syndrome and the error/erasures/errata locator Sigma. Omega is already computed at the same time as Sigma inside the Berlekamp-Massey implemented above, but in case you modify Sigma, you can recompute Omega afterwards using this method, or just ensure that Omega computed by BM is correct given Sigma (as long as syndrome and sigma are correct, omega will be correct).''' n = self.n if not k: k = self.k # Omega(x) = [ (1 + Synd(x)) * Error_loc(x) ] mod x^(n-k+1) # NOTE: I don't know why we do 1+Synd(x) here, from docs it seems just Synd(x) is enough (and in practice if you remove the "ONE +" it will still decode correcty) as advised by Blahut in Algebraic Codes for Data Transmission, but it seems it's an implementation detail here. #ONE = Polynomial([GF2int(1)]) #return ((ONE + synd) * sigma) % Polynomial([GF2int(1)] + [GF2int(0)] * (n-k+1)) # NOT CORRECT: in practice it works flawlessly with this implementation (primitive polynomial = 3), but if you use another primitive like in reedsolo lib, it doesn't work! Thus, I guess that adding ONE is not correct for the general case. return (synd * sigma) % Polynomial([GF2int(1)] + [GF2int(0)] * (n-k+1))
[ "def", "_find_error_evaluator", "(", "self", ",", "synd", ",", "sigma", ",", "k", "=", "None", ")", ":", "n", "=", "self", ".", "n", "if", "not", "k", ":", "k", "=", "self", ".", "k", "# Omega(x) = [ (1 + Synd(x)) * Error_loc(x) ] mod x^(n-k+1)", "# NOTE: I don't know why we do 1+Synd(x) here, from docs it seems just Synd(x) is enough (and in practice if you remove the \"ONE +\" it will still decode correcty) as advised by Blahut in Algebraic Codes for Data Transmission, but it seems it's an implementation detail here.", "#ONE = Polynomial([GF2int(1)])", "#return ((ONE + synd) * sigma) % Polynomial([GF2int(1)] + [GF2int(0)] * (n-k+1)) # NOT CORRECT: in practice it works flawlessly with this implementation (primitive polynomial = 3), but if you use another primitive like in reedsolo lib, it doesn't work! Thus, I guess that adding ONE is not correct for the general case.", "return", "(", "synd", "*", "sigma", ")", "%", "Polynomial", "(", "[", "GF2int", "(", "1", ")", "]", "+", "[", "GF2int", "(", "0", ")", "]", "*", "(", "n", "-", "k", "+", "1", ")", ")" ]
Compute the error (or erasures if you supply sigma=erasures locator polynomial) evaluator polynomial Omega from the syndrome and the error/erasures/errata locator Sigma. Omega is already computed at the same time as Sigma inside the Berlekamp-Massey implemented above, but in case you modify Sigma, you can recompute Omega afterwards using this method, or just ensure that Omega computed by BM is correct given Sigma (as long as syndrome and sigma are correct, omega will be correct).
[ "Compute", "the", "error", "(", "or", "erasures", "if", "you", "supply", "sigma", "=", "erasures", "locator", "polynomial", ")", "evaluator", "polynomial", "Omega", "from", "the", "syndrome", "and", "the", "error", "/", "erasures", "/", "errata", "locator", "Sigma", ".", "Omega", "is", "already", "computed", "at", "the", "same", "time", "as", "Sigma", "inside", "the", "Berlekamp", "-", "Massey", "implemented", "above", "but", "in", "case", "you", "modify", "Sigma", "you", "can", "recompute", "Omega", "afterwards", "using", "this", "method", "or", "just", "ensure", "that", "Omega", "computed", "by", "BM", "is", "correct", "given", "Sigma", "(", "as", "long", "as", "syndrome", "and", "sigma", "are", "correct", "omega", "will", "be", "correct", ")", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/rs.py#L769-L778
train
Compute the error or erasures evaluator polynomial Omega from the syndrome and the error / errata locator polynomial Omega from the syndrome and the error / erasures locator polynomial Sigma.
GiP5xwVC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,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1960 - 1912) + chr(0b1101111) + '\x35', 39889 - 39881), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + '\066' + chr(0b101010 + 0o13), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + chr(49) + '\x35', 0b1000), nzTpIcepk0o8(chr(2092 - 2044) + '\157' + '\x33' + chr(52) + '\064', 1224 - 1216), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + '\x32' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(325 - 277) + chr(0b1101111) + '\063' + chr(2242 - 2190) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1000110 + 0o51) + chr(0b110001) + '\066' + chr(0b10110 + 0o35), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(466 - 416) + chr(55) + '\062', 0o10), nzTpIcepk0o8(chr(1651 - 1603) + chr(8588 - 8477) + '\x32' + chr(0b110001) + '\x35', 0b1000), nzTpIcepk0o8(chr(1619 - 1571) + '\157' + chr(0b110010) + '\061' + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\157' + chr(2134 - 2084) + '\x33' + chr(54), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\062' + chr(0b110001) + chr(0b110010 + 0o5), ord("\x08")), nzTpIcepk0o8(chr(316 - 268) + '\x6f' + '\x35' + '\065', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1011101 + 0o22) + chr(49) + '\063' + chr(50), 47213 - 47205), nzTpIcepk0o8('\060' + '\157' + '\x33' + '\x31' + '\064', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + chr(51) + chr(55), 42 - 34), nzTpIcepk0o8('\060' + chr(111) + chr(0b10011 + 0o37) + '\x32' + '\065', 0b1000), nzTpIcepk0o8('\060' + chr(8473 - 8362) + '\x32' + '\066' + '\065', 8), nzTpIcepk0o8(chr(1466 - 1418) + chr(111) + '\x36' + chr(0b101100 + 0o10), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(1638 - 1590) + '\157' + chr(0b110011) + chr(0b110001 + 0o5) + chr(0b10001 + 0o44), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(2019 - 1964), 8), nzTpIcepk0o8(chr(1532 - 1484) + '\x6f' + '\x32' + chr(2522 - 2469) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\157' + '\061' + '\061' + chr(49), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(177 - 122) + chr(0b10001 + 0o40), 63139 - 63131), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + chr(0b10 + 0o65), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(1715 - 1666) + chr(1836 - 1788), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(50) + chr(50) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + chr(529 - 478) + chr(0b10011 + 0o37), 926 - 918), nzTpIcepk0o8(chr(740 - 692) + chr(111) + chr(0b10011 + 0o37) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\x6f' + '\x33' + chr(48) + chr(214 - 163), 0o10), nzTpIcepk0o8(chr(2057 - 2009) + '\157' + chr(0b10010 + 0o41) + chr(0b11010 + 0o33) + chr(328 - 280), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + chr(0b101011 + 0o10) + chr(0b110000), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + '\x31' + chr(48), 53750 - 53742), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(826 - 715) + chr(0b101011 + 0o11) + '\x36', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b101000 + 0o13) + chr(2255 - 2203) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(48) + chr(11079 - 10968) + chr(50) + '\x35' + chr(2364 - 2310), 0o10), nzTpIcepk0o8('\x30' + chr(0b110010 + 0o75) + chr(0b100111 + 0o14) + chr(0b110010), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(50) + chr(1442 - 1387), 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1101111) + chr(50) + '\065' + chr(0b110111), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1653 - 1605) + '\157' + chr(0b110101) + chr(48), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'+'), '\x64' + chr(0b1000010 + 0o43) + chr(99) + chr(111) + chr(4617 - 4517) + '\x65')('\x75' + chr(7822 - 7706) + chr(6639 - 6537) + '\055' + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def hF8uFUOyO_Bu(hXMPsSrOQzbh, xCTaXwhNTbxS, uc4gGmjAvJP3, B6UAF1zReOyJ=None): NoZxuO7wjArS = hXMPsSrOQzbh.NoZxuO7wjArS if not B6UAF1zReOyJ: B6UAF1zReOyJ = hXMPsSrOQzbh.B6UAF1zReOyJ return xCTaXwhNTbxS * uc4gGmjAvJP3 % ujppqiXNPJu0([ZiH1BRUzc8JN(nzTpIcepk0o8(chr(562 - 514) + chr(2985 - 2874) + '\061', 0o10))] + [ZiH1BRUzc8JN(nzTpIcepk0o8('\060' + chr(188 - 77) + chr(48), 0o10))] * (NoZxuO7wjArS - B6UAF1zReOyJ + nzTpIcepk0o8('\060' + chr(0b1101111) + '\061', 8)))
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/rs.py
RSCoder._find_error_evaluator_fast
def _find_error_evaluator_fast(self, synd, sigma, k=None): '''Compute the error (or erasures if you supply sigma=erasures locator polynomial) evaluator polynomial Omega from the syndrome and the error/erasures/errata locator Sigma. Omega is already computed at the same time as Sigma inside the Berlekamp-Massey implemented above, but in case you modify Sigma, you can recompute Omega afterwards using this method, or just ensure that Omega computed by BM is correct given Sigma (as long as syndrome and sigma are correct, omega will be correct).''' n = self.n if not k: k = self.k # Omega(x) = [ Synd(x) * Error_loc(x) ] mod x^(n-k+1) -- From Blahut, Algebraic codes for data transmission, 2003 return (synd * sigma)._gffastmod(Polynomial([GF2int(1)] + [GF2int(0)] * (n-k+1)))
python
def _find_error_evaluator_fast(self, synd, sigma, k=None): '''Compute the error (or erasures if you supply sigma=erasures locator polynomial) evaluator polynomial Omega from the syndrome and the error/erasures/errata locator Sigma. Omega is already computed at the same time as Sigma inside the Berlekamp-Massey implemented above, but in case you modify Sigma, you can recompute Omega afterwards using this method, or just ensure that Omega computed by BM is correct given Sigma (as long as syndrome and sigma are correct, omega will be correct).''' n = self.n if not k: k = self.k # Omega(x) = [ Synd(x) * Error_loc(x) ] mod x^(n-k+1) -- From Blahut, Algebraic codes for data transmission, 2003 return (synd * sigma)._gffastmod(Polynomial([GF2int(1)] + [GF2int(0)] * (n-k+1)))
[ "def", "_find_error_evaluator_fast", "(", "self", ",", "synd", ",", "sigma", ",", "k", "=", "None", ")", ":", "n", "=", "self", ".", "n", "if", "not", "k", ":", "k", "=", "self", ".", "k", "# Omega(x) = [ Synd(x) * Error_loc(x) ] mod x^(n-k+1) -- From Blahut, Algebraic codes for data transmission, 2003", "return", "(", "synd", "*", "sigma", ")", ".", "_gffastmod", "(", "Polynomial", "(", "[", "GF2int", "(", "1", ")", "]", "+", "[", "GF2int", "(", "0", ")", "]", "*", "(", "n", "-", "k", "+", "1", ")", ")", ")" ]
Compute the error (or erasures if you supply sigma=erasures locator polynomial) evaluator polynomial Omega from the syndrome and the error/erasures/errata locator Sigma. Omega is already computed at the same time as Sigma inside the Berlekamp-Massey implemented above, but in case you modify Sigma, you can recompute Omega afterwards using this method, or just ensure that Omega computed by BM is correct given Sigma (as long as syndrome and sigma are correct, omega will be correct).
[ "Compute", "the", "error", "(", "or", "erasures", "if", "you", "supply", "sigma", "=", "erasures", "locator", "polynomial", ")", "evaluator", "polynomial", "Omega", "from", "the", "syndrome", "and", "the", "error", "/", "erasures", "/", "errata", "locator", "Sigma", ".", "Omega", "is", "already", "computed", "at", "the", "same", "time", "as", "Sigma", "inside", "the", "Berlekamp", "-", "Massey", "implemented", "above", "but", "in", "case", "you", "modify", "Sigma", "you", "can", "recompute", "Omega", "afterwards", "using", "this", "method", "or", "just", "ensure", "that", "Omega", "computed", "by", "BM", "is", "correct", "given", "Sigma", "(", "as", "long", "as", "syndrome", "and", "sigma", "are", "correct", "omega", "will", "be", "correct", ")", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/rs.py#L780-L786
train
Compute the error evaluator polynomial Omega from the syndrome and the error / errata locator polynomial Omega.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1A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WCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1805 - 1757) + chr(0b100 + 0o153) + '\063' + chr(0b110111) + '\065', 0o10), nzTpIcepk0o8(chr(0b10011 + 0o35) + '\157' + chr(49) + chr(986 - 937) + chr(401 - 346), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(1861 - 1809) + chr(2697 - 2643), 0b1000), nzTpIcepk0o8('\x30' + chr(11287 - 11176) + chr(49) + chr(51) + '\065', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b100110 + 0o111) + chr(0b101110 + 0o4) + chr(48) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(124 - 76) + chr(0b1001000 + 0o47) + chr(0b110010) + chr(0b11001 + 0o31) + chr(184 - 129), 0o10), nzTpIcepk0o8('\060' + chr(0b0 + 0o157) + chr(0b110011) + chr(0b1100 + 0o50) + chr(268 - 214), 0o10), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(8248 - 8137) + chr(49) + chr(0b100110 + 0o16) + '\x37', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\x31' + chr(0b110001) + chr(1169 - 1118), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(52) + '\x34', 38489 - 38481), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(0b1101111) + chr(1212 - 1162) + chr(1766 - 1718) + chr(0b11000 + 0o30), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(49) + '\063' + chr(51), 43853 - 43845), nzTpIcepk0o8(chr(0b101 + 0o53) + '\157' + '\x33' + chr(0b100110 + 0o15) + '\063', 28180 - 28172), nzTpIcepk0o8(chr(0b110000) + chr(3897 - 3786) + '\063' + chr(0b101110 + 0o6) + '\062', 48033 - 48025), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(0b10101 + 0o36) + '\060', 0o10), nzTpIcepk0o8(chr(2040 - 1992) + chr(111) + chr(1436 - 1385) + chr(226 - 174) + '\x34', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + chr(0b101101 + 0o10) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x33' + chr(954 - 902) + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + chr(0b10 + 0o155) + chr(51) + chr(50) + '\x31', 9302 - 9294), nzTpIcepk0o8(chr(48) + chr(0b1010100 + 0o33) + chr(1345 - 1295) + '\x37' + chr(1423 - 1375), 0b1000), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + chr(0b110010) + '\066' + '\060', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101001 + 0o6) + chr(511 - 462) + chr(2856 - 2802) + '\065', 0o10), nzTpIcepk0o8(chr(48) + chr(4632 - 4521) + '\x31' + '\x35' + chr(0b10010 + 0o45), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(872 - 821) + chr(0b101111 + 0o10) + chr(0b1101 + 0o50), 8), nzTpIcepk0o8('\x30' + chr(0b1010010 + 0o35) + chr(0b101011 + 0o14) + '\x33', 0b1000), nzTpIcepk0o8(chr(478 - 430) + chr(0b1101111) + chr(0b111 + 0o54) + '\067' + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1786 - 1734) + '\060', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111 + 0o0) + chr(50) + '\067' + chr(0b11010 + 0o30), 0b1000), nzTpIcepk0o8('\x30' + chr(0b101101 + 0o102) + chr(0b110001) + '\x37' + chr(52), 0b1000), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + chr(0b110001) + '\063' + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + chr(777 - 724) + chr(361 - 307), ord("\x08")), nzTpIcepk0o8(chr(1253 - 1205) + chr(0b1010000 + 0o37) + chr(49) + chr(0b110111) + chr(1747 - 1699), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + '\064' + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + '\062' + chr(1687 - 1634), 0o10), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1101111) + chr(0b101101 + 0o7) + chr(566 - 513), ord("\x08")), nzTpIcepk0o8(chr(571 - 523) + chr(0b1010100 + 0o33) + chr(856 - 805) + chr(48) + chr(0b1010 + 0o55), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b110000 + 0o77) + chr(49) + '\x31', ord("\x08")), nzTpIcepk0o8('\x30' + chr(8677 - 8566) + '\x31' + '\064' + '\x33', 53766 - 53758), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b1101111) + '\065' + chr(53), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b11100 + 0o25) + chr(51) + '\060', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b101001 + 0o106) + '\x35' + '\x30', 65376 - 65368)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd3'), chr(1175 - 1075) + chr(2381 - 2280) + '\x63' + chr(0b100111 + 0o110) + chr(100) + '\145')(chr(117) + chr(116) + chr(0b1100110) + chr(0b1001 + 0o44) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def EMc9PzMTH_c3(hXMPsSrOQzbh, xCTaXwhNTbxS, uc4gGmjAvJP3, B6UAF1zReOyJ=None): NoZxuO7wjArS = hXMPsSrOQzbh.NoZxuO7wjArS if not B6UAF1zReOyJ: B6UAF1zReOyJ = hXMPsSrOQzbh.B6UAF1zReOyJ return roI3spqORKae(xCTaXwhNTbxS * uc4gGmjAvJP3, roI3spqORKae(ES5oEprVxulp(b'\xa2(@;\xe0\xe4\x92\n$@'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(0b1010100 + 0o33) + '\144' + chr(101))(chr(10705 - 10588) + chr(0b100010 + 0o122) + '\146' + chr(1366 - 1321) + '\x38'))(ujppqiXNPJu0([ZiH1BRUzc8JN(nzTpIcepk0o8('\060' + chr(0b111110 + 0o61) + chr(0b110001), 0b1000))] + [ZiH1BRUzc8JN(nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(48), 0o10))] * (NoZxuO7wjArS - B6UAF1zReOyJ + nzTpIcepk0o8('\060' + chr(111) + chr(0b100011 + 0o16), 8))))
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/rs.py
RSCoder._chien_search
def _chien_search(self, sigma): '''Recall the definition of sigma, it has s roots. To find them, this function evaluates sigma at all 2^(c_exp-1) (ie: 255 for GF(2^8)) non-zero points to find the roots The inverse of the roots are X_i, the error locations Returns a list X of error locations, and a corresponding list j of error positions (the discrete log of the corresponding X value) The lists are up to s elements large. This is essentially an inverse Fourrier transform. Important technical math note: This implementation is not actually Chien's search. Chien's search is a way to evaluate the polynomial such that each evaluation only takes constant time. This here simply does 255 evaluations straight up, which is much less efficient. Said differently, we simply do a bruteforce search by trial substitution to find the zeros of this polynomial, which identifies the error locations. ''' # TODO: find a more efficient algorithm, this is the slowest part of the whole decoding process (~2.5 ms, while any other part is only ~400microsec). Could try the Pruned FFT from "Simple Algorithms for BCH Decoding", by Jonathan Hong and Martin Vetterli, IEEE Transactions on Communications, Vol.43, No.8, August 1995 X = [] j = [] p = GF2int(self.generator) # Try for each possible location for l in _range(1, self.gf2_charac+1): # range 1:256 is important: if you use range 0:255, if the last byte of the ecc symbols is corrupted, it won't be correctable! You need to use the range 1,256 to include this last byte. #l = (i+self.fcr) # These evaluations could be more efficient, but oh well if sigma.evaluate( p**l ) == 0: # If it's 0, then bingo! It's an error location # Compute the error location polynomial X (will be directly used to compute the errors magnitudes inside the Forney algorithm) X.append( p**(-l) ) # Compute the coefficient position (not the error position, it's actually the reverse: we compute the degree of the term where the error is located. To get the error position, just compute n-1-j). # This is different than the notes, I think the notes were in error # Notes said j values were just l, when it's actually 255-l j.append(self.gf2_charac - l) # Sanity check: the number of errors/errata positions found should be exactly the same as the length of the errata locator polynomial errs_nb = len(sigma) - 1 # compute the exact number of errors/errata that this error locator should find if len(j) != errs_nb: raise RSCodecError("Too many (or few) errors found by Chien Search for the errata locator polynomial!") return X, j
python
def _chien_search(self, sigma): '''Recall the definition of sigma, it has s roots. To find them, this function evaluates sigma at all 2^(c_exp-1) (ie: 255 for GF(2^8)) non-zero points to find the roots The inverse of the roots are X_i, the error locations Returns a list X of error locations, and a corresponding list j of error positions (the discrete log of the corresponding X value) The lists are up to s elements large. This is essentially an inverse Fourrier transform. Important technical math note: This implementation is not actually Chien's search. Chien's search is a way to evaluate the polynomial such that each evaluation only takes constant time. This here simply does 255 evaluations straight up, which is much less efficient. Said differently, we simply do a bruteforce search by trial substitution to find the zeros of this polynomial, which identifies the error locations. ''' # TODO: find a more efficient algorithm, this is the slowest part of the whole decoding process (~2.5 ms, while any other part is only ~400microsec). Could try the Pruned FFT from "Simple Algorithms for BCH Decoding", by Jonathan Hong and Martin Vetterli, IEEE Transactions on Communications, Vol.43, No.8, August 1995 X = [] j = [] p = GF2int(self.generator) # Try for each possible location for l in _range(1, self.gf2_charac+1): # range 1:256 is important: if you use range 0:255, if the last byte of the ecc symbols is corrupted, it won't be correctable! You need to use the range 1,256 to include this last byte. #l = (i+self.fcr) # These evaluations could be more efficient, but oh well if sigma.evaluate( p**l ) == 0: # If it's 0, then bingo! It's an error location # Compute the error location polynomial X (will be directly used to compute the errors magnitudes inside the Forney algorithm) X.append( p**(-l) ) # Compute the coefficient position (not the error position, it's actually the reverse: we compute the degree of the term where the error is located. To get the error position, just compute n-1-j). # This is different than the notes, I think the notes were in error # Notes said j values were just l, when it's actually 255-l j.append(self.gf2_charac - l) # Sanity check: the number of errors/errata positions found should be exactly the same as the length of the errata locator polynomial errs_nb = len(sigma) - 1 # compute the exact number of errors/errata that this error locator should find if len(j) != errs_nb: raise RSCodecError("Too many (or few) errors found by Chien Search for the errata locator polynomial!") return X, j
[ "def", "_chien_search", "(", "self", ",", "sigma", ")", ":", "# TODO: find a more efficient algorithm, this is the slowest part of the whole decoding process (~2.5 ms, while any other part is only ~400microsec). Could try the Pruned FFT from \"Simple Algorithms for BCH Decoding\", by Jonathan Hong and Martin Vetterli, IEEE Transactions on Communications, Vol.43, No.8, August 1995", "X", "=", "[", "]", "j", "=", "[", "]", "p", "=", "GF2int", "(", "self", ".", "generator", ")", "# Try for each possible location", "for", "l", "in", "_range", "(", "1", ",", "self", ".", "gf2_charac", "+", "1", ")", ":", "# range 1:256 is important: if you use range 0:255, if the last byte of the ecc symbols is corrupted, it won't be correctable! You need to use the range 1,256 to include this last byte.", "#l = (i+self.fcr)", "# These evaluations could be more efficient, but oh well", "if", "sigma", ".", "evaluate", "(", "p", "**", "l", ")", "==", "0", ":", "# If it's 0, then bingo! It's an error location", "# Compute the error location polynomial X (will be directly used to compute the errors magnitudes inside the Forney algorithm)", "X", ".", "append", "(", "p", "**", "(", "-", "l", ")", ")", "# Compute the coefficient position (not the error position, it's actually the reverse: we compute the degree of the term where the error is located. To get the error position, just compute n-1-j).", "# This is different than the notes, I think the notes were in error", "# Notes said j values were just l, when it's actually 255-l", "j", ".", "append", "(", "self", ".", "gf2_charac", "-", "l", ")", "# Sanity check: the number of errors/errata positions found should be exactly the same as the length of the errata locator polynomial", "errs_nb", "=", "len", "(", "sigma", ")", "-", "1", "# compute the exact number of errors/errata that this error locator should find", "if", "len", "(", "j", ")", "!=", "errs_nb", ":", "raise", "RSCodecError", "(", "\"Too many (or few) errors found by Chien Search for the errata locator polynomial!\"", ")", "return", "X", ",", "j" ]
Recall the definition of sigma, it has s roots. To find them, this function evaluates sigma at all 2^(c_exp-1) (ie: 255 for GF(2^8)) non-zero points to find the roots The inverse of the roots are X_i, the error locations Returns a list X of error locations, and a corresponding list j of error positions (the discrete log of the corresponding X value) The lists are up to s elements large. This is essentially an inverse Fourrier transform. Important technical math note: This implementation is not actually Chien's search. Chien's search is a way to evaluate the polynomial such that each evaluation only takes constant time. This here simply does 255 evaluations straight up, which is much less efficient. Said differently, we simply do a bruteforce search by trial substitution to find the zeros of this polynomial, which identifies the error locations.
[ "Recall", "the", "definition", "of", "sigma", "it", "has", "s", "roots", ".", "To", "find", "them", "this", "function", "evaluates", "sigma", "at", "all", "2^", "(", "c_exp", "-", "1", ")", "(", "ie", ":", "255", "for", "GF", "(", "2^8", "))", "non", "-", "zero", "points", "to", "find", "the", "roots", "The", "inverse", "of", "the", "roots", "are", "X_i", "the", "error", "locations" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/rs.py#L788-L826
train
Recall the definition of sigma it has s roots. To find them it has s roots. To find them it has s roots. To find them it has s roots and the error positions of the error locations and j of the error positions of the roots.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eX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w0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + chr(0b11000 + 0o34) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(553 - 503) + chr(0b100011 + 0o22) + chr(732 - 678), 0o10), nzTpIcepk0o8('\060' + chr(0b10 + 0o155) + chr(0b110011) + chr(0b110000) + '\x37', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b1110 + 0o43) + '\060' + chr(0b1101 + 0o51), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\063' + '\x33' + chr(0b110011 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(0b10110 + 0o32) + '\157' + chr(1096 - 1046) + chr(1658 - 1604) + '\060', 20644 - 20636), nzTpIcepk0o8('\x30' + chr(111) + chr(1428 - 1379) + chr(0b110110), 38747 - 38739), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + '\064' + chr(0b110000 + 0o6), 0b1000), nzTpIcepk0o8(chr(437 - 389) + chr(0b1101111) + chr(1448 - 1397) + chr(716 - 666) + chr(54), 49636 - 49628), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b11110 + 0o121) + chr(780 - 730), 0o10), nzTpIcepk0o8(chr(1162 - 1114) + '\x6f' + chr(0b110001) + chr(51) + chr(0b10111 + 0o35), 17303 - 17295), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1100 + 0o46) + chr(51) + chr(54), 0b1000), nzTpIcepk0o8(chr(1384 - 1336) + '\157' + chr(0b10110 + 0o34) + chr(2179 - 2125) + chr(1039 - 990), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b100100 + 0o15) + '\x32', 0o10), nzTpIcepk0o8('\060' + chr(2746 - 2635) + '\063' + chr(2788 - 2735) + '\066', 37299 - 37291), nzTpIcepk0o8('\060' + '\x6f' + chr(0b11100 + 0o25) + chr(0b110000) + '\x35', 0b1000), nzTpIcepk0o8('\060' + chr(3853 - 3742) + chr(49) + '\x30' + chr(0b110110), 8), nzTpIcepk0o8(chr(68 - 20) + '\x6f' + '\063' + chr(50) + '\x31', 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\x31' + chr(0b110010) + chr(54), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + chr(0b10110 + 0o40) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(2191 - 2143) + '\157' + chr(0b1011 + 0o50) + chr(2377 - 2324) + chr(48), 13235 - 13227), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101111) + chr(0b1110 + 0o44) + chr(0b110010) + '\x32', 20647 - 20639), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\x6f' + '\063' + chr(0b101 + 0o53) + chr(0b100111 + 0o17), 0b1000), nzTpIcepk0o8(chr(0b100 + 0o54) + '\x6f' + '\x33' + chr(0b110100), 0b1000), nzTpIcepk0o8('\060' + chr(0b1011000 + 0o27) + chr(1903 - 1854) + '\062' + chr(0b100111 + 0o17), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + chr(53) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(8220 - 8109) + chr(0b10011 + 0o36) + chr(52) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(111) + chr(0b110001) + '\x31' + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + '\061' + chr(58 - 8), 0o10), nzTpIcepk0o8(chr(1806 - 1758) + chr(0b11010 + 0o125) + chr(51) + '\x34' + chr(0b110000 + 0o1), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + chr(50) + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(11399 - 11288) + chr(0b101100 + 0o7) + chr(2593 - 2542), 0o10), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(111) + chr(49) + chr(2095 - 2044) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + '\x32' + chr(53), 36677 - 36669), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\157' + '\x33' + '\x35' + chr(0b101000 + 0o17), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b111 + 0o150) + '\063' + chr(0b110101) + chr(0b101100 + 0o12), 8), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(736 - 688) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(992 - 944) + '\157' + chr(0b110011) + '\x32' + chr(0b101110 + 0o11), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b101110 + 0o4) + '\062' + chr(0b110111), 46281 - 46273), nzTpIcepk0o8(chr(564 - 516) + chr(111) + chr(62 - 11) + '\x31' + chr(0b110111), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(1203 - 1092) + chr(0b1101 + 0o50) + '\x30', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x8f'), chr(0b1100100) + chr(0b1001011 + 0o32) + '\143' + '\157' + chr(100) + chr(101))(chr(0b1110101) + chr(0b10100 + 0o140) + chr(0b1100110) + '\055' + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def SdY85opwVxt1(hXMPsSrOQzbh, uc4gGmjAvJP3): mxhyDqTAMpMC = [] sChW4gUsXrIC = [] fSdw5wwLo9MO = ZiH1BRUzc8JN(hXMPsSrOQzbh.utrvLf8Qjpjk) for fPrVrKACaFCC in tpoEqV5cEG2w(nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1698 - 1649), 56150 - 56142), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xc6\xc8\xf5\x19\xbd\xd8o\xd4\xb7a'), chr(100) + chr(0b1000 + 0o135) + '\143' + '\157' + chr(0b10010 + 0o122) + '\x65')(chr(11793 - 11676) + chr(0b1110100) + chr(102) + '\x2d' + chr(56))) + nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1101111) + chr(0b1000 + 0o51), 8)): if roI3spqORKae(uc4gGmjAvJP3, roI3spqORKae(ES5oEprVxulp(b'\xf2\xf8\x8c(\xbb\xd2T\xf3\xber-\xf2'), '\144' + chr(101) + chr(0b10001 + 0o122) + '\x6f' + chr(100) + '\145')(chr(0b1101001 + 0o14) + chr(0b1110100) + '\x66' + chr(0b100101 + 0o10) + chr(0b101111 + 0o11)))(fSdw5wwLo9MO ** fPrVrKACaFCC) == nzTpIcepk0o8(chr(0b100000 + 0o20) + '\157' + chr(48), 0o10): roI3spqORKae(mxhyDqTAMpMC, roI3spqORKae(ES5oEprVxulp(b'\xe9\xfa\x94r\xa6\xd7I\xc9\xbcm\t\xab'), '\144' + '\x65' + '\143' + chr(111) + chr(7603 - 7503) + '\x65')(chr(117) + chr(0b1110100) + '\146' + '\055' + chr(56)))(fSdw5wwLo9MO ** (-fPrVrKACaFCC)) roI3spqORKae(sChW4gUsXrIC, roI3spqORKae(ES5oEprVxulp(b'\xe9\xfa\x94r\xa6\xd7I\xc9\xbcm\t\xab'), chr(100) + chr(0b1100101) + chr(0b111 + 0o134) + '\157' + '\144' + chr(6332 - 6231))('\x75' + chr(116) + chr(7051 - 6949) + chr(0b100011 + 0o12) + chr(2797 - 2741)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xc6\xc8\xf5\x19\xbd\xd8o\xd4\xb7a'), chr(0b100100 + 0o100) + chr(101) + '\143' + chr(7012 - 6901) + chr(6880 - 6780) + chr(0b11110 + 0o107))('\165' + chr(0b1110100) + chr(102) + chr(1980 - 1935) + chr(0b111000))) - fPrVrKACaFCC) Qo_i4Vom9YvF = ftfygxgFas5X(uc4gGmjAvJP3) - nzTpIcepk0o8('\060' + chr(2119 - 2008) + '\061', 8) if ftfygxgFas5X(sChW4gUsXrIC) != Qo_i4Vom9YvF: raise saHP7IgNNjQg(roI3spqORKae(ES5oEprVxulp(b'\xf5\xc1\xa8f\xb3\xd1`\xdf\xf6*3\xec\x91l\x8b2o\xf13\x86\x9a\xfd\xb4ov\x8f\x0c9\xa4\x85\xb3y"\xb5\xac\x86\xab\xb2\xf9\xef\xf2\xcb\xa64\xbd\xd8.\xc0\xb9p|\xea\xd9o\xce 4\xa37\x80\x89\xb2\xaas5\x88\x17#\xb8\xc1\xe3t7\xec\x81\x81\xaf\xbe\xf6\xa3\x80'), chr(0b11101 + 0o107) + chr(0b11 + 0o142) + chr(2208 - 2109) + chr(0b1011111 + 0o20) + chr(100) + chr(101))(chr(0b1110101) + '\x74' + '\x66' + chr(1737 - 1692) + chr(2991 - 2935))) return (mxhyDqTAMpMC, sChW4gUsXrIC)
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/rs.py
RSCoder._chien_search_fast
def _chien_search_fast(self, sigma): '''Real chien search, we reuse the previous polynomial evaluation and just multiply by a constant polynomial. This should be faster, but it seems it's just the same speed as the other bruteforce version. However, it should easily be parallelizable.''' # TODO: doesn't work when fcr is different than 1 (X values are incorrectly "shifted"...) # TODO: try to mix this approach with the optimized walk on only interesting values, implemented in _chien_search_faster() X = [] j = [] p = GF2int(self.generator) if not hasattr(self, 'const_poly'): self.const_poly = [GF2int(self.generator)**(i+self.fcr) for i in _range(self.gf2_charac, -1, -1)] # constant polynomial that will allow us to update the previous polynomial evaluation to get the next one const_poly = self.const_poly # caching for more efficiency since it never changes ev_poly, ev = sigma.evaluate_array( p**1 ) # compute the first polynomial evaluation # Try for each possible location for l in _range(1, self.gf2_charac+1): # range 1:256 is important: if you use range 0:255, if the last byte of the ecc symbols is corrupted, it won't be correctable! You need to use the range 1,256 to include this last byte. #l = (i+self.fcr) # Check if it's a root for the polynomial if ev == 0: # If it's 0, then bingo! It's an error location # Compute the error location polynomial X (will be directly used to compute the errors magnitudes inside the Forney algorithm) X.append( p**(-l) ) # Compute the coefficient position (not the error position, it's actually the reverse: we compute the degree of the term where the error is located. To get the error position, just compute n-1-j). # This is different than the notes, I think the notes were in error # Notes said j values were just l, when it's actually 255-l j.append(self.gf2_charac - l) # Update the polynomial evaluation for the next iteration # we simply multiply each term[k] with alpha^k (where here alpha = p = GF2int(generator)). # For more info, see the presentation by Andrew Brown, or this one: http://web.ntpu.edu.tw/~yshan/BCH_decoding.pdf # TODO: parallelize this loop for i in _range(1, len(ev_poly)+1): # TODO: maybe the fcr != 1 fix should be put here? ev_poly[-i] *= const_poly[-i] # Compute the new evaluation by just summing ev = sum(ev_poly) return X, j
python
def _chien_search_fast(self, sigma): '''Real chien search, we reuse the previous polynomial evaluation and just multiply by a constant polynomial. This should be faster, but it seems it's just the same speed as the other bruteforce version. However, it should easily be parallelizable.''' # TODO: doesn't work when fcr is different than 1 (X values are incorrectly "shifted"...) # TODO: try to mix this approach with the optimized walk on only interesting values, implemented in _chien_search_faster() X = [] j = [] p = GF2int(self.generator) if not hasattr(self, 'const_poly'): self.const_poly = [GF2int(self.generator)**(i+self.fcr) for i in _range(self.gf2_charac, -1, -1)] # constant polynomial that will allow us to update the previous polynomial evaluation to get the next one const_poly = self.const_poly # caching for more efficiency since it never changes ev_poly, ev = sigma.evaluate_array( p**1 ) # compute the first polynomial evaluation # Try for each possible location for l in _range(1, self.gf2_charac+1): # range 1:256 is important: if you use range 0:255, if the last byte of the ecc symbols is corrupted, it won't be correctable! You need to use the range 1,256 to include this last byte. #l = (i+self.fcr) # Check if it's a root for the polynomial if ev == 0: # If it's 0, then bingo! It's an error location # Compute the error location polynomial X (will be directly used to compute the errors magnitudes inside the Forney algorithm) X.append( p**(-l) ) # Compute the coefficient position (not the error position, it's actually the reverse: we compute the degree of the term where the error is located. To get the error position, just compute n-1-j). # This is different than the notes, I think the notes were in error # Notes said j values were just l, when it's actually 255-l j.append(self.gf2_charac - l) # Update the polynomial evaluation for the next iteration # we simply multiply each term[k] with alpha^k (where here alpha = p = GF2int(generator)). # For more info, see the presentation by Andrew Brown, or this one: http://web.ntpu.edu.tw/~yshan/BCH_decoding.pdf # TODO: parallelize this loop for i in _range(1, len(ev_poly)+1): # TODO: maybe the fcr != 1 fix should be put here? ev_poly[-i] *= const_poly[-i] # Compute the new evaluation by just summing ev = sum(ev_poly) return X, j
[ "def", "_chien_search_fast", "(", "self", ",", "sigma", ")", ":", "# TODO: doesn't work when fcr is different than 1 (X values are incorrectly \"shifted\"...)", "# TODO: try to mix this approach with the optimized walk on only interesting values, implemented in _chien_search_faster()", "X", "=", "[", "]", "j", "=", "[", "]", "p", "=", "GF2int", "(", "self", ".", "generator", ")", "if", "not", "hasattr", "(", "self", ",", "'const_poly'", ")", ":", "self", ".", "const_poly", "=", "[", "GF2int", "(", "self", ".", "generator", ")", "**", "(", "i", "+", "self", ".", "fcr", ")", "for", "i", "in", "_range", "(", "self", ".", "gf2_charac", ",", "-", "1", ",", "-", "1", ")", "]", "# constant polynomial that will allow us to update the previous polynomial evaluation to get the next one", "const_poly", "=", "self", ".", "const_poly", "# caching for more efficiency since it never changes", "ev_poly", ",", "ev", "=", "sigma", ".", "evaluate_array", "(", "p", "**", "1", ")", "# compute the first polynomial evaluation", "# Try for each possible location", "for", "l", "in", "_range", "(", "1", ",", "self", ".", "gf2_charac", "+", "1", ")", ":", "# range 1:256 is important: if you use range 0:255, if the last byte of the ecc symbols is corrupted, it won't be correctable! You need to use the range 1,256 to include this last byte.", "#l = (i+self.fcr)", "# Check if it's a root for the polynomial", "if", "ev", "==", "0", ":", "# If it's 0, then bingo! It's an error location", "# Compute the error location polynomial X (will be directly used to compute the errors magnitudes inside the Forney algorithm)", "X", ".", "append", "(", "p", "**", "(", "-", "l", ")", ")", "# Compute the coefficient position (not the error position, it's actually the reverse: we compute the degree of the term where the error is located. To get the error position, just compute n-1-j).", "# This is different than the notes, I think the notes were in error", "# Notes said j values were just l, when it's actually 255-l", "j", ".", "append", "(", "self", ".", "gf2_charac", "-", "l", ")", "# Update the polynomial evaluation for the next iteration", "# we simply multiply each term[k] with alpha^k (where here alpha = p = GF2int(generator)).", "# For more info, see the presentation by Andrew Brown, or this one: http://web.ntpu.edu.tw/~yshan/BCH_decoding.pdf", "# TODO: parallelize this loop", "for", "i", "in", "_range", "(", "1", ",", "len", "(", "ev_poly", ")", "+", "1", ")", ":", "# TODO: maybe the fcr != 1 fix should be put here?", "ev_poly", "[", "-", "i", "]", "*=", "const_poly", "[", "-", "i", "]", "# Compute the new evaluation by just summing", "ev", "=", "sum", "(", "ev_poly", ")", "return", "X", ",", "j" ]
Real chien search, we reuse the previous polynomial evaluation and just multiply by a constant polynomial. This should be faster, but it seems it's just the same speed as the other bruteforce version. However, it should easily be parallelizable.
[ "Real", "chien", "search", "we", "reuse", "the", "previous", "polynomial", "evaluation", "and", "just", "multiply", "by", "a", "constant", "polynomial", ".", "This", "should", "be", "faster", "but", "it", "seems", "it", "s", "just", "the", "same", "speed", "as", "the", "other", "bruteforce", "version", ".", "However", "it", "should", "easily", "be", "parallelizable", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/rs.py#L828-L860
train
Real chien search for the next set of ecc symbols.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,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yyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1101111) + chr(159 - 109) + '\064' + chr(54), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + chr(0b110010) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(1403 - 1355) + chr(111) + chr(0b110001) + chr(49) + '\x30', 0o10), nzTpIcepk0o8(chr(2015 - 1967) + chr(0b111010 + 0o65) + chr(0b11001 + 0o27), 0b1000), nzTpIcepk0o8(chr(1536 - 1488) + chr(2211 - 2100) + chr(0b110010) + chr(51) + '\x33', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + chr(0b110110) + '\067', 55017 - 55009), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(0b100000 + 0o26) + chr(48), 0o10), nzTpIcepk0o8('\x30' + chr(9120 - 9009) + chr(0b110010) + '\x32' + chr(0b100000 + 0o21), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(12200 - 12089) + '\x33' + chr(49) + chr(0b100010 + 0o17), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(0b110010) + '\x34', 48249 - 48241), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + chr(0b100010 + 0o25) + chr(1894 - 1841), 15309 - 15301), nzTpIcepk0o8(chr(206 - 158) + '\157' + '\x35' + chr(1252 - 1197), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + chr(49) + chr(1006 - 953), 0o10), nzTpIcepk0o8(chr(677 - 629) + chr(5399 - 5288) + chr(1919 - 1869) + chr(53) + chr(0b110100), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11111 + 0o24) + '\x34' + '\x36', 45726 - 45718), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(111) + chr(49) + chr(2340 - 2287) + chr(0b100110 + 0o15), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11010 + 0o30) + '\x31' + '\x35', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(1138 - 1090) + chr(0b110 + 0o60), 62819 - 62811), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110100) + chr(49), 26688 - 26680), nzTpIcepk0o8(chr(627 - 579) + '\157' + chr(0b110101) + '\065', 0o10), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b1101111) + chr(2410 - 2360) + chr(1522 - 1468) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(50) + chr(0b101110 + 0o5) + chr(51), 8), nzTpIcepk0o8(chr(776 - 728) + chr(9090 - 8979) + '\061' + '\x35' + chr(0b110001), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b11001 + 0o31) + chr(0b101100 + 0o6) + chr(0b10111 + 0o40), 43681 - 43673), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10010 + 0o40) + chr(0b110011) + chr(55), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(49) + chr(54), 8076 - 8068), nzTpIcepk0o8(chr(48) + chr(5942 - 5831) + chr(1055 - 1005) + chr(0b110010) + '\067', 8), nzTpIcepk0o8(chr(865 - 817) + chr(0b1101111) + chr(52) + chr(52), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(2301 - 2249) + '\x32', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(0b110010) + '\x31', 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110000 + 0o3) + chr(1733 - 1681) + chr(0b11001 + 0o33), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(928 - 878) + chr(1643 - 1588) + '\060', 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x34' + chr(385 - 331), 15044 - 15036), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b100010 + 0o16), 30897 - 30889), nzTpIcepk0o8(chr(1608 - 1560) + '\x6f' + chr(1809 - 1760) + '\062', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010) + '\062' + chr(0b110110), 8), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(111) + chr(0b100010 + 0o21) + chr(0b11010 + 0o27), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(55) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(5368 - 5257) + '\063' + chr(0b101000 + 0o13) + chr(342 - 294), 0b1000), nzTpIcepk0o8('\060' + chr(9064 - 8953) + '\062' + chr(0b110110) + '\067', 56049 - 56041)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110 + 0o52) + chr(111) + chr(53) + chr(652 - 604), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x88'), '\144' + chr(8231 - 8130) + '\143' + chr(111) + chr(100) + chr(101))(chr(6562 - 6445) + '\x74' + chr(0b111001 + 0o55) + chr(0b10010 + 0o33) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def qS8dmjRlFQnZ(hXMPsSrOQzbh, uc4gGmjAvJP3): mxhyDqTAMpMC = [] sChW4gUsXrIC = [] fSdw5wwLo9MO = ZiH1BRUzc8JN(hXMPsSrOQzbh.utrvLf8Qjpjk) if not dRKdVnHPFq7C(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xc5\xf9&s\xef(\x80\xfe\xa5\xad'), chr(0b1100100) + chr(0b111111 + 0o46) + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(101))(chr(0b1000100 + 0o61) + '\x74' + chr(102) + chr(45) + chr(710 - 654))): hXMPsSrOQzbh.l2_B3ifa1mlf = [ZiH1BRUzc8JN(hXMPsSrOQzbh.utrvLf8Qjpjk) ** (ZlbFMSG8gCoF + hXMPsSrOQzbh.fcr) for ZlbFMSG8gCoF in tpoEqV5cEG2w(hXMPsSrOQzbh.gf2_charac, -nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b1101111) + chr(0b110001), 7821 - 7813), -nzTpIcepk0o8('\060' + chr(111) + chr(49), 8))] l2_B3ifa1mlf = hXMPsSrOQzbh.l2_B3ifa1mlf (nhumqP_Nrch5, yEtjbPfxGrvU) = uc4gGmjAvJP3.evaluate_array(fSdw5wwLo9MO ** nzTpIcepk0o8(chr(1522 - 1474) + '\157' + '\061', 8)) for fPrVrKACaFCC in tpoEqV5cEG2w(nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110000 + 0o1), 8), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xc1\xf0z_\xf8\x1f\x91\xe3\xa8\xb7'), chr(0b1010000 + 0o24) + chr(8161 - 8060) + chr(0b1011110 + 0o5) + chr(6951 - 6840) + '\x64' + chr(0b11 + 0o142))(chr(0b1100101 + 0o20) + '\164' + chr(102) + chr(45) + '\070')) + nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49), 8)): if yEtjbPfxGrvU == nzTpIcepk0o8('\060' + chr(6626 - 6515) + chr(0b100101 + 0o13), 8): roI3spqORKae(mxhyDqTAMpMC, roI3spqORKae(ES5oEprVxulp(b'\xee\xc2\x1b4\xe3\x10\xb7\xfe\xa3\xbb\xa8\x1a'), '\144' + chr(9576 - 9475) + '\x63' + '\x6f' + chr(0b1110 + 0o126) + chr(2142 - 2041))(chr(0b110000 + 0o105) + chr(0b10110 + 0o136) + chr(0b1100010 + 0o4) + chr(0b100011 + 0o12) + '\x38'))(fSdw5wwLo9MO ** (-fPrVrKACaFCC)) roI3spqORKae(sChW4gUsXrIC, roI3spqORKae(ES5oEprVxulp(b'\xee\xc2\x1b4\xe3\x10\xb7\xfe\xa3\xbb\xa8\x1a'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(0b1000 + 0o147) + '\x64' + chr(3460 - 3359))(chr(0b1000101 + 0o60) + chr(0b1110100) + '\146' + chr(0b10100 + 0o31) + '\070'))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xc1\xf0z_\xf8\x1f\x91\xe3\xa8\xb7'), chr(0b1100100) + chr(0b111101 + 0o50) + '\143' + '\157' + '\x64' + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(0b1001110 + 0o30) + '\055' + chr(56))) - fPrVrKACaFCC) for ZlbFMSG8gCoF in tpoEqV5cEG2w(nzTpIcepk0o8(chr(0b110000) + chr(0b1101010 + 0o5) + '\061', 8), ftfygxgFas5X(nhumqP_Nrch5) + nzTpIcepk0o8(chr(48) + '\157' + chr(49), 8)): nhumqP_Nrch5[-ZlbFMSG8gCoF] *= l2_B3ifa1mlf[-ZlbFMSG8gCoF] yEtjbPfxGrvU = oclC8DLjA_lV(nhumqP_Nrch5) return (mxhyDqTAMpMC, sChW4gUsXrIC)
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/rs.py
RSCoder._chien_search_faster
def _chien_search_faster(self, sigma): '''Faster chien search, processing only useful coefficients (the ones in the messages) instead of the whole 2^8 range. Besides the speed boost, this also allows to fix a number of issue: correctly decoding when the last ecc byte is corrupted, and accepting messages of length n > 2^8.''' n = self.n X = [] j = [] p = GF2int(self.generator) # Normally we should try all 2^8 possible values, but here we optimize to just check the interesting symbols # This also allows to accept messages where n > 2^8. for l in _range(n): #l = (i+self.fcr) # These evaluations could be more efficient, but oh well if sigma.evaluate( p**(-l) ) == 0: # If it's 0, then bingo! It's an error location # Compute the error location polynomial X (will be directly used to compute the errors magnitudes inside the Forney algorithm) X.append( p**l ) # Compute the coefficient position (not the error position, it's actually the reverse: we compute the degree of the term where the error is located. To get the error position, just compute n-1-j). # This is different than the notes, I think the notes were in error # Notes said j values were just l, when it's actually 255-l j.append(l) # Sanity check: the number of errors/errata positions found should be exactly the same as the length of the errata locator polynomial errs_nb = len(sigma) - 1 # compute the exact number of errors/errata that this error locator should find if len(j) != errs_nb: # Note: decoding messages+ecc with length n > self.gf2_charac does work partially, but it's wrong, because you will get duplicated values, and then Chien Search cannot discriminate which root is correct and which is not. The duplication of values is normally prevented by the prime polynomial reduction when generating the field (see init_lut() in ff.py), but if you overflow the field, you have no guarantee anymore. We may try to use a bruteforce approach: the correct positions ARE in the final array j, but the problem is because we are above the Galois Field's range, there is a wraparound because of overflow so that for example if j should be [0, 1, 2, 3], we will also get [255, 256, 257, 258] (because 258 % 255 == 3, same for the other values), so we can't discriminate. The issue with that bruteforce approach is that fixing any errs_nb errors among those will always give a correct output message (in the sense that the syndrome will be all 0), so we may not even be able to check if that's correct or not, so there's clearly no way to decode a message of greater length than the field. raise RSCodecError("Too many (or few) errors found by Chien Search for the errata locator polynomial!") return X, j
python
def _chien_search_faster(self, sigma): '''Faster chien search, processing only useful coefficients (the ones in the messages) instead of the whole 2^8 range. Besides the speed boost, this also allows to fix a number of issue: correctly decoding when the last ecc byte is corrupted, and accepting messages of length n > 2^8.''' n = self.n X = [] j = [] p = GF2int(self.generator) # Normally we should try all 2^8 possible values, but here we optimize to just check the interesting symbols # This also allows to accept messages where n > 2^8. for l in _range(n): #l = (i+self.fcr) # These evaluations could be more efficient, but oh well if sigma.evaluate( p**(-l) ) == 0: # If it's 0, then bingo! It's an error location # Compute the error location polynomial X (will be directly used to compute the errors magnitudes inside the Forney algorithm) X.append( p**l ) # Compute the coefficient position (not the error position, it's actually the reverse: we compute the degree of the term where the error is located. To get the error position, just compute n-1-j). # This is different than the notes, I think the notes were in error # Notes said j values were just l, when it's actually 255-l j.append(l) # Sanity check: the number of errors/errata positions found should be exactly the same as the length of the errata locator polynomial errs_nb = len(sigma) - 1 # compute the exact number of errors/errata that this error locator should find if len(j) != errs_nb: # Note: decoding messages+ecc with length n > self.gf2_charac does work partially, but it's wrong, because you will get duplicated values, and then Chien Search cannot discriminate which root is correct and which is not. The duplication of values is normally prevented by the prime polynomial reduction when generating the field (see init_lut() in ff.py), but if you overflow the field, you have no guarantee anymore. We may try to use a bruteforce approach: the correct positions ARE in the final array j, but the problem is because we are above the Galois Field's range, there is a wraparound because of overflow so that for example if j should be [0, 1, 2, 3], we will also get [255, 256, 257, 258] (because 258 % 255 == 3, same for the other values), so we can't discriminate. The issue with that bruteforce approach is that fixing any errs_nb errors among those will always give a correct output message (in the sense that the syndrome will be all 0), so we may not even be able to check if that's correct or not, so there's clearly no way to decode a message of greater length than the field. raise RSCodecError("Too many (or few) errors found by Chien Search for the errata locator polynomial!") return X, j
[ "def", "_chien_search_faster", "(", "self", ",", "sigma", ")", ":", "n", "=", "self", ".", "n", "X", "=", "[", "]", "j", "=", "[", "]", "p", "=", "GF2int", "(", "self", ".", "generator", ")", "# Normally we should try all 2^8 possible values, but here we optimize to just check the interesting symbols", "# This also allows to accept messages where n > 2^8.", "for", "l", "in", "_range", "(", "n", ")", ":", "#l = (i+self.fcr)", "# These evaluations could be more efficient, but oh well", "if", "sigma", ".", "evaluate", "(", "p", "**", "(", "-", "l", ")", ")", "==", "0", ":", "# If it's 0, then bingo! It's an error location", "# Compute the error location polynomial X (will be directly used to compute the errors magnitudes inside the Forney algorithm)", "X", ".", "append", "(", "p", "**", "l", ")", "# Compute the coefficient position (not the error position, it's actually the reverse: we compute the degree of the term where the error is located. To get the error position, just compute n-1-j).", "# This is different than the notes, I think the notes were in error", "# Notes said j values were just l, when it's actually 255-l", "j", ".", "append", "(", "l", ")", "# Sanity check: the number of errors/errata positions found should be exactly the same as the length of the errata locator polynomial", "errs_nb", "=", "len", "(", "sigma", ")", "-", "1", "# compute the exact number of errors/errata that this error locator should find", "if", "len", "(", "j", ")", "!=", "errs_nb", ":", "# Note: decoding messages+ecc with length n > self.gf2_charac does work partially, but it's wrong, because you will get duplicated values, and then Chien Search cannot discriminate which root is correct and which is not. The duplication of values is normally prevented by the prime polynomial reduction when generating the field (see init_lut() in ff.py), but if you overflow the field, you have no guarantee anymore. We may try to use a bruteforce approach: the correct positions ARE in the final array j, but the problem is because we are above the Galois Field's range, there is a wraparound because of overflow so that for example if j should be [0, 1, 2, 3], we will also get [255, 256, 257, 258] (because 258 % 255 == 3, same for the other values), so we can't discriminate. The issue with that bruteforce approach is that fixing any errs_nb errors among those will always give a correct output message (in the sense that the syndrome will be all 0), so we may not even be able to check if that's correct or not, so there's clearly no way to decode a message of greater length than the field.", "raise", "RSCodecError", "(", "\"Too many (or few) errors found by Chien Search for the errata locator polynomial!\"", ")", "return", "X", ",", "j" ]
Faster chien search, processing only useful coefficients (the ones in the messages) instead of the whole 2^8 range. Besides the speed boost, this also allows to fix a number of issue: correctly decoding when the last ecc byte is corrupted, and accepting messages of length n > 2^8.
[ "Faster", "chien", "search", "processing", "only", "useful", "coefficients", "(", "the", "ones", "in", "the", "messages", ")", "instead", "of", "the", "whole", "2^8", "range", ".", "Besides", "the", "speed", "boost", "this", "also", "allows", "to", "fix", "a", "number", "of", "issue", ":", "correctly", "decoding", "when", "the", "last", "ecc", "byte", "is", "corrupted", "and", "accepting", "messages", "of", "length", "n", ">", "2^8", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/rs.py#L862-L888
train
Faster chien search for the most common error locations and error locations.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpF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qMV,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(638 - 590) + '\157' + '\x31' + '\066' + '\062', 0o10), nzTpIcepk0o8(chr(2023 - 1975) + chr(0b1101111) + '\x32' + chr(0b110000) + chr(0b11001 + 0o36), 0b1000), nzTpIcepk0o8('\x30' + chr(8317 - 8206) + chr(0b110010) + '\064' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(1484 - 1436) + chr(111) + chr(0b110001) + chr(2542 - 2490) + '\062', 0o10), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b10101 + 0o132) + chr(1773 - 1722) + '\x30' + chr(50), 53688 - 53680), nzTpIcepk0o8('\x30' + chr(0b1010010 + 0o35) + chr(2303 - 2252) + chr(0b110011) + chr(71 - 20), 52307 - 52299), nzTpIcepk0o8('\x30' + chr(0b100100 + 0o113) + chr(0b110100), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(0b1011 + 0o54) + chr(50), 49829 - 49821), nzTpIcepk0o8(chr(1943 - 1895) + chr(111) + chr(0b110011) + '\062' + chr(0b1000 + 0o53), 0o10), nzTpIcepk0o8('\x30' + chr(6093 - 5982) + chr(1383 - 1334) + chr(1140 - 1090) + chr(0b0 + 0o61), ord("\x08")), nzTpIcepk0o8('\x30' + chr(7759 - 7648) + chr(49) + '\065', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1010010 + 0o35) + chr(0b11111 + 0o23) + chr(0b110101) + '\x33', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(1510 - 1460) + chr(0b100111 + 0o15) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(1490 - 1442) + chr(111) + chr(1263 - 1214) + chr(54) + chr(316 - 266), 8), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(8570 - 8459) + '\x33' + '\066' + '\067', 36482 - 36474), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b111011 + 0o64) + '\061' + chr(0b110011) + '\065', 0b1000), nzTpIcepk0o8(chr(1353 - 1305) + '\x6f' + '\061' + chr(0b100001 + 0o22) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b1100 + 0o45) + '\062' + chr(2299 - 2248), 0o10), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1010111 + 0o30) + chr(54) + '\063', 57978 - 57970), nzTpIcepk0o8('\x30' + chr(11949 - 11838) + '\x33' + chr(2146 - 2094) + '\x31', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(667 - 617) + chr(0b110100) + '\x31', 8), nzTpIcepk0o8('\060' + chr(10363 - 10252) + chr(2526 - 2475) + '\x35' + '\065', 51764 - 51756), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100000 + 0o22) + chr(774 - 722) + '\x37', 0b1000), nzTpIcepk0o8(chr(2276 - 2228) + '\x6f' + chr(50) + '\067' + chr(0b111 + 0o53), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1011100 + 0o23) + chr(51) + chr(0b110010 + 0o2) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\x6f' + chr(0b111 + 0o54) + chr(0b110010) + '\063', 8), nzTpIcepk0o8('\060' + chr(0b10011 + 0o134) + chr(1965 - 1915) + '\067' + chr(0b110001), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(0b110101) + chr(1510 - 1459), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1839 - 1790) + chr(0b110101) + '\065', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b11001 + 0o31) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(1891 - 1843) + chr(1321 - 1210) + '\063' + chr(0b110001) + chr(0b11101 + 0o27), 0b1000), nzTpIcepk0o8(chr(48) + chr(10587 - 10476) + chr(0b11111 + 0o22) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(8601 - 8490) + '\062' + '\x30' + '\061', 32566 - 32558), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b11111 + 0o24) + chr(0b10100 + 0o40) + '\062', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110101), 42750 - 42742), nzTpIcepk0o8(chr(0b110000) + chr(11603 - 11492) + '\x36' + '\065', 0b1000), nzTpIcepk0o8('\060' + chr(0b101010 + 0o105) + '\x32' + chr(52) + '\067', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10010 + 0o45) + '\067', 3495 - 3487), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(49), 8), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(1100 - 1052) + '\x37', 49776 - 49768)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1440 - 1392) + '\157' + chr(1746 - 1693) + chr(0b110000), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\\'), '\x64' + chr(101) + chr(99) + chr(111) + '\144' + chr(0b101111 + 0o66))('\x75' + chr(116) + '\146' + chr(0b101001 + 0o4) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def EZjp1PED5stf(hXMPsSrOQzbh, uc4gGmjAvJP3): NoZxuO7wjArS = hXMPsSrOQzbh.NoZxuO7wjArS mxhyDqTAMpMC = [] sChW4gUsXrIC = [] fSdw5wwLo9MO = ZiH1BRUzc8JN(hXMPsSrOQzbh.utrvLf8Qjpjk) for fPrVrKACaFCC in tpoEqV5cEG2w(NoZxuO7wjArS): if roI3spqORKae(uc4gGmjAvJP3, roI3spqORKae(ES5oEprVxulp(b'!\xd1\xee\x0c\xa7\xb9^/\xbb!|\xc7'), chr(0b1100100) + '\x65' + chr(99) + '\157' + chr(100) + chr(0b1011000 + 0o15))('\x75' + chr(0b1110100) + '\x66' + chr(0b101101) + chr(2229 - 2173)))(fSdw5wwLo9MO ** (-fPrVrKACaFCC)) == nzTpIcepk0o8('\060' + chr(111) + chr(48), 63300 - 63292): roI3spqORKae(mxhyDqTAMpMC, roI3spqORKae(ES5oEprVxulp(b':\xd3\xf6V\xba\xbcC\x15\xb9>X\x9e'), '\144' + chr(5844 - 5743) + chr(0b111011 + 0o50) + chr(0b1001010 + 0o45) + '\144' + chr(0b110101 + 0o60))('\x75' + chr(7061 - 6945) + chr(102) + chr(0b101100 + 0o1) + chr(0b10 + 0o66)))(fSdw5wwLo9MO ** fPrVrKACaFCC) roI3spqORKae(sChW4gUsXrIC, roI3spqORKae(ES5oEprVxulp(b':\xd3\xf6V\xba\xbcC\x15\xb9>X\x9e'), chr(2091 - 1991) + chr(6455 - 6354) + chr(5376 - 5277) + '\157' + chr(207 - 107) + chr(101))('\x75' + chr(116) + '\146' + '\055' + chr(2119 - 2063)))(fPrVrKACaFCC) Qo_i4Vom9YvF = ftfygxgFas5X(uc4gGmjAvJP3) - nzTpIcepk0o8(chr(48) + chr(111) + '\061', 65378 - 65370) if ftfygxgFas5X(sChW4gUsXrIC) != Qo_i4Vom9YvF: raise saHP7IgNNjQg(roI3spqORKae(ES5oEprVxulp(b'&\xe8\xcaB\xaf\xbaj\x03\xf3yb\xd9\x81\x14\x92*vsV\x93\xd3\x82\xd5\xc9\xc0\xb5\xd6\x9e\x03r\xeck\xf8\xc2F]\xceZg\xe7!\xe2\xc4\x10\xa1\xb3$\x1c\xbc#-\xdf\xc9\x17\xd78-!R\x95\xc0\xcd\xcb\xd5\x83\xb2\xcd\x84\x1f6\xbcf\xed\x9bkZ\xcaVh\xabS'), chr(561 - 461) + '\145' + chr(0b1100011) + '\157' + '\x64' + '\x65')('\165' + chr(0b1000010 + 0o62) + chr(4861 - 4759) + '\055' + '\x38')) return (mxhyDqTAMpMC, sChW4gUsXrIC)
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/rs.py
RSCoder._old_forney
def _old_forney(self, omega, X, k=None): '''Computes the error magnitudes (only works with errors or erasures under t = floor((n-k)/2), not with erasures above (n-k)//2)''' # XXX Is floor division okay here? Should this be ceiling? if not k: k = self.k t = (self.n - k) // 2 Y = [] for l, Xl in enumerate(X): # Compute the sequence product and multiply its inverse in prod = GF2int(1) # just to init the product (1 is the neutral term for multiplication) Xl_inv = Xl.inverse() for ji in _range(t): # do not change to _range(len(X)) as can be seen in some papers, it won't give the correct result! (sometimes yes, but not always) if ji == l: continue if ji < len(X): Xj = X[ji] else: # if above the maximum degree of the polynomial, then all coefficients above are just 0 (that's logical...) Xj = GF2int(0) prod = prod * (Xl - Xj) #if (ji != l): # prod = prod * (GF2int(1) - X[ji]*(Xl.inverse())) # Compute Yl Yl = Xl**t * omega.evaluate(Xl_inv) * Xl_inv * prod.inverse() Y.append(Yl) return Y
python
def _old_forney(self, omega, X, k=None): '''Computes the error magnitudes (only works with errors or erasures under t = floor((n-k)/2), not with erasures above (n-k)//2)''' # XXX Is floor division okay here? Should this be ceiling? if not k: k = self.k t = (self.n - k) // 2 Y = [] for l, Xl in enumerate(X): # Compute the sequence product and multiply its inverse in prod = GF2int(1) # just to init the product (1 is the neutral term for multiplication) Xl_inv = Xl.inverse() for ji in _range(t): # do not change to _range(len(X)) as can be seen in some papers, it won't give the correct result! (sometimes yes, but not always) if ji == l: continue if ji < len(X): Xj = X[ji] else: # if above the maximum degree of the polynomial, then all coefficients above are just 0 (that's logical...) Xj = GF2int(0) prod = prod * (Xl - Xj) #if (ji != l): # prod = prod * (GF2int(1) - X[ji]*(Xl.inverse())) # Compute Yl Yl = Xl**t * omega.evaluate(Xl_inv) * Xl_inv * prod.inverse() Y.append(Yl) return Y
[ "def", "_old_forney", "(", "self", ",", "omega", ",", "X", ",", "k", "=", "None", ")", ":", "# XXX Is floor division okay here? Should this be ceiling?", "if", "not", "k", ":", "k", "=", "self", ".", "k", "t", "=", "(", "self", ".", "n", "-", "k", ")", "//", "2", "Y", "=", "[", "]", "for", "l", ",", "Xl", "in", "enumerate", "(", "X", ")", ":", "# Compute the sequence product and multiply its inverse in", "prod", "=", "GF2int", "(", "1", ")", "# just to init the product (1 is the neutral term for multiplication)", "Xl_inv", "=", "Xl", ".", "inverse", "(", ")", "for", "ji", "in", "_range", "(", "t", ")", ":", "# do not change to _range(len(X)) as can be seen in some papers, it won't give the correct result! (sometimes yes, but not always)", "if", "ji", "==", "l", ":", "continue", "if", "ji", "<", "len", "(", "X", ")", ":", "Xj", "=", "X", "[", "ji", "]", "else", ":", "# if above the maximum degree of the polynomial, then all coefficients above are just 0 (that's logical...)", "Xj", "=", "GF2int", "(", "0", ")", "prod", "=", "prod", "*", "(", "Xl", "-", "Xj", ")", "#if (ji != l):", "# prod = prod * (GF2int(1) - X[ji]*(Xl.inverse()))", "# Compute Yl", "Yl", "=", "Xl", "**", "t", "*", "omega", ".", "evaluate", "(", "Xl_inv", ")", "*", "Xl_inv", "*", "prod", ".", "inverse", "(", ")", "Y", ".", "append", "(", "Yl", ")", "return", "Y" ]
Computes the error magnitudes (only works with errors or erasures under t = floor((n-k)/2), not with erasures above (n-k)//2)
[ "Computes", "the", "error", "magnitudes", "(", "only", "works", "with", "errors", "or", "erasures", "under", "t", "=", "floor", "((", "n", "-", "k", ")", "/", "2", ")", "not", "with", "erasures", "above", "(", "n", "-", "k", ")", "//", "2", ")" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/rs.py#L890-L918
train
Compute the error magnitudes for a given polynomial X and k.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHk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67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(243 - 195) + chr(111) + '\x32' + chr(0b101 + 0o61) + chr(1758 - 1709), 0o10), nzTpIcepk0o8('\x30' + chr(0b10001 + 0o136) + chr(0b110001) + '\x36' + '\065', 16233 - 16225), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(552 - 441) + chr(0b110011) + '\x36' + chr(49), 12930 - 12922), nzTpIcepk0o8('\060' + chr(301 - 190) + chr(2255 - 2205) + chr(50) + '\x34', 0o10), nzTpIcepk0o8(chr(2022 - 1974) + '\157' + '\x37' + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(6816 - 6705) + chr(0b110100) + chr(324 - 271), 44866 - 44858), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\157' + chr(0b110001) + chr(53) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + '\x30' + chr(0b110000), 21444 - 21436), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + '\x31' + chr(1925 - 1875), 9905 - 9897), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x35' + chr(0b101101 + 0o12), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(11116 - 11005) + '\066' + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1101010 + 0o5) + chr(2469 - 2418) + chr(48) + '\064', 3447 - 3439), nzTpIcepk0o8('\x30' + chr(0b11110 + 0o121) + '\x32' + chr(0b110100) + chr(48), 57830 - 57822), nzTpIcepk0o8('\x30' + chr(3890 - 3779) + chr(2365 - 2315) + '\x33' + '\x31', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b10011 + 0o36) + chr(0b100111 + 0o11) + chr(0b11 + 0o61), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b10111 + 0o130) + '\062' + chr(0b100 + 0o55) + chr(1293 - 1239), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1000111 + 0o50) + chr(0b11010 + 0o31) + chr(50) + chr(50), 10680 - 10672), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(111) + '\062' + chr(51) + chr(54), 0b1000), nzTpIcepk0o8(chr(58 - 10) + chr(111) + chr(0b110010) + chr(0b110111) + chr(51), 11764 - 11756), nzTpIcepk0o8('\x30' + chr(4908 - 4797) + chr(0b1101 + 0o46) + chr(55) + chr(55), 24569 - 24561), nzTpIcepk0o8(chr(48) + chr(0b1000 + 0o147) + chr(1523 - 1474) + '\x31' + chr(0b110000), 11929 - 11921), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001 + 0o1) + chr(50) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x32' + chr(0b110010) + chr(49), 8), nzTpIcepk0o8(chr(0b100 + 0o54) + '\x6f' + chr(284 - 235) + chr(0b10001 + 0o43) + '\x30', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(0b11100 + 0o32) + chr(53), 8), nzTpIcepk0o8(chr(0b110000) + chr(6665 - 6554) + chr(0b1111 + 0o44) + chr(0b11 + 0o56) + chr(53), 0b1000), nzTpIcepk0o8('\060' + chr(0b10 + 0o155) + chr(0b1011 + 0o46) + '\060' + chr(0b1 + 0o62), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b111 + 0o150) + '\x33' + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(12278 - 12167) + chr(0b10111 + 0o34) + chr(0b110000) + chr(0b110000), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1498 - 1449) + chr(2501 - 2446) + chr(720 - 666), 48385 - 48377), nzTpIcepk0o8(chr(484 - 436) + chr(11409 - 11298) + chr(0b110010) + chr(50) + chr(0b100011 + 0o21), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(672 - 622) + chr(52 - 0) + '\x31', 37164 - 37156), nzTpIcepk0o8(chr(48) + chr(4484 - 4373) + chr(0b101011 + 0o6) + chr(53) + chr(0b1101 + 0o44), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + '\064' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b10101 + 0o132) + '\064' + chr(52), 0o10), nzTpIcepk0o8(chr(426 - 378) + chr(111) + '\063' + chr(50) + chr(0b1110 + 0o50), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b1100 + 0o46) + chr(0b110111) + chr(0b110001), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(388 - 338) + chr(49) + '\x33', 37242 - 37234), nzTpIcepk0o8('\x30' + chr(111) + chr(0b1110 + 0o45) + chr(0b10001 + 0o44) + '\064', 8333 - 8325), nzTpIcepk0o8(chr(1677 - 1629) + chr(0b1000011 + 0o54) + chr(0b1111 + 0o44) + chr(528 - 478) + '\067', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1 + 0o156) + chr(285 - 232) + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x9f'), chr(100) + chr(9957 - 9856) + chr(0b1100011) + chr(0b110100 + 0o73) + chr(0b10101 + 0o117) + '\x65')(chr(0b110011 + 0o102) + chr(0b1110100) + chr(102) + chr(1589 - 1544) + chr(0b1101 + 0o53)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def pGB28VlQIQK3(hXMPsSrOQzbh, KuyiJVsdK9em, mxhyDqTAMpMC, B6UAF1zReOyJ=None): if not B6UAF1zReOyJ: B6UAF1zReOyJ = hXMPsSrOQzbh.B6UAF1zReOyJ h3Vc_4wxEbgd = (hXMPsSrOQzbh.NoZxuO7wjArS - B6UAF1zReOyJ) // nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10101 + 0o35), 0o10) zWIjrOExuyqC = [] for (fPrVrKACaFCC, ksIOTiOuZhEv) in _kV_Bomx8PZ4(mxhyDqTAMpMC): ek_Sa3yBR2eU = ZiH1BRUzc8JN(nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b110101 + 0o72) + chr(0b101111 + 0o2), ord("\x08"))) YpYuTnSOLuvn = ksIOTiOuZhEv.inverse() for cZ5tjGhTZyic in tpoEqV5cEG2w(h3Vc_4wxEbgd): if cZ5tjGhTZyic == fPrVrKACaFCC: continue if cZ5tjGhTZyic < ftfygxgFas5X(mxhyDqTAMpMC): J9wMqLYQpUXH = mxhyDqTAMpMC[cZ5tjGhTZyic] else: J9wMqLYQpUXH = ZiH1BRUzc8JN(nzTpIcepk0o8(chr(0b110000) + chr(0b1010 + 0o145) + '\x30', 0o10)) ek_Sa3yBR2eU = ek_Sa3yBR2eU * (ksIOTiOuZhEv - J9wMqLYQpUXH) HggKUjfduOjJ = ksIOTiOuZhEv ** h3Vc_4wxEbgd * KuyiJVsdK9em.SVKnebZUhpql(YpYuTnSOLuvn) * YpYuTnSOLuvn * ek_Sa3yBR2eU.inverse() roI3spqORKae(zWIjrOExuyqC, roI3spqORKae(ES5oEprVxulp(b'\xf9!\xa2\xa0AB(\xaf @`\xf1'), chr(100) + chr(9752 - 9651) + '\x63' + chr(0b11000 + 0o127) + '\144' + chr(0b1000110 + 0o37))(chr(0b100000 + 0o125) + chr(116) + '\146' + chr(45) + chr(0b111000)))(HggKUjfduOjJ) return zWIjrOExuyqC
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/rs.py
RSCoder._forney
def _forney(self, omega, X): '''Computes the error magnitudes. Works also with erasures and errors+erasures beyond the (n-k)//2 bound, here the bound is 2*e+v <= (n-k-1) with e the number of errors and v the number of erasures.''' # XXX Is floor division okay here? Should this be ceiling? Y = [] # the final result, the error/erasures polynomial (contain the values that we should minus on the received message to get the repaired message) Xlength = len(X) for l, Xl in enumerate(X): Xl_inv = Xl.inverse() # Compute the formal derivative of the error locator polynomial (see Blahut, Algebraic codes for data transmission, pp 196-197). # the formal derivative of the errata locator is used as the denominator of the Forney Algorithm, which simply says that the ith error value is given by error_evaluator(gf_inverse(Xi)) / error_locator_derivative(gf_inverse(Xi)). See Blahut, Algebraic codes for data transmission, pp 196-197. sigma_prime_tmp = [1 - Xl_inv * X[j] for j in _range(Xlength) if j != l] # TODO? maybe a faster way would be to precompute sigma_prime = sigma[len(sigma) & 1:len(sigma):2] and then just do sigma_prime.evaluate(X[j]) ? (like in reedsolo.py) # compute the product sigma_prime = 1 for coef in sigma_prime_tmp: sigma_prime = sigma_prime * coef # equivalent to: sigma_prime = functools.reduce(mul, sigma_prime, 1) # Compute Yl # This is a more faithful translation of the theoretical equation contrary to the old forney method. Here it is exactly copy/pasted from the included presentation decoding_rs.pdf: Yl = omega(Xl.inverse()) / prod(1 - Xj*Xl.inverse()) for j in len(X) (in the paper it's for j in s, but it's useless when len(X) < s because we compute neutral terms 1 for nothing, and wrong when correcting more than s erasures or erasures+errors since it prevents computing all required terms). # Thus here this method works with erasures too because firstly we fixed the equation to be like the theoretical one (don't know why it was modified in _old_forney(), if it's an optimization, it doesn't enhance anything), and secondly because we removed the product bound on s, which prevented computing errors and erasures above the s=(n-k)//2 bound. # The best resource I have found for the correct equation is https://en.wikipedia.org/wiki/Forney_algorithm -- note that in the article, fcr is defined as c. Yl = - (Xl**(1-self.fcr) * omega.evaluate(Xl_inv) / sigma_prime) # sigma_prime is the denominator of the Forney algorithm Y.append(Yl) return Y
python
def _forney(self, omega, X): '''Computes the error magnitudes. Works also with erasures and errors+erasures beyond the (n-k)//2 bound, here the bound is 2*e+v <= (n-k-1) with e the number of errors and v the number of erasures.''' # XXX Is floor division okay here? Should this be ceiling? Y = [] # the final result, the error/erasures polynomial (contain the values that we should minus on the received message to get the repaired message) Xlength = len(X) for l, Xl in enumerate(X): Xl_inv = Xl.inverse() # Compute the formal derivative of the error locator polynomial (see Blahut, Algebraic codes for data transmission, pp 196-197). # the formal derivative of the errata locator is used as the denominator of the Forney Algorithm, which simply says that the ith error value is given by error_evaluator(gf_inverse(Xi)) / error_locator_derivative(gf_inverse(Xi)). See Blahut, Algebraic codes for data transmission, pp 196-197. sigma_prime_tmp = [1 - Xl_inv * X[j] for j in _range(Xlength) if j != l] # TODO? maybe a faster way would be to precompute sigma_prime = sigma[len(sigma) & 1:len(sigma):2] and then just do sigma_prime.evaluate(X[j]) ? (like in reedsolo.py) # compute the product sigma_prime = 1 for coef in sigma_prime_tmp: sigma_prime = sigma_prime * coef # equivalent to: sigma_prime = functools.reduce(mul, sigma_prime, 1) # Compute Yl # This is a more faithful translation of the theoretical equation contrary to the old forney method. Here it is exactly copy/pasted from the included presentation decoding_rs.pdf: Yl = omega(Xl.inverse()) / prod(1 - Xj*Xl.inverse()) for j in len(X) (in the paper it's for j in s, but it's useless when len(X) < s because we compute neutral terms 1 for nothing, and wrong when correcting more than s erasures or erasures+errors since it prevents computing all required terms). # Thus here this method works with erasures too because firstly we fixed the equation to be like the theoretical one (don't know why it was modified in _old_forney(), if it's an optimization, it doesn't enhance anything), and secondly because we removed the product bound on s, which prevented computing errors and erasures above the s=(n-k)//2 bound. # The best resource I have found for the correct equation is https://en.wikipedia.org/wiki/Forney_algorithm -- note that in the article, fcr is defined as c. Yl = - (Xl**(1-self.fcr) * omega.evaluate(Xl_inv) / sigma_prime) # sigma_prime is the denominator of the Forney algorithm Y.append(Yl) return Y
[ "def", "_forney", "(", "self", ",", "omega", ",", "X", ")", ":", "# XXX Is floor division okay here? Should this be ceiling?", "Y", "=", "[", "]", "# the final result, the error/erasures polynomial (contain the values that we should minus on the received message to get the repaired message)", "Xlength", "=", "len", "(", "X", ")", "for", "l", ",", "Xl", "in", "enumerate", "(", "X", ")", ":", "Xl_inv", "=", "Xl", ".", "inverse", "(", ")", "# Compute the formal derivative of the error locator polynomial (see Blahut, Algebraic codes for data transmission, pp 196-197).", "# the formal derivative of the errata locator is used as the denominator of the Forney Algorithm, which simply says that the ith error value is given by error_evaluator(gf_inverse(Xi)) / error_locator_derivative(gf_inverse(Xi)). See Blahut, Algebraic codes for data transmission, pp 196-197.", "sigma_prime_tmp", "=", "[", "1", "-", "Xl_inv", "*", "X", "[", "j", "]", "for", "j", "in", "_range", "(", "Xlength", ")", "if", "j", "!=", "l", "]", "# TODO? maybe a faster way would be to precompute sigma_prime = sigma[len(sigma) & 1:len(sigma):2] and then just do sigma_prime.evaluate(X[j]) ? (like in reedsolo.py)", "# compute the product", "sigma_prime", "=", "1", "for", "coef", "in", "sigma_prime_tmp", ":", "sigma_prime", "=", "sigma_prime", "*", "coef", "# equivalent to: sigma_prime = functools.reduce(mul, sigma_prime, 1)", "# Compute Yl", "# This is a more faithful translation of the theoretical equation contrary to the old forney method. Here it is exactly copy/pasted from the included presentation decoding_rs.pdf: Yl = omega(Xl.inverse()) / prod(1 - Xj*Xl.inverse()) for j in len(X) (in the paper it's for j in s, but it's useless when len(X) < s because we compute neutral terms 1 for nothing, and wrong when correcting more than s erasures or erasures+errors since it prevents computing all required terms).", "# Thus here this method works with erasures too because firstly we fixed the equation to be like the theoretical one (don't know why it was modified in _old_forney(), if it's an optimization, it doesn't enhance anything), and secondly because we removed the product bound on s, which prevented computing errors and erasures above the s=(n-k)//2 bound.", "# The best resource I have found for the correct equation is https://en.wikipedia.org/wiki/Forney_algorithm -- note that in the article, fcr is defined as c.", "Yl", "=", "-", "(", "Xl", "**", "(", "1", "-", "self", ".", "fcr", ")", "*", "omega", ".", "evaluate", "(", "Xl_inv", ")", "/", "sigma_prime", ")", "# sigma_prime is the denominator of the Forney algorithm", "Y", ".", "append", "(", "Yl", ")", "return", "Y" ]
Computes the error magnitudes. Works also with erasures and errors+erasures beyond the (n-k)//2 bound, here the bound is 2*e+v <= (n-k-1) with e the number of errors and v the number of erasures.
[ "Computes", "the", "error", "magnitudes", ".", "Works", "also", "with", "erasures", "and", "errors", "+", "erasures", "beyond", "the", "(", "n", "-", "k", ")", "//", "2", "bound", "here", "the", "bound", "is", "2", "*", "e", "+", "v", "<", "=", "(", "n", "-", "k", "-", "1", ")", "with", "e", "the", "number", "of", "errors", "and", "v", "the", "number", "of", "erasures", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/rs.py#L920-L946
train
Compute the error magnitudes. Works also with erasures and errors + erasures beyond the 2 bound here the bound is 2 * e + v < = n - k
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1S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9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1101111) + chr(2245 - 2193) + '\066', 57364 - 57356), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(111) + chr(0b11000 + 0o33) + '\060', ord("\x08")), nzTpIcepk0o8(chr(867 - 819) + chr(0b100011 + 0o114) + '\063' + '\x32' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + '\061' + chr(50), 0o10), nzTpIcepk0o8('\060' + chr(4204 - 4093) + chr(81 - 30) + chr(55), 0o10), nzTpIcepk0o8(chr(292 - 244) + chr(0b1100010 + 0o15) + '\063' + chr(0b1111 + 0o43) + '\067', 0o10), nzTpIcepk0o8('\060' + chr(0b101001 + 0o106) + chr(51) + '\066' + '\x33', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11000 + 0o33) + chr(762 - 714) + chr(1260 - 1212), 0o10), nzTpIcepk0o8(chr(1547 - 1499) + chr(11022 - 10911) + chr(51) + chr(118 - 66) + chr(0b110001), 2158 - 2150), nzTpIcepk0o8(chr(1490 - 1442) + chr(529 - 418) + chr(0b110011) + chr(2173 - 2123) + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(523 - 472) + chr(0b110011) + '\064', 6143 - 6135), nzTpIcepk0o8(chr(48) + '\157' + '\x36' + chr(0b110010), 64038 - 64030), nzTpIcepk0o8('\x30' + chr(111) + chr(54) + chr(0b1010 + 0o50), 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(52) + '\x34', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1001100 + 0o43) + '\x32' + chr(52) + chr(0b100010 + 0o21), 0o10), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\x6f' + chr(1453 - 1399) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\x6f' + chr(1364 - 1313) + chr(2474 - 2421) + '\066', 45597 - 45589), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + '\063' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + chr(0b110010) + chr(0b1001 + 0o47), 8), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b11110 + 0o121) + chr(1706 - 1656) + chr(0b110000) + chr(54), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + chr(55) + chr(49), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(49) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(9840 - 9729) + chr(49) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101011 + 0o4) + '\061' + chr(154 - 105) + chr(49), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(0b101110 + 0o7) + chr(0b10100 + 0o36), ord("\x08")), nzTpIcepk0o8('\x30' + chr(1213 - 1102) + '\063' + '\x30' + chr(106 - 57), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(0b110101) + chr(1810 - 1757), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010 + 0o1) + chr(0b11100 + 0o33) + '\062', 47818 - 47810), nzTpIcepk0o8(chr(0b110000) + chr(0b11111 + 0o120) + chr(0b110011) + chr(0b110111) + chr(1353 - 1305), 0b1000), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b1001 + 0o146) + '\x32' + chr(743 - 694) + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(55) + chr(1536 - 1485), ord("\x08")), nzTpIcepk0o8(chr(1808 - 1760) + '\157' + chr(903 - 853) + chr(0b110010) + chr(0b100101 + 0o17), 0o10), nzTpIcepk0o8(chr(1295 - 1247) + chr(0b1100110 + 0o11) + chr(1469 - 1420) + chr(0b110011) + chr(0b1111 + 0o47), 0o10), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b1000110 + 0o51) + chr(0b1100 + 0o45) + chr(454 - 401) + chr(51), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + '\x37' + '\x31', 8), nzTpIcepk0o8('\060' + chr(0b1000000 + 0o57) + '\x33' + chr(0b110100) + '\064', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1001111 + 0o40) + chr(1231 - 1181) + chr(48) + chr(0b101110 + 0o11), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1945 - 1895) + chr(48) + '\x37', 8), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(2310 - 2259) + chr(0b100000 + 0o25), 26615 - 26607), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + chr(0b10111 + 0o32) + chr(54), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(914 - 866) + chr(7931 - 7820) + '\x35' + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x08'), '\144' + chr(101) + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(290 - 189))('\165' + chr(5981 - 5865) + chr(7385 - 7283) + chr(1473 - 1428) + chr(1722 - 1666)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def NcKJ5FOb6hV2(hXMPsSrOQzbh, KuyiJVsdK9em, mxhyDqTAMpMC): zWIjrOExuyqC = [] TrIoMjwlXqvx = ftfygxgFas5X(mxhyDqTAMpMC) for (fPrVrKACaFCC, ksIOTiOuZhEv) in _kV_Bomx8PZ4(mxhyDqTAMpMC): YpYuTnSOLuvn = ksIOTiOuZhEv.inverse() MsVjO3WCqePp = [nzTpIcepk0o8(chr(48) + chr(0b1001101 + 0o42) + '\x31', ord("\x08")) - YpYuTnSOLuvn * mxhyDqTAMpMC[sChW4gUsXrIC] for sChW4gUsXrIC in tpoEqV5cEG2w(TrIoMjwlXqvx) if sChW4gUsXrIC != fPrVrKACaFCC] jEoSAWBzmZqD = nzTpIcepk0o8('\060' + chr(0b1101111) + chr(49), 8) for twRKeb6oMfIh in MsVjO3WCqePp: jEoSAWBzmZqD = jEoSAWBzmZqD * twRKeb6oMfIh HggKUjfduOjJ = -(ksIOTiOuZhEv ** (nzTpIcepk0o8(chr(0b110000) + chr(2007 - 1896) + chr(0b10011 + 0o36), 8) - hXMPsSrOQzbh.fcr) * KuyiJVsdK9em.SVKnebZUhpql(YpYuTnSOLuvn) / jEoSAWBzmZqD) roI3spqORKae(zWIjrOExuyqC, roI3spqORKae(ES5oEprVxulp(b'nL\x83\xbeg\xb0\xb4\xaf\x8b\xb9\x89\x07'), chr(0b110 + 0o136) + chr(9448 - 9347) + '\143' + chr(0b1101111) + '\144' + chr(0b1001 + 0o134))(chr(117) + chr(7021 - 6905) + '\x66' + chr(45) + '\070'))(HggKUjfduOjJ) return zWIjrOExuyqC
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/pympler/process.py
_ProcessMemoryInfoPS.update
def update(self): """ Get virtual and resident size of current process via 'ps'. This should work for MacOS X, Solaris, Linux. Returns true if it was successful. """ try: p = Popen(['/bin/ps', '-p%s' % self.pid, '-o', 'rss,vsz'], stdout=PIPE, stderr=PIPE) except OSError: # pragma: no cover pass else: s = p.communicate()[0].split() if p.returncode == 0 and len(s) >= 2: # pragma: no branch self.vsz = int(s[-1]) * 1024 self.rss = int(s[-2]) * 1024 return True return False
python
def update(self): """ Get virtual and resident size of current process via 'ps'. This should work for MacOS X, Solaris, Linux. Returns true if it was successful. """ try: p = Popen(['/bin/ps', '-p%s' % self.pid, '-o', 'rss,vsz'], stdout=PIPE, stderr=PIPE) except OSError: # pragma: no cover pass else: s = p.communicate()[0].split() if p.returncode == 0 and len(s) >= 2: # pragma: no branch self.vsz = int(s[-1]) * 1024 self.rss = int(s[-2]) * 1024 return True return False
[ "def", "update", "(", "self", ")", ":", "try", ":", "p", "=", "Popen", "(", "[", "'/bin/ps'", ",", "'-p%s'", "%", "self", ".", "pid", ",", "'-o'", ",", "'rss,vsz'", "]", ",", "stdout", "=", "PIPE", ",", "stderr", "=", "PIPE", ")", "except", "OSError", ":", "# pragma: no cover", "pass", "else", ":", "s", "=", "p", ".", "communicate", "(", ")", "[", "0", "]", ".", "split", "(", ")", "if", "p", ".", "returncode", "==", "0", "and", "len", "(", "s", ")", ">=", "2", ":", "# pragma: no branch", "self", ".", "vsz", "=", "int", "(", "s", "[", "-", "1", "]", ")", "*", "1024", "self", ".", "rss", "=", "int", "(", "s", "[", "-", "2", "]", ")", "*", "1024", "return", "True", "return", "False" ]
Get virtual and resident size of current process via 'ps'. This should work for MacOS X, Solaris, Linux. Returns true if it was successful.
[ "Get", "virtual", "and", "resident", "size", "of", "current", "process", "via", "ps", ".", "This", "should", "work", "for", "MacOS", "X", "Solaris", "Linux", ".", "Returns", "true", "if", "it", "was", "successful", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/process.py#L83-L100
train
Update the virtual and resident size of the current process via ps. Returns True if it was successful.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5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uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(911 - 863) + chr(0b10111 + 0o130) + chr(0b110001) + chr(0b110111), 2718 - 2710), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + '\x36' + '\062', 0o10), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(111) + '\x33' + '\x34' + chr(673 - 622), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + '\064' + '\x33', 8), nzTpIcepk0o8('\060' + '\157' + chr(861 - 812) + chr(1985 - 1936) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(766 - 655) + chr(54), 0b1000), nzTpIcepk0o8(chr(1533 - 1485) + chr(3822 - 3711) + chr(0b0 + 0o62) + chr(0b101110 + 0o6) + chr(0b100111 + 0o16), 5310 - 5302), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(48) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(0b110011) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(623 - 512) + chr(62 - 12) + '\067' + chr(0b11 + 0o63), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + '\x32' + chr(0b110001), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\064' + chr(0b110111), 50010 - 50002), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(53) + '\x31', 10792 - 10784), nzTpIcepk0o8(chr(1755 - 1707) + '\157' + '\x31' + '\064' + chr(0b110000), 43760 - 43752), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(111) + '\062' + chr(0b11000 + 0o31) + chr(0b110001), 64655 - 64647), nzTpIcepk0o8(chr(48) + chr(0b110100 + 0o73) + chr(0b11001 + 0o30) + '\x30' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(2285 - 2237) + '\x6f' + chr(49) + '\060' + '\x31', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001 + 0o0) + chr(1832 - 1782) + chr(0b110111), 6874 - 6866), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110100) + '\063', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(1704 - 1654) + chr(0b110100) + chr(53), 8), nzTpIcepk0o8('\060' + '\157' + chr(0b101010 + 0o11) + chr(574 - 522) + chr(1459 - 1407), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b101010 + 0o105) + '\062' + '\x35' + chr(0b101000 + 0o14), 0b1000), nzTpIcepk0o8(chr(0b111 + 0o51) + '\x6f' + '\x33' + chr(94 - 41) + chr(0b10110 + 0o33), 0o10), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b1010101 + 0o32) + chr(611 - 556), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\061' + '\x35' + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(51) + chr(737 - 689) + chr(0b11 + 0o56), 0o10), nzTpIcepk0o8(chr(964 - 916) + '\x6f' + chr(0b110011) + '\x31' + chr(0b110011), 37240 - 37232), nzTpIcepk0o8('\x30' + chr(2810 - 2699) + '\x32' + chr(0b111 + 0o55) + '\x32', 0o10), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\x6f' + '\061' + '\x36' + '\x36', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2855 - 2800) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b101110 + 0o101) + chr(0b1011 + 0o47) + '\067', 0o10), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(111) + '\x35', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(420 - 309) + '\x32' + chr(52) + '\x37', 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\x6f' + chr(576 - 522) + '\x34', 0o10), nzTpIcepk0o8('\060' + chr(11213 - 11102) + '\061' + '\062' + chr(625 - 574), 0b1000), nzTpIcepk0o8(chr(716 - 668) + '\x6f' + chr(0b11101 + 0o26) + '\x35' + chr(1551 - 1496), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b111110 + 0o61) + chr(986 - 931) + '\066', 50229 - 50221), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110110) + chr(0b1000 + 0o54), 8), nzTpIcepk0o8(chr(0b110000) + chr(3522 - 3411) + chr(50) + chr(0b101100 + 0o12) + '\x30', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1001111 + 0o40) + chr(297 - 245) + '\061', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(7927 - 7816) + chr(53) + chr(178 - 130), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'!'), chr(0b1100100) + chr(0b1100101) + '\143' + '\x6f' + '\144' + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(10098 - 9996) + chr(1353 - 1308) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def J_k2IYB1ceqn(hXMPsSrOQzbh): try: fSdw5wwLo9MO = Lp1bJm77Kt5i([roI3spqORKae(ES5oEprVxulp(b' \x90\x8a\x8ddv\xd6'), chr(0b1100100) + '\x65' + chr(99) + '\x6f' + chr(0b1100100) + '\145')('\165' + '\x74' + chr(102) + chr(45) + '\070'), roI3spqORKae(ES5oEprVxulp(b'"\x82\xc6\x90'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(3149 - 3049) + '\x65')(chr(6433 - 6316) + chr(0b1110100 + 0o0) + '\x66' + '\055' + chr(0b101111 + 0o11)) % hXMPsSrOQzbh.DvWXOSonGyAy, roI3spqORKae(ES5oEprVxulp(b'"\x9d'), '\x64' + '\145' + chr(0b1100011) + '\157' + chr(0b111110 + 0o46) + '\x65')(chr(0b1100011 + 0o22) + chr(0b111 + 0o155) + '\x66' + '\x2d' + chr(1016 - 960)), roI3spqORKae(ES5oEprVxulp(b'}\x81\x90\xcf=u\xdf'), chr(1706 - 1606) + chr(0b1100101) + chr(3093 - 2994) + chr(7675 - 7564) + chr(4492 - 4392) + chr(869 - 768))('\165' + chr(0b1011101 + 0o27) + chr(102) + chr(0b101101) + '\070')], stdout=fBz5PzJLazsE, stderr=fBz5PzJLazsE) except zsedrPqY_EmW: pass else: PmE5_h409JAA = fSdw5wwLo9MO.communicate()[nzTpIcepk0o8('\060' + chr(0b1100011 + 0o14) + chr(0b100010 + 0o16), 0b1000)].LfRrQOxuDvnC() if roI3spqORKae(fSdw5wwLo9MO, roI3spqORKae(ES5oEprVxulp(b'}\x97\x97\x969h\xc6\xe9<\xdb'), chr(0b100111 + 0o75) + '\x65' + chr(99) + chr(0b1101 + 0o142) + '\x64' + '\x65')(chr(0b1110101) + chr(116) + '\146' + chr(0b100000 + 0o15) + '\070')) == nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1434 - 1386), 8) and ftfygxgFas5X(PmE5_h409JAA) >= nzTpIcepk0o8('\060' + chr(0b11 + 0o154) + '\x32', ord("\x08")): hXMPsSrOQzbh.YKrIdh4neij2 = nzTpIcepk0o8(PmE5_h409JAA[-nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001), ord("\x08"))]) * nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + chr(0b101001 + 0o7) + '\060' + '\060', 0o10) hXMPsSrOQzbh.iHWYfAVV9NsF = nzTpIcepk0o8(PmE5_h409JAA[-nzTpIcepk0o8('\x30' + '\157' + chr(500 - 450), 8)]) * nzTpIcepk0o8(chr(48) + '\x6f' + chr(949 - 899) + '\060' + chr(48) + chr(0b11001 + 0o27), 8) return nzTpIcepk0o8('\x30' + chr(4306 - 4195) + chr(203 - 154), 8) return nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(48), 8)
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/pympler/process.py
_ProcessMemoryInfoProc.update
def update(self): """ Get virtual size of current process by reading the process' stat file. This should work for Linux. """ try: stat = open('/proc/self/stat') status = open('/proc/self/status') except IOError: # pragma: no cover return False else: stats = stat.read().split() self.vsz = int( stats[22] ) self.rss = int( stats[23] ) * self.pagesize self.pagefaults = int( stats[11] ) for entry in status.readlines(): key, value = entry.split(':') size_in_bytes = lambda x: int(x.split()[0]) * 1024 if key == 'VmData': self.data_segment = size_in_bytes(value) elif key == 'VmExe': self.code_segment = size_in_bytes(value) elif key == 'VmLib': self.shared_segment = size_in_bytes(value) elif key == 'VmStk': self.stack_segment = size_in_bytes(value) key = self.key_map.get(key) if key: self.os_specific.append((key, value.strip())) stat.close() status.close() return True
python
def update(self): """ Get virtual size of current process by reading the process' stat file. This should work for Linux. """ try: stat = open('/proc/self/stat') status = open('/proc/self/status') except IOError: # pragma: no cover return False else: stats = stat.read().split() self.vsz = int( stats[22] ) self.rss = int( stats[23] ) * self.pagesize self.pagefaults = int( stats[11] ) for entry in status.readlines(): key, value = entry.split(':') size_in_bytes = lambda x: int(x.split()[0]) * 1024 if key == 'VmData': self.data_segment = size_in_bytes(value) elif key == 'VmExe': self.code_segment = size_in_bytes(value) elif key == 'VmLib': self.shared_segment = size_in_bytes(value) elif key == 'VmStk': self.stack_segment = size_in_bytes(value) key = self.key_map.get(key) if key: self.os_specific.append((key, value.strip())) stat.close() status.close() return True
[ "def", "update", "(", "self", ")", ":", "try", ":", "stat", "=", "open", "(", "'/proc/self/stat'", ")", "status", "=", "open", "(", "'/proc/self/status'", ")", "except", "IOError", ":", "# pragma: no cover", "return", "False", "else", ":", "stats", "=", "stat", ".", "read", "(", ")", ".", "split", "(", ")", "self", ".", "vsz", "=", "int", "(", "stats", "[", "22", "]", ")", "self", ".", "rss", "=", "int", "(", "stats", "[", "23", "]", ")", "*", "self", ".", "pagesize", "self", ".", "pagefaults", "=", "int", "(", "stats", "[", "11", "]", ")", "for", "entry", "in", "status", ".", "readlines", "(", ")", ":", "key", ",", "value", "=", "entry", ".", "split", "(", "':'", ")", "size_in_bytes", "=", "lambda", "x", ":", "int", "(", "x", ".", "split", "(", ")", "[", "0", "]", ")", "*", "1024", "if", "key", "==", "'VmData'", ":", "self", ".", "data_segment", "=", "size_in_bytes", "(", "value", ")", "elif", "key", "==", "'VmExe'", ":", "self", ".", "code_segment", "=", "size_in_bytes", "(", "value", ")", "elif", "key", "==", "'VmLib'", ":", "self", ".", "shared_segment", "=", "size_in_bytes", "(", "value", ")", "elif", "key", "==", "'VmStk'", ":", "self", ".", "stack_segment", "=", "size_in_bytes", "(", "value", ")", "key", "=", "self", ".", "key_map", ".", "get", "(", "key", ")", "if", "key", ":", "self", ".", "os_specific", ".", "append", "(", "(", "key", ",", "value", ".", "strip", "(", ")", ")", ")", "stat", ".", "close", "(", ")", "status", ".", "close", "(", ")", "return", "True" ]
Get virtual size of current process by reading the process' stat file. This should work for Linux.
[ "Get", "virtual", "size", "of", "current", "process", "by", "reading", "the", "process", "stat", "file", ".", "This", "should", "work", "for", "Linux", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/process.py#L118-L152
train
Update the internal state of the object.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ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FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(169 - 121) + chr(111) + chr(0b10110 + 0o34) + chr(52), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101001 + 0o11) + chr(693 - 641) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(111) + chr(622 - 573) + '\067' + chr(0b11111 + 0o26), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(1062 - 1012) + chr(0b110 + 0o54) + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(111) + chr(1551 - 1501) + chr(325 - 277) + chr(0b10101 + 0o34), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(441 - 391) + chr(0b110110) + chr(427 - 375), 0o10), nzTpIcepk0o8(chr(1728 - 1680) + chr(0b111101 + 0o62) + chr(1918 - 1868) + chr(0b0 + 0o62) + chr(0b10101 + 0o33), 0b1000), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(111) + chr(0b11101 + 0o26) + '\065' + chr(54), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(49) + '\x37' + chr(54), 0b1000), nzTpIcepk0o8(chr(518 - 470) + chr(0b1101111) + '\x32' + chr(1985 - 1935) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1001000 + 0o47) + chr(379 - 326) + '\063', 0o10), nzTpIcepk0o8(chr(704 - 656) + '\x6f' + chr(0b101110 + 0o3) + chr(53) + '\061', 0b1000), nzTpIcepk0o8(chr(676 - 628) + chr(6876 - 6765) + chr(0b100 + 0o55) + chr(0b110110) + chr(0b110111), 62761 - 62753), nzTpIcepk0o8('\x30' + chr(0b101110 + 0o101) + '\x35' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + '\x36' + chr(2488 - 2438), 0b1000), nzTpIcepk0o8('\060' + chr(2253 - 2142) + '\x32' + chr(52) + '\066', ord("\x08")), nzTpIcepk0o8('\x30' + chr(3128 - 3017) + '\x32' + chr(0b110100) + '\062', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(2238 - 2187) + chr(93 - 41), ord("\x08")), nzTpIcepk0o8(chr(937 - 889) + chr(3463 - 3352) + chr(0b110010) + '\x36' + chr(49), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b1001 + 0o52) + '\066' + '\067', 0o10), nzTpIcepk0o8(chr(48) + chr(0b110000 + 0o77) + chr(0b110010) + chr(0b110010) + chr(0b10010 + 0o45), ord("\x08")), nzTpIcepk0o8('\x30' + chr(5581 - 5470) + chr(0b10101 + 0o35) + chr(1471 - 1423) + chr(0b110100), 17204 - 17196), nzTpIcepk0o8(chr(901 - 853) + chr(6003 - 5892) + '\062' + chr(0b101111 + 0o2) + chr(232 - 184), 34579 - 34571), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\x6f' + chr(1408 - 1357) + '\x34' + chr(0b11110 + 0o24), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + chr(0b110101) + chr(0b110011), 44666 - 44658), nzTpIcepk0o8('\060' + '\157' + '\067' + chr(0b110 + 0o61), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001 + 0o0) + chr(0b110010) + chr(0b10010 + 0o42), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(51) + '\066' + '\x33', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\064' + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(826 - 775) + chr(0b11110 + 0o30) + '\063', 8), nzTpIcepk0o8('\060' + chr(0b1010 + 0o145) + '\061' + chr(0b110011) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(757 - 709) + chr(111) + chr(0b110011) + chr(0b10011 + 0o37) + '\x32', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + chr(54) + chr(50), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + chr(521 - 469), ord("\x08")), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(3256 - 3145) + chr(805 - 754) + '\x36' + chr(0b110011), 8), nzTpIcepk0o8(chr(917 - 869) + chr(0b111000 + 0o67) + '\x31' + '\066' + '\061', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1011101 + 0o22) + chr(2372 - 2323) + '\x35' + '\062', 0o10), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(0b110010 + 0o5) + chr(155 - 104), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x37' + '\x31', ord("\x08")), nzTpIcepk0o8(chr(1044 - 996) + '\x6f' + '\x35' + '\060', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b100 + 0o54) + chr(111) + chr(53) + chr(585 - 537), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b':'), '\x64' + chr(0b1100101) + '\x63' + chr(111) + chr(1383 - 1283) + '\x65')(chr(117) + chr(7359 - 7243) + chr(102) + chr(0b100111 + 0o6) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def J_k2IYB1ceqn(hXMPsSrOQzbh): try: uHkyNaF6hl2K = DnU3Rq9N5ala(roI3spqORKae(ES5oEprVxulp(b';\xd5\x0f\xfd\xe2\x9b\xe3\x8b\x12\xf3\x04\x1a\x03I\x06'), '\144' + chr(4025 - 3924) + '\143' + '\x6f' + chr(0b1100100) + '\145')('\x75' + chr(0b1110100) + chr(7913 - 7811) + chr(45) + chr(898 - 842))) TiBiMspMPXEL = DnU3Rq9N5ala(roI3spqORKae(ES5oEprVxulp(b';\xd5\x0f\xfd\xe2\x9b\xe3\x8b\x12\xf3\x04\x1a\x03I\x06\xd3\xd1'), chr(100) + chr(0b1100101) + chr(0b100111 + 0o74) + chr(0b1100011 + 0o14) + chr(100) + chr(0b1010001 + 0o24))('\x75' + '\x74' + '\x66' + chr(0b101010 + 0o3) + '\x38')) except Awc2QmWaiVq8: return nzTpIcepk0o8('\x30' + '\157' + '\060', ord("\x08")) else: lhLZcWIiifT1 = uHkyNaF6hl2K.read().LfRrQOxuDvnC() hXMPsSrOQzbh.YKrIdh4neij2 = nzTpIcepk0o8(lhLZcWIiifT1[nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(111) + chr(50) + chr(0b110110), 0b1000)]) hXMPsSrOQzbh.iHWYfAVV9NsF = nzTpIcepk0o8(lhLZcWIiifT1[nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(0b110111), 0b1000)]) * hXMPsSrOQzbh.pagesize hXMPsSrOQzbh.eoHlRZWgugqL = nzTpIcepk0o8(lhLZcWIiifT1[nzTpIcepk0o8('\x30' + chr(5808 - 5697) + chr(49) + chr(0b100001 + 0o22), ord("\x08"))]) for eTfWnO_8KfiX in roI3spqORKae(TiBiMspMPXEL, roI3spqORKae(ES5oEprVxulp(b'@\xee\x10\xfe\xec\xe1\xfa\xa0/\xa1O0'), '\144' + chr(101) + chr(0b1100011) + chr(3426 - 3315) + chr(0b1100100) + chr(9081 - 8980))('\x75' + chr(0b111001 + 0o73) + '\x66' + chr(397 - 352) + chr(0b111000)))(): (QYodcsDtoGq7, uV9iBiw0y_Mp) = eTfWnO_8KfiX.LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b'.'), '\144' + chr(5493 - 5392) + chr(0b1101 + 0o126) + chr(10007 - 9896) + chr(100) + '\145')(chr(117) + '\164' + chr(0b100100 + 0o102) + chr(0b10100 + 0o31) + '\070')) def HH4UTxxoD64E(bI5jsQ9OkQtj): return nzTpIcepk0o8(roI3spqORKae(bI5jsQ9OkQtj, roI3spqORKae(ES5oEprVxulp(b'X\xc3/\xe0\xd0\xfb\xe8\x9b:\xe3E*'), chr(9035 - 8935) + chr(0b1100101) + chr(0b101011 + 0o70) + '\157' + '\144' + chr(0b1011101 + 0o10))(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(269 - 224) + '\070'))()[nzTpIcepk0o8(chr(48) + '\157' + chr(0b1110 + 0o42), 8)]) * nzTpIcepk0o8(chr(0b1101 + 0o43) + '\157' + chr(534 - 484) + chr(0b11001 + 0o27) + '\060' + chr(0b101001 + 0o7), ord("\x08")) if QYodcsDtoGq7 == roI3spqORKae(ES5oEprVxulp(b'B\xc89\xf3\xf5\xd5'), chr(100) + chr(0b1100101) + chr(7623 - 7524) + '\157' + chr(100) + chr(0b110111 + 0o56))(chr(117) + '\164' + '\146' + '\055' + chr(0b10 + 0o66)): hXMPsSrOQzbh.xagxhLBnvNqI = HH4UTxxoD64E(uV9iBiw0y_Mp) elif QYodcsDtoGq7 == roI3spqORKae(ES5oEprVxulp(b'B\xc88\xea\xe4'), chr(2010 - 1910) + chr(7021 - 6920) + chr(0b1100011) + chr(0b1101111) + chr(100) + '\x65')('\x75' + chr(0b1110100) + chr(0b1000001 + 0o45) + chr(0b101101) + '\x38'): hXMPsSrOQzbh.EQD8TrIlrfoj = HH4UTxxoD64E(uV9iBiw0y_Mp) elif QYodcsDtoGq7 == roI3spqORKae(ES5oEprVxulp(b'B\xc81\xfb\xe3'), chr(0b11111 + 0o105) + '\x65' + '\143' + chr(6105 - 5994) + '\x64' + chr(0b1100101 + 0o0))('\165' + chr(0b1100110 + 0o16) + chr(102) + chr(617 - 572) + chr(0b111000)): hXMPsSrOQzbh.SheBUYcE47BY = HH4UTxxoD64E(uV9iBiw0y_Mp) elif QYodcsDtoGq7 == roI3spqORKae(ES5oEprVxulp(b'B\xc8.\xe6\xea'), chr(100) + chr(0b1100101) + chr(99) + '\157' + chr(0b1100100) + chr(101))(chr(8641 - 8524) + chr(116) + chr(4644 - 4542) + chr(1226 - 1181) + chr(0b101 + 0o63)): hXMPsSrOQzbh.cMkz_E9M31aZ = HH4UTxxoD64E(uV9iBiw0y_Mp) QYodcsDtoGq7 = hXMPsSrOQzbh.key_map.GUKetu4xaGsJ(QYodcsDtoGq7) if QYodcsDtoGq7: roI3spqORKae(hXMPsSrOQzbh.os_specific, roI3spqORKae(ES5oEprVxulp(b'\\\xf1.\xa6\xf9\xd3\xd7\x81\x14\xfa~\\'), chr(0b1100100) + '\145' + '\x63' + chr(111) + chr(0b111011 + 0o51) + chr(0b101001 + 0o74))(chr(6240 - 6123) + '\164' + chr(3916 - 3814) + chr(209 - 164) + '\x38'))((QYodcsDtoGq7, roI3spqORKae(uV9iBiw0y_Mp, roI3spqORKae(ES5oEprVxulp(b'\x7f\xc14\xd6\xf3\xd7\xe7\xb4*\xd6X\\'), chr(0b1100100) + chr(101) + chr(99) + '\x6f' + '\x64' + chr(9225 - 9124))('\x75' + '\x74' + chr(565 - 463) + '\x2d' + chr(491 - 435)))())) roI3spqORKae(uHkyNaF6hl2K, roI3spqORKae(ES5oEprVxulp(b'N\xc0\x0c\xa5\xc2\xd7\xf6\xd7+\xf1\x13\x03'), chr(0b1100100) + chr(3922 - 3821) + '\143' + chr(111) + chr(3510 - 3410) + chr(101))(chr(117) + chr(116) + chr(5369 - 5267) + chr(0b100000 + 0o15) + '\070'))() roI3spqORKae(TiBiMspMPXEL, roI3spqORKae(ES5oEprVxulp(b'N\xc0\x0c\xa5\xc2\xd7\xf6\xd7+\xf1\x13\x03'), chr(0b111110 + 0o46) + '\x65' + '\x63' + chr(0b1101111) + chr(100) + chr(0b101011 + 0o72))(chr(117) + '\x74' + '\146' + chr(0b101101) + chr(0b100100 + 0o24)))() return nzTpIcepk0o8(chr(0b10 + 0o56) + chr(11739 - 11628) + '\x31', 33942 - 33934)
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py
DataView.CreateControls
def CreateControls(self): """Create our sub-controls""" wx.EVT_LIST_COL_CLICK(self, self.GetId(), self.OnReorder) wx.EVT_LIST_ITEM_SELECTED(self, self.GetId(), self.OnNodeSelected) wx.EVT_MOTION(self, self.OnMouseMove) wx.EVT_LIST_ITEM_ACTIVATED(self, self.GetId(), self.OnNodeActivated) self.CreateColumns()
python
def CreateControls(self): """Create our sub-controls""" wx.EVT_LIST_COL_CLICK(self, self.GetId(), self.OnReorder) wx.EVT_LIST_ITEM_SELECTED(self, self.GetId(), self.OnNodeSelected) wx.EVT_MOTION(self, self.OnMouseMove) wx.EVT_LIST_ITEM_ACTIVATED(self, self.GetId(), self.OnNodeActivated) self.CreateColumns()
[ "def", "CreateControls", "(", "self", ")", ":", "wx", ".", "EVT_LIST_COL_CLICK", "(", "self", ",", "self", ".", "GetId", "(", ")", ",", "self", ".", "OnReorder", ")", "wx", ".", "EVT_LIST_ITEM_SELECTED", "(", "self", ",", "self", ".", "GetId", "(", ")", ",", "self", ".", "OnNodeSelected", ")", "wx", ".", "EVT_MOTION", "(", "self", ",", "self", ".", "OnMouseMove", ")", "wx", ".", "EVT_LIST_ITEM_ACTIVATED", "(", "self", ",", "self", ".", "GetId", "(", ")", ",", "self", ".", "OnNodeActivated", ")", "self", ".", "CreateColumns", "(", ")" ]
Create our sub-controls
[ "Create", "our", "sub", "-", "controls" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py#L90-L96
train
Create our sub - controls
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,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qaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + chr(0b110011) + chr(0b100011 + 0o17), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + chr(1962 - 1909) + chr(133 - 81), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(4567 - 4456) + '\x32' + chr(50) + chr(1151 - 1102), 29394 - 29386), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + chr(0b110100) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\061' + '\066' + chr(0b110110), 49952 - 49944), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(0b1011110 + 0o21) + chr(50) + chr(52) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(1902 - 1854) + '\157' + chr(1121 - 1072) + chr(54) + chr(686 - 637), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b1 + 0o60) + chr(0b110100) + chr(50), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + chr(2433 - 2380) + '\065', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b10111 + 0o130) + chr(49) + chr(0b111 + 0o53) + chr(1212 - 1160), 0b1000), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\157' + '\063' + '\x37' + chr(0b1101 + 0o52), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(52) + chr(52), 0b1000), nzTpIcepk0o8(chr(1994 - 1946) + chr(111) + chr(49) + chr(0b110000) + chr(49), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + chr(49) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1101100 + 0o3) + '\062' + chr(51) + chr(2005 - 1955), 48631 - 48623), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1100110 + 0o11) + chr(0b110001) + chr(0b100 + 0o63) + chr(55), 33323 - 33315), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(111) + chr(0b110101) + chr(587 - 534), 62809 - 62801), nzTpIcepk0o8('\060' + chr(1203 - 1092) + '\061' + chr(0b100011 + 0o23) + chr(0b10111 + 0o40), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + chr(55) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + chr(0b110011) + '\062' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(324 - 276) + '\x6f' + chr(50) + chr(511 - 460) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\157' + chr(795 - 745) + '\061' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\157' + chr(0b1101 + 0o46) + chr(0b110000) + '\067', 0b1000), nzTpIcepk0o8('\060' + chr(6983 - 6872) + chr(0b110010) + '\x35', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + '\062' + chr(0b110010), 3135 - 3127), nzTpIcepk0o8(chr(0b110000) + chr(0b1001 + 0o146) + chr(0b110001) + chr(51) + chr(2426 - 2372), ord("\x08")), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1101111) + '\x31' + chr(667 - 619) + '\x34', 0o10), nzTpIcepk0o8('\060' + chr(0b1 + 0o156) + '\063' + '\064' + chr(0b10001 + 0o40), 50563 - 50555), nzTpIcepk0o8(chr(48) + chr(0b11100 + 0o123) + '\062' + '\066' + chr(0b11001 + 0o33), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + chr(1353 - 1299) + chr(0b110100), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b1101 + 0o51) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(358 - 247) + chr(0b1101 + 0o45) + '\063' + '\060', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + chr(0b11 + 0o60) + '\065', 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + chr(559 - 509) + chr(2428 - 2375) + '\x32', 0b1000), nzTpIcepk0o8(chr(1131 - 1083) + chr(111) + chr(0b110011) + chr(0b110101) + '\x30', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(936 - 887) + chr(49), 22577 - 22569), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\x30' + chr(7988 - 7877) + chr(0b1 + 0o62) + '\060' + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(2164 - 2053) + chr(0b110011) + chr(51), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110101) + chr(48), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b't'), chr(0b1100100) + chr(0b111111 + 0o46) + chr(0b1100011) + '\157' + '\x64' + '\145')(chr(117) + '\x74' + chr(6564 - 6462) + chr(62 - 17) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def hMjTiflw4N8C(hXMPsSrOQzbh): roI3spqORKae(FHAk5xm055cs, roI3spqORKae(ES5oEprVxulp(b'\x1f\xfa\xc59:\xe9"6\xf2\x17\xb0h\x1e\x08\xd66n<'), '\144' + chr(6399 - 6298) + '\x63' + '\x6f' + chr(0b1100100) + '\145')(chr(0b1110101) + chr(7349 - 7233) + chr(2096 - 1994) + chr(45) + chr(0b111000)))(hXMPsSrOQzbh, roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x1d\xc9\xe5/\x12'), chr(1497 - 1397) + chr(0b1010100 + 0o21) + '\x63' + '\x6f' + '\144' + '\x65')(chr(117) + chr(0b110110 + 0o76) + chr(0b1100110) + '\055' + '\070'))(), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x15\xc2\xc3\x03\x19\xd2\x15\x07\xdf'), chr(5084 - 4984) + chr(0b1010010 + 0o23) + chr(0b1111 + 0o124) + '\157' + '\144' + chr(3838 - 3737))('\165' + chr(0b1000010 + 0o62) + '\x66' + '\x2d' + '\x38'))) roI3spqORKae(FHAk5xm055cs, roI3spqORKae(ES5oEprVxulp(b'\x1f\xfa\xc59:\xe9"6\xf2\x1d\xaba\x0c\x14\xc9:a29\x83\xde\xca'), chr(6597 - 6497) + chr(0b1100101) + chr(0b1001010 + 0o31) + '\157' + '\x64' + chr(0b1100101))(chr(3727 - 3610) + '\164' + '\x66' + chr(1507 - 1462) + chr(2495 - 2439)))(hXMPsSrOQzbh, roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x1d\xc9\xe5/\x12'), chr(0b1100100) + chr(101) + chr(0b11110 + 0o105) + chr(0b1101111) + chr(2409 - 2309) + chr(8078 - 7977))('\165' + chr(0b111111 + 0o65) + chr(102) + chr(45) + chr(0b111000)))(), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x15\xc2\xdf\t\x12\xc5"\x07\xc11\x9cP$/'), chr(100) + chr(101) + chr(0b1100011) + chr(0b100001 + 0o116) + chr(0b11101 + 0o107) + '\x65')(chr(306 - 189) + chr(116) + '\x66' + '\x2d' + chr(56)))) roI3spqORKae(FHAk5xm055cs, roI3spqORKae(ES5oEprVxulp(b'\x1f\xfa\xc59;\xef%+\xe2\x1a'), chr(1731 - 1631) + chr(5073 - 4972) + '\x63' + '\157' + chr(0b110101 + 0o57) + chr(0b11001 + 0o114))(chr(1996 - 1879) + chr(0b10 + 0o162) + chr(102) + '\055' + '\x38'))(hXMPsSrOQzbh, roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x15\xc2\xdc\t\x03\xd3\x14/\xc2"\x9a'), chr(100) + '\145' + '\143' + chr(0b100111 + 0o110) + chr(0b1100100) + '\145')(chr(0b1110101) + chr(0b1001100 + 0o50) + chr(0b110101 + 0o61) + chr(0b10011 + 0o32) + chr(1651 - 1595)))) roI3spqORKae(FHAk5xm055cs, roI3spqORKae(ES5oEprVxulp(b'\x1f\xfa\xc59:\xe9"6\xf2\x1d\xaba\x0c\x14\xdb<y>,\x96\xcf\xcb\x83'), '\144' + '\x65' + '\143' + chr(0b1000111 + 0o50) + chr(2696 - 2596) + chr(101))('\x75' + '\x74' + chr(0b1100010 + 0o4) + '\x2d' + '\070'))(hXMPsSrOQzbh, roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x1d\xc9\xe5/\x12'), '\x64' + chr(101) + '\143' + chr(111) + chr(0b1100100) + '\145')(chr(0b1110101) + '\x74' + chr(2228 - 2126) + '\x2d' + chr(56)))(), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x15\xc2\xdf\t\x12\xc50\x01\xd9=\x89E5.\xfe'), chr(0b111010 + 0o52) + chr(0b100010 + 0o103) + chr(8600 - 8501) + chr(0b1101111) + '\144' + '\145')(chr(0b1110101) + chr(0b1001000 + 0o54) + chr(0b1100110) + chr(45) + chr(679 - 623)))) roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x19\xde\xf4\x07\x02\xc52\r\xc1!\x92J2'), chr(7703 - 7603) + '\145' + chr(0b1100011) + '\x6f' + '\x64' + chr(0b1100101))(chr(0b1011010 + 0o33) + chr(116) + chr(0b1100110) + '\055' + '\x38'))()
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py
DataView.CreateColumns
def CreateColumns( self ): """Create/recreate our column definitions from current self.columns""" self.SetItemCount(0) # clear any current columns... for i in range( self.GetColumnCount())[::-1]: self.DeleteColumn( i ) # now create for i, column in enumerate(self.columns): column.index = i self.InsertColumn(i, column.name) if not windows or column.targetWidth is None: self.SetColumnWidth(i, wx.LIST_AUTOSIZE) else: self.SetColumnWidth(i, column.targetWidth)
python
def CreateColumns( self ): """Create/recreate our column definitions from current self.columns""" self.SetItemCount(0) # clear any current columns... for i in range( self.GetColumnCount())[::-1]: self.DeleteColumn( i ) # now create for i, column in enumerate(self.columns): column.index = i self.InsertColumn(i, column.name) if not windows or column.targetWidth is None: self.SetColumnWidth(i, wx.LIST_AUTOSIZE) else: self.SetColumnWidth(i, column.targetWidth)
[ "def", "CreateColumns", "(", "self", ")", ":", "self", ".", "SetItemCount", "(", "0", ")", "# clear any current columns...", "for", "i", "in", "range", "(", "self", ".", "GetColumnCount", "(", ")", ")", "[", ":", ":", "-", "1", "]", ":", "self", ".", "DeleteColumn", "(", "i", ")", "# now create", "for", "i", ",", "column", "in", "enumerate", "(", "self", ".", "columns", ")", ":", "column", ".", "index", "=", "i", "self", ".", "InsertColumn", "(", "i", ",", "column", ".", "name", ")", "if", "not", "windows", "or", "column", ".", "targetWidth", "is", "None", ":", "self", ".", "SetColumnWidth", "(", "i", ",", "wx", ".", "LIST_AUTOSIZE", ")", "else", ":", "self", ".", "SetColumnWidth", "(", "i", ",", "column", ".", "targetWidth", ")" ]
Create/recreate our column definitions from current self.columns
[ "Create", "/", "recreate", "our", "column", "definitions", "from", "current", "self", ".", "columns" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py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PPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\157' + chr(2682 - 2627) + chr(1851 - 1800), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(51) + '\067', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1918 - 1868) + '\062' + '\060', 0o10), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(111) + '\x32' + chr(0b101110 + 0o11) + chr(0b110101), 38532 - 38524), nzTpIcepk0o8(chr(48) + chr(0b111 + 0o150) + chr(0b110001) + chr(52) + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b1011 + 0o47) + chr(0b101010 + 0o11) + chr(0b101010 + 0o13), 65011 - 65003), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + chr(556 - 501), ord("\x08")), nzTpIcepk0o8(chr(2152 - 2104) + chr(111) + chr(0b110010) + '\063' + chr(52), 0o10), nzTpIcepk0o8(chr(173 - 125) + chr(111) + chr(1523 - 1470) + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b100 + 0o55) + chr(0b100101 + 0o20) + '\x32', 0b1000), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1010111 + 0o30) + chr(51) + '\067' + chr(0b0 + 0o61), ord("\x08")), nzTpIcepk0o8(chr(2002 - 1954) + '\x6f' + chr(51) + '\x34' + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(55), 8), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\157' + chr(2261 - 2210) + chr(1185 - 1131) + chr(0b10010 + 0o43), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1011001 + 0o26) + chr(0b111 + 0o57) + chr(48), 0b1000), nzTpIcepk0o8('\060' + chr(3330 - 3219) + chr(0b1 + 0o61) + chr(0b110011 + 0o0), 0o10), nzTpIcepk0o8(chr(778 - 730) + chr(111) + chr(51) + '\062' + chr(53), 0b1000), nzTpIcepk0o8(chr(1960 - 1912) + chr(12229 - 12118) + chr(51) + '\066' + '\061', 0b1000), nzTpIcepk0o8(chr(48) + chr(6032 - 5921) + chr(50) + '\061', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + chr(1540 - 1487) + chr(0b101010 + 0o13), 42690 - 42682), nzTpIcepk0o8('\060' + chr(11046 - 10935) + chr(2139 - 2090) + chr(633 - 585) + chr(0b11 + 0o57), 12254 - 12246), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10011 + 0o36) + chr(49) + chr(150 - 99), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + chr(0b110111) + '\065', 0o10), nzTpIcepk0o8('\060' + chr(0b10101 + 0o132) + '\063' + '\x31', 7353 - 7345), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1164 - 1113) + chr(50) + chr(174 - 126), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + chr(0b110111), 8), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(48) + '\064', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\063' + chr(0b1111 + 0o42) + chr(0b110110), 18002 - 17994), nzTpIcepk0o8('\x30' + chr(9896 - 9785) + '\x37' + '\x32', 30485 - 30477), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + '\066' + '\061', 8), nzTpIcepk0o8(chr(912 - 864) + '\157' + chr(53) + chr(0b1011 + 0o54), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(531 - 476) + '\067', 18731 - 18723), nzTpIcepk0o8(chr(48) + chr(0b1001111 + 0o40) + '\061' + chr(0b110101) + chr(51), ord("\x08")), nzTpIcepk0o8('\060' + chr(1735 - 1624) + chr(1347 - 1298) + '\x36' + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\060' + chr(5980 - 5869) + '\x33' + chr(0b110100) + chr(190 - 137), 17346 - 17338), nzTpIcepk0o8(chr(48) + chr(10534 - 10423) + chr(49) + chr(49) + chr(48), 43850 - 43842), nzTpIcepk0o8('\x30' + chr(0b100100 + 0o113) + chr(0b110010) + chr(1823 - 1772) + chr(2426 - 2375), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b110110 + 0o71) + chr(0b1001 + 0o50) + chr(0b110000) + chr(1233 - 1183), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(0b100111 + 0o17) + chr(1783 - 1728), 63173 - 63165), nzTpIcepk0o8(chr(48) + chr(0b101110 + 0o101) + chr(1288 - 1238) + chr(0b110100) + '\x35', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + chr(0b110101) + chr(475 - 427), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x15'), chr(0b1100100) + chr(101) + '\143' + '\x6f' + chr(0b1010001 + 0o23) + chr(5427 - 5326))('\x75' + chr(116) + chr(0b1100110) + chr(0b101101) + chr(75 - 19)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def BKfPHiRSGKPw(hXMPsSrOQzbh): roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'h\xba\xe4\xf4\x14\xf8r\xdfG\x1f\x97\x93'), chr(100) + chr(8451 - 8350) + chr(99) + chr(2533 - 2422) + chr(100) + chr(101))(chr(117) + '\164' + chr(2727 - 2625) + chr(45) + '\070'))(nzTpIcepk0o8(chr(2087 - 2039) + '\x6f' + '\x30', 0b1000)) for ZlbFMSG8gCoF in bbT2xIe5pzk7(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'|\xba\xe4\xfe\x0f\xf1j\xf1F)\x96\x92q\x81'), chr(100) + chr(0b1001110 + 0o27) + chr(0b1000101 + 0o36) + '\157' + chr(0b1100100) + '\x65')(chr(10790 - 10673) + chr(10897 - 10781) + chr(0b1100110) + chr(0b111 + 0o46) + '\x38'))())[::-nzTpIcepk0o8(chr(159 - 111) + chr(9969 - 9858) + '\061', 21380 - 21372)]: roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x7f\xba\xfc\xd8\x14\xf8\\\xf3D\x1f\x94\x89'), chr(0b1001011 + 0o31) + '\145' + '\143' + chr(713 - 602) + chr(100) + chr(0b1100101))('\165' + chr(116) + '\146' + '\055' + chr(56)))(ZlbFMSG8gCoF) for (ZlbFMSG8gCoF, KBggEttLg7_8) in _kV_Bomx8PZ4(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"n\xec\xa9\xd73\xf4V\xa9\x1c'\x95\x97"), '\x64' + chr(0b110001 + 0o64) + '\x63' + chr(111) + chr(0b1100100) + chr(101))('\165' + chr(0b1001111 + 0o45) + chr(0b1100110) + chr(0b101100 + 0o1) + chr(2897 - 2841)))): KBggEttLg7_8.ZpfN5tSLaZze = ZlbFMSG8gCoF roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'r\xb1\xe3\xd8\x12\xe9\\\xf3D\x1f\x94\x89'), chr(0b110010 + 0o62) + '\145' + '\143' + chr(0b1101111) + chr(5066 - 4966) + chr(1990 - 1889))(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(0b101101 + 0o0) + '\x38'))(ZlbFMSG8gCoF, roI3spqORKae(KBggEttLg7_8, roI3spqORKae(ES5oEprVxulp(b'h\x93\xc6\xffR\xdfO\xddw\x07\xb0\x82'), chr(100) + chr(101) + '\x63' + '\157' + '\144' + '\x65')(chr(1202 - 1085) + chr(0b1100011 + 0o21) + chr(102) + '\055' + chr(0b1001 + 0o57)))) if not hVZaXHr1SthH or roI3spqORKae(KBggEttLg7_8, roI3spqORKae(ES5oEprVxulp(b'O\xbe\xe2\xda\x05\xe9H\xf5L\x1e\x91'), chr(100) + '\x65' + chr(0b1100011) + chr(0b1101111) + '\144' + chr(0b100000 + 0o105))(chr(7538 - 7421) + chr(5497 - 5381) + '\x66' + '\055' + chr(0b111000))) is None: roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'h\xba\xe4\xfe\x0f\xf1j\xf1F=\x90\x83k\x9d'), chr(0b1100100) + '\x65' + chr(0b1111 + 0o124) + '\x6f' + '\x64' + chr(0b1010010 + 0o23))(chr(117) + '\x74' + chr(6923 - 6821) + chr(45) + '\x38'))(ZlbFMSG8gCoF, roI3spqORKae(FHAk5xm055cs, roI3spqORKae(ES5oEprVxulp(b'w\x96\xc3\xe9?\xdcJ\xc8g9\xb0\xbdZ'), chr(0b1100100) + '\x65' + chr(0b1100011) + '\x6f' + chr(0b10001 + 0o123) + chr(3958 - 3857))('\x75' + '\x74' + chr(0b1100110) + chr(45) + '\x38'))) else: roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'h\xba\xe4\xfe\x0f\xf1j\xf1F=\x90\x83k\x9d'), chr(0b1000011 + 0o41) + chr(10066 - 9965) + '\x63' + chr(9498 - 9387) + chr(0b111011 + 0o51) + chr(0b1100101))(chr(1608 - 1491) + chr(0b1011101 + 0o27) + '\x66' + chr(0b101101) + '\x38'))(ZlbFMSG8gCoF, roI3spqORKae(KBggEttLg7_8, roI3spqORKae(ES5oEprVxulp(b'O\xbe\xe2\xda\x05\xe9H\xf5L\x1e\x91'), '\144' + '\145' + chr(9424 - 9325) + chr(111) + '\144' + '\x65')(chr(0b1110101) + chr(116) + chr(102) + '\x2d' + chr(0b111000))))
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py
DataView.SetColumns
def SetColumns( self, columns, sortOrder=None ): """Set columns to a set of values other than the originals and recreates column controls""" self.columns = columns self.sortOrder = [(x.defaultOrder,x) for x in self.columns if x.sortDefault] self.CreateColumns()
python
def SetColumns( self, columns, sortOrder=None ): """Set columns to a set of values other than the originals and recreates column controls""" self.columns = columns self.sortOrder = [(x.defaultOrder,x) for x in self.columns if x.sortDefault] self.CreateColumns()
[ "def", "SetColumns", "(", "self", ",", "columns", ",", "sortOrder", "=", "None", ")", ":", "self", ".", "columns", "=", "columns", "self", ".", "sortOrder", "=", "[", "(", "x", ".", "defaultOrder", ",", "x", ")", "for", "x", "in", "self", ".", "columns", "if", "x", ".", "sortDefault", "]", "self", ".", "CreateColumns", "(", ")" ]
Set columns to a set of values other than the originals and recreates column controls
[ "Set", "columns", "to", "a", "set", "of", "values", "other", "than", "the", "originals", "and", "recreates", "column", "controls" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py#L111-L115
train
Sets the columns to a set of values other than the originals and recreates column controls
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,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PuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(10895 - 10784) + chr(0b11011 + 0o30) + chr(1947 - 1899) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + chr(2430 - 2378) + chr(52), 0b1000), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(7547 - 7436) + chr(0b110011) + chr(0b100111 + 0o15) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(11947 - 11836) + chr(0b101101 + 0o10) + chr(50), 44582 - 44574), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b111110 + 0o61) + chr(0b110011) + chr(1892 - 1841) + chr(0b10 + 0o60), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10001 + 0o40) + chr(51) + chr(49), 56248 - 56240), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b11101 + 0o27) + chr(0b1011 + 0o52), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b11100 + 0o123) + '\062' + '\062' + '\x33', 55390 - 55382), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + chr(0b11110 + 0o25) + chr(2508 - 2454) + chr(0b110111), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\061' + '\x33' + chr(0b110100), 42965 - 42957), nzTpIcepk0o8('\x30' + '\157' + '\x36' + chr(1164 - 1115), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b101 + 0o152) + '\x33' + '\x34', 1614 - 1606), nzTpIcepk0o8(chr(466 - 418) + '\157' + chr(0b110011) + chr(0b10001 + 0o42) + '\067', ord("\x08")), nzTpIcepk0o8(chr(1919 - 1871) + '\157' + '\061' + chr(2134 - 2085) + '\064', 15081 - 15073), nzTpIcepk0o8('\x30' + '\157' + chr(0b111 + 0o53) + chr(910 - 861) + chr(2479 - 2428), 0o10), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\x6f' + chr(0b100 + 0o57) + chr(2313 - 2261), 8), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\x6f' + '\x31' + chr(785 - 730), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(48), 0b1000), nzTpIcepk0o8(chr(178 - 130) + chr(0b1101111) + chr(1706 - 1655) + chr(2080 - 2027) + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + chr(52) + '\x34', 0b1000), nzTpIcepk0o8('\060' + chr(9662 - 9551) + '\061', 0o10), nzTpIcepk0o8(chr(1357 - 1309) + chr(5893 - 5782) + chr(0b10 + 0o57) + chr(1068 - 1019) + chr(1889 - 1841), 36361 - 36353), nzTpIcepk0o8(chr(1853 - 1805) + chr(111) + chr(0b1010 + 0o46), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + chr(55) + chr(2169 - 2119), 0o10), nzTpIcepk0o8(chr(1628 - 1580) + chr(0b1101111) + chr(51) + '\x35' + chr(0b110110), 0b1000), nzTpIcepk0o8('\060' + chr(0b1010111 + 0o30) + '\x33' + chr(0b1110 + 0o50) + chr(0b110110), 62858 - 62850), nzTpIcepk0o8(chr(1169 - 1121) + '\157' + '\x32' + chr(53) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b11100 + 0o123) + '\061' + '\x37' + chr(49), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\x33' + chr(0b110010) + '\063', 0b1000), nzTpIcepk0o8(chr(2144 - 2096) + chr(9671 - 9560) + '\x31' + chr(54) + chr(50), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1001010 + 0o45) + chr(0b101010 + 0o11) + chr(0b110000) + chr(0b11010 + 0o27), 0b1000), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b1101111) + '\x32' + chr(0b110000) + chr(708 - 659), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + chr(0b100 + 0o57) + chr(0b110111), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(561 - 513), 8), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(1836 - 1784), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(431 - 376) + chr(0b10110 + 0o41), 5970 - 5962), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + '\x34' + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(500 - 450) + '\x34' + chr(0b10010 + 0o41), ord("\x08")), nzTpIcepk0o8(chr(0b10 + 0o56) + '\x6f' + '\x33' + chr(0b100011 + 0o24) + '\x35', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + '\061' + chr(50), 5816 - 5808)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(111) + chr(0b100001 + 0o24) + chr(0b11110 + 0o22), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xee'), '\144' + '\145' + chr(0b100110 + 0o75) + '\157' + chr(100) + chr(1252 - 1151))('\x75' + '\164' + '\146' + '\055' + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Fo4kmQwOf4CV(hXMPsSrOQzbh, U39jSiI54Mlp, Gt4qeSdgcB6E=None): hXMPsSrOQzbh.U39jSiI54Mlp = U39jSiI54Mlp hXMPsSrOQzbh.Gt4qeSdgcB6E = [(bI5jsQ9OkQtj.defaultOrder, bI5jsQ9OkQtj) for bI5jsQ9OkQtj in hXMPsSrOQzbh.U39jSiI54Mlp if bI5jsQ9OkQtj.sortDefault] roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x83\xd6\x84K\xae<f\xfc\x9b)\\r\xac'), '\144' + '\x65' + chr(0b1100011) + chr(0b110110 + 0o71) + '\144' + chr(101))(chr(4870 - 4753) + chr(8825 - 8709) + chr(9356 - 9254) + '\x2d' + chr(3071 - 3015)))()
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py
DataView.OnNodeActivated
def OnNodeActivated(self, event): """We have double-clicked for hit enter on a node refocus squaremap to this node""" try: node = self.sorted[event.GetIndex()] except IndexError, err: log.warn(_('Invalid index in node activated: %(index)s'), index=event.GetIndex()) else: wx.PostEvent( self, squaremap.SquareActivationEvent(node=node, point=None, map=None) )
python
def OnNodeActivated(self, event): """We have double-clicked for hit enter on a node refocus squaremap to this node""" try: node = self.sorted[event.GetIndex()] except IndexError, err: log.warn(_('Invalid index in node activated: %(index)s'), index=event.GetIndex()) else: wx.PostEvent( self, squaremap.SquareActivationEvent(node=node, point=None, map=None) )
[ "def", "OnNodeActivated", "(", "self", ",", "event", ")", ":", "try", ":", "node", "=", "self", ".", "sorted", "[", "event", ".", "GetIndex", "(", ")", "]", "except", "IndexError", ",", "err", ":", "log", ".", "warn", "(", "_", "(", "'Invalid index in node activated: %(index)s'", ")", ",", "index", "=", "event", ".", "GetIndex", "(", ")", ")", "else", ":", "wx", ".", "PostEvent", "(", "self", ",", "squaremap", ".", "SquareActivationEvent", "(", "node", "=", "node", ",", "point", "=", "None", ",", "map", "=", "None", ")", ")" ]
We have double-clicked for hit enter on a node refocus squaremap to this node
[ "We", "have", "double", "-", "clicked", "for", "hit", "enter", "on", "a", "node", "refocus", "squaremap", "to", "this", "node" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py#L117-L129
train
Event handler for node activated event
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRi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clC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(0b111100 + 0o63) + chr(0b10011 + 0o36) + chr(0b110000) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(637 - 589) + '\157' + '\062' + chr(2116 - 2062) + chr(2477 - 2423), 22688 - 22680), nzTpIcepk0o8(chr(0b110000) + chr(0b111101 + 0o62) + '\x31' + chr(0b110101) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1323 - 1269) + chr(566 - 511), 9464 - 9456), nzTpIcepk0o8('\060' + chr(0b1000101 + 0o52) + chr(652 - 601) + '\060' + chr(49), 0o10), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b1000000 + 0o57) + '\x33' + '\x36' + '\066', 21964 - 21956), nzTpIcepk0o8(chr(2300 - 2252) + chr(0b1001001 + 0o46) + chr(0b100010 + 0o17) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + chr(54) + chr(2479 - 2427), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(2333 - 2222) + chr(1550 - 1501) + chr(0b110010 + 0o2) + '\061', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b101111 + 0o4) + chr(2479 - 2429) + '\063', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111 + 0o0) + chr(49) + chr(0b11100 + 0o24) + '\063', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\x37' + chr(55), 0b1000), nzTpIcepk0o8(chr(1461 - 1413) + chr(0b101001 + 0o106) + '\x35' + chr(0b110111), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + chr(0b101100 + 0o13) + chr(1834 - 1783), 0b1000), nzTpIcepk0o8(chr(956 - 908) + chr(111) + chr(49) + chr(2591 - 2539) + '\060', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b100011 + 0o21) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(1866 - 1755) + chr(0b10001 + 0o41) + '\065' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\157' + '\061' + '\063' + '\063', 25306 - 25298), nzTpIcepk0o8('\060' + chr(111) + '\063' + chr(0b10010 + 0o44) + chr(0b11 + 0o63), 8), nzTpIcepk0o8('\060' + '\157' + '\067' + '\065', 40629 - 40621), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010 + 0o3) + '\061', 0o10), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(111) + '\062' + chr(50) + chr(55), 6685 - 6677), nzTpIcepk0o8(chr(1250 - 1202) + '\x6f' + '\063' + chr(0b110110) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(1517 - 1469) + chr(111) + chr(1129 - 1080) + '\x33' + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110110) + '\066', 0o10), nzTpIcepk0o8(chr(48) + chr(7732 - 7621) + chr(0b101110 + 0o4) + chr(54), 34649 - 34641), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1338 - 1287) + '\067' + chr(0b100010 + 0o24), ord("\x08")), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\157' + '\062' + chr(0b110001) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(820 - 772) + chr(7750 - 7639) + chr(0b110011) + '\x34' + '\065', ord("\x08")), nzTpIcepk0o8(chr(1658 - 1610) + chr(0b111001 + 0o66) + chr(975 - 924) + chr(0b110110) + '\x31', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32' + chr(50) + '\063', 0b1000), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(10036 - 9925) + chr(0b1110 + 0o50) + chr(597 - 543), 8), nzTpIcepk0o8(chr(48) + chr(3237 - 3126) + chr(1289 - 1239) + '\x36' + '\x36', 8), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\157' + chr(1137 - 1086) + chr(50) + chr(0b110101), 39973 - 39965), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + chr(213 - 158) + '\066', 8), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\x6f' + '\061' + chr(51) + '\x33', 8), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(3565 - 3454) + '\x31' + chr(0b110110) + chr(0b101101 + 0o3), 5407 - 5399), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + '\x31' + chr(1451 - 1401), 31818 - 31810), nzTpIcepk0o8('\x30' + chr(0b110000 + 0o77) + chr(0b11110 + 0o25) + '\x31' + chr(0b110010), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10110 + 0o37) + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'j'), chr(0b101011 + 0o71) + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(5358 - 5258) + chr(0b1100 + 0o131))('\165' + '\x74' + '\146' + chr(0b10000 + 0o35) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def p2MBUx_qZ9c0(hXMPsSrOQzbh, D4ybylS07yGH): try: E9rx2AZiWGOm = hXMPsSrOQzbh.V3OlOVg98A85[D4ybylS07yGH.GetIndex()] except ah0DLMBSEU5j as oNU3PevgmWAO: roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b"7\xfc<a\x9e\xbex'X\xb5$E"), chr(0b1100000 + 0o4) + chr(0b11100 + 0o111) + chr(3751 - 3652) + chr(0b1011100 + 0o23) + chr(0b111 + 0o135) + chr(0b10111 + 0o116))(chr(0b1000110 + 0o57) + chr(0b1110100) + chr(8619 - 8517) + chr(45) + chr(0b1110 + 0o52)))(zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b"\r\xd8\x1bV\xad\x9fmT\x08\xbd'ZW\xdb\tK\x8a5\x99YL\xb7\x95:B\x7f\x88\xef\x91\x94c\xa9\x16\x93\xfd\x975\x14/\xb2m\xc5"), chr(100) + '\145' + '\x63' + '\x6f' + chr(100) + '\145')('\165' + chr(0b1000100 + 0o60) + chr(102) + chr(1843 - 1798) + chr(2164 - 2108))), index=roI3spqORKae(D4ybylS07yGH, roI3spqORKae(ES5oEprVxulp(b'\x03\xd3\x19~\xaf\x92l\x0c'), chr(0b1100100) + chr(0b100001 + 0o104) + chr(769 - 670) + chr(0b10100 + 0o133) + chr(100) + chr(101))(chr(11344 - 11227) + chr(116) + chr(0b1000 + 0o136) + chr(304 - 259) + chr(0b110010 + 0o6)))()) else: roI3spqORKae(FHAk5xm055cs, roI3spqORKae(ES5oEprVxulp(b'\x14\xd9\x1eC\x84\x80l\x1a\x15'), chr(0b100101 + 0o77) + chr(7809 - 7708) + '\x63' + chr(111) + chr(100) + chr(101))('\x75' + chr(0b1110100) + '\146' + chr(0b101101) + chr(0b111000)))(hXMPsSrOQzbh, roI3spqORKae(DTAIGdkIQHC0, roI3spqORKae(ES5oEprVxulp(b'\x17\xc7\x18V\xb3\x93H\x17\x15\xba5^[\x92\x0fK\xef-\x93S]'), '\x64' + chr(101) + chr(0b11101 + 0o106) + '\157' + '\144' + chr(0b10100 + 0o121))(chr(0b1110101) + '\x74' + chr(102) + chr(45) + chr(56)))(node=E9rx2AZiWGOm, point=None, map=None))
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py
DataView.OnNodeSelected
def OnNodeSelected(self, event): """We have selected a node with the list control, tell the world""" try: node = self.sorted[event.GetIndex()] except IndexError, err: log.warn(_('Invalid index in node selected: %(index)s'), index=event.GetIndex()) else: if node is not self.selected_node: wx.PostEvent( self, squaremap.SquareSelectionEvent(node=node, point=None, map=None) )
python
def OnNodeSelected(self, event): """We have selected a node with the list control, tell the world""" try: node = self.sorted[event.GetIndex()] except IndexError, err: log.warn(_('Invalid index in node selected: %(index)s'), index=event.GetIndex()) else: if node is not self.selected_node: wx.PostEvent( self, squaremap.SquareSelectionEvent(node=node, point=None, map=None) )
[ "def", "OnNodeSelected", "(", "self", ",", "event", ")", ":", "try", ":", "node", "=", "self", ".", "sorted", "[", "event", ".", "GetIndex", "(", ")", "]", "except", "IndexError", ",", "err", ":", "log", ".", "warn", "(", "_", "(", "'Invalid index in node selected: %(index)s'", ")", ",", "index", "=", "event", ".", "GetIndex", "(", ")", ")", "else", ":", "if", "node", "is", "not", "self", ".", "selected_node", ":", "wx", ".", "PostEvent", "(", "self", ",", "squaremap", ".", "SquareSelectionEvent", "(", "node", "=", "node", ",", "point", "=", "None", ",", "map", "=", "None", ")", ")" ]
We have selected a node with the list control, tell the world
[ "We", "have", "selected", "a", "node", "with", "the", "list", "control", "tell", "the", "world" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py#L131-L144
train
Event handler for node selection
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,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v8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(111) + chr(0b110111) + '\062', 0o10), nzTpIcepk0o8(chr(48) + chr(4028 - 3917) + chr(0b110011) + chr(908 - 855), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b110010 + 0o75) + chr(0b1001 + 0o56) + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(10243 - 10132) + '\x35' + '\065', 6957 - 6949), nzTpIcepk0o8('\x30' + '\157' + '\062' + '\x32' + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b100111 + 0o16) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(52) + '\x35', 20815 - 20807), nzTpIcepk0o8('\x30' + chr(111) + '\061' + chr(52) + chr(54), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + '\061' + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + '\062' + '\065', 0o10), nzTpIcepk0o8('\x30' + chr(0b1011000 + 0o27) + '\x32' + chr(55) + chr(0b0 + 0o60), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + '\066' + chr(0b101101 + 0o5), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1011101 + 0o22) + chr(49) + chr(0b101011 + 0o14) + chr(0b110010), 11986 - 11978), nzTpIcepk0o8(chr(0b110000) + chr(0b1011 + 0o144) + '\x33' + chr(2717 - 2664) + '\062', 0b1000), nzTpIcepk0o8('\060' + chr(3840 - 3729) + chr(192 - 138) + '\067', 0b1000), nzTpIcepk0o8('\060' + chr(0b110110 + 0o71) + chr(517 - 466) + '\063' + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(2066 - 2018) + chr(0b1010000 + 0o37) + chr(0b101001 + 0o14) + '\065', 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + '\061' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b11 + 0o55) + '\x6f' + '\065' + chr(2318 - 2263), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b100 + 0o153) + '\061' + '\x30' + '\064', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + '\x37' + chr(0b11111 + 0o23), 35080 - 35072), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + chr(53) + chr(1736 - 1686), 32274 - 32266), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110000 + 0o1) + chr(0b100000 + 0o24) + '\x35', 8), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\157' + '\x33' + chr(1668 - 1615), 8), nzTpIcepk0o8(chr(1918 - 1870) + chr(854 - 743) + '\x31' + chr(958 - 908) + chr(2857 - 2802), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(588 - 535) + chr(55), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + chr(640 - 587) + '\x33', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1100101 + 0o12) + chr(2083 - 2034) + '\062' + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b1101 + 0o46) + '\060' + chr(55), 27129 - 27121), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1826 - 1776) + chr(48) + '\062', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(10895 - 10784) + '\x37' + '\x32', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1001011 + 0o44) + chr(783 - 733) + chr(51) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\061' + chr(411 - 358) + chr(0b111 + 0o51), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + chr(53) + chr(50), 8), nzTpIcepk0o8(chr(48) + chr(0b110 + 0o151) + '\061' + '\065', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + '\065' + chr(55), 45019 - 45011), nzTpIcepk0o8(chr(0b110000) + chr(0b11011 + 0o124) + chr(251 - 202) + chr(0b110000) + chr(696 - 647), 0o10), nzTpIcepk0o8(chr(341 - 293) + chr(0b1001001 + 0o46) + chr(49) + chr(0b110101) + chr(48), 8), nzTpIcepk0o8(chr(48) + '\157' + chr(2276 - 2227) + chr(0b10010 + 0o42) + chr(0b1001 + 0o50), 0o10), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(0b110001) + chr(0b110010), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(53) + chr(0b1 + 0o57), 3325 - 3317)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x14'), '\144' + '\x65' + chr(2542 - 2443) + chr(9819 - 9708) + chr(100) + '\x65')(chr(0b1111 + 0o146) + chr(7110 - 6994) + chr(0b11011 + 0o113) + chr(556 - 511) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def wBbIbvzu_6C4(hXMPsSrOQzbh, D4ybylS07yGH): try: E9rx2AZiWGOm = hXMPsSrOQzbh.V3OlOVg98A85[D4ybylS07yGH.GetIndex()] except ah0DLMBSEU5j as oNU3PevgmWAO: roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'IWm{\xc9f\x145t3\xdf\x08'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(0b111011 + 0o64) + chr(0b1100100) + '\145')(chr(0b1001101 + 0o50) + chr(0b1010100 + 0o40) + '\146' + '\055' + '\x38'))(zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'ssJL\xfaG\x01F$;\xdc\x17\x02\xca^\xb2\r\xe2@ \x9fJ\x16x;\x8a\x08"\xa2\xe6\x00\xbeM\xc2d\x01%\r\x19cI'), chr(0b1100100) + '\x65' + '\x63' + chr(0b110111 + 0o70) + '\144' + chr(1741 - 1640))(chr(0b111110 + 0o67) + chr(0b10100 + 0o140) + chr(102) + '\055' + chr(56))), index=roI3spqORKae(D4ybylS07yGH, roI3spqORKae(ES5oEprVxulp(b'}xHd\xf8J\x00\x1e'), chr(100) + '\x65' + chr(99) + '\157' + '\144' + '\x65')(chr(117) + chr(116) + chr(1014 - 912) + chr(0b101101) + chr(0b110011 + 0o5)))()) else: if E9rx2AZiWGOm is not roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'qxVZ\xf1\x1d7<y \xd07'), chr(100) + chr(7626 - 7525) + chr(0b111101 + 0o46) + chr(111) + '\144' + '\145')('\x75' + chr(116) + chr(8168 - 8066) + chr(0b101101) + chr(56))): roI3spqORKae(FHAk5xm055cs, roI3spqORKae(ES5oEprVxulp(b'jrOY\xd3X\x00\x089'), '\144' + '\x65' + '\143' + '\157' + '\144' + '\x65')('\x75' + chr(0b11011 + 0o131) + chr(0b1100110) + chr(636 - 591) + chr(0b111000)))(hXMPsSrOQzbh, roI3spqORKae(DTAIGdkIQHC0, roI3spqORKae(ES5oEprVxulp(b'ilIL\xe4K6\x03!0\xdb\x06\x13\x85Y\x99[\xe9A0'), '\x64' + chr(101) + chr(99) + chr(111) + chr(100) + chr(101))('\x75' + chr(10464 - 10348) + '\146' + '\x2d' + chr(0b11011 + 0o35)))(node=E9rx2AZiWGOm, point=None, map=None))
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py
DataView.SetIndicated
def SetIndicated(self, node): """Set this node to indicated status""" self.indicated_node = node self.indicated = self.NodeToIndex(node) self.Refresh(False) return self.indicated
python
def SetIndicated(self, node): """Set this node to indicated status""" self.indicated_node = node self.indicated = self.NodeToIndex(node) self.Refresh(False) return self.indicated
[ "def", "SetIndicated", "(", "self", ",", "node", ")", ":", "self", ".", "indicated_node", "=", "node", "self", ".", "indicated", "=", "self", ".", "NodeToIndex", "(", "node", ")", "self", ".", "Refresh", "(", "False", ")", "return", "self", ".", "indicated" ]
Set this node to indicated status
[ "Set", "this", "node", "to", "indicated", "status" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py#L162-L167
train
Set this node to indicated status
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,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qIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + chr(48) + chr(55), 0b1000), nzTpIcepk0o8(chr(1529 - 1481) + '\157' + chr(0b10 + 0o61) + chr(579 - 527) + '\060', 32208 - 32200), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b101101 + 0o102) + chr(1730 - 1680) + '\062' + '\060', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100100 + 0o15) + '\x35' + chr(0b110010), 1957 - 1949), nzTpIcepk0o8('\060' + '\157' + '\062' + chr(49) + chr(0b110100 + 0o3), 51405 - 51397), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b1001001 + 0o46) + chr(0b110010) + '\063' + chr(0b10000 + 0o47), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1010001 + 0o36) + chr(0b100110 + 0o13) + '\x30', 0b1000), nzTpIcepk0o8('\x30' + chr(0b111101 + 0o62) + chr(0b110010) + chr(0b110100) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b10110 + 0o32) + '\157' + chr(1847 - 1797) + '\061' + '\x33', 97 - 89), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + chr(0b10100 + 0o43) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(1699 - 1651) + chr(0b1101111) + chr(0b101 + 0o55) + '\060' + chr(48), 10533 - 10525), nzTpIcepk0o8('\x30' + chr(4714 - 4603) + chr(51) + '\x31' + chr(53), 45081 - 45073), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(1754 - 1703) + chr(0b100001 + 0o17), 0b1000), nzTpIcepk0o8('\060' + chr(0b1000000 + 0o57) + chr(0b110010) + chr(2544 - 2490) + chr(0b11101 + 0o32), 25789 - 25781), nzTpIcepk0o8('\060' + chr(111) + chr(0b1 + 0o65) + chr(0b1011 + 0o54), 30 - 22), nzTpIcepk0o8(chr(78 - 30) + chr(0b1101111) + '\061' + '\066' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(948 - 900) + chr(0b1101111) + chr(0b110010) + chr(0b110110), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10011 + 0o36) + chr(50) + '\060', 41522 - 41514), nzTpIcepk0o8('\060' + chr(7550 - 7439) + '\062' + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(1142 - 1091) + chr(52) + '\065', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + '\066' + '\067', 0o10), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\x6f' + '\x36' + chr(1447 - 1396), 0b1000), nzTpIcepk0o8(chr(1963 - 1915) + '\x6f' + '\061' + '\x36' + '\x35', 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(929 - 879) + chr(716 - 666) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(1384 - 1336) + chr(0b1000011 + 0o54) + '\x33' + chr(0b110110 + 0o0), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + '\060' + chr(0b101011 + 0o6), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + '\063' + '\061', 0b1000), nzTpIcepk0o8(chr(1009 - 961) + '\x6f' + chr(0b11110 + 0o25) + '\x33' + '\063', 48957 - 48949), nzTpIcepk0o8(chr(1908 - 1860) + '\x6f' + chr(0b10 + 0o60) + '\x30' + '\x37', 0o10), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(111) + '\x33' + '\067' + chr(50), 34551 - 34543), nzTpIcepk0o8(chr(48) + chr(2907 - 2796) + chr(0b110111) + '\x30', 32997 - 32989), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\157' + chr(2016 - 1967) + '\065' + chr(0b110010), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1000111 + 0o50) + chr(948 - 899) + '\063' + chr(0b10010 + 0o43), 0o10), nzTpIcepk0o8(chr(351 - 303) + chr(453 - 342) + chr(361 - 310) + '\064' + '\x34', 57390 - 57382), nzTpIcepk0o8(chr(0b110000) + chr(8690 - 8579) + chr(0b101100 + 0o10) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b11001 + 0o32) + chr(0b110100 + 0o0) + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + chr(0b10000 + 0o46) + chr(0b110110), 19831 - 19823), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(201 - 151) + '\067' + '\064', 51253 - 51245), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + '\064' + chr(51), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(0b110101) + chr(0b101101 + 0o3), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110101) + '\x30', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xe9'), chr(0b1100100) + '\x65' + '\x63' + chr(111) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(116) + '\146' + chr(0b101101) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def irci6lD_3Dmu(hXMPsSrOQzbh, E9rx2AZiWGOm): hXMPsSrOQzbh.co32aR9kCPAi = E9rx2AZiWGOm hXMPsSrOQzbh.qdrwu6mP4bNC = hXMPsSrOQzbh.NodeToIndex(E9rx2AZiWGOm) roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x95\x85\xf6\x18\xea\xec`'), '\x64' + chr(9493 - 9392) + chr(0b100000 + 0o103) + chr(809 - 698) + '\x64' + chr(101))('\165' + chr(11809 - 11693) + chr(0b1011000 + 0o16) + '\x2d' + chr(0b101011 + 0o15)))(nzTpIcepk0o8(chr(1891 - 1843) + chr(111) + '\060', 0o10)) return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xb6\x84\xe2\x1d\xfa\xa9e\xf7\xbf\x19\xce\x8e'), chr(0b11111 + 0o105) + chr(1909 - 1808) + chr(0b101110 + 0o65) + chr(111) + chr(0b101001 + 0o73) + '\145')(chr(117) + chr(0b1100000 + 0o24) + chr(102) + chr(0b0 + 0o55) + chr(0b111000)))
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py
DataView.SetSelected
def SetSelected(self, node): """Set our selected node""" self.selected_node = node index = self.NodeToIndex(node) if index != -1: self.Focus(index) self.Select(index, True) return index
python
def SetSelected(self, node): """Set our selected node""" self.selected_node = node index = self.NodeToIndex(node) if index != -1: self.Focus(index) self.Select(index, True) return index
[ "def", "SetSelected", "(", "self", ",", "node", ")", ":", "self", ".", "selected_node", "=", "node", "index", "=", "self", ".", "NodeToIndex", "(", "node", ")", "if", "index", "!=", "-", "1", ":", "self", ".", "Focus", "(", "index", ")", "self", ".", "Select", "(", "index", ",", "True", ")", "return", "index" ]
Set our selected node
[ "Set", "our", "selected", "node" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py#L169-L176
train
Set our selected node
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq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Qt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(0b1010110 + 0o31) + chr(53) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b101110 + 0o7) + chr(0b11010 + 0o30), 44544 - 44536), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(8767 - 8656) + '\x33' + chr(2413 - 2358) + '\062', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + '\x32' + chr(929 - 881), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(0b110011) + '\064', 699 - 691), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(111) + chr(51) + chr(690 - 636) + chr(0b100000 + 0o20), 0b1000), nzTpIcepk0o8(chr(538 - 490) + chr(0b1001101 + 0o42) + chr(0b1111 + 0o44) + '\x37' + '\x33', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + '\064' + '\067', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + chr(1599 - 1546) + chr(0b1000 + 0o53), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1001101 + 0o42) + '\x31' + chr(0b110111) + chr(0b110000 + 0o7), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(506 - 457) + '\064', 27714 - 27706), nzTpIcepk0o8(chr(48) + chr(0b100110 + 0o111) + chr(415 - 366) + '\064' + '\060', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + chr(0b110000) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(376 - 328) + '\x6f' + '\063' + chr(49) + '\064', 8), nzTpIcepk0o8(chr(1071 - 1023) + chr(11866 - 11755) + chr(0b110011) + '\066' + '\x30', 8), nzTpIcepk0o8(chr(1838 - 1790) + chr(0b1101111) + chr(0b110011) + chr(687 - 637) + chr(0b100111 + 0o20), ord("\x08")), nzTpIcepk0o8(chr(1796 - 1748) + '\x6f' + chr(211 - 162) + chr(0b110010) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(1110 - 1062) + chr(0b1101111) + '\062' + chr(1137 - 1082) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(4271 - 4160) + chr(0b101100 + 0o6) + chr(0b110111) + '\x35', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b1011 + 0o54) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x36' + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\157' + '\061' + '\061' + chr(0b10111 + 0o33), 39320 - 39312), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49), 42121 - 42113), nzTpIcepk0o8('\x30' + chr(111) + chr(1798 - 1747) + chr(49) + chr(0b100 + 0o54), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(4813 - 4702) + chr(51) + chr(54) + '\065', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(267 - 215) + chr(0b110011), 51809 - 51801), nzTpIcepk0o8('\060' + chr(4459 - 4348) + '\x32' + '\065' + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b100 + 0o55) + '\060', 0o10), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + chr(51), 0o10), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(111) + chr(51) + chr(134 - 81) + '\x34', 51260 - 51252), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\x6f' + chr(1895 - 1845) + '\x31' + chr(0b10011 + 0o36), 51964 - 51956), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\157' + chr(2588 - 2536) + '\062', 0o10), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(0b1101111) + chr(1854 - 1804) + chr(231 - 180), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + chr(2408 - 2353), 0o10), nzTpIcepk0o8('\060' + chr(0b1001011 + 0o44) + '\061' + chr(0b110010) + chr(0b101010 + 0o12), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10111 + 0o40) + chr(0b10101 + 0o41), 8), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b1101111) + chr(1496 - 1442) + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(9893 - 9782) + chr(0b10001 + 0o41) + '\067' + chr(2150 - 2097), 8), nzTpIcepk0o8(chr(2085 - 2037) + chr(111) + '\x31' + chr(0b1011 + 0o46) + chr(0b110010), 8), nzTpIcepk0o8('\060' + chr(9313 - 9202) + chr(0b11011 + 0o31), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(111) + chr(53) + '\x30', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x06'), chr(100) + chr(0b1100101) + chr(215 - 116) + chr(0b1101111) + chr(3891 - 3791) + '\145')(chr(117) + chr(13449 - 13333) + chr(0b101110 + 0o70) + chr(45) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Y5pXGw9aqCdz(hXMPsSrOQzbh, E9rx2AZiWGOm): hXMPsSrOQzbh.Kejwg3RZ4uhE = E9rx2AZiWGOm ZpfN5tSLaZze = hXMPsSrOQzbh.NodeToIndex(E9rx2AZiWGOm) if ZpfN5tSLaZze != -nzTpIcepk0o8(chr(952 - 904) + chr(10178 - 10067) + chr(0b110001), 8): roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'nE\x99\xa5\xaf'), chr(7736 - 7636) + chr(0b1100 + 0o131) + '\x63' + chr(111) + chr(7086 - 6986) + chr(101))(chr(117) + chr(116) + '\146' + '\x2d' + '\x38'))(ZpfN5tSLaZze) roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'{O\x96\xb5\xbf\x84'), chr(9250 - 9150) + chr(0b1100101) + chr(4292 - 4193) + chr(0b1000011 + 0o54) + chr(100) + '\145')('\x75' + '\x74' + '\146' + chr(1070 - 1025) + '\x38'))(ZpfN5tSLaZze, nzTpIcepk0o8(chr(831 - 783) + chr(111) + chr(49), 8)) return ZpfN5tSLaZze
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py
DataView.OnReorder
def OnReorder(self, event): """Given a request to reorder, tell us to reorder""" column = self.columns[event.GetColumn()] return self.ReorderByColumn( column )
python
def OnReorder(self, event): """Given a request to reorder, tell us to reorder""" column = self.columns[event.GetColumn()] return self.ReorderByColumn( column )
[ "def", "OnReorder", "(", "self", ",", "event", ")", ":", "column", "=", "self", ".", "columns", "[", "event", ".", "GetColumn", "(", ")", "]", "return", "self", ".", "ReorderByColumn", "(", "column", ")" ]
Given a request to reorder, tell us to reorder
[ "Given", "a", "request", "to", "reorder", "tell", "us", "to", "reorder" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py#L190-L193
train
Called when a new record is reordered
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9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739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(0b100011 + 0o114) + '\067' + '\063', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + '\062' + '\x35', 0o10), nzTpIcepk0o8(chr(934 - 886) + chr(111) + '\x32' + chr(51) + chr(0b110111), 33643 - 33635), nzTpIcepk0o8(chr(1024 - 976) + '\x6f' + '\x31' + chr(1560 - 1508) + chr(1660 - 1607), ord("\x08")), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b101110 + 0o101) + '\062' + '\062' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(1620 - 1572) + chr(120 - 9) + '\x33' + chr(0b11 + 0o63) + chr(910 - 862), 36756 - 36748), nzTpIcepk0o8(chr(48) + '\157' + chr(0b11001 + 0o35) + chr(0b101100 + 0o6), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + '\060' + '\065', 49853 - 49845), nzTpIcepk0o8(chr(48) + chr(7735 - 7624) + chr(2305 - 2251) + '\064', 11827 - 11819), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + '\066' + chr(0b110001), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x32' + chr(0b11000 + 0o30) + chr(0b110011), 34248 - 34240), nzTpIcepk0o8(chr(0b110000) + chr(0b1100011 + 0o14) + chr(0b101000 + 0o13) + '\063' + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + '\x34' + chr(0b1010 + 0o52), 24639 - 24631), nzTpIcepk0o8(chr(48) + chr(0b100001 + 0o116) + '\061' + '\x37', 0o10), nzTpIcepk0o8('\060' + chr(0b1000010 + 0o55) + chr(1421 - 1371) + chr(0b110011) + chr(1971 - 1922), 0b1000), nzTpIcepk0o8(chr(48) + chr(9139 - 9028) + chr(50) + chr(0b100111 + 0o20), ord("\x08")), nzTpIcepk0o8(chr(2227 - 2179) + chr(0b1101111) + chr(0b101 + 0o57) + chr(50), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + '\x34' + chr(53), 6576 - 6568), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + '\x30' + chr(0b101100 + 0o7), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(1134 - 1079) + '\x30', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(2583 - 2528), 8), nzTpIcepk0o8(chr(48) + chr(1602 - 1491) + chr(0b110011) + chr(51) + '\063', 0b1000), nzTpIcepk0o8(chr(1852 - 1804) + '\x6f' + '\x33' + chr(0b101 + 0o62) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\x6f' + chr(0b101100 + 0o5) + chr(0b101111 + 0o10) + chr(0b101111 + 0o1), 0o10), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(111) + '\x31' + chr(1500 - 1447) + chr(229 - 177), 0o10), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\157' + '\065' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1010101 + 0o32) + chr(51) + chr(0b11101 + 0o23) + chr(550 - 501), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + '\066' + '\x32', 0o10), nzTpIcepk0o8(chr(486 - 438) + '\157' + '\x32' + '\060' + chr(0b1000 + 0o55), 8), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(111) + chr(0b110010) + chr(52) + '\060', 24196 - 24188), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(836 - 786) + '\060', 62212 - 62204), nzTpIcepk0o8(chr(189 - 141) + chr(111) + '\062' + '\x30', 8), nzTpIcepk0o8('\x30' + chr(7607 - 7496) + chr(0b1000 + 0o51) + chr(51), 17372 - 17364), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\x6f' + '\062' + chr(666 - 618) + chr(1047 - 995), 28527 - 28519), nzTpIcepk0o8('\060' + '\157' + chr(1911 - 1860) + chr(49) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + '\x35' + chr(2091 - 2038), 25000 - 24992), nzTpIcepk0o8('\x30' + '\157' + chr(735 - 686) + '\062' + '\x36', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100 + 0o55) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(52) + chr(338 - 288), 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + '\067' + '\063', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\x6f' + '\x35' + chr(0b101101 + 0o3), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x15'), chr(4996 - 4896) + chr(5681 - 5580) + chr(6266 - 6167) + chr(6538 - 6427) + chr(0b1100011 + 0o1) + chr(7469 - 7368))('\x75' + chr(116) + '\x66' + '\x2d' + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def NKsqgUxWYjVr(hXMPsSrOQzbh, D4ybylS07yGH): KBggEttLg7_8 = hXMPsSrOQzbh.U39jSiI54Mlp[D4ybylS07yGH.GetColumn()] return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'i\xf0\xf0\x17\xf6\x95@\xc7M\xb2\xec\xb6\x91b\xf7'), chr(2730 - 2630) + '\x65' + chr(1052 - 953) + chr(0b1101111) + chr(0b1011100 + 0o10) + chr(101))('\165' + '\x74' + '\x66' + chr(752 - 707) + chr(56)))(KBggEttLg7_8)
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py
DataView.ReorderByColumn
def ReorderByColumn( self, column ): """Reorder the set of records by column""" # TODO: store current selection and re-select after sorting... single_column = self.SetNewOrder( column ) self.reorder( single_column = True ) self.Refresh()
python
def ReorderByColumn( self, column ): """Reorder the set of records by column""" # TODO: store current selection and re-select after sorting... single_column = self.SetNewOrder( column ) self.reorder( single_column = True ) self.Refresh()
[ "def", "ReorderByColumn", "(", "self", ",", "column", ")", ":", "# TODO: store current selection and re-select after sorting...", "single_column", "=", "self", ".", "SetNewOrder", "(", "column", ")", "self", ".", "reorder", "(", "single_column", "=", "True", ")", "self", ".", "Refresh", "(", ")" ]
Reorder the set of records by column
[ "Reorder", "the", "set", "of", "records", "by", "column" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py#L195-L200
train
Reorder the set of records by a column.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKpyPtQ,z18h6aCn31dg,oxjHmqoBrCH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5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + '\x6f' + chr(50) + chr(2130 - 2076) + chr(1672 - 1617), 51626 - 51618), nzTpIcepk0o8('\x30' + chr(0b100111 + 0o110) + chr(0b110001) + chr(0b101001 + 0o7) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(9169 - 9058) + chr(55) + '\x33', 0o10), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1000110 + 0o51) + chr(0b1001 + 0o55) + '\x30', 42285 - 42277), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10001 + 0o42) + '\x33' + '\064', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(55) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(1789 - 1740) + chr(48) + '\x34', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2440 - 2389) + chr(0b110001) + chr(0b0 + 0o66), 0o10), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\x6f' + '\061' + '\066' + chr(0b101000 + 0o13), 0o10), nzTpIcepk0o8('\x30' + chr(0b1001110 + 0o41) + '\061' + chr(49) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + '\064' + '\x31', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + '\060' + chr(0b100100 + 0o20), 8), nzTpIcepk0o8('\060' + chr(0b1000001 + 0o56) + chr(0b100001 + 0o20) + '\x30', 0o10), nzTpIcepk0o8(chr(48) + chr(0b111100 + 0o63) + chr(0b11001 + 0o32) + '\067' + chr(0b11101 + 0o23), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1243 - 1192) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\157' + '\x33' + chr(54) + '\x35', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50), 59782 - 59774), nzTpIcepk0o8(chr(1793 - 1745) + chr(0b100010 + 0o115) + chr(0b110010) + chr(55) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + chr(0b110010 + 0o1) + chr(997 - 946), 0b1000), nzTpIcepk0o8('\x30' + chr(11588 - 11477) + chr(49) + chr(0b110011) + chr(2314 - 2265), ord("\x08")), nzTpIcepk0o8('\x30' + chr(7917 - 7806) + '\063' + chr(48) + '\060', 0b1000), nzTpIcepk0o8(chr(1605 - 1557) + chr(0b1101111) + '\062' + chr(50) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(2306 - 2257) + chr(0b110010) + '\064', 0o10), nzTpIcepk0o8(chr(48) + chr(0b111111 + 0o60) + chr(0b110000 + 0o1), 0o10), nzTpIcepk0o8(chr(661 - 613) + '\157' + chr(0b10011 + 0o36) + '\x31' + '\060', 49489 - 49481), nzTpIcepk0o8(chr(1559 - 1511) + '\x6f' + chr(54) + '\x35', 0o10), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1101111) + chr(50) + chr(0b11000 + 0o35) + '\060', 37402 - 37394), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1001 + 0o52) + chr(0b110100) + '\065', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100000 + 0o22) + '\064' + chr(0b1100 + 0o45), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b100011 + 0o20) + chr(574 - 520) + chr(0b110011), 28033 - 28025), nzTpIcepk0o8('\x30' + chr(4146 - 4035) + chr(0b110001 + 0o2) + chr(1644 - 1593) + chr(0b100001 + 0o26), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10111 + 0o32) + '\x34' + '\x37', 1847 - 1839), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(111) + '\063' + chr(990 - 942) + chr(0b110010 + 0o4), ord("\x08")), nzTpIcepk0o8('\x30' + chr(9623 - 9512) + '\x33' + chr(49) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1660 - 1610) + '\065' + '\060', 8), nzTpIcepk0o8(chr(0b11 + 0o55) + '\157' + chr(50) + chr(0b110101) + '\064', ord("\x08")), nzTpIcepk0o8(chr(568 - 520) + chr(111) + chr(51) + chr(2100 - 2051) + '\066', 8), nzTpIcepk0o8(chr(48) + chr(2227 - 2116) + '\063' + '\x30' + chr(1891 - 1841), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1001001 + 0o46) + chr(0b110011) + '\066' + '\063', 8), nzTpIcepk0o8(chr(2104 - 2056) + '\x6f' + chr(0b110011) + chr(0b101111 + 0o3) + '\067', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(9154 - 9043) + chr(0b110101) + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x99'), chr(0b1100100) + '\x65' + chr(4348 - 4249) + '\x6f' + chr(0b1100100) + chr(101))(chr(0b1110101) + chr(0b100001 + 0o123) + '\146' + '\055' + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def djdsPjhQQHOj(hXMPsSrOQzbh, KBggEttLg7_8): OG9h66B16WsF = hXMPsSrOQzbh.SetNewOrder(KBggEttLg7_8) roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xc5%TB\xb8\x186'), '\144' + chr(8345 - 8244) + chr(0b1100011) + chr(0b101 + 0o152) + chr(0b1100100) + chr(7657 - 7556))(chr(0b1110101) + chr(0b1110100) + '\x66' + '\055' + chr(0b10101 + 0o43)))(single_column=nzTpIcepk0o8(chr(0b11001 + 0o27) + '\x6f' + '\061', 8)) roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe5%]B\xb9\x0e,'), chr(1354 - 1254) + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(3813 - 3713) + '\x65')(chr(0b1100111 + 0o16) + chr(0b11100 + 0o130) + chr(7090 - 6988) + chr(45) + chr(56)))()
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py
DataView.SetNewOrder
def SetNewOrder( self, column ): """Set new sorting order based on column, return whether a simple single-column (True) or multiple (False)""" if column.sortOn: # multiple sorts for the click... columns = [self.columnByAttribute(attr) for attr in column.sortOn] diff = [(a, b) for a, b in zip(self.sortOrder, columns) if b is not a[1]] if not diff: self.sortOrder[0] = (not self.sortOrder[0][0], column) else: self.sortOrder = [ (c.defaultOrder, c) for c in columns ] + [(a, b) for (a, b) in self.sortOrder if b not in columns] return False else: if column is self.sortOrder[0][1]: # reverse current major order self.sortOrder[0] = (not self.sortOrder[0][0], column) else: self.sortOrder = [(column.defaultOrder, column)] + [ (a, b) for (a, b) in self.sortOrder if b is not column ] return True
python
def SetNewOrder( self, column ): """Set new sorting order based on column, return whether a simple single-column (True) or multiple (False)""" if column.sortOn: # multiple sorts for the click... columns = [self.columnByAttribute(attr) for attr in column.sortOn] diff = [(a, b) for a, b in zip(self.sortOrder, columns) if b is not a[1]] if not diff: self.sortOrder[0] = (not self.sortOrder[0][0], column) else: self.sortOrder = [ (c.defaultOrder, c) for c in columns ] + [(a, b) for (a, b) in self.sortOrder if b not in columns] return False else: if column is self.sortOrder[0][1]: # reverse current major order self.sortOrder[0] = (not self.sortOrder[0][0], column) else: self.sortOrder = [(column.defaultOrder, column)] + [ (a, b) for (a, b) in self.sortOrder if b is not column ] return True
[ "def", "SetNewOrder", "(", "self", ",", "column", ")", ":", "if", "column", ".", "sortOn", ":", "# multiple sorts for the click...", "columns", "=", "[", "self", ".", "columnByAttribute", "(", "attr", ")", "for", "attr", "in", "column", ".", "sortOn", "]", "diff", "=", "[", "(", "a", ",", "b", ")", "for", "a", ",", "b", "in", "zip", "(", "self", ".", "sortOrder", ",", "columns", ")", "if", "b", "is", "not", "a", "[", "1", "]", "]", "if", "not", "diff", ":", "self", ".", "sortOrder", "[", "0", "]", "=", "(", "not", "self", ".", "sortOrder", "[", "0", "]", "[", "0", "]", ",", "column", ")", "else", ":", "self", ".", "sortOrder", "=", "[", "(", "c", ".", "defaultOrder", ",", "c", ")", "for", "c", "in", "columns", "]", "+", "[", "(", "a", ",", "b", ")", "for", "(", "a", ",", "b", ")", "in", "self", ".", "sortOrder", "if", "b", "not", "in", "columns", "]", "return", "False", "else", ":", "if", "column", "is", "self", ".", "sortOrder", "[", "0", "]", "[", "1", "]", ":", "# reverse current major order", "self", ".", "sortOrder", "[", "0", "]", "=", "(", "not", "self", ".", "sortOrder", "[", "0", "]", "[", "0", "]", ",", "column", ")", "else", ":", "self", ".", "sortOrder", "=", "[", "(", "column", ".", "defaultOrder", ",", "column", ")", "]", "+", "[", "(", "a", ",", "b", ")", "for", "(", "a", ",", "b", ")", "in", "self", ".", "sortOrder", "if", "b", "is", "not", "column", "]", "return", "True" ]
Set new sorting order based on column, return whether a simple single-column (True) or multiple (False)
[ "Set", "new", "sorting", "order", "based", "on", "column", "return", "whether", "a", "simple", "single", "-", "column", "(", "True", ")", "or", "multiple", "(", "False", ")" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py#L202-L225
train
Sets new sorting order based on column.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1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iuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(111) + chr(0b1110 + 0o45) + '\062' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1101111) + '\062' + chr(0b101 + 0o56) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b110 + 0o151) + chr(49) + chr(48) + chr(53), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + chr(54) + '\062', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + '\x32' + chr(52), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(52) + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\x32' + chr(0b1010 + 0o51) + chr(0b100111 + 0o12), 36274 - 36266), nzTpIcepk0o8(chr(520 - 472) + chr(0b1101111) + '\063' + '\067' + chr(0b10 + 0o57), 0b1000), nzTpIcepk0o8(chr(484 - 436) + chr(0b100110 + 0o111) + chr(826 - 776) + chr(973 - 921), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1001010 + 0o45) + chr(49) + '\x33' + chr(1714 - 1666), 41153 - 41145), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b1100001 + 0o16) + chr(0b110001) + chr(524 - 474) + '\x32', 0o10), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(111) + chr(0b110001) + '\063' + chr(1641 - 1590), 0o10), nzTpIcepk0o8('\x30' + chr(0b100 + 0o153) + chr(0b110001 + 0o1) + chr(492 - 444) + chr(0b10 + 0o61), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110 + 0o55) + chr(0b110001) + chr(49), 0o10), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(111) + '\x36' + '\061', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(50) + chr(51) + chr(54), 38995 - 38987), nzTpIcepk0o8('\060' + '\157' + '\x33' + '\064' + '\062', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1010011 + 0o34) + chr(0b101001 + 0o15) + chr(0b101100 + 0o4), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(54) + '\x32', 8), nzTpIcepk0o8(chr(48) + chr(0b101110 + 0o101) + chr(0b1 + 0o62) + chr(0b10110 + 0o41) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(9350 - 9239) + chr(0b110010) + '\060' + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(0b1011 + 0o51) + chr(49), 20313 - 20305), nzTpIcepk0o8(chr(1112 - 1064) + '\x6f' + chr(49) + chr(0b100 + 0o55) + '\067', 0b1000), nzTpIcepk0o8(chr(1214 - 1166) + '\157' + chr(0b100100 + 0o15) + '\060' + chr(0b110001), 64352 - 64344), nzTpIcepk0o8('\060' + chr(0b11011 + 0o124) + chr(0b110011 + 0o0) + chr(0b110011) + chr(1406 - 1355), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(0b1010 + 0o55) + chr(0b10110 + 0o33), 44951 - 44943), nzTpIcepk0o8(chr(484 - 436) + chr(0b1101111) + chr(1980 - 1930) + chr(2149 - 2097) + chr(0b1010 + 0o46), 0o10), nzTpIcepk0o8(chr(1805 - 1757) + '\157' + chr(50) + '\062' + '\063', 0b1000), nzTpIcepk0o8(chr(48) + chr(5949 - 5838) + '\x33' + chr(439 - 388) + chr(1199 - 1144), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(49) + chr(48) + '\060', ord("\x08")), nzTpIcepk0o8(chr(1924 - 1876) + '\157' + chr(54) + chr(0b11000 + 0o36), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + chr(0b110100) + '\066', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + '\x31' + chr(0b110101), 49916 - 49908), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\157' + chr(714 - 664) + chr(0b101010 + 0o14) + chr(0b110101), 26962 - 26954), nzTpIcepk0o8(chr(1535 - 1487) + chr(8857 - 8746) + '\062' + chr(48) + chr(2225 - 2176), 9412 - 9404), nzTpIcepk0o8(chr(861 - 813) + '\157' + chr(49) + chr(0b110001 + 0o6), 0b1000), nzTpIcepk0o8('\060' + chr(0b1001110 + 0o41) + chr(0b100100 + 0o15) + chr(0b110010) + chr(0b110100), 8), nzTpIcepk0o8('\060' + chr(0b101000 + 0o107) + '\x31' + chr(0b10000 + 0o46) + '\x33', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\066' + chr(53), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(1623 - 1573) + chr(0b110 + 0o56) + '\x37', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\157' + chr(0b110101) + '\x30', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xff'), chr(100) + '\145' + chr(0b100 + 0o137) + chr(0b1101111) + chr(0b110011 + 0o61) + chr(2910 - 2809))('\165' + chr(12497 - 12381) + chr(102) + chr(0b11000 + 0o25) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def lljGn60aEYWv(hXMPsSrOQzbh, KBggEttLg7_8): if roI3spqORKae(KBggEttLg7_8, roI3spqORKae(ES5oEprVxulp(b'\xa2\xf07\x06\x1b\xca'), '\x64' + chr(0b1100011 + 0o2) + chr(0b1100011) + chr(3036 - 2925) + '\144' + '\145')(chr(0b1100101 + 0o20) + '\164' + chr(0b11001 + 0o115) + chr(0b10010 + 0o33) + chr(56))): U39jSiI54Mlp = [hXMPsSrOQzbh.columnByAttribute(H7gzb3fKphmE) for H7gzb3fKphmE in KBggEttLg7_8.sortOn] H5XQ4iF_jpSm = [(AQ9ceR9AaoT1, xFDEVQn5qSdh) for (AQ9ceR9AaoT1, xFDEVQn5qSdh) in TxMFWa_Xzviv(hXMPsSrOQzbh.Gt4qeSdgcB6E, U39jSiI54Mlp) if xFDEVQn5qSdh is not AQ9ceR9AaoT1[nzTpIcepk0o8(chr(0b101000 + 0o10) + '\x6f' + chr(0b110001), ord("\x08"))]] if not H5XQ4iF_jpSm: hXMPsSrOQzbh.Gt4qeSdgcB6E[nzTpIcepk0o8(chr(48) + '\157' + '\x30', 0o10)] = (not hXMPsSrOQzbh.Gt4qeSdgcB6E[nzTpIcepk0o8('\060' + chr(4352 - 4241) + '\060', 8)][nzTpIcepk0o8(chr(48) + chr(111) + chr(48), 8)], KBggEttLg7_8) else: hXMPsSrOQzbh.Gt4qeSdgcB6E = [(teUmM7cKWZUa.defaultOrder, teUmM7cKWZUa) for teUmM7cKWZUa in U39jSiI54Mlp] + [(AQ9ceR9AaoT1, xFDEVQn5qSdh) for (AQ9ceR9AaoT1, xFDEVQn5qSdh) in hXMPsSrOQzbh.Gt4qeSdgcB6E if xFDEVQn5qSdh not in U39jSiI54Mlp] return nzTpIcepk0o8(chr(804 - 756) + chr(0b1101111) + chr(1534 - 1486), 8) else: if KBggEttLg7_8 is roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x96\xebq\x031\xf7\xfd\x9ew\x1ad\x1e'), '\144' + '\145' + chr(99) + chr(0b1101111) + chr(100) + '\x65')('\x75' + chr(0b1110100) + '\146' + chr(0b101101) + chr(0b111000)))[nzTpIcepk0o8('\x30' + '\x6f' + '\060', 8)][nzTpIcepk0o8(chr(2171 - 2123) + chr(111) + '\061', 8)]: hXMPsSrOQzbh.Gt4qeSdgcB6E[nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110000), 8)] = (not hXMPsSrOQzbh.Gt4qeSdgcB6E[nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x30', 8)][nzTpIcepk0o8(chr(0b110000) + '\157' + '\x30', 8)], KBggEttLg7_8) else: hXMPsSrOQzbh.Gt4qeSdgcB6E = [(KBggEttLg7_8.defaultOrder, KBggEttLg7_8)] + [(AQ9ceR9AaoT1, xFDEVQn5qSdh) for (AQ9ceR9AaoT1, xFDEVQn5qSdh) in hXMPsSrOQzbh.Gt4qeSdgcB6E if xFDEVQn5qSdh is not KBggEttLg7_8] return nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b100 + 0o153) + chr(0b1111 + 0o42), 8)
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py
DataView.reorder
def reorder(self, single_column=False): """Force a reorder of the displayed items""" if single_column: columns = self.sortOrder[:1] else: columns = self.sortOrder for ascending,column in columns[::-1]: # Python 2.2+ guarantees stable sort, so sort by each column in reverse # order will order by the assigned columns self.sorted.sort( key=column.get, reverse=(not ascending))
python
def reorder(self, single_column=False): """Force a reorder of the displayed items""" if single_column: columns = self.sortOrder[:1] else: columns = self.sortOrder for ascending,column in columns[::-1]: # Python 2.2+ guarantees stable sort, so sort by each column in reverse # order will order by the assigned columns self.sorted.sort( key=column.get, reverse=(not ascending))
[ "def", "reorder", "(", "self", ",", "single_column", "=", "False", ")", ":", "if", "single_column", ":", "columns", "=", "self", ".", "sortOrder", "[", ":", "1", "]", "else", ":", "columns", "=", "self", ".", "sortOrder", "for", "ascending", ",", "column", "in", "columns", "[", ":", ":", "-", "1", "]", ":", "# Python 2.2+ guarantees stable sort, so sort by each column in reverse ", "# order will order by the assigned columns ", "self", ".", "sorted", ".", "sort", "(", "key", "=", "column", ".", "get", ",", "reverse", "=", "(", "not", "ascending", ")", ")" ]
Force a reorder of the displayed items
[ "Force", "a", "reorder", "of", "the", "displayed", "items" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py#L227-L236
train
Force a reorder of the displayed items
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,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f2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1101111) + '\x33' + '\x32' + chr(0b110101 + 0o2), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1610 - 1560) + '\x36' + '\x37', 47007 - 46999), nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + chr(0b10 + 0o56), 51087 - 51079), nzTpIcepk0o8(chr(2005 - 1957) + '\157' + '\x32' + '\x35' + chr(48), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + '\064' + '\x37', 6612 - 6604), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\157' + chr(0b10001 + 0o41) + chr(0b101000 + 0o12) + chr(2078 - 2026), 0b1000), nzTpIcepk0o8(chr(2266 - 2218) + '\x6f' + '\066' + '\060', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b111111 + 0o60) + chr(50) + chr(0b110101) + chr(0b10010 + 0o41), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1111 + 0o42) + chr(0b100010 + 0o16) + chr(0b110010), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\063' + chr(0b110111) + chr(1833 - 1784), 0b1000), nzTpIcepk0o8('\x30' + chr(5544 - 5433) + chr(0b101001 + 0o11) + chr(0b101010 + 0o13) + chr(117 - 64), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + chr(0b110010) + chr(0b1 + 0o62), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1000011 + 0o54) + '\062' + chr(54) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(825 - 777) + '\157' + chr(0b110010) + '\x37' + chr(1242 - 1194), ord("\x08")), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b11111 + 0o120) + chr(0b110010) + '\x32' + '\x30', 0o10), nzTpIcepk0o8('\x30' + chr(12280 - 12169) + chr(267 - 218) + chr(2203 - 2154) + chr(0b11111 + 0o26), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(522 - 473) + chr(55) + chr(0b110110), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\x32' + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(7502 - 7391) + chr(0b110001) + chr(495 - 443) + '\061', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\x33' + '\064' + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x37' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(48) + chr(302 - 191) + chr(50) + chr(0b10001 + 0o41) + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b101100 + 0o103) + chr(1770 - 1721) + chr(55) + chr(885 - 835), ord("\x08")), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(3880 - 3769) + chr(49) + chr(0b110101) + chr(161 - 112), ord("\x08")), nzTpIcepk0o8(chr(1716 - 1668) + chr(111) + chr(49) + '\062' + chr(55), 0b1000), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(111) + chr(51) + chr(2095 - 2043) + chr(0b110101), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(50) + chr(52) + chr(1307 - 1254), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + chr(0b11101 + 0o32) + '\064', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\063' + '\064' + '\062', 8), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1101111) + chr(51) + '\066' + chr(0b101100 + 0o11), 0b1000), nzTpIcepk0o8(chr(349 - 301) + chr(8666 - 8555) + chr(50) + '\060' + chr(0b100 + 0o55), ord("\x08")), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(6350 - 6239) + chr(0b110001) + '\x32' + chr(53), 0o10), nzTpIcepk0o8(chr(48) + chr(0b110111 + 0o70) + '\062' + '\064' + chr(54), 0o10), nzTpIcepk0o8(chr(651 - 603) + '\157' + chr(312 - 263) + '\x33' + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(1077 - 1028) + '\x37' + chr(54), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b101101 + 0o5) + chr(0b110111) + '\x34', 13618 - 13610), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + '\x31' + chr(50), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1311 - 1262) + chr(53) + chr(52), 0b1000), nzTpIcepk0o8(chr(1417 - 1369) + '\157' + '\063' + chr(932 - 880) + chr(0b1 + 0o61), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + chr(50) + chr(0b110110), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b0 + 0o65) + chr(0b110000), 16586 - 16578)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf9'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(3888 - 3777) + chr(0b11 + 0o141) + chr(101))(chr(6517 - 6400) + chr(3272 - 3156) + chr(0b1000001 + 0o45) + chr(45) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def zjHG7K5M9lbA(hXMPsSrOQzbh, OG9h66B16WsF=nzTpIcepk0o8(chr(1240 - 1192) + chr(0b1010111 + 0o30) + chr(1800 - 1752), 0o10)): if OG9h66B16WsF: U39jSiI54Mlp = hXMPsSrOQzbh.Gt4qeSdgcB6E[:nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110 + 0o53), ord("\x08"))] else: U39jSiI54Mlp = hXMPsSrOQzbh.Gt4qeSdgcB6E for (aNCLcm252Wzr, KBggEttLg7_8) in U39jSiI54Mlp[::-nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061', 8)]: roI3spqORKae(hXMPsSrOQzbh.sorted, roI3spqORKae(ES5oEprVxulp(b'\xa4\xd8b\xdc'), '\144' + chr(101) + '\x63' + '\157' + '\144' + chr(0b1100101))(chr(0b1110101) + '\164' + chr(102) + chr(0b1 + 0o54) + chr(2808 - 2752)))(key=roI3spqORKae(KBggEttLg7_8, roI3spqORKae(ES5oEprVxulp(b'\x90\xe2[\xcd\x13\xe1\x04\xd3#\xbe\xde\xd9'), chr(0b1001011 + 0o31) + '\x65' + '\x63' + '\157' + chr(100) + '\145')(chr(1753 - 1636) + chr(116) + chr(7843 - 7741) + '\055' + '\x38')), reverse=not aNCLcm252Wzr)
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py
DataView.integrateRecords
def integrateRecords(self, functions): """Integrate records from the loader""" self.SetItemCount(len(functions)) self.sorted = functions[:] self.reorder() self.Refresh()
python
def integrateRecords(self, functions): """Integrate records from the loader""" self.SetItemCount(len(functions)) self.sorted = functions[:] self.reorder() self.Refresh()
[ "def", "integrateRecords", "(", "self", ",", "functions", ")", ":", "self", ".", "SetItemCount", "(", "len", "(", "functions", ")", ")", "self", ".", "sorted", "=", "functions", "[", ":", "]", "self", ".", "reorder", "(", ")", "self", ".", "Refresh", "(", ")" ]
Integrate records from the loader
[ "Integrate", "records", "from", "the", "loader" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py#L238-L243
train
Integrate records from the loader
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOd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RcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(0b110110 + 0o1) + '\066', 0o10), nzTpIcepk0o8(chr(176 - 128) + chr(111) + chr(51) + chr(0b100001 + 0o25) + chr(2066 - 2017), 16329 - 16321), nzTpIcepk0o8(chr(48) + chr(3117 - 3006) + '\x33' + chr(0b110100) + chr(55), 55523 - 55515), nzTpIcepk0o8('\x30' + '\x6f' + chr(2318 - 2269) + '\066' + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1101111) + chr(0b100111 + 0o13) + chr(0b10111 + 0o31) + '\060', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(582 - 471) + '\x31' + chr(63 - 9) + chr(0b1011 + 0o54), 0o10), nzTpIcepk0o8(chr(508 - 460) + chr(111) + '\x37' + chr(2017 - 1969), 54036 - 54028), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b101 + 0o152) + chr(0b110011) + chr(55) + chr(1956 - 1901), 0b1000), nzTpIcepk0o8(chr(673 - 625) + chr(5211 - 5100) + chr(50) + chr(0b101100 + 0o7) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b101001 + 0o10) + chr(0b11000 + 0o33) + chr(1932 - 1883), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + chr(107 - 56) + chr(51), 0o10), nzTpIcepk0o8(chr(908 - 860) + chr(111) + chr(443 - 392) + '\061' + chr(216 - 166), 49889 - 49881), nzTpIcepk0o8(chr(48) + '\157' + chr(0b101111 + 0o2) + '\x37' + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(111) + chr(0b100101 + 0o14) + chr(51) + chr(0b110111), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + chr(55) + chr(0b110111), 2142 - 2134), nzTpIcepk0o8('\x30' + chr(0b10001 + 0o136) + chr(0b1011 + 0o47) + chr(1158 - 1103) + '\x37', 8), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(111) + '\062' + chr(49) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + chr(65 - 12) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(1479 - 1431) + '\157' + chr(974 - 921) + chr(0b110010), 0o10), nzTpIcepk0o8('\060' + '\157' + '\x34' + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + chr(2723 - 2668) + chr(0b11110 + 0o22), 0o10), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(111) + chr(49) + chr(0b110100) + chr(60 - 10), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(0b110000) + '\067', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + '\x30' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1368 - 1313) + chr(53), 0b1000), nzTpIcepk0o8(chr(2009 - 1961) + chr(0b110101 + 0o72) + chr(0b110001) + chr(0b110101) + '\066', 0o10), nzTpIcepk0o8('\x30' + chr(0b10010 + 0o135) + chr(54) + chr(1454 - 1402), 10805 - 10797), nzTpIcepk0o8(chr(406 - 358) + chr(0b1101111) + chr(0b1110 + 0o45) + chr(946 - 893) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2124 - 2073) + chr(0b110100) + '\x32', 0o10), nzTpIcepk0o8(chr(184 - 136) + chr(0b1001 + 0o146) + chr(0b110001) + '\x33' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(1223 - 1175) + chr(0b1101111) + chr(0b110010) + chr(0b110000) + chr(0b10001 + 0o41), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\065' + chr(1481 - 1431), 8), nzTpIcepk0o8('\x30' + chr(0b1011101 + 0o22) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b11001 + 0o27) + '\x6f' + chr(0b1010 + 0o51) + chr(91 - 38) + chr(1540 - 1489), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(847 - 736) + chr(0b110001) + chr(0b100100 + 0o23) + chr(49), 61629 - 61621), nzTpIcepk0o8(chr(48) + chr(772 - 661) + chr(1397 - 1348) + '\060' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(48) + chr(3812 - 3701) + '\062', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1011000 + 0o27) + '\x33' + '\x31' + chr(0b1001 + 0o50), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b11 + 0o60) + chr(1593 - 1539) + chr(0b101000 + 0o16), 0b1000), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(111) + chr(0b110010) + chr(1485 - 1431) + '\064', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(111) + '\065' + '\x30', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd0'), '\x64' + '\x65' + chr(2549 - 2450) + chr(0b1101111) + chr(0b1100100) + chr(9882 - 9781))(chr(117) + chr(4331 - 4215) + chr(0b101111 + 0o67) + '\055' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def F_EiUpSn8oyZ(hXMPsSrOQzbh, i1unZXJcfKL6): roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xad\x94\x93=\xf4\x12U\xbc\xf5,\xf5\xbe'), chr(0b110110 + 0o56) + '\145' + '\143' + chr(111) + chr(0b1010000 + 0o24) + chr(0b1100101))(chr(0b100101 + 0o120) + chr(0b1110100) + chr(1728 - 1626) + chr(0b10101 + 0o30) + chr(0b111000)))(ftfygxgFas5X(i1unZXJcfKL6)) hXMPsSrOQzbh.V3OlOVg98A85 = i1unZXJcfKL6[:] roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x8c\x94\x88\x06\xe4\x12J'), chr(7276 - 7176) + chr(0b1100101) + '\143' + '\157' + '\x64' + chr(6395 - 6294))(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(0b101101) + chr(56)))() roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xac\x94\x81\x06\xe5\x04P'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(0b11010 + 0o112) + chr(101))(chr(0b1000001 + 0o64) + '\164' + chr(4371 - 4269) + '\x2d' + '\070'))()
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py
DataView.OnGetItemAttr
def OnGetItemAttr(self, item): """Retrieve ListItemAttr for the given item (index)""" if self.indicated > -1 and item == self.indicated: return self.indicated_attribute return None
python
def OnGetItemAttr(self, item): """Retrieve ListItemAttr for the given item (index)""" if self.indicated > -1 and item == self.indicated: return self.indicated_attribute return None
[ "def", "OnGetItemAttr", "(", "self", ",", "item", ")", ":", "if", "self", ".", "indicated", ">", "-", "1", "and", "item", "==", "self", ".", "indicated", ":", "return", "self", ".", "indicated_attribute", "return", "None" ]
Retrieve ListItemAttr for the given item (index)
[ "Retrieve", "ListItemAttr", "for", "the", "given", "item", "(", "index", ")" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity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iUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + '\x6f' + '\061' + '\x32' + chr(720 - 670), 52239 - 52231), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11100 + 0o26) + chr(251 - 197) + '\067', ord("\x08")), nzTpIcepk0o8(chr(1018 - 970) + chr(856 - 745) + chr(601 - 551) + chr(53) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + '\065' + chr(0b110001), 18888 - 18880), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50), 48465 - 48457), nzTpIcepk0o8('\060' + '\157' + '\x31' + '\063' + chr(0b100001 + 0o26), 0o10), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(915 - 804) + chr(0b11101 + 0o26) + '\064' + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + chr(52) + '\062', 14558 - 14550), nzTpIcepk0o8(chr(2204 - 2156) + chr(111) + chr(0b110011) + chr(746 - 695) + chr(1643 - 1588), 53888 - 53880), nzTpIcepk0o8(chr(174 - 126) + chr(1395 - 1284) + chr(0b110101) + chr(0b110011), 2168 - 2160), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(54) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(2297 - 2249) + chr(111) + '\x33' + chr(0b100110 + 0o15) + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + chr(0b11010 + 0o30) + chr(49), ord("\x08")), nzTpIcepk0o8('\x30' + chr(6364 - 6253) + chr(553 - 503) + chr(48) + chr(530 - 481), 0o10), nzTpIcepk0o8(chr(740 - 692) + chr(0b1101111) + '\x31' + chr(0b110010) + chr(48), 15373 - 15365), nzTpIcepk0o8(chr(0b110000) + chr(11920 - 11809) + chr(234 - 183) + chr(0b110100) + chr(2212 - 2158), 8), nzTpIcepk0o8(chr(48) + chr(6128 - 6017) + chr(0b10101 + 0o35) + '\064' + '\064', 34427 - 34419), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\157' + '\x33' + '\x37' + '\x36', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1000010 + 0o55) + chr(112 - 62) + chr(49) + '\061', 0b1000), nzTpIcepk0o8(chr(1340 - 1292) + chr(0b1101111) + chr(0b1011 + 0o50) + chr(51) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + chr(54) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(111) + chr(0b110010) + chr(0b110101) + chr(0b1100 + 0o51), 8), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b1101111) + chr(0b101001 + 0o11) + chr(0b101110 + 0o7) + chr(0b11011 + 0o33), 51460 - 51452), nzTpIcepk0o8(chr(2243 - 2195) + chr(0b10001 + 0o136) + chr(1551 - 1501) + chr(0b110100) + chr(0b110010), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + chr(1759 - 1711), ord("\x08")), nzTpIcepk0o8(chr(1921 - 1873) + chr(111) + chr(0b110010) + '\x31' + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(111) + chr(0b110010) + chr(0b11011 + 0o31), 114 - 106), nzTpIcepk0o8(chr(48) + chr(8985 - 8874) + '\063' + chr(148 - 97) + chr(0b100000 + 0o21), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(0b11101 + 0o24) + chr(0b100010 + 0o20), 0b1000), nzTpIcepk0o8(chr(1123 - 1075) + chr(5069 - 4958) + chr(0b110010) + '\x36' + chr(50), 0o10), nzTpIcepk0o8(chr(1269 - 1221) + '\x6f' + '\x32' + chr(0b10111 + 0o40) + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\061' + '\x31', ord("\x08")), nzTpIcepk0o8(chr(1598 - 1550) + chr(0b1101111) + chr(51) + chr(0b110111) + chr(55), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(2271 - 2222) + chr(0b111 + 0o55) + '\063', 45910 - 45902), nzTpIcepk0o8(chr(867 - 819) + chr(0b1100001 + 0o16) + chr(0b110001 + 0o3) + '\x32', 0b1000), nzTpIcepk0o8('\060' + chr(11793 - 11682) + chr(1230 - 1178) + chr(0b100 + 0o62), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(1277 - 1228) + chr(53) + chr(2072 - 2017), ord("\x08")), nzTpIcepk0o8(chr(551 - 503) + chr(0b1101111) + chr(0b101100 + 0o6) + chr(0b100001 + 0o23) + chr(0b10110 + 0o41), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(2196 - 2146) + chr(51), ord("\x08")), nzTpIcepk0o8('\060' + chr(11700 - 11589) + '\x31' + '\x33' + chr(0b10000 + 0o41), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\x6f' + chr(53) + chr(0b10110 + 0o32), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'|'), chr(7058 - 6958) + '\145' + chr(9270 - 9171) + '\157' + '\144' + chr(0b1000010 + 0o43))(chr(3492 - 3375) + '\164' + chr(0b10110 + 0o120) + chr(45) + chr(0b111000 + 0o0)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def dP9RoWTqoVS4(hXMPsSrOQzbh, IZ1I2J8X1CQz): if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'#\xd3\xdf\xdewi\x8b\xf2\xebI\xba\x99'), chr(100) + chr(2446 - 2345) + '\143' + chr(4533 - 4422) + '\x64' + chr(101))(chr(117) + chr(116) + '\x66' + chr(0b100100 + 0o11) + chr(0b111000))) > -nzTpIcepk0o8(chr(48) + chr(111) + chr(49), 0b1000) and IZ1I2J8X1CQz == roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'#\xd3\xdf\xdewi\x8b\xf2\xebI\xba\x99'), chr(0b1011000 + 0o14) + chr(101) + chr(99) + chr(146 - 35) + chr(7617 - 7517) + chr(4777 - 4676))(chr(117) + chr(116) + '\x66' + chr(0b101101) + chr(0b111000))): return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b';\xd9\xc9\xc0a>\x92\xc7\xbbt\x95\xae%\xf39\x84\xd1\x8a\xec'), '\x64' + '\145' + chr(5249 - 5150) + chr(111) + chr(0b1100100) + chr(0b110110 + 0o57))(chr(9217 - 9100) + chr(12539 - 12423) + chr(0b100101 + 0o101) + chr(0b101101) + '\x38')) return None
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py
DataView.OnGetItemText
def OnGetItemText(self, item, col): """Retrieve text for the item and column respectively""" # TODO: need to format for rjust and the like... try: column = self.columns[col] value = column.get(self.sorted[item]) except IndexError, err: return None else: if value is None: return u'' if column.percentPossible and self.percentageView and self.total: value = value / float(self.total) * 100.00 if column.format: try: return column.format % (value,) except Exception, err: log.warn('Column %s could not format %r value: %r', column.name, type(value), value ) value = column.get(self.sorted[item] ) if isinstance(value,(unicode,str)): return value return unicode(value) else: if isinstance(value,(unicode,str)): return value return unicode(value)
python
def OnGetItemText(self, item, col): """Retrieve text for the item and column respectively""" # TODO: need to format for rjust and the like... try: column = self.columns[col] value = column.get(self.sorted[item]) except IndexError, err: return None else: if value is None: return u'' if column.percentPossible and self.percentageView and self.total: value = value / float(self.total) * 100.00 if column.format: try: return column.format % (value,) except Exception, err: log.warn('Column %s could not format %r value: %r', column.name, type(value), value ) value = column.get(self.sorted[item] ) if isinstance(value,(unicode,str)): return value return unicode(value) else: if isinstance(value,(unicode,str)): return value return unicode(value)
[ "def", "OnGetItemText", "(", "self", ",", "item", ",", "col", ")", ":", "# TODO: need to format for rjust and the like...", "try", ":", "column", "=", "self", ".", "columns", "[", "col", "]", "value", "=", "column", ".", "get", "(", "self", ".", "sorted", "[", "item", "]", ")", "except", "IndexError", ",", "err", ":", "return", "None", "else", ":", "if", "value", "is", "None", ":", "return", "u''", "if", "column", ".", "percentPossible", "and", "self", ".", "percentageView", "and", "self", ".", "total", ":", "value", "=", "value", "/", "float", "(", "self", ".", "total", ")", "*", "100.00", "if", "column", ".", "format", ":", "try", ":", "return", "column", ".", "format", "%", "(", "value", ",", ")", "except", "Exception", ",", "err", ":", "log", ".", "warn", "(", "'Column %s could not format %r value: %r'", ",", "column", ".", "name", ",", "type", "(", "value", ")", ",", "value", ")", "value", "=", "column", ".", "get", "(", "self", ".", "sorted", "[", "item", "]", ")", "if", "isinstance", "(", "value", ",", "(", "unicode", ",", "str", ")", ")", ":", "return", "value", "return", "unicode", "(", "value", ")", "else", ":", "if", "isinstance", "(", "value", ",", "(", "unicode", ",", "str", ")", ")", ":", "return", "value", "return", "unicode", "(", "value", ")" ]
Retrieve text for the item and column respectively
[ "Retrieve", "text", "for", "the", "item", "and", "column", "respectively" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/runsnakerun/listviews.py#L254-L281
train
Retrieve text for the item and column respectively
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUx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C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + chr(53) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(1679 - 1631) + chr(5374 - 5263) + '\x32' + chr(1865 - 1811) + '\x31', 0b1000), nzTpIcepk0o8('\x30' + chr(0b10010 + 0o135) + chr(0b110011) + chr(50) + chr(54), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\062' + '\x33' + '\063', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b10011 + 0o40) + '\062' + chr(2346 - 2293), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(49) + chr(49) + '\064', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1001111 + 0o40) + chr(0b11 + 0o61) + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + '\062' + chr(48), 51696 - 51688), nzTpIcepk0o8(chr(508 - 460) + chr(7369 - 7258) + chr(0b110010) + chr(260 - 208) + '\x34', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + '\x31' + chr(0b100100 + 0o15), 28835 - 28827), nzTpIcepk0o8('\x30' + chr(111) + chr(2170 - 2119) + '\x32' + chr(0b1 + 0o57), 8), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1101111) + chr(1170 - 1120) + chr(48) + chr(48), 0b1000), nzTpIcepk0o8('\x30' + chr(2590 - 2479) + chr(0b110010) + '\x31' + '\x35', 65166 - 65158), nzTpIcepk0o8('\060' + chr(6432 - 6321) + '\x33' + chr(53), 0o10), nzTpIcepk0o8('\060' + chr(0b100 + 0o153) + chr(0b110010) + chr(0b100 + 0o57) + chr(0b110010 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\x6f' + chr(50) + '\x30' + chr(0b101110 + 0o4), 16765 - 16757), nzTpIcepk0o8(chr(107 - 59) + chr(5803 - 5692) + chr(0b110001) + chr(0b1101 + 0o52) + chr(0b10 + 0o61), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(0b11000 + 0o34) + chr(2136 - 2086), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(2109 - 2058) + chr(0b110011) + chr(0b110101), 26815 - 26807), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + '\060' + '\x31', 44806 - 44798), nzTpIcepk0o8(chr(0b110000) + chr(0b1101100 + 0o3) + chr(0b11111 + 0o23) + chr(50) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(461 - 413) + chr(1271 - 1160) + chr(0b110010) + '\067' + chr(54), 0o10), nzTpIcepk0o8(chr(1161 - 1113) + chr(111) + chr(0b110001) + chr(49), 15191 - 15183), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b10100 + 0o35) + chr(0b10100 + 0o35) + chr(0b110010 + 0o0), 58340 - 58332), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + chr(164 - 111) + '\x33', 56843 - 56835), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\x6f' + chr(0b110010) + '\x33' + chr(0b110000), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + '\061' + chr(55), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b10010 + 0o41) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(2340 - 2290) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(11216 - 11105) + chr(0b110001 + 0o1) + chr(0b11100 + 0o31) + chr(0b10000 + 0o43), 8), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(111) + '\062' + chr(0b110111) + chr(51), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(54) + '\x35', 0o10), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b1100110 + 0o11) + chr(49) + chr(54), 0o10), nzTpIcepk0o8(chr(436 - 388) + chr(111) + chr(0b110011) + chr(0b100011 + 0o17) + chr(52), 33613 - 33605), nzTpIcepk0o8(chr(549 - 501) + '\x6f' + chr(1761 - 1712) + chr(1601 - 1552) + chr(52), 8), nzTpIcepk0o8('\060' + chr(111) + chr(0b10110 + 0o41) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(50) + chr(55), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b1000 + 0o53) + chr(0b110001) + chr(0b110000 + 0o7), 0o10), nzTpIcepk0o8('\060' + chr(7225 - 7114) + '\062' + '\x31' + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\157' + chr(552 - 501) + '\x37' + '\x37', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b101100 + 0o4) + '\x6f' + chr(53) + chr(48), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xc4'), '\x64' + '\x65' + chr(0b1100011) + '\x6f' + '\144' + '\145')(chr(117) + '\164' + chr(102) + chr(0b101101) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def p7cO7RRw45LJ(hXMPsSrOQzbh, IZ1I2J8X1CQz, hRTUxJgvuslu): try: KBggEttLg7_8 = hXMPsSrOQzbh.U39jSiI54Mlp[hRTUxJgvuslu] uV9iBiw0y_Mp = KBggEttLg7_8.GUKetu4xaGsJ(hXMPsSrOQzbh.V3OlOVg98A85[IZ1I2J8X1CQz]) except ah0DLMBSEU5j as oNU3PevgmWAO: return None else: if uV9iBiw0y_Mp is None: return roI3spqORKae(ES5oEprVxulp(b''), chr(2955 - 2855) + chr(0b111101 + 0o50) + '\143' + chr(0b10111 + 0o130) + chr(4179 - 4079) + chr(0b1100101))('\x75' + chr(0b11110 + 0o126) + '\x66' + chr(1567 - 1522) + chr(2839 - 2783)) if roI3spqORKae(KBggEttLg7_8, roI3spqORKae(ES5oEprVxulp(b'\x9a\xd4\xa4\xf8\xb0"V\x80\xcb\xba\xa3\xe9\xefq\xf8'), '\x64' + '\x65' + chr(99) + chr(0b1101111) + chr(100) + '\145')(chr(9453 - 9336) + '\x74' + chr(102) + chr(1166 - 1121) + chr(0b11011 + 0o35))) and roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa9\xe5\xb2\xe1\x98\x01m\xb1\xc2\xf0\x95\xd6'), chr(0b1100100) + '\145' + '\143' + chr(0b100010 + 0o115) + chr(3628 - 3528) + chr(0b1100101))(chr(5356 - 5239) + chr(116) + chr(0b1100110) + '\x2d' + chr(0b111000))) and roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x9d\x81\x9d\xf8\xb1\x19Z\x9a\xe6\xaf\x88\xb0'), chr(5734 - 5634) + chr(0b1100101) + '\143' + chr(111) + chr(0b1001110 + 0o26) + '\x65')(chr(0b1001011 + 0o52) + '\x74' + chr(0b100011 + 0o103) + chr(0b101101) + '\x38')): uV9iBiw0y_Mp = uV9iBiw0y_Mp / jLW6pRf2DSRk(hXMPsSrOQzbh.w0KcdUxJBfX0) * 100.0 if roI3spqORKae(KBggEttLg7_8, roI3spqORKae(ES5oEprVxulp(b'\x9b\x82\xe5\xd0\x92\x7fD\xbf\xf5\x96\x93\xca'), chr(4715 - 4615) + chr(8715 - 8614) + chr(2514 - 2415) + chr(111) + '\144' + chr(101))('\x75' + chr(0b100010 + 0o122) + chr(1091 - 989) + chr(1105 - 1060) + chr(0b111000))): try: return roI3spqORKae(KBggEttLg7_8, roI3spqORKae(ES5oEprVxulp(b'\x9b\x82\xe5\xd0\x92\x7fD\xbf\xf5\x96\x93\xca'), '\144' + chr(0b1011111 + 0o6) + '\x63' + chr(2168 - 2057) + chr(100) + '\x65')(chr(0b1110101) + chr(6500 - 6384) + chr(7136 - 7034) + chr(0b11101 + 0o20) + '\070')) % (uV9iBiw0y_Mp,) except zfo2Sgkz3IVJ as oNU3PevgmWAO: roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'\x99\xfb\x87\xcd\x8a\x04S\x83\x9d\xaf\xb7\xfa'), chr(100) + chr(1163 - 1062) + chr(566 - 467) + chr(8083 - 7972) + chr(0b101010 + 0o72) + chr(101))(chr(117) + '\x74' + '\x66' + '\x2d' + chr(2790 - 2734)))(roI3spqORKae(ES5oEprVxulp(b'\xa9\xde\xba\xee\xb8"\x02\xf5\xd7\xe9\xb3\xef\xf8q\xf9\xa2\x15\r\xa9\xe1\xf4\xd1{\'\xca\xeco9d\x8b\xcd\x94b\xa1)\x01\xb7\xea\xfa'), chr(370 - 270) + chr(0b1000111 + 0o36) + chr(0b1100011) + chr(111) + chr(0b10000 + 0o124) + '\145')(chr(0b1110001 + 0o4) + '\x74' + chr(7424 - 7322) + chr(0b101101) + chr(56)), roI3spqORKae(KBggEttLg7_8, roI3spqORKae(ES5oEprVxulp(b'\xb9\xfd\x80\xd9\xe7\x0er\x91\xfb\xa4\x99\xe5'), chr(0b1100100) + chr(101) + '\143' + chr(7146 - 7035) + chr(0b1100100) + '\145')(chr(0b1110101) + chr(116) + chr(102) + chr(45) + '\070')), MJ07XsN5uFgW(uV9iBiw0y_Mp), uV9iBiw0y_Mp) uV9iBiw0y_Mp = KBggEttLg7_8.GUKetu4xaGsJ(hXMPsSrOQzbh.V3OlOVg98A85[IZ1I2J8X1CQz]) if suIjIS24Zkqw(uV9iBiw0y_Mp, (Q_7vuEo5dYOf, N9zlRy29S1SS)): return uV9iBiw0y_Mp return Q_7vuEo5dYOf(uV9iBiw0y_Mp) else: if suIjIS24Zkqw(uV9iBiw0y_Mp, (Q_7vuEo5dYOf, N9zlRy29S1SS)): return uV9iBiw0y_Mp return Q_7vuEo5dYOf(uV9iBiw0y_Mp)
lrq3000/pyFileFixity
pyFileFixity/lib/brownanrs/imageencode.py
encode
def encode(input, output_filename): """Encodes the input data with reed-solomon error correction in 223 byte blocks, and outputs each block along with 32 parity bytes to a new file by the given filename. input is a file-like object The outputted image will be in png format, and will be 255 by x pixels with one color channel. X is the number of 255 byte blocks from the input. Each block of data will be one row, therefore, the data can be recovered if no more than 16 pixels per row are altered. """ coder = rs.RSCoder(255,223) output = [] while True: block = input.read(223) if not block: break code = coder.encode_fast(block) output.append(code) sys.stderr.write(".") sys.stderr.write("\n") out = Image.new("L", (rowstride,len(output))) out.putdata("".join(output)) out.save(output_filename)
python
def encode(input, output_filename): """Encodes the input data with reed-solomon error correction in 223 byte blocks, and outputs each block along with 32 parity bytes to a new file by the given filename. input is a file-like object The outputted image will be in png format, and will be 255 by x pixels with one color channel. X is the number of 255 byte blocks from the input. Each block of data will be one row, therefore, the data can be recovered if no more than 16 pixels per row are altered. """ coder = rs.RSCoder(255,223) output = [] while True: block = input.read(223) if not block: break code = coder.encode_fast(block) output.append(code) sys.stderr.write(".") sys.stderr.write("\n") out = Image.new("L", (rowstride,len(output))) out.putdata("".join(output)) out.save(output_filename)
[ "def", "encode", "(", "input", ",", "output_filename", ")", ":", "coder", "=", "rs", ".", "RSCoder", "(", "255", ",", "223", ")", "output", "=", "[", "]", "while", "True", ":", "block", "=", "input", ".", "read", "(", "223", ")", "if", "not", "block", ":", "break", "code", "=", "coder", ".", "encode_fast", "(", "block", ")", "output", ".", "append", "(", "code", ")", "sys", ".", "stderr", ".", "write", "(", "\".\"", ")", "sys", ".", "stderr", ".", "write", "(", "\"\\n\"", ")", "out", "=", "Image", ".", "new", "(", "\"L\"", ",", "(", "rowstride", ",", "len", "(", "output", ")", ")", ")", "out", ".", "putdata", "(", "\"\"", ".", "join", "(", "output", ")", ")", "out", ".", "save", "(", "output_filename", ")" ]
Encodes the input data with reed-solomon error correction in 223 byte blocks, and outputs each block along with 32 parity bytes to a new file by the given filename. input is a file-like object The outputted image will be in png format, and will be 255 by x pixels with one color channel. X is the number of 255 byte blocks from the input. Each block of data will be one row, therefore, the data can be recovered if no more than 16 pixels per row are altered.
[ "Encodes", "the", "input", "data", "with", "reed", "-", "solomon", "error", "correction", "in", "223", "byte", "blocks", "and", "outputs", "each", "block", "along", "with", "32", "parity", "bytes", "to", "a", "new", "file", "by", "the", "given", "filename", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/brownanrs/imageencode.py#L8-L35
train
Encodes the input data with reed - solomon error correction in 223 byte blocks and outputs each block along with 32 parity bytes to a new file by .
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,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hU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(6790 - 6679) + chr(49) + chr(50) + chr(48), 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b1101111) + '\x31' + chr(0b110000) + chr(0b100101 + 0o21), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + chr(49), 61663 - 61655), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1190 - 1140) + '\x31' + chr(0b11000 + 0o36), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(854 - 803) + '\x31' + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x34' + chr(0b110000), 15593 - 15585), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + '\x33' + '\065', 0b1000), nzTpIcepk0o8(chr(1730 - 1682) + chr(111) + chr(0b100000 + 0o27), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1978 - 1929) + '\065' + chr(2063 - 2014), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b10010 + 0o135) + chr(1885 - 1835) + '\x37' + chr(339 - 287), 60321 - 60313), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(1415 - 1360) + chr(1137 - 1085), 49469 - 49461), nzTpIcepk0o8(chr(48) + '\157' + chr(0b101010 + 0o10) + '\060' + '\063', 0o10), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b1101111) + '\062' + chr(0b10100 + 0o40) + chr(0b101100 + 0o6), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + chr(55) + chr(0b101111 + 0o6), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + '\x37' + chr(53), 8), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(0b110010) + chr(0b1011 + 0o47), 0b1000), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\157' + chr(929 - 878) + '\x30', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1026 - 976) + chr(55) + chr(2677 - 2622), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(135 - 85) + chr(0b100110 + 0o12) + chr(53), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101001 + 0o6) + '\x31' + '\064' + chr(0b110011), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + '\063' + '\x35', 52304 - 52296), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\157' + chr(1800 - 1749) + chr(0b110011 + 0o3) + chr(0b1101 + 0o44), 58111 - 58103), nzTpIcepk0o8(chr(749 - 701) + chr(111) + chr(2265 - 2214) + chr(51) + '\062', 15481 - 15473), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + '\x32' + chr(54), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1304 - 1253) + chr(558 - 505) + chr(1034 - 980), 0o10), nzTpIcepk0o8(chr(48) + chr(12263 - 12152) + '\x33' + chr(0b110010 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(97 - 49) + chr(111) + '\067' + chr(0b110111), 43232 - 43224), nzTpIcepk0o8(chr(48) + chr(0b10010 + 0o135) + chr(51) + chr(0b101111 + 0o1) + chr(0b110110), 24280 - 24272), nzTpIcepk0o8(chr(48) + chr(111) + chr(1608 - 1558) + '\x31' + chr(384 - 333), 0o10), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(4259 - 4148) + chr(0b11010 + 0o31) + '\x32' + chr(681 - 629), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(341 - 230) + chr(0b110001) + chr(0b101100 + 0o5) + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(54) + chr(1750 - 1697), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + '\061', 8), nzTpIcepk0o8(chr(48) + chr(7358 - 7247) + '\060', 8), nzTpIcepk0o8('\060' + '\157' + chr(0b110010 + 0o0) + chr(0b11000 + 0o32), 21130 - 21122), nzTpIcepk0o8('\x30' + '\157' + '\x34' + chr(1620 - 1567), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + '\x34' + chr(48), 36339 - 36331), nzTpIcepk0o8('\060' + chr(3408 - 3297) + chr(656 - 602) + '\064', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + '\x31' + chr(55), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(0b1101111) + chr(0b110101) + chr(0b110000), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'~'), chr(100) + chr(0b1100101) + '\x63' + '\x6f' + '\144' + chr(101))(chr(0b1100011 + 0o22) + chr(116) + '\146' + '\x2d' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def YqIaRFfeo4Ha(QnTXOd5N96r1, bbSDuGEkQaKb): tBRSr1n28DZt = HI6BdQqJMt95.RSCoder(nzTpIcepk0o8('\x30' + chr(111) + chr(657 - 606) + chr(1852 - 1797) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\157' + chr(0b110011) + '\x33' + '\x37', ord("\x08"))) toKQXlEvBKaK = [] while nzTpIcepk0o8('\060' + chr(111) + chr(0b100 + 0o55), 0o10): TvT0D2rIGW5A = QnTXOd5N96r1.eoXknH7XUn7m(nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(111) + chr(51) + chr(0b110011) + chr(0b110111), 8)) if not TvT0D2rIGW5A: break MJEGgvK3nnE9 = tBRSr1n28DZt.encode_fast(TvT0D2rIGW5A) roI3spqORKae(toKQXlEvBKaK, roI3spqORKae(ES5oEprVxulp(b'\x18\x12J\xba\xb6G\x9ah\x03\xd3UI'), chr(0b1100100) + '\x65' + chr(99) + chr(6202 - 6091) + chr(0b1100100) + chr(0b111110 + 0o47))(chr(12278 - 12161) + chr(2481 - 2365) + chr(0b1100110) + chr(1214 - 1169) + chr(0b101010 + 0o16)))(MJEGgvK3nnE9) roI3spqORKae(bpyfpu4kTbwL.stderr, roI3spqORKae(ES5oEprVxulp(b'=*)\xe6\xa6P\xab6%\xccqN'), '\144' + chr(8009 - 7908) + chr(5531 - 5432) + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(6622 - 6505) + chr(116) + chr(102) + chr(675 - 630) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'~'), chr(9740 - 9640) + chr(101) + chr(3679 - 3580) + '\x6f' + chr(0b110000 + 0o64) + '\x65')('\165' + chr(1908 - 1792) + '\x66' + chr(0b101101) + chr(2077 - 2021))) roI3spqORKae(bpyfpu4kTbwL.stderr, roI3spqORKae(ES5oEprVxulp(b'=*)\xe6\xa6P\xab6%\xccqN'), '\144' + '\x65' + chr(7981 - 7882) + chr(5230 - 5119) + chr(0b1100010 + 0o2) + chr(101))('\x75' + '\x74' + chr(102) + chr(45) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'Z'), chr(100) + chr(0b1011001 + 0o14) + '\143' + chr(0b1101111) + '\144' + '\x65')(chr(117) + chr(0b1001000 + 0o54) + chr(102) + chr(45) + chr(0b111000))) VwOu8WkJ9cpc = RvV7ueTH51Uy.bZWmgf4GjgvH(roI3spqORKae(ES5oEprVxulp(b'\x1c'), chr(5988 - 5888) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(0b101010 + 0o72) + chr(101))(chr(117) + chr(1375 - 1259) + chr(0b10100 + 0o122) + chr(0b100011 + 0o12) + chr(56)), (RJqFNYi2gokk, ftfygxgFas5X(toKQXlEvBKaK))) roI3spqORKae(VwOu8WkJ9cpc, roI3spqORKae(ES5oEprVxulp(b' 3m\xea\xafT\xbc'), '\x64' + chr(0b1100101) + '\143' + '\157' + chr(3490 - 3390) + chr(0b111110 + 0o47))(chr(0b11001 + 0o134) + chr(0b111001 + 0o73) + chr(0b1100110) + '\x2d' + chr(0b110010 + 0o6)))(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b''), '\144' + chr(101) + '\143' + chr(111) + chr(100) + chr(0b1100101))('\x75' + chr(0b1110100) + chr(102) + chr(45) + chr(2916 - 2860)), roI3spqORKae(ES5oEprVxulp(b'\tr`\xc3\xf7b\xbea=\xffN\r'), chr(100) + '\x65' + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(13201 - 13084) + chr(116) + '\146' + chr(0b1101 + 0o40) + chr(2239 - 2183)))(toKQXlEvBKaK)) roI3spqORKae(VwOu8WkJ9cpc, roI3spqORKae(ES5oEprVxulp(b'=1~\xd4\x83V\x8aT\x19\xfdH\x1b'), chr(100) + chr(0b1100101) + chr(0b1100011) + '\157' + '\144' + '\x65')(chr(12536 - 12419) + chr(0b100001 + 0o123) + chr(102) + '\055' + '\070'))(bbSDuGEkQaKb)
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/pympler/util/bottle3.py
redirect
def redirect(url, code=303): """ Aborts execution and causes a 303 redirect """ scriptname = request.environ.get('SCRIPT_NAME', '').rstrip('/') + '/' location = urljoin(request.url, urljoin(scriptname, url)) raise HTTPResponse("", status=code, header=dict(Location=location))
python
def redirect(url, code=303): """ Aborts execution and causes a 303 redirect """ scriptname = request.environ.get('SCRIPT_NAME', '').rstrip('/') + '/' location = urljoin(request.url, urljoin(scriptname, url)) raise HTTPResponse("", status=code, header=dict(Location=location))
[ "def", "redirect", "(", "url", ",", "code", "=", "303", ")", ":", "scriptname", "=", "request", ".", "environ", ".", "get", "(", "'SCRIPT_NAME'", ",", "''", ")", ".", "rstrip", "(", "'/'", ")", "+", "'/'", "location", "=", "urljoin", "(", "request", ".", "url", ",", "urljoin", "(", "scriptname", ",", "url", ")", ")", "raise", "HTTPResponse", "(", "\"\"", ",", "status", "=", "code", ",", "header", "=", "dict", "(", "Location", "=", "location", ")", ")" ]
Aborts execution and causes a 303 redirect
[ "Aborts", "execution", "and", "causes", "a", "303", "redirect" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/util/bottle3.py#L916-L920
train
Abort execution and causes a 303 redirect
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_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j_uC,TVUhqOt5_BbS,WtdkIpFeYozM,MdkNqd1bagO6,QNQS9e6tJqMV,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\065' + chr(953 - 901), 0b1000), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b1101111) + '\061' + '\062' + chr(603 - 554), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + '\066' + '\x35', 18465 - 18457), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(0b110011) + '\064', 6283 - 6275), nzTpIcepk0o8(chr(48) + chr(0b110 + 0o151) + chr(0b100100 + 0o16) + chr(0b100111 + 0o13) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(669 - 621) + '\157' + chr(0b1101 + 0o44) + '\065', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + chr(0b110000 + 0o6) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\x6f' + chr(1574 - 1525) + '\x33' + '\063', 49744 - 49736), nzTpIcepk0o8(chr(0b101 + 0o53) + '\x6f' + '\062' + chr(1989 - 1937) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(8168 - 8057) + '\061' + '\x33' + chr(0b1111 + 0o45), 8), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(2805 - 2751) + chr(0b101101 + 0o7), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1001101 + 0o42) + chr(0b110001) + '\066' + chr(2611 - 2558), 8), nzTpIcepk0o8(chr(0b110000) + chr(9998 - 9887) + chr(471 - 421) + chr(49) + chr(1194 - 1146), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + chr(52) + '\063', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\061' + chr(1792 - 1737) + chr(847 - 794), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + '\x36' + chr(1477 - 1427), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101110 + 0o4) + chr(0b110111) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(1211 - 1163) + '\x6f' + chr(0b110010) + chr(0b110010) + chr(2345 - 2294), ord("\x08")), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(111) + '\x31' + chr(55) + chr(1122 - 1073), 0o10), nzTpIcepk0o8(chr(353 - 305) + chr(0b10110 + 0o131) + chr(273 - 222) + '\x36', 3331 - 3323), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + '\x37' + chr(0b110011), 58268 - 58260), nzTpIcepk0o8('\x30' + chr(9716 - 9605) + chr(1137 - 1085) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(2596 - 2545) + '\x35' + chr(250 - 196), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(7884 - 7773) + '\063', 63172 - 63164), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b1101111) + chr(815 - 764) + chr(1997 - 1942) + '\x33', 7529 - 7521), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + chr(0b110101) + '\x30', 57742 - 57734), nzTpIcepk0o8(chr(48) + '\x6f' + chr(832 - 783) + '\065' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(1827 - 1779) + chr(0b1101111) + '\x31', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + chr(0b110101) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101000 + 0o7) + '\062' + '\x34' + chr(0b100100 + 0o17), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(186 - 136) + chr(0b101001 + 0o16), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + chr(0b1 + 0o63) + '\067', 62006 - 61998), nzTpIcepk0o8(chr(568 - 520) + chr(6508 - 6397) + chr(0b110011) + '\x36' + '\065', 8), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\157' + '\062' + chr(0b110010) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(177 - 66) + '\061' + chr(0b110101) + chr(0b100111 + 0o16), 18095 - 18087), nzTpIcepk0o8(chr(1249 - 1201) + '\157' + '\x31' + chr(49), 0b1000), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\x6f' + chr(1918 - 1867) + '\x33', 0o10), nzTpIcepk0o8('\060' + chr(12288 - 12177) + chr(0b1101 + 0o45) + '\x37' + chr(48), 0o10), nzTpIcepk0o8(chr(1010 - 962) + chr(0b1010010 + 0o35) + chr(1342 - 1293) + chr(0b110001 + 0o0) + chr(50), 52413 - 52405), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(1900 - 1851) + chr(0b110101), 52146 - 52138)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b111 + 0o56) + chr(649 - 601), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x02'), chr(100) + '\145' + chr(2768 - 2669) + '\x6f' + '\144' + chr(101))('\x75' + chr(0b1110100) + '\146' + chr(0b10110 + 0o27) + chr(2782 - 2726)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def nIOZtjIZPVXx(XuBkOpBKZJ5Z, MJEGgvK3nnE9=nzTpIcepk0o8(chr(0b110000) + chr(0b1100010 + 0o15) + chr(0b110100) + chr(53) + '\x37', ord("\x08"))): XxxxnRVF6C0x = fXJOkxXvZqV_.environ.get(roI3spqORKae(ES5oEprVxulp(b'\x7f\x12\xa7\x15\xc2Y*\x15\xe4\x111'), '\x64' + '\x65' + '\x63' + '\x6f' + chr(0b1100100) + chr(6546 - 6445))('\165' + '\164' + chr(102) + '\055' + '\x38'), roI3spqORKae(ES5oEprVxulp(b''), chr(100) + chr(101) + chr(0b10110 + 0o115) + chr(11532 - 11421) + chr(0b1100100) + chr(6502 - 6401))('\x75' + chr(116) + '\146' + chr(0b101101) + chr(0b111000))).rstrip(roI3spqORKae(ES5oEprVxulp(b'\x03'), '\x64' + chr(101) + '\143' + '\x6f' + chr(2882 - 2782) + '\145')('\x75' + '\x74' + chr(0b101000 + 0o76) + '\x2d' + chr(56))) + roI3spqORKae(ES5oEprVxulp(b'\x03'), chr(6745 - 6645) + chr(0b11101 + 0o110) + chr(9204 - 9105) + chr(11692 - 11581) + '\144' + '\145')(chr(0b1000010 + 0o63) + chr(116) + '\146' + chr(45) + '\070') y87dwGy_Qoj4 = bdEhu84j0skT(fXJOkxXvZqV_.XuBkOpBKZJ5Z, bdEhu84j0skT(XxxxnRVF6C0x, XuBkOpBKZJ5Z)) raise TCfCGIFEo096(roI3spqORKae(ES5oEprVxulp(b''), chr(6759 - 6659) + '\145' + chr(0b1100011) + '\x6f' + '\x64' + chr(10052 - 9951))(chr(5450 - 5333) + chr(12353 - 12237) + chr(102) + chr(0b100011 + 0o12) + '\x38'), status=MJEGgvK3nnE9, header=znjnJWK64FDT(Location=y87dwGy_Qoj4))
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/pympler/util/bottle3.py
parse_date
def parse_date(ims): """ Parse rfc1123, rfc850 and asctime timestamps and return UTC epoch. """ try: ts = email.utils.parsedate_tz(ims) return time.mktime(ts[:8] + (0,)) - (ts[9] or 0) - time.timezone except (TypeError, ValueError, IndexError): return None
python
def parse_date(ims): """ Parse rfc1123, rfc850 and asctime timestamps and return UTC epoch. """ try: ts = email.utils.parsedate_tz(ims) return time.mktime(ts[:8] + (0,)) - (ts[9] or 0) - time.timezone except (TypeError, ValueError, IndexError): return None
[ "def", "parse_date", "(", "ims", ")", ":", "try", ":", "ts", "=", "email", ".", "utils", ".", "parsedate_tz", "(", "ims", ")", "return", "time", ".", "mktime", "(", "ts", "[", ":", "8", "]", "+", "(", "0", ",", ")", ")", "-", "(", "ts", "[", "9", "]", "or", "0", ")", "-", "time", ".", "timezone", "except", "(", "TypeError", ",", "ValueError", ",", "IndexError", ")", ":", "return", "None" ]
Parse rfc1123, rfc850 and asctime timestamps and return UTC epoch.
[ "Parse", "rfc1123", "rfc850", "and", "asctime", "timestamps", "and", "return", "UTC", "epoch", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1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xj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b1101111) + chr(0b101011 + 0o13) + '\x32', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(2561 - 2509) + chr(2241 - 2190), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(1001 - 947) + '\x37', 0o10), nzTpIcepk0o8(chr(1594 - 1546) + chr(0b1101111) + '\066' + chr(1084 - 1029), 8), nzTpIcepk0o8('\060' + chr(7839 - 7728) + '\x32' + chr(52) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b101010 + 0o11) + '\x30' + chr(0b1000 + 0o52), 0b1000), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b1101111) + '\x33' + chr(1589 - 1534) + '\062', ord("\x08")), nzTpIcepk0o8(chr(1319 - 1271) + chr(111) + chr(0b100 + 0o55) + chr(0b110 + 0o52) + chr(1251 - 1196), 0o10), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(4800 - 4689) + '\x31' + chr(1854 - 1803) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(2846 - 2791) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1000101 + 0o52) + chr(51), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10010 + 0o37) + chr(53) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + chr(0b101001 + 0o16) + '\x33', 0o10), nzTpIcepk0o8(chr(48) + chr(9516 - 9405) + chr(975 - 921) + '\x33', 63939 - 63931), nzTpIcepk0o8(chr(1677 - 1629) + '\157' + chr(51) + chr(51) + chr(55), 0b1000), nzTpIcepk0o8(chr(85 - 37) + chr(0b1101011 + 0o4) + '\x31' + chr(850 - 801) + chr(514 - 459), 28812 - 28804), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + chr(55) + chr(55), 8492 - 8484), nzTpIcepk0o8(chr(0b110000) + chr(7243 - 7132) + chr(1040 - 992), 32122 - 32114), nzTpIcepk0o8(chr(371 - 323) + '\x6f' + chr(51) + '\x32' + chr(55), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\061' + '\065' + chr(0b110101), 19089 - 19081), nzTpIcepk0o8('\060' + '\x6f' + '\065' + '\062', 0b1000), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(6247 - 6136) + '\063' + chr(1550 - 1495) + '\x30', 20969 - 20961), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\x6f' + chr(50) + chr(52) + chr(0b10011 + 0o36), 0o10), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\157' + '\063' + '\x34' + chr(744 - 696), 62058 - 62050), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + '\067' + chr(0b101110 + 0o10), 62553 - 62545), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + chr(0b110111) + chr(325 - 276), 62426 - 62418), nzTpIcepk0o8(chr(0b110000) + chr(10336 - 10225) + chr(51) + '\x30' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100101 + 0o112) + chr(50) + '\x32' + chr(0b101110 + 0o6), ord("\x08")), nzTpIcepk0o8('\x30' + chr(7762 - 7651) + chr(0b110101) + chr(0b1101 + 0o46), 38233 - 38225), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(50) + chr(0b101001 + 0o11), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100111 + 0o12) + chr(55) + chr(53), 27202 - 27194), nzTpIcepk0o8('\060' + chr(0b10110 + 0o131) + chr(50) + chr(1912 - 1862) + chr(1662 - 1614), 0o10), nzTpIcepk0o8(chr(1072 - 1024) + chr(0b111111 + 0o60) + chr(591 - 542) + chr(0b110110) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(546 - 498) + chr(0b1011100 + 0o23) + '\x32' + chr(2492 - 2442) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\157' + '\062' + chr(1791 - 1737) + '\x36', 26294 - 26286), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(111) + '\062' + chr(0b110001) + chr(0b110000), 2642 - 2634), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(111) + chr(51) + '\x37' + chr(0b11101 + 0o32), 8), nzTpIcepk0o8('\060' + chr(111) + chr(232 - 182) + chr(963 - 911), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x35' + '\066', 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b110 + 0o54) + chr(52) + '\x34', 64127 - 64119)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\157' + '\x35' + chr(0b110000), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x1c'), chr(2286 - 2186) + chr(0b1100101) + '\x63' + chr(3900 - 3789) + chr(0b11100 + 0o110) + chr(0b1010000 + 0o25))(chr(0b1110101) + chr(10202 - 10086) + chr(0b1100110) + chr(45) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def mZ_0VyMKBCLL(FEqG_laI0rt6): try: rkjp8Xsedgo9 = BhwKvDaXtiJh.utils.parsedate_tz(FEqG_laI0rt6) return roI3spqORKae(oprIvDIRQyCb, roI3spqORKae(ES5oEprVxulp(b'_HC^\xcb\xa7'), '\144' + chr(8027 - 7926) + chr(0b11010 + 0o111) + '\x6f' + '\144' + '\145')(chr(0b11110 + 0o127) + chr(116) + chr(7176 - 7074) + chr(0b101101) + chr(2384 - 2328)))(rkjp8Xsedgo9[:nzTpIcepk0o8(chr(2113 - 2065) + chr(0b111111 + 0o60) + chr(0b11100 + 0o25) + '\060', 0o10)] + (nzTpIcepk0o8(chr(639 - 591) + '\157' + chr(0b110000), 8),)) - (rkjp8Xsedgo9[nzTpIcepk0o8(chr(0b110000) + chr(6442 - 6331) + chr(1188 - 1139) + chr(294 - 245), 0o10)] or nzTpIcepk0o8(chr(48) + chr(2897 - 2786) + chr(1433 - 1385), 8)) - roI3spqORKae(oprIvDIRQyCb, roI3spqORKae(ES5oEprVxulp(b'wgB_\xee\x85\xcc\x172\xce;3'), chr(6777 - 6677) + chr(0b1100101) + chr(0b100101 + 0o76) + '\x6f' + '\x64' + chr(101))(chr(117) + chr(116) + '\146' + chr(0b1 + 0o54) + chr(56))) except (jZIjKu8IFANs, WbNHlDKpyPtQ, ah0DLMBSEU5j): return None
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/pympler/util/bottle3.py
run
def run(app=None, server=WSGIRefServer, host='127.0.0.1', port=8080, interval=1, reloader=False, **kargs): """ Runs bottle as a web server. """ app = app if app else default_app() quiet = bool(kargs.get('quiet', False)) # Instantiate server, if it is a class instead of an instance if isinstance(server, type): server = server(host=host, port=port, **kargs) if not isinstance(server, ServerAdapter): raise RuntimeError("Server must be a subclass of WSGIAdapter") if not quiet and isinstance(server, ServerAdapter): # pragma: no cover if not reloader or os.environ.get('BOTTLE_CHILD') == 'true': print("Bottle server starting up (using %s)..." % repr(server)) print("Listening on http://%s:%d/" % (server.host, server.port)) print("Use Ctrl-C to quit.") print() else: print("Bottle auto reloader starting up...") try: if reloader and interval: reloader_run(server, app, interval) else: server.run(app) except KeyboardInterrupt: if not quiet: # pragma: no cover print("Shutting Down...")
python
def run(app=None, server=WSGIRefServer, host='127.0.0.1', port=8080, interval=1, reloader=False, **kargs): """ Runs bottle as a web server. """ app = app if app else default_app() quiet = bool(kargs.get('quiet', False)) # Instantiate server, if it is a class instead of an instance if isinstance(server, type): server = server(host=host, port=port, **kargs) if not isinstance(server, ServerAdapter): raise RuntimeError("Server must be a subclass of WSGIAdapter") if not quiet and isinstance(server, ServerAdapter): # pragma: no cover if not reloader or os.environ.get('BOTTLE_CHILD') == 'true': print("Bottle server starting up (using %s)..." % repr(server)) print("Listening on http://%s:%d/" % (server.host, server.port)) print("Use Ctrl-C to quit.") print() else: print("Bottle auto reloader starting up...") try: if reloader and interval: reloader_run(server, app, interval) else: server.run(app) except KeyboardInterrupt: if not quiet: # pragma: no cover print("Shutting Down...")
[ "def", "run", "(", "app", "=", "None", ",", "server", "=", "WSGIRefServer", ",", "host", "=", "'127.0.0.1'", ",", "port", "=", "8080", ",", "interval", "=", "1", ",", "reloader", "=", "False", ",", "*", "*", "kargs", ")", ":", "app", "=", "app", "if", "app", "else", "default_app", "(", ")", "quiet", "=", "bool", "(", "kargs", ".", "get", "(", "'quiet'", ",", "False", ")", ")", "# Instantiate server, if it is a class instead of an instance", "if", "isinstance", "(", "server", ",", "type", ")", ":", "server", "=", "server", "(", "host", "=", "host", ",", "port", "=", "port", ",", "*", "*", "kargs", ")", "if", "not", "isinstance", "(", "server", ",", "ServerAdapter", ")", ":", "raise", "RuntimeError", "(", "\"Server must be a subclass of WSGIAdapter\"", ")", "if", "not", "quiet", "and", "isinstance", "(", "server", ",", "ServerAdapter", ")", ":", "# pragma: no cover", "if", "not", "reloader", "or", "os", ".", "environ", ".", "get", "(", "'BOTTLE_CHILD'", ")", "==", "'true'", ":", "print", "(", "\"Bottle server starting up (using %s)...\"", "%", "repr", "(", "server", ")", ")", "print", "(", "\"Listening on http://%s:%d/\"", "%", "(", "server", ".", "host", ",", "server", ".", "port", ")", ")", "print", "(", "\"Use Ctrl-C to quit.\"", ")", "print", "(", ")", "else", ":", "print", "(", "\"Bottle auto reloader starting up...\"", ")", "try", ":", "if", "reloader", "and", "interval", ":", "reloader_run", "(", "server", ",", "app", ",", "interval", ")", "else", ":", "server", ".", "run", "(", "app", ")", "except", "KeyboardInterrupt", ":", "if", "not", "quiet", ":", "# pragma: no cover", "print", "(", "\"Shutting Down...\"", ")" ]
Runs bottle as a web server.
[ "Runs", "bottle", "as", "a", "web", "server", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/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,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(7264 - 7153) + chr(303 - 252) + '\x33' + chr(0b10001 + 0o44), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(2475 - 2425) + chr(1842 - 1787), 53451 - 53443), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + '\x37' + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(48) + chr(3541 - 3430) + chr(0b110011) + chr(0b110011) + chr(474 - 423), 0b1000), nzTpIcepk0o8(chr(1413 - 1365) + chr(111) + chr(2241 - 2189) + '\x35', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010 + 0o0) + chr(2274 - 2226) + chr(55), 0b1000), nzTpIcepk0o8(chr(1351 - 1303) + chr(0b11010 + 0o125) + chr(0b100100 + 0o16) + '\x34', 0o10), nzTpIcepk0o8(chr(618 - 570) + chr(111) + chr(1934 - 1883) + '\x31' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + chr(706 - 654) + '\067', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b10111 + 0o34) + chr(1908 - 1857) + chr(0b101011 + 0o14), 21176 - 21168), nzTpIcepk0o8(chr(0b110000) + chr(3857 - 3746) + chr(0b1011 + 0o46) + '\064' + '\x35', 6115 - 6107), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b10000 + 0o42) + chr(0b110100), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(53) + '\x35', 0o10), nzTpIcepk0o8(chr(48) + chr(7416 - 7305) + '\x32' + chr(1663 - 1611) + '\x37', 8), nzTpIcepk0o8(chr(0b1 + 0o57) + '\x6f' + '\063' + chr(53), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(51) + chr(0b1001 + 0o52), 6683 - 6675), nzTpIcepk0o8(chr(48) + chr(0b101110 + 0o101) + chr(873 - 822), 0o10), nzTpIcepk0o8('\060' + chr(0b100000 + 0o117) + chr(0b11101 + 0o26) + chr(0b110010) + chr(0b110010), 50759 - 50751), nzTpIcepk0o8('\060' + chr(111) + chr(145 - 96) + chr(50) + chr(140 - 89), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(2026 - 1976) + chr(1161 - 1113) + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(0b1000100 + 0o53) + '\x33' + chr(53) + '\x34', 9062 - 9054), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + '\x36' + chr(990 - 936), 32612 - 32604), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1880 - 1829) + '\064' + chr(0b100101 + 0o16), ord("\x08")), nzTpIcepk0o8(chr(1395 - 1347) + chr(7941 - 7830) + chr(1873 - 1822) + chr(2352 - 2302) + chr(50), 8), nzTpIcepk0o8('\060' + chr(6509 - 6398) + chr(0b10110 + 0o35) + '\060' + chr(70 - 17), 0b1000), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(111) + chr(0b110111) + chr(51), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100011 + 0o16) + '\x33' + chr(0b11000 + 0o31), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + '\x31' + chr(2014 - 1961), 0o10), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\x6f' + '\x31' + '\x37' + chr(0b101 + 0o56), ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b11011 + 0o124) + chr(51) + '\064' + '\063', 8), nzTpIcepk0o8(chr(2051 - 2003) + chr(111) + chr(0b101101 + 0o4) + '\061' + '\060', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b10 + 0o62) + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11 + 0o60) + chr(0b110000), 14790 - 14782), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + '\067' + chr(917 - 864), 15515 - 15507), nzTpIcepk0o8('\x30' + '\x6f' + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + '\x30' + '\062', 0b1000), nzTpIcepk0o8(chr(645 - 597) + '\x6f' + chr(0b110010) + chr(0b110101) + '\x34', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2201 - 2151) + '\067' + chr(756 - 706), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(9162 - 9051) + chr(0b11010 + 0o30) + '\061' + chr(685 - 632), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + '\064', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\157' + '\x35' + '\x30', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf3'), chr(0b10100 + 0o120) + chr(0b1000110 + 0o37) + chr(99) + chr(11336 - 11225) + chr(0b10001 + 0o123) + chr(0b1110 + 0o127))('\165' + '\164' + chr(0b1100110) + '\055' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def qnPOIdBQJdzY(JmjeLO9VwkLI=None, prkEH9G6os35=vYpaZDQIGFEq, UcZofMadI5hD=roI3spqORKae(ES5oEprVxulp(b'\xec\xa5K\xf5\x15\xa9$\xe7\x96'), '\x64' + chr(7852 - 7751) + '\x63' + chr(111) + '\x64' + chr(0b110110 + 0o57))('\165' + chr(2149 - 2033) + chr(0b1100110) + chr(0b101101) + chr(0b111000)), FKWBoSDY8Qs2=nzTpIcepk0o8('\x30' + chr(0b110 + 0o151) + chr(0b11011 + 0o26) + chr(0b100100 + 0o23) + chr(0b110110) + chr(50) + '\060', 42777 - 42769), n1CVRUxWAiaX=nzTpIcepk0o8(chr(0b110000) + chr(3981 - 3870) + chr(49), ord("\x08")), by3ZSzFsVGG_=nzTpIcepk0o8('\060' + chr(7958 - 7847) + '\x30', 62583 - 62575), **UYcUKiPACH95): JmjeLO9VwkLI = JmjeLO9VwkLI if JmjeLO9VwkLI else ttzTCSoC8uok() lH4M2yZsqrSS = TVUhqOt5_BbS(UYcUKiPACH95.GUKetu4xaGsJ(roI3spqORKae(ES5oEprVxulp(b'\xac\xe2\x15\xbeQ'), chr(1029 - 929) + chr(0b11010 + 0o113) + chr(0b10010 + 0o121) + chr(0b1101111) + chr(0b1100100) + chr(756 - 655))(chr(0b1110101) + chr(116) + '\x66' + chr(45) + '\x38'), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(111) + '\x30', 8))) if suIjIS24Zkqw(prkEH9G6os35, MJ07XsN5uFgW): prkEH9G6os35 = prkEH9G6os35(host=UcZofMadI5hD, port=FKWBoSDY8Qs2, **UYcUKiPACH95) if not suIjIS24Zkqw(prkEH9G6os35, A_6oJfUv2Pfm): raise _1qUu0gKi9gH(roI3spqORKae(ES5oEprVxulp(b'\x8e\xf2\x0e\xad@\xf54\xa4\xd2\xac\x11\xb4O\xc2=:#\xa1&\xe6\x8f\x9a\x82\xa1\xb6\x1b6\xab[\xb4\x1b`Q\xfc`#\xdc\xce\xe8~'), '\144' + '\x65' + '\x63' + chr(0b1101111) + '\144' + '\x65')(chr(0b1000100 + 0o61) + chr(0b1110100) + chr(0b1100110) + chr(942 - 897) + chr(0b111000))) if not lH4M2yZsqrSS and suIjIS24Zkqw(prkEH9G6os35, A_6oJfUv2Pfm): if not by3ZSzFsVGG_ or roI3spqORKae(aHUqKstZLeS6.environ, roI3spqORKae(ES5oEprVxulp(b'\x9a\xc27\xbeQ\xf2 \xb1\xc6\x98\x16\xde'), '\x64' + '\145' + '\x63' + '\x6f' + chr(7407 - 7307) + chr(5135 - 5034))(chr(117) + chr(0b100110 + 0o116) + chr(102) + chr(0b101101) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\x9f\xd8(\x8fi\xc2K\x8a\xef\x96)\xd0'), '\x64' + '\x65' + chr(0b1010000 + 0o23) + '\x6f' + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(0b1110010 + 0o2) + chr(9651 - 9549) + '\055' + chr(0b100010 + 0o26))) == roI3spqORKae(ES5oEprVxulp(b'\xa9\xe5\t\xbe'), chr(0b1100100) + chr(101) + '\x63' + chr(9972 - 9861) + chr(0b1011000 + 0o14) + '\x65')('\x75' + chr(11180 - 11064) + chr(0b1001111 + 0o27) + chr(45) + chr(618 - 562)): v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b"\x9f\xf8\x08\xafI\xe24\xba\xc2\xad\x13\xf1_\x87n/b\xa0'\xed\x82\x91\xc3\xa7\xb5\x1bq\xb8\x08\x8a&@8\x98wk\x82\x94\xa3"), chr(0b111000 + 0o54) + chr(0b1100101) + '\x63' + chr(0b100 + 0o153) + chr(7800 - 7700) + '\145')('\165' + '\x74' + '\x66' + '\x2d' + chr(0b111000)) % VWshwTzZfwvC(prkEH9G6os35)) v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\x91\xfe\x0f\xaf@\xe9}\xa7\xc0\xff\n\xfa\r\xcfi/s\xe8|\xab\xc9\x85\xd9\xf7\xa1\x14'), chr(0b10100 + 0o120) + '\145' + chr(99) + chr(0b1101111) + chr(7306 - 7206) + chr(101))(chr(117) + chr(0b1110100) + chr(7052 - 6950) + chr(1192 - 1147) + chr(0b101010 + 0o16)) % (roI3spqORKae(prkEH9G6os35, roI3spqORKae(ES5oEprVxulp(b'\x88\xf4&\xb4C\xcau\xad\xee\xea\r\xd0'), chr(4176 - 4076) + chr(8390 - 8289) + chr(8038 - 7939) + '\x6f' + chr(0b11010 + 0o112) + chr(0b1100011 + 0o2))(chr(0b111010 + 0o73) + chr(0b1110100) + chr(4765 - 4663) + chr(1254 - 1209) + chr(0b111000))), roI3spqORKae(prkEH9G6os35, roI3spqORKae(ES5oEprVxulp(b'\x9b\xdc+\x99J\xd4P\x90\x9f\x8e\x16\xa6'), chr(0b1100100) + chr(101) + chr(0b1100011) + '\x6f' + chr(0b1000101 + 0o37) + '\145')(chr(5098 - 4981) + '\164' + chr(0b1100110) + chr(0b101101) + '\x38')))) v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\x88\xe4\x19\xfbf\xf3f\xa5\x8a\x9cE\xe0B\x87l.j\xa6}'), chr(1501 - 1401) + chr(0b1001111 + 0o26) + chr(99) + chr(111) + chr(0b1100001 + 0o3) + chr(0b1100101))(chr(11798 - 11681) + chr(6004 - 5888) + chr(0b1011110 + 0o10) + chr(0b10100 + 0o31) + '\x38')) v8jsMqaYV6U2() else: v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\x9f\xf8\x08\xafI\xe24\xa8\xd2\xab\n\xb4_\xc2q4b\xb66\xf6\xcc\x85\x97\xb3\xb7O0\xa3\x1c\xc3=W6\x93*'), chr(0b1100100) + chr(4646 - 4545) + '\143' + chr(111) + chr(8660 - 8560) + chr(0b1100101))('\165' + chr(0b1110100) + chr(3303 - 3201) + chr(45) + chr(0b111000))) try: if by3ZSzFsVGG_ and n1CVRUxWAiaX: vtLzV5hgMeSj(prkEH9G6os35, JmjeLO9VwkLI, n1CVRUxWAiaX) else: roI3spqORKae(prkEH9G6os35, roI3spqORKae(ES5oEprVxulp(b'\xac\xf9,\x94l\xe3V\x98\xed\xbb\x1f\xcd'), chr(3818 - 3718) + chr(0b110111 + 0o56) + chr(0b1011000 + 0o13) + chr(0b1101111) + chr(0b1100100) + chr(5244 - 5143))('\x75' + chr(0b100010 + 0o122) + '\146' + '\x2d' + chr(0b10111 + 0o41)))(JmjeLO9VwkLI) except Fc8q2OvvlH7d: if not lH4M2yZsqrSS: v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\x8e\xff\t\xafQ\xeez\xae\x87\x9b\n\xe3C\x893u'), chr(9264 - 9164) + chr(5164 - 5063) + '\143' + '\x6f' + '\144' + '\x65')('\165' + chr(7455 - 7339) + chr(2300 - 2198) + chr(0b11111 + 0o16) + '\070'))
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/pympler/util/bottle3.py
template
def template(tpl, template_adapter=SimpleTemplate, **kwargs): ''' Get a rendered template as a string iterator. You can use a name, a filename or a template string as first parameter. ''' if tpl not in TEMPLATES or DEBUG: settings = kwargs.get('template_settings',{}) lookup = kwargs.get('template_lookup', TEMPLATE_PATH) if isinstance(tpl, template_adapter): TEMPLATES[tpl] = tpl if settings: TEMPLATES[tpl].prepare(settings) elif "\n" in tpl or "{" in tpl or "%" in tpl or '$' in tpl: TEMPLATES[tpl] = template_adapter(source=tpl, lookup=lookup, settings=settings) else: TEMPLATES[tpl] = template_adapter(name=tpl, lookup=lookup, settings=settings) if not TEMPLATES[tpl]: abort(500, 'Template (%s) not found' % tpl) kwargs['abort'] = abort kwargs['request'] = request kwargs['response'] = response return TEMPLATES[tpl].render(**kwargs)
python
def template(tpl, template_adapter=SimpleTemplate, **kwargs): ''' Get a rendered template as a string iterator. You can use a name, a filename or a template string as first parameter. ''' if tpl not in TEMPLATES or DEBUG: settings = kwargs.get('template_settings',{}) lookup = kwargs.get('template_lookup', TEMPLATE_PATH) if isinstance(tpl, template_adapter): TEMPLATES[tpl] = tpl if settings: TEMPLATES[tpl].prepare(settings) elif "\n" in tpl or "{" in tpl or "%" in tpl or '$' in tpl: TEMPLATES[tpl] = template_adapter(source=tpl, lookup=lookup, settings=settings) else: TEMPLATES[tpl] = template_adapter(name=tpl, lookup=lookup, settings=settings) if not TEMPLATES[tpl]: abort(500, 'Template (%s) not found' % tpl) kwargs['abort'] = abort kwargs['request'] = request kwargs['response'] = response return TEMPLATES[tpl].render(**kwargs)
[ "def", "template", "(", "tpl", ",", "template_adapter", "=", "SimpleTemplate", ",", "*", "*", "kwargs", ")", ":", "if", "tpl", "not", "in", "TEMPLATES", "or", "DEBUG", ":", "settings", "=", "kwargs", ".", "get", "(", "'template_settings'", ",", "{", "}", ")", "lookup", "=", "kwargs", ".", "get", "(", "'template_lookup'", ",", "TEMPLATE_PATH", ")", "if", "isinstance", "(", "tpl", ",", "template_adapter", ")", ":", "TEMPLATES", "[", "tpl", "]", "=", "tpl", "if", "settings", ":", "TEMPLATES", "[", "tpl", "]", ".", "prepare", "(", "settings", ")", "elif", "\"\\n\"", "in", "tpl", "or", "\"{\"", "in", "tpl", "or", "\"%\"", "in", "tpl", "or", "'$'", "in", "tpl", ":", "TEMPLATES", "[", "tpl", "]", "=", "template_adapter", "(", "source", "=", "tpl", ",", "lookup", "=", "lookup", ",", "settings", "=", "settings", ")", "else", ":", "TEMPLATES", "[", "tpl", "]", "=", "template_adapter", "(", "name", "=", "tpl", ",", "lookup", "=", "lookup", ",", "settings", "=", "settings", ")", "if", "not", "TEMPLATES", "[", "tpl", "]", ":", "abort", "(", "500", ",", "'Template (%s) not found'", "%", "tpl", ")", "kwargs", "[", "'abort'", "]", "=", "abort", "kwargs", "[", "'request'", "]", "=", "request", "kwargs", "[", "'response'", "]", "=", "response", "return", "TEMPLATES", "[", "tpl", "]", ".", "render", "(", "*", "*", "kwargs", ")" ]
Get a rendered template as a string iterator. You can use a name, a filename or a template string as first parameter.
[ "Get", "a", "rendered", "template", "as", "a", "string", "iterator", ".", "You", "can", "use", "a", "name", "a", "filename", "or", "a", "template", "string", "as", "first", "parameter", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/util/bottle3.py#L1566-L1586
train
Render a template string.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb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iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\x6f' + '\062' + '\064' + chr(1752 - 1700), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + '\x35' + '\066', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(1158 - 1109) + chr(0b110101), 0o10), nzTpIcepk0o8('\060' + chr(11175 - 11064) + chr(49) + chr(0b110001) + '\065', 0b1000), nzTpIcepk0o8('\x30' + chr(0b111101 + 0o62) + chr(832 - 783) + chr(0b110010) + chr(1622 - 1571), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b1 + 0o62) + chr(2287 - 2239) + chr(328 - 278), 35868 - 35860), nzTpIcepk0o8(chr(48) + '\x6f' + '\064' + '\x35', 0b1000), nzTpIcepk0o8(chr(1278 - 1230) + '\x6f' + chr(50) + chr(49) + chr(54), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + chr(0b110011) + chr(0b110010), 59552 - 59544), nzTpIcepk0o8(chr(48) + chr(0b11101 + 0o122) + chr(139 - 89) + '\062' + chr(0b101000 + 0o13), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(1826 - 1715) + chr(960 - 909) + '\x33' + chr(0b10010 + 0o41), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + chr(0b11110 + 0o22) + chr(2780 - 2725), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\061' + '\066' + chr(0b11101 + 0o31), 0b1000), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(111) + '\061' + chr(1328 - 1278) + '\x31', 0b1000), nzTpIcepk0o8(chr(83 - 35) + chr(523 - 412) + chr(51) + chr(49) + chr(0b110011 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(462 - 414) + '\157' + '\061' + chr(0b110001) + chr(0b110110), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b1000 + 0o52) + chr(52) + chr(48), 56088 - 56080), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(7611 - 7500) + chr(0b110001) + chr(50) + chr(0b110001), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b101010 + 0o105) + chr(54) + chr(0b101000 + 0o15), 0b1000), nzTpIcepk0o8('\x30' + chr(9662 - 9551) + chr(0b11000 + 0o33) + chr(0b110100) + chr(0b101000 + 0o17), 0b1000), nzTpIcepk0o8('\060' + chr(6316 - 6205) + '\x33' + '\x33' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + '\062' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100 + 0o143) + chr(0b110011) + chr(0b101111 + 0o5) + chr(0b100 + 0o62), 0b1000), nzTpIcepk0o8(chr(1354 - 1306) + chr(0b1101111) + '\063' + '\067' + chr(0b110011), 1676 - 1668), nzTpIcepk0o8(chr(0b110000) + chr(7834 - 7723) + '\063' + '\061' + '\067', ord("\x08")), nzTpIcepk0o8(chr(1117 - 1069) + chr(0b1101111) + chr(0b110100) + '\067', 22827 - 22819), nzTpIcepk0o8(chr(48) + chr(8699 - 8588) + chr(0b110001) + chr(0b110101) + chr(0b110110), 8), nzTpIcepk0o8(chr(495 - 447) + chr(111) + chr(52), 33323 - 33315), nzTpIcepk0o8('\060' + chr(1944 - 1833) + '\061' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(1526 - 1478) + chr(6031 - 5920) + chr(0b100100 + 0o16) + chr(1946 - 1893) + '\060', ord("\x08")), nzTpIcepk0o8(chr(1100 - 1052) + '\x6f' + chr(49) + chr(0b110000 + 0o7) + chr(2032 - 1980), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + chr(53) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + '\x32' + chr(0b101110 + 0o2), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\x32' + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + '\064' + '\067', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(55) + '\065', 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\061' + chr(0b101 + 0o56) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(12297 - 12186) + chr(1218 - 1169) + chr(0b110011) + chr(0b10111 + 0o37), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + '\x30', 9643 - 9635)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1178 - 1130) + '\157' + chr(0b110000 + 0o5) + chr(0b11 + 0o55), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x8a'), chr(100) + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(100) + chr(0b111 + 0o136))(chr(0b1110101) + '\164' + chr(0b110010 + 0o64) + chr(45) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Pe8smzX7Gsur(XEE_WbWc84EQ, w9ejbLfkxZ5I=prCTNMZ4VxbV, **q5n0sHDDTy90): if XEE_WbWc84EQ not in OVm9MAkJq60t or XCtmWrNp_YK6: tlZFbd_9MN8s = q5n0sHDDTy90.GUKetu4xaGsJ(roI3spqORKae(ES5oEprVxulp(b'\xd0\x0b\xe0=?\xa3Q\xeb\x05\xe0\xbe\xb3\x028\xa0)\xd3'), chr(0b1100100) + chr(10010 - 9909) + '\x63' + '\157' + chr(0b100011 + 0o101) + '\145')(chr(0b1110101) + '\164' + chr(0b1011011 + 0o13) + '\055' + '\x38'), {}) h51drLCtDGSb = q5n0sHDDTy90.GUKetu4xaGsJ(roI3spqORKae(ES5oEprVxulp(b'\xd0\x0b\xe0=?\xa3Q\xeb\x05\xff\xb4\xa8\x1d$\xbe'), chr(0b1100100) + '\x65' + '\143' + '\x6f' + chr(0b1011001 + 0o13) + '\145')('\165' + chr(0b1110100) + chr(102) + chr(1987 - 1942) + chr(56)), LmOQ2OtVKamw) if suIjIS24Zkqw(XEE_WbWc84EQ, w9ejbLfkxZ5I): OVm9MAkJq60t[XEE_WbWc84EQ] = XEE_WbWc84EQ if tlZFbd_9MN8s: roI3spqORKae(OVm9MAkJq60t[XEE_WbWc84EQ], roI3spqORKae(ES5oEprVxulp(b'\xf0X\xce9!\x8dO\xe0"\xf8\x9d\x8b'), chr(100) + chr(0b1100101) + chr(8079 - 7980) + '\157' + chr(0b0 + 0o144) + '\145')('\165' + chr(6533 - 6417) + chr(102) + '\x2d' + '\x38'))(tlZFbd_9MN8s) elif roI3spqORKae(ES5oEprVxulp(b'\xae'), chr(0b1011001 + 0o13) + chr(0b1100101) + '\143' + chr(0b1111 + 0o140) + chr(100) + chr(0b1100101))(chr(0b111110 + 0o67) + chr(6829 - 6713) + chr(9483 - 9381) + '\055' + chr(1923 - 1867)) in XEE_WbWc84EQ or roI3spqORKae(ES5oEprVxulp(b'\xdf'), '\x64' + chr(3287 - 3186) + chr(4956 - 4857) + chr(5068 - 4957) + chr(1082 - 982) + '\x65')(chr(0b11010 + 0o133) + '\x74' + chr(0b1100110) + chr(0b101101) + chr(56)) in XEE_WbWc84EQ or roI3spqORKae(ES5oEprVxulp(b'\x81'), '\x64' + '\x65' + chr(0b110111 + 0o54) + chr(0b1101111) + '\144' + chr(1857 - 1756))(chr(0b1110101) + '\x74' + '\146' + chr(0b1010 + 0o43) + chr(152 - 96)) in XEE_WbWc84EQ or (roI3spqORKae(ES5oEprVxulp(b'\x80'), chr(2924 - 2824) + chr(0b1010110 + 0o17) + chr(0b1010010 + 0o21) + chr(0b1101111) + '\x64' + '\x65')('\x75' + chr(0b1110100) + chr(0b111101 + 0o51) + chr(996 - 951) + chr(0b11011 + 0o35)) in XEE_WbWc84EQ): OVm9MAkJq60t[XEE_WbWc84EQ] = w9ejbLfkxZ5I(source=XEE_WbWc84EQ, lookup=h51drLCtDGSb, settings=tlZFbd_9MN8s) else: OVm9MAkJq60t[XEE_WbWc84EQ] = w9ejbLfkxZ5I(name=XEE_WbWc84EQ, lookup=h51drLCtDGSb, settings=tlZFbd_9MN8s) if not OVm9MAkJq60t[XEE_WbWc84EQ]: R8CLIuIktizo(nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(3592 - 3481) + '\x37' + '\066' + chr(0b1011 + 0o51), 0b1000), roI3spqORKae(ES5oEprVxulp(b'\xf0\x0b\xe0=?\xa3Q\xebz\xbb\xfe\xb4_q\xa0!\xd4qS\x88\xa8l\xf5'), chr(0b1100100) + chr(0b1010110 + 0o17) + '\x63' + chr(111) + chr(3559 - 3459) + '\x65')('\165' + '\x74' + chr(5976 - 5874) + chr(1709 - 1664) + chr(0b111000)) % XEE_WbWc84EQ) q5n0sHDDTy90[roI3spqORKae(ES5oEprVxulp(b"\xc5\x0c\xe2?'"), chr(100) + chr(0b1100101) + chr(0b100010 + 0o101) + chr(0b1001010 + 0o45) + chr(0b1100010 + 0o2) + chr(0b1011011 + 0o12))('\165' + chr(0b1001100 + 0o50) + '\x66' + '\055' + chr(222 - 166))] = R8CLIuIktizo q5n0sHDDTy90[roI3spqORKae(ES5oEprVxulp(b'\xd6\x0b\xfc86\xb1Q'), '\144' + chr(0b1100101) + '\143' + chr(0b1101111) + chr(7911 - 7811) + chr(101))(chr(656 - 539) + chr(0b110000 + 0o104) + chr(2368 - 2266) + chr(0b11010 + 0o23) + '\x38')] = fXJOkxXvZqV_ q5n0sHDDTy90[roI3spqORKae(ES5oEprVxulp(b'\xd6\x0b\xfe=<\xacV\xeb'), chr(0b1100100) + '\145' + chr(4805 - 4706) + '\157' + '\144' + chr(7302 - 7201))('\x75' + chr(13195 - 13079) + '\146' + chr(672 - 627) + chr(56))] = k2zzaFDtbuhL return roI3spqORKae(OVm9MAkJq60t[XEE_WbWc84EQ], roI3spqORKae(ES5oEprVxulp(b'\xdd9\xc7\x17%\x8aF\xcd5\xc0\x90\xb7'), '\x64' + chr(2231 - 2130) + chr(1520 - 1421) + '\157' + chr(6444 - 6344) + chr(0b1100101))('\165' + chr(0b1110100) + chr(882 - 780) + chr(45) + chr(56)))(**q5n0sHDDTy90)
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/pympler/util/bottle3.py
Route.tokens
def tokens(self): """ Return a list of (type, value) tokens. """ if not self._tokens: self._tokens = list(self.tokenise(self.route)) return self._tokens
python
def tokens(self): """ Return a list of (type, value) tokens. """ if not self._tokens: self._tokens = list(self.tokenise(self.route)) return self._tokens
[ "def", "tokens", "(", "self", ")", ":", "if", "not", "self", ".", "_tokens", ":", "self", ".", "_tokens", "=", "list", "(", "self", ".", "tokenise", "(", "self", ".", "route", ")", ")", "return", "self", ".", "_tokens" ]
Return a list of (type, value) tokens.
[ "Return", "a", "list", "of", "(", "type", "value", ")", "tokens", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/util/bottle3.py#L204-L208
train
Return a list of ( type value ) tokens.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV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VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(1672 - 1561) + chr(0b1 + 0o61) + chr(0b110111) + '\063', 0b1000), nzTpIcepk0o8(chr(592 - 544) + chr(1576 - 1465) + '\x33' + chr(53) + chr(52), 55771 - 55763), nzTpIcepk0o8(chr(0b110000) + chr(3948 - 3837) + chr(49) + chr(49) + chr(767 - 715), 0o10), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(111) + chr(0b110011 + 0o1) + '\060', 0b1000), nzTpIcepk0o8(chr(48) + chr(3823 - 3712) + chr(0b1000 + 0o52) + chr(0b101000 + 0o13), 0b1000), nzTpIcepk0o8(chr(48) + chr(2383 - 2272) + chr(822 - 771) + chr(1142 - 1091) + chr(0b11110 + 0o31), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(0b11111 + 0o30) + chr(0b0 + 0o66), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\067' + chr(1222 - 1169), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + '\x33', 3324 - 3316), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\x6f' + '\x31' + chr(0b101010 + 0o14) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(7857 - 7746) + '\061' + chr(51) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1865 - 1816) + chr(0b110100) + chr(48), 0b1000), nzTpIcepk0o8(chr(2054 - 2006) + chr(0b101100 + 0o103) + chr(1257 - 1208) + chr(50) + chr(0b11001 + 0o36), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + chr(0b10111 + 0o33), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(2588 - 2537) + chr(0b110000 + 0o2) + chr(2404 - 2351), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11101 + 0o25) + '\x31' + '\x35', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(1743 - 1692) + chr(50) + '\x36', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + '\x33' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(872 - 824) + chr(0b10011 + 0o134) + chr(0b101011 + 0o7) + chr(55) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1000 + 0o147) + chr(2503 - 2448) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\157' + chr(0b10011 + 0o36) + chr(55) + chr(0b11000 + 0o37), ord("\x08")), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(111) + chr(50) + chr(0b110000) + '\067', 16596 - 16588), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + chr(0b110110) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + '\x32' + chr(1614 - 1561), 0b1000), nzTpIcepk0o8(chr(143 - 95) + '\157' + chr(988 - 938) + chr(0b110011) + chr(561 - 513), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(0b10011 + 0o42) + '\067', 28678 - 28670), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1101111) + chr(51) + chr(972 - 922) + chr(48), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1100111 + 0o10) + chr(0b10110 + 0o35) + chr(1202 - 1154) + '\061', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + chr(0b100101 + 0o13) + chr(48), 43901 - 43893), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + '\x31' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101010 + 0o11), 0o10), nzTpIcepk0o8(chr(213 - 165) + chr(2452 - 2341) + '\063' + '\067' + chr(0b110110), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b11111 + 0o30) + chr(690 - 635), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + '\061' + '\065', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(52) + chr(0b110001), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(2426 - 2376) + chr(0b110000) + chr(0b10001 + 0o43), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101011 + 0o4) + chr(1631 - 1579) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\x6f' + chr(1004 - 953) + chr(0b110000) + '\x32', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010) + '\x37' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + '\x30' + '\x31', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(111) + chr(0b10101 + 0o40) + chr(738 - 690), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x95'), chr(2438 - 2338) + chr(0b1100101) + chr(1957 - 1858) + chr(6092 - 5981) + '\x64' + '\x65')(chr(0b1010101 + 0o40) + '\x74' + chr(0b1100110) + chr(45) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def ypL2nDLApKMy(hXMPsSrOQzbh): if not roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe3\x8az\x10`\x96\xbchp\x00\r.'), '\144' + '\145' + chr(99) + chr(11856 - 11745) + '\144' + '\x65')('\x75' + '\x74' + chr(0b1001101 + 0o31) + '\x2d' + chr(1722 - 1666))): hXMPsSrOQzbh.Xf60sIBUksPN = H4NoA26ON7iG(hXMPsSrOQzbh.tokenise(hXMPsSrOQzbh.mzM2DdXBTWZw)) return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe3\x8az\x10`\x96\xbchp\x00\r.'), '\144' + '\145' + '\143' + '\157' + chr(0b1100100) + '\145')(chr(117) + '\164' + '\146' + chr(45) + chr(0b100011 + 0o25)))
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/pympler/util/bottle3.py
Route.tokenise
def tokenise(cls, route): ''' Split a string into an iterator of (type, value) tokens. ''' match = None for match in cls.syntax.finditer(route): pre, name, rex = match.groups() if pre: yield ('TXT', pre.replace('\\:',':')) if rex and name: yield ('VAR', (rex, name)) elif name: yield ('VAR', (cls.default, name)) elif rex: yield ('ANON', rex) if not match: yield ('TXT', route.replace('\\:',':')) elif match.end() < len(route): yield ('TXT', route[match.end():].replace('\\:',':'))
python
def tokenise(cls, route): ''' Split a string into an iterator of (type, value) tokens. ''' match = None for match in cls.syntax.finditer(route): pre, name, rex = match.groups() if pre: yield ('TXT', pre.replace('\\:',':')) if rex and name: yield ('VAR', (rex, name)) elif name: yield ('VAR', (cls.default, name)) elif rex: yield ('ANON', rex) if not match: yield ('TXT', route.replace('\\:',':')) elif match.end() < len(route): yield ('TXT', route[match.end():].replace('\\:',':'))
[ "def", "tokenise", "(", "cls", ",", "route", ")", ":", "match", "=", "None", "for", "match", "in", "cls", ".", "syntax", ".", "finditer", "(", "route", ")", ":", "pre", ",", "name", ",", "rex", "=", "match", ".", "groups", "(", ")", "if", "pre", ":", "yield", "(", "'TXT'", ",", "pre", ".", "replace", "(", "'\\\\:'", ",", "':'", ")", ")", "if", "rex", "and", "name", ":", "yield", "(", "'VAR'", ",", "(", "rex", ",", "name", ")", ")", "elif", "name", ":", "yield", "(", "'VAR'", ",", "(", "cls", ".", "default", ",", "name", ")", ")", "elif", "rex", ":", "yield", "(", "'ANON'", ",", "rex", ")", "if", "not", "match", ":", "yield", "(", "'TXT'", ",", "route", ".", "replace", "(", "'\\\\:'", ",", "':'", ")", ")", "elif", "match", ".", "end", "(", ")", "<", "len", "(", "route", ")", ":", "yield", "(", "'TXT'", ",", "route", "[", "match", ".", "end", "(", ")", ":", "]", ".", "replace", "(", "'\\\\:'", ",", "':'", ")", ")" ]
Split a string into an iterator of (type, value) tokens.
[ "Split", "a", "string", "into", "an", "iterator", "of", "(", "type", "value", ")", "tokens", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/util/bottle3.py#L211-L223
train
Split a string into an iterator of ( type value ) tokens.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o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OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(48) + '\065', 17677 - 17669), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b1011101 + 0o22) + '\x31' + '\063' + '\065', 0o10), nzTpIcepk0o8('\060' + chr(5243 - 5132) + '\062' + chr(1607 - 1555) + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(550 - 496) + chr(0b110100 + 0o3), 0o10), nzTpIcepk0o8(chr(2277 - 2229) + chr(0b1100101 + 0o12) + chr(1086 - 1032) + chr(282 - 232), 30666 - 30658), nzTpIcepk0o8(chr(1126 - 1078) + chr(0b10 + 0o155) + chr(53) + '\062', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b101011 + 0o6) + chr(51) + chr(55), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b10010 + 0o135) + '\x31' + chr(2596 - 2545) + chr(0b1100 + 0o46), ord("\x08")), nzTpIcepk0o8('\060' + chr(168 - 57) + chr(1890 - 1840) + chr(51) + chr(441 - 390), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + chr(0b110010) + chr(52), 33639 - 33631), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1101111) + chr(823 - 772) + chr(52) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b101011 + 0o104) + chr(49) + chr(89 - 39) + chr(53), 27420 - 27412), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\157' + chr(52) + '\x35', 53863 - 53855), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b1101111) + '\061' + chr(0b110100) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1 + 0o156) + '\062' + chr(0b110110) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\x30' + chr(6440 - 6329) + chr(0b110100) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x35' + chr(0b110100), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + '\065' + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110000 + 0o2) + chr(0b110001) + chr(0b1111 + 0o45), ord("\x08")), nzTpIcepk0o8('\x30' + chr(3454 - 3343) + chr(0b110001) + '\067' + chr(0b110110), 35906 - 35898), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b101010 + 0o10) + chr(0b11010 + 0o26), 0b1000), nzTpIcepk0o8('\060' + chr(0b1001011 + 0o44) + chr(51) + '\062' + chr(53), 60328 - 60320), nzTpIcepk0o8('\060' + chr(0b1101111) + '\061' + '\064' + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x34' + chr(0b10100 + 0o36), 25343 - 25335), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(10472 - 10361) + chr(510 - 459) + chr(54), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b10100 + 0o41), 0b1000), nzTpIcepk0o8(chr(406 - 358) + chr(111) + chr(50) + chr(1707 - 1652) + chr(0b110011), 14164 - 14156), nzTpIcepk0o8('\x30' + chr(11309 - 11198) + '\063' + chr(0b1011 + 0o50) + chr(0b100011 + 0o15), 0o10), nzTpIcepk0o8(chr(517 - 469) + chr(0b1101111) + chr(0b110011) + chr(583 - 531) + '\066', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(639 - 589) + chr(1783 - 1734) + '\x33', 0b1000), nzTpIcepk0o8('\x30' + chr(7000 - 6889) + '\x31' + chr(200 - 145) + chr(0b100101 + 0o17), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1011010 + 0o25) + '\061' + '\066' + chr(0b1100 + 0o44), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10000 + 0o43) + chr(0b110110), 8), nzTpIcepk0o8(chr(151 - 103) + chr(111) + chr(1970 - 1921) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + chr(49) + '\066', 0b1000), nzTpIcepk0o8(chr(1483 - 1435) + chr(5270 - 5159) + '\063' + chr(0b101000 + 0o10) + chr(899 - 848), 55543 - 55535), nzTpIcepk0o8(chr(1643 - 1595) + chr(0b1100001 + 0o16) + '\061' + chr(55) + chr(1351 - 1302), 24057 - 24049), nzTpIcepk0o8('\x30' + chr(11638 - 11527) + '\x31' + chr(1132 - 1077), 0o10), nzTpIcepk0o8(chr(48) + chr(0b100111 + 0o110) + chr(0b11011 + 0o32) + chr(1831 - 1776), 0b1000), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\157' + '\x33' + chr(0b110111) + '\061', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b0 + 0o157) + chr(53) + '\x30', 22653 - 22645)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'k'), chr(100) + chr(0b1001101 + 0o30) + chr(0b1100010 + 0o1) + chr(0b111111 + 0o60) + '\144' + chr(0b10001 + 0o124))('\165' + chr(1599 - 1483) + '\146' + chr(790 - 745) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Zk9KsIcMUABl(_1vzISbJ_R2i, mzM2DdXBTWZw): hk9OijmiC_zA = None for hk9OijmiC_zA in roI3spqORKae(_1vzISbJ_R2i.syntax, roI3spqORKae(ES5oEprVxulp(b'#4\xc8S[^:('), '\144' + '\145' + '\x63' + chr(0b1101111) + '\144' + chr(2574 - 2473))(chr(7494 - 7377) + chr(11787 - 11671) + chr(0b1100110) + chr(1235 - 1190) + chr(56)))(mzM2DdXBTWZw): (LtsSR25KaYhL, SLVB2BPA_mIe, x2wKwtDvhnj6) = hk9OijmiC_zA.Npj4un59pdkA() if LtsSR25KaYhL: yield (roI3spqORKae(ES5oEprVxulp(b'\x11\x05\xf2'), '\144' + chr(7998 - 7897) + '\x63' + chr(0b1101111) + chr(100) + chr(101))(chr(0b1110101) + '\x74' + chr(0b1100110) + '\055' + chr(2865 - 2809)), roI3spqORKae(LtsSR25KaYhL, roI3spqORKae(ES5oEprVxulp(b'\x00d\x97SP[\x10\x00\xc3\xd6\x94\x1f'), '\144' + chr(796 - 695) + chr(99) + '\157' + chr(0b1100100) + chr(8663 - 8562))(chr(0b1001001 + 0o54) + '\164' + '\146' + chr(45) + chr(0b1010 + 0o56)))(roI3spqORKae(ES5oEprVxulp(b'\x19g'), chr(0b1011110 + 0o6) + chr(101) + chr(99) + chr(111) + chr(0b1100100) + '\145')('\x75' + '\x74' + chr(0b1011011 + 0o13) + chr(45) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\x7f'), chr(0b1100100) + '\x65' + '\143' + chr(230 - 119) + '\144' + chr(1362 - 1261))(chr(117) + '\164' + chr(102) + chr(45) + chr(0b11011 + 0o35)))) if x2wKwtDvhnj6 and SLVB2BPA_mIe: yield (roI3spqORKae(ES5oEprVxulp(b'\x13\x1c\xf4'), '\144' + chr(6550 - 6449) + chr(0b1100011) + '\x6f' + chr(1110 - 1010) + '\x65')(chr(117) + '\164' + chr(8594 - 8492) + '\055' + '\070'), (x2wKwtDvhnj6, SLVB2BPA_mIe)) elif SLVB2BPA_mIe: yield (roI3spqORKae(ES5oEprVxulp(b'\x13\x1c\xf4'), chr(7283 - 7183) + chr(0b1001010 + 0o33) + '\143' + '\157' + '\x64' + chr(0b1100101))('\165' + chr(5897 - 5781) + chr(2913 - 2811) + '\055' + chr(454 - 398)), (roI3spqORKae(_1vzISbJ_R2i, roI3spqORKae(ES5oEprVxulp(b'\x120\xf4uQB\r\x0e\xfe\xf5\xa0!'), '\144' + '\145' + chr(0b1100011) + chr(111) + '\x64' + chr(5197 - 5096))('\165' + '\164' + '\146' + '\055' + '\070')), SLVB2BPA_mIe)) elif x2wKwtDvhnj6: yield (roI3spqORKae(ES5oEprVxulp(b'\x04\x13\xe9y'), chr(4804 - 4704) + chr(0b11 + 0o142) + chr(585 - 486) + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(0b111 + 0o156) + '\164' + chr(0b10100 + 0o122) + '\x2d' + '\x38'), x2wKwtDvhnj6) if not hk9OijmiC_zA: yield (roI3spqORKae(ES5oEprVxulp(b'\x11\x05\xf2'), chr(0b1111 + 0o125) + chr(0b1000010 + 0o43) + '\x63' + chr(0b1101111) + chr(100) + '\x65')('\x75' + chr(116) + chr(0b1 + 0o145) + chr(0b11 + 0o52) + '\x38'), roI3spqORKae(mzM2DdXBTWZw, roI3spqORKae(ES5oEprVxulp(b'\x00d\x97SP[\x10\x00\xc3\xd6\x94\x1f'), chr(6518 - 6418) + chr(0b10011 + 0o122) + '\143' + chr(0b110001 + 0o76) + chr(0b100111 + 0o75) + chr(0b11110 + 0o107))('\x75' + chr(0b111100 + 0o70) + chr(4946 - 4844) + chr(45) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\x19g'), '\x64' + '\x65' + chr(1486 - 1387) + chr(0b1011 + 0o144) + '\144' + chr(0b110100 + 0o61))(chr(117) + chr(0b1000000 + 0o64) + '\146' + '\055' + chr(2357 - 2301)), roI3spqORKae(ES5oEprVxulp(b'\x7f'), '\x64' + '\145' + '\143' + chr(3128 - 3017) + '\x64' + '\x65')('\165' + chr(0b1110100) + '\x66' + '\055' + chr(56)))) elif roI3spqORKae(hk9OijmiC_zA, roI3spqORKae(ES5oEprVxulp(b'\x0b4\xf1aXk\x084\xab\xf8\xd2\x01'), '\x64' + chr(101) + chr(0b1100011) + '\x6f' + chr(416 - 316) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(0b10110 + 0o27) + '\070'))() < ftfygxgFas5X(mzM2DdXBTWZw): yield (roI3spqORKae(ES5oEprVxulp(b'\x11\x05\xf2'), chr(3543 - 3443) + chr(0b1100101) + chr(0b1001101 + 0o26) + '\x6f' + chr(100) + chr(3724 - 3623))('\x75' + chr(0b1010000 + 0o44) + '\x66' + '\x2d' + '\070'), roI3spqORKae(mzM2DdXBTWZw[hk9OijmiC_zA.end():], roI3spqORKae(ES5oEprVxulp(b'\x00d\x97SP[\x10\x00\xc3\xd6\x94\x1f'), chr(7132 - 7032) + chr(101) + '\143' + '\157' + chr(0b111000 + 0o54) + '\145')(chr(0b1110101) + chr(116) + chr(0b1001111 + 0o27) + '\055' + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\x19g'), chr(5750 - 5650) + '\x65' + '\143' + '\157' + chr(4863 - 4763) + chr(2856 - 2755))('\165' + chr(5388 - 5272) + chr(5204 - 5102) + chr(0b10111 + 0o26) + chr(0b11 + 0o65)), roI3spqORKae(ES5oEprVxulp(b'\x7f'), '\144' + chr(0b11 + 0o142) + chr(99) + chr(0b1101111) + chr(100) + chr(9543 - 9442))(chr(117) + chr(0b1110100) + '\x66' + chr(1078 - 1033) + chr(0b100110 + 0o22))))
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/pympler/util/bottle3.py
Route.group_re
def group_re(self): ''' Return a regexp pattern with named groups ''' out = '' for token, data in self.tokens(): if token == 'TXT': out += re.escape(data) elif token == 'VAR': out += '(?P<%s>%s)' % (data[1], data[0]) elif token == 'ANON': out += '(?:%s)' % data return out
python
def group_re(self): ''' Return a regexp pattern with named groups ''' out = '' for token, data in self.tokens(): if token == 'TXT': out += re.escape(data) elif token == 'VAR': out += '(?P<%s>%s)' % (data[1], data[0]) elif token == 'ANON': out += '(?:%s)' % data return out
[ "def", "group_re", "(", "self", ")", ":", "out", "=", "''", "for", "token", ",", "data", "in", "self", ".", "tokens", "(", ")", ":", "if", "token", "==", "'TXT'", ":", "out", "+=", "re", ".", "escape", "(", "data", ")", "elif", "token", "==", "'VAR'", ":", "out", "+=", "'(?P<%s>%s)'", "%", "(", "data", "[", "1", "]", ",", "data", "[", "0", "]", ")", "elif", "token", "==", "'ANON'", ":", "out", "+=", "'(?:%s)'", "%", "data", "return", "out" ]
Return a regexp pattern with named groups
[ "Return", "a", "regexp", "pattern", "with", "named", "groups" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/util/bottle3.py#L225-L232
train
Return a regexp pattern with named groups
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,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zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(54) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(8101 - 7990) + chr(502 - 451) + chr(52) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(0b110110) + '\x34', 63391 - 63383), nzTpIcepk0o8('\x30' + chr(2178 - 2067) + chr(49) + chr(0b0 + 0o60) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(7911 - 7800) + chr(2226 - 2176) + chr(0b110110) + chr(0b1111 + 0o43), 20737 - 20729), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + chr(53) + '\x32', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(246 - 197) + chr(0b10111 + 0o36) + chr(221 - 166), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x37' + chr(50), 37884 - 37876), nzTpIcepk0o8('\x30' + chr(0b1101010 + 0o5) + chr(0b10000 + 0o42) + '\061' + chr(53), 0o10), nzTpIcepk0o8(chr(48) + chr(5698 - 5587) + chr(49) + chr(0b110010) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(450 - 402) + chr(0b101110 + 0o101) + '\x33' + chr(0b100110 + 0o16) + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + chr(1737 - 1688) + chr(0b1010 + 0o52), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(8106 - 7995) + '\064' + chr(1862 - 1811), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1943 - 1894), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(896 - 847) + '\064', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(4854 - 4743) + chr(875 - 826) + chr(51) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b111 + 0o51) + '\157' + chr(0b110001) + '\064' + chr(0b10011 + 0o42), 0b1000), nzTpIcepk0o8(chr(48) + chr(12289 - 12178) + chr(733 - 683) + chr(602 - 553) + chr(0b110001), 26491 - 26483), nzTpIcepk0o8(chr(0b110000) + chr(0b100111 + 0o110) + chr(1379 - 1328) + chr(0b110111) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(2273 - 2225) + chr(2238 - 2127) + '\x33' + chr(1750 - 1698) + chr(0b100111 + 0o15), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + chr(0b110110) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(51), 44626 - 44618), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + chr(0b110100) + chr(53), 43091 - 43083), nzTpIcepk0o8(chr(600 - 552) + chr(8907 - 8796) + chr(51) + chr(0b111 + 0o60) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\157' + '\x32' + '\x35' + chr(1633 - 1578), 12664 - 12656), nzTpIcepk0o8('\060' + chr(0b110010 + 0o75) + chr(0b110001) + '\062' + chr(0b11001 + 0o34), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(65 - 15) + chr(0b110111) + '\066', ord("\x08")), nzTpIcepk0o8(chr(481 - 433) + chr(0b1100100 + 0o13) + '\x32' + chr(0b100001 + 0o25) + chr(53), 0b1000), nzTpIcepk0o8('\060' + chr(1232 - 1121) + chr(0b101010 + 0o7) + chr(1539 - 1491) + '\061', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + chr(49) + chr(0b100010 + 0o25), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + chr(49) + chr(0b1001 + 0o53), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + chr(53) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(52) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2396 - 2347) + chr(1635 - 1584) + chr(53), 35899 - 35891), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(54) + chr(0b110111), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + '\067', 0b1000), nzTpIcepk0o8(chr(1816 - 1768) + '\157' + chr(0b110011) + '\x33', 53075 - 53067), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(819 - 764), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + chr(0b110101) + chr(2363 - 2311), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(462 - 414) + chr(111) + chr(0b10011 + 0o42) + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x1a'), '\x64' + '\x65' + chr(0b10010 + 0o121) + chr(111) + chr(100) + chr(0b1100101))('\165' + chr(0b100100 + 0o120) + chr(102) + chr(45) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def _kmLdrRyEy10(hXMPsSrOQzbh): VwOu8WkJ9cpc = roI3spqORKae(ES5oEprVxulp(b''), chr(3496 - 3396) + chr(0b1100101) + '\x63' + chr(111) + chr(130 - 30) + '\145')('\165' + '\x74' + '\146' + chr(45) + chr(0b100001 + 0o27)) for (Hd4nWPplSa3h, FfKOThdpoDTb) in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'M\x978v\xdc.#{\xfd\x1e\xa9\xf5'), chr(7666 - 7566) + '\x65' + chr(99) + '\x6f' + chr(100) + chr(101))(chr(117) + chr(5080 - 4964) + chr(102) + chr(352 - 307) + chr(0b10000 + 0o50)))(): if Hd4nWPplSa3h == roI3spqORKae(ES5oEprVxulp(b'`\xbf '), chr(0b1100100) + '\145' + chr(0b1100011) + '\157' + chr(6769 - 6669) + chr(0b1100101))('\165' + chr(7895 - 7779) + chr(0b111 + 0o137) + '\055' + chr(0b111000)): VwOu8WkJ9cpc += aoTc4YA2bs2R.lfFf1I73PDZv(FfKOThdpoDTb) elif Hd4nWPplSa3h == roI3spqORKae(ES5oEprVxulp(b'b\xa6&'), '\x64' + chr(0b1101 + 0o130) + '\143' + chr(111) + chr(0b1000011 + 0o41) + chr(101))(chr(0b1110101) + chr(116) + chr(0b1100110) + '\055' + '\x38'): VwOu8WkJ9cpc += roI3spqORKae(ES5oEprVxulp(b'\x1c\xd8$x\x97\x19Q\x1f\xfe|'), chr(0b111110 + 0o46) + '\145' + chr(0b11010 + 0o111) + chr(0b101111 + 0o100) + '\x64' + chr(101))(chr(0b101 + 0o160) + '\164' + '\146' + chr(1748 - 1703) + chr(0b1110 + 0o52)) % (FfKOThdpoDTb[nzTpIcepk0o8('\060' + chr(111) + '\061', 8)], FfKOThdpoDTb[nzTpIcepk0o8('\060' + chr(7767 - 7656) + chr(0b11000 + 0o30), 0o10)]) elif Hd4nWPplSa3h == roI3spqORKae(ES5oEprVxulp(b'u\xa9;\n'), chr(8426 - 8326) + chr(0b1100101) + chr(0b1101 + 0o126) + chr(111) + chr(0b1000 + 0o134) + chr(3649 - 3548))(chr(117) + chr(116) + chr(0b1100110) + '\x2d' + '\x38'): VwOu8WkJ9cpc += roI3spqORKae(ES5oEprVxulp(b'\x1c\xd8Na\xc1C'), chr(9917 - 9817) + chr(0b1100101) + '\x63' + chr(0b101010 + 0o105) + chr(0b1001000 + 0o34) + chr(6428 - 6327))(chr(117) + chr(116) + chr(0b11101 + 0o111) + chr(0b101101) + '\x38') % FfKOThdpoDTb return VwOu8WkJ9cpc
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/pympler/util/bottle3.py
Route.format_str
def format_str(self): ''' Return a format string with named fields. ''' if self.static: return self.route.replace('%','%%') out, i = '', 0 for token, value in self.tokens(): if token == 'TXT': out += value.replace('%','%%') elif token == 'ANON': out += '%%(anon%d)s' % i; i+=1 elif token == 'VAR': out += '%%(%s)s' % value[1] return out
python
def format_str(self): ''' Return a format string with named fields. ''' if self.static: return self.route.replace('%','%%') out, i = '', 0 for token, value in self.tokens(): if token == 'TXT': out += value.replace('%','%%') elif token == 'ANON': out += '%%(anon%d)s' % i; i+=1 elif token == 'VAR': out += '%%(%s)s' % value[1] return out
[ "def", "format_str", "(", "self", ")", ":", "if", "self", ".", "static", ":", "return", "self", ".", "route", ".", "replace", "(", "'%'", ",", "'%%'", ")", "out", ",", "i", "=", "''", ",", "0", "for", "token", ",", "value", "in", "self", ".", "tokens", "(", ")", ":", "if", "token", "==", "'TXT'", ":", "out", "+=", "value", ".", "replace", "(", "'%'", ",", "'%%'", ")", "elif", "token", "==", "'ANON'", ":", "out", "+=", "'%%(anon%d)s'", "%", "i", "i", "+=", "1", "elif", "token", "==", "'VAR'", ":", "out", "+=", "'%%(%s)s'", "%", "value", "[", "1", "]", "return", "out" ]
Return a format string with named fields.
[ "Return", "a", "format", "string", "with", "named", "fields", "." ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/util/bottle3.py#L238-L247
train
Return a format string with named fields.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKpyPtQ,z18h6aCn31dg,oxjHmqoBrCHG,GA4ANb_Tki5v,LdFlJR2ssk3y,g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viv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\x6f' + '\064' + chr(50), 49671 - 49663), nzTpIcepk0o8(chr(48) + '\157' + chr(0b11100 + 0o25) + '\067' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + '\063' + chr(558 - 504), 0o10), nzTpIcepk0o8('\060' + chr(0b1001101 + 0o42) + '\x32' + chr(952 - 902) + chr(48), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100100 + 0o16) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(148 - 100) + chr(11086 - 10975) + chr(0b100110 + 0o15) + '\x36' + '\067', 0b1000), nzTpIcepk0o8('\060' + chr(3561 - 3450) + '\061' + '\063' + '\x30', 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + '\065' + '\x33', ord("\x08")), nzTpIcepk0o8('\060' + chr(3491 - 3380) + chr(0b110001) + chr(0b110011) + chr(67 - 17), 40592 - 40584), nzTpIcepk0o8(chr(654 - 606) + chr(0b1011000 + 0o27) + chr(0b1111 + 0o45) + '\x37', 0b1000), nzTpIcepk0o8('\060' + chr(0b101101 + 0o102) + chr(0b10101 + 0o34) + chr(0b10000 + 0o42) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\063' + '\061' + chr(55), 0b1000), nzTpIcepk0o8(chr(1708 - 1660) + chr(111) + chr(0b11111 + 0o24) + chr(384 - 330), 45672 - 45664), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(857 - 808) + chr(50) + '\x33', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b111000 + 0o67) + chr(2305 - 2256) + '\x32', 0b1000), nzTpIcepk0o8(chr(843 - 795) + chr(0b1001011 + 0o44) + chr(2075 - 2026) + chr(1322 - 1268), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(6252 - 6141) + chr(53) + chr(0b110111), 7361 - 7353), nzTpIcepk0o8('\x30' + chr(111) + chr(0b11000 + 0o32) + '\067' + chr(0b11101 + 0o32), 0b1000), nzTpIcepk0o8(chr(290 - 242) + chr(3150 - 3039) + '\063' + chr(52), 51679 - 51671), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2223 - 2171) + chr(54), 17885 - 17877), nzTpIcepk0o8('\x30' + '\x6f' + chr(926 - 877) + '\064' + chr(52), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1000010 + 0o55) + '\x31' + chr(53) + '\x37', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + '\063' + chr(51), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(54) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1000100 + 0o53) + chr(50) + '\065' + chr(54), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(2090 - 2041) + '\065' + '\x33', 8), nzTpIcepk0o8('\060' + chr(9258 - 9147) + '\x32' + chr(2542 - 2489) + '\x34', 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x32' + chr(0b110011) + chr(0b101 + 0o56), 8), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(111) + '\x33' + chr(0b110111) + chr(2557 - 2502), 47137 - 47129), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(9976 - 9865) + '\x33' + '\x35' + '\060', 11619 - 11611), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10100 + 0o36) + chr(0b101100 + 0o4) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(859 - 809) + chr(0b101011 + 0o13) + '\067', ord("\x08")), nzTpIcepk0o8(chr(1996 - 1948) + chr(111) + chr(0b11 + 0o57) + chr(49) + '\x34', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(49) + '\061' + '\x36', 49640 - 49632), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(111) + chr(0b11 + 0o55), 16485 - 16477), nzTpIcepk0o8('\060' + chr(111) + chr(51) + '\x37' + '\x30', 0o10), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b110101 + 0o72) + chr(0b111 + 0o53) + '\x31' + chr(0b11011 + 0o26), 14675 - 14667), nzTpIcepk0o8(chr(0b110000) + chr(0b0 + 0o157) + chr(0b110001) + chr(2684 - 2631) + chr(1707 - 1657), 59871 - 59863), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + chr(52) + chr(52), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b110100 + 0o73) + '\x36' + chr(55), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110101) + chr(1577 - 1529), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x0c'), chr(6898 - 6798) + '\x65' + chr(99) + '\x6f' + chr(100) + '\145')(chr(11583 - 11466) + chr(0b110110 + 0o76) + '\146' + '\x2d' + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def jERIMz5sp_mN(hXMPsSrOQzbh): if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'x\x02\x11\xd2Q\xc5j\x1b2\x10b\xaa'), chr(0b111010 + 0o52) + chr(0b1100101) + chr(0b11000 + 0o113) + '\x6f' + chr(100) + '\x65')('\x75' + chr(0b111001 + 0o73) + '\146' + chr(0b100 + 0o51) + chr(614 - 558))): return roI3spqORKae(hXMPsSrOQzbh.route, roI3spqORKae(ES5oEprVxulp(b'gAo\xf4r\x86\x171\x02e&\x85'), chr(5721 - 5621) + '\145' + chr(0b1100011) + chr(0b1101111) + chr(100) + '\145')(chr(0b100110 + 0o117) + chr(0b1100101 + 0o17) + '\x66' + chr(0b101101) + chr(2134 - 2078)))(roI3spqORKae(ES5oEprVxulp(b'\x07'), chr(100) + chr(4891 - 4790) + '\x63' + chr(111) + chr(100) + chr(101))(chr(117) + chr(0b10010 + 0o142) + chr(102) + chr(45) + chr(1878 - 1822)), roI3spqORKae(ES5oEprVxulp(b'\x07]'), chr(0b111111 + 0o45) + chr(0b1100101) + '\143' + '\x6f' + chr(0b1100100) + '\145')(chr(0b1000000 + 0o65) + chr(116) + chr(102) + chr(917 - 872) + '\070')) (VwOu8WkJ9cpc, ZlbFMSG8gCoF) = (roI3spqORKae(ES5oEprVxulp(b''), chr(0b1100100) + chr(101) + chr(0b10001 + 0o122) + chr(111) + chr(8111 - 8011) + chr(0b1100101))(chr(0b1110101) + '\x74' + '\146' + chr(282 - 237) + '\x38'), nzTpIcepk0o8('\060' + '\x6f' + chr(0b101 + 0o53), 8)) for (Hd4nWPplSa3h, uV9iBiw0y_Mp) in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'[\x08\x12\xa2~\xb3\x14**l\x1b\xb6'), chr(114 - 14) + chr(1709 - 1608) + chr(2885 - 2786) + chr(8213 - 8102) + '\x64' + chr(0b1100101))('\165' + chr(4072 - 3956) + '\x66' + chr(442 - 397) + chr(0b11000 + 0o40)))(): if Hd4nWPplSa3h == roI3spqORKae(ES5oEprVxulp(b'v \n'), chr(9743 - 9643) + chr(101) + chr(0b1100011) + '\157' + chr(3028 - 2928) + chr(9723 - 9622))(chr(12536 - 12419) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + chr(0b111000)): VwOu8WkJ9cpc += uV9iBiw0y_Mp.E91dbqOZXBpJ(roI3spqORKae(ES5oEprVxulp(b'\x07'), chr(0b10011 + 0o121) + chr(0b110100 + 0o61) + chr(0b111001 + 0o52) + chr(0b1101111) + chr(0b1100100) + chr(1445 - 1344))('\165' + chr(116) + '\146' + chr(45) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\x07]'), chr(100) + chr(2583 - 2482) + '\x63' + chr(111) + chr(0b1001010 + 0o32) + chr(0b1100101))(chr(117) + chr(0b1101111 + 0o5) + chr(0b1100110) + '\x2d' + chr(3053 - 2997))) elif Hd4nWPplSa3h == roI3spqORKae(ES5oEprVxulp(b'c6\x11\xde'), chr(100) + chr(0b101100 + 0o71) + chr(99) + chr(111) + chr(0b100110 + 0o76) + chr(0b100110 + 0o77))(chr(0b1000111 + 0o56) + '\x74' + chr(0b1011 + 0o133) + '\055' + '\070'): VwOu8WkJ9cpc += roI3spqORKae(ES5oEprVxulp(b'\x07]v\xf1~\x986N>\x0e%'), chr(100) + chr(3080 - 2979) + chr(0b0 + 0o143) + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(117) + '\x74' + chr(0b11011 + 0o113) + chr(45) + '\070') % ZlbFMSG8gCoF ZlbFMSG8gCoF += nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31', 0o10) elif Hd4nWPplSa3h == roI3spqORKae(ES5oEprVxulp(b't9\x0c'), chr(100) + chr(5513 - 5412) + chr(0b1010101 + 0o16) + '\x6f' + chr(0b1100100) + '\145')('\x75' + chr(13384 - 13268) + '\x66' + chr(0b100001 + 0o14) + chr(0b11111 + 0o31)): VwOu8WkJ9cpc += roI3spqORKae(ES5oEprVxulp(b'\x07]v\xb5c\xde+'), '\144' + '\145' + chr(0b1100011) + chr(4154 - 4043) + '\x64' + chr(101))('\165' + chr(0b1110100) + '\146' + '\x2d' + chr(0b10110 + 0o42)) % uV9iBiw0y_Mp[nzTpIcepk0o8(chr(412 - 364) + chr(0b1101111) + chr(1359 - 1310), 8)] return VwOu8WkJ9cpc
lrq3000/pyFileFixity
pyFileFixity/lib/profilers/visual/pympler/util/bottle3.py
Route.is_dynamic
def is_dynamic(self): ''' Return true if the route contains dynamic parts ''' if not self._static: for token, value in self.tokens(): if token != 'TXT': return True self._static = True return False
python
def is_dynamic(self): ''' Return true if the route contains dynamic parts ''' if not self._static: for token, value in self.tokens(): if token != 'TXT': return True self._static = True return False
[ "def", "is_dynamic", "(", "self", ")", ":", "if", "not", "self", ".", "_static", ":", "for", "token", ",", "value", "in", "self", ".", "tokens", "(", ")", ":", "if", "token", "!=", "'TXT'", ":", "return", "True", "self", ".", "_static", "=", "True", "return", "False" ]
Return true if the route contains dynamic parts
[ "Return", "true", "if", "the", "route", "contains", "dynamic", "parts" ]
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/util/bottle3.py#L253-L260
train
Return true if the route contains dynamic parts
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,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vi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(5216 - 5105) + chr(273 - 223) + chr(0b101000 + 0o16) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101011 + 0o7) + chr(0b10111 + 0o36) + chr(89 - 38), 0b1000), nzTpIcepk0o8('\060' + chr(0b1100 + 0o143) + chr(0b110001) + chr(194 - 144) + chr(0b110110), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x32' + chr(0b110110) + chr(2051 - 2000), 0o10), nzTpIcepk0o8(chr(690 - 642) + '\157' + chr(440 - 389) + chr(0b1001 + 0o52) + chr(55), 0o10), nzTpIcepk0o8(chr(244 - 196) + chr(111) + chr(0b110001) + '\x37' + '\x35', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + chr(0b110010) + chr(0b1 + 0o62), 0o10), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(111) + '\062' + chr(54 - 2) + chr(0b110 + 0o56), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(4591 - 4480) + chr(754 - 704) + chr(0b110011) + '\x33', 0o10), nzTpIcepk0o8(chr(48) + chr(0b100011 + 0o114) + chr(50) + chr(1083 - 1031) + chr(0b101010 + 0o11), 0o10), nzTpIcepk0o8(chr(48) + chr(0b100101 + 0o112) + chr(49) + chr(52), 0o10), nzTpIcepk0o8(chr(70 - 22) + '\x6f' + chr(1373 - 1324) + '\064' + chr(2857 - 2803), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b111101 + 0o62) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1100 + 0o143) + chr(0b110001) + '\x31' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\x32' + chr(0b110101) + '\060', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(0b110101) + '\063', 0o10), nzTpIcepk0o8(chr(59 - 11) + chr(111) + chr(0b110001) + chr(0b110100) + chr(0b10000 + 0o41), 22245 - 22237), nzTpIcepk0o8('\060' + chr(0b10010 + 0o135) + '\x31' + '\x33' + '\x36', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + '\x30' + chr(1545 - 1497), 0b1000), nzTpIcepk0o8(chr(1115 - 1067) + '\157' + chr(53) + chr(54), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(1601 - 1552) + '\x32' + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + '\062', 0o10), nzTpIcepk0o8('\060' + chr(0b1101011 + 0o4) + '\061' + '\067', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b101100 + 0o103) + chr(2069 - 2014) + '\x30', 41339 - 41331), nzTpIcepk0o8('\060' + chr(0b110100 + 0o73) + chr(871 - 817) + chr(0b11001 + 0o36), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(7893 - 7782) + chr(0b110010) + '\062' + '\x31', 43638 - 43630), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110110) + chr(1111 - 1056), 8), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b101 + 0o152) + chr(0b110010) + '\066', 54849 - 54841), nzTpIcepk0o8('\060' + chr(0b10110 + 0o131) + chr(0b110101) + chr(2432 - 2380), 23825 - 23817), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + chr(51) + chr(49), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(0b111 + 0o52) + chr(0b101000 + 0o12), ord("\x08")), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1100 + 0o143) + chr(0b110011) + chr(0b110110) + chr(0b10100 + 0o43), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b100110 + 0o13) + chr(0b110101 + 0o1), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + chr(631 - 581) + chr(0b100101 + 0o21), 8), nzTpIcepk0o8(chr(1923 - 1875) + chr(2656 - 2545) + '\x35' + '\x36', 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1493 - 1444) + chr(0b110110) + chr(286 - 237), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(1795 - 1684) + chr(51) + chr(0b1101 + 0o45) + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(1146 - 1097) + '\061' + chr(0b11110 + 0o26), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(0b110001) + chr(1668 - 1617), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + chr(590 - 536) + chr(935 - 886), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(111) + chr(0b110101) + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x98'), chr(100) + chr(101) + '\x63' + chr(111) + '\x64' + '\x65')(chr(0b1110101) + chr(0b1110100) + '\146' + '\x2d' + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def ALrPb5YPcCTE(hXMPsSrOQzbh): if not roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe9\xd8"\xd2\xab\x14\xf0'), chr(6831 - 6731) + chr(0b1001110 + 0o27) + '\143' + '\x6f' + chr(5491 - 5391) + chr(0b10101 + 0o120))(chr(117) + chr(116) + '\146' + '\x2d' + '\070')): for (Hd4nWPplSa3h, uV9iBiw0y_Mp) in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xcf\xdb\x1a\x81\xb19\xdf\xe5\xeb\xe8A\x1f'), chr(0b0 + 0o144) + chr(3221 - 3120) + chr(3173 - 3074) + chr(0b1101111) + chr(327 - 227) + chr(0b11010 + 0o113))(chr(9542 - 9425) + chr(0b111011 + 0o71) + chr(6323 - 6221) + chr(756 - 711) + chr(0b10111 + 0o41)))(): if Hd4nWPplSa3h != roI3spqORKae(ES5oEprVxulp(b'\xe2\xf3\x02'), '\144' + chr(0b1100101) + '\143' + '\157' + chr(8599 - 8499) + '\x65')('\x75' + '\x74' + chr(102) + chr(45) + '\x38'): return nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b1101111) + chr(49), 0o10) hXMPsSrOQzbh.Kw5XMXZRZfY8 = nzTpIcepk0o8(chr(0b110 + 0o52) + chr(111) + chr(1755 - 1706), 8) return nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(111) + chr(0b110000 + 0o0), 51437 - 51429)