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/header_ecc.py
|
compute_ecc_hash
|
def compute_ecc_hash(ecc_manager, hasher, buf, max_block_size, rate, message_size=None, as_string=False):
'''Split a string in blocks given max_block_size and compute the hash and ecc for each block, and then return a nice list with both for easy processing.'''
result = []
# If required parameters were not provided, we compute them
if not message_size:
ecc_params = compute_ecc_params(max_block_size, rate, hasher)
message_size = ecc_params["message_size"]
# Split the buffer string in blocks (necessary for Reed-Solomon encoding because it's limited to 255 characters max)
for i in xrange(0, len(buf), message_size):
# Compute the message block
mes = buf[i:i+message_size]
# Compute the ecc
ecc = ecc_manager.encode(mes)
# Compute the hash
hash = hasher.hash(mes)
#crc = zlib.crc32(mes) # DEPRECATED: CRC is not resilient enough
#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 (either in string for easy writing into a file, or in a list for easy post-processing)
if as_string:
result.append("%s%s" % (str(hash),str(ecc)))
else:
result.append([hash, ecc])
return result
|
python
|
def compute_ecc_hash(ecc_manager, hasher, buf, max_block_size, rate, message_size=None, as_string=False):
'''Split a string in blocks given max_block_size and compute the hash and ecc for each block, and then return a nice list with both for easy processing.'''
result = []
# If required parameters were not provided, we compute them
if not message_size:
ecc_params = compute_ecc_params(max_block_size, rate, hasher)
message_size = ecc_params["message_size"]
# Split the buffer string in blocks (necessary for Reed-Solomon encoding because it's limited to 255 characters max)
for i in xrange(0, len(buf), message_size):
# Compute the message block
mes = buf[i:i+message_size]
# Compute the ecc
ecc = ecc_manager.encode(mes)
# Compute the hash
hash = hasher.hash(mes)
#crc = zlib.crc32(mes) # DEPRECATED: CRC is not resilient enough
#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 (either in string for easy writing into a file, or in a list for easy post-processing)
if as_string:
result.append("%s%s" % (str(hash),str(ecc)))
else:
result.append([hash, ecc])
return result
|
[
"def",
"compute_ecc_hash",
"(",
"ecc_manager",
",",
"hasher",
",",
"buf",
",",
"max_block_size",
",",
"rate",
",",
"message_size",
"=",
"None",
",",
"as_string",
"=",
"False",
")",
":",
"result",
"=",
"[",
"]",
"# If required parameters were not provided, we compute them",
"if",
"not",
"message_size",
":",
"ecc_params",
"=",
"compute_ecc_params",
"(",
"max_block_size",
",",
"rate",
",",
"hasher",
")",
"message_size",
"=",
"ecc_params",
"[",
"\"message_size\"",
"]",
"# Split the buffer string in blocks (necessary for Reed-Solomon encoding because it's limited to 255 characters max)",
"for",
"i",
"in",
"xrange",
"(",
"0",
",",
"len",
"(",
"buf",
")",
",",
"message_size",
")",
":",
"# Compute the message block",
"mes",
"=",
"buf",
"[",
"i",
":",
"i",
"+",
"message_size",
"]",
"# Compute the ecc",
"ecc",
"=",
"ecc_manager",
".",
"encode",
"(",
"mes",
")",
"# Compute the hash",
"hash",
"=",
"hasher",
".",
"hash",
"(",
"mes",
")",
"#crc = zlib.crc32(mes) # DEPRECATED: CRC is not resilient enough",
"#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 (either in string for easy writing into a file, or in a list for easy post-processing)",
"if",
"as_string",
":",
"result",
".",
"append",
"(",
"\"%s%s\"",
"%",
"(",
"str",
"(",
"hash",
")",
",",
"str",
"(",
"ecc",
")",
")",
")",
"else",
":",
"result",
".",
"append",
"(",
"[",
"hash",
",",
"ecc",
"]",
")",
"return",
"result"
] |
Split a string in blocks given max_block_size and compute the hash and ecc for each block, and then return a nice list with both for easy processing.
|
[
"Split",
"a",
"string",
"in",
"blocks",
"given",
"max_block_size",
"and",
"compute",
"the",
"hash",
"and",
"ecc",
"for",
"each",
"block",
"and",
"then",
"return",
"a",
"nice",
"list",
"with",
"both",
"for",
"easy",
"processing",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/header_ecc.py#L149-L172
|
train
|
Split a string in blocks given max_block_size and compute the hash and ecc for each block and then return a nice list with both for easy writing into 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,IAGRfZDRy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,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) + '\x31' + chr(0b110010) + chr(0b11000 + 0o36), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(3065 - 2954) + '\x32' + chr(2459 - 2408), 0b1000), nzTpIcepk0o8('\060' + chr(0b1001110 + 0o41) + chr(0b101101 + 0o5) + '\x37' + chr(0b100010 + 0o20), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x37' + chr(1078 - 1025), 0o10), nzTpIcepk0o8(chr(523 - 475) + chr(111) + chr(0b111 + 0o57) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(12082 - 11971) + chr(1549 - 1495) + '\x35', 0b1000), nzTpIcepk0o8('\x30' + chr(0b101100 + 0o103) + chr(718 - 669) + chr(49) + chr(1630 - 1577), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1110 + 0o141) + chr(690 - 640) + chr(0b110011) + chr(0b11111 + 0o26), 58335 - 58327), nzTpIcepk0o8('\x30' + '\x6f' + chr(918 - 866) + '\063', 0o10), nzTpIcepk0o8(chr(2001 - 1953) + chr(0b1101111) + chr(0b101100 + 0o7) + chr(0b110110) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + '\062' + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(51) + '\061', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + chr(1969 - 1918), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(729 - 680) + chr(2337 - 2288) + '\x36', 22583 - 22575), nzTpIcepk0o8('\060' + chr(10450 - 10339) + chr(0b1011 + 0o46) + chr(0b110111) + '\063', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x33' + chr(54) + chr(228 - 180), 37371 - 37363), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(7983 - 7872) + chr(0b10 + 0o61) + chr(48) + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\064' + '\x32', 41369 - 41361), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(0b110 + 0o52) + chr(0b11010 + 0o33), 0o10), nzTpIcepk0o8('\060' + '\157' + '\063' + chr(0b11001 + 0o34) + chr(0b11011 + 0o30), 61968 - 61960), nzTpIcepk0o8('\x30' + '\x6f' + chr(1227 - 1176) + chr(1008 - 960) + '\x36', 24797 - 24789), nzTpIcepk0o8('\x30' + chr(111) + chr(0b10110 + 0o34) + chr(0b110000) + chr(0b110100), 19072 - 19064), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\157' + chr(0b1101 + 0o46) + chr(0b110011) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\x6f' + '\x32' + chr(1140 - 1092) + chr(92 - 44), 0o10), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(111) + '\062' + '\063' + '\x35', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + '\066' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101001 + 0o6) + chr(51) + chr(0b110110) + '\x32', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + chr(52) + chr(2014 - 1965), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(52) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\x6f' + chr(0b110011) + '\x37' + chr(55), 5860 - 5852), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(111) + '\062' + '\x31' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(616 - 568) + chr(8204 - 8093) + chr(51) + chr(0b110010) + chr(1504 - 1455), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + chr(1534 - 1485) + chr(2546 - 2492), ord("\x08")), nzTpIcepk0o8(chr(379 - 331) + '\x6f' + '\x32' + chr(49) + '\061', 8), nzTpIcepk0o8(chr(0b110000) + chr(4543 - 4432) + chr(0b110001) + '\x37' + chr(0b101001 + 0o10), 7848 - 7840), nzTpIcepk0o8('\060' + chr(111) + '\x31' + '\x30' + chr(0b10111 + 0o32), 0o10), nzTpIcepk0o8('\060' + chr(3696 - 3585) + '\x33' + chr(0b110 + 0o53) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011 + 0o0) + chr(0b110101) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + chr(0b110101) + '\063', 8), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(8933 - 8822) + chr(51) + chr(1384 - 1330) + chr(0b110010), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(750 - 702) + chr(0b111000 + 0o67) + chr(936 - 883) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'x'), chr(0b1100100) + chr(101) + '\x63' + chr(3623 - 3512) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(7487 - 7371) + chr(2116 - 2014) + chr(1779 - 1734) + chr(0b111 + 0o61)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def iyAfucv7Tq3p(T4uueMjpG87b, h8kTNaNwezOL, nIuXIilShoNQ, aFuNB1dLSUC3, TUhPdsFPKBWT, tg0dRq_B_p7E=None, CdS8mOf38Rhf=nzTpIcepk0o8('\060' + chr(0b1101111) + chr(48), 0o10)):
POx95m7SPOVy = []
if not tg0dRq_B_p7E:
MkSrP5tpUKF1 = AriG7oSWPBu5(aFuNB1dLSUC3, TUhPdsFPKBWT, h8kTNaNwezOL)
tg0dRq_B_p7E = MkSrP5tpUKF1[roI3spqORKae(ES5oEprVxulp(b';v\xc9NUR(\xc2P\x9e-<'), chr(0b10011 + 0o121) + '\x65' + chr(267 - 168) + chr(111) + '\x64' + '\145')('\165' + chr(0b1011 + 0o151) + chr(1809 - 1707) + chr(0b11100 + 0o21) + chr(56))]
for ZlbFMSG8gCoF in zBiXJ6gPq38D(nzTpIcepk0o8(chr(1948 - 1900) + chr(6384 - 6273) + '\060', 8), ftfygxgFas5X(nIuXIilShoNQ), tg0dRq_B_p7E):
mq1Fd56_rjoR = nIuXIilShoNQ[ZlbFMSG8gCoF:ZlbFMSG8gCoF + tg0dRq_B_p7E]
cRb7OGyXJeT1 = T4uueMjpG87b.YqIaRFfeo4Ha(mq1Fd56_rjoR)
dMJNtLk2mncQ = h8kTNaNwezOL.dMJNtLk2mncQ(mq1Fd56_rjoR)
if CdS8mOf38Rhf:
roI3spqORKae(POx95m7SPOVy, roI3spqORKae(ES5oEprVxulp(b'\x1eG\xe9\tLR\n\xf2I\x98\x02l'), chr(100) + '\145' + '\x63' + '\x6f' + chr(2989 - 2889) + '\145')(chr(0b10010 + 0o143) + chr(0b10111 + 0o135) + '\146' + chr(0b101101) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b's`\x9fN'), '\x64' + chr(6899 - 6798) + chr(0b111010 + 0o51) + chr(0b1000111 + 0o50) + '\x64' + '\145')('\165' + '\164' + '\146' + chr(45) + chr(1110 - 1054)) % (N9zlRy29S1SS(dMJNtLk2mncQ), N9zlRy29S1SS(cRb7OGyXJeT1)))
else:
roI3spqORKae(POx95m7SPOVy, roI3spqORKae(ES5oEprVxulp(b'\x1eG\xe9\tLR\n\xf2I\x98\x02l'), chr(0b101011 + 0o71) + '\145' + chr(0b1100011) + chr(111) + '\x64' + chr(1805 - 1704))(chr(117) + '\164' + chr(1701 - 1599) + '\x2d' + chr(56)))([dMJNtLk2mncQ, cRb7OGyXJeT1])
return POx95m7SPOVy
|
lrq3000/pyFileFixity
|
pyFileFixity/header_ecc.py
|
ecc_correct_intra
|
def ecc_correct_intra(ecc_manager_intra, ecc_params_intra, field, ecc, enable_erasures=False, erasures_char="\x00", only_erasures=False):
""" Correct an intra-field with its corresponding intra-ecc if necessary """
fentry_fields = {"ecc_field": ecc}
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 entry_assemble(fentry_fields, ecc_params_intra, len(field), '', field):
# 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(ecc_manager_intra, ecc_params_intra, field, ecc, enable_erasures=False, erasures_char="\x00", only_erasures=False):
""" Correct an intra-field with its corresponding intra-ecc if necessary """
fentry_fields = {"ecc_field": ecc}
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 entry_assemble(fentry_fields, ecc_params_intra, len(field), '', field):
# 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",
"(",
"ecc_manager_intra",
",",
"ecc_params_intra",
",",
"field",
",",
"ecc",
",",
"enable_erasures",
"=",
"False",
",",
"erasures_char",
"=",
"\"\\x00\"",
",",
"only_erasures",
"=",
"False",
")",
":",
"fentry_fields",
"=",
"{",
"\"ecc_field\"",
":",
"ecc",
"}",
"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",
"entry_assemble",
"(",
"fentry_fields",
",",
"ecc_params_intra",
",",
"len",
"(",
"field",
")",
",",
"''",
",",
"field",
")",
":",
"# 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/header_ecc.py#L174-L205
|
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,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,Nfw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w,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(403 - 355) + chr(0b100001 + 0o116) + chr(0b110010) + chr(50) + chr(104 - 53), 63657 - 63649), nzTpIcepk0o8('\x30' + chr(10699 - 10588) + chr(0b0 + 0o62) + chr(0b101 + 0o56) + chr(777 - 728), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(0b110100) + '\x31', 53698 - 53690), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\x6f' + '\062' + '\x33' + chr(1798 - 1746), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b100101 + 0o15) + chr(0b11011 + 0o27) + '\066', 0b1000), nzTpIcepk0o8(chr(48) + chr(8219 - 8108) + chr(54) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b0 + 0o63) + chr(0b110110) + '\x32', 35328 - 35320), nzTpIcepk0o8(chr(1694 - 1646) + chr(0b101100 + 0o103) + '\x31' + chr(1401 - 1352), ord("\x08")), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\157' + '\061' + '\x34', 0o10), nzTpIcepk0o8(chr(1578 - 1530) + '\157' + chr(1117 - 1067) + chr(48) + chr(0b101100 + 0o7), ord("\x08")), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1101111) + chr(1830 - 1781) + chr(48) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100001 + 0o22) + chr(960 - 909) + chr(351 - 297), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(1867 - 1816) + chr(254 - 206) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\x6f' + '\062' + chr(48) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(1381 - 1333) + '\x6f' + chr(1885 - 1834) + chr(51), 9708 - 9700), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110101) + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(111) + chr(0b110001) + chr(0b110110), 23806 - 23798), nzTpIcepk0o8('\060' + '\157' + chr(0b1110 + 0o45) + chr(0b101101 + 0o5) + '\065', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1000101 + 0o52) + chr(50) + '\x32' + chr(0b11100 + 0o27), 8), nzTpIcepk0o8('\060' + '\157' + chr(0b1110 + 0o45) + chr(0b110011) + chr(828 - 773), 38087 - 38079), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(1199 - 1144) + chr(48 - 0), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + chr(49) + chr(1913 - 1858), 0b1000), nzTpIcepk0o8('\x30' + chr(6164 - 6053) + chr(0b11001 + 0o31) + '\x34' + '\067', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(49) + chr(48) + '\061', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\063' + chr(0b10101 + 0o34) + '\065', 2008 - 2000), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\157' + chr(0b110001) + '\066' + '\062', 0b1000), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(111) + chr(0b110011) + '\x36' + chr(0b110101 + 0o0), 29497 - 29489), nzTpIcepk0o8(chr(930 - 882) + chr(0b1101111) + '\x31' + chr(0b110110) + chr(1908 - 1854), 0o10), nzTpIcepk0o8(chr(1148 - 1100) + '\x6f' + chr(0b100100 + 0o15) + chr(53) + chr(2130 - 2079), ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\x6f' + '\062' + chr(1051 - 1000), 33715 - 33707), nzTpIcepk0o8(chr(1901 - 1853) + '\x6f' + chr(0b1111 + 0o42) + chr(0b110010) + '\x34', 11079 - 11071), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b1101111) + '\066' + chr(50), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + '\x31' + chr(2347 - 2296), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + chr(1885 - 1831) + chr(49), 868 - 860), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(111) + '\061' + chr(1931 - 1878) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(1303 - 1255) + '\x6f' + '\062' + '\x35', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(2057 - 2007) + chr(1403 - 1350) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1101111) + chr(0b10101 + 0o34) + chr(826 - 778) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(963 - 914) + '\062' + chr(50), 0o10), nzTpIcepk0o8(chr(1203 - 1155) + chr(0b1011000 + 0o27) + '\x31' + '\x31' + chr(0b10000 + 0o40), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\x6f' + chr(0b10101 + 0o40) + chr(48), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xbd'), chr(0b1100100) + '\145' + chr(4657 - 4558) + chr(111) + chr(4243 - 4143) + '\x65')(chr(11935 - 11818) + '\164' + chr(0b1100101 + 0o1) + chr(0b101101) + chr(1536 - 1480)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def OnOOlBcDpQOx(Zlh40UFXTuD3, YSdDD9XiLtz0, uF4zwjUGNIxR, cRb7OGyXJeT1, hCiBMg59xw7h=nzTpIcepk0o8(chr(0b10111 + 0o31) + '\157' + '\x30', 0o10), lV6296g7ANLG=roI3spqORKae(ES5oEprVxulp(b'\x93'), chr(0b1100100) + chr(101) + '\143' + chr(0b1101111) + chr(100) + chr(0b10111 + 0o116))(chr(117) + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(1216 - 1160)), Xz01uG11ClMN=nzTpIcepk0o8('\060' + '\x6f' + chr(0b110000), 8)):
Kw1cQwRhQTpx = {roI3spqORKae(ES5oEprVxulp(b'\xf6\xfa\x82\xc3\xf0Z\x97eh'), chr(9704 - 9604) + chr(101) + '\143' + chr(0b1100 + 0o143) + chr(100) + chr(0b1100101))(chr(0b11010 + 0o133) + chr(0b1110100) + chr(0b1000100 + 0o42) + chr(45) + chr(0b100000 + 0o30)): cRb7OGyXJeT1}
WpHfZvjYOOSY = []
dodFPUwjEbM7 = nzTpIcepk0o8('\060' + '\157' + '\060', 8)
VMNJgrPsQUNw = nzTpIcepk0o8('\060' + chr(0b1001000 + 0o47) + chr(49), 0o10)
pYILIPKP5WV3 = roI3spqORKae(ES5oEprVxulp(b''), chr(0b1011000 + 0o14) + chr(0b1100101) + chr(0b111011 + 0o50) + chr(0b1101111) + chr(3609 - 3509) + '\x65')('\x75' + chr(413 - 297) + '\x66' + chr(0b11011 + 0o22) + '\070')
for wgf0sgcu_xPL in OEqvgfJKUNL9(Kw1cQwRhQTpx, YSdDD9XiLtz0, ftfygxgFas5X(uF4zwjUGNIxR), roI3spqORKae(ES5oEprVxulp(b''), chr(0b11011 + 0o111) + chr(101) + '\143' + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(117) + chr(11032 - 10916) + chr(6530 - 6428) + chr(45) + '\x38'), uF4zwjUGNIxR):
if roI3spqORKae(Zlh40UFXTuD3, roI3spqORKae(ES5oEprVxulp(b'\xc7\xf8\x89\xcb\xe7z\xc3B\x7f\xe94\x84'), '\x64' + '\145' + '\x63' + chr(11854 - 11743) + chr(0b1001010 + 0o32) + chr(0b1100101))('\x75' + chr(116) + chr(0b1100110) + '\055' + chr(56)))(wgf0sgcu_xPL[roI3spqORKae(ES5oEprVxulp(b'\xfe\xfc\x92\xef\xf7T\x97'), chr(0b101000 + 0o74) + '\x65' + chr(99) + '\x6f' + chr(0b101001 + 0o73) + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(7032 - 6930) + chr(1472 - 1427) + chr(56))], wgf0sgcu_xPL[roI3spqORKae(ES5oEprVxulp(b'\xf6\xfa\x82'), chr(0b1100100) + '\145' + '\143' + chr(0b1000100 + 0o53) + chr(5566 - 5466) + chr(3561 - 3460))('\x75' + chr(0b1110100) + chr(0b1100110) + chr(1060 - 1015) + chr(0b111000))]):
roI3spqORKae(WpHfZvjYOOSY, roI3spqORKae(ES5oEprVxulp(b'\xdb\xcd\xb2\xa8\xeeT\xb5ff\xec\x13\xeb'), '\x64' + chr(5166 - 5065) + chr(0b1100011) + '\157' + chr(100) + '\x65')(chr(2190 - 2073) + chr(0b1010100 + 0o40) + '\146' + chr(1843 - 1798) + '\x38'))(wgf0sgcu_xPL[roI3spqORKae(ES5oEprVxulp(b'\xfe\xfc\x92\xef\xf7T\x97'), chr(0b111000 + 0o54) + chr(9724 - 9623) + chr(0b1100011) + chr(10898 - 10787) + '\x64' + chr(0b111001 + 0o54))('\x75' + chr(116) + chr(282 - 180) + chr(694 - 649) + chr(0b110010 + 0o6))])
else:
dodFPUwjEbM7 = nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + '\x31', 8)
try:
(hJlQI63r3vBE, zMCCYjzhI_sz) = Zlh40UFXTuD3.lfbFsdWlT3MB(wgf0sgcu_xPL[roI3spqORKae(ES5oEprVxulp(b'\xfe\xfc\x92\xef\xf7T\x97'), '\x64' + chr(101) + chr(99) + chr(0b1101111) + '\144' + chr(0b1010001 + 0o24))(chr(0b111100 + 0o71) + chr(10635 - 10519) + '\146' + chr(45) + '\x38')], wgf0sgcu_xPL[roI3spqORKae(ES5oEprVxulp(b'\xf6\xfa\x82'), chr(0b1100100) + chr(101) + chr(200 - 101) + '\157' + '\x64' + chr(0b1100101))(chr(0b1000100 + 0o61) + '\164' + chr(5238 - 5136) + '\x2d' + chr(0b111000))], enable_erasures=hCiBMg59xw7h, erasures_char=lV6296g7ANLG, only_erasures=Xz01uG11ClMN)
except (m6bqPbBYhVl1, saHP7IgNNjQg) as UmlM4OyLHmCY:
hJlQI63r3vBE = None
zMCCYjzhI_sz = None
pYILIPKP5WV3 += roI3spqORKae(ES5oEprVxulp(b"\xbe\xb9\xa4\xee\xe4\\\x803,\xee#\xaa\xa6\xe1z^o\xf5\xf5\xb6\x1d\xe3\xc3a\xac\x06\xd5\x19\ru'W\xff\xd1H|\x95bw;\x99"), chr(0b1100100) + chr(101) + chr(0b111010 + 0o51) + chr(0b11 + 0o154) + chr(0b1 + 0o143) + chr(0b1100101))(chr(0b1110101) + chr(5345 - 5229) + chr(0b111 + 0o137) + '\055' + chr(56)) % (tdSgScBDzRLp[nzTpIcepk0o8(chr(1864 - 1816) + '\x6f' + chr(1999 - 1951), 8)], UmlM4OyLHmCY)
if hJlQI63r3vBE is not None and roI3spqORKae(Zlh40UFXTuD3, roI3spqORKae(ES5oEprVxulp(b'\xc7\xf8\x89\xcb\xe7z\xc3B\x7f\xe94\x84'), '\x64' + chr(0b1010100 + 0o21) + chr(99) + chr(111) + '\x64' + chr(0b1100101))('\x75' + '\x74' + chr(0b1100110) + chr(0b101101) + '\070'))(hJlQI63r3vBE, zMCCYjzhI_sz):
roI3spqORKae(WpHfZvjYOOSY, roI3spqORKae(ES5oEprVxulp(b'\xdb\xcd\xb2\xa8\xeeT\xb5ff\xec\x13\xeb'), '\x64' + chr(0b1100101) + chr(99) + chr(111) + chr(0b1000101 + 0o37) + chr(101))(chr(0b110111 + 0o76) + chr(116) + chr(0b1100110) + '\055' + chr(0b111000)))(hJlQI63r3vBE)
else:
roI3spqORKae(WpHfZvjYOOSY, roI3spqORKae(ES5oEprVxulp(b'\xdb\xcd\xb2\xa8\xeeT\xb5ff\xec\x13\xeb'), chr(0b1100100) + chr(101) + chr(4744 - 4645) + chr(0b1100011 + 0o14) + chr(100) + chr(0b1001101 + 0o30))('\x75' + chr(0b100000 + 0o124) + chr(102) + chr(1550 - 1505) + chr(0b110111 + 0o1)))(wgf0sgcu_xPL[roI3spqORKae(ES5oEprVxulp(b'\xfe\xfc\x92\xef\xf7T\x97'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(0b111011 + 0o72) + chr(2570 - 2454) + chr(0b1100110) + chr(0b11000 + 0o25) + chr(0b111000))])
VMNJgrPsQUNw = nzTpIcepk0o8('\060' + chr(111) + chr(0b11000 + 0o30), 8)
if suIjIS24Zkqw(WpHfZvjYOOSY[nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + chr(48), 8)], MdkNqd1bagO6):
WpHfZvjYOOSY = [N9zlRy29S1SS(bI5jsQ9OkQtj) for bI5jsQ9OkQtj in WpHfZvjYOOSY]
uF4zwjUGNIxR = roI3spqORKae(ES5oEprVxulp(b''), '\144' + '\145' + chr(0b110001 + 0o62) + chr(290 - 179) + chr(1521 - 1421) + chr(101))(chr(0b1110000 + 0o5) + chr(116) + chr(8700 - 8598) + chr(1532 - 1487) + chr(0b1100 + 0o54)).Y4yM9BcfTCNq(WpHfZvjYOOSY)
return (uF4zwjUGNIxR, dodFPUwjEbM7, VMNJgrPsQUNw, pYILIPKP5WV3)
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/pympler/refgraph.py
|
ReferenceGraph._eliminate_leafs
|
def _eliminate_leafs(self, graph):
"""
Eliminate leaf objects - that are objects not referencing any other
objects in the list `graph`. Returns the list of objects without the
objects identified as leafs.
"""
result = []
idset = set([id(x) for x in graph])
for n in graph:
refset = set([id(x) for x in get_referents(n)])
if refset.intersection(idset):
result.append(n)
return result
|
python
|
def _eliminate_leafs(self, graph):
"""
Eliminate leaf objects - that are objects not referencing any other
objects in the list `graph`. Returns the list of objects without the
objects identified as leafs.
"""
result = []
idset = set([id(x) for x in graph])
for n in graph:
refset = set([id(x) for x in get_referents(n)])
if refset.intersection(idset):
result.append(n)
return result
|
[
"def",
"_eliminate_leafs",
"(",
"self",
",",
"graph",
")",
":",
"result",
"=",
"[",
"]",
"idset",
"=",
"set",
"(",
"[",
"id",
"(",
"x",
")",
"for",
"x",
"in",
"graph",
"]",
")",
"for",
"n",
"in",
"graph",
":",
"refset",
"=",
"set",
"(",
"[",
"id",
"(",
"x",
")",
"for",
"x",
"in",
"get_referents",
"(",
"n",
")",
"]",
")",
"if",
"refset",
".",
"intersection",
"(",
"idset",
")",
":",
"result",
".",
"append",
"(",
"n",
")",
"return",
"result"
] |
Eliminate leaf objects - that are objects not referencing any other
objects in the list `graph`. Returns the list of objects without the
objects identified as leafs.
|
[
"Eliminate",
"leaf",
"objects",
"-",
"that",
"are",
"objects",
"not",
"referencing",
"any",
"other",
"objects",
"in",
"the",
"list",
"graph",
".",
"Returns",
"the",
"list",
"of",
"objects",
"without",
"the",
"objects",
"identified",
"as",
"leafs",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/refgraph.py#L92-L104
|
train
|
Eliminate leaf objects - that are objects not referencing any other
objects in the list graph. Returns the list of objects without the leafs.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJ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fYi7uj_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('\060' + chr(0b1101001 + 0o6) + '\061' + '\x35' + chr(1077 - 1026), 0b1000), nzTpIcepk0o8(chr(1531 - 1483) + chr(0b1101111) + chr(0b110011) + chr(0b100 + 0o56) + chr(118 - 67), 12316 - 12308), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(53) + chr(0b101001 + 0o14), 0b1000), nzTpIcepk0o8(chr(0b111 + 0o51) + '\x6f' + chr(0b10101 + 0o34) + '\063' + chr(0b10011 + 0o41), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b101000 + 0o11) + '\x32' + chr(54), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101101 + 0o2) + chr(50) + chr(0b110001) + chr(0b10000 + 0o40), 3576 - 3568), nzTpIcepk0o8(chr(48) + chr(0b1011 + 0o144) + chr(842 - 793) + chr(52) + '\x34', 10942 - 10934), nzTpIcepk0o8(chr(48) + chr(7154 - 7043) + '\061' + chr(2568 - 2514) + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + chr(8657 - 8546) + '\062' + '\060' + chr(0b10100 + 0o41), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + chr(0b10 + 0o64) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(48) + chr(2190 - 2079) + chr(657 - 606) + chr(53) + '\x32', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b1100 + 0o46), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(3257 - 3146) + chr(0b101001 + 0o10) + '\x33', 0o10), nzTpIcepk0o8(chr(272 - 224) + chr(111) + chr(0b110001) + chr(620 - 569) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + '\063' + '\x33', 6397 - 6389), nzTpIcepk0o8('\x30' + chr(0b1 + 0o156) + chr(50) + chr(0b1000 + 0o52) + chr(53), 16490 - 16482), nzTpIcepk0o8(chr(48) + chr(0b1101100 + 0o3) + chr(50) + chr(51) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(1086 - 1038) + '\x6f' + '\x31' + chr(50) + '\065', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(49) + chr(0b1000 + 0o52), 21583 - 21575), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + '\061' + chr(0b10011 + 0o40), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + chr(0b11111 + 0o23) + chr(48), 32226 - 32218), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b1101111) + '\061' + chr(0b110111) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(52) + '\x31', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(429 - 374) + chr(2637 - 2582), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b111011 + 0o64) + '\x32' + chr(53) + chr(0b110100), 14320 - 14312), nzTpIcepk0o8('\x30' + '\157' + '\x31' + '\x37' + chr(554 - 503), 8), nzTpIcepk0o8(chr(0b110000) + chr(5487 - 5376) + chr(0b10011 + 0o40) + '\060' + chr(0b11001 + 0o27), 41663 - 41655), nzTpIcepk0o8('\x30' + chr(0b1010 + 0o145) + chr(0b110011) + '\x31' + '\x32', 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + chr(0b110111) + chr(55), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(1861 - 1811) + chr(0b100000 + 0o23) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10111 + 0o33) + '\x35' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x34' + chr(55), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(1061 - 950) + chr(2417 - 2366) + chr(0b110010 + 0o4) + chr(48), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x36' + chr(53), 38097 - 38089), nzTpIcepk0o8(chr(1696 - 1648) + chr(0b1101111) + chr(0b100000 + 0o23) + chr(49) + chr(1216 - 1164), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(0b10010 + 0o36) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(111) + '\062' + '\x31' + '\x34', 0b1000), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\x6f' + chr(51) + '\067' + '\x37', 0o10), nzTpIcepk0o8(chr(962 - 914) + chr(0b1000100 + 0o53) + chr(0b110001) + chr(0b110101) + chr(0b110011), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\157' + chr(2115 - 2062) + chr(48), 4409 - 4401)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'E'), chr(100) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(8623 - 8523) + '\x65')(chr(4919 - 4802) + chr(0b1110100) + '\146' + chr(0b101101) + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def dFhTu7SorByD(hXMPsSrOQzbh, jJ6ZXFeIkL8J):
POx95m7SPOVy = []
vj_LszSvrdpV = Bvi71nNyvlqO([maLnLg8O5zPT(bI5jsQ9OkQtj) for bI5jsQ9OkQtj in jJ6ZXFeIkL8J])
for NoZxuO7wjArS in jJ6ZXFeIkL8J:
W7KfUtMhqneP = Bvi71nNyvlqO([maLnLg8O5zPT(bI5jsQ9OkQtj) for bI5jsQ9OkQtj in LC7swroHJ3rz(NoZxuO7wjArS)])
if roI3spqORKae(W7KfUtMhqneP, roI3spqORKae(ES5oEprVxulp(b'\x02\xbdY9$\xfb\x01\x16\xf1\x9d\x85l'), chr(0b1100100) + chr(0b1100101) + chr(0b1001101 + 0o26) + '\157' + chr(100) + '\145')('\165' + '\164' + chr(951 - 849) + chr(265 - 220) + chr(469 - 413)))(vj_LszSvrdpV):
roI3spqORKae(POx95m7SPOVy, roI3spqORKae(ES5oEprVxulp(b'#\x87~h.\xef#\x1a\xef\x9b\xbf7'), '\144' + '\x65' + chr(0b1011110 + 0o5) + chr(111) + chr(100) + chr(0b1100101))(chr(117) + chr(0b1110100) + '\x66' + chr(75 - 30) + chr(0b111000)))(NoZxuO7wjArS)
return POx95m7SPOVy
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/pympler/refgraph.py
|
ReferenceGraph._reduce_to_cycles
|
def _reduce_to_cycles(self):
"""
Iteratively eliminate leafs to reduce the set of objects to only those
that build cycles. Return the number of objects involved in reference
cycles. If there are no cycles, `self.objects` will be an empty list and
this method returns 0.
"""
cycles = self.objects[:]
cnt = 0
while cnt != len(cycles):
cnt = len(cycles)
cycles = self._eliminate_leafs(cycles)
self.objects = cycles
return len(self.objects)
|
python
|
def _reduce_to_cycles(self):
"""
Iteratively eliminate leafs to reduce the set of objects to only those
that build cycles. Return the number of objects involved in reference
cycles. If there are no cycles, `self.objects` will be an empty list and
this method returns 0.
"""
cycles = self.objects[:]
cnt = 0
while cnt != len(cycles):
cnt = len(cycles)
cycles = self._eliminate_leafs(cycles)
self.objects = cycles
return len(self.objects)
|
[
"def",
"_reduce_to_cycles",
"(",
"self",
")",
":",
"cycles",
"=",
"self",
".",
"objects",
"[",
":",
"]",
"cnt",
"=",
"0",
"while",
"cnt",
"!=",
"len",
"(",
"cycles",
")",
":",
"cnt",
"=",
"len",
"(",
"cycles",
")",
"cycles",
"=",
"self",
".",
"_eliminate_leafs",
"(",
"cycles",
")",
"self",
".",
"objects",
"=",
"cycles",
"return",
"len",
"(",
"self",
".",
"objects",
")"
] |
Iteratively eliminate leafs to reduce the set of objects to only those
that build cycles. Return the number of objects involved in reference
cycles. If there are no cycles, `self.objects` will be an empty list and
this method returns 0.
|
[
"Iteratively",
"eliminate",
"leafs",
"to",
"reduce",
"the",
"set",
"of",
"objects",
"to",
"only",
"those",
"that",
"build",
"cycles",
".",
"Return",
"the",
"number",
"of",
"objects",
"involved",
"in",
"reference",
"cycles",
".",
"If",
"there",
"are",
"no",
"cycles",
"self",
".",
"objects",
"will",
"be",
"an",
"empty",
"list",
"and",
"this",
"method",
"returns",
"0",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/refgraph.py#L107-L120
|
train
|
Reduce the set of objects to only those
that build cycles. Return the number of objects involved in reference
.
|
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,m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e0b,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(0b100110 + 0o12) + chr(0b1101111) + '\064' + chr(53), 0o10), nzTpIcepk0o8(chr(789 - 741) + '\x6f' + chr(1187 - 1137) + chr(0b110000 + 0o3) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + chr(0b110000), 48539 - 48531), nzTpIcepk0o8(chr(1595 - 1547) + chr(6501 - 6390) + '\063' + chr(86 - 31) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(779 - 668) + '\061' + chr(54) + chr(0b11000 + 0o31), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2532 - 2480) + chr(1209 - 1159), 0o10), nzTpIcepk0o8('\x30' + chr(0b11001 + 0o126) + '\062' + chr(51), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(3890 - 3779) + chr(0b100011 + 0o20) + chr(50) + '\067', 0b1000), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(1332 - 1221) + '\061' + chr(2456 - 2405) + chr(49), 29368 - 29360), nzTpIcepk0o8(chr(1900 - 1852) + '\157' + chr(51) + chr(50) + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\063' + chr(49) + '\063', 0o10), nzTpIcepk0o8(chr(281 - 233) + '\157' + chr(50) + '\065' + '\063', 0o10), nzTpIcepk0o8('\x30' + chr(2655 - 2544) + '\061' + chr(54) + '\x34', 39390 - 39382), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(53) + '\x34', 0o10), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\157' + '\x31' + chr(0b110110) + '\060', 0b1000), nzTpIcepk0o8('\060' + chr(0b1000001 + 0o56) + '\x33' + '\061' + chr(55), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(251 - 140) + chr(49) + '\067' + chr(0b100011 + 0o20), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + '\064' + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(0b110001) + chr(2413 - 2360), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(127 - 77) + chr(55) + '\067', 0o10), nzTpIcepk0o8('\x30' + chr(11565 - 11454) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b1111 + 0o43) + '\x35' + chr(54), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + chr(55) + '\063', 60794 - 60786), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1794 - 1743) + '\065' + chr(0b10110 + 0o33), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1000010 + 0o55) + chr(0b100010 + 0o21) + chr(0b100110 + 0o13), 0b1000), nzTpIcepk0o8(chr(1878 - 1830) + chr(2008 - 1897) + chr(0b110011) + '\x30' + chr(2431 - 2376), 39770 - 39762), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(111) + chr(50) + chr(849 - 801) + chr(0b1110 + 0o44), 0b1000), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1101111) + chr(0b100 + 0o56) + chr(507 - 455) + chr(1837 - 1784), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + chr(0b110000) + chr(0b100110 + 0o20), 0o10), nzTpIcepk0o8('\060' + chr(0b110001 + 0o76) + '\x34' + '\x32', 8), nzTpIcepk0o8(chr(48) + chr(11887 - 11776) + chr(0b110011) + chr(53) + chr(98 - 49), 8), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1101111) + '\062' + chr(1564 - 1509) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(111) + chr(51) + chr(0b110111) + chr(0b110101), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\061' + chr(0b10001 + 0o43) + '\066', 0o10), nzTpIcepk0o8(chr(1747 - 1699) + chr(8627 - 8516) + chr(980 - 930) + '\x35' + '\x31', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1240 - 1191) + chr(0b101010 + 0o10) + chr(2348 - 2293), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(2434 - 2383) + '\x35' + chr(0b10111 + 0o32), 8), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(1204 - 1156) + chr(1640 - 1586), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1011111 + 0o20) + chr(2564 - 2513) + '\x30' + '\063', 6817 - 6809), nzTpIcepk0o8('\x30' + '\x6f' + chr(1498 - 1448) + chr(49) + chr(55), 14649 - 14641)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(545 - 497) + '\x6f' + chr(0b10000 + 0o45) + chr(0b1110 + 0o42), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x0b'), chr(100) + chr(847 - 746) + '\x63' + chr(0b1000101 + 0o52) + chr(100) + '\145')('\x75' + chr(0b1110100) + chr(0b1100110) + '\055' + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def vkPczXqxTG_c(hXMPsSrOQzbh):
zmEIfjCpygyy = hXMPsSrOQzbh.unFw4B5pa4XN[:]
xwRuRFbC5fsf = nzTpIcepk0o8(chr(2191 - 2143) + chr(9027 - 8916) + chr(1948 - 1900), 0b1000)
while xwRuRFbC5fsf != ftfygxgFas5X(zmEIfjCpygyy):
xwRuRFbC5fsf = ftfygxgFas5X(zmEIfjCpygyy)
zmEIfjCpygyy = hXMPsSrOQzbh._eliminate_leafs(zmEIfjCpygyy)
hXMPsSrOQzbh.unFw4B5pa4XN = zmEIfjCpygyy
return ftfygxgFas5X(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'P\xf3N\x8fE`&\xa78\xe1\x93\xe5'), chr(100) + chr(8548 - 8447) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(0b1100101))('\x75' + '\x74' + '\146' + chr(0b101101) + chr(0b111000))))
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/pympler/refgraph.py
|
ReferenceGraph.reduce_to_cycles
|
def reduce_to_cycles(self):
"""
Iteratively eliminate leafs to reduce the set of objects to only those
that build cycles. Return the reduced graph. If there are no cycles,
None is returned.
"""
if not self._reduced:
reduced = copy(self)
reduced.objects = self.objects[:]
reduced.metadata = []
reduced.edges = []
self.num_in_cycles = reduced._reduce_to_cycles()
reduced.num_in_cycles = self.num_in_cycles
if self.num_in_cycles:
reduced._get_edges()
reduced._annotate_objects()
for meta in reduced.metadata:
meta.cycle = True
else:
reduced = None
self._reduced = reduced
return self._reduced
|
python
|
def reduce_to_cycles(self):
"""
Iteratively eliminate leafs to reduce the set of objects to only those
that build cycles. Return the reduced graph. If there are no cycles,
None is returned.
"""
if not self._reduced:
reduced = copy(self)
reduced.objects = self.objects[:]
reduced.metadata = []
reduced.edges = []
self.num_in_cycles = reduced._reduce_to_cycles()
reduced.num_in_cycles = self.num_in_cycles
if self.num_in_cycles:
reduced._get_edges()
reduced._annotate_objects()
for meta in reduced.metadata:
meta.cycle = True
else:
reduced = None
self._reduced = reduced
return self._reduced
|
[
"def",
"reduce_to_cycles",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"_reduced",
":",
"reduced",
"=",
"copy",
"(",
"self",
")",
"reduced",
".",
"objects",
"=",
"self",
".",
"objects",
"[",
":",
"]",
"reduced",
".",
"metadata",
"=",
"[",
"]",
"reduced",
".",
"edges",
"=",
"[",
"]",
"self",
".",
"num_in_cycles",
"=",
"reduced",
".",
"_reduce_to_cycles",
"(",
")",
"reduced",
".",
"num_in_cycles",
"=",
"self",
".",
"num_in_cycles",
"if",
"self",
".",
"num_in_cycles",
":",
"reduced",
".",
"_get_edges",
"(",
")",
"reduced",
".",
"_annotate_objects",
"(",
")",
"for",
"meta",
"in",
"reduced",
".",
"metadata",
":",
"meta",
".",
"cycle",
"=",
"True",
"else",
":",
"reduced",
"=",
"None",
"self",
".",
"_reduced",
"=",
"reduced",
"return",
"self",
".",
"_reduced"
] |
Iteratively eliminate leafs to reduce the set of objects to only those
that build cycles. Return the reduced graph. If there are no cycles,
None is returned.
|
[
"Iteratively",
"eliminate",
"leafs",
"to",
"reduce",
"the",
"set",
"of",
"objects",
"to",
"only",
"those",
"that",
"build",
"cycles",
".",
"Return",
"the",
"reduced",
"graph",
".",
"If",
"there",
"are",
"no",
"cycles",
"None",
"is",
"returned",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/refgraph.py#L123-L144
|
train
|
Reduces the set of objects to only those those
that build cycles. Return the reduced graph.
|
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,VwkB9reRD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nTXOd5N96r1,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(0b1010 + 0o52) + chr(868 - 819), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(503 - 450) + chr(2665 - 2613), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b100 + 0o56) + chr(2376 - 2326) + chr(0b110100), 45962 - 45954), nzTpIcepk0o8(chr(48) + '\157' + chr(1259 - 1210) + chr(55) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(3373 - 3262) + chr(0b110010) + chr(0b110101) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b100110 + 0o14) + '\067' + chr(586 - 538), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(944 - 891) + '\x34', 8), nzTpIcepk0o8(chr(48) + chr(4876 - 4765) + chr(2579 - 2528) + chr(55) + chr(0b10100 + 0o43), 2268 - 2260), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + '\x37' + chr(0b110111), 8), nzTpIcepk0o8('\x30' + chr(111) + '\063' + '\x33' + chr(0b1101 + 0o43), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + chr(328 - 276) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(51) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(1116 - 1068) + chr(2268 - 2157) + '\x31' + '\063', 21057 - 21049), nzTpIcepk0o8(chr(0b110000) + chr(0b111 + 0o150) + chr(1444 - 1393) + chr(1423 - 1371) + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x32' + chr(49) + chr(53), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + '\067' + '\064', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010 + 0o0) + '\x34', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\062' + chr(0b110111) + chr(0b110000), 8), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b101110 + 0o101) + chr(0b10 + 0o65) + chr(0b110000), 52290 - 52282), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + chr(98 - 43), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(1158 - 1108) + '\x36', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(51) + chr(49), 0o10), nzTpIcepk0o8(chr(48) + chr(5138 - 5027) + chr(51) + chr(0b1110 + 0o50) + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(77 - 26) + chr(2441 - 2389) + chr(53), 0o10), nzTpIcepk0o8(chr(1372 - 1324) + '\157' + '\063' + chr(51), 18484 - 18476), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\157' + chr(0b110011) + '\x35' + chr(0b10000 + 0o47), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10110 + 0o33) + chr(0b110101) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(0b1111 + 0o46) + '\062', 117 - 109), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b111001 + 0o66) + '\064', 0b1000), nzTpIcepk0o8('\060' + chr(9056 - 8945) + chr(50) + '\066' + chr(1708 - 1654), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + chr(0b110101) + chr(0b110010), 8), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1011111 + 0o20) + chr(0b10011 + 0o36) + chr(0b10001 + 0o46) + chr(0b110010), 19651 - 19643), nzTpIcepk0o8(chr(48) + '\157' + chr(0b10110 + 0o37), 17614 - 17606), nzTpIcepk0o8(chr(1809 - 1761) + '\157' + '\x32' + '\x35' + chr(51), 0b1000), nzTpIcepk0o8(chr(1894 - 1846) + chr(4383 - 4272) + '\063' + chr(0b110011) + chr(0b1001 + 0o53), 8), nzTpIcepk0o8('\060' + '\157' + chr(883 - 833) + chr(0b101011 + 0o11) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\157' + chr(0b110010) + chr(0b110011) + chr(0b110011), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + chr(0b110100) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b100111 + 0o110) + chr(49) + '\061' + '\065', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + '\060' + chr(693 - 640), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b1 + 0o57) + '\157' + chr(53) + '\x30', 58303 - 58295)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x0f'), '\144' + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(0b101 + 0o137) + '\145')('\165' + '\164' + '\x66' + '\055' + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def PWpi21Z8j6YB(hXMPsSrOQzbh):
if not roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'~^\xf1\x1b\xd9\xdbI\x9b'), chr(100) + '\x65' + chr(0b1001100 + 0o27) + chr(0b1101111) + chr(0b1010001 + 0o23) + '\x65')(chr(0b1110101) + chr(0b1110001 + 0o3) + '\146' + '\055' + chr(0b10011 + 0o45))):
QRRTh32Weunc = aZTCj4v5QdfO(hXMPsSrOQzbh)
QRRTh32Weunc.unFw4B5pa4XN = hXMPsSrOQzbh.unFw4B5pa4XN[:]
QRRTh32Weunc.nmf2TsIJJ3IK = []
QRRTh32Weunc.KQPyuEwynMlj = []
hXMPsSrOQzbh.nnQaXW9MMkC3 = QRRTh32Weunc._reduce_to_cycles()
QRRTh32Weunc.nnQaXW9MMkC3 = hXMPsSrOQzbh.nnQaXW9MMkC3
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'OB\xc5\x1e\xf4\xef\x15\xb2\xb2\xb3\xe6\xef'), chr(548 - 448) + chr(6888 - 6787) + chr(99) + chr(4353 - 4242) + chr(100) + '\145')(chr(0b1110101) + chr(0b1 + 0o163) + chr(1759 - 1657) + chr(45) + chr(0b111000))):
roI3spqORKae(QRRTh32Weunc, roI3spqORKae(ES5oEprVxulp(b'~K\xf1\x0b\xf3\xddH\x98\x9a\xab'), chr(0b1000101 + 0o37) + '\x65' + '\x63' + chr(0b10 + 0o155) + chr(0b1100100) + '\x65')('\165' + '\x74' + '\x66' + chr(0b1 + 0o54) + '\x38'))()
roI3spqORKae(QRRTh32Weunc, roI3spqORKae(ES5oEprVxulp(b'~M\xfa\x11\xc3\xccM\x8b\x9a\x87\xca\xbea\x84\xee\xc8g'), chr(1692 - 1592) + chr(6222 - 6121) + chr(4326 - 4227) + '\x6f' + chr(100) + '\145')(chr(117) + chr(116) + '\146' + chr(45) + chr(0b111000)))()
for DCKHhI6xLX9g in roI3spqORKae(QRRTh32Weunc, roI3spqORKae(ES5oEprVxulp(b'OA\xf2M\xf8\xcbe\xb5\xb5\xeb\xec\x97'), chr(0b1100100) + '\145' + chr(0b1100011) + '\157' + chr(0b1011000 + 0o14) + chr(101))(chr(0b1100 + 0o151) + '\x74' + chr(1879 - 1777) + chr(244 - 199) + chr(56))):
DCKHhI6xLX9g.kT9eorBzzUio = nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b1101 + 0o44), ord("\x08"))
else:
QRRTh32Weunc = None
hXMPsSrOQzbh.vsrnRRf6uJu7 = QRRTh32Weunc
return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'W_\xe6\x11\xfe\xeaJ\xc9\x8a\x92\xd0\xeb'), chr(0b11111 + 0o105) + chr(8968 - 8867) + chr(99) + chr(111) + chr(0b1001100 + 0o30) + chr(0b100101 + 0o100))('\x75' + chr(116) + chr(0b1 + 0o145) + '\055' + chr(0b1101 + 0o53)))
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/pympler/refgraph.py
|
ReferenceGraph._get_edges
|
def _get_edges(self):
"""
Compute the edges for the reference graph.
The function returns a set of tuples (id(a), id(b), ref) if a
references b with the referent 'ref'.
"""
idset = set([id(x) for x in self.objects])
self.edges = set([])
for n in self.objects:
refset = set([id(x) for x in get_referents(n)])
for ref in refset.intersection(idset):
label = ''
members = None
if isinstance(n, dict):
members = n.items()
if not members:
members = named_refs(n)
for (k, v) in members:
if id(v) == ref:
label = k
break
self.edges.add(_Edge(id(n), ref, label))
|
python
|
def _get_edges(self):
"""
Compute the edges for the reference graph.
The function returns a set of tuples (id(a), id(b), ref) if a
references b with the referent 'ref'.
"""
idset = set([id(x) for x in self.objects])
self.edges = set([])
for n in self.objects:
refset = set([id(x) for x in get_referents(n)])
for ref in refset.intersection(idset):
label = ''
members = None
if isinstance(n, dict):
members = n.items()
if not members:
members = named_refs(n)
for (k, v) in members:
if id(v) == ref:
label = k
break
self.edges.add(_Edge(id(n), ref, label))
|
[
"def",
"_get_edges",
"(",
"self",
")",
":",
"idset",
"=",
"set",
"(",
"[",
"id",
"(",
"x",
")",
"for",
"x",
"in",
"self",
".",
"objects",
"]",
")",
"self",
".",
"edges",
"=",
"set",
"(",
"[",
"]",
")",
"for",
"n",
"in",
"self",
".",
"objects",
":",
"refset",
"=",
"set",
"(",
"[",
"id",
"(",
"x",
")",
"for",
"x",
"in",
"get_referents",
"(",
"n",
")",
"]",
")",
"for",
"ref",
"in",
"refset",
".",
"intersection",
"(",
"idset",
")",
":",
"label",
"=",
"''",
"members",
"=",
"None",
"if",
"isinstance",
"(",
"n",
",",
"dict",
")",
":",
"members",
"=",
"n",
".",
"items",
"(",
")",
"if",
"not",
"members",
":",
"members",
"=",
"named_refs",
"(",
"n",
")",
"for",
"(",
"k",
",",
"v",
")",
"in",
"members",
":",
"if",
"id",
"(",
"v",
")",
"==",
"ref",
":",
"label",
"=",
"k",
"break",
"self",
".",
"edges",
".",
"add",
"(",
"_Edge",
"(",
"id",
"(",
"n",
")",
",",
"ref",
",",
"label",
")",
")"
] |
Compute the edges for the reference graph.
The function returns a set of tuples (id(a), id(b), ref) if a
references b with the referent 'ref'.
|
[
"Compute",
"the",
"edges",
"for",
"the",
"reference",
"graph",
".",
"The",
"function",
"returns",
"a",
"set",
"of",
"tuples",
"(",
"id",
"(",
"a",
")",
"id",
"(",
"b",
")",
"ref",
")",
"if",
"a",
"references",
"b",
"with",
"the",
"referent",
"ref",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/refgraph.py#L147-L168
|
train
|
Compute the edges for the reference graph.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUv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d1bagO6,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('\060' + chr(7425 - 7314) + chr(0b10111 + 0o34) + '\x34' + chr(51), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(1684 - 1636) + chr(0b1 + 0o65), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100 + 0o143) + chr(356 - 306), 0b1000), nzTpIcepk0o8(chr(1846 - 1798) + chr(0b1100001 + 0o16) + chr(0b110010) + chr(1979 - 1931) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\x30' + chr(1799 - 1688) + '\x31' + chr(53) + chr(1839 - 1784), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + '\x34' + chr(53), 2658 - 2650), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(111) + chr(0b110011) + '\061' + chr(1264 - 1214), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x35' + '\061', 14930 - 14922), nzTpIcepk0o8(chr(2192 - 2144) + chr(2183 - 2072) + chr(51) + '\062' + chr(1421 - 1366), 0o10), nzTpIcepk0o8(chr(0b10 + 0o56) + '\157' + chr(50) + '\x34' + '\x35', 8), nzTpIcepk0o8(chr(48) + '\157' + chr(0b11111 + 0o23) + '\x31', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(2093 - 2041) + '\067', 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + '\x32' + chr(0b100010 + 0o16), 29710 - 29702), nzTpIcepk0o8('\060' + chr(0b10110 + 0o131) + chr(0b11000 + 0o33) + chr(0b101010 + 0o6) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(60 - 12) + '\157' + chr(0b101010 + 0o11) + '\066' + '\062', ord("\x08")), nzTpIcepk0o8(chr(685 - 637) + chr(0b111100 + 0o63) + chr(0b101 + 0o55) + '\x37' + chr(55), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + '\066' + chr(1819 - 1766), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + chr(296 - 245) + chr(48), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11011 + 0o27) + chr(0b101001 + 0o16) + chr(0b101111 + 0o5), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b10100 + 0o133) + chr(0b11101 + 0o25) + chr(670 - 618), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x32', 8), nzTpIcepk0o8(chr(2131 - 2083) + chr(111) + chr(0b110 + 0o55) + chr(0b110011) + chr(0b1 + 0o61), 0o10), nzTpIcepk0o8('\060' + chr(8473 - 8362) + chr(859 - 808) + chr(0b110001) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b101001 + 0o11) + chr(0b110111) + '\065', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + chr(59 - 8) + '\065', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(2592 - 2481) + chr(240 - 191) + '\x31' + chr(573 - 525), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + '\x30', 0o10), nzTpIcepk0o8('\x30' + chr(2446 - 2335) + chr(752 - 703) + '\x34' + chr(49), 63855 - 63847), nzTpIcepk0o8(chr(678 - 630) + '\x6f' + chr(548 - 497) + '\066', 0o10), nzTpIcepk0o8(chr(813 - 765) + chr(0b1010010 + 0o35) + '\x31' + chr(0b110001) + '\x33', 25647 - 25639), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(0b110 + 0o53) + chr(0b110100 + 0o1), 8), nzTpIcepk0o8(chr(48) + chr(9002 - 8891) + '\x35' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + chr(2333 - 2281) + chr(1870 - 1822), 0b1000), nzTpIcepk0o8(chr(128 - 80) + chr(660 - 549) + '\x32' + chr(2246 - 2194) + '\067', 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(0b100100 + 0o15) + chr(0b10 + 0o56), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + chr(0b100001 + 0o25), 8), nzTpIcepk0o8(chr(769 - 721) + '\157' + chr(0b110001) + chr(0b110101) + '\067', 8), nzTpIcepk0o8('\x30' + chr(0b1010111 + 0o30) + chr(0b110001) + chr(117 - 66), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(49) + chr(0b110110) + '\x37', 36126 - 36118), nzTpIcepk0o8(chr(1735 - 1687) + '\x6f' + chr(2477 - 2427) + chr(2445 - 2394), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\x6f' + '\065' + chr(56 - 8), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xcd'), '\144' + '\145' + chr(0b1100011) + chr(4677 - 4566) + chr(0b1011101 + 0o7) + chr(101))(chr(117) + chr(344 - 228) + chr(0b100101 + 0o101) + chr(0b101101) + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def iVFCKZXHvlIO(hXMPsSrOQzbh):
vj_LszSvrdpV = Bvi71nNyvlqO([maLnLg8O5zPT(bI5jsQ9OkQtj) for bI5jsQ9OkQtj in hXMPsSrOQzbh.unFw4B5pa4XN])
hXMPsSrOQzbh.KQPyuEwynMlj = Bvi71nNyvlqO([])
for NoZxuO7wjArS in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x96\xe8D\xf0[\xe7\xffY\xb6\x91I\xe9'), chr(0b110011 + 0o61) + chr(0b1001100 + 0o31) + '\x63' + '\x6f' + chr(0b1011101 + 0o7) + '\x65')('\x75' + chr(0b110 + 0o156) + '\146' + '\055' + chr(0b110010 + 0o6))):
W7KfUtMhqneP = Bvi71nNyvlqO([maLnLg8O5zPT(bI5jsQ9OkQtj) for bI5jsQ9OkQtj in LC7swroHJ3rz(NoZxuO7wjArS)])
for CmNScfxJ1Uih in roI3spqORKae(W7KfUtMhqneP, roI3spqORKae(ES5oEprVxulp(b'\x8a\xe8v\xe2\x1d\xd6\xafJ\xa3\xcc~\xc9'), chr(0b1001010 + 0o32) + chr(8304 - 8203) + chr(2735 - 2636) + chr(0b1101111) + chr(2348 - 2248) + chr(0b1010101 + 0o20))(chr(0b1001100 + 0o51) + chr(0b1110100) + chr(3465 - 3363) + chr(0b1011 + 0o42) + chr(56)))(vj_LszSvrdpV):
OkDIn6t2Cke6 = roI3spqORKae(ES5oEprVxulp(b''), chr(7406 - 7306) + '\x65' + chr(0b110001 + 0o62) + chr(1534 - 1423) + '\144' + chr(101))('\x75' + '\164' + '\x66' + '\x2d' + '\x38')
eVAPbLrfcDhR = None
if suIjIS24Zkqw(NoZxuO7wjArS, znjnJWK64FDT):
eVAPbLrfcDhR = NoZxuO7wjArS.Y_nNEzH43vXi()
if not eVAPbLrfcDhR:
eVAPbLrfcDhR = ONGjgNVzc6YW(NoZxuO7wjArS)
for (B6UAF1zReOyJ, r7AA1pbLjb44) in eVAPbLrfcDhR:
if maLnLg8O5zPT(r7AA1pbLjb44) == CmNScfxJ1Uih:
OkDIn6t2Cke6 = B6UAF1zReOyJ
break
roI3spqORKae(hXMPsSrOQzbh.edges, roI3spqORKae(ES5oEprVxulp(b'\x96\xb5S\xe3\x06\xd6\x83X\x93\xc3R\xc3'), '\x64' + chr(8495 - 8394) + '\x63' + chr(0b1101111) + '\x64' + '\145')(chr(0b1110101) + chr(0b1010010 + 0o42) + chr(0b1011001 + 0o15) + chr(45) + chr(56)))(NzJ3pbap5Bgb(maLnLg8O5zPT(NoZxuO7wjArS), CmNScfxJ1Uih, OkDIn6t2Cke6))
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/pympler/refgraph.py
|
ReferenceGraph._annotate_groups
|
def _annotate_groups(self):
"""
Annotate the objects belonging to separate (non-connected) graphs with
individual indices.
"""
g = {}
for x in self.metadata:
g[x.id] = x
idx = 0
for x in self.metadata:
if not hasattr(x, 'group'):
x.group = idx
idx += 1
neighbors = set()
for e in self.edges:
if e.src == x.id:
neighbors.add(e.dst)
if e.dst == x.id:
neighbors.add(e.src)
for nb in neighbors:
g[nb].group = min(x.group, getattr(g[nb], 'group', idx))
# Assign the edges to the respective groups. Both "ends" of the edge
# should share the same group so just use the first object's group.
for e in self.edges:
e.group = g[e.src].group
self._max_group = idx
|
python
|
def _annotate_groups(self):
"""
Annotate the objects belonging to separate (non-connected) graphs with
individual indices.
"""
g = {}
for x in self.metadata:
g[x.id] = x
idx = 0
for x in self.metadata:
if not hasattr(x, 'group'):
x.group = idx
idx += 1
neighbors = set()
for e in self.edges:
if e.src == x.id:
neighbors.add(e.dst)
if e.dst == x.id:
neighbors.add(e.src)
for nb in neighbors:
g[nb].group = min(x.group, getattr(g[nb], 'group', idx))
# Assign the edges to the respective groups. Both "ends" of the edge
# should share the same group so just use the first object's group.
for e in self.edges:
e.group = g[e.src].group
self._max_group = idx
|
[
"def",
"_annotate_groups",
"(",
"self",
")",
":",
"g",
"=",
"{",
"}",
"for",
"x",
"in",
"self",
".",
"metadata",
":",
"g",
"[",
"x",
".",
"id",
"]",
"=",
"x",
"idx",
"=",
"0",
"for",
"x",
"in",
"self",
".",
"metadata",
":",
"if",
"not",
"hasattr",
"(",
"x",
",",
"'group'",
")",
":",
"x",
".",
"group",
"=",
"idx",
"idx",
"+=",
"1",
"neighbors",
"=",
"set",
"(",
")",
"for",
"e",
"in",
"self",
".",
"edges",
":",
"if",
"e",
".",
"src",
"==",
"x",
".",
"id",
":",
"neighbors",
".",
"add",
"(",
"e",
".",
"dst",
")",
"if",
"e",
".",
"dst",
"==",
"x",
".",
"id",
":",
"neighbors",
".",
"add",
"(",
"e",
".",
"src",
")",
"for",
"nb",
"in",
"neighbors",
":",
"g",
"[",
"nb",
"]",
".",
"group",
"=",
"min",
"(",
"x",
".",
"group",
",",
"getattr",
"(",
"g",
"[",
"nb",
"]",
",",
"'group'",
",",
"idx",
")",
")",
"# Assign the edges to the respective groups. Both \"ends\" of the edge",
"# should share the same group so just use the first object's group.",
"for",
"e",
"in",
"self",
".",
"edges",
":",
"e",
".",
"group",
"=",
"g",
"[",
"e",
".",
"src",
"]",
".",
"group",
"self",
".",
"_max_group",
"=",
"idx"
] |
Annotate the objects belonging to separate (non-connected) graphs with
individual indices.
|
[
"Annotate",
"the",
"objects",
"belonging",
"to",
"separate",
"(",
"non",
"-",
"connected",
")",
"graphs",
"with",
"individual",
"indices",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/refgraph.py#L171-L199
|
train
|
Annotate the objects belonging to separate graphs with their respective 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,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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S7b2Ofrbne,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(11796 - 11685) + chr(49) + chr(538 - 487) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(305 - 257) + chr(111) + '\x31' + chr(0b110101), 51677 - 51669), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(111) + chr(1584 - 1535) + chr(1496 - 1444) + '\066', 17690 - 17682), nzTpIcepk0o8('\x30' + '\157' + chr(0b101011 + 0o7) + '\060' + chr(2108 - 2060), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + chr(54) + chr(49), 34950 - 34942), nzTpIcepk0o8('\x30' + chr(9519 - 9408) + chr(0b110011) + '\x32' + chr(0b110110), 18388 - 18380), nzTpIcepk0o8('\060' + '\x6f' + chr(52), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(903 - 855), 0b1000), nzTpIcepk0o8(chr(1690 - 1642) + chr(0b110 + 0o151) + '\062' + chr(0b110101) + chr(0b10 + 0o63), 39679 - 39671), nzTpIcepk0o8('\060' + chr(111) + '\x33' + '\064', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1100110 + 0o11) + '\063' + chr(0b100110 + 0o20) + chr(953 - 899), 0o10), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1101111) + '\062' + chr(0b110110) + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\061' + '\x35' + '\062', ord("\x08")), nzTpIcepk0o8(chr(1500 - 1452) + '\x6f' + chr(0b110101) + '\x34', 0o10), nzTpIcepk0o8(chr(823 - 775) + chr(0b1101111) + '\x33' + chr(0b100000 + 0o27) + chr(0b0 + 0o64), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(8426 - 8315) + chr(1854 - 1805) + '\x33' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b110011 + 0o74) + chr(0b110001) + '\065', 8), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b11 + 0o154) + chr(0b110010) + chr(0b110101), 48251 - 48243), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + chr(51) + chr(1456 - 1405), 8), nzTpIcepk0o8('\060' + chr(0b1100010 + 0o15) + chr(0b110101 + 0o0) + '\x35', 0b1000), nzTpIcepk0o8('\x30' + chr(10889 - 10778) + '\x33' + '\x37' + chr(0b110101), 27257 - 27249), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10110 + 0o41) + chr(0b100111 + 0o13), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(12310 - 12199) + chr(0b1011 + 0o46) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(857 - 809) + chr(111) + chr(51) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1100110 + 0o11) + '\x33' + chr(0b110100) + chr(0b110000), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101110 + 0o4) + chr(490 - 440) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + '\x35' + chr(54), 44343 - 44335), nzTpIcepk0o8('\060' + chr(9504 - 9393) + chr(49) + chr(51) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + chr(0b101011 + 0o11) + chr(50), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\062' + chr(58 - 3) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(1957 - 1846) + '\x33' + chr(0b0 + 0o65) + '\x31', 41029 - 41021), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(9299 - 9188) + '\062' + chr(0b1101 + 0o46) + chr(0b110000), 7304 - 7296), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x32' + chr(0b110111) + chr(2593 - 2540), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(1545 - 1494) + chr(50), 0o10), nzTpIcepk0o8('\x30' + chr(11261 - 11150) + chr(2236 - 2187) + chr(0b100010 + 0o21) + chr(0b110100), 8), nzTpIcepk0o8('\060' + '\x6f' + '\066' + chr(0b1111 + 0o50), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b100 + 0o153) + chr(51) + chr(51) + chr(888 - 833), 41203 - 41195), nzTpIcepk0o8(chr(1916 - 1868) + '\157' + '\x33' + '\x36' + '\064', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b10010 + 0o40) + chr(1690 - 1639) + chr(2175 - 2124), ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(5590 - 5479) + chr(54) + '\065', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b101000 + 0o10) + '\x6f' + chr(53) + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b't'), chr(3799 - 3699) + chr(101) + '\143' + chr(0b1101111) + chr(0b101110 + 0o66) + chr(0b1100101))('\165' + chr(8827 - 8711) + chr(0b1001100 + 0o32) + '\x2d' + chr(0b11 + 0o65)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def tJEeDFLicLeY(hXMPsSrOQzbh):
KQq7Z9J63zv1 = {}
for bI5jsQ9OkQtj in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'4`\x00\xb2%\xa5MB\xe7/\xbf\xff'), chr(2132 - 2032) + '\x65' + '\x63' + '\x6f' + '\144' + '\x65')('\165' + chr(0b1110100) + '\146' + chr(45) + chr(0b101101 + 0o13))):
KQq7Z9J63zv1[bI5jsQ9OkQtj.maLnLg8O5zPT] = bI5jsQ9OkQtj
At3kbMoXzzmV = nzTpIcepk0o8(chr(1058 - 1010) + chr(0b1101101 + 0o2) + chr(0b110000), 0b1000)
for bI5jsQ9OkQtj in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'4`\x00\xb2%\xa5MB\xe7/\xbf\xff'), chr(8794 - 8694) + chr(9450 - 9349) + chr(0b1100011) + chr(0b1010000 + 0o37) + chr(887 - 787) + chr(0b1100000 + 0o5))(chr(11201 - 11084) + '\x74' + chr(0b1100110) + '\x2d' + '\x38')):
if not dRKdVnHPFq7C(bI5jsQ9OkQtj, roI3spqORKae(ES5oEprVxulp(b'=\x7f\t\xf5\x01'), chr(0b101 + 0o137) + chr(0b1 + 0o144) + chr(8644 - 8545) + chr(3125 - 3014) + chr(5395 - 5295) + chr(0b1000101 + 0o40))(chr(5330 - 5213) + chr(1150 - 1034) + '\x66' + chr(0b11 + 0o52) + chr(0b101 + 0o63))):
bI5jsQ9OkQtj.F9lJ8RbIonqb = At3kbMoXzzmV
At3kbMoXzzmV += nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(111) + chr(1883 - 1834), 0o10)
JDPr2SfGxS2w = Bvi71nNyvlqO()
for wgf0sgcu_xPL in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x11\\6\xf9\x04\x93sq\xc3Q\x9a\xde'), '\144' + chr(2064 - 1963) + chr(99) + chr(0b1101111) + chr(6622 - 6522) + chr(2317 - 2216))('\x75' + '\x74' + chr(0b1011011 + 0o13) + '\055' + chr(0b10 + 0o66))):
if roI3spqORKae(wgf0sgcu_xPL, roI3spqORKae(ES5oEprVxulp(b'1n\x11\xf6\x03\xb4l<\xeah\xc2\xc6'), chr(100) + chr(0b1100101 + 0o0) + '\x63' + '\x6f' + '\144' + chr(0b101111 + 0o66))(chr(0b1110101) + '\x74' + chr(0b1000001 + 0o45) + chr(0b101101) + chr(1835 - 1779))) == roI3spqORKae(bI5jsQ9OkQtj, roI3spqORKae(ES5oEprVxulp(b'7l*\xee=\xb1<G\x98f\xa6\xe0'), chr(0b101111 + 0o65) + chr(0b1100101) + chr(99) + '\157' + '\144' + chr(0b1100101))(chr(0b1101100 + 0o11) + '\x74' + chr(0b1001001 + 0o35) + chr(1324 - 1279) + chr(56))):
roI3spqORKae(JDPr2SfGxS2w, roI3spqORKae(ES5oEprVxulp(b'/>7\xe4\x18\xa5My\xe9z\xb5\xd0'), chr(0b1100100) + chr(0b1100101) + '\143' + '\x6f' + chr(2241 - 2141) + '\x65')(chr(0b1110101) + '\164' + '\146' + chr(45) + '\070'))(roI3spqORKae(wgf0sgcu_xPL, roI3spqORKae(ES5oEprVxulp(b'>~\x12'), chr(0b100001 + 0o103) + '\x65' + chr(5862 - 5763) + '\157' + chr(0b1 + 0o143) + chr(0b111001 + 0o54))(chr(117) + '\164' + chr(0b1100110) + chr(45) + '\x38')))
if roI3spqORKae(wgf0sgcu_xPL, roI3spqORKae(ES5oEprVxulp(b'>~\x12'), '\144' + chr(101) + '\x63' + chr(0b110100 + 0o73) + '\144' + chr(0b1001011 + 0o32))('\x75' + '\164' + '\146' + '\055' + '\x38')) == roI3spqORKae(bI5jsQ9OkQtj, roI3spqORKae(ES5oEprVxulp(b'7l*\xee=\xb1<G\x98f\xa6\xe0'), chr(0b1100100) + '\145' + '\x63' + chr(0b1101111) + chr(8890 - 8790) + chr(101))(chr(0b1100011 + 0o22) + '\164' + chr(0b1100110) + '\x2d' + '\x38')):
roI3spqORKae(JDPr2SfGxS2w, roI3spqORKae(ES5oEprVxulp(b'/>7\xe4\x18\xa5My\xe9z\xb5\xd0'), '\144' + chr(0b1100010 + 0o3) + chr(99) + '\157' + chr(3465 - 3365) + chr(2912 - 2811))(chr(0b1110101) + chr(0b11101 + 0o127) + chr(0b1100110) + chr(0b101101) + chr(0b111000)))(roI3spqORKae(wgf0sgcu_xPL, roI3spqORKae(ES5oEprVxulp(b'1n\x11\xf6\x03\xb4l<\xeah\xc2\xc6'), '\x64' + chr(9278 - 9177) + chr(0b1100011) + '\x6f' + chr(3837 - 3737) + chr(101))(chr(0b1110101) + chr(0b10111 + 0o135) + chr(102) + chr(45) + '\x38')))
for tOeBFi3ucCqm in JDPr2SfGxS2w:
KQq7Z9J63zv1[tOeBFi3ucCqm].F9lJ8RbIonqb = XURpmPuEWCNF(bI5jsQ9OkQtj.F9lJ8RbIonqb, roI3spqORKae(KQq7Z9J63zv1[tOeBFi3ucCqm], roI3spqORKae(ES5oEprVxulp(b'=\x7f\t\xf5\x01'), '\144' + '\x65' + chr(99) + '\157' + chr(1405 - 1305) + chr(101))('\x75' + '\164' + chr(7190 - 7088) + chr(45) + chr(0b111000)), At3kbMoXzzmV))
for wgf0sgcu_xPL in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x11\\6\xf9\x04\x93sq\xc3Q\x9a\xde'), '\x64' + '\145' + chr(7637 - 7538) + chr(0b1010 + 0o145) + '\x64' + '\x65')(chr(11014 - 10897) + chr(0b1110100) + chr(3748 - 3646) + chr(0b100001 + 0o14) + '\x38')):
wgf0sgcu_xPL.F9lJ8RbIonqb = KQq7Z9J63zv1[wgf0sgcu_xPL.src].F9lJ8RbIonqb
hXMPsSrOQzbh.iAxUqSMeD1B5 = At3kbMoXzzmV
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/pympler/refgraph.py
|
ReferenceGraph._filter_group
|
def _filter_group(self, group):
"""
Eliminate all objects but those which belong to `group`.
``self.objects``, ``self.metadata`` and ``self.edges`` are modified.
Returns `True` if the group is non-empty. Otherwise returns `False`.
"""
self.metadata = [x for x in self.metadata if x.group == group]
group_set = set([x.id for x in self.metadata])
self.objects = [obj for obj in self.objects if id(obj) in group_set]
self.count = len(self.metadata)
if self.metadata == []:
return False
self.edges = [e for e in self.edges if e.group == group]
del self._max_group
return True
|
python
|
def _filter_group(self, group):
"""
Eliminate all objects but those which belong to `group`.
``self.objects``, ``self.metadata`` and ``self.edges`` are modified.
Returns `True` if the group is non-empty. Otherwise returns `False`.
"""
self.metadata = [x for x in self.metadata if x.group == group]
group_set = set([x.id for x in self.metadata])
self.objects = [obj for obj in self.objects if id(obj) in group_set]
self.count = len(self.metadata)
if self.metadata == []:
return False
self.edges = [e for e in self.edges if e.group == group]
del self._max_group
return True
|
[
"def",
"_filter_group",
"(",
"self",
",",
"group",
")",
":",
"self",
".",
"metadata",
"=",
"[",
"x",
"for",
"x",
"in",
"self",
".",
"metadata",
"if",
"x",
".",
"group",
"==",
"group",
"]",
"group_set",
"=",
"set",
"(",
"[",
"x",
".",
"id",
"for",
"x",
"in",
"self",
".",
"metadata",
"]",
")",
"self",
".",
"objects",
"=",
"[",
"obj",
"for",
"obj",
"in",
"self",
".",
"objects",
"if",
"id",
"(",
"obj",
")",
"in",
"group_set",
"]",
"self",
".",
"count",
"=",
"len",
"(",
"self",
".",
"metadata",
")",
"if",
"self",
".",
"metadata",
"==",
"[",
"]",
":",
"return",
"False",
"self",
".",
"edges",
"=",
"[",
"e",
"for",
"e",
"in",
"self",
".",
"edges",
"if",
"e",
".",
"group",
"==",
"group",
"]",
"del",
"self",
".",
"_max_group",
"return",
"True"
] |
Eliminate all objects but those which belong to `group`.
``self.objects``, ``self.metadata`` and ``self.edges`` are modified.
Returns `True` if the group is non-empty. Otherwise returns `False`.
|
[
"Eliminate",
"all",
"objects",
"but",
"those",
"which",
"belong",
"to",
"group",
".",
"self",
".",
"objects",
"self",
".",
"metadata",
"and",
"self",
".",
"edges",
"are",
"modified",
".",
"Returns",
"True",
"if",
"the",
"group",
"is",
"non",
"-",
"empty",
".",
"Otherwise",
"returns",
"False",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/refgraph.py#L202-L219
|
train
|
Returns True if the group is non - empty.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qeP0tq,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) + chr(0b1010111 + 0o30) + '\062' + chr(0b110001) + chr(55), 0o10), nzTpIcepk0o8(chr(48) + chr(10923 - 10812) + chr(0b110100) + '\065', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + '\064' + chr(54 - 3), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(50) + chr(53), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + '\x35' + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(6903 - 6792) + chr(1354 - 1303) + chr(2050 - 1997) + chr(0b110001), 0o10), nzTpIcepk0o8('\x30' + chr(0b1010001 + 0o36) + chr(0b10011 + 0o36) + chr(0b1 + 0o60) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + chr(55) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(469 - 421) + chr(8473 - 8362) + chr(51) + chr(0b101011 + 0o6) + '\066', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1010010 + 0o35) + '\x32' + '\066' + '\x37', 0b1000), nzTpIcepk0o8('\060' + chr(4598 - 4487) + '\063' + chr(53) + chr(0b101 + 0o56), ord("\x08")), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(2555 - 2444) + chr(1379 - 1327) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1101111) + '\x32' + chr(55) + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + chr(48) + '\060', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + chr(0b110000) + '\067', 0b1000), nzTpIcepk0o8(chr(2271 - 2223) + '\x6f' + '\062' + chr(0b110010) + chr(2660 - 2608), 27928 - 27920), nzTpIcepk0o8('\060' + '\157' + chr(284 - 235) + chr(53) + chr(49), 2594 - 2586), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + '\065' + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(51) + chr(0b101000 + 0o15) + chr(53), 41012 - 41004), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(48) + chr(0b10010 + 0o45), 8), nzTpIcepk0o8(chr(499 - 451) + chr(11335 - 11224) + '\061' + chr(0b110100) + chr(55), 49219 - 49211), nzTpIcepk0o8('\x30' + chr(0b1010110 + 0o31) + chr(0b100011 + 0o16) + chr(2141 - 2090) + chr(659 - 609), 53235 - 53227), nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(48) + '\060', 8), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\157' + chr(946 - 895) + chr(0b100000 + 0o25) + chr(0b111 + 0o54), 8), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(0b1000010 + 0o55) + '\062' + chr(482 - 434) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(6633 - 6522) + chr(0b111 + 0o56) + chr(1585 - 1534), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(49) + '\x31' + chr(0b11100 + 0o25), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(52), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(469 - 419) + chr(0b100010 + 0o23) + chr(0b10001 + 0o40), 0o10), nzTpIcepk0o8('\060' + chr(0b1000011 + 0o54) + chr(2541 - 2490) + chr(324 - 270) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(6255 - 6144) + chr(0b110101) + '\x34', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100001 + 0o21) + '\064' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b0 + 0o62) + chr(50) + '\063', 0o10), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1101111) + '\x31' + chr(1110 - 1059) + chr(0b10 + 0o62), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(55) + chr(235 - 186), 44107 - 44099), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + '\x37', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + '\x37' + chr(1699 - 1648), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b10000 + 0o42) + chr(1627 - 1579) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1010010 + 0o35) + '\061' + chr(0b110101) + '\x36', 8), nzTpIcepk0o8('\x30' + chr(7985 - 7874) + chr(51) + chr(50) + chr(1867 - 1819), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b111110 + 0o61) + chr(2257 - 2204) + chr(1703 - 1655), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xa1'), chr(0b1100100) + chr(4934 - 4833) + '\143' + chr(2545 - 2434) + chr(100) + '\145')(chr(10211 - 10094) + chr(0b11011 + 0o131) + chr(0b1100110) + chr(0b10101 + 0o30) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def DwNj8zlpry8D(hXMPsSrOQzbh, F9lJ8RbIonqb):
hXMPsSrOQzbh.nmf2TsIJJ3IK = [bI5jsQ9OkQtj for bI5jsQ9OkQtj in hXMPsSrOQzbh.nmf2TsIJJ3IK if bI5jsQ9OkQtj.F9lJ8RbIonqb == F9lJ8RbIonqb]
AznQMD4FE3ZL = Bvi71nNyvlqO([bI5jsQ9OkQtj.maLnLg8O5zPT for bI5jsQ9OkQtj in hXMPsSrOQzbh.nmf2TsIJJ3IK])
hXMPsSrOQzbh.unFw4B5pa4XN = [kIMfkyypPTcC for kIMfkyypPTcC in hXMPsSrOQzbh.unFw4B5pa4XN if maLnLg8O5zPT(kIMfkyypPTcC) in AznQMD4FE3ZL]
hXMPsSrOQzbh.sQSWKlURp7QK = ftfygxgFas5X(hXMPsSrOQzbh.nmf2TsIJJ3IK)
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"\xe1H\x85':\x9a\x01\xb2\x84\x84\xa2h"), chr(0b1100100) + chr(0b1011001 + 0o14) + chr(99) + '\157' + chr(0b100111 + 0o75) + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(2375 - 2273) + chr(1784 - 1739) + '\070')) == []:
return nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(0b1101111) + '\x30', 55321 - 55313)
hXMPsSrOQzbh.KQPyuEwynMlj = [wgf0sgcu_xPL for wgf0sgcu_xPL in hXMPsSrOQzbh.KQPyuEwynMlj if wgf0sgcu_xPL.F9lJ8RbIonqb == F9lJ8RbIonqb]
del roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe6d\x9b@\x1f\xba\x05\x9d\x8a\x86\xa9\x16'), chr(0b1100100) + '\x65' + chr(99) + chr(111) + chr(0b1010010 + 0o22) + chr(0b1100101))(chr(1108 - 991) + '\x74' + chr(5952 - 5850) + '\x2d' + chr(0b110101 + 0o3)))
return nzTpIcepk0o8(chr(0b100011 + 0o15) + '\x6f' + '\061', 0b1000)
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/pympler/refgraph.py
|
ReferenceGraph.split
|
def split(self):
"""
Split the graph into sub-graphs. Only connected objects belong to the
same graph. `split` yields copies of the Graph object. Shallow copies
are used that only replicate the meta-information, but share the same
object list ``self.objects``.
>>> from pympler.refgraph import ReferenceGraph
>>> a = 42
>>> b = 'spam'
>>> c = {a: b}
>>> t = (1,2,3)
>>> rg = ReferenceGraph([a,b,c,t])
>>> for subgraph in rg.split():
... print subgraph.index
0
1
"""
self._annotate_groups()
index = 0
for group in range(self._max_group):
subgraph = copy(self)
subgraph.metadata = self.metadata[:]
subgraph.edges = self.edges.copy()
if subgraph._filter_group(group):
subgraph.total_size = sum([x.size for x in subgraph.metadata])
subgraph.index = index
index += 1
yield subgraph
|
python
|
def split(self):
"""
Split the graph into sub-graphs. Only connected objects belong to the
same graph. `split` yields copies of the Graph object. Shallow copies
are used that only replicate the meta-information, but share the same
object list ``self.objects``.
>>> from pympler.refgraph import ReferenceGraph
>>> a = 42
>>> b = 'spam'
>>> c = {a: b}
>>> t = (1,2,3)
>>> rg = ReferenceGraph([a,b,c,t])
>>> for subgraph in rg.split():
... print subgraph.index
0
1
"""
self._annotate_groups()
index = 0
for group in range(self._max_group):
subgraph = copy(self)
subgraph.metadata = self.metadata[:]
subgraph.edges = self.edges.copy()
if subgraph._filter_group(group):
subgraph.total_size = sum([x.size for x in subgraph.metadata])
subgraph.index = index
index += 1
yield subgraph
|
[
"def",
"split",
"(",
"self",
")",
":",
"self",
".",
"_annotate_groups",
"(",
")",
"index",
"=",
"0",
"for",
"group",
"in",
"range",
"(",
"self",
".",
"_max_group",
")",
":",
"subgraph",
"=",
"copy",
"(",
"self",
")",
"subgraph",
".",
"metadata",
"=",
"self",
".",
"metadata",
"[",
":",
"]",
"subgraph",
".",
"edges",
"=",
"self",
".",
"edges",
".",
"copy",
"(",
")",
"if",
"subgraph",
".",
"_filter_group",
"(",
"group",
")",
":",
"subgraph",
".",
"total_size",
"=",
"sum",
"(",
"[",
"x",
".",
"size",
"for",
"x",
"in",
"subgraph",
".",
"metadata",
"]",
")",
"subgraph",
".",
"index",
"=",
"index",
"index",
"+=",
"1",
"yield",
"subgraph"
] |
Split the graph into sub-graphs. Only connected objects belong to the
same graph. `split` yields copies of the Graph object. Shallow copies
are used that only replicate the meta-information, but share the same
object list ``self.objects``.
>>> from pympler.refgraph import ReferenceGraph
>>> a = 42
>>> b = 'spam'
>>> c = {a: b}
>>> t = (1,2,3)
>>> rg = ReferenceGraph([a,b,c,t])
>>> for subgraph in rg.split():
... print subgraph.index
0
1
|
[
"Split",
"the",
"graph",
"into",
"sub",
"-",
"graphs",
".",
"Only",
"connected",
"objects",
"belong",
"to",
"the",
"same",
"graph",
".",
"split",
"yields",
"copies",
"of",
"the",
"Graph",
"object",
".",
"Shallow",
"copies",
"are",
"used",
"that",
"only",
"replicate",
"the",
"meta",
"-",
"information",
"but",
"share",
"the",
"same",
"object",
"list",
"self",
".",
"objects",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/refgraph.py#L222-L252
|
train
|
Split the reference graph into sub - graphs.
|
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,wX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vLAglV8A,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' + '\157' + '\x31' + chr(555 - 506) + chr(55), 24769 - 24761), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + chr(0b111 + 0o56) + chr(910 - 861), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(48), 30255 - 30247), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + chr(48) + chr(52), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + '\064' + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b100100 + 0o113) + '\065' + chr(1218 - 1170), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + chr(0b110101) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11011 + 0o27) + chr(0b110111) + '\062', 11672 - 11664), nzTpIcepk0o8(chr(0b110000) + chr(0b11101 + 0o122) + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32' + chr(959 - 908) + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + chr(1095 - 984) + chr(0b110001) + chr(54) + chr(929 - 874), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + '\066' + '\x37', 8), nzTpIcepk0o8(chr(1374 - 1326) + chr(0b1101111) + chr(0b110010) + chr(2139 - 2090) + '\061', 0o10), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1101111) + '\061' + chr(776 - 725) + '\067', 29316 - 29308), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b100110 + 0o15) + '\x32' + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(684 - 635) + chr(53) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\x6f' + chr(2712 - 2657) + '\064', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + chr(50) + chr(204 - 153), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(168 - 118) + chr(0b110001) + '\062', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1001000 + 0o47) + '\061' + chr(91 - 38) + '\061', 8), nzTpIcepk0o8('\060' + chr(111) + chr(0b11010 + 0o30) + '\x36' + '\067', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + '\x32' + chr(1379 - 1329), 60611 - 60603), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(111) + chr(0b110011) + chr(2201 - 2153) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(7673 - 7562) + chr(1747 - 1698) + '\x30' + chr(1654 - 1604), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + chr(55) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(7635 - 7524) + chr(0b110011) + '\066' + '\x35', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + '\x30' + chr(0b110100), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\062' + chr(0b110110) + chr(2666 - 2614), 55094 - 55086), nzTpIcepk0o8(chr(670 - 622) + chr(111) + '\x33' + '\x37' + '\065', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + '\061' + '\x30', 2921 - 2913), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(111) + chr(53) + chr(0b100100 + 0o20), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(55) + '\x32', 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + chr(0b11010 + 0o26) + '\067', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10110 + 0o33) + chr(53) + '\065', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b101111 + 0o4) + chr(48) + '\062', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(50) + '\063' + '\x31', 0b1000), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1101111) + '\062' + chr(0b110100 + 0o2) + chr(0b110000 + 0o1), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1419 - 1369) + chr(2155 - 2104) + chr(0b11110 + 0o27), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\067' + chr(0b10110 + 0o37), 16604 - 16596)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1332 - 1279) + chr(0b110000), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'a'), '\144' + chr(0b1100101) + '\143' + chr(9232 - 9121) + chr(2713 - 2613) + chr(0b100011 + 0o102))(chr(0b10100 + 0o141) + '\164' + '\146' + chr(45) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def LfRrQOxuDvnC(hXMPsSrOQzbh):
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x10y\x07n\xab\xd0I\x99\xdfY\xfc\x05\x18\xfc/\xa5'), chr(0b1001101 + 0o27) + chr(0b1111 + 0o126) + chr(0b1100011) + chr(0b10100 + 0o133) + chr(100) + '\145')(chr(117) + chr(0b1110100) + '\x66' + chr(0b10111 + 0o26) + '\x38'))()
ZpfN5tSLaZze = nzTpIcepk0o8('\060' + '\157' + chr(551 - 503), 8)
for F9lJ8RbIonqb in bbT2xIe5pzk7(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'&Y\x11U\xb5\xf7e\x88\xfe7\xd9B'), chr(9140 - 9040) + '\x65' + chr(99) + '\157' + '\144' + '\x65')(chr(8595 - 8478) + '\164' + '\x66' + chr(0b101101) + chr(3062 - 3006)))):
B7zOTkDiY4ia = aZTCj4v5QdfO(hXMPsSrOQzbh)
B7zOTkDiY4ia.nmf2TsIJJ3IK = hXMPsSrOQzbh.nmf2TsIJJ3IK[:]
B7zOTkDiY4ia.KQPyuEwynMlj = hXMPsSrOQzbh.edges.copy()
if roI3spqORKae(B7zOTkDiY4ia, roI3spqORKae(ES5oEprVxulp(b'\x10~\x00l\xb0\xc1Z\xb2\xddt\xf4\x02\x07'), '\144' + '\x65' + chr(2668 - 2569) + '\x6f' + '\144' + chr(0b1100101))(chr(5861 - 5744) + '\164' + chr(0b110 + 0o140) + chr(45) + chr(56)))(F9lJ8RbIonqb):
B7zOTkDiY4ia.Noy3xbqUPU67 = oclC8DLjA_lV([bI5jsQ9OkQtj.e1HrJaQHACnl for bI5jsQ9OkQtj in B7zOTkDiY4ia.nmf2TsIJJ3IK])
B7zOTkDiY4ia.ZpfN5tSLaZze = ZpfN5tSLaZze
ZpfN5tSLaZze += nzTpIcepk0o8(chr(0b110000) + chr(4636 - 4525) + chr(0b110001), 0o10)
yield B7zOTkDiY4ia
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/pympler/refgraph.py
|
ReferenceGraph.split_and_sort
|
def split_and_sort(self):
"""
Split the graphs into sub graphs and return a list of all graphs sorted
by the number of nodes. The graph with most nodes is returned first.
"""
graphs = list(self.split())
graphs.sort(key=lambda x: -len(x.metadata))
for index, graph in enumerate(graphs):
graph.index = index
return graphs
|
python
|
def split_and_sort(self):
"""
Split the graphs into sub graphs and return a list of all graphs sorted
by the number of nodes. The graph with most nodes is returned first.
"""
graphs = list(self.split())
graphs.sort(key=lambda x: -len(x.metadata))
for index, graph in enumerate(graphs):
graph.index = index
return graphs
|
[
"def",
"split_and_sort",
"(",
"self",
")",
":",
"graphs",
"=",
"list",
"(",
"self",
".",
"split",
"(",
")",
")",
"graphs",
".",
"sort",
"(",
"key",
"=",
"lambda",
"x",
":",
"-",
"len",
"(",
"x",
".",
"metadata",
")",
")",
"for",
"index",
",",
"graph",
"in",
"enumerate",
"(",
"graphs",
")",
":",
"graph",
".",
"index",
"=",
"index",
"return",
"graphs"
] |
Split the graphs into sub graphs and return a list of all graphs sorted
by the number of nodes. The graph with most nodes is returned first.
|
[
"Split",
"the",
"graphs",
"into",
"sub",
"graphs",
"and",
"return",
"a",
"list",
"of",
"all",
"graphs",
"sorted",
"by",
"the",
"number",
"of",
"nodes",
".",
"The",
"graph",
"with",
"most",
"nodes",
"is",
"returned",
"first",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/refgraph.py#L255-L264
|
train
|
Split the graphs into sub graphs and sort the graphs by the number of nodes.
|
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,VwkB9reRD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nTXOd5N96r1,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(0b11 + 0o154) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1101111) + '\061' + '\x37' + chr(51), 0b1000), nzTpIcepk0o8('\060' + chr(11597 - 11486) + chr(171 - 122) + '\x35' + chr(0b10000 + 0o42), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + '\063' + chr(49), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110110) + chr(1953 - 1905), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(0b10011 + 0o37) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(111) + chr(51) + chr(0b111 + 0o54) + chr(0b100110 + 0o20), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(1130 - 1081) + chr(2729 - 2675) + chr(51), 11905 - 11897), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + chr(48) + '\066', 27961 - 27953), nzTpIcepk0o8('\060' + '\157' + chr(51) + '\x36' + chr(0b110011), 41796 - 41788), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + chr(0b110101) + chr(53), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b11001 + 0o126) + '\066' + '\x32', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(129 - 75) + '\x35', 22813 - 22805), nzTpIcepk0o8(chr(48) + chr(3857 - 3746) + chr(0b101010 + 0o7) + chr(0b110101) + '\063', ord("\x08")), nzTpIcepk0o8(chr(281 - 233) + chr(0b101 + 0o152) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1000 + 0o53) + chr(1692 - 1640) + chr(986 - 934), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b101111 + 0o100) + chr(0b10111 + 0o33) + chr(0b110011 + 0o4) + '\x34', 0o10), nzTpIcepk0o8(chr(1412 - 1364) + '\x6f' + '\x33' + chr(55) + chr(1625 - 1570), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(1045 - 996) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b0 + 0o67) + '\063', 36039 - 36031), nzTpIcepk0o8('\x30' + '\157' + '\x31' + chr(0b100 + 0o61) + chr(165 - 113), 0b1000), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(8427 - 8316) + chr(1182 - 1131) + chr(1690 - 1638) + chr(51), 0o10), nzTpIcepk0o8(chr(48) + chr(1687 - 1576) + chr(0b110011 + 0o0) + chr(55) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b111100 + 0o63) + chr(51) + chr(0b110111) + chr(1142 - 1094), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b100111 + 0o12) + '\060' + '\x32', 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b101001 + 0o106) + '\x31' + '\x33' + '\x33', 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\x35' + '\064', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b1 + 0o60) + '\061' + chr(0b1110 + 0o43), 0o10), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b1101111) + chr(0b11 + 0o61) + '\x33', 0o10), nzTpIcepk0o8(chr(559 - 511) + chr(0b1101111) + chr(0b1101 + 0o44) + chr(0b110010 + 0o3) + chr(0b1010 + 0o46), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(0b110010) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(11494 - 11383) + '\065' + chr(51), 48415 - 48407), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(0b100101 + 0o13) + chr(52), 44773 - 44765), nzTpIcepk0o8(chr(1284 - 1236) + chr(0b1101111) + chr(49) + chr(53) + chr(52), 8), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b1101111) + chr(50) + chr(0b110010) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + '\x33' + '\065', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1664 - 1615) + '\x37' + chr(52), 64195 - 64187), nzTpIcepk0o8('\060' + '\157' + '\x33' + chr(0b110010) + chr(55), 0b1000), nzTpIcepk0o8('\060' + chr(0b1000111 + 0o50) + chr(0b11000 + 0o31) + chr(0b110110) + chr(538 - 489), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + chr(0b101101 + 0o3) + '\x36', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1011100 + 0o23) + '\x35' + chr(0b110000), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'/'), '\144' + chr(101) + chr(0b10011 + 0o120) + '\157' + chr(6061 - 5961) + '\x65')(chr(0b1110101) + chr(805 - 689) + '\146' + chr(0b101101) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def O76kP1YuD2TD(hXMPsSrOQzbh):
gdVfrlipfIDw = H4NoA26ON7iG(hXMPsSrOQzbh.LfRrQOxuDvnC())
roI3spqORKae(gdVfrlipfIDw, roI3spqORKae(ES5oEprVxulp(b'r\x14\x18-'), chr(0b1100100) + '\145' + '\143' + chr(10796 - 10685) + '\x64' + chr(0b1100101))(chr(0b111111 + 0o66) + chr(0b101101 + 0o107) + '\x66' + chr(45) + chr(2669 - 2613)))(key=lambda bI5jsQ9OkQtj: -ftfygxgFas5X(roI3spqORKae(bI5jsQ9OkQtj, roI3spqORKae(ES5oEprVxulp(b'o\x16\x0ckd&\x979\x0c\xc0\xe4y'), '\x64' + '\145' + chr(0b100010 + 0o101) + chr(111) + chr(0b1100100) + chr(0b1111 + 0o126))('\165' + chr(116) + '\146' + chr(45) + chr(1578 - 1522)))))
for (ZpfN5tSLaZze, jJ6ZXFeIkL8J) in _kV_Bomx8PZ4(gdVfrlipfIDw):
jJ6ZXFeIkL8J.ZpfN5tSLaZze = ZpfN5tSLaZze
return gdVfrlipfIDw
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/pympler/refgraph.py
|
ReferenceGraph._annotate_objects
|
def _annotate_objects(self):
"""
Extract meta-data describing the stored objects.
"""
self.metadata = []
sizer = Asizer()
sizes = sizer.asizesof(*self.objects)
self.total_size = sizer.total
for obj, sz in zip(self.objects, sizes):
md = _MetaObject()
md.size = sz
md.id = id(obj)
try:
md.type = obj.__class__.__name__
except (AttributeError, ReferenceError): # pragma: no cover
md.type = type(obj).__name__
md.str = safe_repr(obj, clip=128)
self.metadata.append(md)
|
python
|
def _annotate_objects(self):
"""
Extract meta-data describing the stored objects.
"""
self.metadata = []
sizer = Asizer()
sizes = sizer.asizesof(*self.objects)
self.total_size = sizer.total
for obj, sz in zip(self.objects, sizes):
md = _MetaObject()
md.size = sz
md.id = id(obj)
try:
md.type = obj.__class__.__name__
except (AttributeError, ReferenceError): # pragma: no cover
md.type = type(obj).__name__
md.str = safe_repr(obj, clip=128)
self.metadata.append(md)
|
[
"def",
"_annotate_objects",
"(",
"self",
")",
":",
"self",
".",
"metadata",
"=",
"[",
"]",
"sizer",
"=",
"Asizer",
"(",
")",
"sizes",
"=",
"sizer",
".",
"asizesof",
"(",
"*",
"self",
".",
"objects",
")",
"self",
".",
"total_size",
"=",
"sizer",
".",
"total",
"for",
"obj",
",",
"sz",
"in",
"zip",
"(",
"self",
".",
"objects",
",",
"sizes",
")",
":",
"md",
"=",
"_MetaObject",
"(",
")",
"md",
".",
"size",
"=",
"sz",
"md",
".",
"id",
"=",
"id",
"(",
"obj",
")",
"try",
":",
"md",
".",
"type",
"=",
"obj",
".",
"__class__",
".",
"__name__",
"except",
"(",
"AttributeError",
",",
"ReferenceError",
")",
":",
"# pragma: no cover",
"md",
".",
"type",
"=",
"type",
"(",
"obj",
")",
".",
"__name__",
"md",
".",
"str",
"=",
"safe_repr",
"(",
"obj",
",",
"clip",
"=",
"128",
")",
"self",
".",
"metadata",
".",
"append",
"(",
"md",
")"
] |
Extract meta-data describing the stored objects.
|
[
"Extract",
"meta",
"-",
"data",
"describing",
"the",
"stored",
"objects",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/refgraph.py#L267-L284
|
train
|
Extract meta - data describing the stored objects.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,W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U,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('\060' + '\x6f' + '\x33' + chr(0b110001) + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(2971 - 2860) + '\x32' + '\060' + '\061', 52076 - 52068), nzTpIcepk0o8('\060' + chr(0b1000111 + 0o50) + chr(2600 - 2549) + chr(0b11010 + 0o31), 61776 - 61768), nzTpIcepk0o8(chr(0b110000) + chr(9126 - 9015) + chr(1126 - 1075) + chr(2112 - 2059) + chr(2658 - 2606), 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\x6f' + chr(50) + chr(0b100011 + 0o20) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\157' + chr(0b10000 + 0o41) + '\x32' + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + '\x34' + chr(0b101010 + 0o7), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(895 - 846) + '\x36' + chr(453 - 398), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\063' + chr(51) + chr(0b1110 + 0o51), ord("\x08")), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\157' + '\063' + chr(0b101110 + 0o5), 8), nzTpIcepk0o8(chr(0b11 + 0o55) + '\x6f' + '\x36' + '\067', 0o10), nzTpIcepk0o8('\x30' + chr(0b100110 + 0o111) + chr(0b110001) + '\x31' + chr(1616 - 1564), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(1341 - 1293) + chr(49), 0b1000), nzTpIcepk0o8('\x30' + chr(11473 - 11362) + chr(0b110010) + chr(50) + chr(50), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(196 - 146) + '\x31' + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + chr(0b110110) + '\064', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + chr(50), 45661 - 45653), nzTpIcepk0o8(chr(48) + chr(11369 - 11258) + chr(0b110011) + chr(52) + chr(0b1000 + 0o57), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x34' + '\x33', 0o10), nzTpIcepk0o8(chr(1025 - 977) + '\x6f' + chr(1566 - 1515) + '\061', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(0b11010 + 0o34) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1398 - 1349) + chr(55) + '\x32', 0b1000), nzTpIcepk0o8('\x30' + chr(6266 - 6155) + chr(0b111 + 0o53) + chr(1885 - 1836) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b1101111) + chr(50) + chr(0b110110) + '\063', 0b1000), nzTpIcepk0o8(chr(836 - 788) + chr(7000 - 6889) + chr(50) + chr(0b1101 + 0o43) + '\066', 0b1000), nzTpIcepk0o8(chr(1018 - 970) + chr(11509 - 11398) + chr(0b110101) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1196 - 1144) + chr(48), 41533 - 41525), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100001 + 0o21) + chr(405 - 353) + '\x31', 8), nzTpIcepk0o8(chr(1107 - 1059) + chr(0b1000010 + 0o55) + '\067' + chr(0b1011 + 0o50), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + '\x31' + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\x6f' + '\061' + chr(0b1 + 0o61) + chr(48), 52801 - 52793), nzTpIcepk0o8(chr(0b110000) + chr(766 - 655) + chr(440 - 389) + '\065' + chr(286 - 236), 14285 - 14277), nzTpIcepk0o8('\x30' + chr(7406 - 7295) + chr(50) + chr(350 - 301) + '\x31', 8), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + chr(52) + chr(1693 - 1638), 0o10), nzTpIcepk0o8(chr(1238 - 1190) + chr(0b1101111) + '\061' + chr(2389 - 2339) + chr(50), 8), nzTpIcepk0o8(chr(771 - 723) + chr(0b10 + 0o155) + chr(0b101011 + 0o10) + chr(54) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(111) + '\063' + chr(1988 - 1937) + '\066', 0b1000), nzTpIcepk0o8(chr(48) + chr(8635 - 8524) + '\061' + '\x33' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b100011 + 0o114) + '\x31' + '\x33' + chr(1714 - 1665), 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(3597 - 3486) + '\063' + chr(1505 - 1451) + chr(0b110000), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b1101 + 0o142) + '\065' + '\x30', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xe0'), chr(0b10000 + 0o124) + '\145' + chr(0b1100011) + '\157' + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(721 - 605) + chr(0b1011111 + 0o7) + chr(0b101101) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def Ex0gC7cmvtk4(hXMPsSrOQzbh):
hXMPsSrOQzbh.nmf2TsIJJ3IK = []
wmHLWcqYYilp = k9rzkZfhGKud()
Dhp70M66QSsa = wmHLWcqYYilp.asizesof(*hXMPsSrOQzbh.unFw4B5pa4XN)
hXMPsSrOQzbh.Noy3xbqUPU67 = wmHLWcqYYilp.w0KcdUxJBfX0
for (kIMfkyypPTcC, G4U5vqz_1g79) in TxMFWa_Xzviv(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xbb\xef]\x9b\xa8\x10\x94\x07\xbe/o\x02'), '\x64' + '\x65' + chr(99) + '\x6f' + '\x64' + chr(6482 - 6381))(chr(0b100011 + 0o122) + '\164' + chr(0b1000100 + 0o42) + chr(45) + '\070')), Dhp70M66QSsa):
Fht69Dg9sUaQ = QWPNXMy1Ck_f()
Fht69Dg9sUaQ.e1HrJaQHACnl = G4U5vqz_1g79
Fht69Dg9sUaQ.maLnLg8O5zPT = maLnLg8O5zPT(kIMfkyypPTcC)
try:
Fht69Dg9sUaQ.MJ07XsN5uFgW = kIMfkyypPTcC.__class__.AYtDRlqeP0tq
except (bIsJhlpYrrU2, ze1AhR_jfpze):
Fht69Dg9sUaQ.MJ07XsN5uFgW = MJ07XsN5uFgW(kIMfkyypPTcC).AYtDRlqeP0tq
Fht69Dg9sUaQ.N9zlRy29S1SS = lJJLmx9jpnpP(kIMfkyypPTcC, clip=nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + chr(2159 - 2111) + '\060', 31492 - 31484))
roI3spqORKae(hXMPsSrOQzbh.metadata, roI3spqORKae(ES5oEprVxulp(b'\x86\xd5H\xd8\xe45\xe6\x18\xb5tby'), '\144' + '\x65' + chr(5649 - 5550) + '\157' + chr(7519 - 7419) + '\x65')('\x75' + chr(116) + chr(102) + '\055' + chr(164 - 108)))(Fht69Dg9sUaQ)
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/pympler/refgraph.py
|
ReferenceGraph._get_graphviz_data
|
def _get_graphviz_data(self):
"""
Emit a graph representing the connections between the objects described
within the metadata list. The text representation can be transformed to
a graph with graphviz. Returns a string.
"""
s = []
header = '// Process this file with graphviz\n'
s.append( header)
s.append('digraph G {\n')
s.append(' node [shape=box];\n')
for md in self.metadata:
label = trunc(md.str, 48).replace('"', "'")
extra = ''
if md.type == 'instancemethod':
extra = ', color=red'
elif md.type == 'frame':
extra = ', color=orange'
s.append(' "X%s" [ label = "%s\\n%s" %s ];\n' % \
(hex(md.id)[1:], label, md.type, extra))
for e in self.edges:
extra = ''
if e.label == '__dict__':
extra = ',weight=100'
s.append(' X%s -> X%s [label="%s"%s];\n' % \
(hex(e.src)[1:], hex(e.dst)[1:], e.label, extra))
s.append('}\n')
return "".join(s)
|
python
|
def _get_graphviz_data(self):
"""
Emit a graph representing the connections between the objects described
within the metadata list. The text representation can be transformed to
a graph with graphviz. Returns a string.
"""
s = []
header = '// Process this file with graphviz\n'
s.append( header)
s.append('digraph G {\n')
s.append(' node [shape=box];\n')
for md in self.metadata:
label = trunc(md.str, 48).replace('"', "'")
extra = ''
if md.type == 'instancemethod':
extra = ', color=red'
elif md.type == 'frame':
extra = ', color=orange'
s.append(' "X%s" [ label = "%s\\n%s" %s ];\n' % \
(hex(md.id)[1:], label, md.type, extra))
for e in self.edges:
extra = ''
if e.label == '__dict__':
extra = ',weight=100'
s.append(' X%s -> X%s [label="%s"%s];\n' % \
(hex(e.src)[1:], hex(e.dst)[1:], e.label, extra))
s.append('}\n')
return "".join(s)
|
[
"def",
"_get_graphviz_data",
"(",
"self",
")",
":",
"s",
"=",
"[",
"]",
"header",
"=",
"'// Process this file with graphviz\\n'",
"s",
".",
"append",
"(",
"header",
")",
"s",
".",
"append",
"(",
"'digraph G {\\n'",
")",
"s",
".",
"append",
"(",
"' node [shape=box];\\n'",
")",
"for",
"md",
"in",
"self",
".",
"metadata",
":",
"label",
"=",
"trunc",
"(",
"md",
".",
"str",
",",
"48",
")",
".",
"replace",
"(",
"'\"'",
",",
"\"'\"",
")",
"extra",
"=",
"''",
"if",
"md",
".",
"type",
"==",
"'instancemethod'",
":",
"extra",
"=",
"', color=red'",
"elif",
"md",
".",
"type",
"==",
"'frame'",
":",
"extra",
"=",
"', color=orange'",
"s",
".",
"append",
"(",
"' \"X%s\" [ label = \"%s\\\\n%s\" %s ];\\n'",
"%",
"(",
"hex",
"(",
"md",
".",
"id",
")",
"[",
"1",
":",
"]",
",",
"label",
",",
"md",
".",
"type",
",",
"extra",
")",
")",
"for",
"e",
"in",
"self",
".",
"edges",
":",
"extra",
"=",
"''",
"if",
"e",
".",
"label",
"==",
"'__dict__'",
":",
"extra",
"=",
"',weight=100'",
"s",
".",
"append",
"(",
"' X%s -> X%s [label=\"%s\"%s];\\n'",
"%",
"(",
"hex",
"(",
"e",
".",
"src",
")",
"[",
"1",
":",
"]",
",",
"hex",
"(",
"e",
".",
"dst",
")",
"[",
"1",
":",
"]",
",",
"e",
".",
"label",
",",
"extra",
")",
")",
"s",
".",
"append",
"(",
"'}\\n'",
")",
"return",
"\"\"",
".",
"join",
"(",
"s",
")"
] |
Emit a graph representing the connections between the objects described
within the metadata list. The text representation can be transformed to
a graph with graphviz. Returns a string.
|
[
"Emit",
"a",
"graph",
"representing",
"the",
"connections",
"between",
"the",
"objects",
"described",
"within",
"the",
"metadata",
"list",
".",
"The",
"text",
"representation",
"can",
"be",
"transformed",
"to",
"a",
"graph",
"with",
"graphviz",
".",
"Returns",
"a",
"string",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/refgraph.py#L287-L315
|
train
|
Return a string representation of the object with graphviz.
|
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,jZIjKu8I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ne,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(267 - 219) + chr(3842 - 3731) + '\x36' + '\x33', 32417 - 32409), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101111) + chr(0b110001) + chr(251 - 203) + '\064', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + '\063' + '\x33', 6957 - 6949), nzTpIcepk0o8(chr(48) + chr(11915 - 11804) + chr(0b100101 + 0o16) + chr(1339 - 1285), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(5879 - 5768) + '\063' + '\x31' + '\065', 0o10), nzTpIcepk0o8('\060' + chr(0b1101100 + 0o3) + '\x32' + chr(843 - 795) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(48) + chr(5074 - 4963) + chr(0b110001) + chr(0b110011) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + chr(52) + chr(0b10111 + 0o35), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(810 - 762) + chr(111) + '\061' + chr(0b110011) + '\x32', 27635 - 27627), nzTpIcepk0o8('\060' + '\x6f' + chr(0b11100 + 0o27) + chr(2133 - 2078), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + chr(2204 - 2149) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b100100 + 0o113) + '\062' + '\067', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(4240 - 4129) + chr(0b100100 + 0o15) + chr(465 - 410) + chr(554 - 506), 42975 - 42967), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + '\064' + chr(0b1010 + 0o54), 0o10), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(0b100000 + 0o117) + chr(1097 - 1047) + '\061' + chr(0b11010 + 0o27), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110110) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b10110 + 0o32) + '\157' + '\x33' + chr(0b110010) + chr(973 - 920), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(54) + '\067', 0b1000), nzTpIcepk0o8('\060' + chr(0b100000 + 0o117) + chr(0b110011) + chr(0b100 + 0o56) + chr(55), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(49) + '\x33' + chr(2205 - 2155), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + '\064' + '\x30', 0o10), nzTpIcepk0o8(chr(1756 - 1708) + '\x6f' + chr(49) + chr(0b110000) + '\x31', ord("\x08")), nzTpIcepk0o8('\x30' + chr(10709 - 10598) + chr(780 - 729) + chr(1491 - 1440) + '\066', 0o10), nzTpIcepk0o8(chr(163 - 115) + chr(111) + chr(0b100110 + 0o15) + chr(55) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b100001 + 0o21) + chr(0b110111) + chr(48), 7254 - 7246), nzTpIcepk0o8(chr(48) + chr(111) + '\065' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(1115 - 1067) + '\157' + chr(1481 - 1430) + chr(1532 - 1480) + chr(504 - 452), ord("\x08")), nzTpIcepk0o8(chr(0b1 + 0o57) + '\x6f' + chr(0b1001 + 0o51) + chr(0b101100 + 0o7) + chr(1840 - 1791), 0o10), nzTpIcepk0o8('\x30' + chr(0b110010 + 0o75) + chr(0b110001) + chr(779 - 727) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + '\060' + '\067', 1907 - 1899), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + chr(0b101101 + 0o4) + '\064', 12009 - 12001), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b1101111) + '\061' + '\061' + '\063', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(0b110011) + chr(0b10101 + 0o41), 8), nzTpIcepk0o8(chr(2025 - 1977) + chr(0b1101111) + chr(0b10101 + 0o34) + '\x35' + chr(1938 - 1887), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b10111 + 0o130) + chr(50) + chr(52) + chr(284 - 236), 8), nzTpIcepk0o8(chr(48) + chr(0b110011 + 0o74) + chr(314 - 263) + chr(50) + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + '\x31', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + '\x35' + chr(761 - 711), 567 - 559)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(1407 - 1296) + '\065' + chr(0b100001 + 0o17), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x1d'), chr(7552 - 7452) + chr(101) + chr(0b1100011) + '\157' + chr(100) + chr(101))('\165' + chr(0b1110100) + '\146' + chr(45) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def CzKDQSBZU9WU(hXMPsSrOQzbh):
PmE5_h409JAA = []
jkp_M8Pp8CIt = roI3spqORKae(ES5oEprVxulp(b'\x1ck{N\xbf\xed?\x01v)?\xcb\x7f\x11\x15\xa9S\xbc\xdb\xb2z\xd7(\xaa\x97\x98J\x96\xf8\x10/\xfa"\xa4a'), '\144' + chr(8990 - 8889) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(0b1011110 + 0o7))(chr(0b1101000 + 0o15) + '\x74' + '\x66' + chr(0b101101) + '\x38')
roI3spqORKae(PmE5_h409JAA, roI3spqORKae(ES5oEprVxulp(b'{\x10\x08*\xb5\xe5\x1b\x0bo5J\x8a'), chr(100) + chr(0b1100101) + chr(6964 - 6865) + '\157' + chr(0b0 + 0o144) + chr(0b1100101))(chr(0b1110101) + chr(0b1011111 + 0o25) + '\146' + chr(600 - 555) + '\x38'))(jkp_M8Pp8CIt)
roI3spqORKae(PmE5_h409JAA, roI3spqORKae(ES5oEprVxulp(b'{\x10\x08*\xb5\xe5\x1b\x0bo5J\x8a'), chr(577 - 477) + '\x65' + chr(99) + chr(111) + '\144' + '\x65')('\x75' + chr(116) + chr(926 - 824) + '\x2d' + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'W-<l\xac\xf24DBzd\xb5'), '\x64' + chr(0b1010111 + 0o16) + chr(0b1100011) + chr(0b10 + 0o155) + '\144' + '\x65')(chr(0b1000000 + 0o65) + '\x74' + chr(0b1100110) + '\055' + chr(0b11010 + 0o36)))
roI3spqORKae(PmE5_h409JAA, roI3spqORKae(ES5oEprVxulp(b'{\x10\x08*\xb5\xe5\x1b\x0bo5J\x8a'), chr(100) + chr(1827 - 1726) + chr(99) + '\157' + '\x64' + chr(0b1011 + 0o132))('\165' + chr(0b1110100) + chr(6504 - 6402) + chr(0b101011 + 0o2) + chr(2204 - 2148)))(roI3spqORKae(ES5oEprVxulp(b'\x13d{>\xa3\xed8\x01%\x01l\xd7v\x08\x03\xb4W\xba\xcf\x8aa\xaa'), '\x64' + chr(0b1 + 0o144) + chr(0b1000001 + 0o42) + '\157' + chr(0b1100001 + 0o3) + chr(0b1100101))('\x75' + chr(6924 - 6808) + chr(102) + chr(0b101 + 0o50) + chr(0b10010 + 0o46)))
for Fht69Dg9sUaQ in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'])=,\x99\xf1\x15.OiV\xf4'), '\x64' + chr(101) + chr(0b1100011) + chr(0b111000 + 0o67) + chr(100) + chr(0b110010 + 0o63))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + chr(56))):
OkDIn6t2Cke6 = Lo4yR8ecDIRe(Fht69Dg9sUaQ.str, nzTpIcepk0o8(chr(48) + chr(0b110101 + 0o72) + '\066' + chr(48), ord("\x08"))).E91dbqOZXBpJ(roI3spqORKae(ES5oEprVxulp(b'\x11'), '\x64' + '\x65' + chr(0b1010010 + 0o21) + chr(3029 - 2918) + chr(1320 - 1220) + chr(1020 - 919))(chr(0b1110101) + chr(0b1100111 + 0o15) + chr(102) + chr(0b101000 + 0o5) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\x14'), chr(100) + chr(0b1100101) + '\143' + chr(111) + chr(0b1100100) + chr(101))(chr(117) + chr(5534 - 5418) + chr(4410 - 4308) + chr(0b1111 + 0o36) + chr(0b1101 + 0o53)))
H4aiVlfb0_oS = roI3spqORKae(ES5oEprVxulp(b''), chr(0b1100100) + '\x65' + '\143' + chr(0b1101110 + 0o1) + chr(0b1100100) + chr(0b1100101))('\x75' + chr(116) + '\146' + chr(45) + chr(0b111000))
if roI3spqORKae(Fht69Dg9sUaQ, roI3spqORKae(ES5oEprVxulp(b'~\x0ek)\x95\xf1\x12Qp\x1cx\xe8'), chr(100) + '\x65' + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(10066 - 9965))(chr(0b1110101) + '\164' + chr(0b1011000 + 0o16) + '\055' + chr(56))) == roI3spqORKae(ES5oEprVxulp(b'Z*(j\xac\xec?\x01h?k\xd7x\x1c'), '\144' + '\145' + '\143' + chr(0b1010000 + 0o37) + chr(1837 - 1737) + chr(101))(chr(0b1110101) + chr(7269 - 7153) + '\x66' + '\x2d' + chr(0b111000)):
H4aiVlfb0_oS = roI3spqORKae(ES5oEprVxulp(b'\x1fd8q\xa1\xed.Yw?{'), chr(100) + '\145' + chr(99) + '\157' + '\144' + '\x65')(chr(0b100 + 0o161) + '\x74' + chr(0b1100110) + chr(0b100000 + 0o15) + chr(453 - 397))
elif roI3spqORKae(Fht69Dg9sUaQ, roI3spqORKae(ES5oEprVxulp(b'~\x0ek)\x95\xf1\x12Qp\x1cx\xe8'), chr(0b10010 + 0o122) + chr(5224 - 5123) + chr(0b1100011) + chr(111) + '\144' + '\145')('\x75' + '\164' + '\146' + chr(0b1010 + 0o43) + '\070')) == roI3spqORKae(ES5oEprVxulp(b'U6:s\xa8'), '\144' + '\x65' + chr(0b1100011) + '\157' + chr(100) + chr(6740 - 6639))(chr(117) + '\164' + chr(5743 - 5641) + chr(1461 - 1416) + '\x38'):
H4aiVlfb0_oS = roI3spqORKae(ES5oEprVxulp(b'\x1fd8q\xa1\xed.Yj(~\xd1p\x1d'), chr(0b1100000 + 0o4) + chr(101) + chr(1350 - 1251) + chr(0b10111 + 0o130) + '\144' + chr(0b1100101))('\165' + chr(4410 - 4294) + '\146' + chr(45) + '\070')
roI3spqORKae(PmE5_h409JAA, roI3spqORKae(ES5oEprVxulp(b'{\x10\x08*\xb5\xe5\x1b\x0bo5J\x8a'), chr(100) + '\145' + '\143' + chr(111) + chr(7616 - 7516) + chr(0b1100101))(chr(0b1110 + 0o147) + chr(116) + '\146' + '\x2d' + chr(56)))(roI3spqORKae(ES5oEprVxulp(b"\x13d{>\xef\xday\x17'zD\x9f{\x19\x04\xecY\xf5\x8a\xf7x\x852\x82\x91\x9d^\xc6\xb9E4\xac\x16\xe5a"), chr(100) + chr(344 - 243) + '\143' + chr(0b1101111) + '\144' + chr(0b1011 + 0o132))(chr(117) + chr(116) + chr(0b1100110) + '\055' + '\x38') % (vgO67Nkl7Kt9(roI3spqORKae(Fht69Dg9sUaQ, roI3spqORKae(ES5oEprVxulp(b'^%\x17p\x81\xe5d+0 O\xeb'), chr(0b1010101 + 0o17) + '\x65' + chr(0b1001101 + 0o26) + '\x6f' + chr(100) + chr(0b1100101))(chr(117) + chr(5486 - 5370) + '\146' + chr(45) + chr(0b100101 + 0o23))))[nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(2003 - 1954), 0o10):], OkDIn6t2Cke6, roI3spqORKae(Fht69Dg9sUaQ, roI3spqORKae(ES5oEprVxulp(b'~\x0ek)\x95\xf1\x12Qp\x1cx\xe8'), chr(7994 - 7894) + '\x65' + '\143' + '\157' + chr(100) + chr(7199 - 7098))(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(0b11101 + 0o20) + chr(0b111000))), H4aiVlfb0_oS))
for wgf0sgcu_xPL in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'x\x15\x0bg\xb8\xc7+\x1dk\x17s\xd5'), chr(100) + '\x65' + chr(4020 - 3921) + chr(9270 - 9159) + '\x64' + chr(0b1100001 + 0o4))(chr(0b1000111 + 0o56) + chr(116) + chr(6646 - 6544) + '\x2d' + chr(0b10010 + 0o46))):
H4aiVlfb0_oS = roI3spqORKae(ES5oEprVxulp(b''), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(0b1001011 + 0o31) + chr(0b1011111 + 0o6))(chr(5148 - 5031) + chr(0b1110100) + '\146' + chr(45) + '\070')
if roI3spqORKae(wgf0sgcu_xPL, roI3spqORKae(ES5oEprVxulp(b'|/\x1fW\xa3\xb4(VF1z\x89'), chr(100) + chr(101) + '\143' + '\x6f' + chr(100) + chr(8067 - 7966))(chr(117) + chr(0b11011 + 0o131) + chr(0b1100110) + '\x2d' + chr(56))) == roI3spqORKae(ES5oEprVxulp(b'l\x1b?w\xae\xf6\x03;'), '\x64' + chr(101) + '\143' + chr(0b1101 + 0o142) + chr(100) + chr(101))(chr(12764 - 12647) + chr(116) + chr(0b1000110 + 0o40) + '\x2d' + chr(2252 - 2196)):
H4aiVlfb0_oS = roI3spqORKae(ES5oEprVxulp(b'\x1f3>w\xaa\xea(Y4j/'), '\x64' + chr(0b1000 + 0o135) + chr(0b10011 + 0o120) + chr(0b1101111) + '\x64' + chr(101))('\x75' + chr(116) + '\146' + '\055' + chr(0b111000))
roI3spqORKae(PmE5_h409JAA, roI3spqORKae(ES5oEprVxulp(b'{\x10\x08*\xb5\xe5\x1b\x0bo5J\x8a'), '\x64' + '\145' + chr(99) + chr(0b1011101 + 0o22) + chr(3789 - 3689) + '\x65')(chr(0b1110101) + '\164' + chr(0b10101 + 0o121) + '\055' + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\x13d{>\x95\xa7/D(d?\xe72\x0bF\xd2Y\xb4\xd5\xb26\x9dc\xfb\x8c\x9a\x08\x97\xc4[M'), chr(2015 - 1915) + '\x65' + '\143' + chr(0b1010 + 0o145) + chr(7417 - 7317) + chr(0b10010 + 0o123))('\165' + chr(0b1101011 + 0o11) + chr(102) + '\055' + '\070') % (vgO67Nkl7Kt9(roI3spqORKae(wgf0sgcu_xPL, roI3spqORKae(ES5oEprVxulp(b"X',h\xbf\xe04PB.+\xcd"), chr(0b1100000 + 0o4) + chr(0b1010011 + 0o22) + chr(99) + '\157' + chr(100) + chr(5221 - 5120))(chr(0b1101100 + 0o11) + chr(0b1000 + 0o154) + chr(102) + chr(0b101101) + chr(0b111000))))[nzTpIcepk0o8('\060' + '\x6f' + chr(492 - 443), 8):], vgO67Nkl7Kt9(roI3spqORKae(wgf0sgcu_xPL, roI3spqORKae(ES5oEprVxulp(b'W7/'), chr(8723 - 8623) + chr(101) + '\x63' + chr(0b1010000 + 0o37) + chr(6134 - 6034) + chr(0b1100101))(chr(0b1110101) + chr(0b11 + 0o161) + chr(0b1100110) + '\055' + chr(56))))[nzTpIcepk0o8(chr(1457 - 1409) + chr(0b11111 + 0o120) + '\x31', 8):], roI3spqORKae(wgf0sgcu_xPL, roI3spqORKae(ES5oEprVxulp(b'|/\x1fW\xa3\xb4(VF1z\x89'), '\144' + '\x65' + chr(0b101000 + 0o73) + chr(0b1101111) + '\x64' + chr(101))(chr(7437 - 7320) + chr(0b1110100) + chr(0b1000101 + 0o41) + chr(0b10110 + 0o27) + chr(0b11111 + 0o31))), H4aiVlfb0_oS))
roI3spqORKae(PmE5_h409JAA, roI3spqORKae(ES5oEprVxulp(b'{\x10\x08*\xb5\xe5\x1b\x0bo5J\x8a'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(360 - 260) + '\x65')(chr(0b1110101) + '\x74' + '\146' + '\x2d' + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'NN'), '\x64' + '\145' + '\143' + chr(0b1011110 + 0o21) + chr(0b1100100) + '\145')('\165' + chr(116) + chr(0b1100011 + 0o3) + chr(45) + chr(0b111000)))
return roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b''), chr(100) + '\145' + chr(99) + chr(12012 - 11901) + chr(0b11001 + 0o113) + chr(6873 - 6772))(chr(1580 - 1463) + chr(116) + chr(0b1011011 + 0o13) + chr(0b101101) + '\070'), roI3spqORKae(ES5oEprVxulp(b'jp"S\xf4\xc0?\x02Q\x19Q\xce'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(13617 - 13500) + chr(0b1001 + 0o153) + chr(0b1100110) + chr(0b11011 + 0o22) + chr(0b101 + 0o63)))(PmE5_h409JAA)
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/pympler/refgraph.py
|
ReferenceGraph.render
|
def render(self, filename, cmd='dot', format='ps', unflatten=False):
"""
Render the graph to `filename` using graphviz. The graphviz invocation
command may be overriden by specifying `cmd`. The `format` may be any
specifier recognized by the graph renderer ('-Txxx' command). The graph
can be preprocessed by the *unflatten* tool if the `unflatten` parameter
is True. If there are no objects to illustrate, the method does not
invoke graphviz and returns False. If the renderer returns successfully
(return code 0), True is returned.
An `OSError` is raised if the graphviz tool cannot be found.
"""
if self.objects == []:
return False
data = self._get_graphviz_data()
options = ('-Nfontsize=10',
'-Efontsize=10',
'-Nstyle=filled',
'-Nfillcolor=#E5EDB8',
'-Ncolor=#CCCCCC')
cmdline = (cmd, '-T%s' % format, '-o', filename) + options
if unflatten:
p1 = Popen(('unflatten', '-l7'), stdin=PIPE, stdout=PIPE,
**popen_flags)
p2 = Popen(cmdline, stdin=p1.stdout, **popen_flags)
p1.communicate(encode4pipe(data))
p2.communicate()
return p2.returncode == 0
else:
p = Popen(cmdline, stdin=PIPE, **popen_flags)
p.communicate(encode4pipe(data))
return p.returncode == 0
|
python
|
def render(self, filename, cmd='dot', format='ps', unflatten=False):
"""
Render the graph to `filename` using graphviz. The graphviz invocation
command may be overriden by specifying `cmd`. The `format` may be any
specifier recognized by the graph renderer ('-Txxx' command). The graph
can be preprocessed by the *unflatten* tool if the `unflatten` parameter
is True. If there are no objects to illustrate, the method does not
invoke graphviz and returns False. If the renderer returns successfully
(return code 0), True is returned.
An `OSError` is raised if the graphviz tool cannot be found.
"""
if self.objects == []:
return False
data = self._get_graphviz_data()
options = ('-Nfontsize=10',
'-Efontsize=10',
'-Nstyle=filled',
'-Nfillcolor=#E5EDB8',
'-Ncolor=#CCCCCC')
cmdline = (cmd, '-T%s' % format, '-o', filename) + options
if unflatten:
p1 = Popen(('unflatten', '-l7'), stdin=PIPE, stdout=PIPE,
**popen_flags)
p2 = Popen(cmdline, stdin=p1.stdout, **popen_flags)
p1.communicate(encode4pipe(data))
p2.communicate()
return p2.returncode == 0
else:
p = Popen(cmdline, stdin=PIPE, **popen_flags)
p.communicate(encode4pipe(data))
return p.returncode == 0
|
[
"def",
"render",
"(",
"self",
",",
"filename",
",",
"cmd",
"=",
"'dot'",
",",
"format",
"=",
"'ps'",
",",
"unflatten",
"=",
"False",
")",
":",
"if",
"self",
".",
"objects",
"==",
"[",
"]",
":",
"return",
"False",
"data",
"=",
"self",
".",
"_get_graphviz_data",
"(",
")",
"options",
"=",
"(",
"'-Nfontsize=10'",
",",
"'-Efontsize=10'",
",",
"'-Nstyle=filled'",
",",
"'-Nfillcolor=#E5EDB8'",
",",
"'-Ncolor=#CCCCCC'",
")",
"cmdline",
"=",
"(",
"cmd",
",",
"'-T%s'",
"%",
"format",
",",
"'-o'",
",",
"filename",
")",
"+",
"options",
"if",
"unflatten",
":",
"p1",
"=",
"Popen",
"(",
"(",
"'unflatten'",
",",
"'-l7'",
")",
",",
"stdin",
"=",
"PIPE",
",",
"stdout",
"=",
"PIPE",
",",
"*",
"*",
"popen_flags",
")",
"p2",
"=",
"Popen",
"(",
"cmdline",
",",
"stdin",
"=",
"p1",
".",
"stdout",
",",
"*",
"*",
"popen_flags",
")",
"p1",
".",
"communicate",
"(",
"encode4pipe",
"(",
"data",
")",
")",
"p2",
".",
"communicate",
"(",
")",
"return",
"p2",
".",
"returncode",
"==",
"0",
"else",
":",
"p",
"=",
"Popen",
"(",
"cmdline",
",",
"stdin",
"=",
"PIPE",
",",
"*",
"*",
"popen_flags",
")",
"p",
".",
"communicate",
"(",
"encode4pipe",
"(",
"data",
")",
")",
"return",
"p",
".",
"returncode",
"==",
"0"
] |
Render the graph to `filename` using graphviz. The graphviz invocation
command may be overriden by specifying `cmd`. The `format` may be any
specifier recognized by the graph renderer ('-Txxx' command). The graph
can be preprocessed by the *unflatten* tool if the `unflatten` parameter
is True. If there are no objects to illustrate, the method does not
invoke graphviz and returns False. If the renderer returns successfully
(return code 0), True is returned.
An `OSError` is raised if the graphviz tool cannot be found.
|
[
"Render",
"the",
"graph",
"to",
"filename",
"using",
"graphviz",
".",
"The",
"graphviz",
"invocation",
"command",
"may",
"be",
"overriden",
"by",
"specifying",
"cmd",
".",
"The",
"format",
"may",
"be",
"any",
"specifier",
"recognized",
"by",
"the",
"graph",
"renderer",
"(",
"-",
"Txxx",
"command",
")",
".",
"The",
"graph",
"can",
"be",
"preprocessed",
"by",
"the",
"*",
"unflatten",
"*",
"tool",
"if",
"the",
"unflatten",
"parameter",
"is",
"True",
".",
"If",
"there",
"are",
"no",
"objects",
"to",
"illustrate",
"the",
"method",
"does",
"not",
"invoke",
"graphviz",
"and",
"returns",
"False",
".",
"If",
"the",
"renderer",
"returns",
"successfully",
"(",
"return",
"code",
"0",
")",
"True",
"is",
"returned",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf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JFQ8o,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(0b1010 + 0o50) + chr(282 - 232) + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b0 + 0o157) + '\062' + '\x30' + '\064', ord("\x08")), nzTpIcepk0o8(chr(1904 - 1856) + chr(0b1101111) + chr(0b100 + 0o57) + chr(0b1001 + 0o53) + '\064', 11746 - 11738), nzTpIcepk0o8(chr(1437 - 1389) + '\157' + '\x31' + '\060' + chr(0b100 + 0o60), 0o10), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\x6f' + '\x33' + '\064' + chr(52), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b11111 + 0o23) + chr(0b0 + 0o67) + '\064', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + '\064' + chr(50), 61369 - 61361), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + chr(50) + chr(0b110001), 18045 - 18037), nzTpIcepk0o8(chr(0b110000) + chr(0b1000011 + 0o54) + chr(50) + chr(3010 - 2955) + chr(54), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + '\066' + chr(944 - 893), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(52) + '\063', 37195 - 37187), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10110 + 0o34) + chr(0b1001 + 0o47) + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(1194 - 1083) + chr(0b110110) + chr(0b110110), 9653 - 9645), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101011 + 0o10) + chr(0b11110 + 0o25) + chr(0b101111 + 0o5), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x37' + chr(0b110101), 57728 - 57720), nzTpIcepk0o8('\060' + chr(6041 - 5930) + chr(50) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(0b1000 + 0o55) + chr(50), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2183 - 2134) + chr(0b101010 + 0o6) + chr(0b110110), 7021 - 7013), nzTpIcepk0o8('\060' + chr(2551 - 2440) + chr(0b1001 + 0o50) + '\x32' + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\x6f' + chr(0b110011) + chr(48), 0o10), nzTpIcepk0o8('\x30' + chr(6132 - 6021) + chr(1341 - 1292) + chr(0b110010) + chr(746 - 696), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + chr(0b1110 + 0o44) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(5523 - 5412) + '\x32' + chr(0b110101) + '\x35', 0b1000), nzTpIcepk0o8(chr(1628 - 1580) + chr(10723 - 10612) + '\x33' + '\x33' + '\065', 0o10), nzTpIcepk0o8('\x30' + chr(1395 - 1284) + chr(50) + chr(1013 - 958) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110111) + chr(1917 - 1865), 5736 - 5728), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + '\x33' + chr(0b110101), 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10001 + 0o40) + chr(0b110111) + '\x32', 19543 - 19535), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b10011 + 0o134) + '\064' + '\x37', 42892 - 42884), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b110001) + chr(49), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + '\064' + chr(0b0 + 0o66), 36981 - 36973), nzTpIcepk0o8(chr(1495 - 1447) + chr(0b1000001 + 0o56) + chr(54) + chr(51), 63775 - 63767), nzTpIcepk0o8('\060' + chr(0b11011 + 0o124) + chr(583 - 534) + chr(0b11110 + 0o30) + chr(53), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110101) + chr(341 - 291), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + chr(0b110111) + '\067', 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(11413 - 11302) + chr(0b110001) + '\063' + chr(49), 54621 - 54613), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + '\x35' + chr(622 - 572), 8), nzTpIcepk0o8(chr(926 - 878) + chr(0b1101011 + 0o4) + chr(0b110010) + chr(0b101100 + 0o4) + chr(0b11100 + 0o24), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + '\x35' + '\061', 0o10), nzTpIcepk0o8(chr(48) + chr(3925 - 3814) + '\061' + chr(52) + '\x34', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1225 - 1177) + chr(111) + '\065' + '\060', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xbc'), chr(0b1100100) + '\x65' + chr(9723 - 9624) + chr(0b1101111) + chr(0b11011 + 0o111) + chr(0b1000100 + 0o41))('\x75' + chr(0b10100 + 0o140) + chr(0b1100110) + chr(45) + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def yWJZvHcCoSKp(hXMPsSrOQzbh, FxZHtXEolYsL, mD44XHfr1PSC=roI3spqORKae(ES5oEprVxulp(b'\xf6\xeb\x90'), '\144' + chr(101) + chr(8777 - 8678) + chr(111) + chr(9066 - 8966) + '\x65')('\165' + chr(9926 - 9810) + chr(0b11000 + 0o116) + '\x2d' + chr(3024 - 2968)), q33KG3foQ_CJ=roI3spqORKae(ES5oEprVxulp(b'\xe2\xf7'), chr(3007 - 2907) + chr(0b1100101) + '\x63' + chr(0b1100100 + 0o13) + chr(2118 - 2018) + '\145')(chr(12682 - 12565) + chr(116) + chr(0b1100110) + chr(45) + chr(56)), RTLfcpnkb3mi=nzTpIcepk0o8(chr(48) + '\157' + chr(86 - 38), 55560 - 55552)):
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe7\xea\xa23\xd0\xfe\xd7!\xdfG{\xcf'), chr(0b1100100) + chr(3551 - 3450) + chr(9336 - 9237) + chr(0b1101111) + chr(9560 - 9460) + '\145')(chr(0b1011001 + 0o34) + chr(12000 - 11884) + chr(102) + chr(45) + chr(0b111000))) == []:
return nzTpIcepk0o8('\x30' + chr(111) + '\060', 8)
FfKOThdpoDTb = hXMPsSrOQzbh._get_graphviz_data()
gpUDAok9rMxr = (roI3spqORKae(ES5oEprVxulp(b'\xbf\xca\x82+\x8a\xc8\x918\xc4\x16\x1e\xb0\x06'), chr(0b10100 + 0o120) + '\x65' + chr(99) + chr(0b1011011 + 0o24) + chr(100) + chr(101))(chr(117) + chr(116) + '\146' + chr(45) + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xbf\xc1\x82+\x8a\xc8\x918\xc4\x16\x1e\xb0\x06'), chr(6753 - 6653) + chr(4956 - 4855) + chr(0b110001 + 0o62) + chr(0b1101011 + 0o4) + chr(100) + chr(0b1001000 + 0o35))('\165' + chr(5183 - 5067) + chr(0b1100110) + '\x2d' + chr(1484 - 1428)), roI3spqORKae(ES5oEprVxulp(b'\xbf\xca\x970\x9d\xd0\x87l\xd8\x1aO\xedS\xb8'), chr(159 - 59) + chr(0b1100101) + chr(6738 - 6639) + chr(10176 - 10065) + '\144' + chr(101))(chr(0b1001111 + 0o46) + '\x74' + chr(0b1100110) + chr(0b100001 + 0o14) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xbf\xca\x82-\x88\xd0\x81>\xd2\x1cQ\xbc\x15\x99\x08Q\xae\x04j'), chr(100) + chr(4777 - 4676) + chr(0b1100011) + chr(8838 - 8727) + chr(0b1100100) + chr(101))(chr(117) + chr(116) + chr(0b1001010 + 0o34) + chr(45) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\xbf\xca\x87+\x88\xd3\x90l\x9d0`\xc2u\x9f~'), chr(3514 - 3414) + chr(101) + '\x63' + chr(0b1111 + 0o140) + '\144' + chr(0b1100101))('\165' + chr(3196 - 3080) + chr(0b1101 + 0o131) + '\055' + chr(176 - 120)))
TLNDkzY6HmRl = (mD44XHfr1PSC, roI3spqORKae(ES5oEprVxulp(b'\xbf\xd0\xc17'), chr(0b1001100 + 0o30) + chr(1399 - 1298) + chr(0b10011 + 0o120) + chr(111) + chr(0b110111 + 0o55) + '\x65')(chr(730 - 613) + '\164' + chr(0b10101 + 0o121) + chr(652 - 607) + '\070') % q33KG3foQ_CJ, roI3spqORKae(ES5oEprVxulp(b'\xbf\xeb'), chr(100) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(0b1000 + 0o134) + chr(101))(chr(7813 - 7696) + '\164' + chr(102) + '\x2d' + chr(0b110000 + 0o10)), FxZHtXEolYsL) + gpUDAok9rMxr
if RTLfcpnkb3mi:
uTffoKvaS1oJ = Lp1bJm77Kt5i((roI3spqORKae(ES5oEprVxulp(b'\xe7\xea\x82(\x85\xc8\x964\xd0'), '\x64' + chr(101) + chr(99) + chr(0b1101111) + '\x64' + chr(0b110 + 0o137))(chr(7207 - 7090) + chr(0b1110100) + '\146' + '\x2d' + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xbf\xe8\xd3'), chr(0b1001101 + 0o27) + '\145' + chr(0b1100011) + chr(0b1000000 + 0o57) + chr(0b1100100) + '\x65')('\165' + '\164' + '\146' + chr(685 - 640) + '\x38')), stdin=fBz5PzJLazsE, stdout=fBz5PzJLazsE, **YC7aYKgh0grM)
KSkQTDFiUtnb = Lp1bJm77Kt5i(TLNDkzY6HmRl, stdin=uTffoKvaS1oJ.E4teKT3YJIcH, **YC7aYKgh0grM)
roI3spqORKae(uTffoKvaS1oJ, roI3spqORKae(ES5oEprVxulp(b'\xf6\xeb\xd2.\xd5\xef\xb3<\xd5%Q\xd8'), chr(9472 - 9372) + '\x65' + '\x63' + chr(5225 - 5114) + chr(0b1100100) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(0b111111 + 0o47) + '\x2d' + chr(2923 - 2867)))(a0P4wZXg9FAO(FfKOThdpoDTb))
roI3spqORKae(KSkQTDFiUtnb, roI3spqORKae(ES5oEprVxulp(b'\xf6\xeb\xd2.\xd5\xef\xb3<\xd5%Q\xd8'), '\144' + chr(0b110101 + 0o60) + '\143' + chr(0b1101111) + chr(100) + '\145')(chr(0b11101 + 0o130) + '\x74' + chr(0b1100110) + chr(0b101101) + '\070'))()
return roI3spqORKae(KSkQTDFiUtnb, roI3spqORKae(ES5oEprVxulp(b'\xe0\xe1\x901\x96\xd2\x81>\xda\x16'), chr(100) + '\x65' + '\x63' + chr(0b1101111) + '\x64' + '\x65')(chr(117) + chr(0b1110100) + chr(0b1100110) + '\055' + '\x38')) == nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b100011 + 0o15), 8)
else:
fSdw5wwLo9MO = Lp1bJm77Kt5i(TLNDkzY6HmRl, stdin=fBz5PzJLazsE, **YC7aYKgh0grM)
roI3spqORKae(fSdw5wwLo9MO, roI3spqORKae(ES5oEprVxulp(b'\xf6\xeb\xd2.\xd5\xef\xb3<\xd5%Q\xd8'), chr(4577 - 4477) + chr(101) + chr(99) + chr(1463 - 1352) + chr(0b100 + 0o140) + '\145')(chr(0b11011 + 0o132) + '\164' + chr(0b1010010 + 0o24) + chr(0b101101) + chr(0b111000)))(a0P4wZXg9FAO(FfKOThdpoDTb))
return roI3spqORKae(fSdw5wwLo9MO, roI3spqORKae(ES5oEprVxulp(b'\xe0\xe1\x901\x96\xd2\x81>\xda\x16'), '\144' + '\145' + chr(8247 - 8148) + '\157' + chr(100) + chr(101))(chr(117) + chr(5961 - 5845) + chr(0b1100110) + chr(0b101101) + chr(0b111000))) == nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x30', 8)
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/pympler/refgraph.py
|
ReferenceGraph.write_graph
|
def write_graph(self, filename):
"""
Write raw graph data which can be post-processed using graphviz.
"""
f = open(filename, 'w')
f.write(self._get_graphviz_data())
f.close()
|
python
|
def write_graph(self, filename):
"""
Write raw graph data which can be post-processed using graphviz.
"""
f = open(filename, 'w')
f.write(self._get_graphviz_data())
f.close()
|
[
"def",
"write_graph",
"(",
"self",
",",
"filename",
")",
":",
"f",
"=",
"open",
"(",
"filename",
",",
"'w'",
")",
"f",
".",
"write",
"(",
"self",
".",
"_get_graphviz_data",
"(",
")",
")",
"f",
".",
"close",
"(",
")"
] |
Write raw graph data which can be post-processed using graphviz.
|
[
"Write",
"raw",
"graph",
"data",
"which",
"can",
"be",
"post",
"-",
"processed",
"using",
"graphviz",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pympler/refgraph.py#L355-L361
|
train
|
Write raw graph data to 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,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(chr(0b110000) + chr(0b1011101 + 0o22) + chr(52) + chr(1420 - 1369), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1011000 + 0o27) + '\x32' + chr(0b110 + 0o53) + '\x35', 35431 - 35423), nzTpIcepk0o8(chr(0b110000) + chr(8103 - 7992) + chr(0b101011 + 0o10) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110101) + chr(469 - 420), 51348 - 51340), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(1180 - 1130), 0b1000), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(111) + chr(0b1001 + 0o56) + chr(48), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(0b1001 + 0o50) + chr(51), 32739 - 32731), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(0b110010), 8), nzTpIcepk0o8(chr(161 - 113) + chr(0b1101111) + '\x32' + '\x37' + chr(973 - 925), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(7688 - 7577) + '\x33' + chr(0b110001 + 0o3) + chr(1085 - 1030), ord("\x08")), nzTpIcepk0o8(chr(311 - 263) + chr(0b111000 + 0o67) + chr(50) + chr(2445 - 2393) + '\062', 0o10), nzTpIcepk0o8(chr(1901 - 1853) + chr(111) + chr(0b110011) + '\067' + '\062', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + chr(0b110011) + chr(716 - 666), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100111 + 0o10) + '\065' + '\x30', 39139 - 39131), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1658 - 1603) + chr(0b10101 + 0o34), 0o10), nzTpIcepk0o8(chr(1390 - 1342) + chr(3915 - 3804) + chr(0b11 + 0o56) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1010111 + 0o30) + '\062' + chr(51) + chr(48), 53384 - 53376), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + chr(53) + chr(2338 - 2288), 19610 - 19602), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + chr(55), 20562 - 20554), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(4805 - 4694) + chr(1153 - 1102) + chr(1779 - 1728) + chr(54), 29173 - 29165), nzTpIcepk0o8(chr(0b101 + 0o53) + '\x6f' + '\062' + '\063' + chr(55), 0b1000), nzTpIcepk0o8(chr(2150 - 2102) + chr(0b1101111) + '\x33' + '\065' + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b100001 + 0o20) + chr(0b10101 + 0o42) + chr(51), 4149 - 4141), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + '\x33' + chr(2092 - 2038), 26770 - 26762), nzTpIcepk0o8(chr(669 - 621) + chr(1939 - 1828) + chr(1984 - 1935) + '\066' + '\x35', 11918 - 11910), nzTpIcepk0o8(chr(48) + chr(11945 - 11834) + '\x36', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110101) + chr(903 - 852), 29067 - 29059), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(8357 - 8246) + '\x31' + chr(0b110000) + chr(51), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\061' + '\065' + chr(0b11010 + 0o27), 0o10), nzTpIcepk0o8(chr(75 - 27) + '\157' + '\062' + chr(2413 - 2358) + chr(1905 - 1850), 58017 - 58009), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + chr(808 - 756) + chr(0b10110 + 0o40), 37733 - 37725), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b1101010 + 0o5) + '\x31' + '\065' + '\x36', 27285 - 27277), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(111) + '\061' + chr(0b110101) + chr(55), 0b1000), nzTpIcepk0o8(chr(1400 - 1352) + chr(2850 - 2739) + chr(0b110111) + chr(0b11101 + 0o32), 0o10), nzTpIcepk0o8('\060' + chr(0b1000 + 0o147) + '\062' + '\064' + '\x33', 0o10), nzTpIcepk0o8(chr(2255 - 2207) + '\157' + '\061' + chr(2089 - 2041) + chr(0b110011), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(52) + '\x35', 19556 - 19548), nzTpIcepk0o8(chr(1660 - 1612) + chr(0b1101111) + '\062' + chr(53) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1101111) + '\x31' + '\x30' + '\x37', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b111 + 0o52) + chr(52) + chr(0b110011), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(285 - 237) + '\x6f' + chr(0b100000 + 0o25) + chr(2264 - 2216), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\r'), chr(100) + chr(0b1100101) + '\143' + chr(0b1101111) + chr(1707 - 1607) + chr(0b111100 + 0o51))('\165' + '\x74' + '\x66' + '\x2d' + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def ZmnQQ8qVTWs0(hXMPsSrOQzbh, FxZHtXEolYsL):
_R8IKF5IwAfX = DnU3Rq9N5ala(FxZHtXEolYsL, roI3spqORKae(ES5oEprVxulp(b'T'), chr(9327 - 9227) + chr(101) + chr(0b1001001 + 0o32) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(11408 - 11291) + chr(2906 - 2790) + chr(102) + '\055' + '\x38'))
roI3spqORKae(_R8IKF5IwAfX, roI3spqORKae(ES5oEprVxulp(b'N\xe1(AbH\xbd;\xf4\x97\xd3\xc8'), '\x64' + chr(101) + chr(0b1100011) + chr(0b10010 + 0o135) + chr(3138 - 3038) + chr(0b111100 + 0o51))(chr(0b1010100 + 0o41) + chr(0b1111 + 0o145) + chr(9990 - 9888) + chr(45) + '\x38'))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'|\xea}]U_\xb9k\xc8\x8f\xd4\x93 w]i\xec\x8b'), chr(0b1010110 + 0o16) + '\x65' + chr(99) + chr(2164 - 2053) + chr(0b10 + 0o142) + '\x65')(chr(0b1110101) + chr(116) + chr(379 - 277) + '\055' + chr(2541 - 2485)))())
roI3spqORKae(_R8IKF5IwAfX, roI3spqORKae(ES5oEprVxulp(b'y\xe8i\x1eI[\xad3\xed\x83\x9a\x90'), chr(0b1100100) + chr(0b1101 + 0o130) + chr(9400 - 9301) + chr(2795 - 2684) + chr(0b1100100) + chr(0b1011110 + 0o7))(chr(1626 - 1509) + chr(116) + chr(6033 - 5931) + '\x2d' + '\070'))()
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/pyinstrument/profiler.py
|
Profiler.root_frame
|
def root_frame(self):
"""
Returns the parsed results in the form of a tree of Frame objects
"""
if not hasattr(self, '_root_frame'):
self._root_frame = Frame()
# define a recursive function that builds the hierarchy of frames given the
# stack of frame identifiers
def frame_for_stack(stack):
if len(stack) == 0:
return self._root_frame
parent = frame_for_stack(stack[:-1])
frame_name = stack[-1]
if not frame_name in parent.children_dict:
parent.add_child(Frame(frame_name, parent))
return parent.children_dict[frame_name]
for stack, self_time in self.stack_self_time.items():
frame_for_stack(stack).self_time = self_time
return self._root_frame
|
python
|
def root_frame(self):
"""
Returns the parsed results in the form of a tree of Frame objects
"""
if not hasattr(self, '_root_frame'):
self._root_frame = Frame()
# define a recursive function that builds the hierarchy of frames given the
# stack of frame identifiers
def frame_for_stack(stack):
if len(stack) == 0:
return self._root_frame
parent = frame_for_stack(stack[:-1])
frame_name = stack[-1]
if not frame_name in parent.children_dict:
parent.add_child(Frame(frame_name, parent))
return parent.children_dict[frame_name]
for stack, self_time in self.stack_self_time.items():
frame_for_stack(stack).self_time = self_time
return self._root_frame
|
[
"def",
"root_frame",
"(",
"self",
")",
":",
"if",
"not",
"hasattr",
"(",
"self",
",",
"'_root_frame'",
")",
":",
"self",
".",
"_root_frame",
"=",
"Frame",
"(",
")",
"# define a recursive function that builds the hierarchy of frames given the",
"# stack of frame identifiers",
"def",
"frame_for_stack",
"(",
"stack",
")",
":",
"if",
"len",
"(",
"stack",
")",
"==",
"0",
":",
"return",
"self",
".",
"_root_frame",
"parent",
"=",
"frame_for_stack",
"(",
"stack",
"[",
":",
"-",
"1",
"]",
")",
"frame_name",
"=",
"stack",
"[",
"-",
"1",
"]",
"if",
"not",
"frame_name",
"in",
"parent",
".",
"children_dict",
":",
"parent",
".",
"add_child",
"(",
"Frame",
"(",
"frame_name",
",",
"parent",
")",
")",
"return",
"parent",
".",
"children_dict",
"[",
"frame_name",
"]",
"for",
"stack",
",",
"self_time",
"in",
"self",
".",
"stack_self_time",
".",
"items",
"(",
")",
":",
"frame_for_stack",
"(",
"stack",
")",
".",
"self_time",
"=",
"self_time",
"return",
"self",
".",
"_root_frame"
] |
Returns the parsed results in the form of a tree of Frame objects
|
[
"Returns",
"the",
"parsed",
"results",
"in",
"the",
"form",
"of",
"a",
"tree",
"of",
"Frame",
"objects"
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/pyinstrument/profiler.py#L109-L133
|
train
|
Returns the parsed result in the form of a tree of Frame objects where the first element is the name of the frame and the second is the time of the frame.
|
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,z18h6aCn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JL5aRaY,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(804 - 754) + chr(0b110011) + chr(54), 22148 - 22140), nzTpIcepk0o8(chr(813 - 765) + chr(0b110001 + 0o76) + chr(0b10000 + 0o42) + chr(0b110001) + '\064', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + '\x30' + chr(0b11 + 0o61), ord("\x08")), nzTpIcepk0o8(chr(2148 - 2100) + chr(111) + '\x31' + chr(55) + '\x37', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + '\x30' + '\062', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(1302 - 1251) + '\x37' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + '\064' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(49) + chr(2069 - 2021) + '\x36', 47545 - 47537), nzTpIcepk0o8('\060' + '\157' + chr(50) + chr(50) + chr(1435 - 1387), ord("\x08")), nzTpIcepk0o8(chr(1728 - 1680) + '\157' + chr(50) + chr(54) + '\065', 0o10), nzTpIcepk0o8(chr(2107 - 2059) + '\x6f' + chr(2734 - 2681) + chr(48), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + '\067' + chr(52), 45766 - 45758), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(566 - 513) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b111110 + 0o61) + chr(0b10100 + 0o41) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110100) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(8318 - 8207) + chr(185 - 134) + chr(0b100010 + 0o17) + chr(48), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001 + 0o1) + '\060' + '\x34', 8), nzTpIcepk0o8('\060' + chr(111) + chr(50) + '\x34' + chr(54), 58807 - 58799), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(854 - 805) + '\060', 8), nzTpIcepk0o8(chr(440 - 392) + chr(0b1101111) + chr(55) + chr(0b1011 + 0o53), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + chr(2859 - 2804) + chr(0b110000), 12511 - 12503), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + '\x34', 10544 - 10536), nzTpIcepk0o8('\060' + chr(0b1000100 + 0o53) + chr(0b1011 + 0o47) + chr(54) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\x6f' + chr(50) + '\061', 10261 - 10253), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + chr(0b110000 + 0o4) + '\x36', 8), nzTpIcepk0o8(chr(1569 - 1521) + chr(8988 - 8877) + chr(49) + chr(1372 - 1320) + chr(0b11111 + 0o21), 8), nzTpIcepk0o8('\060' + chr(7979 - 7868) + chr(49) + '\x32' + chr(2135 - 2085), 34765 - 34757), nzTpIcepk0o8(chr(0b110000) + chr(0b1010010 + 0o35) + chr(0b110011) + chr(1234 - 1183) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(718 - 670) + chr(111) + chr(1853 - 1798) + chr(2425 - 2373), ord("\x08")), nzTpIcepk0o8(chr(1230 - 1182) + chr(0b1101111) + '\067' + chr(0b101101 + 0o4), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\066' + '\064', 0o10), nzTpIcepk0o8(chr(48) + chr(6012 - 5901) + chr(2598 - 2546) + chr(50), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(0b110010) + chr(2499 - 2449), 0b1000), nzTpIcepk0o8('\060' + chr(12111 - 12000) + chr(0b110011) + '\x32', 57794 - 57786), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1688 - 1636) + '\x34', 54388 - 54380), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(51) + chr(1704 - 1655), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b11110 + 0o121) + '\064' + chr(48), 0b1000), nzTpIcepk0o8('\060' + chr(12276 - 12165) + chr(2358 - 2307) + chr(0b11110 + 0o23) + '\063', 5115 - 5107), nzTpIcepk0o8('\060' + chr(3094 - 2983) + '\x36' + '\060', 40028 - 40020), nzTpIcepk0o8(chr(48) + chr(1793 - 1682) + chr(0b110010) + chr(55) + chr(48), 43181 - 43173)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\157' + chr(0b110101) + '\060', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xb0'), chr(6313 - 6213) + '\x65' + chr(0b1010010 + 0o21) + chr(0b1011 + 0o144) + chr(0b1100100) + '\145')(chr(0b111 + 0o156) + '\x74' + '\x66' + chr(0b101101) + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def u4DBunE1skls(hXMPsSrOQzbh):
if not dRKdVnHPFq7C(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xc1\xfe\xeb\x10\xb6\xa6\x064\xf1\xd8M'), '\144' + chr(2825 - 2724) + chr(0b1010111 + 0o14) + chr(111) + '\x64' + chr(101))('\x75' + '\164' + chr(4352 - 4250) + '\x2d' + chr(2700 - 2644))):
hXMPsSrOQzbh.QYKM_t1vMDr4 = G_NRReoxs5CF()
def JkMNMp_gnuWG(GmJYyzXaQAzC):
if ftfygxgFas5X(GmJYyzXaQAzC) == nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\060', 0o10):
return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xcf\xd5\xcf2\x9d\x8dQ0\xdd\xf1ZH'), chr(0b100101 + 0o77) + chr(0b1000101 + 0o40) + '\143' + chr(12100 - 11989) + chr(0b1010001 + 0o23) + chr(101))('\165' + '\x74' + '\x66' + chr(114 - 69) + '\070'))
aY0lxtg5akD2 = JkMNMp_gnuWG(GmJYyzXaQAzC[:-nzTpIcepk0o8(chr(48) + '\157' + chr(49), 47990 - 47982)])
X0oYGZxwPlm2 = GmJYyzXaQAzC[-nzTpIcepk0o8('\060' + chr(111) + chr(0b101011 + 0o6), 8)]
if X0oYGZxwPlm2 not in roI3spqORKae(aY0lxtg5akD2, roI3spqORKae(ES5oEprVxulp(b'\xfd\xe4\xed\x13\xa6\x8b\x05(\xcf\xd1A\x1f\x98'), '\144' + '\x65' + chr(99) + '\157' + chr(0b1100100) + chr(4969 - 4868))(chr(0b101110 + 0o107) + chr(0b1010 + 0o152) + chr(0b1100110) + chr(1877 - 1832) + chr(1005 - 949))):
roI3spqORKae(aY0lxtg5akD2, roI3spqORKae(ES5oEprVxulp(b'\xff\xe8\xe0 \xa1\x91\t*\xf4'), chr(0b1 + 0o143) + chr(1982 - 1881) + '\x63' + chr(0b1100110 + 0o11) + '\x64' + chr(0b1000 + 0o135))('\165' + '\164' + '\146' + chr(45) + '\070'))(G_NRReoxs5CF(X0oYGZxwPlm2, aY0lxtg5akD2))
return roI3spqORKae(aY0lxtg5akD2, roI3spqORKae(ES5oEprVxulp(b'\xfd\xe4\xed\x13\xa6\x8b\x05(\xcf\xd1A\x1f\x98'), '\x64' + chr(101) + chr(0b1100011) + '\x6f' + chr(0b110111 + 0o55) + chr(6446 - 6345))(chr(117) + '\164' + chr(102) + chr(0b101101) + '\x38'))[X0oYGZxwPlm2]
for (GmJYyzXaQAzC, X8qHeklR_2Ut) in roI3spqORKae(hXMPsSrOQzbh.stack_self_time, roI3spqORKae(ES5oEprVxulp(b'\xc7\xd3\xea1\x87\x83(r\xa3\xc3p\x15'), chr(0b1100100) + chr(0b1100101) + chr(0b101111 + 0o64) + '\x6f' + chr(100) + chr(0b100110 + 0o77))('\x75' + '\164' + chr(102) + chr(0b101001 + 0o4) + chr(0b100101 + 0o23)))():
JkMNMp_gnuWG(GmJYyzXaQAzC).X8qHeklR_2Ut = X8qHeklR_2Ut
return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xcf\xd5\xcf2\x9d\x8dQ0\xdd\xf1ZH'), chr(0b1100100) + chr(0b0 + 0o145) + chr(8757 - 8658) + chr(0b1101111) + chr(100) + '\x65')(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(1780 - 1735) + chr(0b111000)))
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/pycallgraph.py
|
reset_trace
|
def reset_trace():
"""Resets all collected statistics. This is run automatically by
start_trace(reset=True) and when the module is loaded.
"""
global call_dict
global call_stack
global func_count
global func_count_max
global func_time
global func_time_max
global call_stack_timer
call_dict = {}
# current call stack
call_stack = ['__main__']
# counters for each function
func_count = {}
func_count_max = 0
# accumative time per function
func_time = {}
func_time_max = 0
# keeps track of the start time of each call on the stack
call_stack_timer = []
|
python
|
def reset_trace():
"""Resets all collected statistics. This is run automatically by
start_trace(reset=True) and when the module is loaded.
"""
global call_dict
global call_stack
global func_count
global func_count_max
global func_time
global func_time_max
global call_stack_timer
call_dict = {}
# current call stack
call_stack = ['__main__']
# counters for each function
func_count = {}
func_count_max = 0
# accumative time per function
func_time = {}
func_time_max = 0
# keeps track of the start time of each call on the stack
call_stack_timer = []
|
[
"def",
"reset_trace",
"(",
")",
":",
"global",
"call_dict",
"global",
"call_stack",
"global",
"func_count",
"global",
"func_count_max",
"global",
"func_time",
"global",
"func_time_max",
"global",
"call_stack_timer",
"call_dict",
"=",
"{",
"}",
"# current call stack",
"call_stack",
"=",
"[",
"'__main__'",
"]",
"# counters for each function",
"func_count",
"=",
"{",
"}",
"func_count_max",
"=",
"0",
"# accumative time per function",
"func_time",
"=",
"{",
"}",
"func_time_max",
"=",
"0",
"# keeps track of the start time of each call on the stack",
"call_stack_timer",
"=",
"[",
"]"
] |
Resets all collected statistics. This is run automatically by
start_trace(reset=True) and when the module is loaded.
|
[
"Resets",
"all",
"collected",
"statistics",
".",
"This",
"is",
"run",
"automatically",
"by",
"start_trace",
"(",
"reset",
"=",
"True",
")",
"and",
"when",
"the",
"module",
"is",
"loaded",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pycallgraph.py#L92-L118
|
train
|
Resets all collected statistics. This is run automatically by the module load_module and reset_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,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,C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xIe5pzk7,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(0b11010 + 0o26) + '\157' + '\063' + '\x35', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(50) + chr(0b100000 + 0o26), ord("\x08")), nzTpIcepk0o8(chr(1447 - 1399) + '\157' + chr(491 - 442) + chr(2264 - 2209) + chr(1684 - 1632), 57409 - 57401), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\x6f' + chr(0b110010) + chr(0b100001 + 0o26) + '\066', 0b1000), nzTpIcepk0o8(chr(351 - 303) + chr(111) + chr(51) + chr(53) + chr(0b101010 + 0o6), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(496 - 447) + chr(54) + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\x30' + chr(7427 - 7316) + '\x33' + chr(54) + chr(1495 - 1443), 43318 - 43310), nzTpIcepk0o8(chr(0b110000) + chr(0b1010101 + 0o32) + chr(744 - 694) + chr(439 - 384), 8212 - 8204), nzTpIcepk0o8(chr(0b1101 + 0o43) + '\157' + '\062' + '\066' + chr(50), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1 + 0o60) + '\x32' + '\064', 51296 - 51288), nzTpIcepk0o8('\x30' + chr(8208 - 8097) + chr(1266 - 1217) + chr(0b101100 + 0o6) + chr(53), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(0b110001) + chr(0b101101 + 0o7), 2494 - 2486), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b1101111) + chr(49) + '\062' + chr(0b100000 + 0o26), 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + chr(0b11100 + 0o32), 0b1000), nzTpIcepk0o8(chr(1844 - 1796) + '\157' + '\061' + chr(1538 - 1490) + chr(2260 - 2209), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(916 - 867), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b1111 + 0o43) + chr(49) + chr(49), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b1000 + 0o53) + '\x33' + '\x30', 0o10), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b11100 + 0o123) + chr(0b110010) + '\x33' + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\067' + chr(0b110110), 13253 - 13245), nzTpIcepk0o8('\060' + chr(1373 - 1262) + chr(0b1110 + 0o44) + chr(2475 - 2424), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + '\x32' + chr(0b100011 + 0o24), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(1143 - 1093) + chr(0b110110) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b1110 + 0o43) + '\x34' + '\x32', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(1731 - 1681) + chr(0b110111) + '\066', 8), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10001 + 0o40) + '\062' + chr(2467 - 2416), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\x37' + chr(49), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(833 - 782) + '\065' + chr(55), 10113 - 10105), nzTpIcepk0o8(chr(0b100 + 0o54) + '\x6f' + chr(350 - 296), 0b1000), nzTpIcepk0o8('\060' + chr(6894 - 6783) + chr(49) + chr(0b11000 + 0o30) + '\060', 28694 - 28686), nzTpIcepk0o8('\x30' + chr(2525 - 2414) + chr(0b110011) + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\063' + chr(52) + chr(0b111 + 0o60), 0o10), nzTpIcepk0o8('\060' + '\157' + '\x31' + '\x33' + chr(0b110001 + 0o4), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + chr(0b110111) + chr(51), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + '\064' + '\065', 0b1000), nzTpIcepk0o8(chr(1607 - 1559) + '\x6f' + chr(0b101101 + 0o5) + chr(0b110100) + '\061', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + '\065' + '\065', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(3226 - 3115) + chr(0b110011) + chr(2188 - 2133) + '\067', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1010111 + 0o30) + chr(49) + '\x30' + '\x33', 8), nzTpIcepk0o8(chr(1807 - 1759) + chr(0b11011 + 0o124) + '\066' + '\x35', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\157' + chr(53) + chr(0b101100 + 0o4), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'3'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(2616 - 2516) + chr(2679 - 2578))(chr(117) + '\164' + chr(5061 - 4959) + chr(0b101101) + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def mwsl1qDkBam6():
global nzTo5WhH84Ef
global CvKVXD7znovt
global U8ObleS5Ihkc
global GcsJfX9Uxcow
global QPAVYvppm5Qy
global zAyDITRmdC4y
global jkxpC_61FiGB
nzTo5WhH84Ef = {}
CvKVXD7znovt = [roI3spqORKae(ES5oEprVxulp(b'B\t\x11\xdf\x81\x1a\xabH'), chr(0b10100 + 0o120) + '\145' + '\143' + chr(111) + chr(0b1001 + 0o133) + chr(9450 - 9349))('\x75' + chr(7480 - 7364) + chr(9353 - 9251) + '\x2d' + '\070')]
U8ObleS5Ihkc = {}
GcsJfX9Uxcow = nzTpIcepk0o8('\060' + chr(111) + chr(1098 - 1050), ord("\x08"))
QPAVYvppm5Qy = {}
zAyDITRmdC4y = nzTpIcepk0o8(chr(1619 - 1571) + chr(0b1101111) + '\060', 8)
jkxpC_61FiGB = []
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/pycallgraph.py
|
is_module_stdlib
|
def is_module_stdlib(file_name):
"""Returns True if the file_name is in the lib directory."""
# TODO: Move these calls away from this function so it doesn't have to run
# every time.
lib_path = sysconfig.get_python_lib()
path = os.path.split(lib_path)
if path[1] == 'site-packages':
lib_path = path[0]
return file_name.lower().startswith(lib_path.lower())
|
python
|
def is_module_stdlib(file_name):
"""Returns True if the file_name is in the lib directory."""
# TODO: Move these calls away from this function so it doesn't have to run
# every time.
lib_path = sysconfig.get_python_lib()
path = os.path.split(lib_path)
if path[1] == 'site-packages':
lib_path = path[0]
return file_name.lower().startswith(lib_path.lower())
|
[
"def",
"is_module_stdlib",
"(",
"file_name",
")",
":",
"# TODO: Move these calls away from this function so it doesn't have to run",
"# every time.",
"lib_path",
"=",
"sysconfig",
".",
"get_python_lib",
"(",
")",
"path",
"=",
"os",
".",
"path",
".",
"split",
"(",
"lib_path",
")",
"if",
"path",
"[",
"1",
"]",
"==",
"'site-packages'",
":",
"lib_path",
"=",
"path",
"[",
"0",
"]",
"return",
"file_name",
".",
"lower",
"(",
")",
".",
"startswith",
"(",
"lib_path",
".",
"lower",
"(",
")",
")"
] |
Returns True if the file_name is in the lib directory.
|
[
"Returns",
"True",
"if",
"the",
"file_name",
"is",
"in",
"the",
"lib",
"directory",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pycallgraph.py#L169-L177
|
train
|
Returns True if the file_name is in the lib directory.
|
GiP5xwVCF98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UdwyfT9sfj2=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(0b100111 + 0o11) + '\x6f' + chr(50) + chr(252 - 200) + chr(55), 0b1000), nzTpIcepk0o8(chr(1241 - 1193) + chr(0b11100 + 0o123) + '\064' + '\x32', 11832 - 11824), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(2240 - 2191) + '\x33' + chr(2446 - 2391), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b10101 + 0o132) + chr(96 - 46) + chr(0b11000 + 0o31) + '\065', 22410 - 22402), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(2051 - 1996) + chr(691 - 636), 0o10), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b100000 + 0o117) + chr(0b110011) + chr(0b10001 + 0o44) + chr(48), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\064' + chr(54), 35129 - 35121), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(594 - 483) + chr(0b1010 + 0o47) + '\x35' + chr(0b110010), 36784 - 36776), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(0b101001 + 0o14) + '\062', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(442 - 391) + chr(52) + chr(0b110011), 15147 - 15139), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(55 - 6) + chr(0b11 + 0o61) + '\063', ord("\x08")), nzTpIcepk0o8(chr(284 - 236) + '\157' + '\x32' + chr(0b10110 + 0o37) + chr(830 - 778), 0o10), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(11559 - 11448) + '\062' + chr(2973 - 2918) + chr(0b110011), 14552 - 14544), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(9366 - 9255) + '\x31' + '\x37' + '\061', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110101) + chr(937 - 884), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101 + 0o54) + chr(0b10100 + 0o35), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + chr(49) + '\064', ord("\x08")), nzTpIcepk0o8(chr(1545 - 1497) + '\x6f' + chr(0b110011) + '\064' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + chr(0b110101 + 0o0) + '\060', 0o10), nzTpIcepk0o8(chr(1146 - 1098) + chr(5577 - 5466) + chr(386 - 336) + '\x31' + '\060', 0o10), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\x6f' + '\x35', 0o10), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(111) + chr(0b101110 + 0o3) + chr(1182 - 1128) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + chr(1259 - 1204) + '\061', 8), nzTpIcepk0o8(chr(0b0 + 0o60) + '\157' + chr(51) + chr(0b110111), 1553 - 1545), nzTpIcepk0o8(chr(700 - 652) + chr(111) + '\x31' + '\064' + chr(0b110010), 0o10), nzTpIcepk0o8('\060' + chr(5535 - 5424) + chr(0b11010 + 0o31) + chr(1819 - 1764) + '\063', 32141 - 32133), nzTpIcepk0o8(chr(48) + chr(883 - 772) + '\x33' + '\060' + '\x31', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\062' + '\x34' + chr(54), 0o10), nzTpIcepk0o8(chr(579 - 531) + '\x6f' + chr(0b100100 + 0o16) + chr(2785 - 2731) + chr(0b100000 + 0o22), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(49) + chr(48) + '\061', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + chr(1430 - 1376) + chr(52), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b100101 + 0o16) + chr(0b110000 + 0o5) + '\065', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(48) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(2269 - 2221) + chr(1843 - 1732) + chr(0b110001) + chr(48), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + '\x30' + chr(0b110110), 29890 - 29882), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1011100 + 0o23) + '\061' + chr(0b110011) + chr(785 - 733), ord("\x08")), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(111) + chr(54) + chr(0b110110), 21126 - 21118), nzTpIcepk0o8(chr(48) + chr(9845 - 9734) + chr(240 - 190) + '\067' + '\066', 39344 - 39336), nzTpIcepk0o8('\060' + chr(111) + '\063' + chr(54) + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1644 - 1594) + chr(0b101101 + 0o11) + '\x36', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b1101100 + 0o3) + chr(0b110100 + 0o1) + chr(0b101011 + 0o5), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x89'), '\144' + chr(0b1100101) + chr(3349 - 3250) + chr(0b1101111) + chr(100) + chr(0b1100101))(chr(0b100100 + 0o121) + chr(116) + chr(102) + '\055' + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def rZRcJw_oZ2Oq(Ob89R3fsHgUT):
K5ZqFdGu7ZaF = EySGYUgabdvY.get_python_lib()
_pSYqrosNb95 = aHUqKstZLeS6.path.LfRrQOxuDvnC(K5ZqFdGu7ZaF)
if _pSYqrosNb95[nzTpIcepk0o8('\x30' + '\157' + chr(49), 0o10)] == roI3spqORKae(ES5oEprVxulp(b'\xd4K+\xe8R\x98G\t\x81\x82\x04\xc9\xc8'), '\x64' + '\x65' + chr(99) + chr(0b10001 + 0o136) + '\144' + chr(0b1100101))(chr(0b111000 + 0o75) + chr(0b10001 + 0o143) + chr(2719 - 2617) + '\055' + chr(1220 - 1164)):
K5ZqFdGu7ZaF = _pSYqrosNb95[nzTpIcepk0o8('\x30' + '\157' + '\x30', ord("\x08"))]
return roI3spqORKae(Ob89R3fsHgUT.lower(), roI3spqORKae(ES5oEprVxulp(b'\xd4V>\xff\x0b\x9bQ\x03\x9e\x8b'), chr(100) + chr(0b11001 + 0o114) + chr(0b1010101 + 0o16) + '\x6f' + '\144' + '\x65')(chr(0b1001010 + 0o53) + chr(2436 - 2320) + chr(0b1000110 + 0o40) + '\055' + chr(520 - 464)))(roI3spqORKae(K5ZqFdGu7ZaF, roI3spqORKae(ES5oEprVxulp(b'\xffLg\xc81\xbfk0\x8e\xaa1\xd8'), chr(100) + chr(0b1100101) + '\143' + '\x6f' + chr(100) + chr(101))(chr(117) + chr(9647 - 9531) + chr(0b101100 + 0o72) + '\x2d' + '\x38'))())
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/pycallgraph.py
|
start_trace
|
def start_trace(reset=True, filter_func=None, time_filter_func=None):
"""Begins a trace. Setting reset to True will reset all previously recorded
trace data. filter_func needs to point to a callable function that accepts
the parameters (call_stack, module_name, class_name, func_name, full_name).
Every call will be passed into this function and it is up to the function
to decide if it should be included or not. Returning False means the call
will be filtered out and not included in the call graph.
"""
global trace_filter
global time_filter
if reset:
reset_trace()
if filter_func:
trace_filter = filter_func
else:
trace_filter = GlobbingFilter(exclude=['pycallgraph.*'])
if time_filter_func:
time_filter = time_filter_func
else:
time_filter = GlobbingFilter()
sys.settrace(tracer)
|
python
|
def start_trace(reset=True, filter_func=None, time_filter_func=None):
"""Begins a trace. Setting reset to True will reset all previously recorded
trace data. filter_func needs to point to a callable function that accepts
the parameters (call_stack, module_name, class_name, func_name, full_name).
Every call will be passed into this function and it is up to the function
to decide if it should be included or not. Returning False means the call
will be filtered out and not included in the call graph.
"""
global trace_filter
global time_filter
if reset:
reset_trace()
if filter_func:
trace_filter = filter_func
else:
trace_filter = GlobbingFilter(exclude=['pycallgraph.*'])
if time_filter_func:
time_filter = time_filter_func
else:
time_filter = GlobbingFilter()
sys.settrace(tracer)
|
[
"def",
"start_trace",
"(",
"reset",
"=",
"True",
",",
"filter_func",
"=",
"None",
",",
"time_filter_func",
"=",
"None",
")",
":",
"global",
"trace_filter",
"global",
"time_filter",
"if",
"reset",
":",
"reset_trace",
"(",
")",
"if",
"filter_func",
":",
"trace_filter",
"=",
"filter_func",
"else",
":",
"trace_filter",
"=",
"GlobbingFilter",
"(",
"exclude",
"=",
"[",
"'pycallgraph.*'",
"]",
")",
"if",
"time_filter_func",
":",
"time_filter",
"=",
"time_filter_func",
"else",
":",
"time_filter",
"=",
"GlobbingFilter",
"(",
")",
"sys",
".",
"settrace",
"(",
"tracer",
")"
] |
Begins a trace. Setting reset to True will reset all previously recorded
trace data. filter_func needs to point to a callable function that accepts
the parameters (call_stack, module_name, class_name, func_name, full_name).
Every call will be passed into this function and it is up to the function
to decide if it should be included or not. Returning False means the call
will be filtered out and not included in the call graph.
|
[
"Begins",
"a",
"trace",
".",
"Setting",
"reset",
"to",
"True",
"will",
"reset",
"all",
"previously",
"recorded",
"trace",
"data",
".",
"filter_func",
"needs",
"to",
"point",
"to",
"a",
"callable",
"function",
"that",
"accepts",
"the",
"parameters",
"(",
"call_stack",
"module_name",
"class_name",
"func_name",
"full_name",
")",
".",
"Every",
"call",
"will",
"be",
"passed",
"into",
"this",
"function",
"and",
"it",
"is",
"up",
"to",
"the",
"function",
"to",
"decide",
"if",
"it",
"should",
"be",
"included",
"or",
"not",
".",
"Returning",
"False",
"means",
"the",
"call",
"will",
"be",
"filtered",
"out",
"and",
"not",
"included",
"in",
"the",
"call",
"graph",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pycallgraph.py#L180-L203
|
train
|
Starts a trace for the current call graph.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5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,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(1742 - 1694) + chr(1381 - 1270) + '\x34' + '\x33', 16260 - 16252), nzTpIcepk0o8('\x30' + chr(111) + chr(0b10101 + 0o35) + chr(0b110100) + '\x35', 22113 - 22105), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + chr(0b11011 + 0o25) + '\x36', 0b1000), nzTpIcepk0o8(chr(2272 - 2224) + '\157' + chr(240 - 186) + '\060', 43461 - 43453), nzTpIcepk0o8(chr(0b110000) + chr(7232 - 7121) + '\065' + chr(50), 0b1000), nzTpIcepk0o8(chr(2222 - 2174) + chr(0b1101111) + chr(0b110011) + chr(1938 - 1888), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1000110 + 0o51) + '\x31' + chr(2145 - 2093) + chr(0b1 + 0o57), 5372 - 5364), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b1001101 + 0o42) + chr(2102 - 2051) + '\x32' + chr(1677 - 1629), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x32' + chr(53) + chr(2504 - 2452), 0b1000), nzTpIcepk0o8('\x30' + chr(9721 - 9610) + chr(49) + chr(2026 - 1978) + chr(0b11011 + 0o34), 0o10), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(111) + '\063' + chr(484 - 434) + chr(0b100000 + 0o21), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b10100 + 0o37) + '\063' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + chr(2596 - 2544), ord("\x08")), nzTpIcepk0o8(chr(133 - 85) + chr(111) + chr(0b110011) + '\067' + '\x34', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(1452 - 1401) + '\063' + chr(392 - 341), ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(111) + chr(0b110010) + chr(49) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + chr(2915 - 2804) + chr(0b110001) + chr(2062 - 2010) + '\065', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(237 - 126) + chr(0b110001) + '\062', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1010111 + 0o30) + '\062' + chr(0b11010 + 0o31) + chr(0b110100), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110101) + chr(0b1 + 0o60), 0b1000), nzTpIcepk0o8('\060' + chr(7611 - 7500) + chr(1110 - 1059) + '\061' + '\067', 0b1000), nzTpIcepk0o8('\060' + chr(0b100010 + 0o115) + '\x33' + chr(0b11010 + 0o27) + chr(2250 - 2198), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + chr(0b100001 + 0o24) + chr(0b101000 + 0o11), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10001 + 0o40) + chr(0b110100) + chr(0b100110 + 0o21), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + '\x32', 8), nzTpIcepk0o8(chr(224 - 176) + chr(5349 - 5238) + chr(51) + chr(53) + '\x32', 30440 - 30432), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\157' + chr(0b1100 + 0o46) + chr(52) + chr(52), 0o10), nzTpIcepk0o8(chr(48) + chr(0b11 + 0o154) + '\x31' + '\060' + chr(871 - 822), 39204 - 39196), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + chr(0b110001) + '\x36' + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + chr(0b110110) + '\060', 0b1000), nzTpIcepk0o8('\060' + chr(5349 - 5238) + '\x35' + '\065', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\066' + chr(275 - 225), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(6209 - 6098) + chr(0b11100 + 0o27) + chr(0b110110) + '\x36', 48601 - 48593), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + chr(0b10110 + 0o41) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\x6f' + chr(627 - 575) + chr(0b1101 + 0o45), 0b1000), nzTpIcepk0o8('\060' + chr(5492 - 5381) + chr(0b101011 + 0o10) + chr(53) + chr(0b100000 + 0o23), 0o10), nzTpIcepk0o8(chr(977 - 929) + chr(0b1101111) + chr(921 - 872) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(1097 - 1049) + chr(111) + chr(0b1101 + 0o44) + chr(0b110100 + 0o0) + '\x31', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\157' + chr(0b110101) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\r'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(0b1000111 + 0o50) + chr(0b1100100) + '\145')('\165' + chr(0b1110100) + chr(0b1011011 + 0o13) + '\055' + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def nNxFlEqQCqHK(XUxgYeEK_T9_=nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001), 21493 - 21485), H_OD8sF38qDl=None, cP17LQcjGk3K=None):
global UisSROWAnNJ7
global A5bahXGA1PA8
if XUxgYeEK_T9_:
mwsl1qDkBam6()
if H_OD8sF38qDl:
UisSROWAnNJ7 = H_OD8sF38qDl
else:
UisSROWAnNJ7 = WaUILP0LuHKl(exclude=[roI3spqORKae(ES5oEprVxulp(b'S\xdc\xe5QFv\x07\xa2\xcd7\xb9\xf06'), '\x64' + chr(101) + chr(438 - 339) + chr(0b1101111) + chr(6858 - 6758) + '\x65')('\165' + chr(0b1110100) + chr(0b1100110) + chr(0b10111 + 0o26) + chr(56))])
if cP17LQcjGk3K:
A5bahXGA1PA8 = cP17LQcjGk3K
else:
A5bahXGA1PA8 = WaUILP0LuHKl()
roI3spqORKae(bpyfpu4kTbwL, roI3spqORKae(ES5oEprVxulp(b'P\xc0\xf2DX{\x03\xb5'), '\144' + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(5738 - 5638) + '\145')(chr(117) + chr(0b10000 + 0o144) + '\x66' + '\x2d' + chr(0b111000)))(eJiDPLQ6u49O)
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/pycallgraph.py
|
tracer
|
def tracer(frame, event, arg):
"""This is an internal function that is called every time a call is made
during a trace. It keeps track of relationships between calls.
"""
global func_count_max
global func_count
global trace_filter
global time_filter
global call_stack
global func_time
global func_time_max
if event == 'call':
keep = True
code = frame.f_code
# Stores all the parts of a human readable name of the current call.
full_name_list = []
# Work out the module name
module = inspect.getmodule(code)
if module:
module_name = module.__name__
module_path = module.__file__
if not settings['include_stdlib'] \
and is_module_stdlib(module_path):
keep = False
if module_name == '__main__':
module_name = ''
else:
module_name = ''
if module_name:
full_name_list.append(module_name)
# Work out the class name.
try:
class_name = frame.f_locals['self'].__class__.__name__
full_name_list.append(class_name)
except (KeyError, AttributeError):
class_name = ''
# Work out the current function or method
func_name = code.co_name
if func_name == '?':
func_name = '__main__'
full_name_list.append(func_name)
# Create a readable representation of the current call
full_name = '.'.join(full_name_list)
# Load the trace filter, if any. 'keep' determines if we should ignore
# this call
if keep and trace_filter:
keep = trace_filter(call_stack, module_name, class_name,
func_name, full_name)
# Store the call information
if keep:
if call_stack:
fr = call_stack[-1]
else:
fr = None
if fr not in call_dict:
call_dict[fr] = {}
if full_name not in call_dict[fr]:
call_dict[fr][full_name] = 0
call_dict[fr][full_name] += 1
if full_name not in func_count:
func_count[full_name] = 0
func_count[full_name] += 1
if func_count[full_name] > func_count_max:
func_count_max = func_count[full_name]
call_stack.append(full_name)
call_stack_timer.append(time.time())
else:
call_stack.append('')
call_stack_timer.append(None)
if event == 'return':
if call_stack:
full_name = call_stack.pop(-1)
if call_stack_timer:
t = call_stack_timer.pop(-1)
else:
t = None
if t and time_filter(stack=call_stack, full_name=full_name):
if full_name not in func_time:
func_time[full_name] = 0
call_time = (time.time() - t)
func_time[full_name] += call_time
if func_time[full_name] > func_time_max:
func_time_max = func_time[full_name]
return tracer
|
python
|
def tracer(frame, event, arg):
"""This is an internal function that is called every time a call is made
during a trace. It keeps track of relationships between calls.
"""
global func_count_max
global func_count
global trace_filter
global time_filter
global call_stack
global func_time
global func_time_max
if event == 'call':
keep = True
code = frame.f_code
# Stores all the parts of a human readable name of the current call.
full_name_list = []
# Work out the module name
module = inspect.getmodule(code)
if module:
module_name = module.__name__
module_path = module.__file__
if not settings['include_stdlib'] \
and is_module_stdlib(module_path):
keep = False
if module_name == '__main__':
module_name = ''
else:
module_name = ''
if module_name:
full_name_list.append(module_name)
# Work out the class name.
try:
class_name = frame.f_locals['self'].__class__.__name__
full_name_list.append(class_name)
except (KeyError, AttributeError):
class_name = ''
# Work out the current function or method
func_name = code.co_name
if func_name == '?':
func_name = '__main__'
full_name_list.append(func_name)
# Create a readable representation of the current call
full_name = '.'.join(full_name_list)
# Load the trace filter, if any. 'keep' determines if we should ignore
# this call
if keep and trace_filter:
keep = trace_filter(call_stack, module_name, class_name,
func_name, full_name)
# Store the call information
if keep:
if call_stack:
fr = call_stack[-1]
else:
fr = None
if fr not in call_dict:
call_dict[fr] = {}
if full_name not in call_dict[fr]:
call_dict[fr][full_name] = 0
call_dict[fr][full_name] += 1
if full_name not in func_count:
func_count[full_name] = 0
func_count[full_name] += 1
if func_count[full_name] > func_count_max:
func_count_max = func_count[full_name]
call_stack.append(full_name)
call_stack_timer.append(time.time())
else:
call_stack.append('')
call_stack_timer.append(None)
if event == 'return':
if call_stack:
full_name = call_stack.pop(-1)
if call_stack_timer:
t = call_stack_timer.pop(-1)
else:
t = None
if t and time_filter(stack=call_stack, full_name=full_name):
if full_name not in func_time:
func_time[full_name] = 0
call_time = (time.time() - t)
func_time[full_name] += call_time
if func_time[full_name] > func_time_max:
func_time_max = func_time[full_name]
return tracer
|
[
"def",
"tracer",
"(",
"frame",
",",
"event",
",",
"arg",
")",
":",
"global",
"func_count_max",
"global",
"func_count",
"global",
"trace_filter",
"global",
"time_filter",
"global",
"call_stack",
"global",
"func_time",
"global",
"func_time_max",
"if",
"event",
"==",
"'call'",
":",
"keep",
"=",
"True",
"code",
"=",
"frame",
".",
"f_code",
"# Stores all the parts of a human readable name of the current call.",
"full_name_list",
"=",
"[",
"]",
"# Work out the module name",
"module",
"=",
"inspect",
".",
"getmodule",
"(",
"code",
")",
"if",
"module",
":",
"module_name",
"=",
"module",
".",
"__name__",
"module_path",
"=",
"module",
".",
"__file__",
"if",
"not",
"settings",
"[",
"'include_stdlib'",
"]",
"and",
"is_module_stdlib",
"(",
"module_path",
")",
":",
"keep",
"=",
"False",
"if",
"module_name",
"==",
"'__main__'",
":",
"module_name",
"=",
"''",
"else",
":",
"module_name",
"=",
"''",
"if",
"module_name",
":",
"full_name_list",
".",
"append",
"(",
"module_name",
")",
"# Work out the class name.",
"try",
":",
"class_name",
"=",
"frame",
".",
"f_locals",
"[",
"'self'",
"]",
".",
"__class__",
".",
"__name__",
"full_name_list",
".",
"append",
"(",
"class_name",
")",
"except",
"(",
"KeyError",
",",
"AttributeError",
")",
":",
"class_name",
"=",
"''",
"# Work out the current function or method",
"func_name",
"=",
"code",
".",
"co_name",
"if",
"func_name",
"==",
"'?'",
":",
"func_name",
"=",
"'__main__'",
"full_name_list",
".",
"append",
"(",
"func_name",
")",
"# Create a readable representation of the current call",
"full_name",
"=",
"'.'",
".",
"join",
"(",
"full_name_list",
")",
"# Load the trace filter, if any. 'keep' determines if we should ignore",
"# this call",
"if",
"keep",
"and",
"trace_filter",
":",
"keep",
"=",
"trace_filter",
"(",
"call_stack",
",",
"module_name",
",",
"class_name",
",",
"func_name",
",",
"full_name",
")",
"# Store the call information",
"if",
"keep",
":",
"if",
"call_stack",
":",
"fr",
"=",
"call_stack",
"[",
"-",
"1",
"]",
"else",
":",
"fr",
"=",
"None",
"if",
"fr",
"not",
"in",
"call_dict",
":",
"call_dict",
"[",
"fr",
"]",
"=",
"{",
"}",
"if",
"full_name",
"not",
"in",
"call_dict",
"[",
"fr",
"]",
":",
"call_dict",
"[",
"fr",
"]",
"[",
"full_name",
"]",
"=",
"0",
"call_dict",
"[",
"fr",
"]",
"[",
"full_name",
"]",
"+=",
"1",
"if",
"full_name",
"not",
"in",
"func_count",
":",
"func_count",
"[",
"full_name",
"]",
"=",
"0",
"func_count",
"[",
"full_name",
"]",
"+=",
"1",
"if",
"func_count",
"[",
"full_name",
"]",
">",
"func_count_max",
":",
"func_count_max",
"=",
"func_count",
"[",
"full_name",
"]",
"call_stack",
".",
"append",
"(",
"full_name",
")",
"call_stack_timer",
".",
"append",
"(",
"time",
".",
"time",
"(",
")",
")",
"else",
":",
"call_stack",
".",
"append",
"(",
"''",
")",
"call_stack_timer",
".",
"append",
"(",
"None",
")",
"if",
"event",
"==",
"'return'",
":",
"if",
"call_stack",
":",
"full_name",
"=",
"call_stack",
".",
"pop",
"(",
"-",
"1",
")",
"if",
"call_stack_timer",
":",
"t",
"=",
"call_stack_timer",
".",
"pop",
"(",
"-",
"1",
")",
"else",
":",
"t",
"=",
"None",
"if",
"t",
"and",
"time_filter",
"(",
"stack",
"=",
"call_stack",
",",
"full_name",
"=",
"full_name",
")",
":",
"if",
"full_name",
"not",
"in",
"func_time",
":",
"func_time",
"[",
"full_name",
"]",
"=",
"0",
"call_time",
"=",
"(",
"time",
".",
"time",
"(",
")",
"-",
"t",
")",
"func_time",
"[",
"full_name",
"]",
"+=",
"call_time",
"if",
"func_time",
"[",
"full_name",
"]",
">",
"func_time_max",
":",
"func_time_max",
"=",
"func_time",
"[",
"full_name",
"]",
"return",
"tracer"
] |
This is an internal function that is called every time a call is made
during a trace. It keeps track of relationships between calls.
|
[
"This",
"is",
"an",
"internal",
"function",
"that",
"is",
"called",
"every",
"time",
"a",
"call",
"is",
"made",
"during",
"a",
"trace",
".",
"It",
"keeps",
"track",
"of",
"relationships",
"between",
"calls",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pycallgraph.py#L211-L308
|
train
|
This is the internal function that is called every time a call is made. It is called every time a call is made. It keeps track of relationships between calls between calls.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU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ttributeError,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' + '\x31' + '\062', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(140 - 90) + chr(0b110101) + chr(448 - 397), 0o10), nzTpIcepk0o8('\060' + chr(5671 - 5560) + '\067' + '\062', 0b1000), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(111) + chr(49) + chr(0b1001 + 0o50) + chr(0b110000 + 0o2), 30172 - 30164), nzTpIcepk0o8('\x30' + chr(0b1001101 + 0o42) + '\063' + '\060' + chr(0b10010 + 0o41), 0o10), nzTpIcepk0o8(chr(1025 - 977) + '\157' + chr(0b100011 + 0o17) + chr(569 - 518) + chr(0b10000 + 0o46), 0b1000), nzTpIcepk0o8('\060' + chr(10967 - 10856) + chr(0b110101) + chr(654 - 601), 0o10), nzTpIcepk0o8(chr(48) + chr(11107 - 10996) + '\x34' + chr(0b1101 + 0o51), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110000 + 0o1) + chr(0b1001 + 0o54) + chr(2202 - 2154), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\063' + chr(54) + '\066', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(1317 - 1268) + chr(0b110111) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(1836 - 1788) + chr(0b1101111) + '\x31' + chr(0b1110 + 0o47) + chr(0b110011), 0o10), nzTpIcepk0o8('\060' + chr(0b10101 + 0o132) + chr(48), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\063' + chr(0b110110) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(52) + chr(48), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b101001 + 0o12), 0b1000), nzTpIcepk0o8(chr(1999 - 1951) + '\x6f' + '\061' + chr(0b110010) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + chr(2116 - 2062), 0b1000), nzTpIcepk0o8(chr(59 - 11) + chr(9115 - 9004) + chr(1519 - 1470) + '\065', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110110), 49683 - 49675), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110000), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(494 - 443) + chr(0b110001) + chr(0b110000), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(1207 - 1157) + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101101 + 0o2) + chr(0b110010) + chr(52) + '\x30', 58403 - 58395), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1000 + 0o51) + '\x33' + chr(0b101000 + 0o16), 5814 - 5806), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\x6f' + chr(528 - 479) + '\061' + chr(0b1111 + 0o47), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b101110 + 0o5) + chr(976 - 928) + '\x34', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\x33' + chr(0b110001) + chr(0b1111 + 0o42), 0b1000), nzTpIcepk0o8(chr(1069 - 1021) + chr(0b1101111) + chr(51) + chr(0b110110) + '\061', 0b1000), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(111) + chr(0b10101 + 0o36) + '\x37' + chr(49), 0b1000), nzTpIcepk0o8(chr(1417 - 1369) + chr(111) + chr(0b110100) + chr(0b10101 + 0o35), ord("\x08")), nzTpIcepk0o8(chr(1616 - 1568) + chr(2324 - 2213) + chr(2300 - 2251) + chr(0b110001) + chr(0b110000), 0o10), nzTpIcepk0o8('\x30' + chr(0b100010 + 0o115) + chr(1153 - 1103) + chr(54) + '\x32', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1001110 + 0o41) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\157' + chr(0b110101) + '\x33', 39078 - 39070), nzTpIcepk0o8(chr(48) + chr(0b11001 + 0o126) + chr(0b110011) + chr(0b101110 + 0o11) + chr(0b1000 + 0o57), 0o10), nzTpIcepk0o8('\x30' + chr(1222 - 1111) + chr(1714 - 1665) + chr(54) + '\067', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b101011 + 0o6) + '\061' + chr(801 - 749), 0o10), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b1101111) + chr(51) + chr(0b110000) + chr(902 - 853), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(1664 - 1609) + chr(1391 - 1340), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(7955 - 7844) + chr(53) + chr(0b100110 + 0o12), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'$'), '\x64' + '\145' + '\x63' + '\x6f' + chr(0b1100100) + '\145')(chr(2812 - 2695) + '\x74' + '\146' + chr(0b101101) + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def eJiDPLQ6u49O(KZ4ew2qs1HTO, D4ybylS07yGH, S6EI_gyMl2nC):
global GcsJfX9Uxcow
global U8ObleS5Ihkc
global UisSROWAnNJ7
global A5bahXGA1PA8
global CvKVXD7znovt
global QPAVYvppm5Qy
global zAyDITRmdC4y
if D4ybylS07yGH == roI3spqORKae(ES5oEprVxulp(b'i\xcaV&'), '\x64' + chr(101) + '\143' + chr(0b1000010 + 0o55) + chr(100) + chr(0b1100101))('\x75' + chr(116) + chr(0b100000 + 0o106) + chr(0b101101) + chr(2369 - 2313)):
FL7W1vfMD1ni = nzTpIcepk0o8(chr(48) + chr(0b1000100 + 0o53) + '\061', ord("\x08"))
MJEGgvK3nnE9 = KZ4ew2qs1HTO._2k5mc2SJ1wr
RZJOiUowx9BL = []
pOp6HxxfV61L = fqyA_Zm6qdLB.getmodule(MJEGgvK3nnE9)
if pOp6HxxfV61L:
TfrtewDb8EDy = pOp6HxxfV61L.AYtDRlqeP0tq
ISLQnhxAXWz8 = pOp6HxxfV61L.OHWDi_URd_WF
if not tlZFbd_9MN8s[roI3spqORKae(ES5oEprVxulp(b'c\xc5Y&\xb6\xfaHy\x1b\x82\x1c\x07i\x96'), '\x64' + chr(0b1100101) + chr(0b1100011) + '\157' + chr(0b1100100) + chr(101))(chr(0b1110101) + '\x74' + chr(102) + '\x2d' + '\070')] and rZRcJw_oZ2Oq(ISLQnhxAXWz8):
FL7W1vfMD1ni = nzTpIcepk0o8(chr(1926 - 1878) + chr(0b1101111) + chr(0b11110 + 0o22), 8)
if TfrtewDb8EDy == roI3spqORKae(ES5oEprVxulp(b'U\xf4W+\xaa\xf0ry'), '\144' + '\x65' + chr(99) + '\x6f' + chr(9634 - 9534) + chr(101))('\x75' + chr(4208 - 4092) + chr(102) + '\x2d' + chr(0b111000)):
TfrtewDb8EDy = roI3spqORKae(ES5oEprVxulp(b''), '\x64' + '\145' + '\x63' + chr(111) + '\x64' + '\x65')(chr(117) + chr(0b10111 + 0o135) + chr(0b1100110) + '\055' + chr(0b101 + 0o63))
else:
TfrtewDb8EDy = roI3spqORKae(ES5oEprVxulp(b''), chr(8268 - 8168) + '\145' + '\143' + chr(5116 - 5005) + chr(3151 - 3051) + chr(101))('\165' + chr(11387 - 11271) + '\x66' + '\055' + '\070')
if TfrtewDb8EDy:
roI3spqORKae(RZJOiUowx9BL, roI3spqORKae(ES5oEprVxulp(b'B\xffi~\xbb\xf9jI\x02\x99-^'), chr(0b1100100) + chr(0b1100101) + chr(0b1100010 + 0o1) + chr(111) + '\x64' + chr(101))(chr(0b1110101) + '\164' + chr(0b1101 + 0o131) + chr(1202 - 1157) + chr(897 - 841)))(TfrtewDb8EDy)
try:
wpAKxvEaUSNY = KZ4ew2qs1HTO.f_locals[roI3spqORKae(ES5oEprVxulp(b'y\xceV,'), '\144' + chr(8048 - 7947) + '\143' + '\157' + chr(0b1011 + 0o131) + '\x65')(chr(117) + '\x74' + chr(102) + chr(1841 - 1796) + chr(56))].__class__.AYtDRlqeP0tq
roI3spqORKae(RZJOiUowx9BL, roI3spqORKae(ES5oEprVxulp(b'B\xffi~\xbb\xf9jI\x02\x99-^'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + '\157' + '\144' + chr(0b1000011 + 0o42))('\165' + '\164' + chr(0b1100110) + '\x2d' + chr(0b101011 + 0o15)))(wpAKxvEaUSNY)
except (knUxyjfq07F9, bIsJhlpYrrU2):
wpAKxvEaUSNY = roI3spqORKae(ES5oEprVxulp(b''), chr(0b1100100) + chr(101) + '\x63' + chr(111) + '\144' + '\145')(chr(5493 - 5376) + chr(0b1110100) + '\x66' + '\x2d' + chr(846 - 790))
kDYN_nEvZ6eW = MJEGgvK3nnE9.co_name
if kDYN_nEvZ6eW == roI3spqORKae(ES5oEprVxulp(b'5'), chr(100) + chr(0b1100101) + chr(99) + chr(0b101111 + 0o100) + '\x64' + chr(0b11010 + 0o113))('\165' + chr(116) + '\x66' + '\x2d' + chr(3133 - 3077)):
kDYN_nEvZ6eW = roI3spqORKae(ES5oEprVxulp(b'U\xf4W+\xaa\xf0ry'), '\144' + '\x65' + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(3743 - 3642))(chr(0b1101101 + 0o10) + '\x74' + chr(0b11 + 0o143) + '\055' + '\x38')
roI3spqORKae(RZJOiUowx9BL, roI3spqORKae(ES5oEprVxulp(b'B\xffi~\xbb\xf9jI\x02\x99-^'), chr(0b1100100) + '\145' + '\143' + '\x6f' + chr(100) + chr(3295 - 3194))(chr(9485 - 9368) + '\164' + chr(0b1100110) + '\x2d' + chr(0b111000)))(kDYN_nEvZ6eW)
q7MkEDaqJWu9 = roI3spqORKae(ES5oEprVxulp(b'$'), '\x64' + chr(101) + chr(99) + '\157' + '\144' + chr(0b0 + 0o145))(chr(0b110 + 0o157) + chr(116) + '\x66' + '\x2d' + '\070').Y4yM9BcfTCNq(RZJOiUowx9BL)
if FL7W1vfMD1ni and UisSROWAnNJ7:
FL7W1vfMD1ni = UisSROWAnNJ7(CvKVXD7znovt, TfrtewDb8EDy, wpAKxvEaUSNY, kDYN_nEvZ6eW, q7MkEDaqJWu9)
if FL7W1vfMD1ni:
if CvKVXD7znovt:
MECQo9AJiah6 = CvKVXD7znovt[-nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(0b1101110 + 0o1) + '\061', 8)]
else:
MECQo9AJiah6 = None
if MECQo9AJiah6 not in nzTo5WhH84Ef:
nzTo5WhH84Ef[MECQo9AJiah6] = {}
if q7MkEDaqJWu9 not in nzTo5WhH84Ef[MECQo9AJiah6]:
nzTo5WhH84Ef[MECQo9AJiah6][q7MkEDaqJWu9] = nzTpIcepk0o8('\060' + chr(0b100011 + 0o114) + '\060', 8)
nzTo5WhH84Ef[MECQo9AJiah6][q7MkEDaqJWu9] += nzTpIcepk0o8('\060' + '\157' + chr(0b1110 + 0o43), 8)
if q7MkEDaqJWu9 not in U8ObleS5Ihkc:
U8ObleS5Ihkc[q7MkEDaqJWu9] = nzTpIcepk0o8(chr(48) + chr(8994 - 8883) + chr(48), 8)
U8ObleS5Ihkc[q7MkEDaqJWu9] += nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061', 8)
if U8ObleS5Ihkc[q7MkEDaqJWu9] > GcsJfX9Uxcow:
GcsJfX9Uxcow = U8ObleS5Ihkc[q7MkEDaqJWu9]
roI3spqORKae(CvKVXD7znovt, roI3spqORKae(ES5oEprVxulp(b'B\xffi~\xbb\xf9jI\x02\x99-^'), chr(0b1000001 + 0o43) + '\145' + chr(2709 - 2610) + chr(111) + chr(0b1000011 + 0o41) + '\x65')('\165' + chr(8748 - 8632) + '\146' + '\055' + '\x38'))(q7MkEDaqJWu9)
roI3spqORKae(jkxpC_61FiGB, roI3spqORKae(ES5oEprVxulp(b'B\xffi~\xbb\xf9jI\x02\x99-^'), chr(554 - 454) + '\145' + chr(0b1010101 + 0o16) + chr(0b0 + 0o157) + '\144' + '\x65')(chr(117) + chr(0b1000100 + 0o60) + chr(0b1011001 + 0o15) + chr(0b101101) + '\x38'))(roI3spqORKae(oprIvDIRQyCb, roI3spqORKae(ES5oEprVxulp(b'e\xdbH\x03\xb5\xdadt9\x8f;\t'), chr(100) + '\x65' + chr(0b1100011) + chr(0b111110 + 0o61) + chr(0b1100100) + chr(101))(chr(0b1110101) + chr(116) + chr(0b1100110) + '\055' + chr(0b111000)))())
else:
roI3spqORKae(CvKVXD7znovt, roI3spqORKae(ES5oEprVxulp(b'B\xffi~\xbb\xf9jI\x02\x99-^'), chr(0b11100 + 0o110) + chr(0b1100101) + chr(6579 - 6480) + chr(0b1001010 + 0o45) + '\x64' + chr(101))(chr(117) + chr(630 - 514) + '\x66' + chr(0b101101) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b''), chr(100) + chr(0b1100101) + '\143' + chr(0b110001 + 0o76) + chr(0b1100100) + '\x65')(chr(0b1001100 + 0o51) + chr(7594 - 7478) + '\146' + chr(0b1 + 0o54) + '\x38'))
roI3spqORKae(jkxpC_61FiGB, roI3spqORKae(ES5oEprVxulp(b'B\xffi~\xbb\xf9jI\x02\x99-^'), chr(0b1100100) + '\x65' + chr(99) + chr(1911 - 1800) + chr(0b1100100) + '\x65')(chr(0b1110101) + '\x74' + '\x66' + chr(0b101100 + 0o1) + '\x38'))(None)
if D4ybylS07yGH == roI3spqORKae(ES5oEprVxulp(b'x\xceN?\xb1\xf0'), chr(100) + chr(0b1100101) + chr(0b1100011) + '\x6f' + '\144' + chr(109 - 8))(chr(7433 - 7316) + '\164' + chr(102) + chr(0b101010 + 0o3) + '\x38'):
if CvKVXD7znovt:
q7MkEDaqJWu9 = CvKVXD7znovt.uC_Yoybx7J0I(-nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b10000 + 0o137) + chr(0b100100 + 0o15), 8))
if jkxpC_61FiGB:
h3Vc_4wxEbgd = jkxpC_61FiGB.uC_Yoybx7J0I(-nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1101111) + chr(0b110001), 8))
else:
h3Vc_4wxEbgd = None
if h3Vc_4wxEbgd and A5bahXGA1PA8(stack=CvKVXD7znovt, full_name=q7MkEDaqJWu9):
if q7MkEDaqJWu9 not in QPAVYvppm5Qy:
QPAVYvppm5Qy[q7MkEDaqJWu9] = nzTpIcepk0o8(chr(0b110000) + '\157' + '\060', 8)
ZTohkTV0Owy0 = oprIvDIRQyCb.oprIvDIRQyCb() - h3Vc_4wxEbgd
QPAVYvppm5Qy[q7MkEDaqJWu9] += ZTohkTV0Owy0
if QPAVYvppm5Qy[q7MkEDaqJWu9] > zAyDITRmdC4y:
zAyDITRmdC4y = QPAVYvppm5Qy[q7MkEDaqJWu9]
return eJiDPLQ6u49O
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/pycallgraph.py
|
get_dot
|
def get_dot(stop=True):
"""Returns a string containing a DOT file. Setting stop to True will cause
the trace to stop.
"""
defaults = []
nodes = []
edges = []
# define default attributes
for comp, comp_attr in graph_attributes.items():
attr = ', '.join( '%s = "%s"' % (attr, val)
for attr, val in comp_attr.items() )
defaults.append( '\t%(comp)s [ %(attr)s ];\n' % locals() )
# define nodes
for func, hits in func_count.items():
calls_frac, total_time_frac, total_time = _frac_calculation(func, hits)
col = settings['node_colour'](calls_frac, total_time_frac)
attribs = ['%s="%s"' % a for a in settings['node_attributes'].items()]
node_str = '"%s" [%s];' % (func, ', '.join(attribs))
nodes.append( node_str % locals() )
# define edges
for fr_key, fr_val in call_dict.items():
if not fr_key: continue
for to_key, to_val in fr_val.items():
calls_frac, total_time_frac, totla_time = \
_frac_calculation(to_key, to_val)
col = settings['edge_colour'](calls_frac, total_time_frac)
edge = '[ color = "%s", label="%s" ]' % (col, to_val)
edges.append('"%s"->"%s" %s;' % (fr_key, to_key, edge))
defaults = '\n\t'.join( defaults )
nodes = '\n\t'.join( nodes )
edges = '\n\t'.join( edges )
dot_fmt = ("digraph G {\n"
" %(defaults)s\n\n"
" %(nodes)s\n\n"
" %(edges)s\n}\n"
)
return dot_fmt % locals()
|
python
|
def get_dot(stop=True):
"""Returns a string containing a DOT file. Setting stop to True will cause
the trace to stop.
"""
defaults = []
nodes = []
edges = []
# define default attributes
for comp, comp_attr in graph_attributes.items():
attr = ', '.join( '%s = "%s"' % (attr, val)
for attr, val in comp_attr.items() )
defaults.append( '\t%(comp)s [ %(attr)s ];\n' % locals() )
# define nodes
for func, hits in func_count.items():
calls_frac, total_time_frac, total_time = _frac_calculation(func, hits)
col = settings['node_colour'](calls_frac, total_time_frac)
attribs = ['%s="%s"' % a for a in settings['node_attributes'].items()]
node_str = '"%s" [%s];' % (func, ', '.join(attribs))
nodes.append( node_str % locals() )
# define edges
for fr_key, fr_val in call_dict.items():
if not fr_key: continue
for to_key, to_val in fr_val.items():
calls_frac, total_time_frac, totla_time = \
_frac_calculation(to_key, to_val)
col = settings['edge_colour'](calls_frac, total_time_frac)
edge = '[ color = "%s", label="%s" ]' % (col, to_val)
edges.append('"%s"->"%s" %s;' % (fr_key, to_key, edge))
defaults = '\n\t'.join( defaults )
nodes = '\n\t'.join( nodes )
edges = '\n\t'.join( edges )
dot_fmt = ("digraph G {\n"
" %(defaults)s\n\n"
" %(nodes)s\n\n"
" %(edges)s\n}\n"
)
return dot_fmt % locals()
|
[
"def",
"get_dot",
"(",
"stop",
"=",
"True",
")",
":",
"defaults",
"=",
"[",
"]",
"nodes",
"=",
"[",
"]",
"edges",
"=",
"[",
"]",
"# define default attributes",
"for",
"comp",
",",
"comp_attr",
"in",
"graph_attributes",
".",
"items",
"(",
")",
":",
"attr",
"=",
"', '",
".",
"join",
"(",
"'%s = \"%s\"'",
"%",
"(",
"attr",
",",
"val",
")",
"for",
"attr",
",",
"val",
"in",
"comp_attr",
".",
"items",
"(",
")",
")",
"defaults",
".",
"append",
"(",
"'\\t%(comp)s [ %(attr)s ];\\n'",
"%",
"locals",
"(",
")",
")",
"# define nodes",
"for",
"func",
",",
"hits",
"in",
"func_count",
".",
"items",
"(",
")",
":",
"calls_frac",
",",
"total_time_frac",
",",
"total_time",
"=",
"_frac_calculation",
"(",
"func",
",",
"hits",
")",
"col",
"=",
"settings",
"[",
"'node_colour'",
"]",
"(",
"calls_frac",
",",
"total_time_frac",
")",
"attribs",
"=",
"[",
"'%s=\"%s\"'",
"%",
"a",
"for",
"a",
"in",
"settings",
"[",
"'node_attributes'",
"]",
".",
"items",
"(",
")",
"]",
"node_str",
"=",
"'\"%s\" [%s];'",
"%",
"(",
"func",
",",
"', '",
".",
"join",
"(",
"attribs",
")",
")",
"nodes",
".",
"append",
"(",
"node_str",
"%",
"locals",
"(",
")",
")",
"# define edges",
"for",
"fr_key",
",",
"fr_val",
"in",
"call_dict",
".",
"items",
"(",
")",
":",
"if",
"not",
"fr_key",
":",
"continue",
"for",
"to_key",
",",
"to_val",
"in",
"fr_val",
".",
"items",
"(",
")",
":",
"calls_frac",
",",
"total_time_frac",
",",
"totla_time",
"=",
"_frac_calculation",
"(",
"to_key",
",",
"to_val",
")",
"col",
"=",
"settings",
"[",
"'edge_colour'",
"]",
"(",
"calls_frac",
",",
"total_time_frac",
")",
"edge",
"=",
"'[ color = \"%s\", label=\"%s\" ]'",
"%",
"(",
"col",
",",
"to_val",
")",
"edges",
".",
"append",
"(",
"'\"%s\"->\"%s\" %s;'",
"%",
"(",
"fr_key",
",",
"to_key",
",",
"edge",
")",
")",
"defaults",
"=",
"'\\n\\t'",
".",
"join",
"(",
"defaults",
")",
"nodes",
"=",
"'\\n\\t'",
".",
"join",
"(",
"nodes",
")",
"edges",
"=",
"'\\n\\t'",
".",
"join",
"(",
"edges",
")",
"dot_fmt",
"=",
"(",
"\"digraph G {\\n\"",
"\"\t%(defaults)s\\n\\n\"",
"\"\t%(nodes)s\\n\\n\"",
"\"\t%(edges)s\\n}\\n\"",
")",
"return",
"dot_fmt",
"%",
"locals",
"(",
")"
] |
Returns a string containing a DOT file. Setting stop to True will cause
the trace to stop.
|
[
"Returns",
"a",
"string",
"containing",
"a",
"DOT",
"file",
".",
"Setting",
"stop",
"to",
"True",
"will",
"cause",
"the",
"trace",
"to",
"stop",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFile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FWa_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(0b10 + 0o56) + chr(0b111000 + 0o67) + chr(0b101 + 0o54) + '\061' + '\063', 0o10), nzTpIcepk0o8(chr(924 - 876) + '\157' + '\063' + '\065' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(8438 - 8327) + chr(49) + chr(1314 - 1262) + chr(0b110010), 50947 - 50939), nzTpIcepk0o8(chr(808 - 760) + chr(0b101100 + 0o103) + chr(1763 - 1714) + '\x30' + '\060', 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1101111) + chr(1403 - 1352) + '\066' + '\060', 28891 - 28883), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\065' + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(152 - 104) + '\157' + '\x32' + chr(54) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\157' + chr(51) + chr(1135 - 1084), ord("\x08")), nzTpIcepk0o8('\060' + chr(3365 - 3254) + chr(0b110011) + chr(0b110101) + chr(53), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\x31' + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(7403 - 7292) + '\062' + '\x33' + chr(0b1 + 0o62), 0o10), nzTpIcepk0o8(chr(1444 - 1396) + '\x6f' + '\x31' + chr(0b100000 + 0o25) + chr(0b110001), 44536 - 44528), nzTpIcepk0o8(chr(2056 - 2008) + chr(0b11011 + 0o124) + chr(0b100110 + 0o13) + chr(48) + chr(0b110011 + 0o4), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(7944 - 7833) + '\062' + '\x31' + '\063', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + chr(54) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(195 - 147) + chr(111) + chr(49) + chr(2807 - 2753) + chr(49), 0o10), nzTpIcepk0o8(chr(389 - 341) + chr(111) + chr(1529 - 1478) + '\067' + chr(1687 - 1639), 4778 - 4770), nzTpIcepk0o8(chr(0b110000) + chr(10804 - 10693) + chr(0b110010) + chr(0b110111) + chr(1613 - 1563), ord("\x08")), nzTpIcepk0o8(chr(270 - 222) + chr(111) + chr(0b11100 + 0o26) + '\067' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + chr(1126 - 1073) + '\x33', 0o10), nzTpIcepk0o8(chr(1211 - 1163) + '\157' + '\x31' + '\x37', 8), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(111) + chr(0b101101 + 0o6) + '\x32' + '\062', 0o10), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b11111 + 0o120) + chr(53) + '\066', 0b1000), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(111) + chr(49) + '\x31' + chr(0b101110 + 0o7), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + chr(2449 - 2396) + '\064', 0o10), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(4712 - 4601) + chr(0b110001) + '\x31' + '\x35', 8), nzTpIcepk0o8(chr(0b1101 + 0o43) + '\157' + chr(0b110010) + chr(221 - 166) + chr(0b110001), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(48) + chr(51), 52608 - 52600), nzTpIcepk0o8(chr(373 - 325) + chr(0b1101111) + chr(0b110001) + chr(278 - 223) + '\x36', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(559 - 510) + chr(597 - 547) + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2035 - 1984) + chr(0b110101) + chr(0b1111 + 0o44), 8), nzTpIcepk0o8('\x30' + '\157' + chr(0b11111 + 0o22) + chr(634 - 579) + chr(51 - 1), ord("\x08")), nzTpIcepk0o8(chr(1814 - 1766) + chr(0b11011 + 0o124) + '\x37' + chr(0b100001 + 0o21), 0b1000), nzTpIcepk0o8(chr(158 - 110) + '\157' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(1361 - 1313) + chr(0b1101111) + chr(51) + chr(0b10 + 0o60) + '\x32', 8), nzTpIcepk0o8('\060' + chr(2722 - 2611) + '\063' + '\064' + chr(0b110111), 4025 - 4017), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(386 - 337) + '\x36' + '\x35', 24592 - 24584), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x32' + chr(50) + '\x32', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + '\067' + chr(55), ord("\x08")), nzTpIcepk0o8('\060' + chr(11407 - 11296) + chr(0b100100 + 0o17) + chr(53) + chr(0b110011 + 0o0), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b111 + 0o150) + chr(1029 - 976) + chr(48), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'e'), '\144' + '\x65' + '\x63' + chr(0b1100001 + 0o16) + chr(100) + chr(761 - 660))(chr(0b1110101) + '\164' + chr(102) + chr(0b101101) + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def _BGwilzYUIYs(dYJbBiYO_nGE=nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1000000 + 0o57) + '\061', 0b1000)):
Qi1RvNpMkhoJ = []
B4QyIILDjNeo = []
KQPyuEwynMlj = []
for (B881keGOXOsp, fx89A6S54Cc4) in roI3spqORKae(KtL7c4uTke32, roI3spqORKae(ES5oEprVxulp(b'\x12\xb6\x0c\x0e\xb5V\xfc/\xdey\xc3\x00'), chr(0b1100100) + chr(5045 - 4944) + '\x63' + '\157' + chr(536 - 436) + chr(0b10011 + 0o122))(chr(0b1101111 + 0o6) + chr(4546 - 4430) + chr(0b1100110) + chr(854 - 809) + '\x38'))():
H7gzb3fKphmE = roI3spqORKae(ES5oEprVxulp(b'g\xc9'), '\x64' + chr(9435 - 9334) + chr(0b1000010 + 0o41) + chr(0b1000110 + 0o51) + chr(100) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b11000 + 0o116) + '\x2d' + chr(0b11101 + 0o33)).Y4yM9BcfTCNq((roI3spqORKae(ES5oEprVxulp(b'n\x9aB}\xd0\x0e\x91h\xcf'), chr(0b1100100) + chr(0b1100101) + chr(0b10001 + 0o122) + chr(111) + '\x64' + '\145')(chr(0b1001011 + 0o52) + chr(116) + chr(102) + '\055' + chr(0b11111 + 0o31)) % (H7gzb3fKphmE, pXwvT17vr09s) for (H7gzb3fKphmE, pXwvT17vr09s) in fx89A6S54Cc4.Y_nNEzH43vXi()))
roI3spqORKae(Qi1RvNpMkhoJ, roI3spqORKae(ES5oEprVxulp(b'\x03\xbd1t\x88K\xf3t\x87`\xce\\'), chr(100) + '\x65' + '\143' + chr(0b1101111) + '\x64' + '\145')(chr(0b1100000 + 0o25) + chr(0b1110100) + '\x66' + chr(45) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'B\xccJ#\x9fA\xc42\x9e/\xc0Ib\xa3\x96\x05\x8c\xc8\x90\x98/\x8f\x15G'), '\144' + chr(1167 - 1066) + '\143' + chr(7685 - 7574) + chr(100) + chr(101))('\x75' + '\164' + chr(2880 - 2778) + '\x2d' + '\x38') % y0cCpS6dh4OT())
for (h0klhChk4Vv6, to9O9BnKueDH) in roI3spqORKae(U8ObleS5Ihkc, roI3spqORKae(ES5oEprVxulp(b'\x12\xb6\x0c\x0e\xb5V\xfc/\xdey\xc3\x00'), chr(0b1100100) + chr(101) + chr(8862 - 8763) + '\x6f' + chr(100) + '\x65')(chr(0b1101011 + 0o12) + chr(116) + chr(0b1011110 + 0o10) + '\055' + chr(0b100110 + 0o22)))():
(bZRk6FPeVnqz, o4PMDJyUfl5b, bhaD65NqbmlS) = kymyFrGqYa2K(h0klhChk4Vv6, to9O9BnKueDH)
hRTUxJgvuslu = tlZFbd_9MN8s[roI3spqORKae(ES5oEprVxulp(b'%\x86\x06%\xafO\xdbw\x82z\xe9'), '\x64' + chr(0b1100101) + '\x63' + chr(0b1000001 + 0o56) + chr(0b1100100) + chr(0b1011 + 0o132))('\165' + chr(116) + chr(102) + chr(0b101101) + chr(56))](bZRk6FPeVnqz, o4PMDJyUfl5b)
I5rpB3fJPGfR = [roI3spqORKae(ES5oEprVxulp(b'n\x9a_b\xd5_\x96'), '\x64' + '\145' + '\143' + chr(11926 - 11815) + chr(0b111011 + 0o51) + '\x65')(chr(117) + chr(0b1110100) + '\x66' + chr(1912 - 1867) + '\070') % AQ9ceR9AaoT1 for AQ9ceR9AaoT1 in tlZFbd_9MN8s[roI3spqORKae(ES5oEprVxulp(b'%\x86\x06%\xafM\xc0o\x9ff\xf9\x1c3\xee\x84'), chr(0b1100000 + 0o4) + chr(0b1010011 + 0o22) + chr(99) + '\157' + chr(100) + chr(0b1100101))(chr(117) + chr(0b101 + 0o157) + chr(0b1100110) + chr(45) + chr(0b111000))].Y_nNEzH43vXi()]
wo0rYnFCLGor = roI3spqORKae(ES5oEprVxulp(b'i\xcc\x11b\xd0w\x91h\xb04'), '\x64' + '\145' + '\x63' + chr(0b1000000 + 0o57) + chr(100) + chr(0b1001110 + 0o27))(chr(120 - 3) + chr(0b10110 + 0o136) + chr(102) + chr(45) + chr(1394 - 1338)) % (h0klhChk4Vv6, roI3spqORKae(ES5oEprVxulp(b'g\xc9'), '\144' + '\x65' + '\x63' + chr(0b1101111) + '\x64' + chr(0b1100101))('\165' + chr(116) + chr(0b1100110) + chr(596 - 551) + '\x38').Y4yM9BcfTCNq(I5rpB3fJPGfR))
roI3spqORKae(B4QyIILDjNeo, roI3spqORKae(ES5oEprVxulp(b'\x03\xbd1t\x88K\xf3t\x87`\xce\\'), '\x64' + chr(0b1100101) + '\x63' + chr(1721 - 1610) + '\144' + '\x65')(chr(117) + chr(0b1110100) + chr(0b100101 + 0o101) + chr(0b101101) + '\x38'))(wo0rYnFCLGor % y0cCpS6dh4OT())
for (huypbb9Z5uHs, pv33RxsPB1_O) in roI3spqORKae(nzTo5WhH84Ef, roI3spqORKae(ES5oEprVxulp(b'\x12\xb6\x0c\x0e\xb5V\xfc/\xdey\xc3\x00'), '\x64' + chr(101) + chr(0b111000 + 0o53) + chr(0b1101111) + '\144' + chr(101))('\165' + chr(0b100101 + 0o117) + chr(0b101011 + 0o73) + '\055' + '\x38'))():
if not huypbb9Z5uHs:
continue
for (R4glgq3oDJqk, oipAcGdaSj73) in roI3spqORKae(pv33RxsPB1_O, roI3spqORKae(ES5oEprVxulp(b'\x12\xb6\x0c\x0e\xb5V\xfc/\xdey\xc3\x00'), chr(0b1000110 + 0o36) + chr(0b1100101) + '\143' + chr(111) + '\144' + chr(5698 - 5597))('\165' + chr(116) + '\146' + chr(1235 - 1190) + '\x38'))():
(bZRk6FPeVnqz, o4PMDJyUfl5b, tDjdvNi56M6O) = kymyFrGqYa2K(R4glgq3oDJqk, oipAcGdaSj73)
hRTUxJgvuslu = tlZFbd_9MN8s[roI3spqORKae(ES5oEprVxulp(b'.\x8d\x05%\xafO\xdbw\x82z\xe9'), '\144' + '\145' + chr(99) + chr(111) + chr(4735 - 4635) + '\145')('\x75' + chr(0b1000100 + 0o60) + '\x66' + '\055' + chr(0b111000))](bZRk6FPeVnqz, o4PMDJyUfl5b)
gMt_geOSZhSi = roI3spqORKae(ES5oEprVxulp(b'\x10\xc9\x01/\x9cC\xc6;\xd0/\xb9L4\xa9\xdbQ\x94\xdb\xdb\x8ec\xef\x0ch\x1fo\x99\x1e'), chr(5422 - 5322) + chr(0b1000111 + 0o36) + chr(99) + '\157' + '\144' + '\x65')(chr(0b1110101) + chr(0b10001 + 0o143) + chr(0b100100 + 0o102) + chr(1059 - 1014) + chr(56)) % (hRTUxJgvuslu, oipAcGdaSj73)
roI3spqORKae(KQPyuEwynMlj, roI3spqORKae(ES5oEprVxulp(b'\x03\xbd1t\x88K\xf3t\x87`\xce\\'), '\x64' + '\145' + chr(0b10011 + 0o120) + chr(0b1101111) + '\144' + '\145')('\165' + '\164' + '\146' + chr(0b11011 + 0o22) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'i\xcc\x11b\xdd\x12\x96>\x9e-\xbbL4\xb0'), '\144' + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(0b100000 + 0o105))(chr(0b110011 + 0o102) + '\164' + chr(0b1100110) + chr(45) + chr(56)) % (huypbb9Z5uHs, R4glgq3oDJqk, gMt_geOSZhSi))
Qi1RvNpMkhoJ = roI3spqORKae(ES5oEprVxulp(b'A\xe0'), '\144' + chr(0b1100101) + '\x63' + '\x6f' + '\x64' + '\145')('\165' + '\x74' + '\x66' + '\055' + chr(56)).Y4yM9BcfTCNq(Qi1RvNpMkhoJ)
B4QyIILDjNeo = roI3spqORKae(ES5oEprVxulp(b'A\xe0'), chr(1867 - 1767) + chr(0b1100101) + '\143' + chr(0b1101111) + '\x64' + chr(0b1011101 + 0o10))(chr(0b1110101) + chr(0b1110100) + '\x66' + '\x2d' + chr(0b110110 + 0o2)).Y4yM9BcfTCNq(B4QyIILDjNeo)
KQPyuEwynMlj = roI3spqORKae(ES5oEprVxulp(b'A\xe0'), chr(7103 - 7003) + chr(0b100011 + 0o102) + chr(1137 - 1038) + chr(0b1101111) + chr(0b1100100) + chr(0b10011 + 0o122))(chr(0b1110101) + '\164' + chr(7637 - 7535) + chr(0b101101) + chr(2331 - 2275)).Y4yM9BcfTCNq(KQPyuEwynMlj)
zdjmKbWe08Lk = roI3spqORKae(ES5oEprVxulp(b'/\x80\x052\x91\\\xdc;\xaa/\xe0cN\xae\xdf\x15\x9d\xdc\xd8\x9ec\xa6]d\x1fG\xb3J[z\x85\x15^c\xa1\xce\x06\x98u\xe2n\xc1\x07$\x97I\xc72\x9e\x05\xe6c'), chr(0b100 + 0o140) + chr(927 - 826) + chr(5692 - 5593) + '\157' + '\144' + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b1100110) + '\x2d' + chr(0b1001 + 0o57))
return zdjmKbWe08Lk % y0cCpS6dh4OT()
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/pycallgraph.py
|
get_gdf
|
def get_gdf(stop=True):
"""Returns a string containing a GDF file. Setting stop to True will cause
the trace to stop.
"""
ret = ['nodedef>name VARCHAR, label VARCHAR, hits INTEGER, ' + \
'calls_frac DOUBLE, total_time_frac DOUBLE, ' + \
'total_time DOUBLE, color VARCHAR, width DOUBLE']
for func, hits in func_count.items():
calls_frac, total_time_frac, total_time = _frac_calculation(func, hits)
col = settings['node_colour'](calls_frac, total_time_frac)
color = ','.join([str(round(float(c) * 255)) for c in col.split()])
ret.append('%s,%s,%s,%s,%s,%s,\'%s\',%s' % (func, func, hits, \
calls_frac, total_time_frac, total_time, color, \
math.log(hits * 10)))
ret.append('edgedef>node1 VARCHAR, node2 VARCHAR, color VARCHAR')
for fr_key, fr_val in call_dict.items():
if fr_key == '':
continue
for to_key, to_val in fr_val.items():
calls_frac, total_time_frac, total_time = \
_frac_calculation(to_key, to_val)
col = settings['edge_colour'](calls_frac, total_time_frac)
color = ','.join([str(round(float(c) * 255)) for c in col.split()])
ret.append('%s,%s,\'%s\'' % (fr_key, to_key, color))
ret = '\n'.join(ret)
return ret
|
python
|
def get_gdf(stop=True):
"""Returns a string containing a GDF file. Setting stop to True will cause
the trace to stop.
"""
ret = ['nodedef>name VARCHAR, label VARCHAR, hits INTEGER, ' + \
'calls_frac DOUBLE, total_time_frac DOUBLE, ' + \
'total_time DOUBLE, color VARCHAR, width DOUBLE']
for func, hits in func_count.items():
calls_frac, total_time_frac, total_time = _frac_calculation(func, hits)
col = settings['node_colour'](calls_frac, total_time_frac)
color = ','.join([str(round(float(c) * 255)) for c in col.split()])
ret.append('%s,%s,%s,%s,%s,%s,\'%s\',%s' % (func, func, hits, \
calls_frac, total_time_frac, total_time, color, \
math.log(hits * 10)))
ret.append('edgedef>node1 VARCHAR, node2 VARCHAR, color VARCHAR')
for fr_key, fr_val in call_dict.items():
if fr_key == '':
continue
for to_key, to_val in fr_val.items():
calls_frac, total_time_frac, total_time = \
_frac_calculation(to_key, to_val)
col = settings['edge_colour'](calls_frac, total_time_frac)
color = ','.join([str(round(float(c) * 255)) for c in col.split()])
ret.append('%s,%s,\'%s\'' % (fr_key, to_key, color))
ret = '\n'.join(ret)
return ret
|
[
"def",
"get_gdf",
"(",
"stop",
"=",
"True",
")",
":",
"ret",
"=",
"[",
"'nodedef>name VARCHAR, label VARCHAR, hits INTEGER, '",
"+",
"'calls_frac DOUBLE, total_time_frac DOUBLE, '",
"+",
"'total_time DOUBLE, color VARCHAR, width DOUBLE'",
"]",
"for",
"func",
",",
"hits",
"in",
"func_count",
".",
"items",
"(",
")",
":",
"calls_frac",
",",
"total_time_frac",
",",
"total_time",
"=",
"_frac_calculation",
"(",
"func",
",",
"hits",
")",
"col",
"=",
"settings",
"[",
"'node_colour'",
"]",
"(",
"calls_frac",
",",
"total_time_frac",
")",
"color",
"=",
"','",
".",
"join",
"(",
"[",
"str",
"(",
"round",
"(",
"float",
"(",
"c",
")",
"*",
"255",
")",
")",
"for",
"c",
"in",
"col",
".",
"split",
"(",
")",
"]",
")",
"ret",
".",
"append",
"(",
"'%s,%s,%s,%s,%s,%s,\\'%s\\',%s'",
"%",
"(",
"func",
",",
"func",
",",
"hits",
",",
"calls_frac",
",",
"total_time_frac",
",",
"total_time",
",",
"color",
",",
"math",
".",
"log",
"(",
"hits",
"*",
"10",
")",
")",
")",
"ret",
".",
"append",
"(",
"'edgedef>node1 VARCHAR, node2 VARCHAR, color VARCHAR'",
")",
"for",
"fr_key",
",",
"fr_val",
"in",
"call_dict",
".",
"items",
"(",
")",
":",
"if",
"fr_key",
"==",
"''",
":",
"continue",
"for",
"to_key",
",",
"to_val",
"in",
"fr_val",
".",
"items",
"(",
")",
":",
"calls_frac",
",",
"total_time_frac",
",",
"total_time",
"=",
"_frac_calculation",
"(",
"to_key",
",",
"to_val",
")",
"col",
"=",
"settings",
"[",
"'edge_colour'",
"]",
"(",
"calls_frac",
",",
"total_time_frac",
")",
"color",
"=",
"','",
".",
"join",
"(",
"[",
"str",
"(",
"round",
"(",
"float",
"(",
"c",
")",
"*",
"255",
")",
")",
"for",
"c",
"in",
"col",
".",
"split",
"(",
")",
"]",
")",
"ret",
".",
"append",
"(",
"'%s,%s,\\'%s\\''",
"%",
"(",
"fr_key",
",",
"to_key",
",",
"color",
")",
")",
"ret",
"=",
"'\\n'",
".",
"join",
"(",
"ret",
")",
"return",
"ret"
] |
Returns a string containing a GDF file. Setting stop to True will cause
the trace to stop.
|
[
"Returns",
"a",
"string",
"containing",
"a",
"GDF",
"file",
".",
"Setting",
"stop",
"to",
"True",
"will",
"cause",
"the",
"trace",
"to",
"stop",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pycallgraph.py#L372-L397
|
train
|
Returns a string containing a GDF 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,Qn0k4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,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) + '\x32' + '\064' + chr(663 - 609), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1010100 + 0o33) + '\x32' + chr(899 - 848) + chr(51), 59087 - 59079), nzTpIcepk0o8(chr(0b110 + 0o52) + '\x6f' + '\065' + '\060', 0o10), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(5928 - 5817) + '\x32' + chr(53), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x32' + chr(49) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(1778 - 1730) + chr(0b1100 + 0o143) + chr(0b110011) + '\066' + chr(0b1001 + 0o52), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1001100 + 0o43) + chr(513 - 463) + chr(53) + chr(55), 0b1000), nzTpIcepk0o8('\x30' + chr(741 - 630) + chr(1401 - 1351) + '\x31' + chr(0b110101), 31765 - 31757), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110 + 0o54) + chr(0b110100) + chr(1681 - 1633), 0b1000), nzTpIcepk0o8('\x30' + chr(0b11 + 0o154) + chr(49) + chr(55) + '\x34', 0o10), nzTpIcepk0o8('\060' + chr(0b1011010 + 0o25) + chr(50) + chr(2030 - 1978) + chr(811 - 758), 0o10), nzTpIcepk0o8('\060' + chr(6456 - 6345) + '\x31' + '\x35' + chr(0b11100 + 0o27), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(1570 - 1522) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(437 - 389) + chr(11367 - 11256) + chr(0b0 + 0o63) + '\062' + chr(53), 63076 - 63068), nzTpIcepk0o8(chr(1313 - 1265) + '\157' + chr(0b111 + 0o52), 0o10), nzTpIcepk0o8(chr(1392 - 1344) + chr(111) + chr(1157 - 1108) + '\x37' + chr(0b11001 + 0o32), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(155 - 104) + chr(49), 0b1000), nzTpIcepk0o8(chr(109 - 61) + chr(0b1101111) + '\064' + '\060', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + '\060' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(48) + chr(0b10101 + 0o132) + '\x32' + '\065' + chr(1942 - 1890), 0o10), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(557 - 446) + chr(1721 - 1670) + chr(0b101 + 0o62) + chr(403 - 348), 18753 - 18745), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(0b110111) + chr(53), 0o10), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1101111) + chr(0b110011) + chr(0b101101 + 0o4) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(9946 - 9835) + chr(0b110011) + '\063' + chr(587 - 539), 3917 - 3909), nzTpIcepk0o8(chr(119 - 71) + chr(111) + '\x32' + '\066' + chr(0b110001 + 0o6), 0o10), nzTpIcepk0o8(chr(2216 - 2168) + chr(111) + '\x31' + '\061' + chr(0b101001 + 0o12), 39856 - 39848), nzTpIcepk0o8(chr(1366 - 1318) + chr(111) + chr(0b101110 + 0o3) + '\063' + chr(2707 - 2652), 0b1000), nzTpIcepk0o8('\060' + chr(0b1011001 + 0o26) + chr(0b110001) + chr(48) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(1838 - 1790) + chr(444 - 333) + chr(0b110 + 0o53) + chr(54) + chr(744 - 696), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1100011 + 0o14) + '\061' + chr(55) + chr(744 - 695), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(0b110010) + chr(0b110100), 15917 - 15909), nzTpIcepk0o8(chr(0b110000) + chr(6332 - 6221) + chr(0b110011) + chr(1275 - 1221) + chr(1112 - 1063), 50306 - 50298), nzTpIcepk0o8(chr(1813 - 1765) + chr(10303 - 10192) + '\062' + chr(300 - 250) + chr(0b110101), 3589 - 3581), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b1101 + 0o45) + chr(0b110000) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + chr(0b110000) + chr(51), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(672 - 622) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\157' + chr(0b110010) + chr(54) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b1011 + 0o46) + chr(76 - 27) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\157' + chr(192 - 142) + chr(0b110101) + '\067', 8), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b1101111) + chr(49) + '\x32' + chr(294 - 246), 18039 - 18031)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b1110 + 0o141) + chr(0b110101) + '\x30', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x88'), chr(0b1100100) + '\x65' + '\143' + chr(111) + chr(0b1100100) + chr(0b1100101))('\165' + '\164' + '\146' + '\x2d' + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def FpF1csVYl3Bh(dYJbBiYO_nGE=nzTpIcepk0o8(chr(653 - 605) + chr(0b110110 + 0o71) + chr(49), 8)):
PvvMx4JvMX6J = [roI3spqORKae(ES5oEprVxulp(b'\xc8\xf4Lp\xeb\x96\xc9\xb3\xce\x1d\xc8\x0e\xa0\x83@)\x1ah\x02\xfe\xd3\xdd\xa4\xb9\xd5.3e&8\x86\xb2\xdd\xc7\x11:\x91!\xc6$\xd5\xbba[\xdb\xb6\xe8\xc8\xf2P\x85'), chr(5668 - 5568) + '\145' + '\x63' + '\x6f' + '\144' + '\145')(chr(5221 - 5104) + chr(116) + chr(0b11000 + 0o116) + chr(0b11110 + 0o17) + '\x38') + roI3spqORKae(ES5oEprVxulp(b'\xc5\xfaDy\xfc\xac\xc9\xff\xc1\x1f\x85/\xcf\x80C7\x1c\x0cc\xd8\x90\x89\xa9\xb4\xe8?6(\x15&\xb2\x83\xf4\xe5cR\xfe\x1c\xed\x1c\xe3\xb7\x08'), chr(0b1011010 + 0o12) + '\145' + chr(0b1100011) + chr(0b111000 + 0o67) + '\x64' + '\x65')(chr(0b1110101) + chr(6732 - 6616) + '\146' + chr(0b10100 + 0o31) + chr(0b111000)) + roI3spqORKae(ES5oEprVxulp(b'\xd2\xf4\\t\xe3\xac\xdb\xe4\xcd\x19\x85/\xcf\x80C7\x1c\x0cc\xcf\x90\x91\xa7\xaa\x97\x1d\x1e\x1731\x95\xa3\xb9\xa64\x7f\xd5=\xc7p\xe2\xd4}W\xc3\xb6'), chr(100) + chr(101) + '\x63' + chr(3452 - 3341) + chr(100) + '\145')(chr(117) + chr(0b110 + 0o156) + chr(10244 - 10142) + chr(45) + chr(0b111000))]
for (h0klhChk4Vv6, to9O9BnKueDH) in roI3spqORKae(U8ObleS5Ihkc, roI3spqORKae(ES5oEprVxulp(b'\xff\xc4F[\xca\x89\xe7\xb9\x93\n\xfd\x02'), '\x64' + chr(1223 - 1122) + '\143' + '\157' + '\144' + chr(7600 - 7499))(chr(2561 - 2444) + '\164' + chr(9493 - 9391) + chr(1178 - 1133) + '\070'))():
(bZRk6FPeVnqz, o4PMDJyUfl5b, bhaD65NqbmlS) = kymyFrGqYa2K(h0klhChk4Vv6, to9O9BnKueDH)
hRTUxJgvuslu = tlZFbd_9MN8s[roI3spqORKae(ES5oEprVxulp(b'\xc8\xf4Lp\xd0\x90\xc0\xe1\xcf\t\xd7'), '\144' + chr(101) + chr(0b100010 + 0o101) + chr(3881 - 3770) + chr(0b1100010 + 0o2) + chr(0b1100101))(chr(117) + chr(9820 - 9704) + '\x66' + chr(670 - 625) + chr(56))](bZRk6FPeVnqz, o4PMDJyUfl5b)
s93qyRHd7l1y = roI3spqORKae(ES5oEprVxulp(b'\x8a'), '\144' + chr(101) + '\143' + chr(111) + '\x64' + '\145')('\x75' + chr(0b1110100) + '\146' + '\x2d' + chr(806 - 750)).Y4yM9BcfTCNq([N9zlRy29S1SS(sOS7b2Ofrbne(jLW6pRf2DSRk(teUmM7cKWZUa) * nzTpIcepk0o8('\x30' + chr(9539 - 9428) + chr(0b1011 + 0o50) + '\x37' + chr(0b110111), 8))) for teUmM7cKWZUa in hRTUxJgvuslu.LfRrQOxuDvnC()])
roI3spqORKae(PvvMx4JvMX6J, roI3spqORKae(ES5oEprVxulp(b'\xee\xcf{!\xf7\x94\xe8\xe2\xca\x13\xf0^'), '\144' + '\x65' + chr(0b1100011) + chr(0b1101011 + 0o4) + chr(0b1100100) + '\x65')('\x75' + '\164' + chr(3752 - 3650) + chr(0b1000 + 0o45) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\x83\xe8\x040\xfc\xdf\x8a\xfe\x8cY\xd6G\xa5\xa6-^*\x0cd\x89\x8c\xda\xe4\xfd\xc4'), '\144' + chr(101) + chr(0b1100011) + chr(0b1000001 + 0o56) + chr(100) + chr(1790 - 1689))(chr(7407 - 7290) + chr(6370 - 6254) + chr(0b1010110 + 0o20) + chr(45) + chr(1145 - 1089)) % (h0klhChk4Vv6, h0klhChk4Vv6, to9O9BnKueDH, bZRk6FPeVnqz, o4PMDJyUfl5b, bhaD65NqbmlS, s93qyRHd7l1y, roI3spqORKae(aQg01EfWg1cd, roI3spqORKae(ES5oEprVxulp(b'\xca\xf6AR\xe5\xc4\xfb\xe2\xce&\xc2='), chr(6432 - 6332) + '\x65' + '\143' + chr(0b100011 + 0o114) + chr(0b1001111 + 0o25) + chr(0b10010 + 0o123))(chr(0b1110101) + chr(116) + '\146' + chr(45) + chr(0b100000 + 0o30)))(to9O9BnKueDH * nzTpIcepk0o8(chr(48) + '\157' + chr(49) + chr(0b101101 + 0o5), 0b1000))))
roI3spqORKae(PvvMx4JvMX6J, roI3spqORKae(ES5oEprVxulp(b'\xee\xcf{!\xf7\x94\xe8\xe2\xca\x13\xf0^'), chr(100) + chr(6198 - 6097) + chr(533 - 434) + '\157' + '\144' + chr(0b101001 + 0o74))(chr(623 - 506) + '\164' + '\x66' + chr(1426 - 1381) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'\xc3\xffOp\xeb\x96\xc9\xb3\xce\x13\xc1\x0e\xb1\xf5W:\x0bc\x0b\xed\xad\xd1\xe8\xb6\xd8/:wP/\x95\xa3\xd6\xce\x02D\x9di\xcc?\xca\xf4Z5\xd9\xb2\xfd\xce\xe8=\xf7'), '\144' + chr(0b100000 + 0o105) + '\x63' + chr(9500 - 9389) + chr(100) + chr(0b1100101))('\165' + chr(0b1001100 + 0o50) + chr(3910 - 3808) + chr(0b1000 + 0o45) + chr(56)))
for (huypbb9Z5uHs, pv33RxsPB1_O) in roI3spqORKae(nzTo5WhH84Ef, roI3spqORKae(ES5oEprVxulp(b'\xff\xc4F[\xca\x89\xe7\xb9\x93\n\xfd\x02'), '\144' + chr(0b1100101 + 0o0) + '\143' + '\x6f' + chr(0b10 + 0o142) + chr(1474 - 1373))(chr(0b1110101) + chr(0b1110100) + chr(9184 - 9082) + '\x2d' + chr(0b1100 + 0o54)))():
if huypbb9Z5uHs == roI3spqORKae(ES5oEprVxulp(b''), chr(0b10010 + 0o122) + '\x65' + chr(99) + chr(7882 - 7771) + chr(6672 - 6572) + '\x65')('\165' + chr(0b1110100) + chr(5600 - 5498) + chr(0b1101 + 0o40) + chr(0b111000)):
continue
for (R4glgq3oDJqk, oipAcGdaSj73) in roI3spqORKae(pv33RxsPB1_O, roI3spqORKae(ES5oEprVxulp(b'\xff\xc4F[\xca\x89\xe7\xb9\x93\n\xfd\x02'), chr(328 - 228) + '\x65' + chr(3263 - 3164) + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(117) + '\164' + '\146' + chr(45) + chr(0b111000)))():
(bZRk6FPeVnqz, o4PMDJyUfl5b, bhaD65NqbmlS) = kymyFrGqYa2K(R4glgq3oDJqk, oipAcGdaSj73)
hRTUxJgvuslu = tlZFbd_9MN8s[roI3spqORKae(ES5oEprVxulp(b'\xc3\xffOp\xd0\x90\xc0\xe1\xcf\t\xd7'), '\x64' + chr(1788 - 1687) + '\x63' + chr(0b1101000 + 0o7) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(0b1101110 + 0o6) + chr(0b110001 + 0o65) + chr(45) + chr(0b1011 + 0o55))](bZRk6FPeVnqz, o4PMDJyUfl5b)
s93qyRHd7l1y = roI3spqORKae(ES5oEprVxulp(b'\x8a'), chr(0b1010100 + 0o20) + chr(0b1100101) + '\143' + '\157' + '\144' + chr(101))(chr(0b10111 + 0o136) + chr(0b1110100) + chr(102) + '\x2d' + chr(56)).Y4yM9BcfTCNq([N9zlRy29S1SS(sOS7b2Ofrbne(jLW6pRf2DSRk(teUmM7cKWZUa) * nzTpIcepk0o8('\x30' + chr(2190 - 2079) + '\x33' + chr(0b110111) + chr(55), 8))) for teUmM7cKWZUa in hRTUxJgvuslu.LfRrQOxuDvnC()])
roI3spqORKae(PvvMx4JvMX6J, roI3spqORKae(ES5oEprVxulp(b'\xee\xcf{!\xf7\x94\xe8\xe2\xca\x13\xf0^'), '\144' + '\145' + chr(99) + chr(4048 - 3937) + '\x64' + chr(6386 - 6285))('\165' + '\x74' + chr(6944 - 6842) + chr(1574 - 1529) + chr(0b111000 + 0o0)))(roI3spqORKae(ES5oEprVxulp(b'\x83\xe8\x040\xfc\xdf\x88\xa8\xd3['), chr(100) + chr(0b1100101) + chr(99) + chr(0b10110 + 0o131) + chr(0b111010 + 0o52) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(2366 - 2264) + chr(0b101010 + 0o3) + '\070') % (huypbb9Z5uHs, R4glgq3oDJqk, s93qyRHd7l1y))
PvvMx4JvMX6J = roI3spqORKae(ES5oEprVxulp(b'\xac'), chr(0b1100100) + chr(101) + '\x63' + '\157' + chr(100) + '\x65')('\x75' + chr(740 - 624) + chr(0b1100110) + '\055' + chr(0b111000)).Y4yM9BcfTCNq(PvvMx4JvMX6J)
return PvvMx4JvMX6J
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/pycallgraph.py
|
make_dot_graph
|
def make_dot_graph(filename, format='png', tool='dot', stop=True):
"""Creates a graph using a Graphviz tool that supports the dot language. It
will output into a file specified by filename with the format specified.
Setting stop to True will stop the current trace.
"""
if stop:
stop_trace()
dot_data = get_dot()
# normalize filename
regex_user_expand = re.compile('\A~')
if regex_user_expand.match(filename):
filename = os.path.expanduser(filename)
else:
filename = os.path.expandvars(filename) # expand, just in case
if format == 'dot':
f = open(filename, 'w')
f.write(dot_data)
f.close()
else:
# create a temporary file to be used for the dot data
fd, tempname = tempfile.mkstemp()
with os.fdopen(fd, 'w') as f:
f.write(dot_data)
cmd = '%(tool)s -T%(format)s -o%(filename)s %(tempname)s' % locals()
try:
ret = os.system(cmd)
if ret:
raise PyCallGraphException( \
'The command "%(cmd)s" failed with error ' \
'code %(ret)i.' % locals())
finally:
os.unlink(tempname)
|
python
|
def make_dot_graph(filename, format='png', tool='dot', stop=True):
"""Creates a graph using a Graphviz tool that supports the dot language. It
will output into a file specified by filename with the format specified.
Setting stop to True will stop the current trace.
"""
if stop:
stop_trace()
dot_data = get_dot()
# normalize filename
regex_user_expand = re.compile('\A~')
if regex_user_expand.match(filename):
filename = os.path.expanduser(filename)
else:
filename = os.path.expandvars(filename) # expand, just in case
if format == 'dot':
f = open(filename, 'w')
f.write(dot_data)
f.close()
else:
# create a temporary file to be used for the dot data
fd, tempname = tempfile.mkstemp()
with os.fdopen(fd, 'w') as f:
f.write(dot_data)
cmd = '%(tool)s -T%(format)s -o%(filename)s %(tempname)s' % locals()
try:
ret = os.system(cmd)
if ret:
raise PyCallGraphException( \
'The command "%(cmd)s" failed with error ' \
'code %(ret)i.' % locals())
finally:
os.unlink(tempname)
|
[
"def",
"make_dot_graph",
"(",
"filename",
",",
"format",
"=",
"'png'",
",",
"tool",
"=",
"'dot'",
",",
"stop",
"=",
"True",
")",
":",
"if",
"stop",
":",
"stop_trace",
"(",
")",
"dot_data",
"=",
"get_dot",
"(",
")",
"# normalize filename",
"regex_user_expand",
"=",
"re",
".",
"compile",
"(",
"'\\A~'",
")",
"if",
"regex_user_expand",
".",
"match",
"(",
"filename",
")",
":",
"filename",
"=",
"os",
".",
"path",
".",
"expanduser",
"(",
"filename",
")",
"else",
":",
"filename",
"=",
"os",
".",
"path",
".",
"expandvars",
"(",
"filename",
")",
"# expand, just in case",
"if",
"format",
"==",
"'dot'",
":",
"f",
"=",
"open",
"(",
"filename",
",",
"'w'",
")",
"f",
".",
"write",
"(",
"dot_data",
")",
"f",
".",
"close",
"(",
")",
"else",
":",
"# create a temporary file to be used for the dot data",
"fd",
",",
"tempname",
"=",
"tempfile",
".",
"mkstemp",
"(",
")",
"with",
"os",
".",
"fdopen",
"(",
"fd",
",",
"'w'",
")",
"as",
"f",
":",
"f",
".",
"write",
"(",
"dot_data",
")",
"cmd",
"=",
"'%(tool)s -T%(format)s -o%(filename)s %(tempname)s'",
"%",
"locals",
"(",
")",
"try",
":",
"ret",
"=",
"os",
".",
"system",
"(",
"cmd",
")",
"if",
"ret",
":",
"raise",
"PyCallGraphException",
"(",
"'The command \"%(cmd)s\" failed with error '",
"'code %(ret)i.'",
"%",
"locals",
"(",
")",
")",
"finally",
":",
"os",
".",
"unlink",
"(",
"tempname",
")"
] |
Creates a graph using a Graphviz tool that supports the dot language. It
will output into a file specified by filename with the format specified.
Setting stop to True will stop the current trace.
|
[
"Creates",
"a",
"graph",
"using",
"a",
"Graphviz",
"tool",
"that",
"supports",
"the",
"dot",
"language",
".",
"It",
"will",
"output",
"into",
"a",
"file",
"specified",
"by",
"filename",
"with",
"the",
"format",
"specified",
".",
"Setting",
"stop",
"to",
"True",
"will",
"stop",
"the",
"current",
"trace",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pycallgraph.py#L416-L452
|
train
|
Creates a graph from the dot language file specified by filename.
|
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,VwkB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PT,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(111) + chr(50) + chr(0b110111) + '\067', 0o10), nzTpIcepk0o8(chr(1344 - 1296) + chr(9324 - 9213) + '\061' + chr(50) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10111 + 0o33) + '\065', 0o10), nzTpIcepk0o8('\060' + '\157' + chr(367 - 318) + chr(49) + '\x32', 0b1000), nzTpIcepk0o8(chr(478 - 430) + '\157' + '\063' + '\065' + chr(200 - 152), 34403 - 34395), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b1101111) + chr(49) + chr(1300 - 1245) + chr(0b110011), 19125 - 19117), nzTpIcepk0o8('\x30' + '\157' + '\x33' + '\062' + chr(2101 - 2047), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x34' + chr(0b100101 + 0o20), ord("\x08")), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + '\x32' + '\065' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(7276 - 7165) + chr(2317 - 2268) + chr(0b0 + 0o66) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(401 - 350) + chr(50) + chr(0b1010 + 0o52), 60720 - 60712), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110000 + 0o3) + '\067' + '\x37', 12123 - 12115), nzTpIcepk0o8('\060' + chr(0b101000 + 0o107) + '\061' + chr(104 - 51) + chr(1288 - 1240), 48195 - 48187), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1101 + 0o142) + chr(0b110001) + chr(2490 - 2437) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\063' + chr(2199 - 2149) + chr(53), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b10101 + 0o34) + '\060' + chr(199 - 151), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + '\x33' + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(304 - 256) + '\x6f' + chr(0b10110 + 0o35) + chr(0b110110) + '\x35', 15688 - 15680), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(0b10111 + 0o40), 0o10), nzTpIcepk0o8(chr(56 - 8) + '\x6f' + '\061' + '\x35' + '\x30', 8), nzTpIcepk0o8(chr(461 - 413) + '\x6f' + chr(1617 - 1567) + chr(0b110001 + 0o3) + chr(0b1011 + 0o52), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b101000 + 0o11) + '\x34' + chr(847 - 796), 7015 - 7007), nzTpIcepk0o8(chr(748 - 700) + chr(0b1011010 + 0o25) + '\062' + chr(0b10100 + 0o42) + '\066', 0o10), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1000 + 0o147) + '\x31' + chr(50) + '\061', 44908 - 44900), nzTpIcepk0o8('\060' + chr(111) + chr(2608 - 2556), 37322 - 37314), nzTpIcepk0o8('\x30' + chr(111) + '\x34' + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1271 - 1222) + chr(48) + chr(0b11111 + 0o23), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\x33' + '\067' + chr(0b101011 + 0o10), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + chr(55) + chr(0b11110 + 0o23), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(0b110101) + '\x35', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1010000 + 0o37) + chr(2027 - 1977) + '\066' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\157' + chr(51) + chr(1612 - 1562) + '\060', 64570 - 64562), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1101111) + '\061' + chr(49) + chr(1463 - 1411), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(0b110110) + '\064', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b1101 + 0o51) + '\060', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + '\063' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11111 + 0o24) + '\x34' + chr(51), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1497 - 1446) + chr(0b110001) + chr(0b110010), 44873 - 44865), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(2214 - 2164) + chr(1092 - 1039) + chr(2507 - 2455), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(2282 - 2231) + '\062' + chr(54), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\157' + '\065' + chr(48), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x91'), '\x64' + chr(0b1100101) + '\x63' + chr(0b10101 + 0o132) + chr(100) + chr(2922 - 2821))(chr(0b1110100 + 0o1) + chr(5807 - 5691) + chr(0b1100110) + chr(1206 - 1161) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def N2rCoG8TCFL0(FxZHtXEolYsL, q33KG3foQ_CJ=roI3spqORKae(ES5oEprVxulp(b'\xcf=r'), '\x64' + '\x65' + '\x63' + '\x6f' + chr(0b1100100) + chr(0b111000 + 0o55))(chr(0b1110101) + '\x74' + chr(0b1010111 + 0o17) + chr(45) + '\x38'), jylN_3bCrF75=roI3spqORKae(ES5oEprVxulp(b'\xdb<a'), '\x64' + chr(6344 - 6243) + chr(0b1100011) + '\157' + chr(0b1011101 + 0o7) + chr(101))(chr(12879 - 12762) + chr(116) + chr(1482 - 1380) + chr(0b110 + 0o47) + '\070'), dYJbBiYO_nGE=nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(111) + chr(0b110001), ord("\x08"))):
if dYJbBiYO_nGE:
ZpyGmy1MW6v5()
I1CUa_ZbmEjT = _BGwilzYUIYs()
GlQ3ggFfIizy = aoTc4YA2bs2R.compile(roI3spqORKae(ES5oEprVxulp(b'\xe3\x12k'), chr(0b11001 + 0o113) + chr(101) + chr(0b1100011) + chr(4556 - 4445) + chr(0b1100100) + chr(101))('\165' + chr(0b1110100) + '\x66' + '\x2d' + chr(0b100000 + 0o30)))
if roI3spqORKae(GlQ3ggFfIizy, roI3spqORKae(ES5oEprVxulp(b'\xd78,\x05\x81\x11\xbbL\xe8)\xae\xbe'), '\144' + chr(101) + chr(0b11100 + 0o107) + '\157' + chr(0b1100100) + chr(0b1100101))(chr(441 - 324) + '\164' + '\146' + '\055' + chr(155 - 99)))(FxZHtXEolYsL):
FxZHtXEolYsL = aHUqKstZLeS6.path.expanduser(FxZHtXEolYsL)
else:
FxZHtXEolYsL = aHUqKstZLeS6.path.expandvars(FxZHtXEolYsL)
if q33KG3foQ_CJ == roI3spqORKae(ES5oEprVxulp(b'\xdb<a'), '\144' + '\145' + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(0b1110101) + chr(9098 - 8982) + '\x66' + chr(0b101101 + 0o0) + '\070'):
_R8IKF5IwAfX = DnU3Rq9N5ala(FxZHtXEolYsL, roI3spqORKae(ES5oEprVxulp(b'\xc8'), chr(0b101000 + 0o74) + chr(6143 - 6042) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(0b1100101))('\165' + chr(0b1110100) + chr(0b1001011 + 0o33) + chr(0b100000 + 0o15) + chr(56)))
roI3spqORKae(_R8IKF5IwAfX, roI3spqORKae(ES5oEprVxulp(b'\xd2?%"\x80\x0b\xa0\x14\xe7\x06\xa5\xcd'), '\x64' + '\145' + chr(99) + chr(0b1000001 + 0o56) + chr(0b1100100) + chr(0b111101 + 0o50))(chr(13347 - 13230) + chr(2864 - 2748) + chr(1971 - 1869) + '\x2d' + chr(1667 - 1611)))(I1CUa_ZbmEjT)
roI3spqORKae(_R8IKF5IwAfX, roI3spqORKae(ES5oEprVxulp(b'\xe56d}\xab\x18\xb0\x1c\xfe\x12\xec\x95'), chr(0b111001 + 0o53) + '\x65' + chr(0b1100011) + chr(10798 - 10687) + chr(0b1001000 + 0o34) + chr(101))(chr(0b111 + 0o156) + chr(0b1110100) + '\146' + chr(0b11111 + 0o16) + chr(56)))()
else:
(RW6jRKOlF6C5, BxP6bQF4hpny) = VfV2QW3Td2UZ.mkstemp()
with roI3spqORKae(aHUqKstZLeS6, roI3spqORKae(ES5oEprVxulp(b'\xd97z:\x8d\x15'), chr(0b1100100) + chr(9597 - 9496) + chr(99) + chr(0b101000 + 0o107) + chr(100) + chr(3265 - 3164))(chr(117) + chr(0b1110100) + chr(0b1100110) + chr(1518 - 1473) + chr(56)))(RW6jRKOlF6C5, roI3spqORKae(ES5oEprVxulp(b'\xc8'), chr(0b1100100) + chr(101) + chr(0b1100011) + '\157' + chr(0b1000101 + 0o37) + chr(0b11011 + 0o112))(chr(6649 - 6532) + chr(116) + chr(9115 - 9013) + chr(45) + chr(0b100111 + 0o21))) as _R8IKF5IwAfX:
roI3spqORKae(_R8IKF5IwAfX, roI3spqORKae(ES5oEprVxulp(b'\xd2?%"\x80\x0b\xa0\x14\xe7\x06\xa5\xcd'), '\x64' + chr(0b100001 + 0o104) + chr(99) + '\x6f' + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(3226 - 3110) + '\146' + chr(45) + chr(0b1010 + 0o56)))(I1CUa_ZbmEjT)
mD44XHfr1PSC = roI3spqORKae(ES5oEprVxulp(b'\x9a{a%\x87\x17\xffV\x8b[\x80\xda@\x0f\xba2\xf1\x94{A\xd6C\x9b>!\x0f$\x92\xd5\x08\xdd\xb1!\x91\x19\xa8\xc3\xef\x84\xa2\xda>e$\x89\x16\xb3\x0c\xd8'), chr(0b1100100) + '\145' + chr(1167 - 1068) + chr(4148 - 4037) + '\144' + '\145')(chr(0b1100111 + 0o16) + chr(0b101111 + 0o105) + chr(0b1100110) + chr(1299 - 1254) + chr(56)) % y0cCpS6dh4OT()
try:
PvvMx4JvMX6J = aHUqKstZLeS6.system(mD44XHfr1PSC)
if PvvMx4JvMX6J:
raise j7tJZumc7JFY(roI3spqORKae(ES5oEprVxulp(b"\xeb;pj\x8b\x14\xbbH\xca\x18\xb0\xdfJL\xfd#\xf1\x91&\x1b\x87C\xd00mK'\x9f\x99\x1a\xda\xa4$\xd4U\xa9\x91\xa5\xde\xf6\xdc<q/\xc8^\xfeW\xce\x02\xfd\x96F"), chr(100) + chr(0b10010 + 0o123) + chr(7060 - 6961) + chr(111) + '\144' + chr(6759 - 6658))(chr(0b1110101) + chr(0b1110100) + chr(0b110100 + 0o62) + '\055' + chr(2177 - 2121)) % y0cCpS6dh4OT())
finally:
roI3spqORKae(aHUqKstZLeS6, roI3spqORKae(ES5oEprVxulp(b'\xca=y#\x86\x10'), chr(100) + '\145' + chr(9561 - 9462) + chr(111) + '\144' + '\x65')('\x75' + chr(116) + chr(102) + chr(45) + '\x38'))(BxP6bQF4hpny)
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/pycallgraph.py
|
make_gdf_graph
|
def make_gdf_graph(filename, stop=True):
"""Create a graph in simple GDF format, suitable for feeding into Gephi,
or some other graph manipulation and display tool. Setting stop to True
will stop the current trace.
"""
if stop:
stop_trace()
try:
f = open(filename, 'w')
f.write(get_gdf())
finally:
if f: f.close()
|
python
|
def make_gdf_graph(filename, stop=True):
"""Create a graph in simple GDF format, suitable for feeding into Gephi,
or some other graph manipulation and display tool. Setting stop to True
will stop the current trace.
"""
if stop:
stop_trace()
try:
f = open(filename, 'w')
f.write(get_gdf())
finally:
if f: f.close()
|
[
"def",
"make_gdf_graph",
"(",
"filename",
",",
"stop",
"=",
"True",
")",
":",
"if",
"stop",
":",
"stop_trace",
"(",
")",
"try",
":",
"f",
"=",
"open",
"(",
"filename",
",",
"'w'",
")",
"f",
".",
"write",
"(",
"get_gdf",
"(",
")",
")",
"finally",
":",
"if",
"f",
":",
"f",
".",
"close",
"(",
")"
] |
Create a graph in simple GDF format, suitable for feeding into Gephi,
or some other graph manipulation and display tool. Setting stop to True
will stop the current trace.
|
[
"Create",
"a",
"graph",
"in",
"simple",
"GDF",
"format",
"suitable",
"for",
"feeding",
"into",
"Gephi",
"or",
"some",
"other",
"graph",
"manipulation",
"and",
"display",
"tool",
".",
"Setting",
"stop",
"to",
"True",
"will",
"stop",
"the",
"current",
"trace",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pycallgraph.py#L455-L467
|
train
|
Create a graph in simple GDF format suitable for feeding into Gephi
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3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,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('\x30' + chr(0b1101111) + chr(50) + '\066' + chr(0b110101), 56526 - 56518), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1350 - 1299) + chr(0b110100) + '\x37', 35668 - 35660), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1011000 + 0o27) + chr(0b110011) + '\065' + chr(0b100111 + 0o14), 0b1000), nzTpIcepk0o8(chr(1243 - 1195) + chr(3131 - 3020) + chr(0b10111 + 0o33) + '\066' + '\x31', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(55) + chr(0b110110), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + chr(1852 - 1802) + '\x31', 0o10), nzTpIcepk0o8(chr(1142 - 1094) + chr(0b1101111) + chr(50) + chr(0b101011 + 0o6) + '\x32', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b11111 + 0o23) + chr(55) + '\x33', 17306 - 17298), nzTpIcepk0o8('\060' + '\x6f' + chr(125 - 75) + '\067' + chr(0b110111), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + chr(2539 - 2484) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2178 - 2128) + '\x35' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(1476 - 1428) + chr(0b1101111) + '\062' + chr(0b110000) + chr(54), 38609 - 38601), nzTpIcepk0o8('\060' + chr(111) + chr(0b10 + 0o60) + '\x32' + '\x33', 1808 - 1800), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1923 - 1872) + '\064' + chr(54), 12972 - 12964), nzTpIcepk0o8('\x30' + '\157' + chr(904 - 854) + chr(0b11110 + 0o31) + chr(49), 0b1000), nzTpIcepk0o8(chr(2056 - 2008) + chr(1330 - 1219) + chr(0b110010) + chr(0b110001) + chr(1052 - 1004), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(0b110101) + chr(1428 - 1373), 0o10), nzTpIcepk0o8(chr(0b1110 + 0o42) + '\x6f' + '\x33' + chr(50) + '\062', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\061' + chr(0b110110) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(984 - 934) + '\x30' + chr(0b1000 + 0o57), 20180 - 20172), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b100 + 0o56) + '\061' + '\x32', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + chr(0b110111), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b1101 + 0o46) + '\067' + chr(0b110010 + 0o0), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1085 - 1034) + chr(55) + chr(50), 8), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(6455 - 6344) + '\x32' + chr(2436 - 2381) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2423 - 2373) + chr(54) + chr(1426 - 1376), 0o10), nzTpIcepk0o8('\060' + chr(1844 - 1733) + '\x31' + chr(48) + '\x33', 0o10), nzTpIcepk0o8('\x30' + chr(0b1100110 + 0o11) + '\x31' + '\x36' + chr(0b110100), 48903 - 48895), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1100111 + 0o10) + chr(0b101011 + 0o7) + '\x30' + '\x31', 0b1000), nzTpIcepk0o8(chr(1339 - 1291) + '\x6f' + '\x33' + '\x34' + chr(0b10011 + 0o42), ord("\x08")), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\x6f' + chr(0b11100 + 0o26) + chr(307 - 259) + chr(0b1111 + 0o42), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + '\060' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + chr(365 - 311) + '\067', 64253 - 64245), nzTpIcepk0o8('\x30' + chr(0b111001 + 0o66) + '\063' + '\x31' + chr(2535 - 2480), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(2065 - 2014) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(2107 - 2059) + chr(0b1101111 + 0o0) + '\x33' + chr(1676 - 1621) + chr(48), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x32' + chr(50) + chr(0b101101 + 0o10), 36109 - 36101), nzTpIcepk0o8('\x30' + chr(0b11010 + 0o125) + '\063' + '\062' + '\x31', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1010011 + 0o34) + chr(51) + chr(0b110100) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(111) + chr(0b110010) + chr(51) + chr(0b100110 + 0o15), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\157' + '\x35' + '\x30', 44940 - 44932)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x9b'), chr(100) + chr(101) + chr(9534 - 9435) + '\157' + chr(0b111010 + 0o52) + '\145')('\x75' + '\x74' + chr(1196 - 1094) + '\x2d' + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def yOwsJjEHQonA(FxZHtXEolYsL, dYJbBiYO_nGE=nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b1101111) + '\061', 60494 - 60486)):
if dYJbBiYO_nGE:
ZpyGmy1MW6v5()
try:
_R8IKF5IwAfX = DnU3Rq9N5ala(FxZHtXEolYsL, roI3spqORKae(ES5oEprVxulp(b'\xc2'), '\144' + chr(101) + '\x63' + '\157' + '\144' + '\x65')('\x75' + '\164' + chr(0b1100110) + chr(0b11000 + 0o25) + chr(56)))
roI3spqORKae(_R8IKF5IwAfX, roI3spqORKae(ES5oEprVxulp(b'\xd8\x8b\xdb\xd9V\xe1\xfc\x8a\xf3\x8f\xdc\xb4'), chr(0b1100100) + chr(101) + chr(3546 - 3447) + chr(10275 - 10164) + chr(100) + '\x65')('\165' + '\x74' + chr(102) + '\x2d' + chr(2053 - 1997)))(FpF1csVYl3Bh())
finally:
if _R8IKF5IwAfX:
roI3spqORKae(_R8IKF5IwAfX, roI3spqORKae(ES5oEprVxulp(b'\xef\x82\x9a\x86}\xf2\xec\x82\xea\x9b\x95\xec'), chr(0b1100100) + '\x65' + chr(0b1011000 + 0o13) + '\157' + chr(0b1100100) + chr(0b1100101))('\165' + chr(116) + chr(0b1100110) + chr(189 - 144) + chr(0b111000)))()
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/pycallgraph.py
|
simple_memoize
|
def simple_memoize(callable_object):
"""Simple memoization for functions without keyword arguments.
This is useful for mapping code objects to module in this context.
inspect.getmodule() requires a number of system calls, which may slow down
the tracing considerably. Caching the mapping from code objects (there is
*one* code object for each function, regardless of how many simultaneous
activations records there are).
In this context we can ignore keyword arguments, but a generic memoizer
ought to take care of that as well.
"""
cache = dict()
def wrapper(*rest):
if rest not in cache:
cache[rest] = callable_object(*rest)
return cache[rest]
return wrapper
|
python
|
def simple_memoize(callable_object):
"""Simple memoization for functions without keyword arguments.
This is useful for mapping code objects to module in this context.
inspect.getmodule() requires a number of system calls, which may slow down
the tracing considerably. Caching the mapping from code objects (there is
*one* code object for each function, regardless of how many simultaneous
activations records there are).
In this context we can ignore keyword arguments, but a generic memoizer
ought to take care of that as well.
"""
cache = dict()
def wrapper(*rest):
if rest not in cache:
cache[rest] = callable_object(*rest)
return cache[rest]
return wrapper
|
[
"def",
"simple_memoize",
"(",
"callable_object",
")",
":",
"cache",
"=",
"dict",
"(",
")",
"def",
"wrapper",
"(",
"*",
"rest",
")",
":",
"if",
"rest",
"not",
"in",
"cache",
":",
"cache",
"[",
"rest",
"]",
"=",
"callable_object",
"(",
"*",
"rest",
")",
"return",
"cache",
"[",
"rest",
"]",
"return",
"wrapper"
] |
Simple memoization for functions without keyword arguments.
This is useful for mapping code objects to module in this context.
inspect.getmodule() requires a number of system calls, which may slow down
the tracing considerably. Caching the mapping from code objects (there is
*one* code object for each function, regardless of how many simultaneous
activations records there are).
In this context we can ignore keyword arguments, but a generic memoizer
ought to take care of that as well.
|
[
"Simple",
"memoization",
"for",
"functions",
"without",
"keyword",
"arguments",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/pycallgraph.py#L470-L490
|
train
|
Simple memoization for functions without keyword arguments.
|
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,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zviv,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' + '\062' + chr(0b110110) + chr(2940 - 2885), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + '\x31' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + chr(0b110001) + chr(53), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(0b110001 + 0o3) + '\x32', 51542 - 51534), nzTpIcepk0o8(chr(693 - 645) + '\x6f' + chr(0b110111) + chr(0b1111 + 0o43), 0b1000), nzTpIcepk0o8('\060' + chr(0b1000110 + 0o51) + chr(0b10001 + 0o41) + chr(52) + '\063', 0b1000), nzTpIcepk0o8('\x30' + chr(8894 - 8783) + chr(50) + chr(789 - 738) + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1032 - 978) + chr(51), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + chr(53), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\067', 65147 - 65139), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b0 + 0o62) + chr(2486 - 2433) + chr(1576 - 1523), 30106 - 30098), nzTpIcepk0o8(chr(48) + '\157' + chr(2288 - 2239) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\060' + chr(10198 - 10087) + '\063' + chr(51) + chr(0b10110 + 0o36), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b11010 + 0o31) + '\x30' + '\063', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(0b11100 + 0o24) + chr(0b100000 + 0o26), ord("\x08")), nzTpIcepk0o8(chr(965 - 917) + chr(7216 - 7105) + '\x33' + chr(0b110000) + chr(888 - 833), 0b1000), nzTpIcepk0o8(chr(1206 - 1158) + '\157' + chr(0b101000 + 0o13) + '\065' + chr(0b11010 + 0o30), 12713 - 12705), nzTpIcepk0o8(chr(933 - 885) + chr(0b1101111) + '\061' + chr(0b100 + 0o60) + '\062', 8), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b0 + 0o157) + '\x31' + chr(51) + chr(1104 - 1049), 31935 - 31927), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + chr(1115 - 1060) + chr(0b10 + 0o63), 0b1000), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\x6f' + chr(0b110011) + '\x36' + chr(54), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b100110 + 0o111) + '\x33' + chr(727 - 676) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(4506 - 4395) + chr(1325 - 1273), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(635 - 584) + '\065' + '\x31', 0o10), nzTpIcepk0o8(chr(48) + chr(10775 - 10664) + '\x33' + chr(0b110101) + '\x33', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + chr(0b11001 + 0o33) + chr(0b10111 + 0o40), 0o10), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(0b1000010 + 0o55) + chr(1705 - 1656) + chr(49) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(2260 - 2212) + '\157' + chr(1112 - 1063) + chr(0b110011) + chr(0b101011 + 0o11), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\066' + chr(0b10001 + 0o46), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b1 + 0o61) + chr(0b110010) + chr(0b110011), 0o10), nzTpIcepk0o8('\060' + chr(9630 - 9519) + chr(0b11010 + 0o30), 0b1000), nzTpIcepk0o8('\x30' + chr(212 - 101) + chr(49) + chr(0b110011) + chr(0b101010 + 0o11), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(3263 - 3152) + chr(51) + chr(0b100010 + 0o16) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(873 - 825) + '\x6f' + '\x33' + '\065' + chr(51), 8), nzTpIcepk0o8('\x30' + chr(0b10001 + 0o136) + chr(0b110011 + 0o1) + chr(962 - 913), 0b1000), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b1101111) + chr(0b101111 + 0o1), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(822 - 773) + chr(51) + chr(0b110 + 0o55), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110000 + 0o2) + chr(0b11111 + 0o21) + chr(48), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b100010 + 0o17) + chr(0b100111 + 0o14), 0o10), nzTpIcepk0o8('\x30' + chr(0b1011101 + 0o22) + chr(0b110 + 0o53) + chr(0b10000 + 0o44) + chr(1401 - 1350), 45715 - 45707)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1889 - 1841) + chr(0b1111 + 0o140) + chr(1008 - 955) + chr(48), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x99'), chr(100) + '\145' + '\x63' + '\157' + chr(9842 - 9742) + chr(0b100110 + 0o77))(chr(0b1100010 + 0o23) + chr(12822 - 12706) + chr(0b10 + 0o144) + '\x2d' + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def wnFjbPMgmmQA(Nrtbcl_fMNoX):
pnQ8kFTCTz91 = znjnJWK64FDT()
def uN64ftXQVLOv(*wHBb0QqTDuam):
if wHBb0QqTDuam not in pnQ8kFTCTz91:
pnQ8kFTCTz91[wHBb0QqTDuam] = Nrtbcl_fMNoX(*wHBb0QqTDuam)
return pnQ8kFTCTz91[wHBb0QqTDuam]
return uN64ftXQVLOv
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/runsnakerun/macshim.py
|
macshim
|
def macshim():
"""Shim to run 32-bit on 64-bit mac as a sub-process"""
import subprocess, sys
subprocess.call([
sys.argv[0] + '32'
]+sys.argv[1:],
env={"VERSIONER_PYTHON_PREFER_32_BIT":"yes"}
)
|
python
|
def macshim():
"""Shim to run 32-bit on 64-bit mac as a sub-process"""
import subprocess, sys
subprocess.call([
sys.argv[0] + '32'
]+sys.argv[1:],
env={"VERSIONER_PYTHON_PREFER_32_BIT":"yes"}
)
|
[
"def",
"macshim",
"(",
")",
":",
"import",
"subprocess",
",",
"sys",
"subprocess",
".",
"call",
"(",
"[",
"sys",
".",
"argv",
"[",
"0",
"]",
"+",
"'32'",
"]",
"+",
"sys",
".",
"argv",
"[",
"1",
":",
"]",
",",
"env",
"=",
"{",
"\"VERSIONER_PYTHON_PREFER_32_BIT\"",
":",
"\"yes\"",
"}",
")"
] |
Shim to run 32-bit on 64-bit mac as a sub-process
|
[
"Shim",
"to",
"run",
"32",
"-",
"bit",
"on",
"64",
"-",
"bit",
"mac",
"as",
"a",
"sub",
"-",
"process"
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/runsnakerun/macshim.py#L1-L8
|
train
|
Shim to run 32 - bit on 64 - bit mac as a sub - process
|
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(0b110000) + chr(4398 - 4287) + chr(0b110001) + chr(0b100011 + 0o20) + chr(0b1 + 0o65), 49684 - 49676), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x36' + '\x33', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b101100 + 0o12) + chr(0b100000 + 0o27), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b101101 + 0o6) + chr(0b100111 + 0o14), 0b1000), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(111) + '\061' + chr(48) + '\066', 16364 - 16356), nzTpIcepk0o8(chr(0b11 + 0o55) + '\157' + chr(0b100000 + 0o22), 9323 - 9315), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b100010 + 0o115) + chr(69 - 20) + '\065', 61604 - 61596), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(0b100111 + 0o20) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(1283 - 1172) + chr(50) + chr(0b110110), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(1272 - 1223) + chr(48) + '\065', 17112 - 17104), nzTpIcepk0o8(chr(423 - 375) + '\157' + chr(0b110100), 25953 - 25945), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b100000 + 0o117) + chr(0b110110 + 0o0) + chr(0b101 + 0o61), 0b1000), nzTpIcepk0o8(chr(1840 - 1792) + chr(111) + '\x32' + chr(0b1 + 0o61) + chr(504 - 449), 60243 - 60235), nzTpIcepk0o8('\060' + '\157' + '\064' + '\x34', 8881 - 8873), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + '\x33' + '\x33', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\061' + chr(0b101011 + 0o10) + '\062', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + '\064' + chr(0b101011 + 0o10), 0b1000), nzTpIcepk0o8(chr(670 - 622) + chr(8125 - 8014) + '\x31' + chr(1296 - 1248) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(851 - 740) + '\063' + '\x36' + chr(53), 0b1000), nzTpIcepk0o8(chr(2220 - 2172) + '\157' + chr(50) + chr(0b110101) + chr(471 - 417), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062', 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2183 - 2133) + chr(105 - 52) + chr(1115 - 1064), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1100111 + 0o10) + chr(49) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(0b11011 + 0o27) + '\064', 61942 - 61934), nzTpIcepk0o8('\x30' + '\x6f' + '\064' + '\060', 41146 - 41138), nzTpIcepk0o8(chr(602 - 554) + chr(111) + chr(0b110010) + chr(1359 - 1306) + chr(54), 8), nzTpIcepk0o8('\x30' + chr(6138 - 6027) + chr(1988 - 1937) + chr(48) + chr(50), 0b1000), nzTpIcepk0o8('\060' + chr(12171 - 12060) + chr(0b111 + 0o53) + '\063' + chr(2342 - 2293), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(1712 - 1661) + chr(0b1011 + 0o50), 8), nzTpIcepk0o8(chr(0b110000) + chr(6885 - 6774) + chr(50) + chr(0b110100) + chr(857 - 807), 0b1000), nzTpIcepk0o8('\060' + chr(2658 - 2547) + chr(49) + chr(0b10010 + 0o36) + chr(0b110100), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111 + 0o0) + chr(0b10 + 0o57) + chr(2174 - 2124) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(54) + chr(0b110010), 62899 - 62891), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2220 - 2170) + chr(0b11010 + 0o32), 18007 - 17999), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + chr(0b100000 + 0o20) + chr(0b110111), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + '\063' + '\063', 0b1000), nzTpIcepk0o8(chr(880 - 832) + '\x6f' + chr(886 - 837) + '\063' + chr(1035 - 985), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\065' + chr(0b110100), 37494 - 37486), nzTpIcepk0o8(chr(2170 - 2122) + chr(0b101100 + 0o103) + chr(0b10 + 0o57) + '\x30', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(2341 - 2292) + chr(54) + '\061', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(3453 - 3342) + chr(0b110100 + 0o1) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'p'), chr(0b100000 + 0o104) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(0b111101 + 0o47) + chr(0b1100101))(chr(0b1110101) + chr(0b1011111 + 0o25) + chr(9974 - 9872) + '\x2d' + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def FDAJg8C1CEtI():
(eT8Y087E_kfd,) = (zGgTE_CdZfvi(roI3spqORKae(ES5oEprVxulp(b'-FUk4mn\x1ae6'), '\x64' + '\145' + '\x63' + chr(0b1100010 + 0o15) + '\144' + chr(101))('\165' + chr(0b1110100) + chr(102) + chr(0b11001 + 0o24) + chr(56))),)
(bpyfpu4kTbwL,) = (zGgTE_CdZfvi(roI3spqORKae(ES5oEprVxulp(b'-JD'), chr(0b1000110 + 0o36) + chr(2462 - 2361) + chr(0b1000 + 0o133) + '\157' + chr(0b1100100) + '\145')(chr(117) + chr(0b1110100) + chr(0b1011100 + 0o12) + chr(45) + chr(2189 - 2133))),)
roI3spqORKae(eT8Y087E_kfd, roI3spqORKae(ES5oEprVxulp(b'=\x04\x01B 6=. \x08a{'), '\x64' + '\145' + '\143' + '\157' + '\x64' + chr(0b1100101))('\165' + chr(116) + chr(0b1100110) + chr(0b1000 + 0o45) + '\x38'))([roI3spqORKae(bpyfpu4kTbwL, roI3spqORKae(ES5oEprVxulp(b'?Y~_\x11{U2T$7T'), chr(0b1100100) + chr(0b1100101) + chr(5928 - 5829) + chr(111) + chr(1025 - 925) + chr(101))('\x75' + chr(0b1110100) + chr(10301 - 10199) + chr(0b101101) + chr(847 - 791)))[nzTpIcepk0o8('\x30' + chr(0b10110 + 0o131) + '\060', 0o10)] + roI3spqORKae(ES5oEprVxulp(b'm\x01'), '\144' + '\x65' + chr(0b111111 + 0o44) + chr(0b10110 + 0o131) + chr(0b110 + 0o136) + chr(0b1100101))(chr(0b10001 + 0o144) + '\x74' + chr(0b1100110) + chr(419 - 374) + chr(56))] + roI3spqORKae(bpyfpu4kTbwL, roI3spqORKae(ES5oEprVxulp(b'?Y~_\x11{U2T$7T'), '\144' + chr(558 - 457) + '\x63' + chr(0b1101111) + chr(2359 - 2259) + '\145')(chr(264 - 147) + chr(0b1010101 + 0o37) + '\x66' + chr(45) + chr(56)))[nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001), 17750 - 17742):], env={roI3spqORKae(ES5oEprVxulp(b'\x08veH\x0fMC:D\x1aTo\xc3l\x14\x14<\x17\xa7\xebD\xee]\xcb\x13\x9c\x9d\xdbR\xf6'), '\x64' + chr(0b1100101) + chr(99) + '\x6f' + chr(6275 - 6175) + '\x65')(chr(117) + chr(116) + chr(0b1100110) + chr(45) + '\070'): roI3spqORKae(ES5oEprVxulp(b"'VD"), '\x64' + chr(101) + chr(7138 - 7039) + '\157' + chr(8031 - 7931) + chr(1217 - 1116))(chr(0b101001 + 0o114) + chr(116) + chr(0b1100110) + '\x2d' + '\x38')})
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/pyinstrument/__main__.py
|
file_supports_color
|
def file_supports_color(file_obj):
"""
Returns True if the running system's terminal supports color, and False
otherwise.
Borrowed from Django
https://github.com/django/django/blob/master/django/core/management/color.py
"""
plat = sys.platform
supported_platform = plat != 'Pocket PC' and (plat != 'win32' or
'ANSICON' in os.environ)
is_a_tty = hasattr(file_obj, 'isatty') and file_obj.isatty()
if not supported_platform or not is_a_tty:
return False
return True
|
python
|
def file_supports_color(file_obj):
"""
Returns True if the running system's terminal supports color, and False
otherwise.
Borrowed from Django
https://github.com/django/django/blob/master/django/core/management/color.py
"""
plat = sys.platform
supported_platform = plat != 'Pocket PC' and (plat != 'win32' or
'ANSICON' in os.environ)
is_a_tty = hasattr(file_obj, 'isatty') and file_obj.isatty()
if not supported_platform or not is_a_tty:
return False
return True
|
[
"def",
"file_supports_color",
"(",
"file_obj",
")",
":",
"plat",
"=",
"sys",
".",
"platform",
"supported_platform",
"=",
"plat",
"!=",
"'Pocket PC'",
"and",
"(",
"plat",
"!=",
"'win32'",
"or",
"'ANSICON'",
"in",
"os",
".",
"environ",
")",
"is_a_tty",
"=",
"hasattr",
"(",
"file_obj",
",",
"'isatty'",
")",
"and",
"file_obj",
".",
"isatty",
"(",
")",
"if",
"not",
"supported_platform",
"or",
"not",
"is_a_tty",
":",
"return",
"False",
"return",
"True"
] |
Returns True if the running system's terminal supports color, and False
otherwise.
Borrowed from Django
https://github.com/django/django/blob/master/django/core/management/color.py
|
[
"Returns",
"True",
"if",
"the",
"running",
"system",
"s",
"terminal",
"supports",
"color",
"and",
"False",
"otherwise",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/pyinstrument/__main__.py#L129-L144
|
train
|
Returns True if the running system s terminal supports color and False otherwise.
|
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_,ze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uEWCNF,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(0b101110 + 0o3), 40553 - 40545), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\157' + chr(1174 - 1124) + chr(0b110110) + chr(0b1000 + 0o55), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + '\x31' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + chr(50) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\x30' + chr(6690 - 6579) + '\062' + chr(0b10011 + 0o41) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100000 + 0o23) + chr(0b110100) + chr(1914 - 1862), 38326 - 38318), nzTpIcepk0o8(chr(48) + chr(1980 - 1869) + '\061' + chr(0b101 + 0o57) + '\061', 0b1000), nzTpIcepk0o8('\x30' + chr(1969 - 1858) + '\x33' + '\067' + '\061', 0o10), nzTpIcepk0o8(chr(1283 - 1235) + chr(111) + '\x35' + chr(932 - 877), 0b1000), nzTpIcepk0o8('\x30' + chr(0b101111 + 0o100) + chr(0b110001) + chr(2319 - 2267) + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(12302 - 12191) + '\062' + '\x30' + '\x33', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101111 + 0o3) + chr(0b110001) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\157' + chr(0b101 + 0o55) + '\x34' + chr(55), 0o10), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1101111) + '\062' + '\x32' + '\x36', 16289 - 16281), nzTpIcepk0o8('\x30' + '\157' + '\x31' + '\x37' + chr(866 - 812), 30716 - 30708), nzTpIcepk0o8(chr(1470 - 1422) + chr(111) + chr(54) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1 + 0o63) + '\060', 0o10), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\157' + chr(0b110101) + '\x36', 7577 - 7569), nzTpIcepk0o8(chr(1524 - 1476) + chr(0b1101111) + chr(0b1010 + 0o51) + '\x34' + chr(0b110100), 8), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(2765 - 2712) + chr(54), 0o10), nzTpIcepk0o8(chr(48) + chr(12183 - 12072) + '\061' + chr(0b110111) + chr(2328 - 2273), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(50) + chr(2067 - 2013) + '\x30', 15549 - 15541), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\157' + '\066' + '\066', 64124 - 64116), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1786 - 1737) + chr(295 - 240) + chr(0b11011 + 0o34), 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11101 + 0o26) + '\067', 0o10), nzTpIcepk0o8('\060' + '\157' + '\x31' + chr(0b1101 + 0o45) + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(53) + chr(0b111 + 0o54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(0b100111 + 0o12) + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(2211 - 2100) + chr(0b110011) + chr(0b110011) + '\x30', 61844 - 61836), nzTpIcepk0o8('\060' + chr(111) + '\061' + '\065' + chr(54), 0b1000), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\157' + '\062' + chr(49) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(10927 - 10816) + chr(51) + chr(0b10001 + 0o40) + chr(0b1 + 0o57), 37141 - 37133), nzTpIcepk0o8(chr(106 - 58) + '\157' + chr(55) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(309 - 261), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2360 - 2310) + chr(0b101100 + 0o7) + '\x34', 0b1000), nzTpIcepk0o8(chr(1094 - 1046) + '\x6f' + chr(0b1100 + 0o52) + chr(414 - 362), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + '\061' + chr(48), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + chr(54) + '\067', ord("\x08")), nzTpIcepk0o8(chr(104 - 56) + chr(0b1101111) + chr(0b100101 + 0o20), 17444 - 17436), nzTpIcepk0o8(chr(0b110000) + chr(778 - 667) + chr(2046 - 1997) + chr(0b110010) + '\x33', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x35' + '\060', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'/'), chr(100) + '\145' + chr(6753 - 6654) + chr(111) + chr(0b111011 + 0o51) + chr(0b1001011 + 0o32))(chr(4819 - 4702) + chr(10529 - 10413) + chr(0b1100110) + chr(45) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def ca6icE2hCafa(ULvRqrfDmRut):
yOX81cxVSDwr = bpyfpu4kTbwL.Mrg3y1GQ55C0
FMNmRaGFCuIx = yOX81cxVSDwr != roI3spqORKae(ES5oEprVxulp(b'Q\xda*\xbe\xc0\x90A\xa9l'), chr(0b111000 + 0o54) + chr(101) + chr(0b10 + 0o141) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(0b100 + 0o161) + chr(0b1011000 + 0o34) + chr(0b1100110) + '\x2d' + chr(0b111000)) and (yOX81cxVSDwr != roI3spqORKae(ES5oEprVxulp(b"v\xdc'\xe6\x97"), chr(100) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(397 - 297) + chr(1916 - 1815))(chr(0b1001110 + 0o47) + chr(0b1110100) + '\x66' + chr(45) + chr(819 - 763)) or roI3spqORKae(ES5oEprVxulp(b'@\xfb\x1a\x9c\xe6\xab/'), chr(5975 - 5875) + chr(0b100110 + 0o77) + chr(3089 - 2990) + chr(0b1101111) + '\144' + chr(101))('\165' + '\x74' + chr(102) + chr(45) + chr(58 - 2)) in aHUqKstZLeS6.I3lWyC6_P_MO)
eNOLMvD7SBYh = dRKdVnHPFq7C(ULvRqrfDmRut, roI3spqORKae(ES5oEprVxulp(b'h\xc6(\xa1\xd1\x9d'), chr(3726 - 3626) + '\145' + chr(99) + chr(0b100101 + 0o112) + '\x64' + chr(0b1100101))(chr(4978 - 4861) + '\164' + chr(8732 - 8630) + '\x2d' + '\070')) and ULvRqrfDmRut.isatty()
if not FMNmRaGFCuIx or not eNOLMvD7SBYh:
return nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b101100 + 0o4), 0b1000)
return nzTpIcepk0o8('\060' + '\157' + '\061', 8)
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/eccman.py
|
compute_ecc_params
|
def compute_ecc_params(max_block_size, rate, hasher):
'''Compute the ecc parameters (size of the message, size of the hash, size of the ecc). This is an helper function to easily compute the parameters from a resilience rate to instanciate an ECCMan object.'''
#message_size = max_block_size - int(round(max_block_size * rate * 2, 0)) # old way to compute, wasn't really correct because we applied the rate on the total message+ecc size, when we should apply the rate to the message size only (that is not known beforehand, but we want the ecc size (k) = 2*rate*message_size or in other words that k + k * 2 * rate = n)
message_size = int(round(float(max_block_size) / (1 + 2*rate), 0))
ecc_size = max_block_size - message_size
hash_size = len(hasher) # 32 when we use MD5
return {"message_size": message_size, "ecc_size": ecc_size, "hash_size": hash_size}
|
python
|
def compute_ecc_params(max_block_size, rate, hasher):
'''Compute the ecc parameters (size of the message, size of the hash, size of the ecc). This is an helper function to easily compute the parameters from a resilience rate to instanciate an ECCMan object.'''
#message_size = max_block_size - int(round(max_block_size * rate * 2, 0)) # old way to compute, wasn't really correct because we applied the rate on the total message+ecc size, when we should apply the rate to the message size only (that is not known beforehand, but we want the ecc size (k) = 2*rate*message_size or in other words that k + k * 2 * rate = n)
message_size = int(round(float(max_block_size) / (1 + 2*rate), 0))
ecc_size = max_block_size - message_size
hash_size = len(hasher) # 32 when we use MD5
return {"message_size": message_size, "ecc_size": ecc_size, "hash_size": hash_size}
|
[
"def",
"compute_ecc_params",
"(",
"max_block_size",
",",
"rate",
",",
"hasher",
")",
":",
"#message_size = max_block_size - int(round(max_block_size * rate * 2, 0)) # old way to compute, wasn't really correct because we applied the rate on the total message+ecc size, when we should apply the rate to the message size only (that is not known beforehand, but we want the ecc size (k) = 2*rate*message_size or in other words that k + k * 2 * rate = n)",
"message_size",
"=",
"int",
"(",
"round",
"(",
"float",
"(",
"max_block_size",
")",
"/",
"(",
"1",
"+",
"2",
"*",
"rate",
")",
",",
"0",
")",
")",
"ecc_size",
"=",
"max_block_size",
"-",
"message_size",
"hash_size",
"=",
"len",
"(",
"hasher",
")",
"# 32 when we use MD5",
"return",
"{",
"\"message_size\"",
":",
"message_size",
",",
"\"ecc_size\"",
":",
"ecc_size",
",",
"\"hash_size\"",
":",
"hash_size",
"}"
] |
Compute the ecc parameters (size of the message, size of the hash, size of the ecc). This is an helper function to easily compute the parameters from a resilience rate to instanciate an ECCMan object.
|
[
"Compute",
"the",
"ecc",
"parameters",
"(",
"size",
"of",
"the",
"message",
"size",
"of",
"the",
"hash",
"size",
"of",
"the",
"ecc",
")",
".",
"This",
"is",
"an",
"helper",
"function",
"to",
"easily",
"compute",
"the",
"parameters",
"from",
"a",
"resilience",
"rate",
"to",
"instanciate",
"an",
"ECCMan",
"object",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/eccman.py#L48-L54
|
train
|
Compute the ecc parameters for the ECCMan object.
|
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(48) + chr(0b0 + 0o157) + chr(51) + chr(0b11001 + 0o31) + chr(2197 - 2143), 0b1000), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\x6f' + chr(0b11 + 0o56) + chr(52) + '\063', 0b1000), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(111) + '\x33' + chr(0b110001) + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(875 - 825) + '\064' + chr(0b100000 + 0o20), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(10873 - 10762) + chr(0b110001) + chr(0b110100) + chr(852 - 800), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + chr(0b110010 + 0o3) + chr(0b110100 + 0o2), 0b1000), nzTpIcepk0o8(chr(1227 - 1179) + '\157' + chr(51) + chr(0b10010 + 0o41) + '\x31', 0o10), nzTpIcepk0o8(chr(917 - 869) + chr(10459 - 10348) + chr(0b110011) + chr(0b110000) + '\x31', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b10010 + 0o135) + chr(78 - 28) + chr(0b1101 + 0o47) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b1101111) + chr(0b10100 + 0o37) + chr(1753 - 1699) + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + chr(195 - 84) + chr(0b1010 + 0o51) + chr(0b11100 + 0o24) + chr(50), 0o10), nzTpIcepk0o8('\060' + chr(0b1110 + 0o141) + chr(0b11010 + 0o31) + '\064' + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b1111 + 0o43) + chr(0b10 + 0o61) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(7267 - 7156) + chr(143 - 92) + chr(55) + chr(50), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + chr(0b1101 + 0o52) + '\x35', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(1317 - 1269) + chr(53), 55634 - 55626), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\x6f' + '\063' + chr(0b110010) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101111) + chr(0b11101 + 0o25) + chr(0b10001 + 0o41) + chr(0b101010 + 0o14), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(0b110000) + chr(0b110011), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + chr(50) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + '\157' + chr(50) + chr(499 - 450) + chr(0b110000 + 0o3), 0o10), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\x6f' + '\x32' + chr(53) + chr(0b11111 + 0o26), ord("\x08")), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1101111) + '\x31' + '\x30' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10010 + 0o37) + chr(0b100010 + 0o24) + chr(0b10011 + 0o42), 0o10), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b1101111) + chr(0b110001) + '\062' + chr(1794 - 1743), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + '\062' + '\x36', 8), nzTpIcepk0o8(chr(1804 - 1756) + '\157' + chr(0b110001) + '\x37' + chr(55), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010) + '\061' + chr(55), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + chr(2598 - 2544) + '\061', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x35' + chr(0b101101 + 0o6), 0b1000), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1101111) + '\061' + chr(2088 - 2040), 0b1000), nzTpIcepk0o8(chr(1112 - 1064) + '\x6f' + '\x31' + chr(0b110 + 0o56) + '\064', 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x33' + chr(0b11100 + 0o24) + '\060', 53322 - 53314), nzTpIcepk0o8(chr(1847 - 1799) + chr(0b1101111) + chr(49) + '\067' + chr(0b110111), 8), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(2360 - 2310) + '\067', 0o10), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(111) + chr(0b110010) + chr(0b110101) + chr(0b110010), 64927 - 64919), nzTpIcepk0o8('\060' + '\157' + chr(0b11100 + 0o32) + chr(0b110011), 30570 - 30562), nzTpIcepk0o8('\x30' + chr(111) + chr(2326 - 2275) + chr(2124 - 2070), 1561 - 1553), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + chr(0b11 + 0o55) + chr(0b110011), 7089 - 7081), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(0b110011) + chr(0b110100), 0b1000)][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'\xf8'), '\144' + '\145' + '\x63' + '\157' + chr(100) + '\145')(chr(0b1010000 + 0o45) + chr(12788 - 12672) + chr(102) + chr(0b101011 + 0o2) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def AriG7oSWPBu5(aFuNB1dLSUC3, TUhPdsFPKBWT, h8kTNaNwezOL):
tg0dRq_B_p7E = nzTpIcepk0o8(sOS7b2Ofrbne(jLW6pRf2DSRk(aFuNB1dLSUC3) / (nzTpIcepk0o8('\060' + '\157' + chr(462 - 413), 0b1000) + nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1761 - 1711), 0o10) * TUhPdsFPKBWT), nzTpIcepk0o8(chr(48) + chr(0b1101111 + 0o0) + chr(1252 - 1204), ord("\x08"))))
R6wMZKpMpFJo = aFuNB1dLSUC3 - tg0dRq_B_p7E
vvYRLP73MBVY = ftfygxgFas5X(h8kTNaNwezOL)
return {roI3spqORKae(ES5oEprVxulp(b'\xbb\x06\xbf\xd3\x05\xc9\xbc\x9e\xd1\x9b\xb8\x86'), chr(100) + chr(0b1011000 + 0o15) + chr(0b1100011) + '\157' + '\x64' + '\145')(chr(0b101010 + 0o113) + chr(116) + chr(0b11000 + 0o116) + '\055' + '\070'): tg0dRq_B_p7E, roI3spqORKae(ES5oEprVxulp(b'\xb3\x00\xaf\xff\x17\xc7\xa3\xa4'), '\144' + '\145' + chr(99) + chr(0b10001 + 0o136) + chr(0b100100 + 0o100) + chr(6219 - 6118))('\165' + '\x74' + '\x66' + '\055' + chr(56)): R6wMZKpMpFJo, roI3spqORKae(ES5oEprVxulp(b'\xbe\x02\xbf\xc8;\xdd\xb0\xbb\xc7'), chr(0b11011 + 0o111) + '\x65' + '\x63' + chr(4552 - 4441) + chr(0b1100100) + chr(101))('\x75' + chr(0b1101110 + 0o6) + chr(0b1100110) + '\x2d' + chr(56)): vvYRLP73MBVY}
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/eccman.py
|
detect_reedsolomon_parameters
|
def detect_reedsolomon_parameters(message, mesecc_orig, gen_list=[2, 3, 5], c_exp=8):
'''Use an exhaustive search to automatically find the correct parameters for the ReedSolomon codec from a sample message and its encoded RS code.
Arguments: message is the sample message, eg, "hello world" ; mesecc_orig is the message variable encoded with RS block appended at the end.
'''
# Description: this is basically an exhaustive search where we will try every possible RS parameter, then try to encode the sample message, and see if the resulting RS code is close to the supplied code.
# All variables except the Galois Field's exponent are automatically generated and searched.
# To compare with the supplied RS code, we compute the Hamming distance, so that even if the RS code is tampered, we can still find the closest set of RS parameters to decode this message.
# The goal is to provide users a function so that they can use the "hello world" sample string in generated ECC files to recover their RS parameters in case they forget them. But users can use any sample message: for example, if they have an untampered file and its relative ecc track, they can use the ecc track as the mesecc_orig and their original file as the sample message.
from .reedsolomon import reedsolo as reedsolop # need to import another time the reedsolo library for detect_reedsolomon_parameters to work (because we need to reinit all the tables, and they are declared module-wide, so this would conflict with decoding)
# Init the variables
n = len(mesecc_orig)
k = len(message)
field_charac = int((2**c_exp) - 1)
maxval1 = max([ord(x) if isinstance(x, basestring) else x for x in message ])
maxval2 = max([ord(x) if isinstance(x, basestring) else x for x in mesecc_orig])
maxval = max([maxval1, maxval2])
if (maxval > field_charac):
raise ValueError("The specified field's exponent is wrong, the message contains values (%i) above the field's cardinality (%i)!" % (maxval, field_charac))
# Prepare the variable that will store the result
best_match = {"hscore": -1, "params": [{"gen_nb": 0, "prim": 0, "fcr": 0}]}
# Exhaustively search by generating every combination of values for the RS parameters and test the Hamming distance
for gen_nb in gen_list:
prim_list = reedsolop.find_prime_polys(generator=gen_nb, c_exp=c_exp, fast_primes=False, single=False)
for prim in prim_list:
reedsolop.init_tables(prim)
for fcr in xrange(field_charac):
#g = reedsolop.rs_generator_poly_all(n, fcr=fcr, generator=gen_nb)
# Generate a RS code from the sample message using the current combination of RS parameters
mesecc = reedsolop.rs_encode_msg(message, n-k, fcr=fcr)
# Compute the Hamming distance
h = hamming(mesecc, mesecc_orig)
# If the Hamming distance is lower than the previous best match (or if it's the first try), save this set of parameters
if best_match["hscore"] == -1 or h <= best_match["hscore"]:
# If the distance is strictly lower than for the previous match, then we replace the previous match with the current one
if best_match["hscore"] == -1 or h < best_match["hscore"]:
best_match["hscore"] = h
best_match["params"] = [{"gen_nb": gen_nb, "prim": prim, "fcr": fcr}]
# Else there is an ambiguity: the Hamming distance is the same as for the previous best match, so we keep the previous set of parameters but we append the current set
elif h == best_match["hscore"]:
best_match["params"].append({"gen_nb": gen_nb, "prim": prim, "fcr": fcr})
# If Hamming distance is 0, then we have found a perfect match (the current set of parameters allow to generate the exact same RS code from the sample message), so we stop here
if h == 0: break
# Printing the results to the user
if best_match["hscore"] >= 0 and best_match["hscore"] < len(mesecc_orig):
perfect_match_str = " (0=perfect match)" if best_match["hscore"]==0 else ""
result = ''
result += "Found closest set of parameters, with Hamming distance %i%s:\n" % (best_match["hscore"], perfect_match_str)
for param in best_match["params"]:
result += "gen_nb=%s prim=%s(%s) fcr=%s\n" % (param["gen_nb"], param["prim"], hex(param["prim"]), param["fcr"])
return result
else:
return "Parameters could not be automatically detected..."
|
python
|
def detect_reedsolomon_parameters(message, mesecc_orig, gen_list=[2, 3, 5], c_exp=8):
'''Use an exhaustive search to automatically find the correct parameters for the ReedSolomon codec from a sample message and its encoded RS code.
Arguments: message is the sample message, eg, "hello world" ; mesecc_orig is the message variable encoded with RS block appended at the end.
'''
# Description: this is basically an exhaustive search where we will try every possible RS parameter, then try to encode the sample message, and see if the resulting RS code is close to the supplied code.
# All variables except the Galois Field's exponent are automatically generated and searched.
# To compare with the supplied RS code, we compute the Hamming distance, so that even if the RS code is tampered, we can still find the closest set of RS parameters to decode this message.
# The goal is to provide users a function so that they can use the "hello world" sample string in generated ECC files to recover their RS parameters in case they forget them. But users can use any sample message: for example, if they have an untampered file and its relative ecc track, they can use the ecc track as the mesecc_orig and their original file as the sample message.
from .reedsolomon import reedsolo as reedsolop # need to import another time the reedsolo library for detect_reedsolomon_parameters to work (because we need to reinit all the tables, and they are declared module-wide, so this would conflict with decoding)
# Init the variables
n = len(mesecc_orig)
k = len(message)
field_charac = int((2**c_exp) - 1)
maxval1 = max([ord(x) if isinstance(x, basestring) else x for x in message ])
maxval2 = max([ord(x) if isinstance(x, basestring) else x for x in mesecc_orig])
maxval = max([maxval1, maxval2])
if (maxval > field_charac):
raise ValueError("The specified field's exponent is wrong, the message contains values (%i) above the field's cardinality (%i)!" % (maxval, field_charac))
# Prepare the variable that will store the result
best_match = {"hscore": -1, "params": [{"gen_nb": 0, "prim": 0, "fcr": 0}]}
# Exhaustively search by generating every combination of values for the RS parameters and test the Hamming distance
for gen_nb in gen_list:
prim_list = reedsolop.find_prime_polys(generator=gen_nb, c_exp=c_exp, fast_primes=False, single=False)
for prim in prim_list:
reedsolop.init_tables(prim)
for fcr in xrange(field_charac):
#g = reedsolop.rs_generator_poly_all(n, fcr=fcr, generator=gen_nb)
# Generate a RS code from the sample message using the current combination of RS parameters
mesecc = reedsolop.rs_encode_msg(message, n-k, fcr=fcr)
# Compute the Hamming distance
h = hamming(mesecc, mesecc_orig)
# If the Hamming distance is lower than the previous best match (or if it's the first try), save this set of parameters
if best_match["hscore"] == -1 or h <= best_match["hscore"]:
# If the distance is strictly lower than for the previous match, then we replace the previous match with the current one
if best_match["hscore"] == -1 or h < best_match["hscore"]:
best_match["hscore"] = h
best_match["params"] = [{"gen_nb": gen_nb, "prim": prim, "fcr": fcr}]
# Else there is an ambiguity: the Hamming distance is the same as for the previous best match, so we keep the previous set of parameters but we append the current set
elif h == best_match["hscore"]:
best_match["params"].append({"gen_nb": gen_nb, "prim": prim, "fcr": fcr})
# If Hamming distance is 0, then we have found a perfect match (the current set of parameters allow to generate the exact same RS code from the sample message), so we stop here
if h == 0: break
# Printing the results to the user
if best_match["hscore"] >= 0 and best_match["hscore"] < len(mesecc_orig):
perfect_match_str = " (0=perfect match)" if best_match["hscore"]==0 else ""
result = ''
result += "Found closest set of parameters, with Hamming distance %i%s:\n" % (best_match["hscore"], perfect_match_str)
for param in best_match["params"]:
result += "gen_nb=%s prim=%s(%s) fcr=%s\n" % (param["gen_nb"], param["prim"], hex(param["prim"]), param["fcr"])
return result
else:
return "Parameters could not be automatically detected..."
|
[
"def",
"detect_reedsolomon_parameters",
"(",
"message",
",",
"mesecc_orig",
",",
"gen_list",
"=",
"[",
"2",
",",
"3",
",",
"5",
"]",
",",
"c_exp",
"=",
"8",
")",
":",
"# Description: this is basically an exhaustive search where we will try every possible RS parameter, then try to encode the sample message, and see if the resulting RS code is close to the supplied code.",
"# All variables except the Galois Field's exponent are automatically generated and searched.",
"# To compare with the supplied RS code, we compute the Hamming distance, so that even if the RS code is tampered, we can still find the closest set of RS parameters to decode this message.",
"# The goal is to provide users a function so that they can use the \"hello world\" sample string in generated ECC files to recover their RS parameters in case they forget them. But users can use any sample message: for example, if they have an untampered file and its relative ecc track, they can use the ecc track as the mesecc_orig and their original file as the sample message.",
"from",
".",
"reedsolomon",
"import",
"reedsolo",
"as",
"reedsolop",
"# need to import another time the reedsolo library for detect_reedsolomon_parameters to work (because we need to reinit all the tables, and they are declared module-wide, so this would conflict with decoding)",
"# Init the variables",
"n",
"=",
"len",
"(",
"mesecc_orig",
")",
"k",
"=",
"len",
"(",
"message",
")",
"field_charac",
"=",
"int",
"(",
"(",
"2",
"**",
"c_exp",
")",
"-",
"1",
")",
"maxval1",
"=",
"max",
"(",
"[",
"ord",
"(",
"x",
")",
"if",
"isinstance",
"(",
"x",
",",
"basestring",
")",
"else",
"x",
"for",
"x",
"in",
"message",
"]",
")",
"maxval2",
"=",
"max",
"(",
"[",
"ord",
"(",
"x",
")",
"if",
"isinstance",
"(",
"x",
",",
"basestring",
")",
"else",
"x",
"for",
"x",
"in",
"mesecc_orig",
"]",
")",
"maxval",
"=",
"max",
"(",
"[",
"maxval1",
",",
"maxval2",
"]",
")",
"if",
"(",
"maxval",
">",
"field_charac",
")",
":",
"raise",
"ValueError",
"(",
"\"The specified field's exponent is wrong, the message contains values (%i) above the field's cardinality (%i)!\"",
"%",
"(",
"maxval",
",",
"field_charac",
")",
")",
"# Prepare the variable that will store the result",
"best_match",
"=",
"{",
"\"hscore\"",
":",
"-",
"1",
",",
"\"params\"",
":",
"[",
"{",
"\"gen_nb\"",
":",
"0",
",",
"\"prim\"",
":",
"0",
",",
"\"fcr\"",
":",
"0",
"}",
"]",
"}",
"# Exhaustively search by generating every combination of values for the RS parameters and test the Hamming distance",
"for",
"gen_nb",
"in",
"gen_list",
":",
"prim_list",
"=",
"reedsolop",
".",
"find_prime_polys",
"(",
"generator",
"=",
"gen_nb",
",",
"c_exp",
"=",
"c_exp",
",",
"fast_primes",
"=",
"False",
",",
"single",
"=",
"False",
")",
"for",
"prim",
"in",
"prim_list",
":",
"reedsolop",
".",
"init_tables",
"(",
"prim",
")",
"for",
"fcr",
"in",
"xrange",
"(",
"field_charac",
")",
":",
"#g = reedsolop.rs_generator_poly_all(n, fcr=fcr, generator=gen_nb)",
"# Generate a RS code from the sample message using the current combination of RS parameters",
"mesecc",
"=",
"reedsolop",
".",
"rs_encode_msg",
"(",
"message",
",",
"n",
"-",
"k",
",",
"fcr",
"=",
"fcr",
")",
"# Compute the Hamming distance",
"h",
"=",
"hamming",
"(",
"mesecc",
",",
"mesecc_orig",
")",
"# If the Hamming distance is lower than the previous best match (or if it's the first try), save this set of parameters",
"if",
"best_match",
"[",
"\"hscore\"",
"]",
"==",
"-",
"1",
"or",
"h",
"<=",
"best_match",
"[",
"\"hscore\"",
"]",
":",
"# If the distance is strictly lower than for the previous match, then we replace the previous match with the current one",
"if",
"best_match",
"[",
"\"hscore\"",
"]",
"==",
"-",
"1",
"or",
"h",
"<",
"best_match",
"[",
"\"hscore\"",
"]",
":",
"best_match",
"[",
"\"hscore\"",
"]",
"=",
"h",
"best_match",
"[",
"\"params\"",
"]",
"=",
"[",
"{",
"\"gen_nb\"",
":",
"gen_nb",
",",
"\"prim\"",
":",
"prim",
",",
"\"fcr\"",
":",
"fcr",
"}",
"]",
"# Else there is an ambiguity: the Hamming distance is the same as for the previous best match, so we keep the previous set of parameters but we append the current set",
"elif",
"h",
"==",
"best_match",
"[",
"\"hscore\"",
"]",
":",
"best_match",
"[",
"\"params\"",
"]",
".",
"append",
"(",
"{",
"\"gen_nb\"",
":",
"gen_nb",
",",
"\"prim\"",
":",
"prim",
",",
"\"fcr\"",
":",
"fcr",
"}",
")",
"# If Hamming distance is 0, then we have found a perfect match (the current set of parameters allow to generate the exact same RS code from the sample message), so we stop here",
"if",
"h",
"==",
"0",
":",
"break",
"# Printing the results to the user",
"if",
"best_match",
"[",
"\"hscore\"",
"]",
">=",
"0",
"and",
"best_match",
"[",
"\"hscore\"",
"]",
"<",
"len",
"(",
"mesecc_orig",
")",
":",
"perfect_match_str",
"=",
"\" (0=perfect match)\"",
"if",
"best_match",
"[",
"\"hscore\"",
"]",
"==",
"0",
"else",
"\"\"",
"result",
"=",
"''",
"result",
"+=",
"\"Found closest set of parameters, with Hamming distance %i%s:\\n\"",
"%",
"(",
"best_match",
"[",
"\"hscore\"",
"]",
",",
"perfect_match_str",
")",
"for",
"param",
"in",
"best_match",
"[",
"\"params\"",
"]",
":",
"result",
"+=",
"\"gen_nb=%s prim=%s(%s) fcr=%s\\n\"",
"%",
"(",
"param",
"[",
"\"gen_nb\"",
"]",
",",
"param",
"[",
"\"prim\"",
"]",
",",
"hex",
"(",
"param",
"[",
"\"prim\"",
"]",
")",
",",
"param",
"[",
"\"fcr\"",
"]",
")",
"return",
"result",
"else",
":",
"return",
"\"Parameters could not be automatically detected...\""
] |
Use an exhaustive search to automatically find the correct parameters for the ReedSolomon codec from a sample message and its encoded RS code.
Arguments: message is the sample message, eg, "hello world" ; mesecc_orig is the message variable encoded with RS block appended at the end.
|
[
"Use",
"an",
"exhaustive",
"search",
"to",
"automatically",
"find",
"the",
"correct",
"parameters",
"for",
"the",
"ReedSolomon",
"codec",
"from",
"a",
"sample",
"message",
"and",
"its",
"encoded",
"RS",
"code",
".",
"Arguments",
":",
"message",
"is",
"the",
"sample",
"message",
"eg",
"hello",
"world",
";",
"mesecc_orig",
"is",
"the",
"message",
"variable",
"encoded",
"with",
"RS",
"block",
"appended",
"at",
"the",
"end",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/eccman.py#L56-L112
|
train
|
Detects the correct parameters for the ReedSolomon codec from a sample message and its encoded RS code.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmq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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(11990 - 11879) + '\061' + chr(51) + '\x35', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(49) + chr(1360 - 1311), 32861 - 32853), nzTpIcepk0o8('\x30' + chr(2718 - 2607) + '\x32' + chr(0b101000 + 0o11) + chr(936 - 886), ord("\x08")), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b1101111) + chr(1829 - 1779) + '\062', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + '\067' + chr(169 - 119), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + chr(0b11100 + 0o32) + chr(49), 34274 - 34266), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + chr(49) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(1514 - 1466) + '\157' + '\061' + chr(1616 - 1562) + chr(0b101001 + 0o15), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(55) + chr(0b100 + 0o56), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + chr(51) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1000100 + 0o53) + '\x31' + chr(404 - 349) + chr(49), 43762 - 43754), nzTpIcepk0o8(chr(0b110000) + chr(0b1101010 + 0o5) + chr(51) + chr(0b110100) + chr(0b111 + 0o53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(96 - 47) + '\x30' + '\067', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b11011 + 0o27) + chr(0b110100 + 0o1) + chr(0b110011), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x31' + chr(53) + '\062', 0b1000), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\x6f' + chr(915 - 864) + chr(0b110101) + '\x30', 0b1000), nzTpIcepk0o8('\x30' + chr(0b110010 + 0o75) + chr(0b10 + 0o61) + chr(0b110011) + chr(49), 22681 - 22673), nzTpIcepk0o8('\x30' + chr(0b1011111 + 0o20) + chr(50) + chr(0b110111) + '\062', 8), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + '\x36' + chr(0b100001 + 0o23), ord("\x08")), nzTpIcepk0o8('\x30' + chr(3450 - 3339) + chr(0b1101 + 0o46) + '\x31' + chr(0b1111 + 0o50), 11965 - 11957), nzTpIcepk0o8(chr(0b110000) + chr(2318 - 2207) + chr(0b110001) + chr(0b10111 + 0o35), 7070 - 7062), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b11000 + 0o33) + chr(0b110011 + 0o1) + '\x35', 34819 - 34811), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(0b110010), 45790 - 45782), nzTpIcepk0o8('\060' + '\157' + '\x31' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(7735 - 7624) + chr(0b1 + 0o60) + chr(0b110011) + chr(0b110101 + 0o0), 8), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(2848 - 2793) + '\x32', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + '\065' + chr(0b10101 + 0o41), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(0b100001 + 0o26) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(505 - 457) + '\157' + '\x33' + '\x34' + chr(49), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(1257 - 1206) + chr(1700 - 1649) + chr(49), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b11001 + 0o33) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + '\x33' + chr(49), 50988 - 50980), nzTpIcepk0o8(chr(713 - 665) + chr(111) + '\x32' + chr(0b110011) + chr(1491 - 1439), ord("\x08")), nzTpIcepk0o8(chr(335 - 287) + chr(0b1000010 + 0o55) + '\x33' + chr(0b110111) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(502 - 454) + chr(0b1101111) + '\062' + chr(49) + chr(0b1000 + 0o50), 47270 - 47262), nzTpIcepk0o8(chr(48) + chr(10876 - 10765) + chr(50) + chr(1076 - 1026) + chr(0b110010), 32495 - 32487), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + '\x37' + chr(188 - 138), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + chr(0b110111) + chr(2418 - 2364), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(1605 - 1557) + chr(1845 - 1790), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b111 + 0o53) + chr(54) + chr(53), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110101) + chr(0b11011 + 0o25), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b's'), chr(100) + '\x65' + chr(99) + chr(0b1101111) + chr(100) + chr(0b1100101))('\x75' + chr(1079 - 963) + chr(2493 - 2391) + '\x2d' + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def OfZ71WxW0syF(FksNMH1w_ns6, y0kVLKXzf4mI, GmmrGORp8qWQ=[nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1833 - 1783), 52459 - 52451), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(153 - 102), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110101), 41294 - 41286)], kOldCzQvrHFu=nzTpIcepk0o8(chr(887 - 839) + chr(0b1101111) + chr(49) + chr(0b101011 + 0o5), 8)):
(Us7x6UGjuUOF,) = (roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'/l\xefv\xc9\xdef\x19W\xb4\x17'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(111) + '\x64' + chr(101))(chr(0b1101100 + 0o11) + chr(0b1000110 + 0o56) + '\x66' + chr(45) + chr(0b101110 + 0o12)), roI3spqORKae(ES5oEprVxulp(b'/l\xefv\xc9\xdef\x19'), '\x64' + chr(0b1100101) + chr(0b1110 + 0o125) + chr(0b1101111) + '\144' + chr(5735 - 5634))(chr(0b1000111 + 0o56) + chr(116) + '\x66' + '\055' + chr(56))), roI3spqORKae(ES5oEprVxulp(b'/l\xefv\xc9\xdef\x19'), chr(0b1100100) + chr(0b100001 + 0o104) + chr(99) + '\x6f' + chr(100) + chr(2188 - 2087))(chr(117) + chr(0b1110100) + chr(0b10000 + 0o126) + '\x2d' + chr(0b110011 + 0o5))),)
NoZxuO7wjArS = ftfygxgFas5X(y0kVLKXzf4mI)
B6UAF1zReOyJ = ftfygxgFas5X(FksNMH1w_ns6)
r2S5hBmJ_9QZ = nzTpIcepk0o8(nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(111) + chr(1305 - 1255), 8) ** kOldCzQvrHFu - nzTpIcepk0o8(chr(0b110000) + chr(1538 - 1427) + chr(0b101011 + 0o6), 0o10))
HFR7olQBBvtx = KV9ckIhroIia([RmKXV0QRcrJP(bI5jsQ9OkQtj) if suIjIS24Zkqw(bI5jsQ9OkQtj, JaQstSroDWOP) else bI5jsQ9OkQtj for bI5jsQ9OkQtj in FksNMH1w_ns6])
Z8mXOplLlCCJ = KV9ckIhroIia([RmKXV0QRcrJP(bI5jsQ9OkQtj) if suIjIS24Zkqw(bI5jsQ9OkQtj, JaQstSroDWOP) else bI5jsQ9OkQtj for bI5jsQ9OkQtj in y0kVLKXzf4mI])
tSNW6oozzJTT = KV9ckIhroIia([HFR7olQBBvtx, Z8mXOplLlCCJ])
if tSNW6oozzJTT > r2S5hBmJ_9QZ:
raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\ta\xef2\xc9\xc1o\x15S\xbd\x10\x87#\x8b\x0c\x81\xbc\xd6\xd0\xe8\x7f\xc5\x7fp-\x95\x00\x19\x8f\xad\x03\xf0\xef\xdc\xff\xe0\x15\x90\xa0\x99}}\xe2w\x9a\xdco\x05I\xba\x1e\x87g\xc8\x05\x86\xad\xdb\xdd\xa1\x7f\xc5li1\x8f\x0b\x0f\xc1\xf1\x06\xf0\xb5\xdc\xe9\xf0\x15\x88\xa2\x95)a\xef2\xdc\xd8o\x1a^\xfc\n\xc2$\xca\x18\x8c\xb0\xd4\xd5\xa3e\x91c(u\xdf\x07U\xc0'), '\x64' + chr(2771 - 2670) + chr(99) + chr(5983 - 5872) + chr(2372 - 2272) + chr(7811 - 7710))('\165' + chr(3286 - 3170) + '\146' + '\055' + chr(0b100 + 0o64)) % (tSNW6oozzJTT, r2S5hBmJ_9QZ))
t3BhTK85VnCG = {roI3spqORKae(ES5oEprVxulp(b'5z\xe9}\xc8\xd4'), '\x64' + chr(4385 - 4284) + '\x63' + '\x6f' + '\x64' + chr(0b1011100 + 0o11))(chr(0b101010 + 0o113) + '\164' + '\146' + chr(0b101101) + chr(0b111000)): -nzTpIcepk0o8('\x30' + chr(0b1100011 + 0o14) + chr(49), 8), roI3spqORKae(ES5oEprVxulp(b'-h\xf8s\xd7\xc2'), chr(100) + chr(101) + '\143' + chr(111) + '\144' + chr(0b1100101))('\x75' + '\164' + chr(0b11000 + 0o116) + chr(45) + chr(0b10000 + 0o50)): [{roI3spqORKae(ES5oEprVxulp(b':l\xe4M\xd4\xd3'), chr(0b1100100) + chr(9777 - 9676) + '\143' + '\x6f' + chr(0b1001 + 0o133) + '\145')('\x75' + '\164' + '\x66' + '\x2d' + chr(0b100101 + 0o23)): nzTpIcepk0o8(chr(0b100000 + 0o20) + '\157' + '\060', ord("\x08")), roI3spqORKae(ES5oEprVxulp(b'-{\xe3\x7f'), chr(7922 - 7822) + '\x65' + chr(99) + chr(111) + '\x64' + chr(0b1100101))(chr(117) + '\x74' + '\x66' + chr(0b101101 + 0o0) + chr(345 - 289)): nzTpIcepk0o8(chr(0b110000) + chr(1640 - 1529) + '\x30', 8), roI3spqORKae(ES5oEprVxulp(b';j\xf8'), '\144' + chr(573 - 472) + chr(99) + chr(111) + chr(6986 - 6886) + '\x65')('\165' + '\x74' + chr(8529 - 8427) + chr(0b1111 + 0o36) + chr(56)): nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b1101111) + chr(147 - 99), 8)}]}
for TL5CDJZBmC3G in GmmrGORp8qWQ:
n7FO8UiNRbuI = Us7x6UGjuUOF.find_prime_polys(generator=TL5CDJZBmC3G, c_exp=kOldCzQvrHFu, fast_primes=nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b11001 + 0o27), 8), single=nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(111) + '\060', 8))
for NX_Q3jNq1TRI in n7FO8UiNRbuI:
roI3spqORKae(Us7x6UGjuUOF, roI3spqORKae(ES5oEprVxulp(b'4g\xe3f\xe5\xc5k\x14V\xbe\n'), '\x64' + chr(9546 - 9445) + chr(99) + chr(0b110011 + 0o74) + chr(0b1100100) + chr(101))('\165' + chr(0b1000010 + 0o62) + chr(102) + chr(45) + chr(2805 - 2749)))(NX_Q3jNq1TRI)
for wLDWw21nmA1I in zBiXJ6gPq38D(r2S5hBmJ_9QZ):
Tk2HjUvrQQRt = Us7x6UGjuUOF.rs_encode_msg(FksNMH1w_ns6, NoZxuO7wjArS - B6UAF1zReOyJ, fcr=wLDWw21nmA1I)
_9ve2uheHd6a = y89F1EaEzy5e(Tk2HjUvrQQRt, y0kVLKXzf4mI)
if t3BhTK85VnCG[roI3spqORKae(ES5oEprVxulp(b'5z\xe9}\xc8\xd4'), chr(6897 - 6797) + chr(101) + chr(99) + chr(0b1101111) + '\144' + '\x65')('\165' + chr(0b1000011 + 0o61) + chr(102) + chr(2020 - 1975) + chr(0b111000))] == -nzTpIcepk0o8(chr(1499 - 1451) + chr(111) + '\061', 8) or _9ve2uheHd6a <= t3BhTK85VnCG[roI3spqORKae(ES5oEprVxulp(b'5z\xe9}\xc8\xd4'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(0b1001010 + 0o45) + chr(4865 - 4765) + '\145')(chr(0b1110101) + '\164' + chr(102) + chr(0b101101) + chr(1057 - 1001))]:
if t3BhTK85VnCG[roI3spqORKae(ES5oEprVxulp(b'5z\xe9}\xc8\xd4'), chr(0b1100100) + chr(101) + '\x63' + chr(0b1101111) + '\144' + chr(0b1100101))('\x75' + '\164' + chr(0b10001 + 0o125) + chr(0b101101) + chr(0b110 + 0o62))] == -nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001), 8) or _9ve2uheHd6a < t3BhTK85VnCG[roI3spqORKae(ES5oEprVxulp(b'5z\xe9}\xc8\xd4'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(0b110010 + 0o75) + chr(100) + chr(0b1111 + 0o126))('\165' + chr(0b1101 + 0o147) + '\146' + chr(0b101101) + chr(0b100 + 0o64))]:
t3BhTK85VnCG[roI3spqORKae(ES5oEprVxulp(b'5z\xe9}\xc8\xd4'), '\144' + chr(0b1100101) + '\143' + chr(3631 - 3520) + chr(4315 - 4215) + chr(101))('\x75' + chr(116) + chr(0b1100110) + chr(187 - 142) + chr(56))] = _9ve2uheHd6a
t3BhTK85VnCG[roI3spqORKae(ES5oEprVxulp(b'-h\xf8s\xd7\xc2'), chr(100) + chr(0b1000 + 0o135) + '\x63' + '\x6f' + chr(100) + '\145')('\165' + '\x74' + chr(2318 - 2216) + '\055' + '\x38')] = [{roI3spqORKae(ES5oEprVxulp(b':l\xe4M\xd4\xd3'), chr(0b1100000 + 0o4) + chr(4273 - 4172) + chr(0b1100011) + '\x6f' + '\144' + '\x65')('\165' + chr(0b1110100) + chr(0b100000 + 0o106) + '\055' + '\070'): TL5CDJZBmC3G, roI3spqORKae(ES5oEprVxulp(b'-{\xe3\x7f'), chr(0b1100100) + chr(3677 - 3576) + chr(5186 - 5087) + chr(111) + chr(0b1100100) + chr(2169 - 2068))(chr(0b1101100 + 0o11) + '\x74' + '\146' + chr(0b10110 + 0o27) + chr(0b111000)): NX_Q3jNq1TRI, roI3spqORKae(ES5oEprVxulp(b';j\xf8'), chr(100) + '\x65' + '\x63' + chr(111) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(12356 - 12240) + chr(0b1100110) + chr(1950 - 1905) + '\x38'): wLDWw21nmA1I}]
elif _9ve2uheHd6a == t3BhTK85VnCG[roI3spqORKae(ES5oEprVxulp(b'5z\xe9}\xc8\xd4'), chr(0b1100100) + chr(1497 - 1396) + chr(5660 - 5561) + '\x6f' + '\x64' + chr(101))(chr(0b10 + 0o163) + chr(0b1010101 + 0o37) + '\x66' + chr(1261 - 1216) + '\x38')]:
roI3spqORKae(t3BhTK85VnCG[roI3spqORKae(ES5oEprVxulp(b'-h\xf8s\xd7\xc2'), chr(100) + chr(101) + chr(0b1010111 + 0o14) + '\x6f' + '\144' + chr(101))('\165' + chr(6627 - 6511) + '\146' + chr(0b101101) + chr(0b1011 + 0o55))], roI3spqORKae(ES5oEprVxulp(b'\x15]\xd9&\xc2\xd6M\x19P\xb4,\xd7'), chr(0b1100100) + '\x65' + '\x63' + chr(2799 - 2688) + chr(100) + chr(0b1100101))(chr(9559 - 9442) + chr(0b1000100 + 0o60) + chr(0b1011101 + 0o11) + chr(0b1111 + 0o36) + chr(56)))({roI3spqORKae(ES5oEprVxulp(b':l\xe4M\xd4\xd3'), '\x64' + chr(0b1001110 + 0o27) + chr(99) + chr(0b1101111) + chr(100) + chr(0b1100101))(chr(0b1110101) + chr(0b111 + 0o155) + chr(1376 - 1274) + chr(440 - 395) + chr(777 - 721)): TL5CDJZBmC3G, roI3spqORKae(ES5oEprVxulp(b'-{\xe3\x7f'), chr(486 - 386) + chr(3418 - 3317) + chr(3885 - 3786) + chr(111) + '\144' + chr(4317 - 4216))(chr(117) + chr(0b11 + 0o161) + chr(0b100011 + 0o103) + chr(0b101011 + 0o2) + '\x38'): NX_Q3jNq1TRI, roI3spqORKae(ES5oEprVxulp(b';j\xf8'), chr(100) + '\145' + '\x63' + '\157' + chr(0b1100100) + chr(101))('\165' + chr(0b100010 + 0o122) + chr(4457 - 4355) + '\055' + chr(1122 - 1066)): wLDWw21nmA1I})
if _9ve2uheHd6a == nzTpIcepk0o8(chr(1503 - 1455) + chr(1896 - 1785) + chr(48), 8):
break
if t3BhTK85VnCG[roI3spqORKae(ES5oEprVxulp(b'5z\xe9}\xc8\xd4'), '\x64' + chr(0b101111 + 0o66) + chr(99) + '\x6f' + '\x64' + chr(101))('\165' + chr(7861 - 7745) + chr(0b101011 + 0o73) + chr(45) + chr(56))] >= nzTpIcepk0o8(chr(2263 - 2215) + chr(111) + chr(0b100010 + 0o16), 8) and t3BhTK85VnCG[roI3spqORKae(ES5oEprVxulp(b'5z\xe9}\xc8\xd4'), '\x64' + '\x65' + chr(0b110011 + 0o60) + chr(7254 - 7143) + chr(100) + chr(0b100110 + 0o77))(chr(0b101111 + 0o106) + '\164' + chr(0b1100001 + 0o5) + '\055' + '\x38')] < ftfygxgFas5X(y0kVLKXzf4mI):
RfTsdDBtbB23 = roI3spqORKae(ES5oEprVxulp(b'}!\xba/\xca\xd4x\x10_\xb8\r\xc2*\xca\x1e\x8b\xb1\x93'), '\x64' + chr(101) + chr(1602 - 1503) + chr(10448 - 10337) + chr(0b101111 + 0o65) + chr(1863 - 1762))('\x75' + chr(0b1110100) + chr(0b101 + 0o141) + '\x2d' + chr(0b101 + 0o63)) if t3BhTK85VnCG[roI3spqORKae(ES5oEprVxulp(b'5z\xe9}\xc8\xd4'), chr(0b11100 + 0o110) + '\145' + '\x63' + chr(111) + '\x64' + '\145')(chr(117) + chr(13326 - 13210) + chr(0b1001111 + 0o27) + chr(45) + chr(0b110101 + 0o3))] == nzTpIcepk0o8(chr(0b1001 + 0o47) + '\x6f' + chr(48), 8) else roI3spqORKae(ES5oEprVxulp(b''), '\x64' + chr(0b111011 + 0o52) + chr(99) + '\157' + chr(0b1100100) + chr(0b110 + 0o137))('\x75' + chr(0b1110100) + '\146' + chr(45) + chr(0b1011 + 0o55))
POx95m7SPOVy = roI3spqORKae(ES5oEprVxulp(b''), chr(4000 - 3900) + chr(0b1100101) + chr(0b101111 + 0o64) + '\x6f' + chr(100) + chr(5772 - 5671))(chr(9584 - 9467) + chr(116) + chr(7698 - 7596) + '\055' + '\x38')
POx95m7SPOVy += roI3spqORKae(ES5oEprVxulp(b'\x1bf\xff|\xde\x91i\x1aU\xa8\x1c\x913\x8b\x19\x8d\xad\x9a\xdb\xa9,\x95{z<\x97\x0b\x08\x84\xabP\xb5\xbc\x8b\xe1\xe6\x12\xde\x8f\xd40d\xe3|\xdd\x91n\x1fI\xaf\x18\x8c$\xceJ\xcd\xb0\x9f\xc7\xf5\x06'), chr(8305 - 8205) + '\145' + '\143' + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(1598 - 1482) + '\x66' + chr(45) + chr(56)) % (t3BhTK85VnCG[roI3spqORKae(ES5oEprVxulp(b'5z\xe9}\xc8\xd4'), '\144' + chr(0b1011010 + 0o13) + '\x63' + chr(111) + '\x64' + chr(101))(chr(4875 - 4758) + chr(0b1110100) + '\146' + chr(0b1101 + 0o40) + chr(56))], RfTsdDBtbB23)
for BDr7SxpOFXwl in t3BhTK85VnCG[roI3spqORKae(ES5oEprVxulp(b'-h\xf8s\xd7\xc2'), chr(0b1100100) + chr(101) + '\x63' + chr(5776 - 5665) + '\144' + '\145')(chr(0b1110101) + '\164' + chr(1401 - 1299) + chr(0b100000 + 0o15) + chr(0b111000))]:
POx95m7SPOVy += roI3spqORKae(ES5oEprVxulp(b':l\xe4M\xd4\xd37SI\xfb\t\x90.\xc6W\xcd\xaa\x92\x91\xbc%\xc5|k/\xc7K\x0f\xeb'), chr(0b1100100) + '\145' + '\143' + chr(0b1101111) + chr(0b1011000 + 0o14) + chr(101))('\165' + chr(0b10000 + 0o144) + chr(102) + chr(45) + chr(1304 - 1248)) % (BDr7SxpOFXwl[roI3spqORKae(ES5oEprVxulp(b':l\xe4M\xd4\xd3'), chr(9406 - 9306) + chr(101) + chr(7343 - 7244) + chr(111) + '\x64' + chr(101))('\x75' + '\x74' + '\146' + '\x2d' + chr(0b110001 + 0o7))], BDr7SxpOFXwl[roI3spqORKae(ES5oEprVxulp(b'-{\xe3\x7f'), chr(100) + chr(101) + chr(5691 - 5592) + chr(0b1000110 + 0o51) + chr(0b10000 + 0o124) + '\x65')('\x75' + '\x74' + chr(102) + chr(1019 - 974) + '\070')], vgO67Nkl7Kt9(BDr7SxpOFXwl[roI3spqORKae(ES5oEprVxulp(b'-{\xe3\x7f'), '\x64' + '\145' + chr(0b101010 + 0o71) + '\157' + '\x64' + chr(0b11001 + 0o114))('\x75' + '\x74' + '\146' + chr(1574 - 1529) + chr(56))]), BDr7SxpOFXwl[roI3spqORKae(ES5oEprVxulp(b';j\xf8'), '\x64' + chr(0b100111 + 0o76) + '\x63' + chr(0b1101111) + chr(100) + chr(101))(chr(117) + '\x74' + chr(3445 - 3343) + chr(473 - 428) + chr(0b111000))])
return POx95m7SPOVy
else:
return roI3spqORKae(ES5oEprVxulp(b'\rh\xf8s\xd7\xd4~\x13H\xa8Y\x81(\xde\x06\x8c\xf9\xd4\xdb\xbb,\x87\x7f(<\x8f\x1a\x13\x8c\xb8W\xf0\xff\x9d\xe4\xfe\x03\xde\xa3\xd0)l\xe9f\xdf\xd5$X\x14'), chr(8002 - 7902) + chr(0b1100101) + chr(99) + chr(0b100000 + 0o117) + '\x64' + chr(0b110001 + 0o64))(chr(117) + chr(0b101011 + 0o111) + chr(0b110001 + 0o65) + '\x2d' + '\070')
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/eccman.py
|
ECCMan.encode
|
def encode(self, message, k=None):
'''Encode one message block (up to 255) into an ecc'''
if not k: k = self.k
message, _ = self.pad(message, k=k)
if self.algo == 1:
mesecc = self.ecc_manager.encode(message, k=k)
elif self.algo == 2:
mesecc = self.ecc_manager.encode_fast(message, k=k)
elif self.algo == 3 or self.algo == 4:
mesecc = rs_encode_msg(message, self.n-k, fcr=self.fcr, gen=self.g[self.n-k])
#mesecc = rs_encode_msg_precomp(message, self.n-k, fcr=self.fcr, gen=self.g[self.n-k])
ecc = mesecc[len(message):]
return ecc
|
python
|
def encode(self, message, k=None):
'''Encode one message block (up to 255) into an ecc'''
if not k: k = self.k
message, _ = self.pad(message, k=k)
if self.algo == 1:
mesecc = self.ecc_manager.encode(message, k=k)
elif self.algo == 2:
mesecc = self.ecc_manager.encode_fast(message, k=k)
elif self.algo == 3 or self.algo == 4:
mesecc = rs_encode_msg(message, self.n-k, fcr=self.fcr, gen=self.g[self.n-k])
#mesecc = rs_encode_msg_precomp(message, self.n-k, fcr=self.fcr, gen=self.g[self.n-k])
ecc = mesecc[len(message):]
return ecc
|
[
"def",
"encode",
"(",
"self",
",",
"message",
",",
"k",
"=",
"None",
")",
":",
"if",
"not",
"k",
":",
"k",
"=",
"self",
".",
"k",
"message",
",",
"_",
"=",
"self",
".",
"pad",
"(",
"message",
",",
"k",
"=",
"k",
")",
"if",
"self",
".",
"algo",
"==",
"1",
":",
"mesecc",
"=",
"self",
".",
"ecc_manager",
".",
"encode",
"(",
"message",
",",
"k",
"=",
"k",
")",
"elif",
"self",
".",
"algo",
"==",
"2",
":",
"mesecc",
"=",
"self",
".",
"ecc_manager",
".",
"encode_fast",
"(",
"message",
",",
"k",
"=",
"k",
")",
"elif",
"self",
".",
"algo",
"==",
"3",
"or",
"self",
".",
"algo",
"==",
"4",
":",
"mesecc",
"=",
"rs_encode_msg",
"(",
"message",
",",
"self",
".",
"n",
"-",
"k",
",",
"fcr",
"=",
"self",
".",
"fcr",
",",
"gen",
"=",
"self",
".",
"g",
"[",
"self",
".",
"n",
"-",
"k",
"]",
")",
"#mesecc = rs_encode_msg_precomp(message, self.n-k, fcr=self.fcr, gen=self.g[self.n-k])",
"ecc",
"=",
"mesecc",
"[",
"len",
"(",
"message",
")",
":",
"]",
"return",
"ecc"
] |
Encode one message block (up to 255) into an ecc
|
[
"Encode",
"one",
"message",
"block",
"(",
"up",
"to",
"255",
")",
"into",
"an",
"ecc"
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/eccman.py#L153-L166
|
train
|
Encode one message block into an ecc
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrr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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(2208 - 2160) + chr(5545 - 5434) + '\061' + '\062', 55390 - 55382), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(54) + chr(0b100010 + 0o23), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + chr(2011 - 1958) + '\063', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b11 + 0o64) + chr(49), 61069 - 61061), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110110) + chr(0b110110), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(1670 - 1621), 23343 - 23335), nzTpIcepk0o8('\060' + '\157' + chr(51) + '\061' + chr(0b110100 + 0o2), 22357 - 22349), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(0b1010000 + 0o37) + '\x32' + chr(0b101001 + 0o16) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(2209 - 2161) + chr(6814 - 6703) + chr(1099 - 1048) + '\065' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b1011010 + 0o25) + chr(1910 - 1860) + chr(903 - 851), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(219 - 168) + '\062', 45245 - 45237), nzTpIcepk0o8(chr(48) + chr(111) + chr(2598 - 2547) + '\064' + '\065', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110000 + 0o2) + chr(55) + chr(54), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1001010 + 0o45) + chr(0b110111) + chr(973 - 924), 8), nzTpIcepk0o8(chr(795 - 747) + chr(0b1101111) + chr(0b1110 + 0o45) + chr(52) + chr(0b101000 + 0o11), 0b1000), nzTpIcepk0o8('\x30' + chr(0b101100 + 0o103) + '\063' + chr(1419 - 1370) + chr(1037 - 986), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10001 + 0o41) + '\063' + '\066', 0b1000), nzTpIcepk0o8(chr(836 - 788) + chr(8944 - 8833) + chr(0b110010) + chr(102 - 49) + '\x34', 1565 - 1557), nzTpIcepk0o8(chr(1959 - 1911) + '\157' + chr(0b110001) + chr(0b101010 + 0o12) + '\061', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10001 + 0o41) + chr(1113 - 1059) + '\x30', ord("\x08")), nzTpIcepk0o8('\060' + chr(9559 - 9448) + chr(51) + '\066' + '\065', 23344 - 23336), nzTpIcepk0o8(chr(48) + chr(0b101 + 0o152) + chr(49) + chr(736 - 681) + chr(829 - 780), 0b1000), nzTpIcepk0o8(chr(48) + chr(9570 - 9459) + chr(50) + chr(0b100001 + 0o20) + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(1549 - 1499) + chr(0b110100) + chr(52), 3316 - 3308), nzTpIcepk0o8('\x30' + '\157' + chr(527 - 474) + chr(1825 - 1774), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b101110 + 0o4) + chr(732 - 678) + '\x31', 0b1000), nzTpIcepk0o8(chr(1289 - 1241) + chr(0b10000 + 0o137) + '\x33' + '\066' + chr(51 - 2), 0b1000), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(111) + chr(49) + chr(1390 - 1335) + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110111), 24145 - 24137), nzTpIcepk0o8(chr(0b110000) + chr(9802 - 9691) + chr(0b101010 + 0o10) + chr(50) + chr(0b110101), 6309 - 6301), nzTpIcepk0o8(chr(499 - 451) + '\157' + chr(1677 - 1627) + chr(0b110010) + chr(2501 - 2446), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b110111 + 0o70) + chr(0b110010) + '\061', 0o10), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1101111) + chr(0b110001) + '\x30' + chr(52), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + chr(0b110110), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b1110 + 0o44) + '\066' + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b101010 + 0o10) + '\062' + '\x30', 0b1000), nzTpIcepk0o8(chr(1782 - 1734) + chr(0b1100111 + 0o10) + chr(0b100 + 0o57) + chr(0b110101) + chr(0b110110), 0o10), nzTpIcepk0o8('\060' + chr(1016 - 905) + chr(591 - 542) + '\x31' + chr(2386 - 2337), ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(111) + chr(0b110001) + chr(0b110101) + '\063', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(711 - 600) + chr(0b100100 + 0o15) + chr(732 - 678) + chr(50), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + chr(53) + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'$'), '\x64' + chr(0b1100101) + '\143' + '\157' + '\144' + '\145')(chr(117) + chr(0b1110100) + chr(2988 - 2886) + chr(889 - 844) + chr(2803 - 2747)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def YqIaRFfeo4Ha(hXMPsSrOQzbh, FksNMH1w_ns6, B6UAF1zReOyJ=None):
if not B6UAF1zReOyJ:
B6UAF1zReOyJ = hXMPsSrOQzbh.B6UAF1zReOyJ
(FksNMH1w_ns6, zIqcgNgQ9U6F) = hXMPsSrOQzbh.UHQQhh8SbxNs(FksNMH1w_ns6, k=B6UAF1zReOyJ)
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'g/\x9ez\x07E\x88\x8d\x9c%C\xd3'), chr(0b1001 + 0o133) + '\145' + '\143' + chr(8842 - 8731) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(11544 - 11428) + chr(0b100111 + 0o77) + chr(0b100 + 0o51) + chr(2628 - 2572))) == nzTpIcepk0o8(chr(48) + chr(111) + '\061', 8):
Tk2HjUvrQQRt = hXMPsSrOQzbh.ecc_manager.YqIaRFfeo4Ha(FksNMH1w_ns6, k=B6UAF1zReOyJ)
elif roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'g/\x9ez\x07E\x88\x8d\x9c%C\xd3'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(111) + chr(0b1100100) + '\x65')(chr(0b1110101) + '\164' + chr(0b1100110) + chr(45) + '\070')) == nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2181 - 2131), ord("\x08")):
Tk2HjUvrQQRt = hXMPsSrOQzbh.ecc_manager.encode_fast(FksNMH1w_ns6, k=B6UAF1zReOyJ)
elif roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'g/\x9ez\x07E\x88\x8d\x9c%C\xd3'), '\x64' + chr(3991 - 3890) + chr(99) + chr(0b1001111 + 0o40) + chr(5594 - 5494) + chr(0b1011011 + 0o12))(chr(0b1001 + 0o154) + chr(521 - 405) + '\146' + chr(0b101101) + chr(0b101010 + 0o16))) == nzTpIcepk0o8(chr(48) + chr(111) + chr(1387 - 1336), ord("\x08")) or roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'g/\x9ez\x07E\x88\x8d\x9c%C\xd3'), chr(0b10111 + 0o115) + chr(0b10100 + 0o121) + chr(0b1100011) + chr(0b1101111) + chr(0b1001100 + 0o30) + '\x65')(chr(117) + chr(116) + '\x66' + '\x2d' + '\070')) == nzTpIcepk0o8(chr(48) + '\x6f' + chr(52), ord("\x08")):
Tk2HjUvrQQRt = Jbve8znsbeqk(FksNMH1w_ns6, hXMPsSrOQzbh.NoZxuO7wjArS - B6UAF1zReOyJ, fcr=hXMPsSrOQzbh.fcr, gen=hXMPsSrOQzbh.KQq7Z9J63zv1[hXMPsSrOQzbh.NoZxuO7wjArS - B6UAF1zReOyJ])
cRb7OGyXJeT1 = Tk2HjUvrQQRt[ftfygxgFas5X(FksNMH1w_ns6):]
return cRb7OGyXJeT1
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/eccman.py
|
ECCMan.decode
|
def decode(self, message, ecc, k=None, enable_erasures=False, erasures_char="\x00", only_erasures=False):
'''Repair a message and its ecc also, given the message and its ecc (both can be corrupted, we will still try to fix both of them)'''
if not k: k = self.k
# Optimization, use bytearray
if isinstance(message, _str):
message = bytearray([ord(x) for x in message])
ecc = bytearray([ord(x) for x in ecc])
# Detect erasures positions and replace with null bytes (replacing erasures with null bytes is necessary for correct syndrome computation)
# Note that this must be done before padding, else we risk counting the padded null bytes as erasures!
erasures_pos = None
if enable_erasures:
# Concatenate to find erasures in the whole codeword
mesecc = message + ecc
# Convert char to a int (because we use a bytearray)
if isinstance(erasures_char, _str): erasures_char = ord(erasures_char)
# Find the positions of the erased characters
erasures_pos = [i for i in xrange(len(mesecc)) if mesecc[i] == erasures_char]
# Failing case: no erasures could be found and we want to only correct erasures, then we return the message as-is
if only_erasures and not erasures_pos: return message, ecc
# Pad with null bytes if necessary
message, pad = self.pad(message, k=k)
ecc, _ = self.rpad(ecc, k=k) # fill ecc with null bytes if too small (maybe the field delimiters were misdetected and this truncated the ecc? But we maybe still can correct if the truncation is less than the resilience rate)
# If the message was left padded, then we need to update the positions of the erasures
if erasures_pos and pad:
len_pad = len(pad)
erasures_pos = [x+len_pad for x in erasures_pos]
# Decoding
if self.algo == 1:
msg_repaired, ecc_repaired = self.ecc_manager.decode(message + ecc, nostrip=True, k=k, erasures_pos=erasures_pos, only_erasures=only_erasures) # Avoid automatic stripping because we are working with binary streams, thus we should manually strip padding only when we know we padded
elif self.algo == 2:
msg_repaired, ecc_repaired = self.ecc_manager.decode_fast(message + ecc, nostrip=True, k=k, erasures_pos=erasures_pos, only_erasures=only_erasures)
elif self.algo == 3:
#msg_repaired, ecc_repaired = self.ecc_manager.decode_fast(message + ecc, nostrip=True, k=k, erasures_pos=erasures_pos, only_erasures=only_erasures)
msg_repaired, ecc_repaired = reedsolo.rs_correct_msg_nofsynd(bytearray(message + ecc), self.n-k, fcr=self.fcr, generator=self.gen_nb, erase_pos=erasures_pos, only_erasures=only_erasures)
msg_repaired = bytearray(msg_repaired)
ecc_repaired = bytearray(ecc_repaired)
elif self.algo == 4:
msg_repaired, ecc_repaired = reedsolo.rs_correct_msg(bytearray(message + ecc), self.n-k, fcr=self.fcr, generator=self.gen_nb, erase_pos=erasures_pos, only_erasures=only_erasures)
msg_repaired = bytearray(msg_repaired)
ecc_repaired = bytearray(ecc_repaired)
if pad: # Strip the null bytes if we padded the message before decoding
msg_repaired = msg_repaired[len(pad):len(msg_repaired)]
return msg_repaired, ecc_repaired
|
python
|
def decode(self, message, ecc, k=None, enable_erasures=False, erasures_char="\x00", only_erasures=False):
'''Repair a message and its ecc also, given the message and its ecc (both can be corrupted, we will still try to fix both of them)'''
if not k: k = self.k
# Optimization, use bytearray
if isinstance(message, _str):
message = bytearray([ord(x) for x in message])
ecc = bytearray([ord(x) for x in ecc])
# Detect erasures positions and replace with null bytes (replacing erasures with null bytes is necessary for correct syndrome computation)
# Note that this must be done before padding, else we risk counting the padded null bytes as erasures!
erasures_pos = None
if enable_erasures:
# Concatenate to find erasures in the whole codeword
mesecc = message + ecc
# Convert char to a int (because we use a bytearray)
if isinstance(erasures_char, _str): erasures_char = ord(erasures_char)
# Find the positions of the erased characters
erasures_pos = [i for i in xrange(len(mesecc)) if mesecc[i] == erasures_char]
# Failing case: no erasures could be found and we want to only correct erasures, then we return the message as-is
if only_erasures and not erasures_pos: return message, ecc
# Pad with null bytes if necessary
message, pad = self.pad(message, k=k)
ecc, _ = self.rpad(ecc, k=k) # fill ecc with null bytes if too small (maybe the field delimiters were misdetected and this truncated the ecc? But we maybe still can correct if the truncation is less than the resilience rate)
# If the message was left padded, then we need to update the positions of the erasures
if erasures_pos and pad:
len_pad = len(pad)
erasures_pos = [x+len_pad for x in erasures_pos]
# Decoding
if self.algo == 1:
msg_repaired, ecc_repaired = self.ecc_manager.decode(message + ecc, nostrip=True, k=k, erasures_pos=erasures_pos, only_erasures=only_erasures) # Avoid automatic stripping because we are working with binary streams, thus we should manually strip padding only when we know we padded
elif self.algo == 2:
msg_repaired, ecc_repaired = self.ecc_manager.decode_fast(message + ecc, nostrip=True, k=k, erasures_pos=erasures_pos, only_erasures=only_erasures)
elif self.algo == 3:
#msg_repaired, ecc_repaired = self.ecc_manager.decode_fast(message + ecc, nostrip=True, k=k, erasures_pos=erasures_pos, only_erasures=only_erasures)
msg_repaired, ecc_repaired = reedsolo.rs_correct_msg_nofsynd(bytearray(message + ecc), self.n-k, fcr=self.fcr, generator=self.gen_nb, erase_pos=erasures_pos, only_erasures=only_erasures)
msg_repaired = bytearray(msg_repaired)
ecc_repaired = bytearray(ecc_repaired)
elif self.algo == 4:
msg_repaired, ecc_repaired = reedsolo.rs_correct_msg(bytearray(message + ecc), self.n-k, fcr=self.fcr, generator=self.gen_nb, erase_pos=erasures_pos, only_erasures=only_erasures)
msg_repaired = bytearray(msg_repaired)
ecc_repaired = bytearray(ecc_repaired)
if pad: # Strip the null bytes if we padded the message before decoding
msg_repaired = msg_repaired[len(pad):len(msg_repaired)]
return msg_repaired, ecc_repaired
|
[
"def",
"decode",
"(",
"self",
",",
"message",
",",
"ecc",
",",
"k",
"=",
"None",
",",
"enable_erasures",
"=",
"False",
",",
"erasures_char",
"=",
"\"\\x00\"",
",",
"only_erasures",
"=",
"False",
")",
":",
"if",
"not",
"k",
":",
"k",
"=",
"self",
".",
"k",
"# Optimization, use bytearray",
"if",
"isinstance",
"(",
"message",
",",
"_str",
")",
":",
"message",
"=",
"bytearray",
"(",
"[",
"ord",
"(",
"x",
")",
"for",
"x",
"in",
"message",
"]",
")",
"ecc",
"=",
"bytearray",
"(",
"[",
"ord",
"(",
"x",
")",
"for",
"x",
"in",
"ecc",
"]",
")",
"# Detect erasures positions and replace with null bytes (replacing erasures with null bytes is necessary for correct syndrome computation)",
"# Note that this must be done before padding, else we risk counting the padded null bytes as erasures!",
"erasures_pos",
"=",
"None",
"if",
"enable_erasures",
":",
"# Concatenate to find erasures in the whole codeword",
"mesecc",
"=",
"message",
"+",
"ecc",
"# Convert char to a int (because we use a bytearray)",
"if",
"isinstance",
"(",
"erasures_char",
",",
"_str",
")",
":",
"erasures_char",
"=",
"ord",
"(",
"erasures_char",
")",
"# Find the positions of the erased characters",
"erasures_pos",
"=",
"[",
"i",
"for",
"i",
"in",
"xrange",
"(",
"len",
"(",
"mesecc",
")",
")",
"if",
"mesecc",
"[",
"i",
"]",
"==",
"erasures_char",
"]",
"# Failing case: no erasures could be found and we want to only correct erasures, then we return the message as-is",
"if",
"only_erasures",
"and",
"not",
"erasures_pos",
":",
"return",
"message",
",",
"ecc",
"# Pad with null bytes if necessary",
"message",
",",
"pad",
"=",
"self",
".",
"pad",
"(",
"message",
",",
"k",
"=",
"k",
")",
"ecc",
",",
"_",
"=",
"self",
".",
"rpad",
"(",
"ecc",
",",
"k",
"=",
"k",
")",
"# fill ecc with null bytes if too small (maybe the field delimiters were misdetected and this truncated the ecc? But we maybe still can correct if the truncation is less than the resilience rate)",
"# If the message was left padded, then we need to update the positions of the erasures",
"if",
"erasures_pos",
"and",
"pad",
":",
"len_pad",
"=",
"len",
"(",
"pad",
")",
"erasures_pos",
"=",
"[",
"x",
"+",
"len_pad",
"for",
"x",
"in",
"erasures_pos",
"]",
"# Decoding",
"if",
"self",
".",
"algo",
"==",
"1",
":",
"msg_repaired",
",",
"ecc_repaired",
"=",
"self",
".",
"ecc_manager",
".",
"decode",
"(",
"message",
"+",
"ecc",
",",
"nostrip",
"=",
"True",
",",
"k",
"=",
"k",
",",
"erasures_pos",
"=",
"erasures_pos",
",",
"only_erasures",
"=",
"only_erasures",
")",
"# Avoid automatic stripping because we are working with binary streams, thus we should manually strip padding only when we know we padded",
"elif",
"self",
".",
"algo",
"==",
"2",
":",
"msg_repaired",
",",
"ecc_repaired",
"=",
"self",
".",
"ecc_manager",
".",
"decode_fast",
"(",
"message",
"+",
"ecc",
",",
"nostrip",
"=",
"True",
",",
"k",
"=",
"k",
",",
"erasures_pos",
"=",
"erasures_pos",
",",
"only_erasures",
"=",
"only_erasures",
")",
"elif",
"self",
".",
"algo",
"==",
"3",
":",
"#msg_repaired, ecc_repaired = self.ecc_manager.decode_fast(message + ecc, nostrip=True, k=k, erasures_pos=erasures_pos, only_erasures=only_erasures)",
"msg_repaired",
",",
"ecc_repaired",
"=",
"reedsolo",
".",
"rs_correct_msg_nofsynd",
"(",
"bytearray",
"(",
"message",
"+",
"ecc",
")",
",",
"self",
".",
"n",
"-",
"k",
",",
"fcr",
"=",
"self",
".",
"fcr",
",",
"generator",
"=",
"self",
".",
"gen_nb",
",",
"erase_pos",
"=",
"erasures_pos",
",",
"only_erasures",
"=",
"only_erasures",
")",
"msg_repaired",
"=",
"bytearray",
"(",
"msg_repaired",
")",
"ecc_repaired",
"=",
"bytearray",
"(",
"ecc_repaired",
")",
"elif",
"self",
".",
"algo",
"==",
"4",
":",
"msg_repaired",
",",
"ecc_repaired",
"=",
"reedsolo",
".",
"rs_correct_msg",
"(",
"bytearray",
"(",
"message",
"+",
"ecc",
")",
",",
"self",
".",
"n",
"-",
"k",
",",
"fcr",
"=",
"self",
".",
"fcr",
",",
"generator",
"=",
"self",
".",
"gen_nb",
",",
"erase_pos",
"=",
"erasures_pos",
",",
"only_erasures",
"=",
"only_erasures",
")",
"msg_repaired",
"=",
"bytearray",
"(",
"msg_repaired",
")",
"ecc_repaired",
"=",
"bytearray",
"(",
"ecc_repaired",
")",
"if",
"pad",
":",
"# Strip the null bytes if we padded the message before decoding",
"msg_repaired",
"=",
"msg_repaired",
"[",
"len",
"(",
"pad",
")",
":",
"len",
"(",
"msg_repaired",
")",
"]",
"return",
"msg_repaired",
",",
"ecc_repaired"
] |
Repair a message and its ecc also, given the message and its ecc (both can be corrupted, we will still try to fix both of them)
|
[
"Repair",
"a",
"message",
"and",
"its",
"ecc",
"also",
"given",
"the",
"message",
"and",
"its",
"ecc",
"(",
"both",
"can",
"be",
"corrupted",
"we",
"will",
"still",
"try",
"to",
"fix",
"both",
"of",
"them",
")"
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/eccman.py#L168-L216
|
train
|
Repair a message and its ecc also given the message and its 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,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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uFgW,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(931 - 883) + chr(0b1101 + 0o142) + chr(0b101001 + 0o12) + '\x35' + '\x31', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + '\x35' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(1909 - 1861) + chr(111) + chr(50) + chr(0b110101) + chr(52), 0o10), nzTpIcepk0o8('\060' + chr(5951 - 5840) + '\062' + '\x30' + chr(52), 50957 - 50949), nzTpIcepk0o8('\x30' + chr(0b1000 + 0o147) + chr(0b10111 + 0o32) + chr(823 - 774) + '\x32', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\x32' + chr(0b110010) + chr(1869 - 1820), 0b1000), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(111) + '\x33' + '\063' + '\063', 57822 - 57814), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + chr(51) + '\x31', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10 + 0o57) + '\x35' + chr(0b1000 + 0o56), 0b1000), nzTpIcepk0o8(chr(311 - 263) + '\157' + '\x32' + chr(0b111 + 0o52) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1001010 + 0o45) + '\x33' + '\x34', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\063' + chr(0b100101 + 0o20) + chr(2485 - 2435), 14578 - 14570), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1000101 + 0o52) + chr(0b110010) + '\x36' + chr(0b100001 + 0o24), 36072 - 36064), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + '\x30' + chr(52), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1380 - 1331) + chr(52) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1463 - 1413) + chr(0b110101) + chr(49), 0o10), nzTpIcepk0o8(chr(1671 - 1623) + chr(0b1100101 + 0o12) + '\063' + chr(0b110100) + '\061', 0o10), nzTpIcepk0o8('\060' + '\157' + '\065' + '\067', 0b1000), nzTpIcepk0o8(chr(48) + chr(2589 - 2478) + chr(2512 - 2458) + chr(50), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b100110 + 0o111) + chr(0b100110 + 0o17) + chr(370 - 318), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b100101 + 0o14) + chr(0b11010 + 0o30) + '\062', 0b1000), nzTpIcepk0o8('\x30' + chr(6655 - 6544) + '\062' + chr(51) + chr(1377 - 1322), 0b1000), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\157' + chr(49) + '\065' + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + '\062' + chr(2420 - 2366) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11001 + 0o31) + chr(53) + chr(640 - 590), 18575 - 18567), nzTpIcepk0o8(chr(1720 - 1672) + '\x6f' + chr(49) + chr(51) + chr(1573 - 1521), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b1010 + 0o47) + '\x31' + chr(53), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + chr(0b110001) + chr(0b110010), 8), nzTpIcepk0o8(chr(1913 - 1865) + chr(111) + '\061' + chr(51) + chr(52), 8), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(51) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + chr(1028 - 977) + chr(1192 - 1143) + chr(48), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\061' + '\x36' + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(2053 - 2005) + chr(111) + chr(49) + '\062' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(1341 - 1293) + '\157' + chr(0b110001 + 0o2) + chr(0b110010) + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(0b110000 + 0o77) + chr(1783 - 1732) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1101 + 0o142) + '\x31' + chr(0b11011 + 0o30) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b11001 + 0o32) + '\x35' + chr(69 - 17), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b0 + 0o157) + '\061' + chr(0b110010) + chr(0b110101), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(11652 - 11541) + '\065' + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xc7'), '\144' + chr(101) + chr(0b1100011) + '\x6f' + chr(0b101000 + 0o74) + chr(9598 - 9497))('\x75' + chr(0b1110100) + chr(0b100000 + 0o106) + chr(1847 - 1802) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def lfbFsdWlT3MB(hXMPsSrOQzbh, FksNMH1w_ns6, cRb7OGyXJeT1, B6UAF1zReOyJ=None, hCiBMg59xw7h=nzTpIcepk0o8('\060' + chr(111) + chr(0b110000), 0b1000), lV6296g7ANLG=roI3spqORKae(ES5oEprVxulp(b'\xe9'), chr(0b10110 + 0o116) + chr(0b1011000 + 0o15) + '\x63' + chr(111) + '\x64' + chr(0b100110 + 0o77))(chr(0b1110101) + chr(9824 - 9708) + '\x66' + chr(0b101101) + '\x38'), Xz01uG11ClMN=nzTpIcepk0o8(chr(84 - 36) + chr(0b1001 + 0o146) + '\060', 8)):
if not B6UAF1zReOyJ:
B6UAF1zReOyJ = hXMPsSrOQzbh.B6UAF1zReOyJ
if suIjIS24Zkqw(FksNMH1w_ns6, O8PC_cn94aGO):
FksNMH1w_ns6 = MdkNqd1bagO6([RmKXV0QRcrJP(bI5jsQ9OkQtj) for bI5jsQ9OkQtj in FksNMH1w_ns6])
cRb7OGyXJeT1 = MdkNqd1bagO6([RmKXV0QRcrJP(bI5jsQ9OkQtj) for bI5jsQ9OkQtj in cRb7OGyXJeT1])
umsrLhYf182Z = None
if hCiBMg59xw7h:
Tk2HjUvrQQRt = FksNMH1w_ns6 + cRb7OGyXJeT1
if suIjIS24Zkqw(lV6296g7ANLG, O8PC_cn94aGO):
lV6296g7ANLG = RmKXV0QRcrJP(lV6296g7ANLG)
umsrLhYf182Z = [ZlbFMSG8gCoF for ZlbFMSG8gCoF in zBiXJ6gPq38D(ftfygxgFas5X(Tk2HjUvrQQRt)) if Tk2HjUvrQQRt[ZlbFMSG8gCoF] == lV6296g7ANLG]
if Xz01uG11ClMN and (not umsrLhYf182Z):
return (FksNMH1w_ns6, cRb7OGyXJeT1)
(FksNMH1w_ns6, UHQQhh8SbxNs) = hXMPsSrOQzbh.UHQQhh8SbxNs(FksNMH1w_ns6, k=B6UAF1zReOyJ)
(cRb7OGyXJeT1, zIqcgNgQ9U6F) = hXMPsSrOQzbh.rpad(cRb7OGyXJeT1, k=B6UAF1zReOyJ)
if umsrLhYf182Z and UHQQhh8SbxNs:
N_hwUeboPVuX = ftfygxgFas5X(UHQQhh8SbxNs)
umsrLhYf182Z = [bI5jsQ9OkQtj + N_hwUeboPVuX for bI5jsQ9OkQtj in umsrLhYf182Z]
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x84\xb2\x99\xc7{R\xd7\xef\xa9#7\xbe'), chr(9802 - 9702) + chr(101) + '\143' + chr(0b1101111) + '\144' + chr(101))('\165' + chr(9923 - 9807) + chr(0b1010010 + 0o24) + chr(1479 - 1434) + '\070')) == nzTpIcepk0o8(chr(1537 - 1489) + '\157' + chr(779 - 730), 5146 - 5138):
(xkJ2PxKIwJ8f, RSGZOsde0LSt) = hXMPsSrOQzbh.ecc_manager.lfbFsdWlT3MB(FksNMH1w_ns6 + cRb7OGyXJeT1, nostrip=nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1101111) + '\061', 8), k=B6UAF1zReOyJ, erasures_pos=umsrLhYf182Z, only_erasures=Xz01uG11ClMN)
elif roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x84\xb2\x99\xc7{R\xd7\xef\xa9#7\xbe'), chr(100) + chr(101) + '\x63' + '\x6f' + chr(100) + chr(101))(chr(0b111000 + 0o75) + chr(0b1000110 + 0o56) + chr(2785 - 2683) + chr(45) + chr(0b111000))) == nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1101001 + 0o6) + '\x32', ord("\x08")):
(xkJ2PxKIwJ8f, RSGZOsde0LSt) = hXMPsSrOQzbh.ecc_manager.decode_fast(FksNMH1w_ns6 + cRb7OGyXJeT1, nostrip=nzTpIcepk0o8(chr(1859 - 1811) + '\157' + '\x31', 8), k=B6UAF1zReOyJ, erasures_pos=umsrLhYf182Z, only_erasures=Xz01uG11ClMN)
elif roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x84\xb2\x99\xc7{R\xd7\xef\xa9#7\xbe'), chr(0b0 + 0o144) + '\x65' + chr(1807 - 1708) + '\157' + chr(0b1100100) + chr(0b110 + 0o137))(chr(13683 - 13566) + chr(8491 - 8375) + '\x66' + chr(45) + chr(0b101000 + 0o20))) == nzTpIcepk0o8('\x30' + chr(111) + chr(0b10110 + 0o35), 0b1000):
(xkJ2PxKIwJ8f, RSGZOsde0LSt) = SYQVrMiy0JXa.rs_correct_msg_nofsynd(MdkNqd1bagO6(FksNMH1w_ns6 + cRb7OGyXJeT1), hXMPsSrOQzbh.NoZxuO7wjArS - B6UAF1zReOyJ, fcr=hXMPsSrOQzbh.fcr, generator=hXMPsSrOQzbh.gen_nb, erase_pos=umsrLhYf182Z, only_erasures=Xz01uG11ClMN)
xkJ2PxKIwJ8f = MdkNqd1bagO6(xkJ2PxKIwJ8f)
RSGZOsde0LSt = MdkNqd1bagO6(RSGZOsde0LSt)
elif roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x84\xb2\x99\xc7{R\xd7\xef\xa9#7\xbe'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(3828 - 3717) + chr(0b1100100) + chr(0b1011110 + 0o7))(chr(117) + chr(8959 - 8843) + chr(0b1100110) + chr(0b101101) + chr(0b111000))) == nzTpIcepk0o8(chr(0b110000) + chr(0b1101110 + 0o1) + chr(0b101101 + 0o7), 0b1000):
(xkJ2PxKIwJ8f, RSGZOsde0LSt) = SYQVrMiy0JXa.rs_correct_msg(MdkNqd1bagO6(FksNMH1w_ns6 + cRb7OGyXJeT1), hXMPsSrOQzbh.NoZxuO7wjArS - B6UAF1zReOyJ, fcr=hXMPsSrOQzbh.fcr, generator=hXMPsSrOQzbh.gen_nb, erase_pos=umsrLhYf182Z, only_erasures=Xz01uG11ClMN)
xkJ2PxKIwJ8f = MdkNqd1bagO6(xkJ2PxKIwJ8f)
RSGZOsde0LSt = MdkNqd1bagO6(RSGZOsde0LSt)
if UHQQhh8SbxNs:
xkJ2PxKIwJ8f = xkJ2PxKIwJ8f[ftfygxgFas5X(UHQQhh8SbxNs):ftfygxgFas5X(xkJ2PxKIwJ8f)]
return (xkJ2PxKIwJ8f, RSGZOsde0LSt)
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/eccman.py
|
ECCMan.pad
|
def pad(self, message, k=None):
'''Automatically left pad with null bytes a message if too small, or leave unchanged if not necessary. This allows to keep track of padding and strip the null bytes after decoding reliably with binary data. Equivalent to shortening (shortened reed-solomon code).'''
if not k: k = self.k
pad = None
if len(message) < k:
#pad = "\x00" * (k-len(message))
pad = bytearray(k-len(message))
message = pad + message
return [message, pad]
|
python
|
def pad(self, message, k=None):
'''Automatically left pad with null bytes a message if too small, or leave unchanged if not necessary. This allows to keep track of padding and strip the null bytes after decoding reliably with binary data. Equivalent to shortening (shortened reed-solomon code).'''
if not k: k = self.k
pad = None
if len(message) < k:
#pad = "\x00" * (k-len(message))
pad = bytearray(k-len(message))
message = pad + message
return [message, pad]
|
[
"def",
"pad",
"(",
"self",
",",
"message",
",",
"k",
"=",
"None",
")",
":",
"if",
"not",
"k",
":",
"k",
"=",
"self",
".",
"k",
"pad",
"=",
"None",
"if",
"len",
"(",
"message",
")",
"<",
"k",
":",
"#pad = \"\\x00\" * (k-len(message))",
"pad",
"=",
"bytearray",
"(",
"k",
"-",
"len",
"(",
"message",
")",
")",
"message",
"=",
"pad",
"+",
"message",
"return",
"[",
"message",
",",
"pad",
"]"
] |
Automatically left pad with null bytes a message if too small, or leave unchanged if not necessary. This allows to keep track of padding and strip the null bytes after decoding reliably with binary data. Equivalent to shortening (shortened reed-solomon code).
|
[
"Automatically",
"left",
"pad",
"with",
"null",
"bytes",
"a",
"message",
"if",
"too",
"small",
"or",
"leave",
"unchanged",
"if",
"not",
"necessary",
".",
"This",
"allows",
"to",
"keep",
"track",
"of",
"padding",
"and",
"strip",
"the",
"null",
"bytes",
"after",
"decoding",
"reliably",
"with",
"binary",
"data",
".",
"Equivalent",
"to",
"shortening",
"(",
"shortened",
"reed",
"-",
"solomon",
"code",
")",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/eccman.py#L218-L226
|
train
|
Automatically left pad with null bytes a message if too small or leave unchanged if not necessary.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3W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ezIXzQNA,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(704 - 593) + '\061' + chr(50), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b10100 + 0o36) + chr(762 - 710) + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1000 + 0o52) + '\061' + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(5005 - 4894) + chr(0b110001) + chr(2488 - 2434) + '\065', 0o10), nzTpIcepk0o8(chr(1191 - 1143) + '\x6f' + '\061' + chr(1284 - 1234) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(2018 - 1970) + chr(0b1101111) + '\x31' + chr(0b110001) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\x6f' + chr(51) + chr(0b110000) + '\062', 13700 - 13692), nzTpIcepk0o8(chr(973 - 925) + '\157' + chr(0b110001) + chr(0b1 + 0o61) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\062' + chr(0b11111 + 0o27) + chr(0b1101 + 0o46), 48023 - 48015), nzTpIcepk0o8(chr(446 - 398) + '\x6f' + chr(0b110001) + chr(50) + chr(0b11011 + 0o34), 8), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\157' + chr(0b101101 + 0o5) + '\060' + chr(202 - 148), ord("\x08")), nzTpIcepk0o8(chr(2161 - 2113) + chr(0b10 + 0o155) + chr(1565 - 1515) + chr(2645 - 2592) + chr(0b101101 + 0o4), 30741 - 30733), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101111 + 0o2) + chr(0b110000) + chr(49), 0o10), nzTpIcepk0o8(chr(1852 - 1804) + chr(111) + chr(49) + '\063' + chr(462 - 413), 58176 - 58168), nzTpIcepk0o8('\x30' + chr(7038 - 6927) + chr(0b10010 + 0o40) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1877 - 1827) + chr(0b110101) + chr(0b11011 + 0o32), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + '\064' + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(582 - 532) + chr(54) + chr(55), 0o10), nzTpIcepk0o8(chr(1782 - 1734) + chr(3379 - 3268) + chr(2289 - 2240) + chr(0b110010) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1011110 + 0o21) + chr(50) + chr(0b100110 + 0o17) + '\067', ord("\x08")), nzTpIcepk0o8('\x30' + chr(5904 - 5793) + chr(0b110001) + chr(0b100010 + 0o25) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1101111) + '\x33' + chr(981 - 933) + '\060', 0o10), nzTpIcepk0o8(chr(48) + chr(6927 - 6816) + '\x33' + '\066', 0o10), nzTpIcepk0o8('\060' + '\157' + '\x32' + chr(0b101010 + 0o15) + '\x30', 0o10), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(111) + '\062' + chr(0b11110 + 0o22) + '\065', 30644 - 30636), nzTpIcepk0o8(chr(302 - 254) + chr(7022 - 6911) + chr(0b100101 + 0o16) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + '\x37' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(9009 - 8898) + '\x33' + chr(0b101110 + 0o6) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\064' + '\063', 63697 - 63689), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\157' + chr(1397 - 1347) + chr(49), 59077 - 59069), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x37' + chr(53), ord("\x08")), nzTpIcepk0o8('\x30' + chr(11983 - 11872) + chr(0b1101 + 0o43), 0b1000), nzTpIcepk0o8('\x30' + chr(0b111100 + 0o63) + chr(0b110001) + chr(50) + chr(53), 8), nzTpIcepk0o8(chr(429 - 381) + chr(0b110101 + 0o72) + chr(0b100100 + 0o15) + '\x30', 30278 - 30270), nzTpIcepk0o8('\x30' + chr(111) + chr(0b100111 + 0o12) + chr(0b110 + 0o53) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b100001 + 0o20) + chr(0b10110 + 0o40) + chr(0b1001 + 0o50), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b1101 + 0o45) + chr(0b110111) + '\x36', 0o10), nzTpIcepk0o8(chr(1841 - 1793) + '\157' + chr(49) + chr(50) + '\063', 50386 - 50378), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(49) + '\x34', 0o10), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(111) + '\063' + '\062' + chr(0b11000 + 0o37), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\x6f' + chr(176 - 123) + chr(0b110000), 4448 - 4440)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'$'), chr(5547 - 5447) + chr(0b1100101) + '\x63' + chr(11789 - 11678) + chr(9331 - 9231) + chr(101))(chr(0b1100110 + 0o17) + chr(0b1010111 + 0o35) + chr(0b110 + 0o140) + '\x2d' + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def UHQQhh8SbxNs(hXMPsSrOQzbh, FksNMH1w_ns6, B6UAF1zReOyJ=None):
if not B6UAF1zReOyJ:
B6UAF1zReOyJ = hXMPsSrOQzbh.B6UAF1zReOyJ
UHQQhh8SbxNs = None
if ftfygxgFas5X(FksNMH1w_ns6) < B6UAF1zReOyJ:
UHQQhh8SbxNs = MdkNqd1bagO6(B6UAF1zReOyJ - ftfygxgFas5X(FksNMH1w_ns6))
FksNMH1w_ns6 = UHQQhh8SbxNs + FksNMH1w_ns6
return [FksNMH1w_ns6, UHQQhh8SbxNs]
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/eccman.py
|
ECCMan.rpad
|
def rpad(self, ecc, k=None):
'''Automatically right pad with null bytes an ecc to fill for missing bytes if too small, or leave unchanged if not necessary. This can be used as a workaround for field delimiter misdetection. Equivalent to puncturing (punctured reed-solomon code).'''
if not k: k = self.k
pad = None
if len(ecc) < self.n-k:
print("Warning: the ecc field may have been truncated (entrymarker or field_delim misdetection?).")
#pad = "\x00" * (self.n-k-len(ecc))
pad = bytearray(self.n-k-len(ecc))
ecc = ecc + pad
return [ecc, pad]
|
python
|
def rpad(self, ecc, k=None):
'''Automatically right pad with null bytes an ecc to fill for missing bytes if too small, or leave unchanged if not necessary. This can be used as a workaround for field delimiter misdetection. Equivalent to puncturing (punctured reed-solomon code).'''
if not k: k = self.k
pad = None
if len(ecc) < self.n-k:
print("Warning: the ecc field may have been truncated (entrymarker or field_delim misdetection?).")
#pad = "\x00" * (self.n-k-len(ecc))
pad = bytearray(self.n-k-len(ecc))
ecc = ecc + pad
return [ecc, pad]
|
[
"def",
"rpad",
"(",
"self",
",",
"ecc",
",",
"k",
"=",
"None",
")",
":",
"if",
"not",
"k",
":",
"k",
"=",
"self",
".",
"k",
"pad",
"=",
"None",
"if",
"len",
"(",
"ecc",
")",
"<",
"self",
".",
"n",
"-",
"k",
":",
"print",
"(",
"\"Warning: the ecc field may have been truncated (entrymarker or field_delim misdetection?).\"",
")",
"#pad = \"\\x00\" * (self.n-k-len(ecc))",
"pad",
"=",
"bytearray",
"(",
"self",
".",
"n",
"-",
"k",
"-",
"len",
"(",
"ecc",
")",
")",
"ecc",
"=",
"ecc",
"+",
"pad",
"return",
"[",
"ecc",
",",
"pad",
"]"
] |
Automatically right pad with null bytes an ecc to fill for missing bytes if too small, or leave unchanged if not necessary. This can be used as a workaround for field delimiter misdetection. Equivalent to puncturing (punctured reed-solomon code).
|
[
"Automatically",
"right",
"pad",
"with",
"null",
"bytes",
"an",
"ecc",
"to",
"fill",
"for",
"missing",
"bytes",
"if",
"too",
"small",
"or",
"leave",
"unchanged",
"if",
"not",
"necessary",
".",
"This",
"can",
"be",
"used",
"as",
"a",
"workaround",
"for",
"field",
"delimiter",
"misdetection",
".",
"Equivalent",
"to",
"puncturing",
"(",
"punctured",
"reed",
"-",
"solomon",
"code",
")",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/eccman.py#L228-L237
|
train
|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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) + chr(0b110011) + chr(1053 - 1001) + '\067', 50982 - 50974), nzTpIcepk0o8(chr(1081 - 1033) + chr(3298 - 3187) + chr(0b11111 + 0o22) + '\062' + chr(0b1 + 0o61), 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\x6f' + chr(0b11110 + 0o24) + chr(0b100100 + 0o16) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + '\067' + chr(53), 20561 - 20553), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + chr(0b11001 + 0o36) + '\065', 0o10), nzTpIcepk0o8(chr(432 - 384) + chr(111) + chr(0b110001) + chr(0b10111 + 0o37) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(971 - 923) + chr(0b1010101 + 0o32) + chr(0b110011) + '\061' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(375 - 327) + chr(8586 - 8475) + chr(50) + chr(1361 - 1311) + chr(123 - 70), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + chr(0b10011 + 0o35) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1737 - 1686) + '\x36' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(105 - 57) + '\x6f' + chr(1993 - 1942) + chr(0b110011) + chr(1178 - 1129), 50715 - 50707), nzTpIcepk0o8('\x30' + chr(111) + '\063' + chr(0b110000) + chr(53), 0o10), nzTpIcepk0o8(chr(80 - 32) + '\157' + '\061' + '\064' + chr(0b10011 + 0o41), 0b1000), nzTpIcepk0o8('\060' + chr(0b1010110 + 0o31) + chr(0b1 + 0o63) + chr(0b101101 + 0o5), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\062', ord("\x08")), nzTpIcepk0o8('\060' + chr(5335 - 5224) + chr(2271 - 2219) + chr(0b101101 + 0o10), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(989 - 939), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b101011 + 0o104) + chr(49) + '\x30' + chr(1217 - 1164), 49185 - 49177), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\157' + chr(52) + chr(1877 - 1823), ord("\x08")), nzTpIcepk0o8(chr(388 - 340) + chr(111) + chr(1663 - 1613) + '\x36' + '\064', 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x33' + chr(1448 - 1394) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(1118 - 1070) + '\x6f' + '\x37', 28177 - 28169), nzTpIcepk0o8(chr(0b110000) + chr(0b1000 + 0o147) + chr(1365 - 1315) + '\061' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1101111 + 0o0) + chr(1416 - 1365) + chr(0b110100) + chr(0b110111), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1111 + 0o140) + chr(2166 - 2116) + chr(48) + '\060', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(672 - 621) + chr(0b110100) + chr(0b10010 + 0o36), 24068 - 24060), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + '\x33' + chr(55), 0o10), nzTpIcepk0o8(chr(48) + chr(6244 - 6133) + chr(992 - 937), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + '\065' + '\x35', 13050 - 13042), nzTpIcepk0o8(chr(0b110000) + chr(5129 - 5018) + chr(1886 - 1835) + chr(1478 - 1426) + chr(55), 8), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\x6f' + '\061' + chr(684 - 629) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b101100 + 0o103) + chr(0b110010) + '\x37' + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + '\067', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(0b1111 + 0o45), 0o10), nzTpIcepk0o8(chr(1440 - 1392) + chr(111) + chr(49) + '\062' + chr(283 - 231), ord("\x08")), nzTpIcepk0o8(chr(364 - 316) + chr(3834 - 3723) + chr(52) + chr(1000 - 950), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(0b110100 + 0o3), 5495 - 5487), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(111) + chr(2323 - 2272) + '\x37' + '\064', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(1238 - 1187) + chr(0b11011 + 0o26) + '\x33', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(51) + chr(55), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1101111) + chr(0b10101 + 0o40) + chr(0b101110 + 0o2), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xc9'), chr(0b1001100 + 0o30) + chr(101) + '\143' + chr(6935 - 6824) + '\x64' + '\145')(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(1221 - 1176) + chr(1794 - 1738)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def Iya5bV2fiion(hXMPsSrOQzbh, cRb7OGyXJeT1, B6UAF1zReOyJ=None):
if not B6UAF1zReOyJ:
B6UAF1zReOyJ = hXMPsSrOQzbh.B6UAF1zReOyJ
UHQQhh8SbxNs = None
if ftfygxgFas5X(cRb7OGyXJeT1) < roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa9=\xcf\x05\x889\xfe\xe2\xea\xb4\xab\x96'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(0b1101100 + 0o3) + '\x64' + chr(0b101 + 0o140))(chr(0b1110101 + 0o0) + '\164' + chr(3331 - 3229) + chr(45) + chr(1238 - 1182))) - B6UAF1zReOyJ:
v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\xb03\xe7\x13\x94\x18\xae\xaf\xa0\x81\xb1\xa0DGaF*#O\xd1\x9fc\xaa\x8a\xe1\x99\x7fo\x8c\x91\x19\x9e}i1L/\x88\xb9\xea\x891\xf4\t\x98\x12\xe9\xbd\xe5\x9b\xad\xb7\x1dOcWa T\x94\x9cu\xaa\x81\xe9\x853c\xb2\x83\x19\xd2vatOf\x8f\xaf\xfa\x937\xf6\t\x94\x19\xa7\xaa\xa9\xdb'), chr(100) + '\145' + chr(7627 - 7528) + chr(6082 - 5971) + chr(0b1100100) + '\x65')('\165' + chr(0b100101 + 0o117) + chr(1588 - 1486) + '\055' + chr(56)))
UHQQhh8SbxNs = MdkNqd1bagO6(hXMPsSrOQzbh.NoZxuO7wjArS - B6UAF1zReOyJ - ftfygxgFas5X(cRb7OGyXJeT1))
cRb7OGyXJeT1 = cRb7OGyXJeT1 + UHQQhh8SbxNs
return [cRb7OGyXJeT1, UHQQhh8SbxNs]
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/eccman.py
|
ECCMan.check
|
def check(self, message, ecc, k=None):
'''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.'''
if not k: k = self.k
message, _ = self.pad(message, k=k)
ecc, _ = self.rpad(ecc, k=k)
if self.algo == 1 or self.algo == 2:
return self.ecc_manager.check_fast(message + ecc, k=k)
elif self.algo == 3 or self.algo == 4:
return reedsolo.rs_check(bytearray(message + ecc), self.n-k, fcr=self.fcr, generator=self.gen_nb)
|
python
|
def check(self, message, ecc, k=None):
'''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.'''
if not k: k = self.k
message, _ = self.pad(message, k=k)
ecc, _ = self.rpad(ecc, k=k)
if self.algo == 1 or self.algo == 2:
return self.ecc_manager.check_fast(message + ecc, k=k)
elif self.algo == 3 or self.algo == 4:
return reedsolo.rs_check(bytearray(message + ecc), self.n-k, fcr=self.fcr, generator=self.gen_nb)
|
[
"def",
"check",
"(",
"self",
",",
"message",
",",
"ecc",
",",
"k",
"=",
"None",
")",
":",
"if",
"not",
"k",
":",
"k",
"=",
"self",
".",
"k",
"message",
",",
"_",
"=",
"self",
".",
"pad",
"(",
"message",
",",
"k",
"=",
"k",
")",
"ecc",
",",
"_",
"=",
"self",
".",
"rpad",
"(",
"ecc",
",",
"k",
"=",
"k",
")",
"if",
"self",
".",
"algo",
"==",
"1",
"or",
"self",
".",
"algo",
"==",
"2",
":",
"return",
"self",
".",
"ecc_manager",
".",
"check_fast",
"(",
"message",
"+",
"ecc",
",",
"k",
"=",
"k",
")",
"elif",
"self",
".",
"algo",
"==",
"3",
"or",
"self",
".",
"algo",
"==",
"4",
":",
"return",
"reedsolo",
".",
"rs_check",
"(",
"bytearray",
"(",
"message",
"+",
"ecc",
")",
",",
"self",
".",
"n",
"-",
"k",
",",
"fcr",
"=",
"self",
".",
"fcr",
",",
"generator",
"=",
"self",
".",
"gen_nb",
")"
] |
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.
|
[
"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",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/eccman.py#L239-L247
|
train
|
Check if there s any error in a message + ecc. Can be used before decoding and addition to hashes to detect if the message was fully recovered.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyq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6,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) + chr(0b1101111) + chr(0b110110) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\062' + chr(1954 - 1905), 31349 - 31341), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\x6f' + chr(55) + chr(0b100010 + 0o22), 52196 - 52188), nzTpIcepk0o8(chr(48) + chr(0b1011010 + 0o25) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(111) + chr(0b110010) + '\x33' + chr(1463 - 1410), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(873 - 819) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + '\063' + '\x35', 8), nzTpIcepk0o8(chr(48) + '\157' + '\x36' + chr(888 - 835), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + chr(451 - 397) + chr(1151 - 1103), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + chr(0b1011011 + 0o24) + '\061' + chr(55), 37575 - 37567), nzTpIcepk0o8(chr(0b110000) + '\157' + '\066', 0o10), nzTpIcepk0o8('\x30' + chr(0b100100 + 0o113) + '\x32', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + chr(55) + '\066', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + '\x34' + chr(55), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(2322 - 2273) + chr(0b1001 + 0o51), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\062' + '\x33' + chr(0b0 + 0o66), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(54) + '\x35', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + chr(2071 - 2019), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1001001 + 0o46) + chr(49) + chr(54) + '\064', ord("\x08")), nzTpIcepk0o8('\060' + chr(9486 - 9375) + '\x31' + '\x36' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\x6f' + chr(928 - 874) + chr(1745 - 1695), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b110101 + 0o72) + chr(51) + '\060', 46615 - 46607), nzTpIcepk0o8('\060' + chr(8519 - 8408) + chr(49) + chr(0b10 + 0o57), 0o10), nzTpIcepk0o8('\060' + chr(8565 - 8454) + '\x33' + chr(0b101001 + 0o14) + '\067', 0o10), nzTpIcepk0o8(chr(829 - 781) + chr(111) + chr(0b110000 + 0o3) + chr(0b11110 + 0o27) + chr(0b110111), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + chr(1345 - 1295) + '\x37', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1011100 + 0o23) + chr(0b11111 + 0o24) + '\062' + chr(0b1001 + 0o54), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(6056 - 5945) + chr(652 - 603) + chr(55) + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1944 - 1894) + '\x30', 14959 - 14951), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b10 + 0o60) + '\x30', 8), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(188 - 140) + '\x30', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + '\065' + chr(0b101010 + 0o13), 0b1000), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1101111) + chr(0b100101 + 0o14) + chr(49) + '\063', 53200 - 53192), nzTpIcepk0o8('\x30' + chr(0b1010111 + 0o30) + chr(0b110001), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + chr(0b110100) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\x30' + chr(10459 - 10348) + chr(51) + '\064' + chr(535 - 487), 48071 - 48063), nzTpIcepk0o8('\x30' + chr(9490 - 9379) + '\x33' + '\x30' + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1011010 + 0o25) + chr(0b110001) + chr(0b110010 + 0o3) + '\x34', 27685 - 27677), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(8883 - 8772) + chr(49) + chr(0b10 + 0o62) + chr(0b11001 + 0o30), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(2108 - 1997) + '\x35' + chr(2100 - 2052), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x1f'), chr(100) + chr(0b1100101) + chr(0b11110 + 0o105) + chr(0b1101111) + chr(100) + chr(0b1001111 + 0o26))('\x75' + chr(0b1101010 + 0o12) + chr(102) + '\x2d' + chr(0b11001 + 0o37)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def TahWqI1KsjrZ(hXMPsSrOQzbh, FksNMH1w_ns6, cRb7OGyXJeT1, B6UAF1zReOyJ=None):
if not B6UAF1zReOyJ:
B6UAF1zReOyJ = hXMPsSrOQzbh.B6UAF1zReOyJ
(FksNMH1w_ns6, zIqcgNgQ9U6F) = hXMPsSrOQzbh.UHQQhh8SbxNs(FksNMH1w_ns6, k=B6UAF1zReOyJ)
(cRb7OGyXJeT1, zIqcgNgQ9U6F) = hXMPsSrOQzbh.rpad(cRb7OGyXJeT1, k=B6UAF1zReOyJ)
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\\K\tG\xacq\xdb\x01\x80*V0'), '\x64' + chr(0b1011001 + 0o14) + chr(7896 - 7797) + chr(111) + chr(0b1100100) + '\145')(chr(117) + chr(0b110 + 0o156) + '\146' + chr(88 - 43) + chr(0b111000))) == nzTpIcepk0o8('\060' + chr(111) + '\061', 8) or roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\\K\tG\xacq\xdb\x01\x80*V0'), chr(6796 - 6696) + chr(101) + chr(99) + chr(0b1101010 + 0o5) + chr(1571 - 1471) + '\145')(chr(4195 - 4078) + chr(4755 - 4639) + '\146' + chr(0b100 + 0o51) + chr(0b111000))) == nzTpIcepk0o8(chr(733 - 685) + chr(5427 - 5316) + chr(0b110010), 8):
return roI3spqORKae(hXMPsSrOQzbh.ecc_manager, roI3spqORKae(ES5oEprVxulp(b'RyYg\xf6j\xfbT\x83o'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(520 - 420) + '\x65')('\165' + chr(0b1011001 + 0o33) + chr(8274 - 8172) + chr(1322 - 1277) + '\x38'))(FksNMH1w_ns6 + cRb7OGyXJeT1, k=B6UAF1zReOyJ)
elif roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\\K\tG\xacq\xdb\x01\x80*V0'), '\144' + '\x65' + '\143' + chr(0b101110 + 0o101) + chr(100) + '\x65')('\x75' + chr(0b1111 + 0o145) + chr(102) + chr(0b101101) + chr(1564 - 1508))) == nzTpIcepk0o8('\060' + chr(540 - 429) + chr(51), 44717 - 44709) or roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\\K\tG\xacq\xdb\x01\x80*V0'), chr(0b1100000 + 0o4) + chr(8233 - 8132) + '\x63' + chr(0b1101111) + chr(0b110111 + 0o55) + chr(0b1100101))(chr(0b1001101 + 0o50) + chr(116) + chr(102) + chr(0b100110 + 0o7) + chr(0b101 + 0o63))) == nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110100), 8):
return roI3spqORKae(SYQVrMiy0JXa, roI3spqORKae(ES5oEprVxulp(b'Cbcg\xf5P\xfe^'), chr(0b10001 + 0o123) + '\145' + chr(0b1100011) + chr(0b1101111) + chr(6952 - 6852) + chr(0b1100100 + 0o1))(chr(117) + '\164' + chr(102) + chr(1054 - 1009) + chr(0b111000)))(MdkNqd1bagO6(FksNMH1w_ns6 + cRb7OGyXJeT1), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x7f~f|\xe8z\xaaB\x9aZ}U'), chr(0b1100100) + chr(0b1100101) + chr(5823 - 5724) + '\157' + '\x64' + chr(7147 - 7046))('\165' + chr(0b1110010 + 0o2) + chr(0b1100110) + '\055' + '\x38')) - B6UAF1zReOyJ, fcr=roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'WrN'), chr(2903 - 2803) + '\x65' + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b111001 + 0o54))('\x75' + chr(0b1001010 + 0o52) + chr(102) + '\055' + '\070')), generator=roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'VtR[\xf3W'), chr(0b1100011 + 0o1) + chr(0b1100101) + chr(0b1100011) + chr(0b10110 + 0o131) + chr(0b1000 + 0o134) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(1184 - 1139) + '\x38')))
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/eccman.py
|
ECCMan.description
|
def description(self):
'''Provide a description for each algorithm available, useful to print in ecc file'''
if 0 < self.algo <= 3:
return "Reed-Solomon with polynomials in Galois field of characteristic %i (2^%i) with generator=%s, prime poly=%s and first consecutive root=%s." % (self.field_charac, self.c_exp, self.gen_nb, hex(self.prim), self.fcr)
elif self.algo == 4:
return "Reed-Solomon with polynomials in Galois field of characteristic %i (2^%i) under US FAA ADSB UAT RS FEC standard with generator=%s, prime poly=%s and first consecutive root=%s." % (self.field_charac, self.c_exp, self.gen_nb, hex(self.prim), self.fcr)
else:
return "No description for this ECC algorithm."
|
python
|
def description(self):
'''Provide a description for each algorithm available, useful to print in ecc file'''
if 0 < self.algo <= 3:
return "Reed-Solomon with polynomials in Galois field of characteristic %i (2^%i) with generator=%s, prime poly=%s and first consecutive root=%s." % (self.field_charac, self.c_exp, self.gen_nb, hex(self.prim), self.fcr)
elif self.algo == 4:
return "Reed-Solomon with polynomials in Galois field of characteristic %i (2^%i) under US FAA ADSB UAT RS FEC standard with generator=%s, prime poly=%s and first consecutive root=%s." % (self.field_charac, self.c_exp, self.gen_nb, hex(self.prim), self.fcr)
else:
return "No description for this ECC algorithm."
|
[
"def",
"description",
"(",
"self",
")",
":",
"if",
"0",
"<",
"self",
".",
"algo",
"<=",
"3",
":",
"return",
"\"Reed-Solomon with polynomials in Galois field of characteristic %i (2^%i) with generator=%s, prime poly=%s and first consecutive root=%s.\"",
"%",
"(",
"self",
".",
"field_charac",
",",
"self",
".",
"c_exp",
",",
"self",
".",
"gen_nb",
",",
"hex",
"(",
"self",
".",
"prim",
")",
",",
"self",
".",
"fcr",
")",
"elif",
"self",
".",
"algo",
"==",
"4",
":",
"return",
"\"Reed-Solomon with polynomials in Galois field of characteristic %i (2^%i) under US FAA ADSB UAT RS FEC standard with generator=%s, prime poly=%s and first consecutive root=%s.\"",
"%",
"(",
"self",
".",
"field_charac",
",",
"self",
".",
"c_exp",
",",
"self",
".",
"gen_nb",
",",
"hex",
"(",
"self",
".",
"prim",
")",
",",
"self",
".",
"fcr",
")",
"else",
":",
"return",
"\"No description for this ECC algorithm.\""
] |
Provide a description for each algorithm available, useful to print in ecc file
|
[
"Provide",
"a",
"description",
"for",
"each",
"algorithm",
"available",
"useful",
"to",
"print",
"in",
"ecc",
"file"
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/eccman.py#L249-L256
|
train
|
Provide a description for each algorithm available useful to print in ecc 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,d9st0HqZ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VnHPFq7C,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(0b110101) + chr(55), 0o10), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\157' + chr(49) + chr(0b110001) + chr(619 - 571), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110100), 25713 - 25705), nzTpIcepk0o8(chr(1301 - 1253) + chr(5510 - 5399) + chr(0b110011) + chr(52) + chr(0b11001 + 0o31), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + '\x32' + '\x30', 0o10), nzTpIcepk0o8(chr(368 - 320) + chr(111) + '\064', 8), nzTpIcepk0o8(chr(48) + chr(365 - 254) + '\063' + '\x37' + chr(1128 - 1077), 11474 - 11466), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b101111 + 0o100) + '\061' + chr(49) + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101000 + 0o7) + '\061' + '\x36' + chr(48), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + '\062' + chr(48), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(2000 - 1950) + chr(0b110001) + chr(0b110110), 60930 - 60922), nzTpIcepk0o8(chr(1793 - 1745) + chr(111) + '\063' + '\x32', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + '\x30', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(11220 - 11109) + '\063' + chr(0b1101 + 0o44) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1101111) + '\x31' + chr(2463 - 2410) + '\062', 50674 - 50666), nzTpIcepk0o8(chr(592 - 544) + chr(0b1101110 + 0o1) + chr(53) + chr(0b100111 + 0o14), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(50) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b0 + 0o157) + '\x32' + chr(0b1010 + 0o54) + chr(0b100101 + 0o20), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1110 + 0o141) + chr(2020 - 1970) + '\066' + chr(719 - 666), 8), nzTpIcepk0o8('\060' + chr(1335 - 1224) + chr(0b110010) + chr(54) + '\064', 0o10), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\157' + chr(385 - 334) + chr(0b100111 + 0o12) + chr(49), 61819 - 61811), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1010001 + 0o36) + chr(1071 - 1022) + '\061' + chr(0b1010 + 0o46), 8), nzTpIcepk0o8(chr(48) + chr(3912 - 3801) + chr(1123 - 1072) + chr(2018 - 1964) + chr(2427 - 2373), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b101110 + 0o11) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(1029 - 981) + chr(0b1101111) + '\x32' + '\063' + chr(48), 0b1000), nzTpIcepk0o8(chr(121 - 73) + chr(111) + '\x33' + chr(50) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(111) + '\x33' + chr(0b100011 + 0o24) + chr(1498 - 1444), ord("\x08")), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(2185 - 2074) + chr(50) + chr(0b110010) + chr(0b10001 + 0o37), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(50) + chr(49) + '\066', 8), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(0b100011 + 0o16) + chr(2386 - 2337), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(10809 - 10698) + '\061' + chr(48) + chr(0b10101 + 0o40), 65201 - 65193), nzTpIcepk0o8(chr(1561 - 1513) + chr(0b10100 + 0o133) + chr(50) + chr(0b100 + 0o54) + chr(49), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b100010 + 0o21) + chr(0b110011) + chr(1925 - 1876), 30828 - 30820), nzTpIcepk0o8(chr(1566 - 1518) + chr(111) + '\x32' + chr(0b110000) + chr(2125 - 2073), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + '\060', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + chr(48) + chr(0b101 + 0o61), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10111 + 0o33) + '\060' + '\067', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1100001 + 0o16) + chr(0b110010) + '\063' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(9275 - 9164) + chr(0b101010 + 0o12) + '\061', 0b1000), nzTpIcepk0o8('\x30' + chr(3258 - 3147) + chr(0b110001) + chr(0b11010 + 0o32) + '\x34', 0b1000)][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'\x01'), chr(100) + '\x65' + '\143' + '\157' + chr(5464 - 5364) + chr(0b1100101))(chr(8925 - 8808) + '\164' + chr(0b1100110) + '\x2d' + chr(0b10111 + 0o41)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def HPRlMhFQZATD(hXMPsSrOQzbh):
if nzTpIcepk0o8(chr(48) + chr(111) + chr(0b1011 + 0o45), 0o10) < roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'B\x121\xa1\xe1@\xbd}\x00a\xd7,'), chr(100) + chr(8325 - 8224) + chr(99) + chr(3457 - 3346) + chr(0b1100100) + '\145')('\x75' + '\164' + '\146' + chr(0b10000 + 0o35) + '\x38')) <= nzTpIcepk0o8(chr(885 - 837) + chr(0b1101111) + chr(0b110011), ord("\x08")):
return roI3spqORKae(ES5oEprVxulp(b'}-a\x86\xfdW\x94%\x1f=\xe1t8\xbb\x03_=\x95\xc5\xdb\xa51\x98V\xf5\xbd\x9f\xfc\xfd\xa9,\xef\xf9\xc3i\xea\xe8\xf7RDI!a\x8e\xb4$\x94/P3\xe6{j\xad\t_0\xc7\xdc\xc7\xbd!\x95\x19\xbd\xbd\xde\xb8\xbc\xd7`\xe8\xf0\xa4\x7f\xef\xf3\xf6\x01\x03J&a\x90\xb1p\x94;Mu\xfd68\xbc\x18B8\xd0\x95\xc4\xa6$\x8f\x04\xbd\xa7\xde\xf1\xe0\xede\xe7\xb0\xf6{\xf2\xa7\xfdN\n\\-g\x97\xa4m\x8d,P"\xe1ul\xf1OX{'), chr(4915 - 4815) + chr(101) + chr(6736 - 6637) + chr(0b1101111) + chr(517 - 417) + chr(0b1100101))('\165' + chr(0b1110100) + '\146' + '\055' + chr(0b111000)) % (roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'I!a\x8e\xb4[\x98!\x11"\xefy'), '\144' + '\145' + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(3424 - 3308) + chr(102) + chr(0b101101 + 0o0) + chr(56))), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'L\x17a\x9a\xa0'), chr(5444 - 5344) + '\145' + '\143' + chr(0b1101111) + chr(5988 - 5888) + chr(0b10 + 0o143))(chr(0b1110101) + chr(11185 - 11069) + chr(7733 - 7631) + chr(0b100010 + 0o13) + chr(0b111000))), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'H-j\xbd\xbef'), chr(0b101101 + 0o67) + chr(0b1000111 + 0o36) + chr(3043 - 2944) + chr(0b1101111) + '\144' + chr(0b1100011 + 0o2))(chr(4467 - 4350) + chr(0b1110100) + chr(8978 - 8876) + '\055' + chr(56))), vgO67Nkl7Kt9(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'_:m\x8f'), '\144' + '\145' + '\143' + chr(0b101110 + 0o101) + chr(0b1100100) + chr(101))('\165' + chr(330 - 214) + '\146' + chr(45) + chr(0b100 + 0o64)))), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'I+v'), chr(5313 - 5213) + '\145' + chr(0b1100 + 0o127) + chr(0b1101111) + '\144' + '\x65')(chr(4372 - 4255) + chr(0b111 + 0o155) + chr(0b11001 + 0o115) + '\055' + chr(56))))
elif roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'B\x121\xa1\xe1@\xbd}\x00a\xd7,'), chr(100) + '\x65' + '\143' + chr(10214 - 10103) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(0b101110 + 0o106) + chr(102) + chr(661 - 616) + chr(0b111000))) == nzTpIcepk0o8(chr(0b110000) + chr(0b111001 + 0o66) + chr(2254 - 2202), 8):
return roI3spqORKae(ES5oEprVxulp(b"}-a\x86\xfdW\x94%\x1f=\xe1t8\xbb\x03_=\x95\xc5\xdb\xa51\x98V\xf5\xbd\x9f\xfc\xfd\xa9,\xef\xf9\xc3i\xea\xe8\xf7RDI!a\x8e\xb4$\x94/P3\xe6{j\xad\t_0\xc7\xdc\xc7\xbd!\x95\x19\xbd\xbd\xde\xb8\xbc\xd7`\xe8\xf0\xa4}\xe8\xe3\xfbSDz\x1b$\xa4\x91E\xdb\x084\x03\xcc:M\x8d>\x0b\x07\xe6\x95\xf2\x8c\x0b\xd6J\xec\xb5\x90\xf4\xef\xfb!\xa1\xae\xed|\xee\xa7\xf9D\nJ:e\x96\xbfv\xc6l\x03|\xaejj\xa5\x07Nu\xc5\xda\xd8\xb0u\xd3J\xb8\xb5\x90\xf4\xae\xef,\xf3\xaa\xf0(\xe5\xe8\xf0R\x01L=p\x8b\xa6a\xdb;\x1f?\xfa'=\xbfD"), '\144' + chr(101) + '\x63' + '\x6f' + chr(0b1100100) + chr(0b111000 + 0o55))(chr(643 - 526) + '\x74' + chr(2438 - 2336) + chr(1582 - 1537) + '\070') % (roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'I!a\x8e\xb4[\x98!\x11"\xefy'), chr(0b100001 + 0o103) + '\x65' + '\x63' + chr(111) + chr(100) + chr(101))(chr(0b1110101) + '\164' + chr(102) + '\x2d' + chr(56))), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'L\x17a\x9a\xa0'), chr(0b1100100) + '\145' + chr(0b1000110 + 0o35) + chr(11233 - 11122) + chr(100) + '\x65')(chr(2301 - 2184) + chr(0b1010110 + 0o36) + '\x66' + chr(0b101101) + chr(56))), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'H-j\xbd\xbef'), chr(100) + chr(0b100 + 0o141) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(0b1001101 + 0o30))('\x75' + '\164' + chr(102) + chr(45) + chr(0b111000))), vgO67Nkl7Kt9(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'_:m\x8f'), chr(7245 - 7145) + chr(0b101111 + 0o66) + chr(99) + chr(0b1101000 + 0o7) + chr(0b100100 + 0o100) + chr(101))(chr(0b110000 + 0o105) + chr(12563 - 12447) + chr(0b10101 + 0o121) + chr(1098 - 1053) + '\x38'))), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'I+v'), chr(2171 - 2071) + '\145' + chr(0b1011100 + 0o7) + '\157' + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + '\164' + '\x66' + chr(45) + chr(56))))
else:
return roI3spqORKae(ES5oEprVxulp(b'a\'$\x86\xb5w\x98;\x19 \xfasw\xa2JM:\xc7\x95\xc0\xa1!\x85\x19\xdd\x97\xbd\xb0\xef\xe5"\xee\xab\xed|\xee\xea\xb0'), chr(0b1011011 + 0o11) + chr(3979 - 3878) + chr(0b1100011) + chr(0b1101111) + '\x64' + '\x65')(chr(0b1110101) + '\x74' + '\x66' + chr(0b101101) + '\070')
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/profilehooks.py
|
profile
|
def profile(fn=None, skip=0, filename=None, immediate=False, dirs=False,
sort=None, entries=40,
profiler=('cProfile', 'profile', 'hotshot')):
"""Mark `fn` for profiling.
If `skip` is > 0, first `skip` calls to `fn` will not be profiled.
If `immediate` is False, profiling results will be printed to
sys.stdout on program termination. Otherwise results will be printed
after each call.
If `dirs` is False only the name of the file will be printed.
Otherwise the full path is used.
`sort` can be a list of sort keys (defaulting to ['cumulative',
'time', 'calls']). The following ones are recognized::
'calls' -- call count
'cumulative' -- cumulative time
'file' -- file name
'line' -- line number
'module' -- file name
'name' -- function name
'nfl' -- name/file/line
'pcalls' -- call count
'stdname' -- standard name
'time' -- internal time
`entries` limits the output to the first N entries.
`profiler` can be used to select the preferred profiler, or specify a
sequence of them, in order of preference. The default is ('cProfile'.
'profile', 'hotshot').
If `filename` is specified, the profile stats will be stored in the
named file. You can load them pstats.Stats(filename).
Usage::
def fn(...):
...
fn = profile(fn, skip=1)
If you are using Python 2.4, you should be able to use the decorator
syntax::
@profile(skip=3)
def fn(...):
...
or just ::
@profile
def fn(...):
...
"""
if fn is None: # @profile() syntax -- we are a decorator maker
def decorator(fn):
return profile(fn, skip=skip, filename=filename,
immediate=immediate, dirs=dirs,
sort=sort, entries=entries,
profiler=profiler)
return decorator
# @profile syntax -- we are a decorator.
if isinstance(profiler, str):
profiler = [profiler]
for p in profiler:
if p in AVAILABLE_PROFILERS:
profiler_class = AVAILABLE_PROFILERS[p]
break
else:
raise ValueError('only these profilers are available: %s'
% ', '.join(AVAILABLE_PROFILERS))
fp = profiler_class(fn, skip=skip, filename=filename,
immediate=immediate, dirs=dirs,
sort=sort, entries=entries)
# fp = HotShotFuncProfile(fn, skip=skip, filename=filename, ...)
# or HotShotFuncProfile
# We cannot return fp or fp.__call__ directly as that would break method
# definitions, instead we need to return a plain function.
def new_fn(*args, **kw):
return fp(*args, **kw)
new_fn.__doc__ = fn.__doc__
new_fn.__name__ = fn.__name__
new_fn.__dict__ = fn.__dict__
new_fn.__module__ = fn.__module__
return new_fn
|
python
|
def profile(fn=None, skip=0, filename=None, immediate=False, dirs=False,
sort=None, entries=40,
profiler=('cProfile', 'profile', 'hotshot')):
"""Mark `fn` for profiling.
If `skip` is > 0, first `skip` calls to `fn` will not be profiled.
If `immediate` is False, profiling results will be printed to
sys.stdout on program termination. Otherwise results will be printed
after each call.
If `dirs` is False only the name of the file will be printed.
Otherwise the full path is used.
`sort` can be a list of sort keys (defaulting to ['cumulative',
'time', 'calls']). The following ones are recognized::
'calls' -- call count
'cumulative' -- cumulative time
'file' -- file name
'line' -- line number
'module' -- file name
'name' -- function name
'nfl' -- name/file/line
'pcalls' -- call count
'stdname' -- standard name
'time' -- internal time
`entries` limits the output to the first N entries.
`profiler` can be used to select the preferred profiler, or specify a
sequence of them, in order of preference. The default is ('cProfile'.
'profile', 'hotshot').
If `filename` is specified, the profile stats will be stored in the
named file. You can load them pstats.Stats(filename).
Usage::
def fn(...):
...
fn = profile(fn, skip=1)
If you are using Python 2.4, you should be able to use the decorator
syntax::
@profile(skip=3)
def fn(...):
...
or just ::
@profile
def fn(...):
...
"""
if fn is None: # @profile() syntax -- we are a decorator maker
def decorator(fn):
return profile(fn, skip=skip, filename=filename,
immediate=immediate, dirs=dirs,
sort=sort, entries=entries,
profiler=profiler)
return decorator
# @profile syntax -- we are a decorator.
if isinstance(profiler, str):
profiler = [profiler]
for p in profiler:
if p in AVAILABLE_PROFILERS:
profiler_class = AVAILABLE_PROFILERS[p]
break
else:
raise ValueError('only these profilers are available: %s'
% ', '.join(AVAILABLE_PROFILERS))
fp = profiler_class(fn, skip=skip, filename=filename,
immediate=immediate, dirs=dirs,
sort=sort, entries=entries)
# fp = HotShotFuncProfile(fn, skip=skip, filename=filename, ...)
# or HotShotFuncProfile
# We cannot return fp or fp.__call__ directly as that would break method
# definitions, instead we need to return a plain function.
def new_fn(*args, **kw):
return fp(*args, **kw)
new_fn.__doc__ = fn.__doc__
new_fn.__name__ = fn.__name__
new_fn.__dict__ = fn.__dict__
new_fn.__module__ = fn.__module__
return new_fn
|
[
"def",
"profile",
"(",
"fn",
"=",
"None",
",",
"skip",
"=",
"0",
",",
"filename",
"=",
"None",
",",
"immediate",
"=",
"False",
",",
"dirs",
"=",
"False",
",",
"sort",
"=",
"None",
",",
"entries",
"=",
"40",
",",
"profiler",
"=",
"(",
"'cProfile'",
",",
"'profile'",
",",
"'hotshot'",
")",
")",
":",
"if",
"fn",
"is",
"None",
":",
"# @profile() syntax -- we are a decorator maker",
"def",
"decorator",
"(",
"fn",
")",
":",
"return",
"profile",
"(",
"fn",
",",
"skip",
"=",
"skip",
",",
"filename",
"=",
"filename",
",",
"immediate",
"=",
"immediate",
",",
"dirs",
"=",
"dirs",
",",
"sort",
"=",
"sort",
",",
"entries",
"=",
"entries",
",",
"profiler",
"=",
"profiler",
")",
"return",
"decorator",
"# @profile syntax -- we are a decorator.",
"if",
"isinstance",
"(",
"profiler",
",",
"str",
")",
":",
"profiler",
"=",
"[",
"profiler",
"]",
"for",
"p",
"in",
"profiler",
":",
"if",
"p",
"in",
"AVAILABLE_PROFILERS",
":",
"profiler_class",
"=",
"AVAILABLE_PROFILERS",
"[",
"p",
"]",
"break",
"else",
":",
"raise",
"ValueError",
"(",
"'only these profilers are available: %s'",
"%",
"', '",
".",
"join",
"(",
"AVAILABLE_PROFILERS",
")",
")",
"fp",
"=",
"profiler_class",
"(",
"fn",
",",
"skip",
"=",
"skip",
",",
"filename",
"=",
"filename",
",",
"immediate",
"=",
"immediate",
",",
"dirs",
"=",
"dirs",
",",
"sort",
"=",
"sort",
",",
"entries",
"=",
"entries",
")",
"# fp = HotShotFuncProfile(fn, skip=skip, filename=filename, ...)",
"# or HotShotFuncProfile",
"# We cannot return fp or fp.__call__ directly as that would break method",
"# definitions, instead we need to return a plain function.",
"def",
"new_fn",
"(",
"*",
"args",
",",
"*",
"*",
"kw",
")",
":",
"return",
"fp",
"(",
"*",
"args",
",",
"*",
"*",
"kw",
")",
"new_fn",
".",
"__doc__",
"=",
"fn",
".",
"__doc__",
"new_fn",
".",
"__name__",
"=",
"fn",
".",
"__name__",
"new_fn",
".",
"__dict__",
"=",
"fn",
".",
"__dict__",
"new_fn",
".",
"__module__",
"=",
"fn",
".",
"__module__",
"return",
"new_fn"
] |
Mark `fn` for profiling.
If `skip` is > 0, first `skip` calls to `fn` will not be profiled.
If `immediate` is False, profiling results will be printed to
sys.stdout on program termination. Otherwise results will be printed
after each call.
If `dirs` is False only the name of the file will be printed.
Otherwise the full path is used.
`sort` can be a list of sort keys (defaulting to ['cumulative',
'time', 'calls']). The following ones are recognized::
'calls' -- call count
'cumulative' -- cumulative time
'file' -- file name
'line' -- line number
'module' -- file name
'name' -- function name
'nfl' -- name/file/line
'pcalls' -- call count
'stdname' -- standard name
'time' -- internal time
`entries` limits the output to the first N entries.
`profiler` can be used to select the preferred profiler, or specify a
sequence of them, in order of preference. The default is ('cProfile'.
'profile', 'hotshot').
If `filename` is specified, the profile stats will be stored in the
named file. You can load them pstats.Stats(filename).
Usage::
def fn(...):
...
fn = profile(fn, skip=1)
If you are using Python 2.4, you should be able to use the decorator
syntax::
@profile(skip=3)
def fn(...):
...
or just ::
@profile
def fn(...):
...
|
[
"Mark",
"fn",
"for",
"profiling",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/profilehooks.py#L137-L224
|
train
|
Profile a file or file with the specified number of entries.
|
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,UIHY5MV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uW,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(0b110011) + '\x35' + chr(1750 - 1698), 37893 - 37885), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(392 - 342) + '\x30', 0o10), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\x6f' + '\061' + chr(0b1001 + 0o47) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110110) + '\062', 0b1000), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(111) + chr(693 - 643) + '\x37' + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + '\063' + chr(0b11110 + 0o25), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(0b110101 + 0o1), 20477 - 20469), nzTpIcepk0o8('\060' + '\157' + chr(0b110001 + 0o1) + '\x37', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(966 - 917) + chr(52) + chr(2294 - 2242), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + '\x31' + '\065', 6529 - 6521), nzTpIcepk0o8('\060' + chr(0b1100001 + 0o16) + chr(2469 - 2418) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(432 - 384) + chr(0b1100111 + 0o10) + chr(0b1100 + 0o47) + chr(0b101000 + 0o16) + chr(424 - 376), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(53) + chr(2499 - 2449), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110111) + '\x32', 53110 - 53102), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\x6f' + chr(0b110001) + chr(53), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10010 + 0o43) + '\061', 0o10), nzTpIcepk0o8('\060' + chr(0b1011110 + 0o21) + chr(0b10 + 0o57) + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(52) + chr(1261 - 1207), 39915 - 39907), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(11125 - 11014) + chr(0b100001 + 0o24) + chr(0b110011), 9964 - 9956), nzTpIcepk0o8('\x30' + '\157' + chr(55) + chr(53), 53981 - 53973), nzTpIcepk0o8('\x30' + chr(10746 - 10635) + '\061' + chr(53) + chr(1160 - 1106), ord("\x08")), nzTpIcepk0o8(chr(0b110000 + 0o0) + '\x6f' + '\x31' + '\x30' + chr(0b110000 + 0o4), 0b1000), nzTpIcepk0o8(chr(243 - 195) + chr(7860 - 7749) + chr(0b110001) + chr(0b1111 + 0o45) + '\x36', 8), nzTpIcepk0o8(chr(1608 - 1560) + chr(0b1101111) + chr(0b100011 + 0o16) + chr(50), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + '\x36' + chr(52), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\x33' + chr(0b110000) + chr(0b101110 + 0o2), ord("\x08")), nzTpIcepk0o8(chr(295 - 247) + '\157' + '\061' + chr(0b110100) + chr(1987 - 1934), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + chr(2111 - 2062) + chr(2399 - 2345), 0b1000), nzTpIcepk0o8(chr(0b10110 + 0o32) + '\x6f' + chr(51) + chr(53) + '\x31', 0o10), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1101111) + chr(0b110011) + chr(0b11101 + 0o25) + chr(0b110101), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x32' + '\062' + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + '\x30' + '\x35', 1333 - 1325), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(53) + chr(0b10001 + 0o44), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(51) + chr(0b110001) + chr(0b11010 + 0o35), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1100 + 0o45) + '\x36', 8), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(0b110111) + chr(2154 - 2102), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b110100 + 0o73) + '\066' + chr(52), 13251 - 13243), nzTpIcepk0o8(chr(1691 - 1643) + chr(111) + '\x31' + chr(0b110010) + chr(1933 - 1879), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + chr(0b110010), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110000 + 0o1) + chr(55) + '\061', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b100110 + 0o12) + '\x6f' + chr(0b110101) + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xc2'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(0b1001111 + 0o40) + '\x64' + chr(7219 - 7118))('\x75' + '\x74' + chr(102) + chr(0b101101) + chr(1541 - 1485)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def nQ8dle22Rrpj(oo8448oP2LJ8=None, mi8KHiEXG5cT=nzTpIcepk0o8(chr(1597 - 1549) + '\x6f' + chr(48), 0b1000), FxZHtXEolYsL=None, rdjDjZPTioZ3=nzTpIcepk0o8(chr(668 - 620) + chr(0b1101111) + chr(0b110000), 8), VNlxNzbaDsmx=nzTpIcepk0o8('\x30' + '\157' + chr(0b110000), 8), ZfRO3c5LI_Bg=None, iFLfP3Ro3ZHs=nzTpIcepk0o8('\060' + chr(0b1101111) + '\x35' + chr(0b110000), 8), Fytk976eq8Eh=(roI3spqORKae(ES5oEprVxulp(b'\x8f\x803]\xdf\xf2br'), chr(100) + chr(7855 - 7754) + chr(99) + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(8627 - 8510) + chr(10531 - 10415) + chr(0b1100110) + chr(416 - 371) + '\070'), roI3spqORKae(ES5oEprVxulp(b'\x9c\xa2.T\xd0\xf7k'), chr(0b1001000 + 0o34) + chr(101) + chr(0b111000 + 0o53) + chr(0b1101111) + chr(100) + chr(0b1100101))('\x75' + '\164' + chr(8347 - 8245) + '\055' + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\x84\xbf5A\xd1\xf4z'), '\144' + '\145' + chr(2678 - 2579) + '\x6f' + '\144' + chr(101))('\165' + '\x74' + chr(102) + '\055' + '\x38'))):
if oo8448oP2LJ8 is None:
def Vstsm8DUicyG(oo8448oP2LJ8):
return nQ8dle22Rrpj(oo8448oP2LJ8, skip=mi8KHiEXG5cT, filename=FxZHtXEolYsL, immediate=rdjDjZPTioZ3, dirs=VNlxNzbaDsmx, sort=ZfRO3c5LI_Bg, entries=iFLfP3Ro3ZHs, profiler=Fytk976eq8Eh)
return Vstsm8DUicyG
if suIjIS24Zkqw(Fytk976eq8Eh, N9zlRy29S1SS):
Fytk976eq8Eh = [Fytk976eq8Eh]
for fSdw5wwLo9MO in Fytk976eq8Eh:
if fSdw5wwLo9MO in h2YZ4Ose1RdY:
pTIMvnlF_h3J = h2YZ4Ose1RdY[fSdw5wwLo9MO]
break
else:
raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\x83\xbe-K\x99\xeffr\x17\xe8;\x80XUk@e\x03YNN%\x14oT\xa1\x13\xef\x80\xb9\xf6\xa7A\xaa4\x9c\x11%'), chr(0b1100100) + chr(0b1100101) + chr(0b101110 + 0o65) + chr(0b1101111) + chr(100) + chr(0b10011 + 0o122))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(328 - 283) + chr(0b111000)) % roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xc0\xf0'), chr(1905 - 1805) + '\145' + chr(99) + chr(5107 - 4996) + '\x64' + '\145')('\x75' + chr(116) + chr(102) + chr(0b101101) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\xb5\xe48\x7f\x80\xd9mq0\xceU\x81'), chr(100) + '\x65' + '\143' + chr(0b101001 + 0o106) + '\144' + chr(101))('\165' + chr(6569 - 6453) + '\146' + chr(1678 - 1633) + '\x38'))(h2YZ4Ose1RdY))
KhXPEIWBXQzE = pTIMvnlF_h3J(oo8448oP2LJ8, skip=mi8KHiEXG5cT, filename=FxZHtXEolYsL, immediate=rdjDjZPTioZ3, dirs=VNlxNzbaDsmx, sort=ZfRO3c5LI_Bg, entries=iFLfP3Ro3ZHs)
def nHcxLZKjV1CZ(*eemPYp2vtTSr, **n_DqV9fOWrXc):
return KhXPEIWBXQzE(*eemPYp2vtTSr, **n_DqV9fOWrXc)
nHcxLZKjV1CZ.yfEeqQiUoqWT = oo8448oP2LJ8.yfEeqQiUoqWT
nHcxLZKjV1CZ.AYtDRlqeP0tq = oo8448oP2LJ8.AYtDRlqeP0tq
nHcxLZKjV1CZ.vN7a1CEarTrT = oo8448oP2LJ8.vN7a1CEarTrT
nHcxLZKjV1CZ.BucoAsuYpo5x = oo8448oP2LJ8.BucoAsuYpo5x
return nHcxLZKjV1CZ
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/profilehooks.py
|
coverage
|
def coverage(fn):
"""Mark `fn` for line coverage analysis.
Results will be printed to sys.stdout on program termination.
Usage::
def fn(...):
...
fn = coverage(fn)
If you are using Python 2.4, you should be able to use the decorator
syntax::
@coverage
def fn(...):
...
"""
fp = TraceFuncCoverage(fn) # or HotShotFuncCoverage
# We cannot return fp or fp.__call__ directly as that would break method
# definitions, instead we need to return a plain function.
def new_fn(*args, **kw):
return fp(*args, **kw)
new_fn.__doc__ = fn.__doc__
new_fn.__name__ = fn.__name__
new_fn.__dict__ = fn.__dict__
new_fn.__module__ = fn.__module__
return new_fn
|
python
|
def coverage(fn):
"""Mark `fn` for line coverage analysis.
Results will be printed to sys.stdout on program termination.
Usage::
def fn(...):
...
fn = coverage(fn)
If you are using Python 2.4, you should be able to use the decorator
syntax::
@coverage
def fn(...):
...
"""
fp = TraceFuncCoverage(fn) # or HotShotFuncCoverage
# We cannot return fp or fp.__call__ directly as that would break method
# definitions, instead we need to return a plain function.
def new_fn(*args, **kw):
return fp(*args, **kw)
new_fn.__doc__ = fn.__doc__
new_fn.__name__ = fn.__name__
new_fn.__dict__ = fn.__dict__
new_fn.__module__ = fn.__module__
return new_fn
|
[
"def",
"coverage",
"(",
"fn",
")",
":",
"fp",
"=",
"TraceFuncCoverage",
"(",
"fn",
")",
"# or HotShotFuncCoverage",
"# We cannot return fp or fp.__call__ directly as that would break method",
"# definitions, instead we need to return a plain function.",
"def",
"new_fn",
"(",
"*",
"args",
",",
"*",
"*",
"kw",
")",
":",
"return",
"fp",
"(",
"*",
"args",
",",
"*",
"*",
"kw",
")",
"new_fn",
".",
"__doc__",
"=",
"fn",
".",
"__doc__",
"new_fn",
".",
"__name__",
"=",
"fn",
".",
"__name__",
"new_fn",
".",
"__dict__",
"=",
"fn",
".",
"__dict__",
"new_fn",
".",
"__module__",
"=",
"fn",
".",
"__module__",
"return",
"new_fn"
] |
Mark `fn` for line coverage analysis.
Results will be printed to sys.stdout on program termination.
Usage::
def fn(...):
...
fn = coverage(fn)
If you are using Python 2.4, you should be able to use the decorator
syntax::
@coverage
def fn(...):
...
|
[
"Mark",
"fn",
"for",
"line",
"coverage",
"analysis",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/profilehooks.py#L227-L255
|
train
|
Mark a function as line coverage analysis.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ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IOError,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(0b100110 + 0o12) + chr(0b1000111 + 0o50) + '\062' + '\061' + chr(50), 52726 - 52718), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(0b110101 + 0o2) + chr(1154 - 1104), 57125 - 57117), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + chr(180 - 132) + chr(1255 - 1202), 63737 - 63729), nzTpIcepk0o8(chr(48) + '\157' + '\062' + chr(537 - 489), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(659 - 608) + '\060' + chr(638 - 589), 0o10), nzTpIcepk0o8('\x30' + chr(0b1100 + 0o143) + '\062' + '\062' + chr(321 - 271), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + chr(0b110100) + chr(0b110010), 981 - 973), nzTpIcepk0o8(chr(48) + '\157' + chr(49) + '\064' + '\060', 0o10), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1101111) + chr(0b110010) + '\x33', 48759 - 48751), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + chr(0b100000 + 0o25) + '\061', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + chr(0b110110) + chr(0b110110), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(2308 - 2255) + chr(0b110100), 240 - 232), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + '\061' + chr(1096 - 1048), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b10100 + 0o133) + chr(0b110111) + chr(0b1011 + 0o52), ord("\x08")), nzTpIcepk0o8(chr(822 - 774) + '\x6f' + '\x33' + '\067', 0b1000), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\x6f' + '\063' + chr(0b1011 + 0o47) + chr(354 - 305), 48201 - 48193), nzTpIcepk0o8('\060' + chr(0b101000 + 0o107) + chr(370 - 320) + chr(0b101111 + 0o4) + chr(1959 - 1904), 0b1000), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\157' + chr(51) + chr(2682 - 2629) + chr(0b110000 + 0o1), ord("\x08")), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\x6f' + chr(0b110010) + '\063' + chr(321 - 272), 15428 - 15420), nzTpIcepk0o8('\x30' + chr(0b100 + 0o153) + chr(1096 - 1045) + chr(52) + '\x30', 0o10), nzTpIcepk0o8(chr(1533 - 1485) + chr(0b1101111) + chr(0b110101) + chr(1158 - 1103), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b1101 + 0o44) + chr(52), 29072 - 29064), nzTpIcepk0o8(chr(48) + '\157' + chr(0b1000 + 0o52), 0o10), nzTpIcepk0o8(chr(1223 - 1175) + chr(0b1000101 + 0o52) + chr(50) + chr(0b101100 + 0o6) + chr(0b110100 + 0o1), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x35' + chr(49), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1526 - 1472) + '\x33', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(0b1111 + 0o41) + chr(1537 - 1488), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1010 + 0o50) + chr(2579 - 2528), 8), nzTpIcepk0o8('\060' + chr(0b100110 + 0o111) + chr(664 - 611) + chr(511 - 456), 8), nzTpIcepk0o8(chr(1549 - 1501) + chr(786 - 675) + chr(0b110000 + 0o2) + chr(52) + '\067', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(423 - 372) + chr(0b110111) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b101000 + 0o17) + chr(2779 - 2725), 0o10), nzTpIcepk0o8(chr(768 - 720) + chr(1770 - 1659) + chr(49) + '\060', 24205 - 24197), nzTpIcepk0o8(chr(48) + chr(3666 - 3555) + chr(0b110011 + 0o0) + chr(0b1 + 0o61) + '\x35', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + chr(1153 - 1101) + chr(49), 41092 - 41084), nzTpIcepk0o8('\060' + chr(3255 - 3144) + chr(0b1010 + 0o51) + '\x31' + '\066', 32456 - 32448), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + chr(52) + chr(0b11101 + 0o27), 0o10), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + '\061' + chr(0b110001) + '\060', 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(432 - 381) + '\x36' + chr(51), 0o10), nzTpIcepk0o8(chr(48) + chr(0b10001 + 0o136) + chr(0b110001) + chr(470 - 422), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x35' + chr(323 - 275), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xa4'), '\x64' + chr(8575 - 8474) + '\143' + chr(0b1101111) + chr(0b11001 + 0o113) + chr(8008 - 7907))(chr(2459 - 2342) + chr(0b1101 + 0o147) + chr(0b1100110) + chr(0b11001 + 0o24) + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def b2gzV958PQZ0(oo8448oP2LJ8):
KhXPEIWBXQzE = aVj3ofmSW68G(oo8448oP2LJ8)
def nHcxLZKjV1CZ(*eemPYp2vtTSr, **n_DqV9fOWrXc):
return KhXPEIWBXQzE(*eemPYp2vtTSr, **n_DqV9fOWrXc)
nHcxLZKjV1CZ.yfEeqQiUoqWT = oo8448oP2LJ8.yfEeqQiUoqWT
nHcxLZKjV1CZ.AYtDRlqeP0tq = oo8448oP2LJ8.AYtDRlqeP0tq
nHcxLZKjV1CZ.vN7a1CEarTrT = oo8448oP2LJ8.vN7a1CEarTrT
nHcxLZKjV1CZ.BucoAsuYpo5x = oo8448oP2LJ8.BucoAsuYpo5x
return nHcxLZKjV1CZ
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/profilehooks.py
|
coverage_with_hotshot
|
def coverage_with_hotshot(fn):
"""Mark `fn` for line coverage analysis.
Uses the 'hotshot' module for fast coverage analysis.
BUG: Produces inaccurate results.
See the docstring of `coverage` for usage examples.
"""
fp = HotShotFuncCoverage(fn)
# We cannot return fp or fp.__call__ directly as that would break method
# definitions, instead we need to return a plain function.
def new_fn(*args, **kw):
return fp(*args, **kw)
new_fn.__doc__ = fn.__doc__
new_fn.__name__ = fn.__name__
new_fn.__dict__ = fn.__dict__
new_fn.__module__ = fn.__module__
return new_fn
|
python
|
def coverage_with_hotshot(fn):
"""Mark `fn` for line coverage analysis.
Uses the 'hotshot' module for fast coverage analysis.
BUG: Produces inaccurate results.
See the docstring of `coverage` for usage examples.
"""
fp = HotShotFuncCoverage(fn)
# We cannot return fp or fp.__call__ directly as that would break method
# definitions, instead we need to return a plain function.
def new_fn(*args, **kw):
return fp(*args, **kw)
new_fn.__doc__ = fn.__doc__
new_fn.__name__ = fn.__name__
new_fn.__dict__ = fn.__dict__
new_fn.__module__ = fn.__module__
return new_fn
|
[
"def",
"coverage_with_hotshot",
"(",
"fn",
")",
":",
"fp",
"=",
"HotShotFuncCoverage",
"(",
"fn",
")",
"# We cannot return fp or fp.__call__ directly as that would break method",
"# definitions, instead we need to return a plain function.",
"def",
"new_fn",
"(",
"*",
"args",
",",
"*",
"*",
"kw",
")",
":",
"return",
"fp",
"(",
"*",
"args",
",",
"*",
"*",
"kw",
")",
"new_fn",
".",
"__doc__",
"=",
"fn",
".",
"__doc__",
"new_fn",
".",
"__name__",
"=",
"fn",
".",
"__name__",
"new_fn",
".",
"__dict__",
"=",
"fn",
".",
"__dict__",
"new_fn",
".",
"__module__",
"=",
"fn",
".",
"__module__",
"return",
"new_fn"
] |
Mark `fn` for line coverage analysis.
Uses the 'hotshot' module for fast coverage analysis.
BUG: Produces inaccurate results.
See the docstring of `coverage` for usage examples.
|
[
"Mark",
"fn",
"for",
"line",
"coverage",
"analysis",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/profileh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_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(0b11000 + 0o127) + chr(900 - 850) + chr(1912 - 1862) + chr(139 - 90), 0o10), nzTpIcepk0o8('\x30' + chr(1017 - 906) + '\065', ord("\x08")), nzTpIcepk0o8(chr(311 - 263) + chr(10951 - 10840) + '\063' + chr(1760 - 1709) + '\x37', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1011011 + 0o24) + chr(0b10 + 0o60) + chr(0b101001 + 0o12) + '\x32', 0o10), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\157' + '\x33' + chr(0b10110 + 0o40) + '\063', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(0b110101) + '\067', 11586 - 11578), nzTpIcepk0o8(chr(630 - 582) + '\x6f' + chr(49) + chr(54) + '\x34', 4497 - 4489), nzTpIcepk0o8(chr(1521 - 1473) + chr(4497 - 4386) + '\x33' + '\x36' + chr(55), 0o10), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\157' + chr(0b110011) + chr(0b111 + 0o54) + chr(0b100000 + 0o25), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b111111 + 0o60) + chr(0b10100 + 0o37) + '\067' + '\067', 0b1000), nzTpIcepk0o8('\060' + chr(8016 - 7905) + chr(49) + '\061' + '\x36', 28316 - 28308), nzTpIcepk0o8(chr(0b110000) + chr(0b110 + 0o151) + '\061' + chr(2653 - 2599) + '\066', 55079 - 55071), nzTpIcepk0o8(chr(943 - 895) + '\x6f' + chr(0b10010 + 0o37) + chr(0b100101 + 0o14) + chr(2063 - 2012), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100111 + 0o13) + chr(0b110000) + chr(2070 - 2018), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + chr(49) + chr(1223 - 1171), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(2287 - 2238) + '\062', 49888 - 49880), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(111) + chr(0b11100 + 0o27) + chr(0b110000) + chr(868 - 815), 0o10), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1101111) + chr(0b10101 + 0o35) + chr(0b110000) + '\x34', 8), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + chr(0b110011) + chr(0b110011), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(0b110011) + '\x32', 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1446 - 1397) + chr(0b110011) + '\063', 8), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + chr(58 - 10) + chr(0b11011 + 0o25), 21245 - 21237), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1101111) + chr(0b101001 + 0o12) + '\x32' + chr(0b10001 + 0o43), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + '\060' + chr(0b110011), 31408 - 31400), nzTpIcepk0o8(chr(0b110000) + chr(3126 - 3015) + chr(0b110010) + '\x37' + chr(0b110111 + 0o0), 63748 - 63740), nzTpIcepk0o8(chr(0b110000) + chr(0b1101011 + 0o4) + '\067' + chr(55), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\063' + '\062', 14308 - 14300), nzTpIcepk0o8(chr(281 - 233) + '\x6f' + chr(0b110011) + chr(49) + chr(0b110110), 7198 - 7190), nzTpIcepk0o8(chr(0b110000) + chr(10169 - 10058) + '\x33' + '\063' + chr(0b101001 + 0o15), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b111011 + 0o64) + chr(0b110011) + '\x32' + chr(0b1110 + 0o50), 0o10), nzTpIcepk0o8(chr(48) + chr(0b11110 + 0o121) + '\063' + chr(0b110110) + chr(0b101010 + 0o6), 0b1000), nzTpIcepk0o8(chr(2190 - 2142) + chr(10396 - 10285) + chr(52) + '\x35', 0o10), nzTpIcepk0o8(chr(2289 - 2241) + chr(665 - 554) + '\061' + chr(0b101 + 0o60), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110011) + chr(0b110100) + chr(52), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(53) + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(8102 - 7991) + chr(50) + chr(0b10001 + 0o37) + chr(52), 8), nzTpIcepk0o8(chr(1906 - 1858) + '\157' + chr(0b11111 + 0o22) + chr(0b110010) + chr(1833 - 1782), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(9290 - 9179) + chr(53) + chr(54), 0b1000), nzTpIcepk0o8(chr(1196 - 1148) + '\157' + '\x32', 18089 - 18081), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(0b100001 + 0o23) + chr(0b1011 + 0o53), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1534 - 1486) + chr(3586 - 3475) + chr(0b11000 + 0o35) + chr(2234 - 2186), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xbf'), chr(100) + '\x65' + chr(0b1100011) + chr(0b1101111) + '\x64' + chr(2973 - 2872))('\x75' + chr(116) + chr(102) + chr(0b101101) + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def CrdwVIquWFIb(oo8448oP2LJ8):
KhXPEIWBXQzE = YqDWltU6KX3A(oo8448oP2LJ8)
def nHcxLZKjV1CZ(*eemPYp2vtTSr, **n_DqV9fOWrXc):
return KhXPEIWBXQzE(*eemPYp2vtTSr, **n_DqV9fOWrXc)
nHcxLZKjV1CZ.yfEeqQiUoqWT = oo8448oP2LJ8.yfEeqQiUoqWT
nHcxLZKjV1CZ.AYtDRlqeP0tq = oo8448oP2LJ8.AYtDRlqeP0tq
nHcxLZKjV1CZ.vN7a1CEarTrT = oo8448oP2LJ8.vN7a1CEarTrT
nHcxLZKjV1CZ.BucoAsuYpo5x = oo8448oP2LJ8.BucoAsuYpo5x
return nHcxLZKjV1CZ
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/profilehooks.py
|
timecall
|
def timecall(fn=None, immediate=True, timer=time.time):
"""Wrap `fn` and print its execution time.
Example::
@timecall
def somefunc(x, y):
time.sleep(x * y)
somefunc(2, 3)
will print the time taken by somefunc on every call. If you want just
a summary at program termination, use
@timecall(immediate=False)
You can also choose a timing method other than the default ``time.time()``,
e.g.:
@timecall(timer=time.clock)
"""
if fn is None: # @timecall() syntax -- we are a decorator maker
def decorator(fn):
return timecall(fn, immediate=immediate, timer=timer)
return decorator
# @timecall syntax -- we are a decorator.
fp = FuncTimer(fn, immediate=immediate, timer=timer)
# We cannot return fp or fp.__call__ directly as that would break method
# definitions, instead we need to return a plain function.
def new_fn(*args, **kw):
return fp(*args, **kw)
new_fn.__doc__ = fn.__doc__
new_fn.__name__ = fn.__name__
new_fn.__dict__ = fn.__dict__
new_fn.__module__ = fn.__module__
return new_fn
|
python
|
def timecall(fn=None, immediate=True, timer=time.time):
"""Wrap `fn` and print its execution time.
Example::
@timecall
def somefunc(x, y):
time.sleep(x * y)
somefunc(2, 3)
will print the time taken by somefunc on every call. If you want just
a summary at program termination, use
@timecall(immediate=False)
You can also choose a timing method other than the default ``time.time()``,
e.g.:
@timecall(timer=time.clock)
"""
if fn is None: # @timecall() syntax -- we are a decorator maker
def decorator(fn):
return timecall(fn, immediate=immediate, timer=timer)
return decorator
# @timecall syntax -- we are a decorator.
fp = FuncTimer(fn, immediate=immediate, timer=timer)
# We cannot return fp or fp.__call__ directly as that would break method
# definitions, instead we need to return a plain function.
def new_fn(*args, **kw):
return fp(*args, **kw)
new_fn.__doc__ = fn.__doc__
new_fn.__name__ = fn.__name__
new_fn.__dict__ = fn.__dict__
new_fn.__module__ = fn.__module__
return new_fn
|
[
"def",
"timecall",
"(",
"fn",
"=",
"None",
",",
"immediate",
"=",
"True",
",",
"timer",
"=",
"time",
".",
"time",
")",
":",
"if",
"fn",
"is",
"None",
":",
"# @timecall() syntax -- we are a decorator maker",
"def",
"decorator",
"(",
"fn",
")",
":",
"return",
"timecall",
"(",
"fn",
",",
"immediate",
"=",
"immediate",
",",
"timer",
"=",
"timer",
")",
"return",
"decorator",
"# @timecall syntax -- we are a decorator.",
"fp",
"=",
"FuncTimer",
"(",
"fn",
",",
"immediate",
"=",
"immediate",
",",
"timer",
"=",
"timer",
")",
"# We cannot return fp or fp.__call__ directly as that would break method",
"# definitions, instead we need to return a plain function.",
"def",
"new_fn",
"(",
"*",
"args",
",",
"*",
"*",
"kw",
")",
":",
"return",
"fp",
"(",
"*",
"args",
",",
"*",
"*",
"kw",
")",
"new_fn",
".",
"__doc__",
"=",
"fn",
".",
"__doc__",
"new_fn",
".",
"__name__",
"=",
"fn",
".",
"__name__",
"new_fn",
".",
"__dict__",
"=",
"fn",
".",
"__dict__",
"new_fn",
".",
"__module__",
"=",
"fn",
".",
"__module__",
"return",
"new_fn"
] |
Wrap `fn` and print its execution time.
Example::
@timecall
def somefunc(x, y):
time.sleep(x * y)
somefunc(2, 3)
will print the time taken by somefunc on every call. If you want just
a summary at program termination, use
@timecall(immediate=False)
You can also choose a timing method other than the default ``time.time()``,
e.g.:
@timecall(timer=time.clock)
|
[
"Wrap",
"fn",
"and",
"print",
"its",
"execution",
"time",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/profilehooks.py#L655-L691
|
train
|
Wrap a function to print its execution time.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgk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jnJWK64FDT,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(111) + chr(586 - 536) + chr(0b110010) + '\x35', 0o10), nzTpIcepk0o8(chr(295 - 247) + chr(0b1101111) + chr(0b110010) + '\064' + '\x37', 0o10), nzTpIcepk0o8(chr(1811 - 1763) + chr(968 - 857) + chr(49) + chr(50) + '\x34', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(48) + '\x30', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + chr(48) + chr(0b110010), 17961 - 17953), nzTpIcepk0o8(chr(1781 - 1733) + '\157' + chr(49) + chr(416 - 364) + '\x37', 45929 - 45921), nzTpIcepk0o8(chr(515 - 467) + '\157' + chr(0b110010) + '\061' + '\x32', 42280 - 42272), nzTpIcepk0o8(chr(0b110000) + chr(0b1000011 + 0o54) + chr(0b101110 + 0o3) + chr(0b110001 + 0o1) + '\067', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + chr(1736 - 1682) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\157' + chr(0b100001 + 0o22) + chr(0b100010 + 0o23) + chr(54), 0o10), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\157' + '\x32' + chr(0b11010 + 0o32) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + '\063' + chr(0b110110) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b110 + 0o151) + chr(0b100000 + 0o22) + '\062' + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(356 - 306) + '\065' + '\x35', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b100100 + 0o15) + chr(0b0 + 0o61) + chr(2556 - 2503), 0b1000), nzTpIcepk0o8(chr(1707 - 1659) + chr(0b1101111) + '\x31' + chr(51) + chr(2659 - 2604), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(53) + chr(2587 - 2532), 0b1000), nzTpIcepk0o8(chr(484 - 436) + chr(0b1101111) + chr(0b101101 + 0o4) + chr(784 - 729) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b10001 + 0o136) + '\061' + '\x36' + chr(2125 - 2075), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(4043 - 3932) + '\x33' + chr(0b110110) + '\x33', 0o10), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b1010101 + 0o32) + '\061' + '\x33' + '\x30', 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\063' + '\x37' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b1001100 + 0o43) + chr(0b110011) + '\060' + chr(0b100011 + 0o16), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\066' + chr(2128 - 2078), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\065' + chr(0b110111), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x33' + chr(0b110100), 40996 - 40988), nzTpIcepk0o8('\x30' + '\157' + chr(52) + '\063', 0o10), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + chr(241 - 189) + chr(1252 - 1200), 0b1000), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1101111) + chr(2047 - 1996) + chr(53) + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1010100 + 0o33) + chr(0b110001) + chr(0b100111 + 0o12) + '\x32', 48389 - 48381), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b11110 + 0o24) + chr(815 - 761) + chr(2218 - 2167), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(0b10000 + 0o45) + chr(0b110010), 49598 - 49590), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(0b1000 + 0o51) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(191 - 143) + chr(0b110001 + 0o76) + chr(0b100100 + 0o20) + chr(1279 - 1228), 8), nzTpIcepk0o8(chr(0b110000) + chr(10980 - 10869) + chr(51) + '\x32' + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + chr(0b110100) + chr(49), 2175 - 2167), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\157' + chr(0b110001) + chr(0b110011) + chr(365 - 316), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b100010 + 0o21) + '\060' + '\x30', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(52) + '\x32', 21990 - 21982), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b10010 + 0o41) + chr(49) + chr(52), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(6482 - 6371) + chr(0b110011 + 0o2) + chr(48), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xbb'), chr(1021 - 921) + chr(0b110000 + 0o65) + '\143' + '\x6f' + chr(0b1100100) + chr(0b101100 + 0o71))(chr(0b1110101) + chr(0b111101 + 0o67) + chr(7029 - 6927) + chr(45) + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def xIfGJsicqHxM(oo8448oP2LJ8=None, rdjDjZPTioZ3=nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001), ord("\x08")), QpQhPtpeU4jL=roI3spqORKae(oprIvDIRQyCb, roI3spqORKae(ES5oEprVxulp(b'\xfa\xd7&\xc9\xf4#\xc3\x05\xe4\x97\xe2\x97'), chr(0b1011111 + 0o5) + chr(435 - 334) + chr(99) + chr(0b1101111) + chr(0b1011000 + 0o14) + chr(6969 - 6868))('\165' + '\x74' + chr(0b110100 + 0o62) + chr(45) + chr(0b111000)))):
if oo8448oP2LJ8 is None:
def Vstsm8DUicyG(oo8448oP2LJ8):
return xIfGJsicqHxM(oo8448oP2LJ8, immediate=rdjDjZPTioZ3, timer=QpQhPtpeU4jL)
return Vstsm8DUicyG
KhXPEIWBXQzE = EbkY7gGypck7(oo8448oP2LJ8, immediate=rdjDjZPTioZ3, timer=QpQhPtpeU4jL)
def nHcxLZKjV1CZ(*eemPYp2vtTSr, **n_DqV9fOWrXc):
return KhXPEIWBXQzE(*eemPYp2vtTSr, **n_DqV9fOWrXc)
nHcxLZKjV1CZ.yfEeqQiUoqWT = oo8448oP2LJ8.yfEeqQiUoqWT
nHcxLZKjV1CZ.AYtDRlqeP0tq = oo8448oP2LJ8.AYtDRlqeP0tq
nHcxLZKjV1CZ.vN7a1CEarTrT = oo8448oP2LJ8.vN7a1CEarTrT
nHcxLZKjV1CZ.BucoAsuYpo5x = oo8448oP2LJ8.BucoAsuYpo5x
return nHcxLZKjV1CZ
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/profilehooks.py
|
FuncProfile.print_stats
|
def print_stats(self):
"""Print profile information to sys.stdout."""
funcname = self.fn.__name__
filename = self.fn.__code__.co_filename
lineno = self.fn.__code__.co_firstlineno
print("")
print("*** PROFILER RESULTS ***")
print("%s (%s:%s)" % (funcname, filename, lineno))
if self.skipped:
skipped = "(%d calls not profiled)" % self.skipped
else:
skipped = ""
print("function called %d times%s" % (self.ncalls, skipped))
print("")
stats = self.stats
if self.filename:
stats.dump_stats(self.filename)
if not self.dirs:
stats.strip_dirs()
stats.sort_stats(*self.sort)
stats.print_stats(self.entries)
|
python
|
def print_stats(self):
"""Print profile information to sys.stdout."""
funcname = self.fn.__name__
filename = self.fn.__code__.co_filename
lineno = self.fn.__code__.co_firstlineno
print("")
print("*** PROFILER RESULTS ***")
print("%s (%s:%s)" % (funcname, filename, lineno))
if self.skipped:
skipped = "(%d calls not profiled)" % self.skipped
else:
skipped = ""
print("function called %d times%s" % (self.ncalls, skipped))
print("")
stats = self.stats
if self.filename:
stats.dump_stats(self.filename)
if not self.dirs:
stats.strip_dirs()
stats.sort_stats(*self.sort)
stats.print_stats(self.entries)
|
[
"def",
"print_stats",
"(",
"self",
")",
":",
"funcname",
"=",
"self",
".",
"fn",
".",
"__name__",
"filename",
"=",
"self",
".",
"fn",
".",
"__code__",
".",
"co_filename",
"lineno",
"=",
"self",
".",
"fn",
".",
"__code__",
".",
"co_firstlineno",
"print",
"(",
"\"\"",
")",
"print",
"(",
"\"*** PROFILER RESULTS ***\"",
")",
"print",
"(",
"\"%s (%s:%s)\"",
"%",
"(",
"funcname",
",",
"filename",
",",
"lineno",
")",
")",
"if",
"self",
".",
"skipped",
":",
"skipped",
"=",
"\"(%d calls not profiled)\"",
"%",
"self",
".",
"skipped",
"else",
":",
"skipped",
"=",
"\"\"",
"print",
"(",
"\"function called %d times%s\"",
"%",
"(",
"self",
".",
"ncalls",
",",
"skipped",
")",
")",
"print",
"(",
"\"\"",
")",
"stats",
"=",
"self",
".",
"stats",
"if",
"self",
".",
"filename",
":",
"stats",
".",
"dump_stats",
"(",
"self",
".",
"filename",
")",
"if",
"not",
"self",
".",
"dirs",
":",
"stats",
".",
"strip_dirs",
"(",
")",
"stats",
".",
"sort_stats",
"(",
"*",
"self",
".",
"sort",
")",
"stats",
".",
"print_stats",
"(",
"self",
".",
"entries",
")"
] |
Print profile information to sys.stdout.
|
[
"Print",
"profile",
"information",
"to",
"sys",
".",
"stdout",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/profilehooks.py#L332-L352
|
train
|
Print profile information to sys. stdout.
|
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,aHx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N96r1,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(0b1010010 + 0o35) + chr(51) + chr(2060 - 2006) + chr(0b11110 + 0o22), ord("\x08")), nzTpIcepk0o8(chr(0b10110 + 0o32) + '\x6f' + '\x33' + chr(0b110111) + chr(3015 - 2960), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b11001 + 0o34) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(2226 - 2178) + '\x6f' + chr(0b101101 + 0o6) + '\x37' + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\x6f' + chr(2315 - 2266) + chr(780 - 727) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + '\x32' + chr(48), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1010000 + 0o37) + chr(54) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + chr(913 - 865) + chr(410 - 360), ord("\x08")), nzTpIcepk0o8(chr(1197 - 1149) + chr(0b1101111) + '\x32' + chr(0b110100) + chr(215 - 167), 8764 - 8756), nzTpIcepk0o8(chr(48) + chr(0b1100100 + 0o13) + '\062' + '\067' + '\x34', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + chr(0b11111 + 0o30) + '\x30', 0b1000), nzTpIcepk0o8('\060' + chr(3505 - 3394) + chr(612 - 562) + chr(1377 - 1327) + '\x36', 0o10), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(3840 - 3729) + chr(0b110001) + '\060' + '\067', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(0b1100100 + 0o13) + chr(50) + chr(0b110100) + '\060', 8), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1011101 + 0o22) + chr(1181 - 1131) + chr(0b100000 + 0o25) + '\x36', 0o10), nzTpIcepk0o8(chr(334 - 286) + chr(0b1101111) + chr(51) + '\065', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1581 - 1530) + '\064' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(535 - 487) + chr(0b1101111) + chr(0b11110 + 0o23) + chr(51) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1000110 + 0o51) + '\062' + '\066' + '\060', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\065' + chr(0b110010), 14461 - 14453), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + chr(1013 - 962) + '\065', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + '\x32' + '\065', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + '\062' + chr(0b10110 + 0o40), 5040 - 5032), nzTpIcepk0o8(chr(934 - 886) + '\x6f' + '\061' + chr(0b101 + 0o57) + '\x36', 0b1000), nzTpIcepk0o8('\060' + chr(7715 - 7604) + '\063' + '\065' + '\061', 0b1000), nzTpIcepk0o8(chr(1720 - 1672) + chr(111) + chr(50) + chr(0b101001 + 0o12) + chr(0b110100), 33399 - 33391), nzTpIcepk0o8(chr(0b110000) + chr(6598 - 6487) + chr(54) + chr(0b10001 + 0o45), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1001101 + 0o42) + '\062', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b101 + 0o62) + '\063', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + '\x35' + chr(50), 0o10), nzTpIcepk0o8(chr(333 - 285) + chr(3975 - 3864) + chr(0b101001 + 0o11) + '\x32' + '\x31', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2393 - 2344) + chr(51) + chr(0b101000 + 0o17), 0b1000), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\157' + '\062' + chr(0b110100) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b100 + 0o56) + chr(1925 - 1875) + chr(0b100010 + 0o24), 8), nzTpIcepk0o8('\060' + '\x6f' + chr(0b101 + 0o55) + '\x37', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + '\x31', 58658 - 58650), nzTpIcepk0o8('\x30' + chr(6076 - 5965) + chr(696 - 646) + '\061' + '\x31', 8940 - 8932), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1176 - 1127) + '\x30' + chr(0b10001 + 0o40), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110011) + chr(2102 - 2048) + chr(0b110111), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(6430 - 6319) + chr(53) + '\x30', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xde'), '\144' + '\x65' + '\x63' + '\x6f' + chr(0b1100100) + '\145')('\x75' + '\164' + chr(0b111001 + 0o55) + chr(0b101101) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def TK4I9pp00H4t(hXMPsSrOQzbh):
JYPNTPR09h26 = hXMPsSrOQzbh.fn.AYtDRlqeP0tq
FxZHtXEolYsL = hXMPsSrOQzbh.fn.__code__.co_filename
soyUrUW37Gvb = hXMPsSrOQzbh.fn.__code__.co_firstlineno
v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b''), '\144' + '\145' + chr(99) + chr(111) + chr(0b1100100) + '\x65')(chr(12445 - 12328) + chr(0b100100 + 0o120) + '\x66' + chr(0b101001 + 0o4) + '\070'))
v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\xda\xd5\xc7\xd99\x82~\x04\xe9\xf0\xfd\xc4gL\xe5\xfdH\xa9\x0f\xe3\nw\x7f\xfc'), '\144' + '\x65' + '\x63' + chr(0b100111 + 0o110) + chr(9826 - 9726) + '\145')(chr(2585 - 2468) + chr(0b110001 + 0o103) + chr(0b1010000 + 0o26) + '\055' + chr(0b110001 + 0o7)))
v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\xd5\x8c\xcd\xd1L\xa3\x0bg\xd3\x95'), chr(0b1100010 + 0o2) + chr(0b101100 + 0o71) + chr(99) + chr(111) + '\144' + '\x65')(chr(0b0 + 0o165) + chr(0b1110100) + '\146' + chr(0b101101) + chr(2493 - 2437)) % (JYPNTPR09h26, FxZHtXEolYsL, soyUrUW37Gvb))
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa8\xb6\xaa\xb6]\x86hr\xf6\xe3\xcf\xdc'), '\x64' + '\x65' + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(101))('\165' + '\x74' + chr(0b1100110) + chr(299 - 254) + '\070')):
XIGO4VY0V_wJ = roI3spqORKae(ES5oEprVxulp(b'\xd8\xda\x89\xd9\n\xb1].\xd3\x9c\xd6\xf93>\xd0\xdcr\x832\xdcO9|'), '\x64' + chr(0b1011111 + 0o6) + '\x63' + chr(0b1101111) + chr(8004 - 7904) + chr(0b1100101))(chr(0b110111 + 0o76) + chr(116) + chr(8829 - 8727) + '\055' + chr(0b101000 + 0o20)) % hXMPsSrOQzbh.XIGO4VY0V_wJ
else:
XIGO4VY0V_wJ = roI3spqORKae(ES5oEprVxulp(b''), chr(100) + '\145' + '\x63' + '\x6f' + chr(0b1011010 + 0o12) + chr(0b111110 + 0o47))('\x75' + chr(0b1101 + 0o147) + '\146' + '\055' + chr(0b1111 + 0o51))
v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\x96\x8a\x83\x9a\x1d\xb9^,\x80\xdf\xd9\xfa+{\xc4\x8e8\x81{\xc4C00\xa5C\x9a'), chr(0b1000 + 0o134) + chr(0b111 + 0o136) + chr(0b1100011) + '\157' + '\144' + '\x65')(chr(4775 - 4658) + chr(0b1110100) + '\146' + chr(0b111 + 0o46) + chr(0b100110 + 0o22)) % (roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x9e\x9c\x8c\x95\x05\xa3'), '\x64' + chr(8175 - 8074) + '\x63' + chr(0b111000 + 0o67) + '\144' + '\145')('\x75' + chr(0b101000 + 0o114) + chr(102) + chr(0b101100 + 0o1) + '\070')), XIGO4VY0V_wJ))
v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b''), '\144' + chr(0b11100 + 0o111) + chr(0b1000011 + 0o40) + '\x6f' + chr(100) + '\145')('\x75' + chr(0b1101011 + 0o11) + '\146' + chr(0b1011 + 0o42) + chr(0b111000)))
lhLZcWIiifT1 = hXMPsSrOQzbh.lhLZcWIiifT1
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xb6\x87\xb7\xb1\x1d\x88t-\xcc\xe5\xcb\xda'), chr(0b10000 + 0o124) + chr(5016 - 4915) + chr(0b1100011) + chr(10133 - 10022) + chr(0b1100100) + '\x65')(chr(0b1110101) + '\164' + chr(0b110111 + 0o57) + chr(1744 - 1699) + chr(0b111000))):
roI3spqORKae(lhLZcWIiifT1, roI3spqORKae(ES5oEprVxulp(b'\x94\x8a\x80\x896\xa3E#\xd4\xcf'), chr(100) + '\145' + chr(0b1100011) + chr(0b110111 + 0o70) + chr(1188 - 1088) + chr(0b1100100 + 0o1))(chr(117) + chr(0b1110100) + chr(102) + '\x2d' + '\070'))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xb6\x87\xb7\xb1\x1d\x88t-\xcc\xe5\xcb\xda'), chr(0b1100100) + chr(101) + chr(0b100011 + 0o100) + '\157' + '\x64' + chr(0b1000011 + 0o42))(chr(12822 - 12705) + '\164' + chr(102) + chr(0b10111 + 0o26) + '\070')))
if not roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x94\x96\x9f\x8a'), '\x64' + chr(0b1100101) + chr(0b1000010 + 0o41) + chr(9440 - 9329) + chr(100) + chr(101))(chr(117) + '\164' + chr(0b110010 + 0o64) + '\x2d' + '\x38')):
roI3spqORKae(lhLZcWIiifT1, roI3spqORKae(ES5oEprVxulp(b'\x83\x8b\x9f\x90\x19\x8fU+\xd2\xcf'), chr(100) + chr(0b1011100 + 0o11) + chr(4536 - 4437) + chr(111) + chr(0b101001 + 0o73) + chr(0b1100101))(chr(0b1101010 + 0o13) + chr(6080 - 5964) + chr(102) + chr(45) + chr(56)))()
roI3spqORKae(lhLZcWIiifT1, roI3spqORKae(ES5oEprVxulp(b'\x83\x90\x9f\x8d6\xa3E#\xd4\xcf'), '\x64' + chr(0b1001011 + 0o32) + chr(3061 - 2962) + '\157' + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + '\x38'))(*roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x83\x90\x9f\x8d'), '\x64' + chr(101) + chr(0b1100011) + chr(0b1101111) + '\x64' + '\145')(chr(0b1110101) + chr(0b1001001 + 0o53) + chr(5492 - 5390) + '\055' + '\070')))
roI3spqORKae(lhLZcWIiifT1, roI3spqORKae(ES5oEprVxulp(b'\x80\x8d\x84\x97\x1d\x8fB6\xc1\xc8\xcb'), chr(3261 - 3161) + chr(101) + chr(99) + '\x6f' + '\x64' + chr(0b110101 + 0o60))('\x75' + chr(116) + '\x66' + '\055' + chr(0b111000)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x99\xb9\xa1\x9f9\xe3c-\x93\xe6\xf0\xe5'), chr(0b1000 + 0o134) + chr(5577 - 5476) + chr(5409 - 5310) + '\157' + '\144' + chr(6038 - 5937))('\x75' + '\164' + chr(0b1100110) + '\055' + '\x38')))
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/profilehooks.py
|
FuncProfile.reset_stats
|
def reset_stats(self):
"""Reset accumulated profiler statistics."""
# Note: not using self.Profile, since pstats.Stats() fails then
self.stats = pstats.Stats(Profile())
self.ncalls = 0
self.skipped = 0
|
python
|
def reset_stats(self):
"""Reset accumulated profiler statistics."""
# Note: not using self.Profile, since pstats.Stats() fails then
self.stats = pstats.Stats(Profile())
self.ncalls = 0
self.skipped = 0
|
[
"def",
"reset_stats",
"(",
"self",
")",
":",
"# Note: not using self.Profile, since pstats.Stats() fails then",
"self",
".",
"stats",
"=",
"pstats",
".",
"Stats",
"(",
"Profile",
"(",
")",
")",
"self",
".",
"ncalls",
"=",
"0",
"self",
".",
"skipped",
"=",
"0"
] |
Reset accumulated profiler statistics.
|
[
"Reset",
"accumulated",
"profiler",
"statistics",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/profilehooks.py#L354-L359
|
train
|
Reset accumulated profiler statistics.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIs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,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(822 - 774) + '\x6f' + '\063' + '\061' + chr(1602 - 1552), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(10374 - 10263) + chr(0b110010) + chr(1422 - 1369), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(11578 - 11467) + chr(0b111 + 0o52) + chr(1293 - 1244) + chr(0b110001), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + '\x32' + '\x31', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(2317 - 2267) + chr(0b11 + 0o55), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\063' + chr(912 - 861) + chr(715 - 661), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b110101 + 0o2) + chr(638 - 587), 51663 - 51655), nzTpIcepk0o8(chr(1709 - 1661) + '\x6f' + '\x36' + chr(52), 0b1000), nzTpIcepk0o8('\060' + chr(8214 - 8103) + chr(0b101111 + 0o4) + chr(0b110011) + chr(54), 8), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1101111) + chr(0b10 + 0o60) + '\060' + chr(51), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + '\x36', 52957 - 52949), nzTpIcepk0o8(chr(909 - 861) + chr(5228 - 5117) + '\x33' + chr(0b110 + 0o54) + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(1006 - 955) + chr(0b110010) + chr(0b101 + 0o53), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + chr(0b1101 + 0o50) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(10045 - 9934) + chr(662 - 611) + '\x35' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(48) + chr(9763 - 9652) + chr(0b1000 + 0o52) + chr(0b110000) + chr(52), 48550 - 48542), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + '\063' + chr(0b1010 + 0o55), 50762 - 50754), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + chr(49) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(92 - 43) + chr(0b110000) + chr(0b100100 + 0o23), 0o10), nzTpIcepk0o8(chr(48) + chr(0b101111 + 0o100) + chr(0b110110) + chr(54), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(51) + chr(49), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(51) + chr(103 - 50) + chr(2140 - 2087), 40828 - 40820), nzTpIcepk0o8(chr(48) + chr(0b1011101 + 0o22) + '\x31' + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b101110 + 0o101) + '\x36', 34663 - 34655), nzTpIcepk0o8(chr(48) + chr(0b101000 + 0o107) + '\x37' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(10598 - 10487) + chr(0b110011) + chr(0b110001) + chr(53), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b110010 + 0o75) + chr(0b101001 + 0o12), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1100111 + 0o10) + '\066' + '\x35', 818 - 810), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b11100 + 0o123) + '\061', 4108 - 4100), nzTpIcepk0o8(chr(48) + chr(11483 - 11372) + '\x31' + '\067' + chr(48), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b100011 + 0o114) + '\x32' + chr(50) + '\x35', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + chr(50) + '\x31', 0o10), nzTpIcepk0o8(chr(1212 - 1164) + chr(111) + chr(49) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(833 - 781) + chr(0b1101 + 0o44), 0o10), nzTpIcepk0o8(chr(2271 - 2223) + chr(4327 - 4216) + '\062' + chr(48) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\157' + chr(0b110001) + chr(50) + chr(0b101010 + 0o12), ord("\x08")), nzTpIcepk0o8(chr(318 - 270) + chr(111) + chr(0b110010) + '\060' + chr(53), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(1493 - 1438) + chr(0b1011 + 0o53), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + chr(0b101100 + 0o6) + chr(0b101111 + 0o4), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1 + 0o61) + chr(0b110000), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(10832 - 10721) + '\x35' + chr(0b110000), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xe4'), '\x64' + chr(3656 - 3555) + chr(4324 - 4225) + chr(0b1010010 + 0o35) + chr(100) + '\x65')(chr(0b1010100 + 0o41) + chr(0b1110100) + chr(5565 - 5463) + chr(45) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def oAmXoaWclYx2(hXMPsSrOQzbh):
hXMPsSrOQzbh.lhLZcWIiifT1 = v06tntER88PM.Stats(hwmsTXvox3UH())
hXMPsSrOQzbh.NvLQgOBATqxt = nzTpIcepk0o8(chr(2160 - 2112) + chr(11423 - 11312) + '\060', 0b1000)
hXMPsSrOQzbh.XIGO4VY0V_wJ = nzTpIcepk0o8(chr(1706 - 1658) + '\x6f' + chr(960 - 912), 8)
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/profilehooks.py
|
TraceFuncCoverage.atexit
|
def atexit(self):
"""Stop profiling and print profile information to sys.stderr.
This function is registered as an atexit hook.
"""
funcname = self.fn.__name__
filename = self.fn.__code__.co_filename
lineno = self.fn.__code__.co_firstlineno
print("")
print("*** COVERAGE RESULTS ***")
print("%s (%s:%s)" % (funcname, filename, lineno))
print("function called %d times" % self.ncalls)
print("")
fs = FuncSource(self.fn)
for (filename, lineno), count in self.tracer.counts.items():
if filename != fs.filename:
continue
fs.mark(lineno, count)
print(fs)
never_executed = fs.count_never_executed()
if never_executed:
print("%d lines were not executed." % never_executed)
|
python
|
def atexit(self):
"""Stop profiling and print profile information to sys.stderr.
This function is registered as an atexit hook.
"""
funcname = self.fn.__name__
filename = self.fn.__code__.co_filename
lineno = self.fn.__code__.co_firstlineno
print("")
print("*** COVERAGE RESULTS ***")
print("%s (%s:%s)" % (funcname, filename, lineno))
print("function called %d times" % self.ncalls)
print("")
fs = FuncSource(self.fn)
for (filename, lineno), count in self.tracer.counts.items():
if filename != fs.filename:
continue
fs.mark(lineno, count)
print(fs)
never_executed = fs.count_never_executed()
if never_executed:
print("%d lines were not executed." % never_executed)
|
[
"def",
"atexit",
"(",
"self",
")",
":",
"funcname",
"=",
"self",
".",
"fn",
".",
"__name__",
"filename",
"=",
"self",
".",
"fn",
".",
"__code__",
".",
"co_filename",
"lineno",
"=",
"self",
".",
"fn",
".",
"__code__",
".",
"co_firstlineno",
"print",
"(",
"\"\"",
")",
"print",
"(",
"\"*** COVERAGE RESULTS ***\"",
")",
"print",
"(",
"\"%s (%s:%s)\"",
"%",
"(",
"funcname",
",",
"filename",
",",
"lineno",
")",
")",
"print",
"(",
"\"function called %d times\"",
"%",
"self",
".",
"ncalls",
")",
"print",
"(",
"\"\"",
")",
"fs",
"=",
"FuncSource",
"(",
"self",
".",
"fn",
")",
"for",
"(",
"filename",
",",
"lineno",
")",
",",
"count",
"in",
"self",
".",
"tracer",
".",
"counts",
".",
"items",
"(",
")",
":",
"if",
"filename",
"!=",
"fs",
".",
"filename",
":",
"continue",
"fs",
".",
"mark",
"(",
"lineno",
",",
"count",
")",
"print",
"(",
"fs",
")",
"never_executed",
"=",
"fs",
".",
"count_never_executed",
"(",
")",
"if",
"never_executed",
":",
"print",
"(",
"\"%d lines were not executed.\"",
"%",
"never_executed",
")"
] |
Stop profiling and print profile information to sys.stderr.
This function is registered as an atexit hook.
|
[
"Stop",
"profiling",
"and",
"print",
"profile",
"information",
"to",
"sys",
".",
"stderr",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/profilehooks.py#L569-L590
|
train
|
Stop profiling and print profile information to sys. stderr.
|
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,WbNHlDKpyPt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EhJY,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(754 - 704) + '\066' + chr(48), 0b1000), nzTpIcepk0o8(chr(0b11001 + 0o27) + '\157' + chr(0b1011 + 0o50) + chr(2013 - 1958) + chr(52), 0o10), nzTpIcepk0o8(chr(48) + chr(8344 - 8233) + chr(664 - 614) + chr(53) + chr(0b111 + 0o51), 0b1000), nzTpIcepk0o8(chr(1031 - 983) + chr(0b1101111) + chr(0b110010) + '\x33', 22958 - 22950), nzTpIcepk0o8('\x30' + chr(111) + chr(1815 - 1765) + chr(0b100010 + 0o16) + chr(2190 - 2136), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + '\x34' + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b10000 + 0o41) + chr(0b110010 + 0o3) + '\065', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b100111 + 0o13) + chr(55), 46061 - 46053), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b1101111) + '\062' + '\x31' + '\062', 0o10), nzTpIcepk0o8(chr(48) + chr(5243 - 5132) + chr(54 - 3) + chr(0b110000) + chr(0b11011 + 0o31), 6667 - 6659), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + '\x32' + '\x37', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(0b110111 + 0o0) + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b110101 + 0o72) + chr(0b110011) + chr(49) + '\x30', 59150 - 59142), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\x6f' + '\x32' + chr(0b100010 + 0o16) + '\065', 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + '\063' + chr(0b100010 + 0o21), 63851 - 63843), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + chr(52) + chr(0b11101 + 0o24), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(49) + '\x34' + '\062', 6314 - 6306), nzTpIcepk0o8(chr(1380 - 1332) + chr(0b1101111) + chr(0b110101) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(111) + '\061' + chr(696 - 641) + chr(0b110 + 0o53), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x33' + chr(54) + chr(0b110110), 36782 - 36774), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + chr(0b10110 + 0o33) + chr(0b11101 + 0o32), 43520 - 43512), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + '\066' + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(718 - 667) + chr(0b11001 + 0o34) + chr(169 - 115), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110111) + chr(48), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + chr(0b110010) + chr(54), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x32' + '\060' + '\061', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + chr(403 - 348) + chr(2442 - 2387), 60917 - 60909), nzTpIcepk0o8('\060' + chr(111) + chr(0b10100 + 0o35) + chr(53), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + chr(743 - 695) + chr(0b110110), 8), nzTpIcepk0o8('\x30' + chr(0b1001100 + 0o43) + chr(1718 - 1667) + chr(55) + chr(0b11011 + 0o30), 0b1000), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b100100 + 0o113) + '\x33' + chr(0b110111) + chr(0b110100), 8), nzTpIcepk0o8(chr(48) + chr(6789 - 6678) + chr(0b11001 + 0o31) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1100110 + 0o11) + chr(0b110010) + chr(1193 - 1145) + chr(2866 - 2812), 8), nzTpIcepk0o8('\060' + chr(111) + chr(0b1010 + 0o51) + '\067' + '\065', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(4685 - 4574) + '\066' + chr(932 - 882), 56219 - 56211), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\157' + '\x31' + chr(0b100100 + 0o21) + '\x35', 8), nzTpIcepk0o8(chr(48) + chr(0b1010000 + 0o37) + chr(55) + '\063', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + chr(48), 0o10), nzTpIcepk0o8(chr(48) + chr(0b101110 + 0o101) + chr(0b110001) + '\x32' + chr(0b100001 + 0o24), 41409 - 41401), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + '\061' + chr(0b110001 + 0o6), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(8455 - 8344) + chr(53) + '\x30', 50043 - 50035)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x9e'), chr(0b10010 + 0o122) + chr(0b10111 + 0o116) + '\143' + chr(9762 - 9651) + '\x64' + chr(748 - 647))(chr(10376 - 10259) + '\x74' + '\x66' + chr(45) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def fHU0TT4mmrR6(hXMPsSrOQzbh):
JYPNTPR09h26 = hXMPsSrOQzbh.fn.AYtDRlqeP0tq
FxZHtXEolYsL = hXMPsSrOQzbh.fn.__code__.co_filename
soyUrUW37Gvb = hXMPsSrOQzbh.fn.__code__.co_firstlineno
v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b''), chr(100) + chr(0b1100101) + chr(0b1011 + 0o130) + chr(111) + chr(100) + '\145')(chr(12248 - 12131) + chr(116) + chr(0b1100110) + chr(1031 - 986) + '\x38'))
v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\x9a\xd6\x823\xc5\xed;R\xd8\x85\x10:\xe8\xd7\xde\xf27`-\xa5o]\xc4\x12'), chr(6613 - 6513) + chr(8296 - 8195) + chr(8591 - 8492) + chr(111) + chr(100) + '\x65')('\x75' + chr(8412 - 8296) + '\146' + '\x2d' + chr(1483 - 1427)))
v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\x95\x8f\x88;\xa3\xd1W2\xf9\xed'), chr(4475 - 4375) + '\145' + '\x63' + chr(8088 - 7977) + '\144' + '\x65')('\165' + chr(116) + chr(7155 - 7053) + chr(45) + '\070') % (JYPNTPR09h26, FxZHtXEolYsL, soyUrUW37Gvb))
v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\xd6\x89\xc6p\xf2\xcb\x02y\xaa\xa76\x13\xa4\xe0\xff\x81GHY\x82&\x1a\x8bK'), chr(0b1100 + 0o130) + chr(0b100111 + 0o76) + chr(0b1000110 + 0o35) + '\157' + '\144' + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(45) + chr(0b101001 + 0o17)) % roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xfe\x8a\xe4B\xe1\xed/V\xde\xb5/\x0b'), chr(0b1100100) + '\x65' + chr(0b1001000 + 0o33) + '\157' + chr(0b1100100) + chr(0b101010 + 0o73))('\x75' + chr(0b1100100 + 0o20) + chr(102) + chr(45) + chr(1133 - 1077))))
v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b''), chr(0b1100100) + '\145' + chr(99) + '\157' + '\x64' + '\x65')(chr(11984 - 11867) + chr(0b1110100) + chr(0b1100110) + chr(946 - 901) + chr(821 - 765)))
ANVmZzFk_RHC = HSUdDLl0MYMr(hXMPsSrOQzbh.oo8448oP2LJ8)
for ((FxZHtXEolYsL, soyUrUW37Gvb), sQSWKlURp7QK) in roI3spqORKae(hXMPsSrOQzbh.tracer.counts, roI3spqORKae(ES5oEprVxulp(b'\xe9\xa3\xc6]\xc3\xd8%#\xb9\xb2\x0f\x16'), '\144' + '\x65' + chr(0b1100011) + '\157' + '\144' + chr(0b1100101))(chr(117) + '\164' + chr(102) + chr(0b10111 + 0o26) + chr(56)))():
if FxZHtXEolYsL != roI3spqORKae(ANVmZzFk_RHC, roI3spqORKae(ES5oEprVxulp(b'\xf6\x84\xf2[\xf2\xfa(x\xe6\x9d$3'), '\x64' + chr(0b1000 + 0o135) + '\x63' + chr(0b1101111) + '\x64' + chr(9493 - 9392))(chr(0b1101011 + 0o12) + chr(9399 - 9283) + '\146' + chr(45) + '\x38')):
continue
roI3spqORKae(ANVmZzFk_RHC, roI3spqORKae(ES5oEprVxulp(b'\xc4\xcb\xc7|\xd5\xd1[q\xe2\xb5 \x1a'), '\x64' + chr(101) + '\143' + chr(0b111111 + 0o60) + '\x64' + '\x65')('\x75' + chr(116) + '\146' + chr(0b101101) + chr(1580 - 1524)))(soyUrUW37Gvb, sQSWKlURp7QK)
v8jsMqaYV6U2(ANVmZzFk_RHC)
J4T1bdjny1Jg = ANVmZzFk_RHC.count_never_executed()
if J4T1bdjny1Jg:
v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\x95\x98\x88\x7f\xef\xcc\x08d\xaa\xb32\r\xad\xa5\xf5\xce\x16\x0c\x1c\x8e*\x14\x9bL\xb3\xe5\x91'), chr(0b1100100) + '\145' + '\x63' + chr(111) + '\x64' + '\x65')(chr(0b1101111 + 0o6) + chr(116) + chr(0b1100110) + chr(45) + chr(0b110110 + 0o2)) % J4T1bdjny1Jg)
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/profilehooks.py
|
FuncSource.find_source_lines
|
def find_source_lines(self):
"""Mark all executable source lines in fn as executed 0 times."""
strs = trace.find_strings(self.filename)
lines = trace.find_lines_from_code(self.fn.__code__, strs)
self.firstcodelineno = sys.maxint
for lineno in lines:
self.firstcodelineno = min(self.firstcodelineno, lineno)
self.sourcelines.setdefault(lineno, 0)
if self.firstcodelineno == sys.maxint:
self.firstcodelineno = self.firstlineno
|
python
|
def find_source_lines(self):
"""Mark all executable source lines in fn as executed 0 times."""
strs = trace.find_strings(self.filename)
lines = trace.find_lines_from_code(self.fn.__code__, strs)
self.firstcodelineno = sys.maxint
for lineno in lines:
self.firstcodelineno = min(self.firstcodelineno, lineno)
self.sourcelines.setdefault(lineno, 0)
if self.firstcodelineno == sys.maxint:
self.firstcodelineno = self.firstlineno
|
[
"def",
"find_source_lines",
"(",
"self",
")",
":",
"strs",
"=",
"trace",
".",
"find_strings",
"(",
"self",
".",
"filename",
")",
"lines",
"=",
"trace",
".",
"find_lines_from_code",
"(",
"self",
".",
"fn",
".",
"__code__",
",",
"strs",
")",
"self",
".",
"firstcodelineno",
"=",
"sys",
".",
"maxint",
"for",
"lineno",
"in",
"lines",
":",
"self",
".",
"firstcodelineno",
"=",
"min",
"(",
"self",
".",
"firstcodelineno",
",",
"lineno",
")",
"self",
".",
"sourcelines",
".",
"setdefault",
"(",
"lineno",
",",
"0",
")",
"if",
"self",
".",
"firstcodelineno",
"==",
"sys",
".",
"maxint",
":",
"self",
".",
"firstcodelineno",
"=",
"self",
".",
"firstlineno"
] |
Mark all executable source lines in fn as executed 0 times.
|
[
"Mark",
"all",
"executable",
"source",
"lines",
"in",
"fn",
"as",
"executed",
"0",
"times",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/profilehooks.py#L606-L615
|
train
|
Find all executable source lines in fn as executed 0 times.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e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Z,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(2073 - 2025) + chr(111) + chr(0b110001) + chr(51) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101011 + 0o4) + chr(0b110011) + chr(51) + chr(50), 0b1000), nzTpIcepk0o8(chr(100 - 52) + '\157' + chr(0b110010) + '\x31' + '\x31', 19206 - 19198), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(0b110101) + chr(0b110110), 36704 - 36696), nzTpIcepk0o8('\060' + chr(4761 - 4650) + '\x32' + chr(1144 - 1091) + chr(55), 31406 - 31398), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b1101110 + 0o1) + chr(0b1000 + 0o52) + '\x32' + chr(0b11001 + 0o36), 14960 - 14952), nzTpIcepk0o8('\x30' + chr(0b11100 + 0o123) + chr(0b11110 + 0o24) + chr(0b11100 + 0o33) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(52) + chr(54), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\062' + chr(51), 48141 - 48133), nzTpIcepk0o8('\x30' + chr(417 - 306) + chr(0b110111) + chr(52), 52967 - 52959), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(0b11000 + 0o35) + chr(0b110000), 47026 - 47018), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + '\x35' + '\062', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1409 - 1358) + chr(52) + '\x31', 47362 - 47354), nzTpIcepk0o8('\x30' + '\157' + chr(0b10100 + 0o37) + '\x33' + '\064', 0b1000), nzTpIcepk0o8(chr(262 - 214) + '\157' + '\067' + chr(0b110010), 0o10), nzTpIcepk0o8('\060' + chr(7821 - 7710) + chr(0b110000 + 0o3) + chr(0b110100) + chr(0b1010 + 0o47), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1403 - 1353) + '\060' + chr(49), 0o10), nzTpIcepk0o8(chr(1343 - 1295) + '\x6f' + chr(0b100011 + 0o16) + chr(1520 - 1466) + chr(0b110001), 26835 - 26827), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + chr(0b110000) + '\x34', 33508 - 33500), nzTpIcepk0o8(chr(237 - 189) + chr(0b1101111) + chr(0b0 + 0o63) + chr(51) + '\x31', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x36' + chr(0b110011), 64224 - 64216), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + chr(1466 - 1414) + chr(178 - 128), 0b1000), nzTpIcepk0o8(chr(240 - 192) + chr(0b1101111) + '\x31' + '\060' + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b1101 + 0o43) + '\157' + chr(0b101111 + 0o3) + '\060', 65239 - 65231), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + chr(0b110000) + chr(0b111 + 0o54), 0b1000), nzTpIcepk0o8(chr(1568 - 1520) + chr(0b1101111) + chr(518 - 468) + chr(1518 - 1470) + '\064', 8), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(5502 - 5391) + chr(0b110011) + chr(54) + '\063', 9515 - 9507), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(1009 - 956) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + chr(0b110100) + '\062', 8), nzTpIcepk0o8(chr(1043 - 995) + '\157' + chr(0b111 + 0o54) + chr(0b110010) + '\066', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(642 - 591) + chr(429 - 381) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(588 - 540) + chr(0b1101111) + chr(0b101111 + 0o5) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(1959 - 1911) + chr(0b1101111) + chr(0b10110 + 0o34) + chr(1141 - 1093) + '\x32', 1452 - 1444), nzTpIcepk0o8(chr(48) + chr(111) + '\066' + '\062', 0o10), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b10000 + 0o137) + '\063' + '\x35' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(711 - 663) + '\157' + '\x34' + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(2161 - 2113) + '\157' + '\x32' + chr(0b11011 + 0o33) + chr(874 - 824), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b111 + 0o150) + '\061' + chr(2490 - 2440) + chr(1596 - 1542), 0o10), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(111) + chr(0b101100 + 0o6) + chr(316 - 268) + '\066', ord("\x08")), nzTpIcepk0o8(chr(1579 - 1531) + '\157' + chr(50) + chr(1217 - 1169) + chr(49), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101100 + 0o11) + chr(2000 - 1952), 6556 - 6548)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'u'), '\144' + chr(0b1011010 + 0o13) + '\x63' + '\x6f' + chr(100) + chr(0b1100101))(chr(0b1110101) + '\164' + '\146' + '\055' + chr(2351 - 2295)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def An04QQPak2xV(hXMPsSrOQzbh):
h1D50OrMcUuI = pWLjIdbpSU3u.find_strings(hXMPsSrOQzbh.FxZHtXEolYsL)
vniSnlI09HNg = pWLjIdbpSU3u.find_lines_from_code(hXMPsSrOQzbh.fn.jMep1LQHSakB, h1D50OrMcUuI)
hXMPsSrOQzbh.jEDtlhPFdCfM = bpyfpu4kTbwL.dBoAdI4VXO5l
for soyUrUW37Gvb in vniSnlI09HNg:
hXMPsSrOQzbh.jEDtlhPFdCfM = XURpmPuEWCNF(hXMPsSrOQzbh.jEDtlhPFdCfM, soyUrUW37Gvb)
roI3spqORKae(hXMPsSrOQzbh.sourcelines, roI3spqORKae(ES5oEprVxulp(b'!\xbf\xb9\xe4\xe2\xe2\xf6\xdfaS\xbf\xb9'), chr(9569 - 9469) + chr(101) + '\x63' + '\x6f' + chr(0b111 + 0o135) + chr(5005 - 4904))(chr(117) + chr(116) + chr(9283 - 9181) + '\x2d' + chr(56)))(soyUrUW37Gvb, nzTpIcepk0o8(chr(1374 - 1326) + chr(0b1001001 + 0o46) + chr(0b110000), ord("\x08")))
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'1\x9f\xcd\xda\xc3\xff\xed\xa0w\x7f\x8e\xa7'), chr(100) + chr(101) + chr(4827 - 4728) + '\157' + chr(0b101010 + 0o72) + chr(0b111100 + 0o51))('\165' + '\x74' + '\x66' + chr(0b1000 + 0o45) + chr(2685 - 2629))) == roI3spqORKae(bpyfpu4kTbwL, roI3spqORKae(ES5oEprVxulp(b'?\x98\xe6\xef\xcb\xde\x89\xb0Ks\xdd\x86'), chr(0b1100100) + chr(5991 - 5890) + '\x63' + '\x6f' + chr(0b1100100) + chr(5001 - 4900))('\x75' + chr(7490 - 7374) + '\x66' + chr(45) + '\x38')):
hXMPsSrOQzbh.jEDtlhPFdCfM = hXMPsSrOQzbh.firstlineno
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/profilehooks.py
|
FuncSource.mark
|
def mark(self, lineno, count=1):
"""Mark a given source line as executed count times.
Multiple calls to mark for the same lineno add up.
"""
self.sourcelines[lineno] = self.sourcelines.get(lineno, 0) + count
|
python
|
def mark(self, lineno, count=1):
"""Mark a given source line as executed count times.
Multiple calls to mark for the same lineno add up.
"""
self.sourcelines[lineno] = self.sourcelines.get(lineno, 0) + count
|
[
"def",
"mark",
"(",
"self",
",",
"lineno",
",",
"count",
"=",
"1",
")",
":",
"self",
".",
"sourcelines",
"[",
"lineno",
"]",
"=",
"self",
".",
"sourcelines",
".",
"get",
"(",
"lineno",
",",
"0",
")",
"+",
"count"
] |
Mark a given source line as executed count times.
Multiple calls to mark for the same lineno add up.
|
[
"Mark",
"a",
"given",
"source",
"line",
"as",
"executed",
"count",
"times",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/profilehooks.py#L617-L622
|
train
|
Mark a given source line as executed count times.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M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M,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('\060' + chr(0b1000000 + 0o57) + chr(50) + chr(50) + '\x31', 0b1000), nzTpIcepk0o8(chr(1218 - 1170) + chr(0b110011 + 0o74) + chr(1795 - 1744) + chr(1797 - 1742) + chr(48), 63716 - 63708), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + chr(0b110111) + '\067', 18449 - 18441), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(49) + chr(1349 - 1294) + chr(1785 - 1733), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + '\060' + chr(52), 0b1000), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1101111) + chr(0b100001 + 0o21) + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(739 - 688) + '\064' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(51) + chr(50) + chr(51), 4272 - 4264), nzTpIcepk0o8(chr(0b110000) + chr(0b1010001 + 0o36) + '\061' + chr(0b100100 + 0o14) + chr(2237 - 2185), 8), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(0b10001 + 0o136) + chr(51) + chr(0b110110) + chr(0b10 + 0o63), 36864 - 36856), nzTpIcepk0o8(chr(1789 - 1741) + chr(0b1101111) + chr(0b1 + 0o60) + chr(0b11110 + 0o22) + '\x33', 44837 - 44829), nzTpIcepk0o8('\060' + chr(10474 - 10363) + chr(0b110011) + chr(0b110010) + chr(0b100100 + 0o21), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + '\x32' + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b101 + 0o56) + '\067' + chr(0b101100 + 0o6), ord("\x08")), nzTpIcepk0o8(chr(760 - 712) + chr(0b111101 + 0o62) + '\065' + chr(0b110011), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + chr(0b110110) + chr(51), 48943 - 48935), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11010 + 0o30) + chr(55) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b101001 + 0o10), ord("\x08")), nzTpIcepk0o8('\060' + chr(3387 - 3276) + chr(49) + '\x33' + '\x30', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(0b100111 + 0o20) + '\063', 18934 - 18926), nzTpIcepk0o8(chr(2064 - 2016) + chr(111) + '\062' + chr(1440 - 1390) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(53) + chr(227 - 179), 21990 - 21982), nzTpIcepk0o8(chr(0b110000) + chr(8743 - 8632) + chr(1446 - 1395) + chr(0b1110 + 0o50) + chr(0b11000 + 0o34), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + chr(51) + chr(263 - 213), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(2107 - 2057) + chr(55), 0o10), nzTpIcepk0o8('\060' + chr(3935 - 3824) + chr(2415 - 2360) + chr(1827 - 1772), ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\x6f' + '\x32' + '\064', 8), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\x6f' + '\x33' + chr(52) + chr(0b10011 + 0o41), 8), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\x30' + chr(8008 - 7897) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + chr(0b110011) + chr(727 - 678), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(0b1110 + 0o46) + chr(0b10000 + 0o41), ord("\x08")), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(111) + '\x37' + chr(903 - 851), 57749 - 57741), nzTpIcepk0o8('\060' + chr(448 - 337) + chr(939 - 889) + chr(50) + '\x34', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(49) + chr(2364 - 2314) + chr(0b1111 + 0o46), 23634 - 23626), nzTpIcepk0o8(chr(1520 - 1472) + chr(0b110001 + 0o76) + chr(311 - 261) + '\062' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + chr(49) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(1645 - 1597) + chr(0b1101111) + '\x31' + chr(501 - 447) + chr(0b110101), 0o10), nzTpIcepk0o8('\060' + chr(0b11111 + 0o120) + '\061' + chr(0b110100) + '\064', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\157' + chr(0b110100 + 0o1) + chr(0b111 + 0o51), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xbf'), chr(8879 - 8779) + chr(0b1100101) + chr(99) + chr(3225 - 3114) + chr(0b1100100) + chr(0b1100101))('\165' + chr(116) + '\x66' + chr(45) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def t7ooSs6fhqwe(hXMPsSrOQzbh, soyUrUW37Gvb, sQSWKlURp7QK=nzTpIcepk0o8(chr(1918 - 1870) + '\x6f' + chr(1551 - 1502), 8)):
hXMPsSrOQzbh.yYtkTXh61vGR[soyUrUW37Gvb] = hXMPsSrOQzbh.sourcelines.GUKetu4xaGsJ(soyUrUW37Gvb, nzTpIcepk0o8('\060' + '\157' + chr(0b110 + 0o52), 6728 - 6720)) + sQSWKlURp7QK
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/profilers/visual/profilehooks.py
|
FuncSource.count_never_executed
|
def count_never_executed(self):
"""Count statements that were never executed."""
lineno = self.firstlineno
counter = 0
for line in self.source:
if self.sourcelines.get(lineno) == 0:
if not self.blank_rx.match(line):
counter += 1
lineno += 1
return counter
|
python
|
def count_never_executed(self):
"""Count statements that were never executed."""
lineno = self.firstlineno
counter = 0
for line in self.source:
if self.sourcelines.get(lineno) == 0:
if not self.blank_rx.match(line):
counter += 1
lineno += 1
return counter
|
[
"def",
"count_never_executed",
"(",
"self",
")",
":",
"lineno",
"=",
"self",
".",
"firstlineno",
"counter",
"=",
"0",
"for",
"line",
"in",
"self",
".",
"source",
":",
"if",
"self",
".",
"sourcelines",
".",
"get",
"(",
"lineno",
")",
"==",
"0",
":",
"if",
"not",
"self",
".",
"blank_rx",
".",
"match",
"(",
"line",
")",
":",
"counter",
"+=",
"1",
"lineno",
"+=",
"1",
"return",
"counter"
] |
Count statements that were never executed.
|
[
"Count",
"statements",
"that",
"were",
"never",
"executed",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/profilers/visual/profilehooks.py#L624-L633
|
train
|
Count statements that were never executed.
|
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,LqOf4d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,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(0b11 + 0o55) + '\157' + chr(0b0 + 0o61) + chr(0b101111 + 0o1), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\063' + '\060', 0b1000), nzTpIcepk0o8(chr(48) + chr(7025 - 6914) + '\x32' + chr(0b10011 + 0o44) + chr(0b101001 + 0o7), 0o10), nzTpIcepk0o8(chr(286 - 238) + chr(8705 - 8594) + chr(0b1110 + 0o44) + '\x35' + chr(1616 - 1566), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(0b10001 + 0o41) + chr(50), 0o10), nzTpIcepk0o8(chr(186 - 138) + chr(0b1101111) + '\067' + chr(49), 0o10), nzTpIcepk0o8(chr(156 - 108) + chr(0b11010 + 0o125) + '\062' + '\065' + chr(0b110111), 34405 - 34397), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10111 + 0o37) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(1821 - 1773) + chr(0b100100 + 0o113) + '\062' + '\060' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(1506 - 1458) + chr(0b1101111) + '\061' + '\x34' + chr(1862 - 1811), 45409 - 45401), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1555 - 1505) + chr(2305 - 2255) + chr(0b100 + 0o56), 0b1000), nzTpIcepk0o8(chr(1241 - 1193) + chr(7813 - 7702) + chr(2775 - 2721) + '\x33', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(48) + chr(49), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(52) + chr(483 - 432), 0o10), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + chr(0b11110 + 0o23) + '\064' + chr(0b110100), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b1001 + 0o52) + '\x35' + chr(50), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10000 + 0o43) + chr(0b10110 + 0o36) + '\x30', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2058 - 2008) + chr(0b110111) + '\067', 0o10), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\157' + chr(49) + chr(55) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + '\x34', 0b1000), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\157' + '\x32' + '\x30' + chr(1159 - 1106), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1010000 + 0o37) + chr(1671 - 1621) + chr(0b101001 + 0o12) + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\064' + chr(0b100110 + 0o14), 0o10), nzTpIcepk0o8(chr(868 - 820) + '\157' + chr(1095 - 1046) + '\x31' + '\x32', 0o10), nzTpIcepk0o8(chr(1809 - 1761) + chr(8418 - 8307) + chr(0b100110 + 0o16) + '\x32', 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + '\x35' + '\064', 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b1100 + 0o47) + chr(0b101110 + 0o7), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(0b11111 + 0o30) + '\061', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(1467 - 1415) + chr(0b110001), 57099 - 57091), nzTpIcepk0o8(chr(986 - 938) + '\157' + '\x32' + chr(54) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101111 + 0o2) + chr(54) + chr(0b110011 + 0o0), 0o10), nzTpIcepk0o8(chr(48) + chr(5746 - 5635) + '\067' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(526 - 478) + '\157' + chr(2207 - 2158) + '\x34' + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b0 + 0o61) + '\060' + '\x35', 58426 - 58418), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(52) + chr(0b10101 + 0o35), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(819 - 769) + chr(2291 - 2242), 0b1000), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b11101 + 0o122) + chr(1912 - 1863) + '\061', ord("\x08")), nzTpIcepk0o8(chr(313 - 265) + chr(111) + chr(0b10011 + 0o36) + chr(0b1 + 0o63), 8), nzTpIcepk0o8(chr(48) + chr(0b111000 + 0o67) + chr(49) + chr(0b110001) + chr(50), 8), nzTpIcepk0o8('\x30' + '\157' + chr(2858 - 2804) + chr(0b110011), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x35' + chr(919 - 871), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'&'), chr(100) + chr(101) + '\x63' + chr(111) + '\144' + '\x65')(chr(0b1110101 + 0o0) + chr(0b1100111 + 0o15) + chr(0b110100 + 0o62) + chr(45) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def jC0uD4rdUw1U(hXMPsSrOQzbh):
soyUrUW37Gvb = hXMPsSrOQzbh.firstlineno
AISxp6RQlnj5 = nzTpIcepk0o8(chr(157 - 109) + chr(111) + chr(48), 0b1000)
for ffiOpFBWGmZU in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"\\J\xcb\xef\xbcS\xe3\t\xd8'\xf3\x05"), '\x64' + '\145' + '\143' + chr(0b110000 + 0o77) + chr(0b1100100) + chr(0b111001 + 0o54))(chr(0b1110101) + chr(116) + chr(102) + '\x2d' + chr(0b11111 + 0o31))):
if roI3spqORKae(hXMPsSrOQzbh.sourcelines, roI3spqORKae(ES5oEprVxulp(b'OM\xf3\xcf\xa6L\x9bI\xe0$\xe1y'), chr(100) + chr(101) + '\x63' + chr(0b1101111) + '\x64' + '\145')(chr(117) + chr(116) + '\146' + chr(1946 - 1901) + chr(0b111000)))(soyUrUW37Gvb) == nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x30', 8):
if not roI3spqORKae(hXMPsSrOQzbh.blank_rx, roI3spqORKae(ES5oEprVxulp(b'`s\x81\xe5\xbbS\xc2X\xc2<\xe8r'), chr(1469 - 1369) + '\x65' + chr(5236 - 5137) + chr(6329 - 6218) + chr(0b10000 + 0o124) + '\x65')('\x75' + chr(116) + '\146' + chr(45) + '\070'))(ffiOpFBWGmZU):
AISxp6RQlnj5 += nzTpIcepk0o8(chr(48) + chr(111) + chr(49), 14723 - 14715)
soyUrUW37Gvb += nzTpIcepk0o8(chr(48) + chr(119 - 8) + chr(49), 8)
return AISxp6RQlnj5
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/sortedcontainers/sortedlist.py
|
SortedList.add
|
def add(self, val):
"""Add the element *val* to the list."""
_maxes, _lists = self._maxes, self._lists
if _maxes:
pos = bisect_right(_maxes, val)
if pos == len(_maxes):
pos -= 1
_maxes[pos] = val
_lists[pos].append(val)
else:
insort(_lists[pos], val)
self._expand(pos)
else:
_maxes.append(val)
_lists.append([val])
self._len += 1
|
python
|
def add(self, val):
"""Add the element *val* to the list."""
_maxes, _lists = self._maxes, self._lists
if _maxes:
pos = bisect_right(_maxes, val)
if pos == len(_maxes):
pos -= 1
_maxes[pos] = val
_lists[pos].append(val)
else:
insort(_lists[pos], val)
self._expand(pos)
else:
_maxes.append(val)
_lists.append([val])
self._len += 1
|
[
"def",
"add",
"(",
"self",
",",
"val",
")",
":",
"_maxes",
",",
"_lists",
"=",
"self",
".",
"_maxes",
",",
"self",
".",
"_lists",
"if",
"_maxes",
":",
"pos",
"=",
"bisect_right",
"(",
"_maxes",
",",
"val",
")",
"if",
"pos",
"==",
"len",
"(",
"_maxes",
")",
":",
"pos",
"-=",
"1",
"_maxes",
"[",
"pos",
"]",
"=",
"val",
"_lists",
"[",
"pos",
"]",
".",
"append",
"(",
"val",
")",
"else",
":",
"insort",
"(",
"_lists",
"[",
"pos",
"]",
",",
"val",
")",
"self",
".",
"_expand",
"(",
"pos",
")",
"else",
":",
"_maxes",
".",
"append",
"(",
"val",
")",
"_lists",
".",
"append",
"(",
"[",
"val",
"]",
")",
"self",
".",
"_len",
"+=",
"1"
] |
Add the element *val* to the list.
|
[
"Add",
"the",
"element",
"*",
"val",
"*",
"to",
"the",
"list",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/sortedcontainers/sortedlist.py#L113-L132
|
train
|
Add the element val to the list.
|
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,Fc8q2OvvlH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h41ilRngb,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(1425 - 1376) + chr(49) + '\x36', 54867 - 54859), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(52) + chr(0b100000 + 0o25), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + '\066' + chr(0b110111), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(551 - 500) + '\x30' + chr(0b100100 + 0o23), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1001101 + 0o42) + chr(0b1101 + 0o45) + chr(0b1110 + 0o50) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100010 + 0o17) + chr(0b110001) + '\x33', 57910 - 57902), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b1100010 + 0o15) + chr(0b1100 + 0o46) + chr(0b10 + 0o57) + '\067', ord("\x08")), nzTpIcepk0o8(chr(2139 - 2091) + chr(0b11010 + 0o125) + '\x33' + chr(0b1000 + 0o55) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + chr(1174 - 1123), 0b1000), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b1011100 + 0o23) + chr(1417 - 1368) + chr(0b1011 + 0o45) + '\067', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1519 - 1469) + '\x31' + chr(0b101111 + 0o7), 0b1000), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\x6f' + chr(0b110011) + chr(55), ord("\x08")), nzTpIcepk0o8('\x30' + chr(4286 - 4175) + '\062' + '\x37' + chr(0b1010 + 0o46), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b101010 + 0o7) + '\060' + '\x31', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b101100 + 0o7) + chr(0b110110) + chr(0b101111 + 0o7), 0b1000), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(2614 - 2503) + chr(54), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(51) + chr(1725 - 1676), 41951 - 41943), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(111) + chr(0b110111) + '\x36', 42608 - 42600), nzTpIcepk0o8('\060' + chr(3219 - 3108) + chr(49) + '\x31' + chr(0b10 + 0o64), 8), nzTpIcepk0o8(chr(143 - 95) + chr(0b1101111) + '\062' + '\062', 0o10), nzTpIcepk0o8(chr(545 - 497) + '\157' + chr(0b110010) + '\x35' + chr(54), 0b1000), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\x6f' + '\x32' + '\x35' + chr(0b110110), 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1430 - 1381) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(2139 - 2090) + '\061' + '\061', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1011001 + 0o26) + chr(1002 - 953) + chr(55), 8), nzTpIcepk0o8(chr(863 - 815) + chr(0b11011 + 0o124) + chr(51) + '\064', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11 + 0o56) + chr(0b110010), 40614 - 40606), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + chr(0b110010), 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1399 - 1347) + chr(0b1110 + 0o44), 0o10), nzTpIcepk0o8(chr(1966 - 1918) + chr(8262 - 8151) + '\x31' + chr(53) + chr(51), 0b1000), nzTpIcepk0o8(chr(1277 - 1229) + chr(111) + chr(0b11010 + 0o31) + chr(839 - 788) + '\063', 0o10), nzTpIcepk0o8(chr(1911 - 1863) + '\x6f' + chr(0b101010 + 0o10) + '\060' + '\x33', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + chr(0b101010 + 0o14) + chr(50), 0o10), nzTpIcepk0o8(chr(1066 - 1018) + chr(0b1011000 + 0o27) + chr(0b10011 + 0o40) + chr(2111 - 2056), 8), nzTpIcepk0o8(chr(1667 - 1619) + '\x6f' + chr(654 - 603) + chr(0b110010) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(3128 - 3017) + chr(54), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b1101 + 0o46) + chr(0b101111 + 0o7) + chr(0b100000 + 0o24), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(2475 - 2423) + '\061', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + '\066', ord("\x08")), nzTpIcepk0o8(chr(439 - 391) + chr(6755 - 6644) + '\061' + chr(51) + chr(54), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b10110 + 0o131) + chr(2636 - 2583) + chr(0b110000), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'`'), chr(100) + chr(0b1001100 + 0o31) + '\143' + chr(111) + '\x64' + chr(101))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(559 - 514) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def u3QdisIqDfCd(hXMPsSrOQzbh, pXwvT17vr09s):
(YhxRawLJYfNf, r0McDNgRCmXR) = (hXMPsSrOQzbh._maxes, hXMPsSrOQzbh.r0McDNgRCmXR)
if YhxRawLJYfNf:
IGIA_fu6MbaO = JLewm8gk3T63(YhxRawLJYfNf, pXwvT17vr09s)
if IGIA_fu6MbaO == ftfygxgFas5X(YhxRawLJYfNf):
IGIA_fu6MbaO -= nzTpIcepk0o8(chr(48) + '\157' + '\x31', 49714 - 49706)
YhxRawLJYfNf[IGIA_fu6MbaO] = pXwvT17vr09s
roI3spqORKae(r0McDNgRCmXR[IGIA_fu6MbaO], roI3spqORKae(ES5oEprVxulp(b'\x06q$\xf3\xc9,\xc8\x86y(\xdb*'), chr(0b1100100) + '\x65' + '\x63' + chr(111) + chr(100) + chr(6290 - 6189))(chr(117) + chr(12289 - 12173) + chr(8356 - 8254) + '\055' + chr(0b100 + 0o64)))(pXwvT17vr09s)
else:
_HlHDmHfz4cX(r0McDNgRCmXR[IGIA_fu6MbaO], pXwvT17vr09s)
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x11@\x0f\xb7\xd0%\xeb'), '\x64' + '\145' + '\143' + '\157' + chr(2009 - 1909) + chr(0b1100101 + 0o0))(chr(0b1001011 + 0o52) + '\x74' + chr(0b10101 + 0o121) + chr(0b101101) + '\070'))(IGIA_fu6MbaO)
else:
roI3spqORKae(YhxRawLJYfNf, roI3spqORKae(ES5oEprVxulp(b'\x06q$\xf3\xc9,\xc8\x86y(\xdb*'), chr(0b1100100) + chr(192 - 91) + chr(5193 - 5094) + '\x6f' + chr(100) + chr(0b1100101))(chr(117) + chr(0b1110100) + '\x66' + '\055' + chr(56)))(pXwvT17vr09s)
roI3spqORKae(r0McDNgRCmXR, roI3spqORKae(ES5oEprVxulp(b'\x06q$\xf3\xc9,\xc8\x86y(\xdb*'), '\x64' + chr(5095 - 4994) + chr(0b1100011) + '\x6f' + chr(2095 - 1995) + chr(101))('\x75' + '\164' + '\x66' + chr(45) + chr(0b111000)))([pXwvT17vr09s])
hXMPsSrOQzbh.NDLdSAmHlSIP += nzTpIcepk0o8('\x30' + chr(0b1010111 + 0o30) + chr(1542 - 1493), 8)
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/sortedcontainers/sortedlist.py
|
SortedList.remove
|
def remove(self, val):
"""
Remove first occurrence of *val*.
Raises ValueError if *val* is not present.
"""
_maxes = self._maxes
if not _maxes:
raise ValueError('{0} not in list'.format(repr(val)))
pos = bisect_left(_maxes, val)
if pos == len(_maxes):
raise ValueError('{0} not in list'.format(repr(val)))
_lists = self._lists
idx = bisect_left(_lists[pos], val)
if _lists[pos][idx] == val:
self._delete(pos, idx)
else:
raise ValueError('{0} not in list'.format(repr(val)))
|
python
|
def remove(self, val):
"""
Remove first occurrence of *val*.
Raises ValueError if *val* is not present.
"""
_maxes = self._maxes
if not _maxes:
raise ValueError('{0} not in list'.format(repr(val)))
pos = bisect_left(_maxes, val)
if pos == len(_maxes):
raise ValueError('{0} not in list'.format(repr(val)))
_lists = self._lists
idx = bisect_left(_lists[pos], val)
if _lists[pos][idx] == val:
self._delete(pos, idx)
else:
raise ValueError('{0} not in list'.format(repr(val)))
|
[
"def",
"remove",
"(",
"self",
",",
"val",
")",
":",
"_maxes",
"=",
"self",
".",
"_maxes",
"if",
"not",
"_maxes",
":",
"raise",
"ValueError",
"(",
"'{0} not in list'",
".",
"format",
"(",
"repr",
"(",
"val",
")",
")",
")",
"pos",
"=",
"bisect_left",
"(",
"_maxes",
",",
"val",
")",
"if",
"pos",
"==",
"len",
"(",
"_maxes",
")",
":",
"raise",
"ValueError",
"(",
"'{0} not in list'",
".",
"format",
"(",
"repr",
"(",
"val",
")",
")",
")",
"_lists",
"=",
"self",
".",
"_lists",
"idx",
"=",
"bisect_left",
"(",
"_lists",
"[",
"pos",
"]",
",",
"val",
")",
"if",
"_lists",
"[",
"pos",
"]",
"[",
"idx",
"]",
"==",
"val",
":",
"self",
".",
"_delete",
"(",
"pos",
",",
"idx",
")",
"else",
":",
"raise",
"ValueError",
"(",
"'{0} not in list'",
".",
"format",
"(",
"repr",
"(",
"val",
")",
")",
")"
] |
Remove first occurrence of *val*.
Raises ValueError if *val* is not present.
|
[
"Remove",
"first",
"occurrence",
"of",
"*",
"val",
"*",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/sortedcontainers/sortedlist.py#L221-L242
|
train
|
Removes first occurrence of val. Raises ValueError if val is not present.
|
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,DHq8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P82lOIz6CD,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(111) + '\063' + chr(0b110101) + '\x33', 0b1000), nzTpIcepk0o8(chr(2011 - 1963) + '\157' + chr(49) + chr(0b110101) + '\061', 0o10), nzTpIcepk0o8('\060' + chr(0b11 + 0o154) + chr(1919 - 1870) + '\066' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(1645 - 1596) + '\062' + '\065', 0b1000), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\157' + chr(1676 - 1627) + '\060' + '\x34', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + chr(0b100110 + 0o12) + chr(2416 - 2364), 8), nzTpIcepk0o8(chr(2216 - 2168) + chr(0b1101111) + chr(649 - 598) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101010 + 0o5) + chr(1347 - 1296) + chr(0b110110) + chr(0b10110 + 0o37), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110111) + '\060', ord("\x08")), nzTpIcepk0o8(chr(2260 - 2212) + '\157' + chr(1179 - 1128) + '\x35' + '\066', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b11100 + 0o26) + '\x32' + chr(0b100000 + 0o21), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(8535 - 8424) + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(0b11000 + 0o127) + '\066' + chr(0b110010), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001), 30201 - 30193), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(111) + chr(53) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1001000 + 0o47) + chr(0b110011) + '\066' + chr(0b100100 + 0o16), 0o10), nzTpIcepk0o8(chr(48) + chr(8933 - 8822) + chr(0b100001 + 0o23) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1101101 + 0o2) + chr(0b110101) + chr(0b11001 + 0o35), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(467 - 417) + chr(0b110000) + '\x36', 34295 - 34287), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2284 - 2234) + chr(441 - 392) + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(0b110001) + chr(0b10101 + 0o34), 0o10), nzTpIcepk0o8(chr(48) + chr(5980 - 5869) + '\062' + chr(51) + chr(0b110000 + 0o5), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(2293 - 2239) + '\x33', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110011 + 0o0) + chr(0b101010 + 0o6) + chr(0b10100 + 0o40), 54925 - 54917), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(9939 - 9828) + chr(2200 - 2149) + chr(0b100000 + 0o21) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\x6f' + '\x32' + chr(447 - 393) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(869 - 814) + '\060', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + '\066' + chr(0b11001 + 0o32), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10000 + 0o42) + chr(338 - 288) + chr(2327 - 2278), 8), nzTpIcepk0o8(chr(1850 - 1802) + chr(111) + '\x34' + chr(50), 10500 - 10492), nzTpIcepk0o8(chr(151 - 103) + chr(4615 - 4504) + chr(49) + chr(54) + chr(1569 - 1521), 63140 - 63132), nzTpIcepk0o8('\060' + '\157' + chr(50) + chr(0b0 + 0o61) + chr(49), 0b1000), nzTpIcepk0o8('\060' + chr(0b101110 + 0o101) + chr(55) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b10100 + 0o133) + '\x36' + chr(2201 - 2147), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1909 - 1860) + '\067' + chr(927 - 874), ord("\x08")), nzTpIcepk0o8(chr(0b110 + 0o52) + '\x6f' + '\062' + chr(0b110000) + chr(1745 - 1693), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(0b110000) + chr(51), 0b1000), nzTpIcepk0o8('\060' + chr(0b1100100 + 0o13) + chr(0b101001 + 0o11) + '\064' + chr(53), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(55), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b111 + 0o57), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(2944 - 2833) + chr(53) + chr(48), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xc5'), chr(6280 - 6180) + chr(101) + '\143' + '\157' + chr(4495 - 4395) + chr(4307 - 4206))(chr(13502 - 13385) + chr(9798 - 9682) + '\x66' + chr(45) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def pMlUhd2JmKAE(hXMPsSrOQzbh, pXwvT17vr09s):
YhxRawLJYfNf = hXMPsSrOQzbh._maxes
if not YhxRawLJYfNf:
raise WbNHlDKpyPtQ(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\x90Y\tu*+j\xd5Q\x80\xb1j[r_'), chr(0b11110 + 0o106) + chr(2807 - 2706) + chr(4945 - 4846) + '\x6f' + '\x64' + '\145')(chr(0b1110101) + chr(0b1110100) + '\x66' + '\055' + chr(0b101100 + 0o14)), roI3spqORKae(ES5oEprVxulp(b'\x9aZG\x1e\x03wx\x9ai\xb1\xd2L'), chr(0b10011 + 0o121) + chr(0b1100101) + chr(99) + '\157' + chr(8078 - 7978) + '\145')(chr(0b1000100 + 0o61) + chr(0b1110100) + chr(0b0 + 0o146) + chr(45) + chr(56)))(VWshwTzZfwvC(pXwvT17vr09s)))
IGIA_fu6MbaO = C9y7oEMOuwwk(YhxRawLJYfNf, pXwvT17vr09s)
if IGIA_fu6MbaO == ftfygxgFas5X(YhxRawLJYfNf):
raise WbNHlDKpyPtQ(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\x90Y\tu*+j\xd5Q\x80\xb1j[r_'), chr(0b1100100) + '\x65' + '\143' + chr(1669 - 1558) + '\x64' + '\x65')(chr(0b1010100 + 0o41) + '\x74' + chr(0b1100110) + chr(956 - 911) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\x9aZG\x1e\x03wx\x9ai\xb1\xd2L'), chr(3423 - 3323) + chr(101) + '\x63' + '\157' + chr(100) + chr(0b1001101 + 0o30))('\x75' + '\164' + '\x66' + '\x2d' + chr(2723 - 2667)))(VWshwTzZfwvC(pXwvT17vr09s)))
r0McDNgRCmXR = hXMPsSrOQzbh.r0McDNgRCmXR
At3kbMoXzzmV = C9y7oEMOuwwk(r0McDNgRCmXR[IGIA_fu6MbaO], pXwvT17vr09s)
if r0McDNgRCmXR[IGIA_fu6MbaO][At3kbMoXzzmV] == pXwvT17vr09s:
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x98\rB;01O\x91a\xa3\xc7E'), '\x64' + '\x65' + '\143' + chr(0b100 + 0o153) + '\144' + '\145')(chr(117) + chr(0b1110100) + '\x66' + chr(45) + '\x38'))(IGIA_fu6MbaO, At3kbMoXzzmV)
else:
raise WbNHlDKpyPtQ(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\x90Y\tu*+j\xd5Q\x80\xb1j[r_'), '\x64' + '\145' + chr(0b1100011) + chr(4911 - 4800) + chr(0b1100100) + chr(0b11001 + 0o114))(chr(0b1110101) + chr(116) + chr(0b1001101 + 0o31) + '\x2d' + chr(0b100100 + 0o24)), roI3spqORKae(ES5oEprVxulp(b'\x9aZG\x1e\x03wx\x9ai\xb1\xd2L'), chr(0b1000011 + 0o41) + chr(0b10001 + 0o124) + chr(0b1100011) + chr(0b1010010 + 0o35) + chr(9317 - 9217) + '\145')(chr(117) + chr(0b1110100) + chr(0b11101 + 0o111) + chr(1326 - 1281) + chr(0b1111 + 0o51)))(VWshwTzZfwvC(pXwvT17vr09s)))
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/sortedcontainers/sortedlist.py
|
SortedList._delete
|
def _delete(self, pos, idx):
"""Delete the item at the given (pos, idx).
Combines lists that are less than half the load level.
Updates the index when the sublist length is more than half the load
level. This requires decrementing the nodes in a traversal from the leaf
node to the root. For an example traversal see self._loc.
"""
_maxes, _lists, _index = self._maxes, self._lists, self._index
lists_pos = _lists[pos]
del lists_pos[idx]
self._len -= 1
len_lists_pos = len(lists_pos)
if len_lists_pos > self._half:
_maxes[pos] = lists_pos[-1]
if _index:
child = self._offset + pos
while child > 0:
_index[child] -= 1
child = (child - 1) >> 1
_index[0] -= 1
elif len(_lists) > 1:
if not pos:
pos += 1
prev = pos - 1
_lists[prev].extend(_lists[pos])
_maxes[prev] = _lists[prev][-1]
del _maxes[pos]
del _lists[pos]
del _index[:]
self._expand(prev)
elif len_lists_pos:
_maxes[pos] = lists_pos[-1]
else:
del _maxes[pos]
del _lists[pos]
del _index[:]
|
python
|
def _delete(self, pos, idx):
"""Delete the item at the given (pos, idx).
Combines lists that are less than half the load level.
Updates the index when the sublist length is more than half the load
level. This requires decrementing the nodes in a traversal from the leaf
node to the root. For an example traversal see self._loc.
"""
_maxes, _lists, _index = self._maxes, self._lists, self._index
lists_pos = _lists[pos]
del lists_pos[idx]
self._len -= 1
len_lists_pos = len(lists_pos)
if len_lists_pos > self._half:
_maxes[pos] = lists_pos[-1]
if _index:
child = self._offset + pos
while child > 0:
_index[child] -= 1
child = (child - 1) >> 1
_index[0] -= 1
elif len(_lists) > 1:
if not pos:
pos += 1
prev = pos - 1
_lists[prev].extend(_lists[pos])
_maxes[prev] = _lists[prev][-1]
del _maxes[pos]
del _lists[pos]
del _index[:]
self._expand(prev)
elif len_lists_pos:
_maxes[pos] = lists_pos[-1]
else:
del _maxes[pos]
del _lists[pos]
del _index[:]
|
[
"def",
"_delete",
"(",
"self",
",",
"pos",
",",
"idx",
")",
":",
"_maxes",
",",
"_lists",
",",
"_index",
"=",
"self",
".",
"_maxes",
",",
"self",
".",
"_lists",
",",
"self",
".",
"_index",
"lists_pos",
"=",
"_lists",
"[",
"pos",
"]",
"del",
"lists_pos",
"[",
"idx",
"]",
"self",
".",
"_len",
"-=",
"1",
"len_lists_pos",
"=",
"len",
"(",
"lists_pos",
")",
"if",
"len_lists_pos",
">",
"self",
".",
"_half",
":",
"_maxes",
"[",
"pos",
"]",
"=",
"lists_pos",
"[",
"-",
"1",
"]",
"if",
"_index",
":",
"child",
"=",
"self",
".",
"_offset",
"+",
"pos",
"while",
"child",
">",
"0",
":",
"_index",
"[",
"child",
"]",
"-=",
"1",
"child",
"=",
"(",
"child",
"-",
"1",
")",
">>",
"1",
"_index",
"[",
"0",
"]",
"-=",
"1",
"elif",
"len",
"(",
"_lists",
")",
">",
"1",
":",
"if",
"not",
"pos",
":",
"pos",
"+=",
"1",
"prev",
"=",
"pos",
"-",
"1",
"_lists",
"[",
"prev",
"]",
".",
"extend",
"(",
"_lists",
"[",
"pos",
"]",
")",
"_maxes",
"[",
"prev",
"]",
"=",
"_lists",
"[",
"prev",
"]",
"[",
"-",
"1",
"]",
"del",
"_maxes",
"[",
"pos",
"]",
"del",
"_lists",
"[",
"pos",
"]",
"del",
"_index",
"[",
":",
"]",
"self",
".",
"_expand",
"(",
"prev",
")",
"elif",
"len_lists_pos",
":",
"_maxes",
"[",
"pos",
"]",
"=",
"lists_pos",
"[",
"-",
"1",
"]",
"else",
":",
"del",
"_maxes",
"[",
"pos",
"]",
"del",
"_lists",
"[",
"pos",
"]",
"del",
"_index",
"[",
":",
"]"
] |
Delete the item at the given (pos, idx).
Combines lists that are less than half the load level.
Updates the index when the sublist length is more than half the load
level. This requires decrementing the nodes in a traversal from the leaf
node to the root. For an example traversal see self._loc.
|
[
"Delete",
"the",
"item",
"at",
"the",
"given",
"(",
"pos",
"idx",
")",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/sortedcontainers/sortedlist.py#L244-L296
|
train
|
Delete the item at the given 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,Qn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0o8,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(111) + chr(0b110011) + chr(55) + chr(1315 - 1267), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + chr(0b110100) + chr(49), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1100000 + 0o17) + chr(49) + '\x32' + chr(0b11001 + 0o32), ord("\x08")), nzTpIcepk0o8(chr(1581 - 1533) + chr(0b1101101 + 0o2) + '\x31' + chr(0b110101) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(1595 - 1547) + chr(111) + chr(49) + chr(0b100110 + 0o20) + chr(0b100110 + 0o16), 0o10), nzTpIcepk0o8(chr(48) + chr(0b101111 + 0o100) + '\062' + chr(1042 - 990) + chr(0b100101 + 0o13), 33973 - 33965), nzTpIcepk0o8(chr(48) + chr(8155 - 8044) + '\061' + chr(54) + '\066', 32067 - 32059), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(0b1011 + 0o52) + '\065', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(12272 - 12161) + chr(243 - 193) + chr(0b110110) + '\066', 12199 - 12191), nzTpIcepk0o8('\060' + chr(111) + chr(0b10111 + 0o32) + chr(0b110011) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + '\x33' + chr(2305 - 2253), 54082 - 54074), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1010111 + 0o30) + chr(50) + chr(0b110000) + '\065', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1100100 + 0o13) + '\x31' + '\x32' + chr(2530 - 2479), 8), nzTpIcepk0o8(chr(0b110000) + chr(7539 - 7428) + '\x33' + chr(248 - 198) + chr(0b101011 + 0o12), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\062' + chr(0b110011) + chr(54), 28861 - 28853), nzTpIcepk0o8(chr(0b110000) + chr(0b11010 + 0o125) + chr(0b1 + 0o61) + '\063' + '\x33', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + chr(53) + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(0b110011) + chr(2093 - 2039), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10110 + 0o36) + chr(1327 - 1277), 40429 - 40421), nzTpIcepk0o8('\x30' + chr(0b10110 + 0o131) + chr(54) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(518 - 470) + chr(0b11110 + 0o121) + chr(0b110010) + chr(0b110111) + '\063', 28892 - 28884), nzTpIcepk0o8('\060' + '\157' + '\x32' + chr(56 - 3) + chr(51), 0o10), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\157' + chr(0b110011) + '\064' + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(252 - 203) + chr(0b100 + 0o63) + '\062', 63892 - 63884), nzTpIcepk0o8(chr(1502 - 1454) + '\x6f' + chr(0b100111 + 0o13) + '\x36' + '\066', 8), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b100 + 0o153) + chr(55) + chr(613 - 559), 0b1000), nzTpIcepk0o8('\060' + chr(0b1010001 + 0o36) + chr(0b110011) + chr(50) + '\x33', ord("\x08")), nzTpIcepk0o8('\060' + chr(1105 - 994) + chr(0b110010) + chr(0b110001) + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + chr(0b11 + 0o55) + '\061', 0b1000), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(111) + chr(1005 - 956) + chr(0b110110) + chr(48), 0b1000), nzTpIcepk0o8('\x30' + chr(6549 - 6438) + '\062' + '\060' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(53) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(1274 - 1223) + chr(2343 - 2288), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x32' + '\066' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(48) + chr(5610 - 5499) + '\062' + chr(48) + '\065', 8), nzTpIcepk0o8('\060' + chr(0b1101101 + 0o2) + chr(50) + '\x32' + chr(0b110 + 0o60), 0b1000), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b1101111) + '\062' + '\x31' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b110010) + chr(1217 - 1169), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x37' + '\061', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(650 - 600) + '\x36' + chr(0b110001), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(2228 - 2117) + '\x35' + '\060', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd6'), '\144' + chr(101) + chr(0b100000 + 0o103) + chr(0b1101111) + chr(100) + chr(101))(chr(6950 - 6833) + chr(0b1110100) + '\x66' + '\x2d' + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def sd6ntuQdYMVC(hXMPsSrOQzbh, IGIA_fu6MbaO, At3kbMoXzzmV):
(YhxRawLJYfNf, r0McDNgRCmXR, H_1hgrMeqC9N) = (hXMPsSrOQzbh._maxes, hXMPsSrOQzbh.r0McDNgRCmXR, hXMPsSrOQzbh.H_1hgrMeqC9N)
F1OBv57Axoxd = r0McDNgRCmXR[IGIA_fu6MbaO]
del F1OBv57Axoxd[At3kbMoXzzmV]
hXMPsSrOQzbh.NDLdSAmHlSIP -= nzTpIcepk0o8(chr(48) + chr(0b101 + 0o152) + chr(0b11101 + 0o24), 0b1000)
xXL8OIiZpvhf = ftfygxgFas5X(F1OBv57Axoxd)
if xXL8OIiZpvhf > roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa7\xc92\x03\x12'), '\x64' + chr(0b1100101) + chr(0b111100 + 0o47) + '\x6f' + '\144' + chr(101))(chr(0b101001 + 0o114) + chr(0b100000 + 0o124) + chr(0b1100110) + chr(872 - 827) + '\070')):
YhxRawLJYfNf[IGIA_fu6MbaO] = F1OBv57Axoxd[-nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1000100 + 0o53) + '\x31', 8)]
if H_1hgrMeqC9N:
wEGGaNWalKDs = hXMPsSrOQzbh.y7qy_z_L5kxt + IGIA_fu6MbaO
while wEGGaNWalKDs > nzTpIcepk0o8('\x30' + chr(111) + '\x30', ord("\x08")):
H_1hgrMeqC9N[wEGGaNWalKDs] -= nzTpIcepk0o8(chr(1885 - 1837) + chr(8348 - 8237) + '\061', 8)
wEGGaNWalKDs = wEGGaNWalKDs - nzTpIcepk0o8(chr(2043 - 1995) + chr(0b11001 + 0o126) + chr(49), 8) >> nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b10010 + 0o135) + '\061', 8)
H_1hgrMeqC9N[nzTpIcepk0o8('\060' + chr(111) + chr(0b10011 + 0o35), 8)] -= nzTpIcepk0o8(chr(48) + chr(111) + chr(94 - 45), 8)
elif ftfygxgFas5X(r0McDNgRCmXR) > nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001), 8):
if not IGIA_fu6MbaO:
IGIA_fu6MbaO += nzTpIcepk0o8('\x30' + '\x6f' + chr(49), 8)
jn_SlEw5XbTd = IGIA_fu6MbaO - nzTpIcepk0o8(chr(48) + chr(1352 - 1241) + chr(0b110001), 8)
roI3spqORKae(r0McDNgRCmXR[jn_SlEw5XbTd], roI3spqORKae(ES5oEprVxulp(b'\xac\xfe`"\x1b\xc4:\xfa\xe9\x1c\xbe\xf4'), chr(1757 - 1657) + chr(6782 - 6681) + '\x63' + chr(0b1101111) + '\x64' + '\x65')(chr(0b110000 + 0o105) + '\x74' + chr(3687 - 3585) + chr(0b110 + 0o47) + '\x38'))(r0McDNgRCmXR[IGIA_fu6MbaO])
YhxRawLJYfNf[jn_SlEw5XbTd] = r0McDNgRCmXR[jn_SlEw5XbTd][-nzTpIcepk0o8(chr(0b110000) + chr(0b1010 + 0o145) + '\x31', 8)]
del YhxRawLJYfNf[IGIA_fu6MbaO]
del r0McDNgRCmXR[IGIA_fu6MbaO]
del H_1hgrMeqC9N[:]
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa7\xc4+\x1f\x15\xce\x12'), chr(0b100000 + 0o104) + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(5708 - 5607))('\x75' + chr(0b1011111 + 0o25) + chr(9260 - 9158) + chr(0b100011 + 0o12) + chr(0b111000)))(jn_SlEw5XbTd)
elif xXL8OIiZpvhf:
YhxRawLJYfNf[IGIA_fu6MbaO] = F1OBv57Axoxd[-nzTpIcepk0o8(chr(48) + '\x6f' + chr(49), 8)]
else:
del YhxRawLJYfNf[IGIA_fu6MbaO]
del r0McDNgRCmXR[IGIA_fu6MbaO]
del H_1hgrMeqC9N[:]
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/sortedcontainers/sortedlist.py
|
SortedList.extend
|
def extend(self, values):
"""
Extend the list by appending all elements from the *values*. Raises a
ValueError if the sort order would be violated.
"""
_maxes, _lists, _load = self._maxes, self._lists, self._load
if not isinstance(values, list):
values = list(values)
if any(values[pos - 1] > values[pos]
for pos in range(1, len(values))):
raise ValueError('given sequence not in sort order')
offset = 0
if _maxes:
if values[0] < _lists[-1][-1]:
msg = '{0} not in sort order at index {1}'.format(repr(values[0]), self._len)
raise ValueError(msg)
if len(_lists[-1]) < self._half:
_lists[-1].extend(values[:_load])
_maxes[-1] = _lists[-1][-1]
offset = _load
len_lists = len(_lists)
for idx in range(offset, len(values), _load):
_lists.append(values[idx:(idx + _load)])
_maxes.append(_lists[-1][-1])
_index = self._index
if len_lists == len(_lists):
len_index = len(_index)
if len_index > 0:
len_values = len(values)
child = len_index - 1
while child:
_index[child] += len_values
child = (child - 1) >> 1
_index[0] += len_values
else:
del _index[:]
self._len += len(values)
|
python
|
def extend(self, values):
"""
Extend the list by appending all elements from the *values*. Raises a
ValueError if the sort order would be violated.
"""
_maxes, _lists, _load = self._maxes, self._lists, self._load
if not isinstance(values, list):
values = list(values)
if any(values[pos - 1] > values[pos]
for pos in range(1, len(values))):
raise ValueError('given sequence not in sort order')
offset = 0
if _maxes:
if values[0] < _lists[-1][-1]:
msg = '{0} not in sort order at index {1}'.format(repr(values[0]), self._len)
raise ValueError(msg)
if len(_lists[-1]) < self._half:
_lists[-1].extend(values[:_load])
_maxes[-1] = _lists[-1][-1]
offset = _load
len_lists = len(_lists)
for idx in range(offset, len(values), _load):
_lists.append(values[idx:(idx + _load)])
_maxes.append(_lists[-1][-1])
_index = self._index
if len_lists == len(_lists):
len_index = len(_index)
if len_index > 0:
len_values = len(values)
child = len_index - 1
while child:
_index[child] += len_values
child = (child - 1) >> 1
_index[0] += len_values
else:
del _index[:]
self._len += len(values)
|
[
"def",
"extend",
"(",
"self",
",",
"values",
")",
":",
"_maxes",
",",
"_lists",
",",
"_load",
"=",
"self",
".",
"_maxes",
",",
"self",
".",
"_lists",
",",
"self",
".",
"_load",
"if",
"not",
"isinstance",
"(",
"values",
",",
"list",
")",
":",
"values",
"=",
"list",
"(",
"values",
")",
"if",
"any",
"(",
"values",
"[",
"pos",
"-",
"1",
"]",
">",
"values",
"[",
"pos",
"]",
"for",
"pos",
"in",
"range",
"(",
"1",
",",
"len",
"(",
"values",
")",
")",
")",
":",
"raise",
"ValueError",
"(",
"'given sequence not in sort order'",
")",
"offset",
"=",
"0",
"if",
"_maxes",
":",
"if",
"values",
"[",
"0",
"]",
"<",
"_lists",
"[",
"-",
"1",
"]",
"[",
"-",
"1",
"]",
":",
"msg",
"=",
"'{0} not in sort order at index {1}'",
".",
"format",
"(",
"repr",
"(",
"values",
"[",
"0",
"]",
")",
",",
"self",
".",
"_len",
")",
"raise",
"ValueError",
"(",
"msg",
")",
"if",
"len",
"(",
"_lists",
"[",
"-",
"1",
"]",
")",
"<",
"self",
".",
"_half",
":",
"_lists",
"[",
"-",
"1",
"]",
".",
"extend",
"(",
"values",
"[",
":",
"_load",
"]",
")",
"_maxes",
"[",
"-",
"1",
"]",
"=",
"_lists",
"[",
"-",
"1",
"]",
"[",
"-",
"1",
"]",
"offset",
"=",
"_load",
"len_lists",
"=",
"len",
"(",
"_lists",
")",
"for",
"idx",
"in",
"range",
"(",
"offset",
",",
"len",
"(",
"values",
")",
",",
"_load",
")",
":",
"_lists",
".",
"append",
"(",
"values",
"[",
"idx",
":",
"(",
"idx",
"+",
"_load",
")",
"]",
")",
"_maxes",
".",
"append",
"(",
"_lists",
"[",
"-",
"1",
"]",
"[",
"-",
"1",
"]",
")",
"_index",
"=",
"self",
".",
"_index",
"if",
"len_lists",
"==",
"len",
"(",
"_lists",
")",
":",
"len_index",
"=",
"len",
"(",
"_index",
")",
"if",
"len_index",
">",
"0",
":",
"len_values",
"=",
"len",
"(",
"values",
")",
"child",
"=",
"len_index",
"-",
"1",
"while",
"child",
":",
"_index",
"[",
"child",
"]",
"+=",
"len_values",
"child",
"=",
"(",
"child",
"-",
"1",
")",
">>",
"1",
"_index",
"[",
"0",
"]",
"+=",
"len_values",
"else",
":",
"del",
"_index",
"[",
":",
"]",
"self",
".",
"_len",
"+=",
"len",
"(",
"values",
")"
] |
Extend the list by appending all elements from the *values*. Raises a
ValueError if the sort order would be violated.
|
[
"Extend",
"the",
"list",
"by",
"appending",
"all",
"elements",
"from",
"the",
"*",
"values",
"*",
".",
"Raises",
"a",
"ValueError",
"if",
"the",
"sort",
"order",
"would",
"be",
"violated",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/sortedcontainers/sortedlist.py#L1035-L1081
|
train
|
Extend the list by appending all elements from the given list. Raises a
ValueError if the sort order is violated.
|
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,CJFGX4uBW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ON7iG,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' + '\157' + chr(0b110001) + chr(51) + chr(123 - 74), 0b1000), nzTpIcepk0o8('\x30' + chr(9244 - 9133) + '\063' + chr(0b10 + 0o62) + chr(52), 0o10), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(111) + chr(0b110111) + chr(0b110111), 3223 - 3215), nzTpIcepk0o8('\060' + chr(0b11000 + 0o127) + chr(53) + chr(2042 - 1991), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + chr(2197 - 2148) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(1738 - 1690) + chr(111) + chr(1124 - 1073) + chr(0b110110 + 0o0), 0o10), nzTpIcepk0o8(chr(296 - 248) + chr(0b1101111) + chr(0b110010) + chr(0b110110) + chr(75 - 24), 0o10), nzTpIcepk0o8('\x30' + chr(0b11101 + 0o122) + '\x33' + chr(49) + chr(0b10000 + 0o42), 23306 - 23298), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(51) + '\x35', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b110101 + 0o72) + chr(818 - 769) + chr(0b110001) + chr(0b1101 + 0o52), 0o10), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(111) + chr(919 - 867) + chr(1850 - 1800), 0b1000), nzTpIcepk0o8(chr(1298 - 1250) + '\157' + chr(51) + chr(1588 - 1533), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x37' + chr(53), 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b111011 + 0o64) + '\062' + '\062' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(333 - 285) + '\x6f' + chr(49) + chr(1907 - 1859), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1713 - 1663) + chr(1700 - 1650) + '\065', 8), nzTpIcepk0o8(chr(48) + '\x6f' + '\x35' + chr(0b101100 + 0o11), 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b10001 + 0o136) + chr(49) + '\x30' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(866 - 818) + chr(6174 - 6063) + chr(51) + '\x36' + '\x37', 0b1000), nzTpIcepk0o8(chr(326 - 278) + '\x6f' + chr(0b110111) + chr(0b110100), 38352 - 38344), nzTpIcepk0o8(chr(0b110000) + chr(1978 - 1867) + chr(1317 - 1266) + chr(48) + chr(2221 - 2172), 0o10), nzTpIcepk0o8('\x30' + chr(0b110101 + 0o72) + '\063' + chr(2078 - 2030) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\x6f' + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b101111 + 0o3) + '\064', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1001101 + 0o42) + chr(51) + '\x36' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1101111) + '\x33' + chr(0b110100 + 0o3) + chr(0b110100), 15236 - 15228), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(5780 - 5669) + chr(0b100001 + 0o21) + '\063' + chr(0b10101 + 0o33), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x34' + chr(0b101111 + 0o1), ord("\x08")), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1101111) + chr(0b11 + 0o57) + chr(0b110011) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(111) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000 + 0o0) + '\x6f' + chr(0b110011) + '\x31' + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\063' + chr(0b100011 + 0o15) + chr(0b10110 + 0o37), 58721 - 58713), nzTpIcepk0o8(chr(48) + chr(0b1001001 + 0o46) + chr(0b100100 + 0o16) + chr(0b110101) + chr(338 - 283), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b1110 + 0o44) + chr(0b101100 + 0o13) + '\060', 0o10), nzTpIcepk0o8('\x30' + chr(0b1100 + 0o143) + chr(0b11100 + 0o31) + '\064', ord("\x08")), nzTpIcepk0o8(chr(1110 - 1062) + '\157' + chr(0b110001) + '\065' + '\064', 0b1000), nzTpIcepk0o8(chr(1152 - 1104) + chr(0b1101111) + '\062' + chr(0b1000 + 0o55) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + chr(394 - 339) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + chr(0b110010) + chr(0b110001), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1101110 + 0o1) + chr(0b110101) + chr(48), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'w'), chr(0b11110 + 0o106) + chr(0b1100101) + chr(0b1001111 + 0o24) + '\x6f' + '\x64' + chr(0b1100101))(chr(117) + '\164' + '\146' + chr(45) + chr(0b1110 + 0o52)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def T_3ModLW_Bbq(hXMPsSrOQzbh, CsodZJH6x9Tx):
(YhxRawLJYfNf, r0McDNgRCmXR, VMBmLBsAADwH) = (hXMPsSrOQzbh._maxes, hXMPsSrOQzbh.r0McDNgRCmXR, hXMPsSrOQzbh.VMBmLBsAADwH)
if not suIjIS24Zkqw(CsodZJH6x9Tx, H4NoA26ON7iG):
CsodZJH6x9Tx = H4NoA26ON7iG(CsodZJH6x9Tx)
if VF4pKOObtlPc((CsodZJH6x9Tx[IGIA_fu6MbaO - nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2354 - 2305), 0b1000)] > CsodZJH6x9Tx[IGIA_fu6MbaO] for IGIA_fu6MbaO in bbT2xIe5pzk7(nzTpIcepk0o8('\x30' + '\157' + '\x31', 8), ftfygxgFas5X(CsodZJH6x9Tx)))):
raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'>\x8dIN\xe3>\xc0\xaf,w*L|X\xb5f\xfaYc\x9eR\xe1\xb0kf\x87\xdc\xf7R\xfff\xb9'), '\144' + chr(5874 - 5773) + chr(9098 - 8999) + '\x6f' + chr(0b1100100) + chr(101))(chr(117) + chr(2074 - 1958) + chr(6891 - 6789) + chr(138 - 93) + '\070'))
GuX46MBAOnaQ = nzTpIcepk0o8('\060' + chr(111) + chr(48), 0b1000)
if YhxRawLJYfNf:
if CsodZJH6x9Tx[nzTpIcepk0o8('\060' + chr(111) + chr(0b1100 + 0o44), 8)] < r0McDNgRCmXR[-nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(111) + '\061', 8)][-nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(111) + chr(0b110001), 8)]:
sldzbHve8G1S = roI3spqORKae(ES5oEprVxulp(b'"\xd4B\x0b\xe3q\xc7\xea4loQpO\xe1(\xfa_\'\x92N\xe1\xa2p4\x9a\x92\xfcE\xe3#\xb0\xf4\xd2'), chr(0b1001000 + 0o34) + chr(0b1100101) + chr(99) + '\157' + chr(5363 - 5263) + '\x65')('\165' + chr(0b1110100) + '\x66' + chr(45) + chr(56)).q33KG3foQ_CJ(VWshwTzZfwvC(CsodZJH6x9Tx[nzTpIcepk0o8(chr(0b110000) + '\157' + '\x30', 8)]), hXMPsSrOQzbh.NDLdSAmHlSIP)
raise WbNHlDKpyPtQ(sldzbHve8G1S)
if ftfygxgFas5X(r0McDNgRCmXR[-nzTpIcepk0o8(chr(48) + '\157' + '\x31', 8)]) < roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x06\x8c^G\xeb'), '\x64' + chr(0b1100101) + '\x63' + chr(111) + '\144' + chr(0b1001111 + 0o26))(chr(0b1101000 + 0o15) + '\x74' + '\x66' + chr(0b101101) + chr(0b111000))):
roI3spqORKae(r0McDNgRCmXR[-nzTpIcepk0o8('\060' + '\157' + chr(0b101011 + 0o6), 8)], roI3spqORKae(ES5oEprVxulp(b'\r\xbb\x0cf\xe2z\xff\x9d\x02@-S'), '\144' + '\x65' + chr(7703 - 7604) + chr(111) + '\144' + chr(101))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(45) + '\070'))(CsodZJH6x9Tx[:VMBmLBsAADwH])
YhxRawLJYfNf[-nzTpIcepk0o8('\060' + chr(111) + chr(0b1100 + 0o45), 8)] = r0McDNgRCmXR[-nzTpIcepk0o8(chr(143 - 95) + chr(0b111001 + 0o66) + '\x31', 8)][-nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061', 8)]
GuX46MBAOnaQ = VMBmLBsAADwH
lrjKakWlGO81 = ftfygxgFas5X(r0McDNgRCmXR)
for At3kbMoXzzmV in bbT2xIe5pzk7(GuX46MBAOnaQ, ftfygxgFas5X(CsodZJH6x9Tx), VMBmLBsAADwH):
roI3spqORKae(r0McDNgRCmXR, roI3spqORKae(ES5oEprVxulp(b'\x11\xb0l\x1f\xf5y\xf4\xa57m\x1a\x17'), chr(0b101000 + 0o74) + '\145' + chr(0b1100011) + '\157' + '\144' + chr(632 - 531))(chr(9836 - 9719) + chr(0b1110100) + chr(0b100100 + 0o102) + chr(0b11 + 0o52) + chr(56)))(CsodZJH6x9Tx[At3kbMoXzzmV:At3kbMoXzzmV + VMBmLBsAADwH])
roI3spqORKae(YhxRawLJYfNf, roI3spqORKae(ES5oEprVxulp(b'\x11\xb0l\x1f\xf5y\xf4\xa57m\x1a\x17'), chr(0b10000 + 0o124) + chr(101) + chr(0b11101 + 0o106) + chr(0b110101 + 0o72) + '\x64' + chr(6807 - 6706))(chr(117) + chr(116) + chr(0b10 + 0o144) + chr(0b11110 + 0o17) + '\070'))(r0McDNgRCmXR[-nzTpIcepk0o8('\060' + chr(0b1100011 + 0o14) + chr(0b11110 + 0o23), 8)][-nzTpIcepk0o8(chr(2054 - 2006) + chr(4375 - 4264) + '\x31', 8)])
H_1hgrMeqC9N = hXMPsSrOQzbh.H_1hgrMeqC9N
if lrjKakWlGO81 == ftfygxgFas5X(r0McDNgRCmXR):
cmZLX5jc_iPN = ftfygxgFas5X(H_1hgrMeqC9N)
if cmZLX5jc_iPN > nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110000), 8):
itk2hbD6OH_B = ftfygxgFas5X(CsodZJH6x9Tx)
wEGGaNWalKDs = cmZLX5jc_iPN - nzTpIcepk0o8('\060' + chr(895 - 784) + chr(0b110001), 8)
while wEGGaNWalKDs:
H_1hgrMeqC9N[wEGGaNWalKDs] += itk2hbD6OH_B
wEGGaNWalKDs = wEGGaNWalKDs - nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001), 8) >> nzTpIcepk0o8(chr(1420 - 1372) + '\157' + chr(49), 8)
H_1hgrMeqC9N[nzTpIcepk0o8(chr(48) + '\x6f' + '\x30', 8)] += itk2hbD6OH_B
else:
del H_1hgrMeqC9N[:]
hXMPsSrOQzbh.NDLdSAmHlSIP += ftfygxgFas5X(CsodZJH6x9Tx)
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/sortedcontainers/sortedlist.py
|
SortedList.insert
|
def insert(self, idx, val):
"""
Insert the element *val* into the list at *idx*. Raises a ValueError if
the *val* at *idx* would violate the sort order.
"""
_maxes, _lists, _len = self._maxes, self._lists, self._len
if idx < 0:
idx += _len
if idx < 0:
idx = 0
if idx > _len:
idx = _len
if not _maxes:
# The idx must be zero by the inequalities above.
_maxes.append(val)
_lists.append([val])
self._len = 1
return
if not idx:
if val > _lists[0][0]:
msg = '{0} not in sort order at index {1}'.format(repr(val), 0)
raise ValueError(msg)
else:
_lists[0].insert(0, val)
self._expand(0)
self._len += 1
return
if idx == _len:
pos = len(_lists) - 1
if _lists[pos][-1] > val:
msg = '{0} not in sort order at index {1}'.format(repr(val), _len)
raise ValueError(msg)
else:
_lists[pos].append(val)
_maxes[pos] = _lists[pos][-1]
self._expand(pos)
self._len += 1
return
pos, idx = self._pos(idx)
idx_before = idx - 1
if idx_before < 0:
pos_before = pos - 1
idx_before = len(_lists[pos_before]) - 1
else:
pos_before = pos
before = _lists[pos_before][idx_before]
if before <= val <= _lists[pos][idx]:
_lists[pos].insert(idx, val)
self._expand(pos)
self._len += 1
else:
msg = '{0} not in sort order at index {1}'.format(repr(val), idx)
raise ValueError(msg)
|
python
|
def insert(self, idx, val):
"""
Insert the element *val* into the list at *idx*. Raises a ValueError if
the *val* at *idx* would violate the sort order.
"""
_maxes, _lists, _len = self._maxes, self._lists, self._len
if idx < 0:
idx += _len
if idx < 0:
idx = 0
if idx > _len:
idx = _len
if not _maxes:
# The idx must be zero by the inequalities above.
_maxes.append(val)
_lists.append([val])
self._len = 1
return
if not idx:
if val > _lists[0][0]:
msg = '{0} not in sort order at index {1}'.format(repr(val), 0)
raise ValueError(msg)
else:
_lists[0].insert(0, val)
self._expand(0)
self._len += 1
return
if idx == _len:
pos = len(_lists) - 1
if _lists[pos][-1] > val:
msg = '{0} not in sort order at index {1}'.format(repr(val), _len)
raise ValueError(msg)
else:
_lists[pos].append(val)
_maxes[pos] = _lists[pos][-1]
self._expand(pos)
self._len += 1
return
pos, idx = self._pos(idx)
idx_before = idx - 1
if idx_before < 0:
pos_before = pos - 1
idx_before = len(_lists[pos_before]) - 1
else:
pos_before = pos
before = _lists[pos_before][idx_before]
if before <= val <= _lists[pos][idx]:
_lists[pos].insert(idx, val)
self._expand(pos)
self._len += 1
else:
msg = '{0} not in sort order at index {1}'.format(repr(val), idx)
raise ValueError(msg)
|
[
"def",
"insert",
"(",
"self",
",",
"idx",
",",
"val",
")",
":",
"_maxes",
",",
"_lists",
",",
"_len",
"=",
"self",
".",
"_maxes",
",",
"self",
".",
"_lists",
",",
"self",
".",
"_len",
"if",
"idx",
"<",
"0",
":",
"idx",
"+=",
"_len",
"if",
"idx",
"<",
"0",
":",
"idx",
"=",
"0",
"if",
"idx",
">",
"_len",
":",
"idx",
"=",
"_len",
"if",
"not",
"_maxes",
":",
"# The idx must be zero by the inequalities above.",
"_maxes",
".",
"append",
"(",
"val",
")",
"_lists",
".",
"append",
"(",
"[",
"val",
"]",
")",
"self",
".",
"_len",
"=",
"1",
"return",
"if",
"not",
"idx",
":",
"if",
"val",
">",
"_lists",
"[",
"0",
"]",
"[",
"0",
"]",
":",
"msg",
"=",
"'{0} not in sort order at index {1}'",
".",
"format",
"(",
"repr",
"(",
"val",
")",
",",
"0",
")",
"raise",
"ValueError",
"(",
"msg",
")",
"else",
":",
"_lists",
"[",
"0",
"]",
".",
"insert",
"(",
"0",
",",
"val",
")",
"self",
".",
"_expand",
"(",
"0",
")",
"self",
".",
"_len",
"+=",
"1",
"return",
"if",
"idx",
"==",
"_len",
":",
"pos",
"=",
"len",
"(",
"_lists",
")",
"-",
"1",
"if",
"_lists",
"[",
"pos",
"]",
"[",
"-",
"1",
"]",
">",
"val",
":",
"msg",
"=",
"'{0} not in sort order at index {1}'",
".",
"format",
"(",
"repr",
"(",
"val",
")",
",",
"_len",
")",
"raise",
"ValueError",
"(",
"msg",
")",
"else",
":",
"_lists",
"[",
"pos",
"]",
".",
"append",
"(",
"val",
")",
"_maxes",
"[",
"pos",
"]",
"=",
"_lists",
"[",
"pos",
"]",
"[",
"-",
"1",
"]",
"self",
".",
"_expand",
"(",
"pos",
")",
"self",
".",
"_len",
"+=",
"1",
"return",
"pos",
",",
"idx",
"=",
"self",
".",
"_pos",
"(",
"idx",
")",
"idx_before",
"=",
"idx",
"-",
"1",
"if",
"idx_before",
"<",
"0",
":",
"pos_before",
"=",
"pos",
"-",
"1",
"idx_before",
"=",
"len",
"(",
"_lists",
"[",
"pos_before",
"]",
")",
"-",
"1",
"else",
":",
"pos_before",
"=",
"pos",
"before",
"=",
"_lists",
"[",
"pos_before",
"]",
"[",
"idx_before",
"]",
"if",
"before",
"<=",
"val",
"<=",
"_lists",
"[",
"pos",
"]",
"[",
"idx",
"]",
":",
"_lists",
"[",
"pos",
"]",
".",
"insert",
"(",
"idx",
",",
"val",
")",
"self",
".",
"_expand",
"(",
"pos",
")",
"self",
".",
"_len",
"+=",
"1",
"else",
":",
"msg",
"=",
"'{0} not in sort order at index {1}'",
".",
"format",
"(",
"repr",
"(",
"val",
")",
",",
"idx",
")",
"raise",
"ValueError",
"(",
"msg",
")"
] |
Insert the element *val* into the list at *idx*. Raises a ValueError if
the *val* at *idx* would violate the sort order.
|
[
"Insert",
"the",
"element",
"*",
"val",
"*",
"into",
"the",
"list",
"at",
"*",
"idx",
"*",
".",
"Raises",
"a",
"ValueError",
"if",
"the",
"*",
"val",
"*",
"at",
"*",
"idx",
"*",
"would",
"violate",
"the",
"sort",
"order",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/sortedcontainers/sortedlist.py#L1083-L1141
|
train
|
Insert the element val into the list at idx. Raises a ValueError if the element val is not in the sort order.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy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bS,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('\060' + chr(111) + chr(526 - 475) + '\x31' + '\x33', 45410 - 45402), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(435 - 385) + chr(0b110101) + chr(85 - 33), 0o10), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\x6f' + chr(0b11101 + 0o25) + chr(749 - 696) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + '\060' + chr(1066 - 1017), 0o10), nzTpIcepk0o8('\060' + chr(10620 - 10509) + chr(2000 - 1951) + chr(52) + chr(847 - 796), 39615 - 39607), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(0b110000) + chr(0b1100 + 0o52), 0b1000), nzTpIcepk0o8(chr(1125 - 1077) + chr(111) + chr(52) + chr(0b110010 + 0o4), 56263 - 56255), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(0b101111 + 0o5) + '\064', ord("\x08")), nzTpIcepk0o8(chr(420 - 372) + chr(111) + chr(0b110010) + chr(0b100011 + 0o21) + '\x30', 43501 - 43493), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + '\060' + chr(1383 - 1328), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(55) + '\062', 26289 - 26281), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(674 - 623) + chr(0b101010 + 0o14) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1000000 + 0o57) + '\x36' + '\067', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(49) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(928 - 880) + chr(0b101001 + 0o106) + chr(0b110100) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(735 - 687) + '\x6f' + chr(0b110010) + '\060', 25850 - 25842), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(111) + '\063' + chr(0b11010 + 0o32) + chr(0b1001 + 0o50), 0o10), nzTpIcepk0o8(chr(0b10011 + 0o35) + '\157' + chr(0b10100 + 0o37) + chr(0b100001 + 0o24) + chr(0b101 + 0o54), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\066' + chr(0b1100 + 0o47), ord("\x08")), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(111) + '\061' + chr(0b110010 + 0o4), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1001100 + 0o43) + chr(222 - 172) + chr(0b1000 + 0o55) + chr(0b110011), 8), nzTpIcepk0o8('\x30' + chr(0b10101 + 0o132) + '\064', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101001 + 0o11) + chr(0b1001 + 0o53) + chr(51), 17762 - 17754), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + chr(0b110111) + chr(0b101 + 0o57), 0o10), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\x6f' + '\x32' + chr(0b10010 + 0o41) + '\061', 0o10), nzTpIcepk0o8('\060' + chr(0b100001 + 0o116) + chr(0b1101 + 0o45) + '\061', 0b1000), nzTpIcepk0o8(chr(2293 - 2245) + '\157' + chr(49) + chr(0b11110 + 0o31) + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(1404 - 1293) + chr(0b110001) + chr(0b1100 + 0o45), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + chr(0b101110 + 0o5) + chr(222 - 174), 52736 - 52728), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(1214 - 1103) + '\x31' + chr(55) + chr(1782 - 1733), 46392 - 46384), nzTpIcepk0o8(chr(48) + chr(6033 - 5922) + chr(0b110001) + chr(233 - 185) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(0b101000 + 0o12) + '\067', 0b1000), nzTpIcepk0o8(chr(2253 - 2205) + chr(0b1101111) + chr(0b110001) + chr(639 - 590) + chr(0b10010 + 0o45), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + chr(0b110001 + 0o3) + '\062', 0o10), nzTpIcepk0o8(chr(875 - 827) + chr(111) + chr(0b110011) + chr(0b101111 + 0o4) + '\065', 0b1000), nzTpIcepk0o8('\060' + chr(8809 - 8698) + chr(51) + '\x33' + chr(50), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + chr(2136 - 2087) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b110000 + 0o77) + '\x35' + chr(51), 25975 - 25967), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + '\063' + chr(0b1 + 0o61), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1851 - 1798) + '\060', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\065' + chr(0b110000), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xe5'), chr(0b1100100) + chr(2210 - 2109) + '\143' + chr(0b101011 + 0o104) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(274 - 158) + chr(0b1100110) + chr(45) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def Pv_O0UBzNUCL(hXMPsSrOQzbh, At3kbMoXzzmV, pXwvT17vr09s):
(YhxRawLJYfNf, r0McDNgRCmXR, NDLdSAmHlSIP) = (hXMPsSrOQzbh._maxes, hXMPsSrOQzbh.r0McDNgRCmXR, hXMPsSrOQzbh.NDLdSAmHlSIP)
if At3kbMoXzzmV < nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b10 + 0o155) + chr(0b110000), ord("\x08")):
At3kbMoXzzmV += NDLdSAmHlSIP
if At3kbMoXzzmV < nzTpIcepk0o8(chr(48) + chr(2559 - 2448) + chr(48), 8):
At3kbMoXzzmV = nzTpIcepk0o8(chr(48) + chr(0b10101 + 0o132) + '\060', 8)
if At3kbMoXzzmV > NDLdSAmHlSIP:
At3kbMoXzzmV = NDLdSAmHlSIP
if not YhxRawLJYfNf:
roI3spqORKae(YhxRawLJYfNf, roI3spqORKae(ES5oEprVxulp(b'\x83\xf8\xf8u\x1b!a\x0b\xca\xe8o\xc3'), chr(4925 - 4825) + chr(9404 - 9303) + chr(8089 - 7990) + chr(4819 - 4708) + '\144' + chr(0b1100101))(chr(0b1110101) + '\164' + '\x66' + chr(45) + chr(0b110100 + 0o4)))(pXwvT17vr09s)
roI3spqORKae(r0McDNgRCmXR, roI3spqORKae(ES5oEprVxulp(b'\x83\xf8\xf8u\x1b!a\x0b\xca\xe8o\xc3'), chr(100) + '\x65' + chr(99) + chr(0b1101111) + chr(100) + chr(101))(chr(2447 - 2330) + chr(0b1110100) + chr(0b1001110 + 0o30) + '\x2d' + chr(0b101110 + 0o12)))([pXwvT17vr09s])
hXMPsSrOQzbh.NDLdSAmHlSIP = nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1101111) + '\x31', 0b1000)
return
if not At3kbMoXzzmV:
if pXwvT17vr09s > r0McDNgRCmXR[nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(111) + chr(48), 8)][nzTpIcepk0o8('\060' + '\157' + '\x30', 8)]:
sldzbHve8G1S = roI3spqORKae(ES5oEprVxulp(b'\xb0\x9c\xd6a\r)RD\xc9\xe9\x1a\x85X8T0\x8e\x9bWk\xd9$\xc2\x08\xb9x\x10m\xfd\x01g\xac~\xdf'), '\144' + '\145' + '\x63' + '\x6f' + chr(6366 - 6266) + chr(0b100100 + 0o101))(chr(739 - 622) + chr(0b101010 + 0o112) + '\146' + chr(1194 - 1149) + chr(1472 - 1416)).q33KG3foQ_CJ(VWshwTzZfwvC(pXwvT17vr09s), nzTpIcepk0o8('\060' + chr(0b11011 + 0o124) + chr(0b110000), 8))
raise WbNHlDKpyPtQ(sldzbHve8G1S)
else:
roI3spqORKae(r0McDNgRCmXR[nzTpIcepk0o8(chr(48) + '\157' + '\x30', 8)], roI3spqORKae(ES5oEprVxulp(b'\xa2\xc2\xd8$\x112'), chr(0b1100100) + '\145' + '\x63' + '\157' + '\x64' + chr(0b1100101))('\165' + '\x74' + '\x66' + chr(728 - 683) + chr(56)))(nzTpIcepk0o8('\x30' + '\157' + chr(48), 8), pXwvT17vr09s)
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x94\xc9\xd31\x02(B'), chr(0b101100 + 0o70) + chr(0b1100101) + chr(2260 - 2161) + chr(0b1101111) + '\144' + chr(3022 - 2921))(chr(0b10000 + 0o145) + chr(116) + chr(0b101110 + 0o70) + chr(0b0 + 0o55) + chr(56)))(nzTpIcepk0o8('\060' + chr(7307 - 7196) + chr(0b110000), 8))
hXMPsSrOQzbh.NDLdSAmHlSIP += nzTpIcepk0o8(chr(48) + chr(0b1001111 + 0o40) + '\x31', 8)
return
if At3kbMoXzzmV == NDLdSAmHlSIP:
IGIA_fu6MbaO = ftfygxgFas5X(r0McDNgRCmXR) - nzTpIcepk0o8('\060' + chr(111) + chr(49), 8)
if r0McDNgRCmXR[IGIA_fu6MbaO][-nzTpIcepk0o8(chr(240 - 192) + chr(0b11110 + 0o121) + chr(0b1110 + 0o43), 8)] > pXwvT17vr09s:
sldzbHve8G1S = roI3spqORKae(ES5oEprVxulp(b'\xb0\x9c\xd6a\r)RD\xc9\xe9\x1a\x85X8T0\x8e\x9bWk\xd9$\xc2\x08\xb9x\x10m\xfd\x01g\xac~\xdf'), chr(0b101000 + 0o74) + chr(0b1011001 + 0o14) + chr(99) + chr(0b1101111) + '\x64' + chr(1039 - 938))(chr(0b1110101) + '\x74' + '\146' + chr(0b10000 + 0o35) + chr(0b111000)).q33KG3foQ_CJ(VWshwTzZfwvC(pXwvT17vr09s), NDLdSAmHlSIP)
raise WbNHlDKpyPtQ(sldzbHve8G1S)
else:
roI3spqORKae(r0McDNgRCmXR[IGIA_fu6MbaO], roI3spqORKae(ES5oEprVxulp(b'\x83\xf8\xf8u\x1b!a\x0b\xca\xe8o\xc3'), chr(0b1100100) + chr(0b1001100 + 0o31) + chr(99) + '\x6f' + chr(0b1100100) + chr(0b1000010 + 0o43))(chr(117) + chr(7127 - 7011) + chr(0b1100110) + '\055' + chr(0b110110 + 0o2)))(pXwvT17vr09s)
YhxRawLJYfNf[IGIA_fu6MbaO] = r0McDNgRCmXR[IGIA_fu6MbaO][-nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(11740 - 11629) + chr(0b100011 + 0o16), 8)]
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x94\xc9\xd31\x02(B'), chr(100) + '\145' + '\x63' + chr(0b1101111) + chr(4714 - 4614) + '\145')(chr(0b1110101) + chr(116) + '\146' + '\055' + '\x38'))(IGIA_fu6MbaO)
hXMPsSrOQzbh.NDLdSAmHlSIP += nzTpIcepk0o8(chr(926 - 878) + '\157' + chr(1062 - 1013), 8)
return
(IGIA_fu6MbaO, At3kbMoXzzmV) = hXMPsSrOQzbh.m_vFZWsML7BP(At3kbMoXzzmV)
Y1KnI71Gqzdj = At3kbMoXzzmV - nzTpIcepk0o8('\060' + '\157' + '\061', 8)
if Y1KnI71Gqzdj < nzTpIcepk0o8(chr(48) + chr(0b1011111 + 0o20) + chr(2077 - 2029), 8):
m_n2tP0yzwv5 = IGIA_fu6MbaO - nzTpIcepk0o8(chr(0b10 + 0o56) + chr(111) + chr(445 - 396), 8)
Y1KnI71Gqzdj = ftfygxgFas5X(r0McDNgRCmXR[m_n2tP0yzwv5]) - nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2170 - 2121), 8)
else:
m_n2tP0yzwv5 = IGIA_fu6MbaO
OsFA8mB0ZwJd = r0McDNgRCmXR[m_n2tP0yzwv5][Y1KnI71Gqzdj]
if OsFA8mB0ZwJd <= pXwvT17vr09s <= r0McDNgRCmXR[IGIA_fu6MbaO][At3kbMoXzzmV]:
roI3spqORKae(r0McDNgRCmXR[IGIA_fu6MbaO], roI3spqORKae(ES5oEprVxulp(b'\xa2\xc2\xd8$\x112'), '\144' + chr(101) + chr(99) + '\157' + chr(6136 - 6036) + chr(2245 - 2144))('\165' + '\164' + '\146' + '\x2d' + chr(0b10101 + 0o43)))(At3kbMoXzzmV, pXwvT17vr09s)
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x94\xc9\xd31\x02(B'), chr(0b1110 + 0o126) + chr(0b1100101) + '\143' + chr(4595 - 4484) + '\x64' + chr(0b1100101))('\x75' + chr(0b1110100) + chr(102) + chr(0b101101) + chr(0b100011 + 0o25)))(IGIA_fu6MbaO)
hXMPsSrOQzbh.NDLdSAmHlSIP += nzTpIcepk0o8(chr(48) + '\157' + chr(0b10010 + 0o37), 8)
else:
sldzbHve8G1S = roI3spqORKae(ES5oEprVxulp(b'\xb0\x9c\xd6a\r)RD\xc9\xe9\x1a\x85X8T0\x8e\x9bWk\xd9$\xc2\x08\xb9x\x10m\xfd\x01g\xac~\xdf'), '\x64' + chr(0b1010000 + 0o25) + '\143' + '\x6f' + chr(8230 - 8130) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + '\x66' + '\055' + chr(0b111000)).q33KG3foQ_CJ(VWshwTzZfwvC(pXwvT17vr09s), At3kbMoXzzmV)
raise WbNHlDKpyPtQ(sldzbHve8G1S)
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/sortedcontainers/sortedlist.py
|
SortedListWithKey.update
|
def update(self, iterable):
"""Update the list by adding all elements from *iterable*."""
_maxes, _lists, _keys = self._maxes, self._lists, self._keys
values = sorted(iterable, key=self._key)
if _maxes:
if len(values) * 4 >= self._len:
values.extend(chain.from_iterable(_lists))
values.sort(key=self._key)
self._clear()
else:
_add = self.add
for val in values:
_add(val)
return
_load, _index = self._load, self._index
_lists.extend(values[pos:(pos + _load)]
for pos in range(0, len(values), _load))
_keys.extend(list(map(self._key, _list)) for _list in _lists)
_maxes.extend(sublist[-1] for sublist in _keys)
self._len = len(values)
del _index[:]
|
python
|
def update(self, iterable):
"""Update the list by adding all elements from *iterable*."""
_maxes, _lists, _keys = self._maxes, self._lists, self._keys
values = sorted(iterable, key=self._key)
if _maxes:
if len(values) * 4 >= self._len:
values.extend(chain.from_iterable(_lists))
values.sort(key=self._key)
self._clear()
else:
_add = self.add
for val in values:
_add(val)
return
_load, _index = self._load, self._index
_lists.extend(values[pos:(pos + _load)]
for pos in range(0, len(values), _load))
_keys.extend(list(map(self._key, _list)) for _list in _lists)
_maxes.extend(sublist[-1] for sublist in _keys)
self._len = len(values)
del _index[:]
|
[
"def",
"update",
"(",
"self",
",",
"iterable",
")",
":",
"_maxes",
",",
"_lists",
",",
"_keys",
"=",
"self",
".",
"_maxes",
",",
"self",
".",
"_lists",
",",
"self",
".",
"_keys",
"values",
"=",
"sorted",
"(",
"iterable",
",",
"key",
"=",
"self",
".",
"_key",
")",
"if",
"_maxes",
":",
"if",
"len",
"(",
"values",
")",
"*",
"4",
">=",
"self",
".",
"_len",
":",
"values",
".",
"extend",
"(",
"chain",
".",
"from_iterable",
"(",
"_lists",
")",
")",
"values",
".",
"sort",
"(",
"key",
"=",
"self",
".",
"_key",
")",
"self",
".",
"_clear",
"(",
")",
"else",
":",
"_add",
"=",
"self",
".",
"add",
"for",
"val",
"in",
"values",
":",
"_add",
"(",
"val",
")",
"return",
"_load",
",",
"_index",
"=",
"self",
".",
"_load",
",",
"self",
".",
"_index",
"_lists",
".",
"extend",
"(",
"values",
"[",
"pos",
":",
"(",
"pos",
"+",
"_load",
")",
"]",
"for",
"pos",
"in",
"range",
"(",
"0",
",",
"len",
"(",
"values",
")",
",",
"_load",
")",
")",
"_keys",
".",
"extend",
"(",
"list",
"(",
"map",
"(",
"self",
".",
"_key",
",",
"_list",
")",
")",
"for",
"_list",
"in",
"_lists",
")",
"_maxes",
".",
"extend",
"(",
"sublist",
"[",
"-",
"1",
"]",
"for",
"sublist",
"in",
"_keys",
")",
"self",
".",
"_len",
"=",
"len",
"(",
"values",
")",
"del",
"_index",
"[",
":",
"]"
] |
Update the list by adding all elements from *iterable*.
|
[
"Update",
"the",
"list",
"by",
"adding",
"all",
"elements",
"from",
"*",
"iterable",
"*",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/p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hm,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' + '\067' + '\x35', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\062' + chr(0b100101 + 0o16) + chr(1651 - 1597), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(5121 - 5010) + chr(0b100000 + 0o23) + '\x32' + chr(919 - 865), 0o10), nzTpIcepk0o8(chr(2221 - 2173) + chr(0b10000 + 0o137) + chr(0b110001 + 0o2) + chr(52), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(2723 - 2668) + '\x37', 61575 - 61567), nzTpIcepk0o8('\060' + '\x6f' + chr(0b1101 + 0o47) + chr(0b110 + 0o55), 0b1000), nzTpIcepk0o8(chr(328 - 280) + chr(111) + chr(2238 - 2189) + chr(51) + chr(0b11100 + 0o31), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\063' + chr(52) + chr(0b110101), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(0b110001) + '\x34', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(0b110101) + chr(0b110001), 19983 - 19975), nzTpIcepk0o8('\x30' + '\157' + chr(2340 - 2287) + '\x30', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + chr(2017 - 1962), 0b1000), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(3873 - 3762) + chr(0b110011) + chr(0b100110 + 0o17) + '\062', 0o10), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b1101111) + chr(50) + chr(52) + '\061', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b110111 + 0o70) + '\x33' + chr(0b11000 + 0o37) + '\x36', 0o10), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(11668 - 11557) + chr(49) + '\x37' + chr(2572 - 2517), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(2235 - 2187) + chr(0b1101111) + chr(49) + chr(50) + chr(0b10101 + 0o41), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\x33' + chr(60 - 7) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(1960 - 1912) + '\157' + '\x32' + '\062', 0o10), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b101111 + 0o100) + chr(49) + chr(1409 - 1356) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\157' + chr(0b0 + 0o63) + chr(1699 - 1651) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(0b110010), 8), nzTpIcepk0o8('\x30' + '\157' + chr(0b10 + 0o61) + '\x36' + chr(55), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101 + 0o142) + chr(50) + chr(672 - 623) + '\x35', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + chr(1408 - 1357) + '\x31', 0b1000), nzTpIcepk0o8(chr(2208 - 2160) + chr(11819 - 11708) + '\061' + chr(0b110100) + '\x35', 0b1000), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b1101111) + '\063' + chr(0b100001 + 0o20) + chr(262 - 214), ord("\x08")), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(10140 - 10029) + chr(0b11101 + 0o26) + chr(1916 - 1861) + chr(0b11010 + 0o34), 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(983 - 930) + chr(48), 8), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(111) + chr(1521 - 1470) + chr(319 - 264) + chr(0b10011 + 0o35), ord("\x08")), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(111) + chr(0b110111) + chr(0b1000 + 0o57), 63730 - 63722), nzTpIcepk0o8(chr(2227 - 2179) + '\157' + chr(0b101000 + 0o12) + chr(51) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(635 - 587) + '\x6f' + chr(1602 - 1553) + chr(0b110100) + '\064', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11 + 0o57) + chr(1342 - 1292) + '\x32', 8855 - 8847), nzTpIcepk0o8('\x30' + chr(0b1100111 + 0o10) + chr(0b110011) + chr(0b110101) + '\061', 8), nzTpIcepk0o8(chr(1091 - 1043) + '\157' + chr(0b110001) + '\063' + '\x37', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(0b110001) + chr(1425 - 1377), 8), nzTpIcepk0o8('\x30' + '\157' + '\x37' + chr(0b110101), 8), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\x6f' + '\x35' + chr(0b110110), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(111) + chr(53) + chr(2119 - 2071), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x13'), chr(456 - 356) + chr(101) + '\143' + chr(111) + '\144' + '\145')('\x75' + chr(0b1100101 + 0o17) + chr(8735 - 8633) + '\x2d' + chr(0b110000 + 0o10)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def J_k2IYB1ceqn(hXMPsSrOQzbh, q5O0Bv0yivR1):
(YhxRawLJYfNf, r0McDNgRCmXR, jFYatuQoUjef) = (hXMPsSrOQzbh._maxes, hXMPsSrOQzbh.r0McDNgRCmXR, hXMPsSrOQzbh.jFYatuQoUjef)
CsodZJH6x9Tx = V3OlOVg98A85(q5O0Bv0yivR1, key=hXMPsSrOQzbh.lE9jqbzZIicn)
if YhxRawLJYfNf:
if ftfygxgFas5X(CsodZJH6x9Tx) * nzTpIcepk0o8(chr(0b11111 + 0o21) + '\157' + chr(0b110100), 0b1000) >= roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b's\xda\x9ax,b0\xad\xe0\xbaaO'), chr(0b1100100) + chr(0b1100101) + chr(180 - 81) + chr(111) + chr(0b1001000 + 0o34) + '\x65')(chr(0b11010 + 0o133) + chr(0b1110100) + chr(0b1000 + 0o136) + chr(0b101101) + chr(0b11110 + 0o32))):
roI3spqORKae(CsodZJH6x9Tx, roI3spqORKae(ES5oEprVxulp(b'i\xc1\xe5Q\x10G\x11\xb2\xd3\xabJn'), chr(8995 - 8895) + '\x65' + '\143' + '\x6f' + chr(0b1001011 + 0o31) + chr(0b111100 + 0o51))(chr(0b1011101 + 0o30) + chr(0b1110100) + chr(8034 - 7932) + '\x2d' + chr(56)))(roI3spqORKae(oi0Ceb85lQXd, roI3spqORKae(ES5oEprVxulp(b'[\xec\xb9q J)\x80\xfe\x88Js\x8f'), '\144' + chr(0b1010110 + 0o17) + '\x63' + '\157' + chr(100) + '\x65')(chr(0b110101 + 0o100) + chr(116) + chr(0b1010011 + 0o23) + '\055' + chr(1303 - 1247)))(r0McDNgRCmXR))
roI3spqORKae(CsodZJH6x9Tx, roI3spqORKae(ES5oEprVxulp(b'N\xf1\xa4h'), '\144' + chr(0b1001 + 0o134) + chr(0b1011000 + 0o13) + chr(11183 - 11072) + chr(1987 - 1887) + '\145')(chr(0b1110101) + chr(0b10110 + 0o136) + chr(6944 - 6842) + chr(1571 - 1526) + '\070'))(key=roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"Q\xdb\xefv\x0eA'\xbf\xc5\x80Kq"), chr(0b101 + 0o137) + chr(3278 - 3177) + chr(0b11110 + 0o105) + '\157' + chr(0b1100010 + 0o2) + '\145')(chr(117) + '\164' + chr(6347 - 6245) + '\055' + chr(0b111000))))
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'b\xfd\xbay\x1eQ'), chr(100) + chr(0b1100101) + '\143' + chr(5869 - 5758) + chr(0b110 + 0o136) + '\x65')('\x75' + chr(116) + '\x66' + chr(45) + '\x38'))()
else:
M_p1zFELLj2M = hXMPsSrOQzbh.u3QdisIqDfCd
for pXwvT17vr09s in CsodZJH6x9Tx:
M_p1zFELLj2M(pXwvT17vr09s)
return
(VMBmLBsAADwH, H_1hgrMeqC9N) = (hXMPsSrOQzbh.VMBmLBsAADwH, hXMPsSrOQzbh.H_1hgrMeqC9N)
roI3spqORKae(r0McDNgRCmXR, roI3spqORKae(ES5oEprVxulp(b'i\xc1\xe5Q\x10G\x11\xb2\xd3\xabJn'), '\144' + chr(4743 - 4642) + chr(0b111 + 0o134) + '\157' + '\144' + '\x65')(chr(0b1110101) + '\164' + '\x66' + chr(0b101101) + chr(56)))((CsodZJH6x9Tx[IGIA_fu6MbaO:IGIA_fu6MbaO + VMBmLBsAADwH] for IGIA_fu6MbaO in bbT2xIe5pzk7(nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(972 - 924), 57169 - 57161), ftfygxgFas5X(CsodZJH6x9Tx), VMBmLBsAADwH)))
roI3spqORKae(jFYatuQoUjef, roI3spqORKae(ES5oEprVxulp(b'i\xc1\xe5Q\x10G\x11\xb2\xd3\xabJn'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(111) + chr(0b111010 + 0o52) + '\145')('\x75' + chr(0b1000100 + 0o60) + chr(6797 - 6695) + chr(0b101100 + 0o1) + chr(56)))((H4NoA26ON7iG(VVP82lOIz6CD(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"Q\xdb\xefv\x0eA'\xbf\xc5\x80Kq"), chr(0b1011000 + 0o14) + chr(101) + chr(0b1100011) + chr(5575 - 5464) + chr(2744 - 2644) + chr(7767 - 7666))(chr(0b1110101) + '\164' + chr(102) + '\x2d' + chr(0b110110 + 0o2))), KfBQdHDmgW7y)) for KfBQdHDmgW7y in r0McDNgRCmXR))
roI3spqORKae(YhxRawLJYfNf, roI3spqORKae(ES5oEprVxulp(b'i\xc1\xe5Q\x10G\x11\xb2\xd3\xabJn'), chr(0b1100100) + chr(0b11011 + 0o112) + chr(99) + '\157' + '\144' + chr(0b1100101))('\x75' + '\x74' + chr(0b1100110) + chr(0b10001 + 0o34) + chr(56)))((PkJVWpA7b9v3[-nzTpIcepk0o8(chr(2076 - 2028) + chr(0b1101111) + chr(1368 - 1319), 17998 - 17990)] for PkJVWpA7b9v3 in jFYatuQoUjef))
hXMPsSrOQzbh.NDLdSAmHlSIP = ftfygxgFas5X(CsodZJH6x9Tx)
del H_1hgrMeqC9N[:]
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer.set_username_ibm
|
def set_username_ibm(self, username_ibm):
"""
Parameters
----------
username_ibm : str
Raises
------
Exception
If mode is not `ibm`
"""
if self.get_mode() == "ibm":
self.__username_ibm = username_ibm
else:
raise Exception(
"Mode is {}, whereas it must be `ibm`".format(
self.get_moder()))
|
python
|
def set_username_ibm(self, username_ibm):
"""
Parameters
----------
username_ibm : str
Raises
------
Exception
If mode is not `ibm`
"""
if self.get_mode() == "ibm":
self.__username_ibm = username_ibm
else:
raise Exception(
"Mode is {}, whereas it must be `ibm`".format(
self.get_moder()))
|
[
"def",
"set_username_ibm",
"(",
"self",
",",
"username_ibm",
")",
":",
"if",
"self",
".",
"get_mode",
"(",
")",
"==",
"\"ibm\"",
":",
"self",
".",
"__username_ibm",
"=",
"username_ibm",
"else",
":",
"raise",
"Exception",
"(",
"\"Mode is {}, whereas it must be `ibm`\"",
".",
"format",
"(",
"self",
".",
"get_moder",
"(",
")",
")",
")"
] |
Parameters
----------
username_ibm : str
Raises
------
Exception
If mode is not `ibm`
|
[
"Parameters",
"----------",
"username_ibm",
":",
"str"
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L325-L341
|
train
|
Sets the username of the current object.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3x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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(0b10000 + 0o40) + '\x6f' + '\x33' + chr(52), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x31' + '\065' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(0b1101111) + chr(746 - 695) + chr(0b110000 + 0o7) + chr(1613 - 1565), 39124 - 39116), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1110 + 0o45) + chr(0b11010 + 0o27) + chr(2576 - 2524), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(1897 - 1846) + chr(2041 - 1989) + chr(0b110010 + 0o5), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(1957 - 1906) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(2277 - 2229) + chr(4040 - 3929) + chr(0b11011 + 0o27) + '\x31', 30378 - 30370), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(48) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(5216 - 5105) + chr(0b101000 + 0o12) + '\060' + chr(55), 0o10), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(666 - 555) + chr(0b110010) + '\x33' + '\x32', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010 + 0o1) + chr(0b110010) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b100010 + 0o115) + chr(0b110011) + chr(48) + '\063', 53122 - 53114), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2242 - 2187) + chr(1233 - 1183), 0b1000), nzTpIcepk0o8(chr(163 - 115) + chr(0b1101011 + 0o4) + chr(49) + '\x35', 0b1000), nzTpIcepk0o8(chr(1470 - 1422) + '\x6f' + chr(0b110001) + chr(0b101111 + 0o3) + chr(0b10000 + 0o40), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + '\066' + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b11111 + 0o24) + '\062' + chr(1877 - 1828), 62415 - 62407), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + chr(50) + chr(0b101110 + 0o7), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + chr(2656 - 2603) + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b101101 + 0o4) + '\062' + '\062', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + '\x36' + '\x32', 15105 - 15097), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + '\060' + '\x31', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1568 - 1517) + '\x31' + '\063', 0o10), nzTpIcepk0o8(chr(1975 - 1927) + chr(0b1101111) + chr(0b10001 + 0o37), 12367 - 12359), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(8641 - 8530) + chr(0b110001) + chr(452 - 402), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1010011 + 0o34) + chr(50) + chr(0b110111) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + '\060', 0o10), nzTpIcepk0o8(chr(768 - 720) + chr(8307 - 8196) + '\x31' + '\060' + '\064', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b101100 + 0o103) + '\064' + chr(305 - 257), ord("\x08")), nzTpIcepk0o8(chr(325 - 277) + '\x6f' + chr(0b101010 + 0o10) + '\x37' + chr(1646 - 1597), 0b1000), nzTpIcepk0o8(chr(1453 - 1405) + chr(111) + chr(0b101001 + 0o12) + chr(51) + chr(0b110100), 58132 - 58124), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + chr(0b110111) + chr(0b110001), 29472 - 29464), nzTpIcepk0o8(chr(48) + '\157' + '\061' + chr(0b11000 + 0o37) + chr(0b110101), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b100000 + 0o21) + chr(0b101110 + 0o3) + chr(49), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + chr(91 - 43), 8), nzTpIcepk0o8(chr(1073 - 1025) + chr(3010 - 2899) + chr(51) + chr(54) + chr(980 - 926), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b11101 + 0o122) + chr(51) + '\065' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(111) + chr(0b110011) + chr(48), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(100 - 46) + '\065', 0o10), nzTpIcepk0o8(chr(48) + chr(4480 - 4369) + '\061' + '\067' + chr(842 - 787), 24119 - 24111)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b1110 + 0o141) + chr(0b110101) + chr(0b110000), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'2'), chr(100) + chr(8147 - 8046) + chr(99) + chr(111) + chr(0b1100100) + '\145')(chr(8665 - 8548) + chr(1858 - 1742) + '\x66' + '\055' + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def AGAo07qpRR0Q(hXMPsSrOQzbh, HuUAAmtf2hkw):
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"{\r\x8c\x93\x8a\xf4u'"), chr(6298 - 6198) + '\x65' + chr(0b0 + 0o143) + '\x6f' + '\144' + '\145')(chr(0b1010011 + 0o42) + chr(0b1110100) + chr(0b1100110) + chr(0b11101 + 0o20) + chr(0b100101 + 0o23)))() == roI3spqORKae(ES5oEprVxulp(b'u\n\x95'), chr(6725 - 6625) + chr(101) + chr(8172 - 8073) + chr(0b1101111) + chr(0b110110 + 0o56) + '\x65')('\x75' + chr(6233 - 6117) + '\x66' + chr(45) + chr(0b111000)):
hXMPsSrOQzbh.qD4EbSdCEmhz = HuUAAmtf2hkw
else:
raise zfo2Sgkz3IVJ(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'Q\x07\x9c\xa9\xc7\xf2bb\xfc\xe7\xfc\xe3Me5\x07\xb4\xb4\x1cr\xdb\xb5\xebm\x7f\xcdldB\xdc\xfc\x19\x14+u\x96'), '\x64' + chr(0b111000 + 0o55) + chr(7518 - 7419) + '\x6f' + '\x64' + chr(101))('\x75' + '\x74' + chr(8371 - 8269) + '\x2d' + '\x38'), roI3spqORKae(ES5oEprVxulp(b'm[\xcb\x87\xa0\xa8w-\xd6\xc5\x93\x89'), '\x64' + '\145' + chr(0b1100011) + chr(10208 - 10097) + chr(0b1010000 + 0o24) + chr(0b1100101))(chr(1354 - 1237) + '\164' + chr(102) + chr(46 - 1) + chr(0b111000)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"{\r\x8c\x93\x8a\xf4u'\xf5"), chr(0b100101 + 0o77) + chr(9401 - 9300) + chr(0b1001101 + 0o26) + chr(7154 - 7043) + chr(0b1100100) + '\145')(chr(0b101100 + 0o111) + '\x74' + chr(0b10110 + 0o120) + chr(1161 - 1116) + chr(0b111000)))()))
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer.set_password_ibm
|
def set_password_ibm(self, password_ibm):
"""
Parameters
----------
password_ibm : str
Raises
------
Exception
If mode is not `ibm`
"""
if self.get_mode() == "ibm":
self.__password_ibm = password_ibm
else:
raise Exception(
"Mode is {}, whereas it must be `ibm`".format(self.get_mode()))
|
python
|
def set_password_ibm(self, password_ibm):
"""
Parameters
----------
password_ibm : str
Raises
------
Exception
If mode is not `ibm`
"""
if self.get_mode() == "ibm":
self.__password_ibm = password_ibm
else:
raise Exception(
"Mode is {}, whereas it must be `ibm`".format(self.get_mode()))
|
[
"def",
"set_password_ibm",
"(",
"self",
",",
"password_ibm",
")",
":",
"if",
"self",
".",
"get_mode",
"(",
")",
"==",
"\"ibm\"",
":",
"self",
".",
"__password_ibm",
"=",
"password_ibm",
"else",
":",
"raise",
"Exception",
"(",
"\"Mode is {}, whereas it must be `ibm`\"",
".",
"format",
"(",
"self",
".",
"get_mode",
"(",
")",
")",
")"
] |
Parameters
----------
password_ibm : str
Raises
------
Exception
If mode is not `ibm`
|
[
"Parameters",
"----------",
"password_ibm",
":",
"str"
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndex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FQ8o,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(0b10001 + 0o37) + '\157' + chr(0b110010) + '\061', 7951 - 7943), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(111) + chr(50) + chr(683 - 634) + chr(1574 - 1519), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101000 + 0o7) + chr(52) + chr(0b110110), 33544 - 33536), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(55) + chr(0b110101), 30359 - 30351), nzTpIcepk0o8(chr(48) + chr(10681 - 10570) + chr(49) + chr(2091 - 2043) + '\062', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32' + chr(785 - 734) + chr(1449 - 1398), 26070 - 26062), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + chr(0b110000 + 0o2) + '\064', 24727 - 24719), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + '\x34' + chr(51), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + '\067' + chr(52), 54747 - 54739), nzTpIcepk0o8(chr(50 - 2) + '\x6f' + chr(0b110100 + 0o3) + '\064', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110101) + chr(51), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b110101) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1448 - 1399) + '\x37' + chr(199 - 145), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(154 - 106) + chr(1400 - 1346), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(7557 - 7446) + chr(48), 0o10), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\x6f' + chr(0b101101 + 0o5) + chr(0b110101) + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + chr(287 - 239) + chr(0b100100 + 0o21), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11110 + 0o25) + chr(53) + chr(0b110010 + 0o5), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110100) + '\x37', 0o10), nzTpIcepk0o8('\x30' + chr(0b101 + 0o152) + '\x33' + chr(0b11 + 0o63) + chr(626 - 574), 0o10), nzTpIcepk0o8('\x30' + chr(0b1010 + 0o145) + chr(0b1100 + 0o45) + '\x35' + chr(2727 - 2673), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x36' + chr(1193 - 1142), 45042 - 45034), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b1101111) + '\x31' + '\x30' + '\062', 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + chr(0b110110) + '\x32', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + chr(48) + '\063', 17587 - 17579), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b110111) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1010011 + 0o34) + '\x31' + '\x36' + chr(0b1 + 0o57), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b0 + 0o61) + chr(368 - 317), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(11552 - 11441) + chr(49) + chr(2710 - 2655), 4720 - 4712), nzTpIcepk0o8(chr(0b111 + 0o51) + '\157' + chr(50) + chr(92 - 38) + '\063', 8169 - 8161), nzTpIcepk0o8(chr(2037 - 1989) + chr(3308 - 3197) + chr(0b110011) + chr(0b110100) + '\063', 11042 - 11034), nzTpIcepk0o8(chr(2130 - 2082) + chr(111) + chr(0b100110 + 0o17) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\157' + chr(50) + chr(0b101011 + 0o7) + chr(52), 0b1000), nzTpIcepk0o8(chr(2180 - 2132) + '\157' + '\061' + '\x34' + chr(0b11100 + 0o24), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + chr(0b110010) + chr(54), 0o10), nzTpIcepk0o8(chr(1306 - 1258) + chr(1574 - 1463) + chr(0b11100 + 0o25) + '\061' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10001 + 0o41) + '\067' + chr(0b110011 + 0o1), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1722 - 1672) + chr(1602 - 1551) + chr(0b100111 + 0o14), 8), nzTpIcepk0o8('\060' + chr(111) + chr(234 - 185) + '\x30' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1000110 + 0o51) + chr(51) + chr(0b110100) + chr(0b110100), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(111) + chr(53) + chr(0b101110 + 0o2), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'?'), '\144' + chr(101) + '\143' + '\x6f' + '\x64' + chr(0b1100101))(chr(0b1100001 + 0o24) + chr(0b1110100) + '\146' + '\055' + chr(0b10011 + 0o45)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def p7WfM2_NSWLt(hXMPsSrOQzbh, _TVuOwsBH5OA):
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'v\xeaR\xa2/\xf40\xc6'), chr(0b1100100) + '\145' + chr(0b1100011) + '\x6f' + chr(2323 - 2223) + '\145')(chr(0b1011111 + 0o26) + chr(8606 - 8490) + chr(102) + chr(1895 - 1850) + '\070'))() == roI3spqORKae(ES5oEprVxulp(b'x\xedK'), '\144' + '\145' + chr(99) + chr(12221 - 12110) + chr(5032 - 4932) + chr(1220 - 1119))('\165' + chr(116) + '\146' + chr(0b101101) + chr(0b111000)):
hXMPsSrOQzbh.dqTtiYgm8tOB = _TVuOwsBH5OA
else:
raise zfo2Sgkz3IVJ(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b"\\\xe0B\x98b\xf2'\x83\x87A\x07\x0c\t.e\xd9\xe0\x8eT\xd4\x07Gb\x1f6\x8b\x04+m\xd6\xc3J\xfd\x02;+"), chr(0b11101 + 0o107) + '\145' + chr(0b1100011) + chr(111) + '\144' + '\145')('\165' + chr(8420 - 8304) + chr(0b1011110 + 0o10) + chr(1092 - 1047) + chr(2900 - 2844)), roI3spqORKae(ES5oEprVxulp(b'`\xbc\x15\xb6\x05\xa82\xcc\xadchf'), chr(0b10000 + 0o124) + chr(0b1100101) + '\x63' + chr(0b11110 + 0o121) + chr(8302 - 8202) + '\x65')(chr(2773 - 2656) + '\x74' + chr(102) + chr(0b11000 + 0o25) + chr(0b111000)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'v\xeaR\xa2/\xf40\xc6'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(111) + chr(0b1100010 + 0o2) + chr(0b0 + 0o145))(chr(1148 - 1031) + '\x74' + '\146' + chr(45) + chr(56)))()))
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer._list_audio_files
|
def _list_audio_files(self, sub_dir=""):
"""
Parameters
----------
sub_dir : one of `needed_directories`, optional
Default is "", which means it'll look through all of subdirs.
Returns
-------
audio_files : [str]
A list whose elements are basenames of the present audiofiles whose
formats are `wav`
"""
audio_files = list()
for possibly_audio_file in os.listdir("{}/{}".format(self.src_dir,
sub_dir)):
file_format = ''.join(possibly_audio_file.split('.')[-1])
if file_format.lower() == "wav":
audio_files.append(possibly_audio_file)
return audio_files
|
python
|
def _list_audio_files(self, sub_dir=""):
"""
Parameters
----------
sub_dir : one of `needed_directories`, optional
Default is "", which means it'll look through all of subdirs.
Returns
-------
audio_files : [str]
A list whose elements are basenames of the present audiofiles whose
formats are `wav`
"""
audio_files = list()
for possibly_audio_file in os.listdir("{}/{}".format(self.src_dir,
sub_dir)):
file_format = ''.join(possibly_audio_file.split('.')[-1])
if file_format.lower() == "wav":
audio_files.append(possibly_audio_file)
return audio_files
|
[
"def",
"_list_audio_files",
"(",
"self",
",",
"sub_dir",
"=",
"\"\"",
")",
":",
"audio_files",
"=",
"list",
"(",
")",
"for",
"possibly_audio_file",
"in",
"os",
".",
"listdir",
"(",
"\"{}/{}\"",
".",
"format",
"(",
"self",
".",
"src_dir",
",",
"sub_dir",
")",
")",
":",
"file_format",
"=",
"''",
".",
"join",
"(",
"possibly_audio_file",
".",
"split",
"(",
"'.'",
")",
"[",
"-",
"1",
"]",
")",
"if",
"file_format",
".",
"lower",
"(",
")",
"==",
"\"wav\"",
":",
"audio_files",
".",
"append",
"(",
"possibly_audio_file",
")",
"return",
"audio_files"
] |
Parameters
----------
sub_dir : one of `needed_directories`, optional
Default is "", which means it'll look through all of subdirs.
Returns
-------
audio_files : [str]
A list whose elements are basenames of the present audiofiles whose
formats are `wav`
|
[
"Parameters",
"----------",
"sub_dir",
":",
"one",
"of",
"needed_directories",
"optional",
"Default",
"is",
"which",
"means",
"it",
"ll",
"look",
"through",
"all",
"of",
"subdirs",
"."
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L418-L437
|
train
|
Returns a list of all audio files in the source directory.
|
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,fPFTJxVnGSh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6pRf2DSRk,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(111) + chr(0b110001) + chr(1804 - 1752) + chr(0b110100), 58387 - 58379), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b0 + 0o62) + chr(0b110010) + chr(52), 0b1000), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\x6f' + chr(0b110011) + '\x32' + '\062', 0b1000), nzTpIcepk0o8(chr(814 - 766) + '\157' + chr(561 - 511) + '\067', 39170 - 39162), nzTpIcepk0o8('\060' + chr(0b111101 + 0o62) + '\061' + chr(0b100001 + 0o24) + chr(2994 - 2939), 0b1000), nzTpIcepk0o8('\060' + chr(0b1000 + 0o147) + chr(0b1101 + 0o44) + chr(1062 - 1008) + '\x35', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b111100 + 0o63) + chr(0b10111 + 0o32) + '\063' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + chr(0b101111 + 0o5) + '\x34', 8), nzTpIcepk0o8(chr(0b110000) + chr(5064 - 4953) + chr(192 - 143) + chr(53) + chr(0b101101 + 0o12), 8), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(48) + '\067', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(0b1111 + 0o46) + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(344 - 294) + chr(2315 - 2263) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + '\x31' + chr(0b101011 + 0o13) + chr(0b110011 + 0o4), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100101 + 0o12) + '\061' + '\x36' + chr(1848 - 1793), 8), nzTpIcepk0o8(chr(401 - 353) + chr(0b1010 + 0o145) + chr(0b101001 + 0o10) + chr(53) + '\065', 64898 - 64890), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + '\x34' + '\x30', 0b1000), nzTpIcepk0o8(chr(485 - 437) + '\157' + chr(50) + '\x30' + chr(0b101111 + 0o2), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b101100 + 0o6) + chr(52) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(1086 - 1038) + '\x6f' + '\x33' + '\x36' + chr(50), 0o10), nzTpIcepk0o8(chr(2255 - 2207) + chr(0b1101111) + chr(51) + chr(0b110000) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1951 - 1901) + chr(49) + chr(0b110110), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(0b100011 + 0o17) + '\066', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(0b1 + 0o65) + chr(0b11100 + 0o24), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b110101 + 0o72) + chr(1700 - 1645) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(11835 - 11724) + '\x31' + chr(763 - 712) + chr(0b10 + 0o62), 1738 - 1730), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110100) + '\065', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + chr(0b110011) + chr(0b110100), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + '\067' + chr(55), 0o10), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b1101111) + '\x31' + '\060' + '\064', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(178 - 129) + chr(0b11101 + 0o31) + '\065', 8), nzTpIcepk0o8('\x30' + chr(3598 - 3487) + chr(2306 - 2257) + chr(0b110000 + 0o6) + chr(50), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\063' + '\062' + '\061', 0o10), nzTpIcepk0o8(chr(48) + chr(4223 - 4112) + chr(2068 - 2018) + '\063' + chr(52), 8), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(55) + '\064', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1010010 + 0o35) + chr(0b110010 + 0o1) + chr(50) + chr(0b110111), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + '\061' + chr(0b11111 + 0o22), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(8774 - 8663) + '\x32' + chr(609 - 556) + chr(49), 25718 - 25710), nzTpIcepk0o8('\x30' + chr(0b1001110 + 0o41) + chr(0b10 + 0o57) + chr(54) + chr(0b11011 + 0o30), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + '\x33' + '\x34', 0b1000), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(9955 - 9844) + '\x36' + chr(52), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\157' + '\065' + '\060', 40551 - 40543)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'J'), chr(3123 - 3023) + chr(101) + chr(0b101001 + 0o72) + '\x6f' + chr(100) + '\145')('\x75' + chr(0b110100 + 0o100) + '\x66' + '\x2d' + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def iz91mTTB3PTd(hXMPsSrOQzbh, AUYLA6NPT8Hk=roI3spqORKae(ES5oEprVxulp(b''), '\144' + '\x65' + chr(99) + chr(111) + '\144' + chr(6423 - 6322))(chr(117) + chr(0b1110100) + chr(7006 - 6904) + '\055' + '\x38')):
gOULQ6uIlP0w = H4NoA26ON7iG()
for Zs2hJabOn8uh in roI3spqORKae(aHUqKstZLeS6, roI3spqORKae(ES5oEprVxulp(b'\x08\xfd\xa1c\x0b\x1c+'), '\x64' + '\145' + '\x63' + chr(0b11110 + 0o121) + '\x64' + chr(9427 - 9326))(chr(0b101010 + 0o113) + chr(116) + chr(102) + chr(0b101000 + 0o5) + '\x38'))(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\x1f\xe9\xfdl\x12'), '\144' + '\x65' + chr(331 - 232) + chr(111) + chr(0b1011101 + 0o7) + chr(0b1100101))('\x75' + chr(5611 - 5495) + '\146' + '\055' + chr(928 - 872)), roI3spqORKae(ES5oEprVxulp(b'\x15\xa7\xe1\\(F?\x0b>\x18/\xed'), '\144' + chr(101) + chr(6612 - 6513) + chr(9438 - 9327) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(116) + chr(0b1100011 + 0o3) + '\x2d' + chr(2865 - 2809)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x17\xe6\xb1H\x0b\x1c+'), '\144' + chr(7413 - 7312) + '\143' + chr(0b1100000 + 0o17) + chr(0b10010 + 0o122) + chr(6919 - 6818))(chr(0b11010 + 0o133) + chr(0b1110100) + '\146' + chr(45) + chr(56))), AUYLA6NPT8Hk)):
GjUZflgb7mHC = roI3spqORKae(ES5oEprVxulp(b''), '\x64' + '\145' + '\143' + chr(0b1101111) + chr(100) + chr(0b1100101))(chr(2545 - 2428) + chr(0b1110100) + chr(0b11000 + 0o116) + chr(331 - 286) + '\x38').Y4yM9BcfTCNq(Zs2hJabOn8uh.LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b'J'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(8870 - 8759) + '\144' + chr(101))(chr(11359 - 11242) + chr(116) + '\146' + chr(0b101101) + chr(0b1111 + 0o51)))[-nzTpIcepk0o8(chr(0b0 + 0o60) + '\157' + chr(0b1011 + 0o46), 0o10)])
if roI3spqORKae(GjUZflgb7mHC, roI3spqORKae(ES5oEprVxulp(b'<\xfa\xeaR!"\x14>\x0b\x0e>\xd3'), chr(0b1011010 + 0o12) + '\x65' + '\143' + '\157' + '\x64' + '\x65')(chr(0b1010110 + 0o37) + '\x74' + chr(0b1100110) + chr(0b101101) + '\x38'))() == roI3spqORKae(ES5oEprVxulp(b'\x13\xf5\xa4'), '\x64' + '\145' + chr(0b11111 + 0o104) + chr(3621 - 3510) + '\144' + '\145')('\x75' + chr(0b110100 + 0o100) + chr(102) + chr(1239 - 1194) + '\070'):
roI3spqORKae(gOULQ6uIlP0w, roI3spqORKae(ES5oEprVxulp(b',\xc0\x81#\x17\x12\x1e\x0b\x05(9\x92'), '\x64' + chr(663 - 562) + '\x63' + chr(0b1101111) + chr(2010 - 1910) + chr(0b101111 + 0o66))(chr(0b1110101) + '\164' + chr(7336 - 7234) + chr(45) + chr(0b111000)))(Zs2hJabOn8uh)
return gOULQ6uIlP0w
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer._get_audio_channels
|
def _get_audio_channels(self, audio_abs_path):
"""
Parameters
----------
audio_abs_path : str
Returns
-------
channel_num : int
"""
channel_num = int(
subprocess.check_output(
("""sox --i {} | grep "{}" | awk -F " : " '{{print $2}}'"""
).format(audio_abs_path, "Channels"),
shell=True, universal_newlines=True).rstrip())
return channel_num
|
python
|
def _get_audio_channels(self, audio_abs_path):
"""
Parameters
----------
audio_abs_path : str
Returns
-------
channel_num : int
"""
channel_num = int(
subprocess.check_output(
("""sox --i {} | grep "{}" | awk -F " : " '{{print $2}}'"""
).format(audio_abs_path, "Channels"),
shell=True, universal_newlines=True).rstrip())
return channel_num
|
[
"def",
"_get_audio_channels",
"(",
"self",
",",
"audio_abs_path",
")",
":",
"channel_num",
"=",
"int",
"(",
"subprocess",
".",
"check_output",
"(",
"(",
"\"\"\"sox --i {} | grep \"{}\" | awk -F \" : \" '{{print $2}}'\"\"\"",
")",
".",
"format",
"(",
"audio_abs_path",
",",
"\"Channels\"",
")",
",",
"shell",
"=",
"True",
",",
"universal_newlines",
"=",
"True",
")",
".",
"rstrip",
"(",
")",
")",
"return",
"channel_num"
] |
Parameters
----------
audio_abs_path : str
Returns
-------
channel_num : int
|
[
"Parameters",
"----------",
"audio_abs_path",
":",
"str"
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L439-L454
|
train
|
Get the number of audio channels from the audio 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,Kqv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SRk,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' + '\157' + chr(375 - 326) + chr(51) + chr(51), 0o10), nzTpIcepk0o8(chr(48) + chr(4491 - 4380) + chr(0b1110 + 0o44) + chr(54) + '\067', 20443 - 20435), nzTpIcepk0o8('\x30' + chr(9061 - 8950) + chr(0b110001) + '\062', 23617 - 23609), nzTpIcepk0o8('\060' + chr(3217 - 3106) + chr(50) + '\x33' + '\063', 0b1000), nzTpIcepk0o8('\x30' + chr(2354 - 2243) + '\x37', 44959 - 44951), nzTpIcepk0o8('\x30' + chr(111) + chr(460 - 411) + chr(578 - 526) + chr(0b110010), 22016 - 22008), nzTpIcepk0o8(chr(1302 - 1254) + chr(111) + chr(2103 - 2052) + chr(0b11001 + 0o34) + chr(52), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(1666 - 1611) + chr(780 - 726), 0o10), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(7069 - 6958) + '\x31' + chr(0b110100) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b101110 + 0o3) + '\x33' + chr(0b110001), 8531 - 8523), nzTpIcepk0o8(chr(855 - 807) + chr(0b1000001 + 0o56) + '\062' + chr(0b110100) + '\065', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + chr(0b110110) + '\x36', 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b10001 + 0o42) + chr(55) + chr(2591 - 2538), 0b1000), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\157' + chr(955 - 904) + '\060' + chr(0b101001 + 0o12), 0b1000), nzTpIcepk0o8(chr(1460 - 1412) + '\x6f' + chr(49) + chr(2210 - 2158) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(1324 - 1276) + chr(0b101000 + 0o107) + '\061' + chr(1591 - 1540), ord("\x08")), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1101111) + '\062' + chr(0b110110) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(1440 - 1392) + chr(111) + '\061' + chr(2223 - 2172) + chr(0b110001), 8), nzTpIcepk0o8('\060' + '\157' + chr(53) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(1564 - 1516) + chr(0b110001 + 0o76) + chr(0b101110 + 0o3) + chr(861 - 810) + chr(0b10110 + 0o36), ord("\x08")), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b1101111) + '\062' + chr(0b1110 + 0o44) + chr(0b101110 + 0o5), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(0b1000 + 0o57) + '\063', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100010 + 0o15) + chr(0b10110 + 0o36), 64616 - 64608), nzTpIcepk0o8('\060' + '\157' + '\063' + '\060', 0b1000), nzTpIcepk0o8('\060' + chr(0b1111 + 0o140) + chr(0b110010) + chr(49) + chr(0b100110 + 0o13), 33457 - 33449), nzTpIcepk0o8(chr(0b10110 + 0o32) + '\x6f' + chr(0b10000 + 0o41) + chr(0b100000 + 0o25) + chr(0b1111 + 0o43), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b100011 + 0o114) + '\064' + chr(0b100110 + 0o13), 0o10), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b1100010 + 0o15) + chr(0b101100 + 0o7) + chr(0b110011) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\x6f' + chr(0b110001) + chr(51) + '\063', 8), nzTpIcepk0o8('\060' + chr(5274 - 5163) + chr(51) + '\x35', 10246 - 10238), nzTpIcepk0o8(chr(48) + chr(111) + '\x34' + chr(668 - 617), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b11100 + 0o25) + chr(2168 - 2120) + '\x34', 0o10), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\x6f' + chr(0b110010) + chr(0b110101) + '\x34', 55338 - 55330), nzTpIcepk0o8(chr(0b110000) + chr(1110 - 999) + '\063' + chr(0b10010 + 0o36) + '\066', 36878 - 36870), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + chr(0b110000) + chr(51), 8), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b110001 + 0o76) + chr(0b110011) + '\064' + '\x34', 16042 - 16034), nzTpIcepk0o8('\060' + '\157' + '\063' + chr(54) + chr(0b110011), 6394 - 6386), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b1000 + 0o53) + '\061' + chr(0b110110), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + chr(1788 - 1738) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110000 + 0o2) + chr(0b10011 + 0o42) + chr(55), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(1630 - 1519) + '\065' + chr(0b110000), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'u'), chr(6882 - 6782) + '\145' + chr(7194 - 7095) + chr(111) + chr(6256 - 6156) + '\x65')('\165' + '\164' + '\x66' + chr(45) + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def bKkTYRHz6MFI(hXMPsSrOQzbh, vgeffcrySuun):
Dcqi7mNQdf38 = nzTpIcepk0o8(eT8Y087E_kfd.check_output(roI3spqORKae(ES5oEprVxulp(b"(\xd8r\xbb*O\x85\x9e\x1a$\x85\n\xdd\xa4\x11n\xc0y\x0c'\xee\x99$d\xa9\x0bV\xb1{0ed\x8e\xe6\xf9\xc4\xd1\xee\xf0\xd4 \xc7x\xf2i\x16\xcc\x9aS$\xd8Q"), '\144' + '\x65' + '\x63' + chr(0b1101111) + '\144' + chr(5997 - 5896))('\x75' + chr(8079 - 7963) + chr(0b111111 + 0o47) + chr(0b11111 + 0o16) + '\x38').format(vgeffcrySuun, roI3spqORKae(ES5oEprVxulp(b'\x18\xdfk\xf5i\x07\x80\xcd'), chr(0b1100100) + '\x65' + '\143' + chr(0b1000111 + 0o50) + '\x64' + chr(0b1100101))(chr(117) + chr(116) + chr(5294 - 5192) + '\055' + chr(56))), shell=nzTpIcepk0o8('\060' + '\157' + chr(0b11000 + 0o31), 0b1000), universal_newlines=nzTpIcepk0o8('\x30' + '\157' + chr(0b110001), 8)).rstrip())
return Dcqi7mNQdf38
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer._get_audio_sample_rate
|
def _get_audio_sample_rate(self, audio_abs_path):
"""
Parameters
----------
audio_abs_path : str
Returns
-------
sample_rate : int
"""
sample_rate = int(
subprocess.check_output(
("""sox --i {} | grep "{}" | awk -F " : " '{{print $2}}'"""
).format(audio_abs_path, "Sample Rate"),
shell=True, universal_newlines=True).rstrip())
return sample_rate
|
python
|
def _get_audio_sample_rate(self, audio_abs_path):
"""
Parameters
----------
audio_abs_path : str
Returns
-------
sample_rate : int
"""
sample_rate = int(
subprocess.check_output(
("""sox --i {} | grep "{}" | awk -F " : " '{{print $2}}'"""
).format(audio_abs_path, "Sample Rate"),
shell=True, universal_newlines=True).rstrip())
return sample_rate
|
[
"def",
"_get_audio_sample_rate",
"(",
"self",
",",
"audio_abs_path",
")",
":",
"sample_rate",
"=",
"int",
"(",
"subprocess",
".",
"check_output",
"(",
"(",
"\"\"\"sox --i {} | grep \"{}\" | awk -F \" : \" '{{print $2}}'\"\"\"",
")",
".",
"format",
"(",
"audio_abs_path",
",",
"\"Sample Rate\"",
")",
",",
"shell",
"=",
"True",
",",
"universal_newlines",
"=",
"True",
")",
".",
"rstrip",
"(",
")",
")",
"return",
"sample_rate"
] |
Parameters
----------
audio_abs_path : str
Returns
-------
sample_rate : int
|
[
"Parameters",
"----------",
"audio_abs_path",
":",
"str"
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L456-L471
|
train
|
Get the audio sample rate from the audio 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,uKsHT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,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(0b11100 + 0o24) + chr(111) + chr(218 - 167) + chr(51) + chr(0b1000 + 0o53), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\066' + chr(0b101000 + 0o10), ord("\x08")), nzTpIcepk0o8(chr(86 - 38) + '\x6f' + chr(1722 - 1672) + chr(53) + chr(53), 27313 - 27305), nzTpIcepk0o8(chr(1855 - 1807) + chr(111) + '\067' + '\064', 0b1000), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\157' + '\x31' + chr(0b0 + 0o64) + '\060', 0o10), nzTpIcepk0o8(chr(2126 - 2078) + chr(4918 - 4807) + chr(0b110010) + chr(0b10111 + 0o37), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101 + 0o142) + chr(274 - 221) + '\x35', 0o10), nzTpIcepk0o8(chr(807 - 759) + chr(111) + chr(0b1000 + 0o52) + '\x31' + chr(52), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110110) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1000010 + 0o55) + chr(51) + '\067' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(597 - 545) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(713 - 665) + chr(111) + chr(0b110010) + chr(582 - 532) + chr(0b110001 + 0o5), 30167 - 30159), nzTpIcepk0o8(chr(285 - 237) + chr(111) + chr(0b110010) + chr(0b11101 + 0o23) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b11001 + 0o27) + '\x6f' + '\063' + '\060' + chr(0b11111 + 0o22), 0o10), nzTpIcepk0o8(chr(1065 - 1017) + '\x6f' + chr(0b100110 + 0o14) + '\065' + '\x36', 0o10), nzTpIcepk0o8('\x30' + chr(3948 - 3837) + chr(1747 - 1697), 29748 - 29740), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\157' + chr(51) + chr(0b11111 + 0o25), 36187 - 36179), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\157' + chr(1491 - 1442) + chr(0b10001 + 0o44) + chr(1601 - 1550), 43263 - 43255), nzTpIcepk0o8(chr(2292 - 2244) + chr(0b1101111) + chr(49) + chr(0b110111) + chr(52), 3511 - 3503), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(111) + chr(0b101100 + 0o5) + chr(0b110001) + chr(0b1110 + 0o47), 52133 - 52125), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x34', 30205 - 30197), nzTpIcepk0o8('\x30' + chr(8243 - 8132) + '\062' + chr(49) + chr(0b110101), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(49) + chr(0b110010) + '\x34', 0o10), nzTpIcepk0o8(chr(1610 - 1562) + '\157' + chr(1227 - 1173) + '\x33', 25110 - 25102), nzTpIcepk0o8(chr(1669 - 1621) + '\x6f' + chr(0b100101 + 0o15) + chr(48) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(3177 - 3066) + chr(0b110010) + chr(0b11111 + 0o23) + '\x35', 14740 - 14732), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1101111 + 0o0) + chr(1336 - 1287) + chr(0b1111 + 0o45) + chr(0b100101 + 0o20), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(0b110101) + '\x32', 0b1000), nzTpIcepk0o8(chr(538 - 490) + chr(111) + '\062' + chr(0b101000 + 0o17) + '\065', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1011011 + 0o24) + chr(0b110001) + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(1939 - 1888) + '\067' + chr(0b10011 + 0o44), ord("\x08")), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(0b1011101 + 0o22) + chr(0b10111 + 0o34) + '\066' + '\x31', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(1800 - 1746) + chr(624 - 569), 0o10), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(5997 - 5886) + chr(0b1111 + 0o43) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(111) + chr(471 - 422) + '\063', 8), nzTpIcepk0o8(chr(622 - 574) + chr(111) + '\x33' + chr(1547 - 1493) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(1882 - 1771) + chr(1834 - 1780) + '\x33', 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b11110 + 0o23) + chr(52) + chr(0b101 + 0o54), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(50) + chr(0b11001 + 0o30) + chr(1934 - 1883), 56611 - 56603), nzTpIcepk0o8('\x30' + chr(0b1011000 + 0o27) + '\061' + chr(0b110010) + chr(2124 - 2076), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(7389 - 7278) + chr(53) + chr(48), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf5'), chr(0b1000011 + 0o41) + chr(0b111101 + 0o50) + chr(0b101011 + 0o70) + chr(111) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(0b1000101 + 0o57) + '\x66' + chr(45) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def ugAfWLkP6Ddh(hXMPsSrOQzbh, vgeffcrySuun):
sHX5S4SkpPgB = nzTpIcepk0o8(eT8Y087E_kfd.check_output(roI3spqORKae(ES5oEprVxulp(b'\xa8_\xd5\x1cM;D\xacI\x83\x01\xea\xa1\xa6\xdcglK^6y\xaftO\xa0\xf4\x12\xc1\x9d&\xb9\xd1\xd521\xd6\x11A\xac+\xa0@\xdfU\x0eb\r\xa8\x00\x83\\\xb1'), '\x64' + chr(0b1100101) + chr(99) + '\157' + chr(100) + chr(0b1001000 + 0o35))('\165' + chr(2586 - 2470) + chr(0b1100101 + 0o1) + chr(0b11111 + 0o16) + chr(0b101110 + 0o12)).format(vgeffcrySuun, roI3spqORKae(ES5oEprVxulp(b'\x88Q\xc0L\x0cs\r\xdeS\x8aD'), chr(0b1100100) + chr(0b11011 + 0o112) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(10173 - 10072))(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(45) + '\x38')), shell=nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001), 0b1000), universal_newlines=nzTpIcepk0o8(chr(48) + chr(407 - 296) + '\x31', 8)).rstrip())
return sHX5S4SkpPgB
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer._get_audio_sample_bit
|
def _get_audio_sample_bit(self, audio_abs_path):
"""
Parameters
----------
audio_abs_path : str
Returns
-------
sample_bit : int
"""
sample_bit = int(
subprocess.check_output(
("""sox --i {} | grep "{}" | awk -F " : " '{{print $2}}' | """
"""grep -oh "^[^-]*" """).format(audio_abs_path, "Precision"),
shell=True, universal_newlines=True).rstrip())
return sample_bit
|
python
|
def _get_audio_sample_bit(self, audio_abs_path):
"""
Parameters
----------
audio_abs_path : str
Returns
-------
sample_bit : int
"""
sample_bit = int(
subprocess.check_output(
("""sox --i {} | grep "{}" | awk -F " : " '{{print $2}}' | """
"""grep -oh "^[^-]*" """).format(audio_abs_path, "Precision"),
shell=True, universal_newlines=True).rstrip())
return sample_bit
|
[
"def",
"_get_audio_sample_bit",
"(",
"self",
",",
"audio_abs_path",
")",
":",
"sample_bit",
"=",
"int",
"(",
"subprocess",
".",
"check_output",
"(",
"(",
"\"\"\"sox --i {} | grep \"{}\" | awk -F \" : \" '{{print $2}}' | \"\"\"",
"\"\"\"grep -oh \"^[^-]*\" \"\"\"",
")",
".",
"format",
"(",
"audio_abs_path",
",",
"\"Precision\"",
")",
",",
"shell",
"=",
"True",
",",
"universal_newlines",
"=",
"True",
")",
".",
"rstrip",
"(",
")",
")",
"return",
"sample_bit"
] |
Parameters
----------
audio_abs_path : str
Returns
-------
sample_bit : int
|
[
"Parameters",
"----------",
"audio_abs_path",
":",
"str"
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L473-L488
|
train
|
Get the audio sample bit from the cache file.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2S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,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(0b1010100 + 0o33) + '\x32' + chr(54) + chr(2114 - 2065), ord("\x08")), nzTpIcepk0o8(chr(2201 - 2153) + '\x6f' + '\061' + '\066' + chr(2070 - 2019), 0b1000), nzTpIcepk0o8('\060' + chr(0b1010100 + 0o33) + chr(61 - 12) + chr(2031 - 1976) + chr(666 - 618), 0b1000), nzTpIcepk0o8(chr(2265 - 2217) + chr(591 - 480) + chr(0b110010) + chr(345 - 295) + chr(0b101111 + 0o7), 0b1000), nzTpIcepk0o8('\060' + chr(2435 - 2324) + chr(0b110011) + chr(923 - 875) + chr(48), 62572 - 62564), nzTpIcepk0o8(chr(0b11101 + 0o23) + '\x6f' + '\063' + chr(1862 - 1814) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(512 - 464) + chr(9411 - 9300) + '\061' + chr(0b110100) + chr(0b11001 + 0o31), 61477 - 61469), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + '\x34' + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(111) + chr(50) + '\x37' + chr(49), 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(111) + '\063' + chr(0b10101 + 0o42) + chr(1615 - 1563), 0b1000), nzTpIcepk0o8(chr(48) + chr(7035 - 6924) + chr(50) + chr(52) + '\x34', 47273 - 47265), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + chr(0b110111) + '\x33', 0b1000), nzTpIcepk0o8(chr(1211 - 1163) + '\x6f' + chr(0b110100) + chr(0b10100 + 0o40), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + '\062', 12062 - 12054), nzTpIcepk0o8('\060' + chr(4965 - 4854) + '\063' + chr(0b110110) + '\062', 20295 - 20287), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b101000 + 0o15) + chr(54), 0o10), nzTpIcepk0o8(chr(48) + chr(3794 - 3683) + '\062' + '\065' + chr(0b111 + 0o52), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + chr(50) + '\066', 0o10), nzTpIcepk0o8(chr(0b111 + 0o51) + '\157' + chr(49) + chr(2025 - 1971) + chr(53), 720 - 712), nzTpIcepk0o8(chr(237 - 189) + '\x6f' + chr(50) + chr(49) + chr(54), 0b1000), nzTpIcepk0o8('\060' + chr(0b11000 + 0o127) + '\063' + '\x35' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(408 - 360) + '\x6f' + chr(0b110001) + chr(0b10110 + 0o34) + chr(49), 0o10), nzTpIcepk0o8('\x30' + chr(10839 - 10728) + chr(229 - 176) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(2033 - 1985) + '\157' + chr(0b110011), 24293 - 24285), nzTpIcepk0o8(chr(985 - 937) + '\x6f' + chr(1995 - 1945) + chr(0b110100) + chr(414 - 363), 0b1000), nzTpIcepk0o8(chr(1938 - 1890) + chr(0b1101111) + '\x32' + chr(48) + chr(0b101010 + 0o6), ord("\x08")), nzTpIcepk0o8(chr(1476 - 1428) + '\157' + chr(1135 - 1083) + '\061', 0b1000), nzTpIcepk0o8(chr(2169 - 2121) + chr(111) + chr(50) + chr(1745 - 1695) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(107 - 59) + chr(0b10010 + 0o135) + '\062' + '\065' + '\x36', 15244 - 15236), nzTpIcepk0o8(chr(0b110000) + chr(4312 - 4201) + chr(0b111 + 0o52) + chr(53) + chr(0b1001 + 0o54), ord("\x08")), nzTpIcepk0o8(chr(625 - 577) + chr(0b1101111) + chr(0b110011) + chr(0b10001 + 0o42) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + chr(0b101111 + 0o10) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(458 - 410) + chr(111) + chr(49) + chr(0b100100 + 0o22) + chr(0b111 + 0o60), 39799 - 39791), nzTpIcepk0o8('\x30' + chr(111) + chr(0b100001 + 0o22) + chr(0b110000) + '\067', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1236 - 1181) + chr(0b101000 + 0o13), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1181 - 1132) + chr(0b11100 + 0o25) + chr(1446 - 1395), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(2311 - 2262) + chr(289 - 241) + chr(0b100011 + 0o15), 0o10), nzTpIcepk0o8(chr(1936 - 1888) + chr(12119 - 12008) + '\x32' + '\065' + chr(0b1000 + 0o53), ord("\x08")), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\157' + chr(2176 - 2127) + '\066' + '\x37', 8), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b100011 + 0o114) + '\062' + chr(0b11100 + 0o25) + chr(0b110111), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b11001 + 0o34) + '\060', 21184 - 21176)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x9f'), chr(2126 - 2026) + chr(0b1100101) + '\143' + '\157' + chr(5078 - 4978) + chr(2747 - 2646))(chr(0b1101110 + 0o7) + chr(4655 - 4539) + '\x66' + '\055' + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def aenFwMSIe08d(hXMPsSrOQzbh, vgeffcrySuun):
hxEsipsYNX8F = nzTpIcepk0o8(eT8Y087E_kfd.check_output(roI3spqORKae(ES5oEprVxulp(b'\xc2\x1c\x00\xb6\xed\xe9\x0b\xc0\xc2\x81\x84\xc7\x04u\x80K\xd9vW\xf5\x97s\x0f\x7f\x83\xe1V\xfa\x8e@\x9e[U\xe7\x01kb\x8bP\xf4\xca\x03\n\xff\xae\xb0B\xc4\x8b\x81\xd9\x9c\x04n\xd2I\xdb3\x05\xae\xc7>G#\x81\xdez\xcf\x830\xf2YW'), chr(100) + chr(101) + chr(3980 - 3881) + '\157' + chr(0b1100100) + chr(0b1100101))('\x75' + chr(116) + chr(0b100100 + 0o102) + chr(0b1010 + 0o43) + '\070').format(vgeffcrySuun, roI3spqORKae(ES5oEprVxulp(b'\xe1\x01\x1d\xf5\xa9\xb7\x0b\x8f\xd7'), chr(0b1010001 + 0o23) + '\x65' + chr(99) + chr(0b1101111) + chr(0b1011011 + 0o11) + chr(0b1100101))(chr(117) + chr(0b1110100) + '\x66' + chr(0b101010 + 0o3) + chr(0b11111 + 0o31))), shell=nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001), ord("\x08")), universal_newlines=nzTpIcepk0o8('\060' + chr(10169 - 10058) + '\061', 8)).rstrip())
return hxEsipsYNX8F
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer._get_audio_duration_seconds
|
def _get_audio_duration_seconds(self, audio_abs_path):
"""
Parameters
----------
audio_abs_path : str
Returns
-------
total_seconds : int
"""
HHMMSS_duration = subprocess.check_output(
("""sox --i {} | grep "{}" | awk -F " : " '{{print $2}}' | """
"""grep -oh "^[^=]*" """).format(
audio_abs_path, "Duration"),
shell=True, universal_newlines=True).rstrip()
total_seconds = sum(
[float(x) * 60 ** (2 - i)
for i, x in enumerate(HHMMSS_duration.split(":"))])
return total_seconds
|
python
|
def _get_audio_duration_seconds(self, audio_abs_path):
"""
Parameters
----------
audio_abs_path : str
Returns
-------
total_seconds : int
"""
HHMMSS_duration = subprocess.check_output(
("""sox --i {} | grep "{}" | awk -F " : " '{{print $2}}' | """
"""grep -oh "^[^=]*" """).format(
audio_abs_path, "Duration"),
shell=True, universal_newlines=True).rstrip()
total_seconds = sum(
[float(x) * 60 ** (2 - i)
for i, x in enumerate(HHMMSS_duration.split(":"))])
return total_seconds
|
[
"def",
"_get_audio_duration_seconds",
"(",
"self",
",",
"audio_abs_path",
")",
":",
"HHMMSS_duration",
"=",
"subprocess",
".",
"check_output",
"(",
"(",
"\"\"\"sox --i {} | grep \"{}\" | awk -F \" : \" '{{print $2}}' | \"\"\"",
"\"\"\"grep -oh \"^[^=]*\" \"\"\"",
")",
".",
"format",
"(",
"audio_abs_path",
",",
"\"Duration\"",
")",
",",
"shell",
"=",
"True",
",",
"universal_newlines",
"=",
"True",
")",
".",
"rstrip",
"(",
")",
"total_seconds",
"=",
"sum",
"(",
"[",
"float",
"(",
"x",
")",
"*",
"60",
"**",
"(",
"2",
"-",
"i",
")",
"for",
"i",
",",
"x",
"in",
"enumerate",
"(",
"HHMMSS_duration",
".",
"split",
"(",
"\":\"",
")",
")",
"]",
")",
"return",
"total_seconds"
] |
Parameters
----------
audio_abs_path : str
Returns
-------
total_seconds : int
|
[
"Parameters",
"----------",
"audio_abs_path",
":",
"str"
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L490-L508
|
train
|
Get the total number of seconds until the audio file has been downloaded.
|
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_4UfQF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OS7b2Ofrbne,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(0b11010 + 0o26) + chr(111) + chr(0b10010 + 0o40) + chr(367 - 315) + '\x30', 9003 - 8995), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + '\065' + '\062', 41610 - 41602), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + '\x35' + chr(0b110010), 8), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b1101111) + chr(0b110001) + chr(0b110000) + '\066', 0o10), nzTpIcepk0o8('\060' + chr(0b100111 + 0o110) + chr(50) + chr(0b110111) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(1584 - 1536) + '\x6f' + '\063' + '\063' + chr(52), 18378 - 18370), nzTpIcepk0o8(chr(48) + chr(0b10001 + 0o136) + chr(0b110001) + '\x35' + chr(0b110110), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + '\067' + chr(0b11001 + 0o34), 0o10), nzTpIcepk0o8(chr(1610 - 1562) + chr(391 - 280) + '\061' + '\x33' + '\067', 19740 - 19732), nzTpIcepk0o8(chr(1684 - 1636) + '\157' + '\x36' + chr(0b110101 + 0o1), ord("\x08")), nzTpIcepk0o8('\060' + chr(3201 - 3090) + chr(0b100001 + 0o22) + chr(0b1000 + 0o55) + chr(48), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b11110 + 0o121) + '\x32' + chr(2687 - 2632) + chr(0b110100), 8), nzTpIcepk0o8('\x30' + chr(111) + chr(997 - 946) + chr(1925 - 1871) + chr(51), 0o10), nzTpIcepk0o8(chr(1837 - 1789) + chr(6227 - 6116) + '\063' + chr(53) + chr(52), 61844 - 61836), nzTpIcepk0o8(chr(933 - 885) + chr(0b1101111) + chr(51) + chr(0b101011 + 0o10) + chr(51), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1333 - 1284) + '\x35' + chr(0b100010 + 0o25), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(0b10 + 0o63) + chr(0b110000), 8), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\157' + '\x33' + chr(0b101101 + 0o5) + chr(0b110101), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\062' + chr(54), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b11 + 0o57) + '\067' + chr(0b101010 + 0o6), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + '\066' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b100101 + 0o112) + '\x31' + chr(0b10 + 0o56) + chr(55), 1084 - 1076), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + '\x31' + chr(54), 0b1000), nzTpIcepk0o8(chr(479 - 431) + '\x6f' + '\x32' + '\061' + '\062', 0o10), nzTpIcepk0o8(chr(943 - 895) + chr(111) + chr(0b11100 + 0o33) + chr(2616 - 2563), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110110) + '\061', 28124 - 28116), nzTpIcepk0o8('\x30' + chr(0b1001000 + 0o47) + chr(0b1101 + 0o46) + chr(0b110011) + '\064', 8), nzTpIcepk0o8(chr(477 - 429) + '\157' + chr(0b101010 + 0o14) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\x6f' + chr(928 - 877) + '\x36' + '\060', 0o10), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(5655 - 5544) + chr(0b101110 + 0o3) + '\060' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + chr(0b11001 + 0o30) + chr(2762 - 2708), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + chr(0b10111 + 0o36) + chr(48), 0b1000), nzTpIcepk0o8(chr(294 - 246) + '\157' + chr(0b110010) + chr(48), 50655 - 50647), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(0b110110) + '\067', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\062' + chr(0b110000) + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101001 + 0o6) + chr(49) + chr(48) + '\066', 8), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b1101111) + chr(49) + chr(657 - 602) + chr(478 - 428), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(1893 - 1842) + chr(0b110011) + '\067', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b1011 + 0o46) + chr(2571 - 2519) + '\x32', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(2481 - 2429) + chr(0b10001 + 0o41), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\065' + chr(48), 39495 - 39487)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x8e'), chr(0b1100100) + chr(101) + chr(5936 - 5837) + chr(111) + chr(9883 - 9783) + chr(0b1000 + 0o135))(chr(0b1001001 + 0o54) + chr(0b11101 + 0o127) + '\146' + '\x2d' + chr(2639 - 2583)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def yzNHzjHNPjFO(hXMPsSrOQzbh, vgeffcrySuun):
SqyatE3GHFNQ = eT8Y087E_kfd.check_output(roI3spqORKae(ES5oEprVxulp(b'\xd3\x85\x92f\x91\xf1\x07\xdd$K\xc8\xc0\xd3\x8b\xa9\n\x98\xf54\xc3\xcce\xae\xf6\x1dP\xab\\\xd0h\xc8\x882W\xbbfX\xffEY\xdb\x9a\x98/\xd2\xa8N\xd9mK\x95\x9b\xd3\x90\xfb\x08\x9a\xb0f\x98\x9c(\xe6\xaa\x1fo\x87i\xcd\x18\xa4\x8a0'), chr(0b1100100) + chr(0b101001 + 0o74) + '\143' + chr(0b1000011 + 0o54) + '\144' + chr(4823 - 4722))('\165' + '\x74' + chr(102) + chr(0b101010 + 0o3) + '\070').format(vgeffcrySuun, roI3spqORKae(ES5oEprVxulp(b"\xe4\x9f\x98'\xc8\xb5\x01\x93"), chr(100) + chr(0b1100101) + chr(99) + chr(111) + chr(0b10011 + 0o121) + '\145')('\x75' + chr(0b1110100) + chr(0b111 + 0o137) + chr(0b1000 + 0o45) + chr(0b111000))), shell=nzTpIcepk0o8(chr(48) + '\157' + chr(1072 - 1023), 57707 - 57699), universal_newlines=nzTpIcepk0o8('\060' + '\x6f' + chr(1190 - 1141), 8)).rstrip()
TcZQocO5sQuk = oclC8DLjA_lV([jLW6pRf2DSRk(bI5jsQ9OkQtj) * nzTpIcepk0o8(chr(2164 - 2116) + '\x6f' + '\067' + chr(52), ord("\x08")) ** (nzTpIcepk0o8(chr(48) + '\157' + chr(0b1 + 0o61), 0b1000) - ZlbFMSG8gCoF) for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(SqyatE3GHFNQ.LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b'\x9a'), chr(0b100 + 0o140) + chr(0b1011010 + 0o13) + chr(3875 - 3776) + chr(0b1101111) + '\144' + '\x65')(chr(117) + chr(116) + chr(0b1001011 + 0o33) + chr(0b101101) + chr(0b1101 + 0o53))))])
return TcZQocO5sQuk
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer._get_audio_bit_rate
|
def _get_audio_bit_rate(self, audio_abs_path):
"""
Parameters
-----------
audio_abs_path : str
Returns
-------
bit_rate : int
"""
bit_Rate_formatted = subprocess.check_output(
"""sox --i {} | grep "{}" | awk -F " : " '{{print $2}}'""".format(
audio_abs_path, "Bit Rate"),
shell=True, universal_newlines=True).rstrip()
bit_rate = (lambda x:
int(x[:-1]) * 10 ** 3 if x[-1].lower() == "k" else
int(x[:-1]) * 10 ** 6 if x[-1].lower() == "m" else
int(x[:-1]) * 10 ** 9 if x[-1].lower() == "g" else
int(x))(bit_Rate_formatted)
return bit_rate
|
python
|
def _get_audio_bit_rate(self, audio_abs_path):
"""
Parameters
-----------
audio_abs_path : str
Returns
-------
bit_rate : int
"""
bit_Rate_formatted = subprocess.check_output(
"""sox --i {} | grep "{}" | awk -F " : " '{{print $2}}'""".format(
audio_abs_path, "Bit Rate"),
shell=True, universal_newlines=True).rstrip()
bit_rate = (lambda x:
int(x[:-1]) * 10 ** 3 if x[-1].lower() == "k" else
int(x[:-1]) * 10 ** 6 if x[-1].lower() == "m" else
int(x[:-1]) * 10 ** 9 if x[-1].lower() == "g" else
int(x))(bit_Rate_formatted)
return bit_rate
|
[
"def",
"_get_audio_bit_rate",
"(",
"self",
",",
"audio_abs_path",
")",
":",
"bit_Rate_formatted",
"=",
"subprocess",
".",
"check_output",
"(",
"\"\"\"sox --i {} | grep \"{}\" | awk -F \" : \" '{{print $2}}'\"\"\"",
".",
"format",
"(",
"audio_abs_path",
",",
"\"Bit Rate\"",
")",
",",
"shell",
"=",
"True",
",",
"universal_newlines",
"=",
"True",
")",
".",
"rstrip",
"(",
")",
"bit_rate",
"=",
"(",
"lambda",
"x",
":",
"int",
"(",
"x",
"[",
":",
"-",
"1",
"]",
")",
"*",
"10",
"**",
"3",
"if",
"x",
"[",
"-",
"1",
"]",
".",
"lower",
"(",
")",
"==",
"\"k\"",
"else",
"int",
"(",
"x",
"[",
":",
"-",
"1",
"]",
")",
"*",
"10",
"**",
"6",
"if",
"x",
"[",
"-",
"1",
"]",
".",
"lower",
"(",
")",
"==",
"\"m\"",
"else",
"int",
"(",
"x",
"[",
":",
"-",
"1",
"]",
")",
"*",
"10",
"**",
"9",
"if",
"x",
"[",
"-",
"1",
"]",
".",
"lower",
"(",
")",
"==",
"\"g\"",
"else",
"int",
"(",
"x",
")",
")",
"(",
"bit_Rate_formatted",
")",
"return",
"bit_rate"
] |
Parameters
-----------
audio_abs_path : str
Returns
-------
bit_rate : int
|
[
"Parameters",
"-----------",
"audio_abs_path",
":",
"str"
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L510-L529
|
train
|
Returns the audio bit rate for the given audio 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,C60ELahX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zk7,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(938 - 827) + chr(0b110010) + chr(0b11100 + 0o33) + chr(51), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + chr(0b110001) + chr(1597 - 1542), 7397 - 7389), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + chr(0b110111) + '\x30', 0o10), nzTpIcepk0o8('\x30' + chr(0b100010 + 0o115) + chr(0b110010) + '\x31' + '\065', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1010011 + 0o34) + chr(0b110001) + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x32' + '\x31', 51339 - 51331), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + chr(0b110001) + chr(949 - 898), 0b1000), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b1101111) + chr(0b110011) + chr(49) + '\x34', 0o10), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\157' + chr(0b110010) + chr(0b110100) + chr(0b100001 + 0o25), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + '\x31' + chr(0b10101 + 0o34), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\063' + chr(0b100000 + 0o21) + '\063', 0o10), nzTpIcepk0o8('\060' + chr(0b1011011 + 0o24) + chr(1694 - 1643) + chr(0b110101) + '\x34', 8309 - 8301), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\x6f' + chr(0b110001) + chr(0b110010) + '\067', 9311 - 9303), nzTpIcepk0o8(chr(48) + chr(0b111111 + 0o60) + chr(0b100110 + 0o15) + chr(0b110000) + chr(0b110 + 0o52), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(1255 - 1207) + '\x31', 13017 - 13009), nzTpIcepk0o8('\x30' + '\x6f' + chr(395 - 344) + chr(0b1011 + 0o46) + chr(51), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b101100 + 0o7) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + chr(0b1101 + 0o51) + chr(0b11101 + 0o30), 0b1000), nzTpIcepk0o8(chr(417 - 369) + '\157' + chr(0b11101 + 0o31) + '\x36', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(792 - 741), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1001 + 0o146) + chr(0b100000 + 0o24) + chr(1418 - 1369), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b110010 + 0o1) + chr(55) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(1492 - 1444) + '\157' + '\x32' + '\x32' + '\x34', 63464 - 63456), nzTpIcepk0o8('\060' + chr(111) + chr(50) + '\x36' + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(1746 - 1635) + '\062' + chr(2254 - 2203) + chr(1376 - 1322), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(434 - 323) + '\x36' + chr(1838 - 1784), 8), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(0b110100) + chr(50), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110011) + chr(0b1010 + 0o53) + '\x30', 32360 - 32352), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(847 - 799) + chr(52), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(895 - 845) + '\x32' + '\x31', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b111 + 0o52) + chr(1824 - 1774) + chr(0b10001 + 0o42), 0o10), nzTpIcepk0o8(chr(1870 - 1822) + chr(9216 - 9105) + chr(0b110010) + chr(0b100011 + 0o22), 21296 - 21288), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(0b100011 + 0o15) + chr(0b101101 + 0o12), 21767 - 21759), nzTpIcepk0o8('\x30' + chr(0b1001100 + 0o43) + chr(439 - 390) + '\063' + chr(0b110011), 7360 - 7352), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\157' + '\x31' + chr(52) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + chr(55) + '\x37', 30040 - 30032), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\x6f' + chr(0b110001) + chr(0b11101 + 0o32) + '\061', 0o10), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1101111) + '\x34' + chr(2651 - 2599), ord("\x08")), nzTpIcepk0o8(chr(1443 - 1395) + chr(111) + chr(0b0 + 0o62) + '\060' + '\067', 0b1000), nzTpIcepk0o8(chr(107 - 59) + chr(0b1100100 + 0o13) + chr(0b101100 + 0o6) + chr(1398 - 1350), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(8466 - 8355) + '\065' + '\x30', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x95'), '\144' + '\145' + chr(0b1100011) + chr(9930 - 9819) + chr(9860 - 9760) + chr(101))('\165' + chr(4874 - 4758) + chr(5686 - 5584) + '\x2d' + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def bvZMXQDuZ5_y(hXMPsSrOQzbh, vgeffcrySuun):
rasGojV1cXXI = eT8Y087E_kfd.check_output(roI3spqORKae(ES5oEprVxulp(b'\xc8 \xc0\xad!<\xe2\xec\xdd\xb4\xeb\x90w\xa7\xf3\xaenU\x14x\\\xdb\xb4\xcf\xbeW\x95\x83\xe4\xbc\x155\xe5{^\xdf[\x04\xa0k\xc0?\xca\xe4be\xab\xe8\x94\xb4\xb6\xcb'), chr(3135 - 3035) + chr(0b1010000 + 0o25) + '\143' + '\x6f' + chr(4162 - 4062) + '\x65')(chr(4196 - 4079) + chr(0b1110100) + chr(4820 - 4718) + chr(0b101101) + chr(400 - 344)).format(vgeffcrySuun, roI3spqORKae(ES5oEprVxulp(b'\xf9&\xcc\xad^p\xff\xa9'), chr(0b1100100) + '\x65' + '\143' + chr(111) + chr(0b10110 + 0o116) + '\145')('\x75' + chr(116) + chr(122 - 20) + chr(0b101101) + '\x38')), shell=nzTpIcepk0o8('\060' + chr(1563 - 1452) + chr(49), 0b1000), universal_newlines=nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1101111) + chr(2191 - 2142), 8)).rstrip()
SoIvASv2JJnB = (lambda bI5jsQ9OkQtj: nzTpIcepk0o8(bI5jsQ9OkQtj[:-nzTpIcepk0o8('\x30' + '\157' + '\061', 8)]) * nzTpIcepk0o8(chr(180 - 132) + chr(853 - 742) + chr(931 - 882) + '\x32', 0o10) ** nzTpIcepk0o8(chr(48) + '\x6f' + '\063', 8) if bI5jsQ9OkQtj[-nzTpIcepk0o8(chr(0b110000) + chr(0b111110 + 0o61) + '\x31', 8)].Xn8ENWMZdIRt() == roI3spqORKae(ES5oEprVxulp(b'\xd0'), chr(0b1011010 + 0o12) + '\x65' + '\143' + chr(6539 - 6428) + chr(100) + '\145')(chr(4081 - 3964) + chr(116) + chr(0b1100110) + chr(0b101101) + chr(2933 - 2877)) else nzTpIcepk0o8(bI5jsQ9OkQtj[:-nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10011 + 0o36), 8)]) * nzTpIcepk0o8('\x30' + chr(1276 - 1165) + '\x31' + chr(50), 8) ** nzTpIcepk0o8(chr(1231 - 1183) + chr(199 - 88) + '\066', 29938 - 29930) if bI5jsQ9OkQtj[-nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49), 8)].Xn8ENWMZdIRt() == roI3spqORKae(ES5oEprVxulp(b'\xd6'), chr(0b1100100) + chr(5795 - 5694) + chr(99) + '\157' + chr(0b111111 + 0o45) + chr(2186 - 2085))(chr(5040 - 4923) + chr(0b110110 + 0o76) + chr(0b1100110) + chr(0b101101) + chr(2185 - 2129)) else nzTpIcepk0o8(bI5jsQ9OkQtj[:-nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(520 - 471), 8)]) * nzTpIcepk0o8(chr(48) + chr(8018 - 7907) + '\x31' + chr(0b100011 + 0o17), 8) ** nzTpIcepk0o8(chr(0b110000) + chr(0b1011001 + 0o26) + chr(0b110001) + chr(0b111 + 0o52), ord("\x08")) if bI5jsQ9OkQtj[-nzTpIcepk0o8(chr(48) + chr(0b111110 + 0o61) + chr(1075 - 1026), 8)].Xn8ENWMZdIRt() == roI3spqORKae(ES5oEprVxulp(b'\xdc'), chr(0b100000 + 0o104) + chr(0b1100101) + chr(0b111 + 0o134) + '\x6f' + '\144' + chr(101))('\165' + chr(0b1110000 + 0o4) + '\146' + '\055' + chr(0b101010 + 0o16)) else nzTpIcepk0o8(bI5jsQ9OkQtj))(rasGojV1cXXI)
return SoIvASv2JJnB
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer._seconds_to_HHMMSS
|
def _seconds_to_HHMMSS(seconds):
"""
Retuns a string which is the hour, minute, second(milli) representation
of the intput `seconds`
Parameters
----------
seconds : float
Returns
-------
str
Has the form <int>H<int>M<int>S.<float>
"""
less_than_second = seconds - floor(seconds)
minutes, seconds = divmod(floor(seconds), 60)
hours, minutes = divmod(minutes, 60)
return "{}H{}M{}S.{}".format(hours, minutes, seconds, less_than_second)
|
python
|
def _seconds_to_HHMMSS(seconds):
"""
Retuns a string which is the hour, minute, second(milli) representation
of the intput `seconds`
Parameters
----------
seconds : float
Returns
-------
str
Has the form <int>H<int>M<int>S.<float>
"""
less_than_second = seconds - floor(seconds)
minutes, seconds = divmod(floor(seconds), 60)
hours, minutes = divmod(minutes, 60)
return "{}H{}M{}S.{}".format(hours, minutes, seconds, less_than_second)
|
[
"def",
"_seconds_to_HHMMSS",
"(",
"seconds",
")",
":",
"less_than_second",
"=",
"seconds",
"-",
"floor",
"(",
"seconds",
")",
"minutes",
",",
"seconds",
"=",
"divmod",
"(",
"floor",
"(",
"seconds",
")",
",",
"60",
")",
"hours",
",",
"minutes",
"=",
"divmod",
"(",
"minutes",
",",
"60",
")",
"return",
"\"{}H{}M{}S.{}\"",
".",
"format",
"(",
"hours",
",",
"minutes",
",",
"seconds",
",",
"less_than_second",
")"
] |
Retuns a string which is the hour, minute, second(milli) representation
of the intput `seconds`
Parameters
----------
seconds : float
Returns
-------
str
Has the form <int>H<int>M<int>S.<float>
|
[
"Retuns",
"a",
"string",
"which",
"is",
"the",
"hour",
"minute",
"second",
"(",
"milli",
")",
"representation",
"of",
"the",
"intput",
"seconds"
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L531-L548
|
train
|
Returns a string which is the hour minute second representation of the intput seconds.
|
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,d9st0HqZDng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HPFq7C,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(10453 - 10342) + '\063' + '\x35' + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(4438 - 4327) + chr(818 - 769) + chr(0b110000) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(321 - 273) + chr(0b1010100 + 0o33) + '\062' + chr(52) + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + chr(0b100011 + 0o24) + chr(48), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + chr(55) + chr(48), 0o10), nzTpIcepk0o8(chr(48) + chr(0b11011 + 0o124) + chr(0b110101) + '\066', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\062' + '\x31' + chr(50), 0b1000), nzTpIcepk0o8(chr(286 - 238) + chr(111) + chr(51) + '\061', 0b1000), nzTpIcepk0o8('\x30' + chr(0b101101 + 0o102) + '\063' + chr(0b1100 + 0o45) + chr(0b110010 + 0o5), 49691 - 49683), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + '\062' + '\066', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\065' + chr(0b110111), 36554 - 36546), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(111) + chr(0b110010) + chr(0b110000) + chr(0b11111 + 0o27), ord("\x08")), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(111) + '\061' + chr(0b10110 + 0o36) + '\x36', 51904 - 51896), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(434 - 382), 46149 - 46141), nzTpIcepk0o8(chr(0b110000) + chr(7456 - 7345) + '\063' + chr(55) + chr(0b100101 + 0o14), 33506 - 33498), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + '\x30' + chr(0b1110 + 0o45), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\062' + chr(1348 - 1298) + chr(55), 47099 - 47091), nzTpIcepk0o8(chr(895 - 847) + '\x6f' + chr(0b110011) + '\060' + chr(0b110111), 61165 - 61157), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + '\x32', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + '\067' + chr(0b110000), 7797 - 7789), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(0b110100) + '\x36', 8), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + chr(49) + chr(52), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(622 - 568) + '\x31', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b11111 + 0o23) + chr(2441 - 2389), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b11111 + 0o23) + '\x37' + chr(0b100100 + 0o17), 18198 - 18190), nzTpIcepk0o8('\060' + chr(111) + chr(2305 - 2256) + '\060' + chr(0b101101 + 0o4), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(0b101101 + 0o4) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + chr(1463 - 1415), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1110 + 0o45) + chr(52) + '\065', ord("\x08")), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(111) + chr(54) + chr(2042 - 1987), 0b1000), nzTpIcepk0o8(chr(2137 - 2089) + chr(1838 - 1727) + chr(0b1001 + 0o51) + chr(0b110011) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + chr(385 - 334) + chr(51), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + chr(0b110001) + chr(52), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b101001 + 0o106) + chr(0b110010) + '\063', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2333 - 2284) + chr(55) + '\x37', 39867 - 39859), nzTpIcepk0o8(chr(0b110000) + chr(0b1000110 + 0o51) + chr(0b110011) + '\067' + '\x30', 8), nzTpIcepk0o8(chr(1272 - 1224) + '\x6f' + '\x33' + '\063' + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(0b110000) + chr(95 - 44), 8), nzTpIcepk0o8(chr(0b110000) + chr(4757 - 4646) + '\x33' + '\062' + chr(50), 0b1000), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(111) + chr(54) + chr(1262 - 1212), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110 + 0o57) + '\x30', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xc0'), chr(100) + chr(0b1010 + 0o133) + chr(0b1011100 + 0o7) + chr(0b1101111) + '\144' + '\145')('\x75' + '\164' + chr(0b1100110) + '\x2d' + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def tAqsJt5G6CMX(oEfYeyGTUUde):
wevfkyzuF02v = oEfYeyGTUUde - F77rKaEQeUr3(oEfYeyGTUUde)
(kwJODSj5YYDc, oEfYeyGTUUde) = Jq33HEV_XqZE(F77rKaEQeUr3(oEfYeyGTUUde), nzTpIcepk0o8('\x30' + '\157' + '\067' + chr(0b110100), 0o10))
(nTdZOeVoguLl, kwJODSj5YYDc) = Jq33HEV_XqZE(kwJODSj5YYDc, nzTpIcepk0o8(chr(48) + chr(3718 - 3607) + '\067' + chr(1960 - 1908), 8))
return roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\x95:\xe9\xc3\x05c\xf1d\x9c8T\xfb'), chr(8789 - 8689) + chr(0b100011 + 0o102) + chr(7663 - 7564) + chr(0b1010111 + 0o30) + chr(0b1100100) + chr(0b1001101 + 0o30))(chr(0b1110101) + chr(0b1110100) + chr(1947 - 1845) + '\x2d' + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\x9ft\x92\xf3?\x1d\xecv\x9eIl\xcc'), chr(0b1100100) + chr(3630 - 3529) + chr(1534 - 1435) + chr(0b1000111 + 0o50) + chr(8321 - 8221) + chr(101))(chr(117) + chr(0b1110100) + chr(0b10111 + 0o117) + chr(1190 - 1145) + chr(0b110011 + 0o5)))(nTdZOeVoguLl, kwJODSj5YYDc, oEfYeyGTUUde, wevfkyzuF02v)
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer._audio_segment_extractor
|
def _audio_segment_extractor(self, audio_abs_path, segment_abs_path,
starting_second, duration):
"""
Parameters
-----------
audio_abs_path : str
segment_abs_path : str
starting_second : int
duration : int
"""
subprocess.Popen(["sox", str(audio_abs_path), str(segment_abs_path),
"trim", str(starting_second), str(duration)],
universal_newlines=True).communicate()
|
python
|
def _audio_segment_extractor(self, audio_abs_path, segment_abs_path,
starting_second, duration):
"""
Parameters
-----------
audio_abs_path : str
segment_abs_path : str
starting_second : int
duration : int
"""
subprocess.Popen(["sox", str(audio_abs_path), str(segment_abs_path),
"trim", str(starting_second), str(duration)],
universal_newlines=True).communicate()
|
[
"def",
"_audio_segment_extractor",
"(",
"self",
",",
"audio_abs_path",
",",
"segment_abs_path",
",",
"starting_second",
",",
"duration",
")",
":",
"subprocess",
".",
"Popen",
"(",
"[",
"\"sox\"",
",",
"str",
"(",
"audio_abs_path",
")",
",",
"str",
"(",
"segment_abs_path",
")",
",",
"\"trim\"",
",",
"str",
"(",
"starting_second",
")",
",",
"str",
"(",
"duration",
")",
"]",
",",
"universal_newlines",
"=",
"True",
")",
".",
"communicate",
"(",
")"
] |
Parameters
-----------
audio_abs_path : str
segment_abs_path : str
starting_second : int
duration : int
|
[
"Parameters",
"-----------",
"audio_abs_path",
":",
"str",
"segment_abs_path",
":",
"str",
"starting_second",
":",
"int",
"duration",
":",
"int"
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L550-L563
|
train
|
Extract the audio segments from the audio 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,d9st0Hq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dVnHPFq7C,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(5464 - 5353) + '\x36' + chr(0b110101), 24223 - 24215), nzTpIcepk0o8('\x30' + '\157' + '\x33' + '\067', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(0b100111 + 0o13) + '\061', 40372 - 40364), nzTpIcepk0o8('\060' + chr(10660 - 10549) + chr(50) + '\063' + chr(0b110010 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(2061 - 2013) + chr(111) + '\061' + chr(0b100111 + 0o12), 57886 - 57878), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(6565 - 6454) + chr(0b10011 + 0o40) + '\067' + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(6087 - 5976) + '\x31' + chr(0b101 + 0o57) + '\067', 0o10), nzTpIcepk0o8(chr(48) + chr(6063 - 5952) + chr(1406 - 1356) + '\066' + chr(0b1001 + 0o53), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(0b101111 + 0o10) + chr(54), 0o10), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1100010 + 0o15) + chr(0b101101 + 0o6) + '\x35' + '\064', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + chr(0b110110) + chr(52), 8), nzTpIcepk0o8(chr(1700 - 1652) + '\157' + '\x31' + '\x36' + chr(0b110000), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\x36', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110100) + '\063', 54656 - 54648), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + chr(759 - 707) + chr(48), 62912 - 62904), nzTpIcepk0o8('\060' + chr(0b1101000 + 0o7) + chr(72 - 22) + '\064' + '\x36', 0o10), nzTpIcepk0o8(chr(1564 - 1516) + chr(0b10101 + 0o132) + '\x31' + chr(55), ord("\x08")), nzTpIcepk0o8(chr(1486 - 1438) + chr(0b1101111) + chr(0b10001 + 0o42) + chr(0b10101 + 0o35), 13411 - 13403), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + '\065' + '\x31', 0o10), nzTpIcepk0o8(chr(1770 - 1722) + chr(0b1011000 + 0o27) + chr(54) + chr(0b110010), 64935 - 64927), nzTpIcepk0o8('\x30' + chr(111) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x36' + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32' + '\062' + chr(0b1011 + 0o47), 0o10), nzTpIcepk0o8(chr(1196 - 1148) + '\x6f' + '\x32' + chr(53) + '\x30', ord("\x08")), nzTpIcepk0o8('\060' + chr(7073 - 6962) + '\061' + '\x35' + '\067', 36981 - 36973), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(4760 - 4649) + '\061' + chr(1887 - 1836) + chr(53), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(50) + chr(0b110000) + chr(0b110001), 59960 - 59952), nzTpIcepk0o8(chr(48) + chr(2410 - 2299) + chr(0b110001 + 0o2) + chr(2019 - 1965) + chr(48), 0o10), nzTpIcepk0o8(chr(2213 - 2165) + '\157' + '\062' + chr(1603 - 1553), 0o10), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(815 - 704) + chr(49) + chr(0b110101) + chr(1703 - 1648), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(589 - 539) + '\x34' + chr(54), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(0b110010) + chr(0b10 + 0o64), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + '\x36' + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b10001 + 0o136) + '\x32' + chr(0b110001) + chr(1120 - 1069), 0o10), nzTpIcepk0o8('\x30' + chr(0b101000 + 0o107) + chr(0b101100 + 0o5) + chr(0b110010) + chr(51), 0o10), nzTpIcepk0o8(chr(48) + chr(0b111110 + 0o61) + chr(2070 - 2020) + '\x30' + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(170 - 120) + chr(0b110001) + chr(0b101001 + 0o16), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b110111 + 0o70) + chr(0b110011) + chr(0b110100 + 0o0) + chr(0b101011 + 0o5), 0b1000), nzTpIcepk0o8('\060' + chr(0b10 + 0o155) + chr(579 - 528) + chr(0b110111) + chr(0b110101), 26110 - 26102), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b1100 + 0o46) + chr(53) + chr(0b110011), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110101) + chr(1237 - 1189), 18875 - 18867)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x1b'), chr(5943 - 5843) + chr(0b101000 + 0o75) + chr(99) + '\157' + chr(6137 - 6037) + '\145')(chr(12761 - 12644) + '\x74' + chr(0b1100110) + chr(218 - 173) + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def NoQt0Vu3jwQX(hXMPsSrOQzbh, vgeffcrySuun, PUEjUzHzXeTW, RC8PkM2jFvzM, iMj2_O01ri67):
roI3spqORKae(eT8Y087E_kfd.Popen([roI3spqORKae(ES5oEprVxulp(b'Fp\xe9'), '\x64' + '\x65' + '\143' + chr(9792 - 9681) + chr(100) + '\x65')(chr(0b100111 + 0o116) + chr(1145 - 1029) + chr(9787 - 9685) + '\x2d' + '\x38'), N9zlRy29S1SS(vgeffcrySuun), N9zlRy29S1SS(PUEjUzHzXeTW), roI3spqORKae(ES5oEprVxulp(b'Am\xf8\xf0'), chr(0b1100100) + '\x65' + chr(99) + chr(11620 - 11509) + chr(0b101000 + 0o74) + chr(3224 - 3123))(chr(9715 - 9598) + '\x74' + '\146' + chr(0b100110 + 0o7) + chr(56)), N9zlRy29S1SS(RC8PkM2jFvzM), N9zlRy29S1SS(iMj2_O01ri67)], universal_newlines=nzTpIcepk0o8(chr(2133 - 2085) + '\x6f' + chr(0b11110 + 0o23), ord("\x08"))), roI3spqORKae(ES5oEprVxulp(b'Qp\xa7\xf78\xa96\xd9\xd5\xba\xc6)'), chr(0b11 + 0o141) + chr(0b1111 + 0o126) + chr(0b10100 + 0o117) + '\x6f' + chr(0b100011 + 0o101) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + chr(56)))()
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer._split_audio_by_duration
|
def _split_audio_by_duration(self, audio_abs_path,
results_abs_path, duration_seconds):
"""
Calculates the length of each segment and passes it to
self._audio_segment_extractor
Parameters
----------
audio_abs_path : str
results_abs_path : str
A place for adding digits needs to be added prior the the format
decleration i.e. name%03.wav. Here, we've added `*` at staging
step, which we'll replace.
duration_seconds : int
"""
total_seconds = self._get_audio_duration_seconds(audio_abs_path)
current_segment = 0
while current_segment <= total_seconds // duration_seconds + 1:
if current_segment + duration_seconds > total_seconds:
ending_second = total_seconds
else:
ending_second = current_segment + duration_seconds
self._audio_segment_extractor(
audio_abs_path,
results_abs_path.replace("*", "{:03d}".format(
current_segment)),
starting_second=current_segment, duration=(ending_second -
current_segment))
current_segment += 1
|
python
|
def _split_audio_by_duration(self, audio_abs_path,
results_abs_path, duration_seconds):
"""
Calculates the length of each segment and passes it to
self._audio_segment_extractor
Parameters
----------
audio_abs_path : str
results_abs_path : str
A place for adding digits needs to be added prior the the format
decleration i.e. name%03.wav. Here, we've added `*` at staging
step, which we'll replace.
duration_seconds : int
"""
total_seconds = self._get_audio_duration_seconds(audio_abs_path)
current_segment = 0
while current_segment <= total_seconds // duration_seconds + 1:
if current_segment + duration_seconds > total_seconds:
ending_second = total_seconds
else:
ending_second = current_segment + duration_seconds
self._audio_segment_extractor(
audio_abs_path,
results_abs_path.replace("*", "{:03d}".format(
current_segment)),
starting_second=current_segment, duration=(ending_second -
current_segment))
current_segment += 1
|
[
"def",
"_split_audio_by_duration",
"(",
"self",
",",
"audio_abs_path",
",",
"results_abs_path",
",",
"duration_seconds",
")",
":",
"total_seconds",
"=",
"self",
".",
"_get_audio_duration_seconds",
"(",
"audio_abs_path",
")",
"current_segment",
"=",
"0",
"while",
"current_segment",
"<=",
"total_seconds",
"//",
"duration_seconds",
"+",
"1",
":",
"if",
"current_segment",
"+",
"duration_seconds",
">",
"total_seconds",
":",
"ending_second",
"=",
"total_seconds",
"else",
":",
"ending_second",
"=",
"current_segment",
"+",
"duration_seconds",
"self",
".",
"_audio_segment_extractor",
"(",
"audio_abs_path",
",",
"results_abs_path",
".",
"replace",
"(",
"\"*\"",
",",
"\"{:03d}\"",
".",
"format",
"(",
"current_segment",
")",
")",
",",
"starting_second",
"=",
"current_segment",
",",
"duration",
"=",
"(",
"ending_second",
"-",
"current_segment",
")",
")",
"current_segment",
"+=",
"1"
] |
Calculates the length of each segment and passes it to
self._audio_segment_extractor
Parameters
----------
audio_abs_path : str
results_abs_path : str
A place for adding digits needs to be added prior the the format
decleration i.e. name%03.wav. Here, we've added `*` at staging
step, which we'll replace.
duration_seconds : int
|
[
"Calculates",
"the",
"length",
"of",
"each",
"segment",
"and",
"passes",
"it",
"to",
"self",
".",
"_audio_segment_extractor"
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L565-L593
|
train
|
Splits the audio file into individual segments.
|
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,a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Rq9N5ala,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(0b11011 + 0o26) + chr(1927 - 1878) + '\065', 0o10), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\x6f' + chr(1810 - 1760) + chr(48) + '\x33', 63173 - 63165), nzTpIcepk0o8(chr(2194 - 2146) + chr(0b1101111) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1011000 + 0o27) + chr(0b100011 + 0o16) + chr(0b1010 + 0o46) + chr(54), 0o10), nzTpIcepk0o8(chr(1784 - 1736) + '\x6f' + chr(1221 - 1172) + chr(55) + '\061', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(0b110000 + 0o1) + '\063', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1001111 + 0o40) + chr(0b110010 + 0o1) + '\066' + chr(0b11001 + 0o36), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(89 - 39) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b11101 + 0o30) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + chr(52) + chr(365 - 310), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061', 0b1000), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(7489 - 7378) + chr(2421 - 2370) + '\x30' + chr(2474 - 2419), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1010100 + 0o33) + chr(1899 - 1849) + chr(54) + chr(581 - 533), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(51), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1011001 + 0o26) + '\062' + chr(0b110001) + '\065', 0o10), nzTpIcepk0o8(chr(48) + chr(5736 - 5625) + '\062' + chr(53) + chr(0b11111 + 0o24), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b100100 + 0o113) + '\063' + chr(0b10100 + 0o35) + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1000001 + 0o56) + chr(1634 - 1584) + '\x33' + '\x32', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(731 - 681) + chr(692 - 642) + chr(0b100110 + 0o17), 0o10), nzTpIcepk0o8(chr(1402 - 1354) + '\157' + chr(740 - 690) + '\064' + chr(49), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + '\064' + '\065', 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\x31' + '\063' + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1746 - 1697) + chr(0b0 + 0o65) + chr(386 - 337), 0o10), nzTpIcepk0o8(chr(1583 - 1535) + chr(0b1101111) + '\063' + chr(0b101111 + 0o5) + chr(545 - 496), 27934 - 27926), nzTpIcepk0o8(chr(1953 - 1905) + chr(1144 - 1033) + chr(2026 - 1977) + chr(1529 - 1478) + chr(448 - 396), ord("\x08")), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1111 + 0o140) + chr(51) + chr(60 - 11) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(48) + chr(0b11101 + 0o122) + chr(231 - 180) + chr(0b110100) + chr(1030 - 976), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + chr(0b110011) + '\x31', 9569 - 9561), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(2002 - 1954) + chr(0b1101111) + chr(0b110001) + chr(1078 - 1030) + '\x33', 11342 - 11334), nzTpIcepk0o8(chr(1906 - 1858) + chr(0b100011 + 0o114) + chr(408 - 359), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + '\061' + chr(363 - 312), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2567 - 2513) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(1458 - 1410) + chr(0b1100110 + 0o11) + chr(0b110011) + '\060' + '\x30', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b1011 + 0o46) + chr(0b11100 + 0o27), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110 + 0o53) + chr(1573 - 1522) + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(1508 - 1457) + chr(1106 - 1058) + chr(0b110010 + 0o5), 8), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(0b110101 + 0o72) + chr(0b100000 + 0o22) + chr(1964 - 1909) + chr(0b11100 + 0o33), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(50) + chr(48) + '\065', 0b1000), nzTpIcepk0o8(chr(745 - 697) + chr(2230 - 2119) + '\063' + '\063', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b1 + 0o57) + chr(111) + '\065' + chr(0b110000), 35405 - 35397)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'c'), '\x64' + '\145' + '\x63' + chr(0b1101101 + 0o2) + chr(0b11010 + 0o112) + '\145')(chr(0b101100 + 0o111) + '\164' + chr(7378 - 7276) + chr(45) + chr(0b100000 + 0o30)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def l_1CFObD9cNO(hXMPsSrOQzbh, vgeffcrySuun, mDT8VQbG419M, XZHdYd6VfqO_):
TcZQocO5sQuk = hXMPsSrOQzbh._get_audio_duration_seconds(vgeffcrySuun)
UTh_petO2jec = nzTpIcepk0o8(chr(376 - 328) + chr(0b1101111) + chr(48), ord("\x08"))
while UTh_petO2jec <= TcZQocO5sQuk // XZHdYd6VfqO_ + nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49), 8):
if UTh_petO2jec + XZHdYd6VfqO_ > TcZQocO5sQuk:
JFdBcgSDsva3 = TcZQocO5sQuk
else:
JFdBcgSDsva3 = UTh_petO2jec + XZHdYd6VfqO_
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x12\xe2r"\x10\xe4\xa8bL\x80l\xa2\xdew\xd2\xce\xb4\xee\xe7\xc0\x86/\x06\x93'), chr(3443 - 3343) + chr(9151 - 9050) + chr(9374 - 9275) + chr(111) + chr(100) + '\145')(chr(117) + chr(0b1110100) + '\146' + chr(45) + '\x38'))(vgeffcrySuun, roI3spqORKae(mDT8VQbG419M, roI3spqORKae(ES5oEprVxulp(b'\x08\xba6"\x1b\xfa\xb8Kq\xa5q\x8d'), chr(0b110010 + 0o62) + chr(0b1001011 + 0o32) + chr(0b1100011) + chr(3567 - 3456) + chr(100) + chr(101))(chr(8186 - 8069) + '\164' + '\146' + chr(45) + chr(1119 - 1063)))(roI3spqORKae(ES5oEprVxulp(b'g'), chr(1189 - 1089) + chr(3369 - 3268) + chr(0b100011 + 0o100) + '\157' + '\144' + chr(0b1100101))(chr(5478 - 5361) + chr(0b1101110 + 0o6) + '\146' + chr(45) + '\x38'), roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'6\xb97u\x1d\xf6'), chr(100) + '\x65' + chr(8541 - 8442) + chr(111) + chr(100) + chr(0b1100101))('\165' + '\164' + chr(0b1100110) + chr(45) + chr(2101 - 2045)), roI3spqORKae(ES5oEprVxulp(b'<\xb04\r>\xb8\x91~x\xb8B\x8d'), chr(7476 - 7376) + chr(101) + chr(8392 - 8293) + chr(11852 - 11741) + chr(6331 - 6231) + chr(0b1001000 + 0o35))('\x75' + chr(0b1001010 + 0o52) + chr(5871 - 5769) + '\055' + chr(140 - 84)))(UTh_petO2jec)), starting_second=UTh_petO2jec, duration=JFdBcgSDsva3 - UTh_petO2jec)
UTh_petO2jec += nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49), 8)
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer._split_audio_by_size
|
def _split_audio_by_size(self, audio_abs_path, results_abs_path,
chunk_size):
"""
Calculates the duration of the name.wav in order for all splits have
the size of chunk_size except possibly the last split (which will be
smaller) and then passes the duration to `split_audio_by_duration`
Parameters
----------
audio_abs_path : str
results_abs_path : str
A place for adding digits needs to be added prior the the format
decleration i.e. name%03.wav
chunk_size : int
Should be in bytes
"""
sample_rate = self._get_audio_sample_rate(audio_abs_path)
sample_bit = self._get_audio_sample_bit(audio_abs_path)
channel_num = self._get_audio_channels(audio_abs_path)
duration = 8 * chunk_size / reduce(lambda x, y: int(x) * int(y),
[sample_rate, sample_bit,
channel_num])
self._split_audio_by_duration(audio_abs_path, results_abs_path,
duration)
|
python
|
def _split_audio_by_size(self, audio_abs_path, results_abs_path,
chunk_size):
"""
Calculates the duration of the name.wav in order for all splits have
the size of chunk_size except possibly the last split (which will be
smaller) and then passes the duration to `split_audio_by_duration`
Parameters
----------
audio_abs_path : str
results_abs_path : str
A place for adding digits needs to be added prior the the format
decleration i.e. name%03.wav
chunk_size : int
Should be in bytes
"""
sample_rate = self._get_audio_sample_rate(audio_abs_path)
sample_bit = self._get_audio_sample_bit(audio_abs_path)
channel_num = self._get_audio_channels(audio_abs_path)
duration = 8 * chunk_size / reduce(lambda x, y: int(x) * int(y),
[sample_rate, sample_bit,
channel_num])
self._split_audio_by_duration(audio_abs_path, results_abs_path,
duration)
|
[
"def",
"_split_audio_by_size",
"(",
"self",
",",
"audio_abs_path",
",",
"results_abs_path",
",",
"chunk_size",
")",
":",
"sample_rate",
"=",
"self",
".",
"_get_audio_sample_rate",
"(",
"audio_abs_path",
")",
"sample_bit",
"=",
"self",
".",
"_get_audio_sample_bit",
"(",
"audio_abs_path",
")",
"channel_num",
"=",
"self",
".",
"_get_audio_channels",
"(",
"audio_abs_path",
")",
"duration",
"=",
"8",
"*",
"chunk_size",
"/",
"reduce",
"(",
"lambda",
"x",
",",
"y",
":",
"int",
"(",
"x",
")",
"*",
"int",
"(",
"y",
")",
",",
"[",
"sample_rate",
",",
"sample_bit",
",",
"channel_num",
"]",
")",
"self",
".",
"_split_audio_by_duration",
"(",
"audio_abs_path",
",",
"results_abs_path",
",",
"duration",
")"
] |
Calculates the duration of the name.wav in order for all splits have
the size of chunk_size except possibly the last split (which will be
smaller) and then passes the duration to `split_audio_by_duration`
Parameters
----------
audio_abs_path : str
results_abs_path : str
A place for adding digits needs to be added prior the the format
decleration i.e. name%03.wav
chunk_size : int
Should be in bytes
|
[
"Calculates",
"the",
"duration",
"of",
"the",
"name",
".",
"wav",
"in",
"order",
"for",
"all",
"splits",
"have",
"the",
"size",
"of",
"chunk_size",
"except",
"possibly",
"the",
"last",
"split",
"(",
"which",
"will",
"be",
"smaller",
")",
"and",
"then",
"passes",
"the",
"duration",
"to",
"split_audio_by_duration"
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L595-L618
|
train
|
Splits the audio file into individual items and splits them into individual items.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2S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,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(0b1100110 + 0o11) + '\062' + chr(1436 - 1383) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(596 - 548) + chr(0b101111 + 0o100) + chr(0b10000 + 0o43) + chr(2180 - 2131) + chr(0b110001 + 0o0), 0b1000), nzTpIcepk0o8(chr(1153 - 1105) + '\x6f' + chr(51) + '\062', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(367 - 316) + chr(50), 27789 - 27781), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1100 + 0o45) + '\x30', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(52) + '\060', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(0b110000) + chr(0b110000), 49296 - 49288), nzTpIcepk0o8('\x30' + chr(111) + chr(0b100011 + 0o17) + chr(51) + chr(0b110100), 8810 - 8802), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b11001 + 0o31) + '\x31' + '\063', 59831 - 59823), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + '\063' + chr(55), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(0b110111) + chr(2823 - 2769), 54539 - 54531), nzTpIcepk0o8(chr(0b110000) + chr(0b101000 + 0o107) + chr(0b10010 + 0o37) + chr(2882 - 2828) + chr(0b110110), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(2280 - 2229) + '\061', 0o10), nzTpIcepk0o8('\x30' + chr(0b11101 + 0o122) + chr(0b110011 + 0o0) + chr(0b10000 + 0o41) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1101111) + chr(2389 - 2338) + chr(2379 - 2328) + '\067', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\x32' + chr(50) + chr(752 - 699), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + '\x31' + chr(50), 26173 - 26165), nzTpIcepk0o8(chr(1718 - 1670) + chr(0b1101111) + chr(49) + '\064' + chr(54), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(2170 - 2119) + chr(252 - 201), 13079 - 13071), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(10142 - 10031) + chr(0b101010 + 0o7) + chr(50) + chr(0b110110 + 0o0), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x32' + '\063' + '\x35', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\061' + '\067' + chr(438 - 389), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10101 + 0o33), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + chr(52) + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(8746 - 8635) + chr(1860 - 1810) + chr(1967 - 1918) + chr(0b110000 + 0o1), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(0b110000) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b101010 + 0o11) + chr(0b101001 + 0o13), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(2184 - 2131) + chr(2319 - 2269), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b110111 + 0o70) + chr(0b1111 + 0o42) + chr(908 - 857), 16442 - 16434), nzTpIcepk0o8(chr(678 - 630) + chr(0b1101111) + chr(1852 - 1801) + chr(0b110100) + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(2229 - 2176) + chr(312 - 257), ord("\x08")), nzTpIcepk0o8(chr(260 - 212) + chr(111) + '\x33' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(8470 - 8359) + chr(50) + '\x33' + chr(339 - 284), 8), nzTpIcepk0o8(chr(2241 - 2193) + chr(111) + chr(0b1100 + 0o45) + '\x36' + '\067', 33388 - 33380), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010 + 0o0) + '\061' + chr(51), 8), nzTpIcepk0o8('\060' + '\x6f' + chr(1779 - 1729) + '\065' + chr(0b110101), 57592 - 57584), nzTpIcepk0o8(chr(641 - 593) + chr(0b1101111) + chr(52) + chr(1144 - 1096), 8), nzTpIcepk0o8('\x30' + '\157' + chr(50) + '\x32' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(50) + '\x32', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b110000 + 0o77) + '\066', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1779 - 1731) + 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'\x81'), chr(100) + chr(996 - 895) + chr(0b1100011) + '\157' + '\x64' + '\145')(chr(0b1110101) + chr(0b110100 + 0o100) + chr(5484 - 5382) + '\x2d' + chr(476 - 420)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
(jYZAKYxMTtNT,) = (roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'\xc9\xbct\xf9|O\xef\xf0\xf8'), chr(0b1111 + 0o125) + chr(101) + chr(0b1000 + 0o133) + '\157' + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\xdd\xac~\xefkE'), '\144' + chr(0b1010110 + 0o17) + '\x63' + chr(0b1101111) + chr(0b1100100) + '\145')(chr(117) + '\164' + '\x66' + '\x2d' + chr(0b1111 + 0o51))), roI3spqORKae(ES5oEprVxulp(b'\xdd\xac~\xefkE'), chr(8046 - 7946) + chr(0b1000000 + 0o45) + chr(0b1100011) + chr(111) + chr(100) + chr(0b1101 + 0o130))('\165' + '\164' + '\x66' + chr(45) + chr(56))),)
def QqH4Q1eGcjLz(hXMPsSrOQzbh, vgeffcrySuun, mDT8VQbG419M, CyjJOdV7xEsi):
sHX5S4SkpPgB = hXMPsSrOQzbh._get_audio_sample_rate(vgeffcrySuun)
hxEsipsYNX8F = hXMPsSrOQzbh._get_audio_sample_bit(vgeffcrySuun)
Dcqi7mNQdf38 = hXMPsSrOQzbh._get_audio_channels(vgeffcrySuun)
iMj2_O01ri67 = nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(0b1101 + 0o43), 8) * CyjJOdV7xEsi / jYZAKYxMTtNT(lambda bI5jsQ9OkQtj, Fi3yzxctM1zW: nzTpIcepk0o8(bI5jsQ9OkQtj) * nzTpIcepk0o8(Fi3yzxctM1zW), [sHX5S4SkpPgB, hxEsipsYNX8F, Dcqi7mNQdf38])
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf0\xbaj\xf6aT\xdf\xfd\xfe\xfb\x17\x19F\xac\xa6\xca\xee\x13\xa97\xe9\x10o\n'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(0b100110 + 0o76) + '\x65')('\165' + chr(0b1110100) + chr(0b1100110) + chr(370 - 325) + chr(2570 - 2514)))(vgeffcrySuun, mDT8VQbG419M, iMj2_O01ri67)
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer._filtering_step
|
def _filtering_step(self, basename):
"""
Moves the audio file if the format is `wav` to `filtered` directory.
Parameters
----------
basename : str
A basename of `/home/random-guy/some-audio-file.wav` is
`some-audio-file.wav`
"""
name = ''.join(basename.split('.')[:-1])
# May cause problems if wav is not less than 9 channels.
if basename.split('.')[-1] == "wav":
if self.get_verbosity():
print("Found wave! Copying to {}/filtered/{}".format(
self.src_dir, basename))
subprocess.Popen(["cp", "{}/{}.wav".format(self.src_dir, name),
"{}/filtered/{}.wav".format(self.src_dir, name)],
universal_newlines=True).communicate()
|
python
|
def _filtering_step(self, basename):
"""
Moves the audio file if the format is `wav` to `filtered` directory.
Parameters
----------
basename : str
A basename of `/home/random-guy/some-audio-file.wav` is
`some-audio-file.wav`
"""
name = ''.join(basename.split('.')[:-1])
# May cause problems if wav is not less than 9 channels.
if basename.split('.')[-1] == "wav":
if self.get_verbosity():
print("Found wave! Copying to {}/filtered/{}".format(
self.src_dir, basename))
subprocess.Popen(["cp", "{}/{}.wav".format(self.src_dir, name),
"{}/filtered/{}.wav".format(self.src_dir, name)],
universal_newlines=True).communicate()
|
[
"def",
"_filtering_step",
"(",
"self",
",",
"basename",
")",
":",
"name",
"=",
"''",
".",
"join",
"(",
"basename",
".",
"split",
"(",
"'.'",
")",
"[",
":",
"-",
"1",
"]",
")",
"# May cause problems if wav is not less than 9 channels.",
"if",
"basename",
".",
"split",
"(",
"'.'",
")",
"[",
"-",
"1",
"]",
"==",
"\"wav\"",
":",
"if",
"self",
".",
"get_verbosity",
"(",
")",
":",
"print",
"(",
"\"Found wave! Copying to {}/filtered/{}\"",
".",
"format",
"(",
"self",
".",
"src_dir",
",",
"basename",
")",
")",
"subprocess",
".",
"Popen",
"(",
"[",
"\"cp\"",
",",
"\"{}/{}.wav\"",
".",
"format",
"(",
"self",
".",
"src_dir",
",",
"name",
")",
",",
"\"{}/filtered/{}.wav\"",
".",
"format",
"(",
"self",
".",
"src_dir",
",",
"name",
")",
"]",
",",
"universal_newlines",
"=",
"True",
")",
".",
"communicate",
"(",
")"
] |
Moves the audio file if the format is `wav` to `filtered` directory.
Parameters
----------
basename : str
A basename of `/home/random-guy/some-audio-file.wav` is
`some-audio-file.wav`
|
[
"Moves",
"the",
"audio",
"file",
"if",
"the",
"format",
"is",
"wav",
"to",
"filtered",
"directory",
"."
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L620-L638
|
train
|
This method is called by _filtering_step.
|
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,Awc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ssA8,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(2622 - 2511) + chr(0b10101 + 0o35), ord("\x08")), nzTpIcepk0o8('\x30' + chr(4524 - 4413) + chr(49) + '\061', 0o10), nzTpIcepk0o8('\060' + chr(7754 - 7643) + '\x32' + chr(0b10010 + 0o44), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + chr(0b110011) + chr(54), 0b1000), nzTpIcepk0o8(chr(315 - 267) + '\x6f' + chr(0b101101 + 0o6) + chr(0b101001 + 0o13) + chr(2524 - 2472), 0b1000), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\x6f' + chr(2394 - 2344) + chr(0b110000 + 0o3) + '\x36', 45410 - 45402), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + chr(0b110100) + '\x35', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1521 - 1470) + chr(51) + '\060', 9129 - 9121), nzTpIcepk0o8('\x30' + '\157' + '\x33' + chr(0b110111) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1101 + 0o142) + '\062' + chr(0b1001 + 0o52) + chr(50), 20903 - 20895), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + chr(1282 - 1230) + '\x35', 8), nzTpIcepk0o8(chr(1566 - 1518) + '\157' + chr(0b110010) + chr(2279 - 2229) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(242 - 131) + chr(1174 - 1123) + chr(0b100000 + 0o27) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + chr(49) + chr(0b110000) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1000110 + 0o51) + '\063' + '\063' + chr(0b1111 + 0o42), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + chr(2327 - 2272) + chr(2114 - 2064), ord("\x08")), nzTpIcepk0o8(chr(1103 - 1055) + chr(10954 - 10843) + '\x33' + chr(0b1 + 0o64), ord("\x08")), nzTpIcepk0o8(chr(447 - 399) + chr(0b11101 + 0o122) + chr(2207 - 2158) + chr(0b110010) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1011000 + 0o27) + chr(0b100100 + 0o16) + chr(0b1111 + 0o41) + chr(0b100001 + 0o23), 23977 - 23969), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\x6f' + chr(0b110011) + chr(1681 - 1632) + chr(1024 - 972), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + '\x34' + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x32' + chr(370 - 320) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(0b100111 + 0o16) + chr(1284 - 1234), 8872 - 8864), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(9988 - 9877) + chr(0b1011 + 0o46) + '\x37' + '\x35', 38199 - 38191), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001 + 0o2) + '\061', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b101001 + 0o12) + chr(2332 - 2283) + chr(1160 - 1106), 32984 - 32976), nzTpIcepk0o8(chr(646 - 598) + '\157' + '\x33' + chr(51) + chr(0b1101 + 0o44), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1356 - 1305) + chr(1350 - 1295) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(7015 - 6904) + chr(0b1011 + 0o53) + chr(2320 - 2265), 0o10), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(111) + '\x33' + '\x37' + '\065', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + chr(574 - 522) + chr(49), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\x37' + '\065', 9124 - 9116), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010) + chr(53) + '\x36', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + chr(0b11000 + 0o35) + '\061', 40630 - 40622), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b111101 + 0o62) + chr(49) + chr(0b11110 + 0o27) + chr(50), 8), nzTpIcepk0o8('\060' + '\157' + chr(49) + chr(1047 - 995) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b10110 + 0o131) + '\064' + chr(2267 - 2213), 0o10), nzTpIcepk0o8(chr(86 - 38) + chr(0b100101 + 0o112) + '\067' + chr(48), 32470 - 32462)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x35' + '\060', 32077 - 32069)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b','), chr(7055 - 6955) + chr(101) + chr(7501 - 7402) + chr(0b1101111) + chr(661 - 561) + '\x65')(chr(117) + chr(0b11110 + 0o126) + '\x66' + chr(45) + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def _1_MXRdjRbdN(hXMPsSrOQzbh, pLvIyXSV7qW5):
SLVB2BPA_mIe = roI3spqORKae(ES5oEprVxulp(b''), chr(3514 - 3414) + chr(9756 - 9655) + chr(99) + '\x6f' + '\x64' + chr(1245 - 1144))(chr(5843 - 5726) + chr(0b1011 + 0o151) + '\x66' + chr(0b101101) + '\x38').Y4yM9BcfTCNq(pLvIyXSV7qW5.LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b','), '\144' + chr(0b11 + 0o142) + chr(0b100 + 0o137) + chr(790 - 679) + chr(0b1100100) + chr(101))(chr(3476 - 3359) + chr(0b1101110 + 0o6) + chr(7423 - 7321) + '\055' + chr(56)))[:-nzTpIcepk0o8('\x30' + '\x6f' + '\x31', 52305 - 52297)])
if roI3spqORKae(pLvIyXSV7qW5, roI3spqORKae(ES5oEprVxulp(b'NoD\xac\xb5\xd1c\x10\x9c\x8c\xf4&'), chr(2313 - 2213) + chr(101) + chr(99) + chr(111) + chr(100) + chr(1294 - 1193))(chr(117) + chr(116) + chr(0b11000 + 0o116) + chr(0b100010 + 0o13) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b','), '\144' + chr(101) + '\143' + chr(0b11100 + 0o123) + chr(10000 - 9900) + '\145')(chr(6309 - 6192) + chr(0b1110100) + '\146' + chr(0b1100 + 0o41) + chr(0b111000)))[-nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31', 8)] == roI3spqORKae(ES5oEprVxulp(b'uh`'), chr(100) + '\x65' + chr(0b110001 + 0o62) + '\157' + '\144' + '\145')(chr(0b1110101) + chr(0b1000001 + 0o63) + chr(0b1100110) + '\x2d' + '\070'):
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'elb\x81\x92\xfbi\x07\xb7\x89\xf3\x11\xe9'), chr(0b11 + 0o141) + chr(0b1011011 + 0o12) + '\x63' + chr(0b1100100 + 0o13) + chr(0b1100100) + chr(4735 - 4634))(chr(117) + chr(3665 - 3549) + chr(0b1100110) + chr(1949 - 1904) + chr(0b111000)))():
v8jsMqaYV6U2(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'Dfc\xb0\x80\xbel\x04\xae\x9f\xbbE\xd3\x934\xa0\xd3s6\xa4\xb8\x8e\xb6\x11\x006\xa8\xb0\x93C\x98\xd3X\xca\x86\x7f\x17'), '\x64' + '\x65' + chr(0b1100011) + '\x6f' + chr(4960 - 4860) + chr(0b1100101))(chr(0b1110101) + chr(0b1010111 + 0o35) + '\146' + chr(45) + chr(56)), roI3spqORKae(ES5oEprVxulp(b's:%\x95\xa3\xad}\n\x89\xa5\xd9/'), '\x64' + chr(0b1100101) + chr(0b1000 + 0o133) + chr(111) + '\x64' + '\x65')(chr(117) + chr(116) + chr(0b0 + 0o146) + chr(0b101101) + '\070'))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'q{u\x81\x80\xf7i'), '\x64' + chr(5381 - 5280) + '\143' + chr(4238 - 4127) + chr(0b1100100) + chr(9256 - 9155))(chr(787 - 670) + chr(0b1010100 + 0o40) + '\x66' + chr(0b101101) + chr(0b111000))), pLvIyXSV7qW5))
roI3spqORKae(eT8Y087E_kfd.Popen([roI3spqORKae(ES5oEprVxulp(b'ay'), chr(0b1010101 + 0o17) + chr(0b101110 + 0o67) + chr(99) + chr(111) + chr(100) + chr(6035 - 5934))('\165' + chr(327 - 211) + chr(0b1100110) + chr(0b101101) + '\070'), roI3spqORKae(ES5oEprVxulp(b'yt9\xa5\x99\xb0l\x04\xae'), chr(0b1100100) + chr(0b101111 + 0o66) + chr(0b111011 + 0o50) + '\x6f' + chr(0b1100100) + chr(0b1100101))('\165' + '\x74' + chr(0b1100110) + '\055' + chr(56)).format(hXMPsSrOQzbh.src_dir, SLVB2BPA_mIe), roI3spqORKae(ES5oEprVxulp(b'yt9\xb8\x8d\xf2o\x00\xaa\x9f\xfeJ\xeb\x81j\xae\xdbk'), '\x64' + '\x65' + chr(6414 - 6315) + '\157' + '\x64' + chr(8887 - 8786))(chr(117) + chr(0b1110100) + '\x66' + '\x2d' + chr(56)).format(hXMPsSrOQzbh.src_dir, SLVB2BPA_mIe)], universal_newlines=nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(4710 - 4599) + chr(0b110000 + 0o1), 8)), roI3spqORKae(ES5oEprVxulp(b'ff \xb4\xd5\xcdJ\x08\xb3\xac\xe8<'), chr(100) + chr(0b111000 + 0o55) + chr(99) + chr(12127 - 12016) + '\144' + chr(7990 - 7889))('\x75' + chr(116) + chr(0b100110 + 0o100) + chr(45) + chr(0b100100 + 0o24)))()
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer._staging_step
|
def _staging_step(self, basename):
"""
Checks the size of audio file, splits it if it's needed to manage api
limit and then moves to `staged` directory while appending `*` to
the end of the filename for self.split_audio_by_duration to replace
it by a number.
Parameters
----------
basename : str
A basename of `/home/random-guy/some-audio-file.wav` is
`some-audio-file.wav`
"""
name = ''.join(basename.split('.')[:-1])
if self.get_mode() == "ibm":
# Checks the file size. It's better to use 95% of the allocated
# size per file since the upper limit is not always respected.
total_size = os.path.getsize("{}/filtered/{}.wav".format(
self.src_dir, name))
if total_size >= self.ibm_api_limit_bytes:
if self.get_verbosity():
print(("{}'s size over API limit ({}). Splitting").format(
name, self.ibm_api_limit_bytes))
self._split_audio_by_size(
"{}/filtered/{}.wav".format(self.src_dir, name),
"{}/staging/{}*.wav".format(self.src_dir, name),
self.ibm_api_limit_bytes * 95 / 100)
else:
if self.get_verbosity():
print("{}'s size is fine. Moving to staging dir'".format(
name))
subprocess.Popen((
"mv {}/filtered/{}.wav {}/staging/{}000.wav").format(
self.src_dir, name, self.src_dir, name),
shell=True,
universal_newlines=True).communicate()
elif self.get_mode() == "cmu":
if self.get_verbosity():
print("Converting {} to a readable wav".format(basename))
ffmpeg = os.path.basename(find_executable("ffmpeg") or
find_executable("avconv"))
if ffmpeg is None:
raise Exception(("Either ffmpeg or avconv is needed. "
"Neither is installed or accessible"))
try:
# ffmpeg log levels:
# https://ffmpeg.org/ffmpeg.html#Generic-options
ffmpeg_log_level = "8" # fatal errors.
if self.get_verbosity():
ffmpeg_log_level = "32" # info `default for ffmpeg`
subprocess.check_call([
str(ffmpeg), "-y", "-i", "{}/filtered/{}.wav".format(
self.src_dir, str(name)), "-acodec", "pcm_s16le",
"-ac", "1", "-ar", "16000", "{}/staging/{}000.wav".format(
self.src_dir, name),
"-v", ffmpeg_log_level], universal_newlines=True)
except subprocess.CalledProcessError as e:
print(e)
if os.path.exists("{}/staging/{}000.wav".format(
self.src_dir, name)):
if self.get_verbosity():
print(("{}/filtered/{} was converted to "
"{}/staging/{}000.wav Now removing the copy of "
"{} in filtered sub directory").format(
self.src_dir, basename,
self.src_dir, name, basename))
subprocess.Popen([
"rm", "{}/filtered/{}".format(self.src_dir, basename)],
universal_newlines=True).communicate()
else:
raise Exception("Something went wrong with ffmpeg conversion!")
|
python
|
def _staging_step(self, basename):
"""
Checks the size of audio file, splits it if it's needed to manage api
limit and then moves to `staged` directory while appending `*` to
the end of the filename for self.split_audio_by_duration to replace
it by a number.
Parameters
----------
basename : str
A basename of `/home/random-guy/some-audio-file.wav` is
`some-audio-file.wav`
"""
name = ''.join(basename.split('.')[:-1])
if self.get_mode() == "ibm":
# Checks the file size. It's better to use 95% of the allocated
# size per file since the upper limit is not always respected.
total_size = os.path.getsize("{}/filtered/{}.wav".format(
self.src_dir, name))
if total_size >= self.ibm_api_limit_bytes:
if self.get_verbosity():
print(("{}'s size over API limit ({}). Splitting").format(
name, self.ibm_api_limit_bytes))
self._split_audio_by_size(
"{}/filtered/{}.wav".format(self.src_dir, name),
"{}/staging/{}*.wav".format(self.src_dir, name),
self.ibm_api_limit_bytes * 95 / 100)
else:
if self.get_verbosity():
print("{}'s size is fine. Moving to staging dir'".format(
name))
subprocess.Popen((
"mv {}/filtered/{}.wav {}/staging/{}000.wav").format(
self.src_dir, name, self.src_dir, name),
shell=True,
universal_newlines=True).communicate()
elif self.get_mode() == "cmu":
if self.get_verbosity():
print("Converting {} to a readable wav".format(basename))
ffmpeg = os.path.basename(find_executable("ffmpeg") or
find_executable("avconv"))
if ffmpeg is None:
raise Exception(("Either ffmpeg or avconv is needed. "
"Neither is installed or accessible"))
try:
# ffmpeg log levels:
# https://ffmpeg.org/ffmpeg.html#Generic-options
ffmpeg_log_level = "8" # fatal errors.
if self.get_verbosity():
ffmpeg_log_level = "32" # info `default for ffmpeg`
subprocess.check_call([
str(ffmpeg), "-y", "-i", "{}/filtered/{}.wav".format(
self.src_dir, str(name)), "-acodec", "pcm_s16le",
"-ac", "1", "-ar", "16000", "{}/staging/{}000.wav".format(
self.src_dir, name),
"-v", ffmpeg_log_level], universal_newlines=True)
except subprocess.CalledProcessError as e:
print(e)
if os.path.exists("{}/staging/{}000.wav".format(
self.src_dir, name)):
if self.get_verbosity():
print(("{}/filtered/{} was converted to "
"{}/staging/{}000.wav Now removing the copy of "
"{} in filtered sub directory").format(
self.src_dir, basename,
self.src_dir, name, basename))
subprocess.Popen([
"rm", "{}/filtered/{}".format(self.src_dir, basename)],
universal_newlines=True).communicate()
else:
raise Exception("Something went wrong with ffmpeg conversion!")
|
[
"def",
"_staging_step",
"(",
"self",
",",
"basename",
")",
":",
"name",
"=",
"''",
".",
"join",
"(",
"basename",
".",
"split",
"(",
"'.'",
")",
"[",
":",
"-",
"1",
"]",
")",
"if",
"self",
".",
"get_mode",
"(",
")",
"==",
"\"ibm\"",
":",
"# Checks the file size. It's better to use 95% of the allocated",
"# size per file since the upper limit is not always respected.",
"total_size",
"=",
"os",
".",
"path",
".",
"getsize",
"(",
"\"{}/filtered/{}.wav\"",
".",
"format",
"(",
"self",
".",
"src_dir",
",",
"name",
")",
")",
"if",
"total_size",
">=",
"self",
".",
"ibm_api_limit_bytes",
":",
"if",
"self",
".",
"get_verbosity",
"(",
")",
":",
"print",
"(",
"(",
"\"{}'s size over API limit ({}). Splitting\"",
")",
".",
"format",
"(",
"name",
",",
"self",
".",
"ibm_api_limit_bytes",
")",
")",
"self",
".",
"_split_audio_by_size",
"(",
"\"{}/filtered/{}.wav\"",
".",
"format",
"(",
"self",
".",
"src_dir",
",",
"name",
")",
",",
"\"{}/staging/{}*.wav\"",
".",
"format",
"(",
"self",
".",
"src_dir",
",",
"name",
")",
",",
"self",
".",
"ibm_api_limit_bytes",
"*",
"95",
"/",
"100",
")",
"else",
":",
"if",
"self",
".",
"get_verbosity",
"(",
")",
":",
"print",
"(",
"\"{}'s size is fine. Moving to staging dir'\"",
".",
"format",
"(",
"name",
")",
")",
"subprocess",
".",
"Popen",
"(",
"(",
"\"mv {}/filtered/{}.wav {}/staging/{}000.wav\"",
")",
".",
"format",
"(",
"self",
".",
"src_dir",
",",
"name",
",",
"self",
".",
"src_dir",
",",
"name",
")",
",",
"shell",
"=",
"True",
",",
"universal_newlines",
"=",
"True",
")",
".",
"communicate",
"(",
")",
"elif",
"self",
".",
"get_mode",
"(",
")",
"==",
"\"cmu\"",
":",
"if",
"self",
".",
"get_verbosity",
"(",
")",
":",
"print",
"(",
"\"Converting {} to a readable wav\"",
".",
"format",
"(",
"basename",
")",
")",
"ffmpeg",
"=",
"os",
".",
"path",
".",
"basename",
"(",
"find_executable",
"(",
"\"ffmpeg\"",
")",
"or",
"find_executable",
"(",
"\"avconv\"",
")",
")",
"if",
"ffmpeg",
"is",
"None",
":",
"raise",
"Exception",
"(",
"(",
"\"Either ffmpeg or avconv is needed. \"",
"\"Neither is installed or accessible\"",
")",
")",
"try",
":",
"# ffmpeg log levels:",
"# https://ffmpeg.org/ffmpeg.html#Generic-options",
"ffmpeg_log_level",
"=",
"\"8\"",
"# fatal errors.",
"if",
"self",
".",
"get_verbosity",
"(",
")",
":",
"ffmpeg_log_level",
"=",
"\"32\"",
"# info `default for ffmpeg`",
"subprocess",
".",
"check_call",
"(",
"[",
"str",
"(",
"ffmpeg",
")",
",",
"\"-y\"",
",",
"\"-i\"",
",",
"\"{}/filtered/{}.wav\"",
".",
"format",
"(",
"self",
".",
"src_dir",
",",
"str",
"(",
"name",
")",
")",
",",
"\"-acodec\"",
",",
"\"pcm_s16le\"",
",",
"\"-ac\"",
",",
"\"1\"",
",",
"\"-ar\"",
",",
"\"16000\"",
",",
"\"{}/staging/{}000.wav\"",
".",
"format",
"(",
"self",
".",
"src_dir",
",",
"name",
")",
",",
"\"-v\"",
",",
"ffmpeg_log_level",
"]",
",",
"universal_newlines",
"=",
"True",
")",
"except",
"subprocess",
".",
"CalledProcessError",
"as",
"e",
":",
"print",
"(",
"e",
")",
"if",
"os",
".",
"path",
".",
"exists",
"(",
"\"{}/staging/{}000.wav\"",
".",
"format",
"(",
"self",
".",
"src_dir",
",",
"name",
")",
")",
":",
"if",
"self",
".",
"get_verbosity",
"(",
")",
":",
"print",
"(",
"(",
"\"{}/filtered/{} was converted to \"",
"\"{}/staging/{}000.wav Now removing the copy of \"",
"\"{} in filtered sub directory\"",
")",
".",
"format",
"(",
"self",
".",
"src_dir",
",",
"basename",
",",
"self",
".",
"src_dir",
",",
"name",
",",
"basename",
")",
")",
"subprocess",
".",
"Popen",
"(",
"[",
"\"rm\"",
",",
"\"{}/filtered/{}\"",
".",
"format",
"(",
"self",
".",
"src_dir",
",",
"basename",
")",
"]",
",",
"universal_newlines",
"=",
"True",
")",
".",
"communicate",
"(",
")",
"else",
":",
"raise",
"Exception",
"(",
"\"Something went wrong with ffmpeg conversion!\"",
")"
] |
Checks the size of audio file, splits it if it's needed to manage api
limit and then moves to `staged` directory while appending `*` to
the end of the filename for self.split_audio_by_duration to replace
it by a number.
Parameters
----------
basename : str
A basename of `/home/random-guy/some-audio-file.wav` is
`some-audio-file.wav`
|
[
"Checks",
"the",
"size",
"of",
"audio",
"file",
"splits",
"it",
"if",
"it",
"s",
"needed",
"to",
"manage",
"api",
"limit",
"and",
"then",
"moves",
"to",
"staged",
"directory",
"while",
"appending",
"*",
"to",
"the",
"end",
"of",
"the",
"filename",
"for",
"self",
".",
"split_audio_by_duration",
"to",
"replace",
"it",
"by",
"a",
"number",
"."
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L640-L712
|
train
|
This function is called by the main stage of the staging process.
|
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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NF,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) + '\x32' + '\066', 4593 - 4585), nzTpIcepk0o8(chr(48) + chr(0b11 + 0o154) + chr(50) + chr(0b10010 + 0o40) + chr(54), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(53) + '\x35', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(50) + '\062', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(0b110011) + chr(2281 - 2233), 0o10), nzTpIcepk0o8('\060' + chr(4378 - 4267) + chr(383 - 331) + chr(0b101100 + 0o10), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1730 - 1678) + '\060', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10010 + 0o40) + chr(0b100000 + 0o24) + chr(0b10101 + 0o37), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b110111 + 0o70) + '\x31' + chr(0b1110 + 0o47) + '\066', 45960 - 45952), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + '\062' + chr(356 - 308), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + chr(565 - 517) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + '\061' + '\061', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(49) + '\062', 0o10), nzTpIcepk0o8(chr(1748 - 1700) + chr(0b1101111) + '\x34' + '\060', 8), nzTpIcepk0o8('\x30' + chr(0b1101010 + 0o5) + chr(2471 - 2420) + chr(0b110010) + '\x32', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + '\x35' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(0b110111) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b100100 + 0o113) + chr(1602 - 1552), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(2539 - 2486) + chr(0b110110), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b111010 + 0o65) + chr(0b110011) + chr(50) + chr(107 - 56), 18164 - 18156), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(1180 - 1128), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(708 - 660), 0b1000), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\x6f' + chr(51) + '\064' + '\065', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(2006 - 1957) + chr(50) + chr(0b11000 + 0o36), 6345 - 6337), nzTpIcepk0o8(chr(318 - 270) + chr(0b1101111) + '\x32' + '\x30' + chr(0b110010), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b1101111) + '\064' + chr(0b10011 + 0o44), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(51) + chr(0b11110 + 0o22) + chr(0b11111 + 0o21), 27464 - 27456), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b100001 + 0o22) + '\x32' + '\x32', 8), nzTpIcepk0o8(chr(1580 - 1532) + chr(7930 - 7819) + chr(1062 - 1013) + chr(51) + chr(0b110101), 57628 - 57620), nzTpIcepk0o8('\x30' + '\x6f' + chr(51) + chr(2329 - 2274) + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(498 - 387) + '\x31' + chr(52) + chr(301 - 250), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + '\x30' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + '\064' + chr(50), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(783 - 733) + chr(0b110100) + '\067', 0o10), nzTpIcepk0o8(chr(404 - 356) + chr(111) + chr(54) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1101111) + chr(51) + chr(0b110001) + chr(0b110001 + 0o5), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(1892 - 1841) + '\x35' + '\064', 3845 - 3837), nzTpIcepk0o8('\x30' + chr(768 - 657) + '\x31' + '\065', 4004 - 3996), nzTpIcepk0o8(chr(48) + chr(0b1101100 + 0o3) + chr(0b101 + 0o56) + chr(54) + chr(52), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(380 - 332) + chr(12210 - 12099) + chr(0b110101) + chr(0b101011 + 0o5), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'8'), chr(2682 - 2582) + chr(0b1100101) + '\x63' + '\x6f' + '\144' + '\145')(chr(12552 - 12435) + chr(0b1110100) + chr(3483 - 3381) + chr(0b11101 + 0o20) + chr(2412 - 2356)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def _8r4XLdNyEOH(hXMPsSrOQzbh, pLvIyXSV7qW5):
SLVB2BPA_mIe = roI3spqORKae(ES5oEprVxulp(b''), '\144' + '\x65' + chr(0b1000100 + 0o37) + chr(0b1011011 + 0o24) + chr(2997 - 2897) + '\x65')(chr(0b110 + 0o157) + '\164' + chr(102) + chr(0b101101) + '\070').Y4yM9BcfTCNq(pLvIyXSV7qW5.LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b'8'), chr(100) + chr(5289 - 5188) + chr(2497 - 2398) + '\x6f' + chr(0b10 + 0o142) + chr(101))('\165' + chr(116) + chr(8933 - 8831) + chr(478 - 433) + '\070'))[:-nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b1110 + 0o43), 0o10)])
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'q\xf3Y\r5KD\xc1'), chr(0b1001100 + 0o30) + chr(1373 - 1272) + chr(99) + chr(0b1101111) + chr(0b1100100) + '\145')('\165' + chr(10988 - 10872) + chr(10205 - 10103) + chr(45) + '\x38'))() == roI3spqORKae(ES5oEprVxulp(b'\x7f\xf4@'), '\144' + chr(101) + chr(0b1100010 + 0o1) + chr(12044 - 11933) + '\144' + '\145')(chr(12017 - 11900) + chr(8595 - 8479) + '\146' + chr(1964 - 1919) + chr(0b111000)):
Noy3xbqUPU67 = aHUqKstZLeS6.path.getsize(roI3spqORKae(ES5oEprVxulp(b'm\xeb\x0241HT\xc1\x1c\xb5 f1]\xfc\x18\x18t'), chr(0b1001111 + 0o25) + chr(101) + chr(0b1100011) + chr(10898 - 10787) + '\x64' + chr(101))(chr(117) + chr(0b1011010 + 0o32) + '\146' + chr(45) + '\070').q33KG3foQ_CJ(hXMPsSrOQzbh.src_dir, SLVB2BPA_mIe))
if Noy3xbqUPU67 >= roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x7f\xf4@\r9TI\xfb\x02\xb9) >\x7f\xb0\x16\rg\x1d'), '\x64' + chr(0b0 + 0o145) + chr(0b1000000 + 0o43) + chr(0b1100001 + 0o16) + chr(0b1100100) + chr(101))('\x75' + chr(0b1110100) + chr(7690 - 7588) + '\x2d' + chr(56))):
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'q\xf3Y\r.AR\xc6\x01\xa3-=3'), chr(1669 - 1569) + chr(9994 - 9893) + chr(99) + chr(4187 - 4076) + chr(0b111001 + 0o53) + '\x65')(chr(0b1110100 + 0o1) + '\x74' + '\146' + chr(569 - 524) + chr(56)))():
v8jsMqaYV6U2(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'm\xeb\n!xWI\xde\x0b\xf0+?/R\xf2.)KN\xbfe}\x8c"\xa2!\\\xbd\xfbs\xdf0\xb2\xce\xceD\xba\x85c\x93'), chr(100) + chr(3062 - 2961) + chr(5282 - 5183) + chr(0b1101111) + '\144' + chr(0b1100101))(chr(117) + '\x74' + '\146' + chr(0b101101) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'g\xa5\x1e\x19\x1f\x17F\xcb?\x8f\x07\x03'), chr(0b1111 + 0o125) + '\145' + chr(0b1001000 + 0o33) + '\157' + chr(0b11000 + 0o114) + chr(101))(chr(0b1110101) + '\164' + chr(3858 - 3756) + chr(1893 - 1848) + '\070'))(SLVB2BPA_mIe, roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x7f\xf4@\r9TI\xfb\x02\xb9) >\x7f\xb0\x16\rg\x1d'), chr(0b1100100) + chr(0b1001101 + 0o30) + chr(99) + '\x6f' + chr(0b110010 + 0o62) + chr(0b1100101))(chr(117) + '\164' + '\146' + '\x2d' + chr(0b111000)))))
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'I\xe5]>1P\x7f\xc5\x1b\xb4-&\x15B\xab0\nk\x14\xb6'), chr(9479 - 9379) + '\x65' + '\143' + '\157' + chr(7394 - 7294) + '\x65')('\165' + chr(0b1110100) + chr(0b1100110) + chr(0b101001 + 0o4) + chr(0b110100 + 0o4)))(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'm\xeb\x0241HT\xc1\x1c\xb5 f1]\xfc\x18\x18t'), chr(0b101111 + 0o65) + chr(0b1100101) + chr(99) + '\157' + chr(0b1010 + 0o132) + chr(101))(chr(117) + chr(12199 - 12083) + '\146' + '\055' + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'g\xa5\x1e\x19\x1f\x17F\xcb?\x8f\x07\x03'), chr(3726 - 3626) + chr(8193 - 8092) + chr(0b100000 + 0o103) + chr(8327 - 8216) + chr(0b1100100) + '\x65')('\165' + chr(9584 - 9468) + '\x66' + chr(0b101101) + chr(0b111000)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'e\xe4N\r<MR'), chr(0b1100100) + '\145' + chr(0b1000000 + 0o43) + chr(0b1101111) + chr(0b1011010 + 0o12) + chr(2958 - 2857))('\165' + chr(2666 - 2550) + chr(0b1100110) + '\x2d' + chr(489 - 433))), SLVB2BPA_mIe), roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'm\xeb\x02!,EG\xcd\x00\xb7k27\n\xfc\x18\x18t'), chr(6692 - 6592) + '\x65' + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(9808 - 9707))('\165' + '\x74' + '\146' + chr(0b10111 + 0o26) + chr(0b100000 + 0o30)), roI3spqORKae(ES5oEprVxulp(b'g\xa5\x1e\x19\x1f\x17F\xcb?\x8f\x07\x03'), chr(0b11110 + 0o106) + '\145' + chr(9788 - 9689) + chr(0b111100 + 0o63) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(102) + '\x2d' + chr(0b110 + 0o62)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'e\xe4N\r<MR'), '\144' + '\x65' + chr(99) + chr(111) + chr(100) + '\x65')('\x75' + '\164' + chr(102) + chr(661 - 616) + '\070')), SLVB2BPA_mIe), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x7f\xf4@\r9TI\xfb\x02\xb9) >\x7f\xb0\x16\rg\x1d'), chr(2483 - 2383) + chr(6208 - 6107) + chr(0b1100011) + chr(111) + chr(100) + chr(0b100010 + 0o103))(chr(0b101 + 0o160) + '\x74' + chr(0b110110 + 0o60) + chr(0b101101) + '\070')) * nzTpIcepk0o8('\060' + chr(0b1101110 + 0o1) + chr(0b110001) + chr(0b110011) + '\067', 45733 - 45725) / nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b100000 + 0o117) + '\x31' + chr(268 - 216) + chr(52), ord("\x08")))
else:
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'q\xf3Y\r.AR\xc6\x01\xa3-=3'), chr(100) + '\145' + '\143' + chr(111) + chr(100) + '\x65')('\165' + '\x74' + chr(9530 - 9428) + chr(0b101101) + '\070'))():
v8jsMqaYV6U2(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'm\xeb\n!xWI\xde\x0b\xf0-:jF\xbb\x01\x1c,N\x9ecf\x8c8\xe5)S\xaf\xf2.\x8b\x02\xa5\xcb\xc9W\xee\x88d\x861'), chr(7141 - 7041) + chr(7429 - 7328) + chr(0b1100011) + chr(111) + chr(100) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b1100110) + chr(0b101011 + 0o2) + '\070'), roI3spqORKae(ES5oEprVxulp(b'g\xa5\x1e\x19\x1f\x17F\xcb?\x8f\x07\x03'), chr(0b1001000 + 0o34) + '\145' + '\x63' + chr(0b110001 + 0o76) + chr(193 - 93) + '\x65')('\165' + chr(0b1001001 + 0o53) + chr(0b101011 + 0o73) + chr(0b101101) + chr(1155 - 1099)))(SLVB2BPA_mIe))
roI3spqORKae(eT8Y087E_kfd.Popen(roI3spqORKae(ES5oEprVxulp(b'{\xe0\r)%\x0bF\xcd\x02\xa4!;/D\xfd\x14\x04,\x19\xb2z0\x9e+\xadzS\xa1\xb54\x91\x04\xed\xd9\xda\x00\xfe\xdc#\x83w\xe0'), '\x64' + chr(0b1100101) + chr(99) + chr(0b1010010 + 0o35) + '\144' + chr(0b110101 + 0o60))(chr(117) + chr(116) + chr(1669 - 1567) + '\055' + chr(0b111000)).format(hXMPsSrOQzbh.src_dir, SLVB2BPA_mIe, hXMPsSrOQzbh.src_dir, SLVB2BPA_mIe), shell=nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061', 8), universal_newlines=nzTpIcepk0o8(chr(2141 - 2093) + chr(6473 - 6362) + '\061', 8)), roI3spqORKae(ES5oEprVxulp(b'r\xf9\x1b8iwq\xc9\x05\x866\x10'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(0b11011 + 0o124) + chr(0b1100 + 0o130) + chr(101))(chr(0b1110101) + '\164' + chr(102) + chr(0b101101) + chr(2310 - 2254)))()
elif roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'q\xf3Y\r5KD\xc1'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(11340 - 11229) + chr(0b1100100) + chr(0b1100101))('\x75' + '\x74' + chr(7099 - 6997) + chr(0b10101 + 0o30) + chr(56)))() == roI3spqORKae(ES5oEprVxulp(b'u\xfbX'), '\144' + '\145' + '\143' + chr(6431 - 6320) + '\x64' + chr(101))(chr(9157 - 9040) + '\x74' + '\146' + chr(0b110 + 0o47) + chr(0b100 + 0o64)):
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'q\xf3Y\r.AR\xc6\x01\xa3-=3'), chr(100) + chr(0b1100101) + chr(0b111 + 0o134) + chr(7567 - 7456) + chr(3915 - 3815) + chr(6571 - 6470))(chr(0b1110101) + chr(7435 - 7319) + '\x66' + chr(45) + '\070'))():
v8jsMqaYV6U2(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'U\xf9C$=VT\xcd\x00\xb7d27\x00\xa6\x00YcN\xa1iq\x817\xe0eB\xe0\xa5<\x89'), chr(100) + '\145' + chr(99) + chr(0b1101111) + '\x64' + '\x65')(chr(117) + '\x74' + chr(4658 - 4556) + chr(0b101101) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'g\xa5\x1e\x19\x1f\x17F\xcb?\x8f\x07\x03'), chr(3543 - 3443) + '\x65' + chr(0b101011 + 0o70) + chr(0b110111 + 0o70) + chr(0b110 + 0o136) + chr(4885 - 4784))('\165' + chr(0b1000000 + 0o64) + chr(102) + chr(45) + '\070'))(pLvIyXSV7qW5))
yk5L3HsG1ORP = aHUqKstZLeS6.path.pLvIyXSV7qW5(PckQpiqj3Elr(roI3spqORKae(ES5oEprVxulp(b'p\xf0@"=C'), chr(7808 - 7708) + chr(101) + chr(99) + '\x6f' + '\x64' + chr(334 - 233))('\x75' + chr(116) + chr(0b1100110) + '\x2d' + '\x38')) or PckQpiqj3Elr(roI3spqORKae(ES5oEprVxulp(b'w\xe0N=6R'), chr(0b110110 + 0o56) + chr(8852 - 8751) + '\x63' + '\x6f' + chr(0b101100 + 0o70) + chr(101))(chr(0b1101010 + 0o13) + chr(116) + chr(102) + chr(0b11 + 0o52) + chr(56))))
if yk5L3HsG1ORP is None:
raise zfo2Sgkz3IVJ(roI3spqORKae(ES5oEprVxulp(b'S\xffY:=V\x00\xc2\x08\xbd4,-\x00\xbd\x1dYc\x18\xb0c~\x93v\xebz\x07\xae\xb78\x9b\x06\xa6\x8c\x87~\xab\x85y\x9cs\xe4\r;+\x04I\xca\x1d\xa4%%&E\xb6O\x16pN\xb2os\x80%\xf1`E\xac\xb7'), chr(1670 - 1570) + chr(1186 - 1085) + '\143' + chr(111) + chr(100) + chr(101))('\165' + '\x74' + chr(102) + chr(177 - 132) + chr(0b111000)))
try:
V_7TvfOsO1VO = roI3spqORKae(ES5oEprVxulp(b'.'), chr(0b1111 + 0o125) + chr(1610 - 1509) + chr(0b1100011) + '\157' + chr(100) + chr(0b100011 + 0o102))(chr(0b1110101) + '\x74' + chr(102) + '\x2d' + '\070')
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'q\xf3Y\r.AR\xc6\x01\xa3-=3'), '\144' + '\145' + chr(0b1100011) + '\x6f' + chr(0b100011 + 0o101) + chr(0b1100101))('\165' + '\x74' + chr(0b1100110) + chr(0b10100 + 0o31) + chr(0b11 + 0o65)))():
V_7TvfOsO1VO = roI3spqORKae(ES5oEprVxulp(b'%\xa4'), '\x64' + '\145' + chr(0b1100011) + chr(6016 - 5905) + chr(100) + chr(101))('\165' + '\x74' + chr(0b101111 + 0o67) + chr(45) + chr(56))
roI3spqORKae(eT8Y087E_kfd, roI3spqORKae(ES5oEprVxulp(b'u\xfeH13{C\xc5\x02\xbc'), '\x64' + '\145' + chr(7737 - 7638) + chr(0b100111 + 0o110) + '\x64' + chr(0b1100101))('\x75' + chr(116) + '\146' + chr(45) + chr(2984 - 2928)))([N9zlRy29S1SS(yk5L3HsG1ORP), roI3spqORKae(ES5oEprVxulp(b';\xef'), chr(100) + chr(6663 - 6562) + chr(0b1100011) + '\x6f' + '\x64' + chr(7625 - 7524))(chr(0b1110101) + chr(0b1010011 + 0o41) + '\146' + '\x2d' + chr(1903 - 1847)), roI3spqORKae(ES5oEprVxulp(b';\xff'), '\x64' + '\x65' + chr(99) + chr(0b1101111) + '\x64' + chr(5974 - 5873))(chr(4812 - 4695) + '\164' + '\146' + chr(0b1111 + 0o36) + chr(56)), roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'm\xeb\x0241HT\xc1\x1c\xb5 f1]\xfc\x18\x18t'), chr(0b1100100) + chr(101) + '\143' + '\157' + '\144' + '\x65')('\165' + chr(0b11101 + 0o127) + chr(102) + chr(1763 - 1718) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'g\xa5\x1e\x19\x1f\x17F\xcb?\x8f\x07\x03'), '\144' + chr(0b1100101) + chr(6115 - 6016) + chr(0b1101111) + chr(1897 - 1797) + '\145')('\x75' + chr(1822 - 1706) + '\x66' + chr(45) + chr(2161 - 2105)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'e\xe4N\r<MR'), '\144' + chr(7568 - 7467) + '\143' + chr(111) + chr(0b110001 + 0o63) + chr(6564 - 6463))(chr(2728 - 2611) + chr(0b1110100) + chr(0b1100110) + chr(0b100110 + 0o7) + '\x38')), N9zlRy29S1SS(SLVB2BPA_mIe)), roI3spqORKae(ES5oEprVxulp(b';\xf7N=<AC'), chr(100) + chr(101) + chr(0b1001111 + 0o24) + chr(111) + chr(0b1001011 + 0o31) + '\x65')('\165' + '\x74' + chr(8156 - 8054) + chr(609 - 564) + chr(3112 - 3056)), roI3spqORKae(ES5oEprVxulp(b'f\xf5@\r+\x15\x16\xc8\x0b'), '\x64' + chr(0b1100101) + '\x63' + '\157' + chr(4596 - 4496) + '\145')(chr(3150 - 3033) + chr(116) + '\146' + '\x2d' + '\070'), roI3spqORKae(ES5oEprVxulp(b';\xf7N'), chr(0b1100100) + chr(4444 - 4343) + chr(0b1100011) + '\x6f' + chr(100) + chr(0b1100 + 0o131))(chr(117) + '\164' + chr(0b1100110) + chr(0b101101) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b"'"), chr(1816 - 1716) + '\145' + chr(0b110001 + 0o62) + chr(0b110001 + 0o76) + '\x64' + chr(0b1100101))(chr(2305 - 2188) + '\x74' + '\x66' + chr(0b1011 + 0o42) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b';\xf7_'), '\x64' + chr(1571 - 1470) + chr(0b11001 + 0o112) + chr(8275 - 8164) + chr(100) + chr(0b101111 + 0o66))(chr(0b1110101) + '\164' + chr(344 - 242) + '\055' + chr(56)), roI3spqORKae(ES5oEprVxulp(b"'\xa0\x1dbh"), chr(7365 - 7265) + chr(0b1100101) + chr(0b1100011) + chr(2007 - 1896) + chr(8275 - 8175) + '\145')('\x75' + '\x74' + chr(0b100 + 0o142) + chr(0b1 + 0o54) + '\070'), roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'm\xeb\x02!,EG\xcd\x00\xb7k27\x10\xe2_Wu\x0f\xa5'), chr(0b1100010 + 0o2) + chr(484 - 383) + '\x63' + chr(4066 - 3955) + chr(0b1100100) + chr(2908 - 2807))(chr(117) + '\164' + '\146' + chr(0b1100 + 0o41) + chr(1240 - 1184)), roI3spqORKae(ES5oEprVxulp(b'g\xa5\x1e\x19\x1f\x17F\xcb?\x8f\x07\x03'), chr(8358 - 8258) + chr(0b1010 + 0o133) + chr(0b1100011) + chr(111) + chr(0b10001 + 0o123) + '\x65')(chr(0b1110101) + chr(116) + '\146' + chr(0b101101) + chr(0b11001 + 0o37)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'e\xe4N\r<MR'), '\x64' + chr(0b1100101) + chr(4219 - 4120) + '\x6f' + chr(100) + chr(101))(chr(0b1100100 + 0o21) + chr(116) + chr(8736 - 8634) + chr(0b101101) + chr(2492 - 2436))), SLVB2BPA_mIe), roI3spqORKae(ES5oEprVxulp(b';\xe0'), '\144' + '\x65' + chr(5962 - 5863) + chr(0b1101111) + chr(6497 - 6397) + chr(0b1100101))('\165' + '\164' + chr(3978 - 3876) + chr(1018 - 973) + chr(0b110001 + 0o7)), V_7TvfOsO1VO], universal_newlines=nzTpIcepk0o8(chr(48) + chr(111) + chr(49), 8))
except roI3spqORKae(eT8Y087E_kfd, roI3spqORKae(ES5oEprVxulp(b'U\xf7A>=@p\xd6\x01\xb3!:9e\xa0\x1d\x16p'), '\144' + '\x65' + '\143' + chr(0b1101111) + '\x64' + chr(6117 - 6016))(chr(117) + chr(0b1110100) + '\146' + chr(45) + '\x38')) as wgf0sgcu_xPL:
v8jsMqaYV6U2(wgf0sgcu_xPL)
if roI3spqORKae(aHUqKstZLeS6.path, roI3spqORKae(ES5oEprVxulp(b'l\xc5d+6tU\xe1\x18\xbc\x15}'), chr(4941 - 4841) + chr(0b1100101) + chr(0b1001110 + 0o25) + chr(111) + chr(0b11111 + 0o105) + chr(0b1000011 + 0o42))(chr(8458 - 8341) + chr(8787 - 8671) + chr(102) + '\x2d' + chr(56)))(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'm\xeb\x02!,EG\xcd\x00\xb7k27\x10\xe2_Wu\x0f\xa5'), '\144' + chr(101) + '\143' + '\157' + chr(0b1100100) + '\145')('\x75' + chr(0b1110100) + '\146' + chr(0b10010 + 0o33) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'g\xa5\x1e\x19\x1f\x17F\xcb?\x8f\x07\x03'), chr(2790 - 2690) + chr(0b10001 + 0o124) + chr(0b1011011 + 0o10) + '\x6f' + chr(8023 - 7923) + '\x65')('\x75' + chr(0b1110100) + '\x66' + chr(98 - 53) + chr(413 - 357)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'e\xe4N\r<MR'), '\144' + '\145' + '\143' + chr(111) + '\x64' + chr(0b100110 + 0o77))('\165' + chr(0b1110100) + chr(0b1100110) + chr(0b1 + 0o54) + chr(56))), SLVB2BPA_mIe)):
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'q\xf3Y\r.AR\xc6\x01\xa3-=3'), chr(8550 - 8450) + chr(6822 - 6721) + chr(265 - 166) + chr(0b11110 + 0o121) + chr(100) + '\145')(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(45) + chr(2708 - 2652)))():
v8jsMqaYV6U2(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'm\xeb\x0241HT\xc1\x1c\xb5 f1]\xf2\x18\x18qN\xb0c~\x933\xf0}B\xa4\xf2)\x90C\xb9\xdf\x88C\xba\x8dj\x9dx\xf1\x02)%\x14\x10\x94@\xa7%?jn\xbd\x18Yp\x0b\xbecf\x8c8\xe5)S\xa8\xb7}\x9c\x0c\xb2\xdb\x87_\xa8\xccv\x896\xffCr>ML\xd0\x0b\xa2!-jS\xa7\rYf\x07\xa1is\x919\xf0p'), chr(0b1100000 + 0o4) + '\x65' + chr(7188 - 7089) + chr(7859 - 7748) + '\144' + chr(0b111111 + 0o46))(chr(0b1110101) + chr(2724 - 2608) + '\x66' + '\055' + chr(56)), roI3spqORKae(ES5oEprVxulp(b'g\xa5\x1e\x19\x1f\x17F\xcb?\x8f\x07\x03'), '\144' + chr(101) + chr(0b1100011) + chr(0b1101110 + 0o1) + chr(5292 - 5192) + chr(0b1100101))('\165' + chr(0b1110100) + chr(8578 - 8476) + chr(0b1001 + 0o44) + chr(0b111000)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'e\xe4N\r<MR'), chr(100) + chr(4834 - 4733) + chr(99) + chr(7083 - 6972) + chr(0b1100100) + chr(7576 - 7475))('\165' + chr(0b1110100) + chr(0b1100110) + chr(1134 - 1089) + chr(0b111000))), pLvIyXSV7qW5, roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'e\xe4N\r<MR'), chr(9830 - 9730) + chr(8872 - 8771) + '\143' + '\x6f' + chr(100) + '\x65')(chr(117) + chr(0b111 + 0o155) + chr(3353 - 3251) + '\x2d' + chr(2775 - 2719))), SLVB2BPA_mIe, pLvIyXSV7qW5))
roI3spqORKae(eT8Y087E_kfd.Popen([roI3spqORKae(ES5oEprVxulp(b'd\xfb'), '\x64' + '\x65' + chr(0b1011101 + 0o6) + chr(0b1101111) + chr(100) + chr(6875 - 6774))(chr(0b1110101) + '\164' + chr(0b110000 + 0o66) + chr(45) + '\070'), roI3spqORKae(ES5oEprVxulp(b'm\xeb\x0241HT\xc1\x1c\xb5 f1]'), chr(1850 - 1750) + chr(10039 - 9938) + chr(9432 - 9333) + chr(0b1101111) + chr(100) + chr(101))(chr(117) + '\x74' + chr(2826 - 2724) + '\x2d' + chr(2303 - 2247)).format(hXMPsSrOQzbh.src_dir, pLvIyXSV7qW5)], universal_newlines=nzTpIcepk0o8('\x30' + chr(0b100 + 0o153) + chr(49), 8)), roI3spqORKae(ES5oEprVxulp(b'r\xf9\x1b8iwq\xc9\x05\x866\x10'), '\x64' + chr(101) + chr(2597 - 2498) + '\157' + '\144' + '\x65')(chr(0b1110101) + chr(5182 - 5066) + chr(102) + '\x2d' + chr(0b110010 + 0o6)))()
else:
raise zfo2Sgkz3IVJ(roI3spqORKae(ES5oEprVxulp(b'E\xf9@7,LI\xca\t\xf03,$T\xf2\x18\x0bm\x00\xb4,g\x8c"\xea)A\xa6\xbf-\x9a\x04\xe2\xc1\xc8^\xb8\x89\x7f\x87\x7f\xf9Cs'), '\144' + chr(101) + '\x63' + chr(111) + '\x64' + chr(0b1100101))(chr(117) + chr(12968 - 12852) + '\x66' + '\x2d' + chr(56)))
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer._prepare_audio
|
def _prepare_audio(self, basename, replace_already_indexed=False):
"""
Prepares and stages the audio file to be indexed.
Parameters
----------
basename : str, None
A basename of `/home/random-guy/some-audio-file.wav` is
`some-audio-file.wav`
If basename is `None`, it'll prepare all the audio files.
"""
if basename is not None:
if basename in self.get_timestamps():
if self.get_verbosity():
print("File specified was already indexed. Reindexing...")
del self.__timestamps[basename]
self._filtering_step(basename)
self._staging_step(basename)
else:
for audio_basename in self._list_audio_files():
if audio_basename in self.__timestamps:
if replace_already_indexed:
if self.get_verbosity():
print("Already indexed {}. Reindexing...".format(
audio_basename))
del self.__timestamps[audio_basename]
else:
if self.get_verbosity():
print("Already indexed {}. Skipping...".format(
audio_basename))
continue
self._filtering_step(audio_basename)
self._staging_step(audio_basename)
|
python
|
def _prepare_audio(self, basename, replace_already_indexed=False):
"""
Prepares and stages the audio file to be indexed.
Parameters
----------
basename : str, None
A basename of `/home/random-guy/some-audio-file.wav` is
`some-audio-file.wav`
If basename is `None`, it'll prepare all the audio files.
"""
if basename is not None:
if basename in self.get_timestamps():
if self.get_verbosity():
print("File specified was already indexed. Reindexing...")
del self.__timestamps[basename]
self._filtering_step(basename)
self._staging_step(basename)
else:
for audio_basename in self._list_audio_files():
if audio_basename in self.__timestamps:
if replace_already_indexed:
if self.get_verbosity():
print("Already indexed {}. Reindexing...".format(
audio_basename))
del self.__timestamps[audio_basename]
else:
if self.get_verbosity():
print("Already indexed {}. Skipping...".format(
audio_basename))
continue
self._filtering_step(audio_basename)
self._staging_step(audio_basename)
|
[
"def",
"_prepare_audio",
"(",
"self",
",",
"basename",
",",
"replace_already_indexed",
"=",
"False",
")",
":",
"if",
"basename",
"is",
"not",
"None",
":",
"if",
"basename",
"in",
"self",
".",
"get_timestamps",
"(",
")",
":",
"if",
"self",
".",
"get_verbosity",
"(",
")",
":",
"print",
"(",
"\"File specified was already indexed. Reindexing...\"",
")",
"del",
"self",
".",
"__timestamps",
"[",
"basename",
"]",
"self",
".",
"_filtering_step",
"(",
"basename",
")",
"self",
".",
"_staging_step",
"(",
"basename",
")",
"else",
":",
"for",
"audio_basename",
"in",
"self",
".",
"_list_audio_files",
"(",
")",
":",
"if",
"audio_basename",
"in",
"self",
".",
"__timestamps",
":",
"if",
"replace_already_indexed",
":",
"if",
"self",
".",
"get_verbosity",
"(",
")",
":",
"print",
"(",
"\"Already indexed {}. Reindexing...\"",
".",
"format",
"(",
"audio_basename",
")",
")",
"del",
"self",
".",
"__timestamps",
"[",
"audio_basename",
"]",
"else",
":",
"if",
"self",
".",
"get_verbosity",
"(",
")",
":",
"print",
"(",
"\"Already indexed {}. Skipping...\"",
".",
"format",
"(",
"audio_basename",
")",
")",
"continue",
"self",
".",
"_filtering_step",
"(",
"audio_basename",
")",
"self",
".",
"_staging_step",
"(",
"audio_basename",
")"
] |
Prepares and stages the audio file to be indexed.
Parameters
----------
basename : str, None
A basename of `/home/random-guy/some-audio-file.wav` is
`some-audio-file.wav`
If basename is `None`, it'll prepare all the audio files.
|
[
"Prepares",
"and",
"stages",
"the",
"audio",
"file",
"to",
"be",
"indexed",
"."
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L714-L746
|
train
|
Prepare and stages the audio files.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,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,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(48) + '\x6f' + chr(0b110011 + 0o0) + '\x37' + '\061', 0b1000), nzTpIcepk0o8(chr(1018 - 970) + chr(0b1101111) + chr(52) + chr(0b110101), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(2012 - 1964) + chr(9216 - 9105) + '\062' + '\065' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\063' + '\x34' + chr(49), 11162 - 11154), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(49) + chr(50), 50850 - 50842), nzTpIcepk0o8(chr(1577 - 1529) + chr(6773 - 6662) + chr(49) + chr(0b1101 + 0o51) + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b111 + 0o56) + '\x37', 34119 - 34111), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b101110 + 0o3) + '\066' + chr(0b11100 + 0o26), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x31' + chr(2079 - 2024) + chr(0b1101 + 0o44), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1111 + 0o44) + chr(0b1011 + 0o50) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b100000 + 0o23) + chr(52) + chr(2532 - 2478), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001 + 0o0) + chr(189 - 138) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(469 - 421) + chr(0b101010 + 0o105) + '\061' + '\063' + '\064', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1011111 + 0o20) + chr(51) + '\061' + chr(55), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + chr(0b10110 + 0o34) + chr(0b11101 + 0o31), 40261 - 40253), nzTpIcepk0o8(chr(0b11 + 0o55) + '\157' + '\x32' + chr(1764 - 1712) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1101111) + chr(50) + '\x30' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b100000 + 0o117) + chr(0b110010) + chr(0b1100 + 0o53) + chr(0b110100), 25693 - 25685), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + '\067' + chr(53), 64747 - 64739), nzTpIcepk0o8('\x30' + chr(0b10 + 0o155) + chr(50) + chr(0b110111) + '\x30', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1000001 + 0o56) + chr(0b101 + 0o60) + '\063', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(0b11 + 0o63) + chr(1422 - 1371), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + chr(0b10110 + 0o36) + '\066', 0b1000), nzTpIcepk0o8(chr(1354 - 1306) + chr(0b1100001 + 0o16) + '\x31' + '\066' + chr(0b100110 + 0o12), 8), nzTpIcepk0o8('\x30' + chr(1530 - 1419) + chr(0b1101 + 0o44) + chr(0b11000 + 0o31) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(1583 - 1535) + chr(0b11011 + 0o124) + '\x33' + '\062', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + '\066' + chr(0b101011 + 0o12), 17860 - 17852), nzTpIcepk0o8(chr(48) + chr(0b101010 + 0o105) + chr(51) + '\x31' + '\061', 42821 - 42813), nzTpIcepk0o8(chr(213 - 165) + chr(0b1000100 + 0o53) + '\061' + chr(0b110110) + chr(1963 - 1913), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1651 - 1602) + '\061' + chr(1450 - 1399), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10110 + 0o33) + chr(0b11 + 0o62) + '\x32', 59239 - 59231), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + chr(52), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + chr(0b10011 + 0o42) + chr(0b110101 + 0o2), 53886 - 53878), nzTpIcepk0o8(chr(327 - 279) + chr(111) + chr(0b110001) + chr(0b10101 + 0o42) + chr(0b110001 + 0o1), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + chr(0b110110) + chr(0b1000 + 0o51), 57384 - 57376), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(0b110110) + '\x36', 24184 - 24176), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + chr(48) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(1666 - 1618) + chr(0b1101111) + '\x32' + chr(0b10001 + 0o46) + chr(51), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(586 - 537) + chr(1587 - 1532), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b1101111) + '\x35' + chr(48), 43411 - 43403)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd7'), chr(100) + chr(0b1011100 + 0o11) + '\x63' + '\x6f' + '\x64' + chr(0b10000 + 0o125))('\x75' + chr(0b1110100) + chr(102) + chr(1361 - 1316) + chr(2258 - 2202)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def N26Qy1mjuFrO(hXMPsSrOQzbh, pLvIyXSV7qW5, OPx_IY40mhId=nzTpIcepk0o8(chr(48) + chr(2753 - 2642) + '\060', ord("\x08"))):
if pLvIyXSV7qW5 is not None:
if pLvIyXSV7qW5 in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x9e@}\xf1\x95\xa3\x1dJ\x01\r\xba\x8b)/'), '\x64' + chr(6235 - 6134) + '\x63' + '\157' + '\x64' + chr(101))('\165' + chr(116) + chr(0b1100110) + chr(265 - 220) + chr(0b111000)))():
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x9e@}\xf1\x97\xaf\x02M\x1d\n\xb2\x92 '), chr(100) + chr(101) + chr(99) + chr(111) + '\x64' + chr(0b111001 + 0o54))(chr(0b1110101) + chr(116) + chr(7057 - 6955) + '\055' + chr(1655 - 1599)))():
v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\xbfLe\xcb\xc1\xb9\x00J\x11\x10\xbd\x8f<8\xef\xe1\xc5\xf7\x9c\x9c\xd4Y\xd6\x07\x144:\x1c\xa7\x16.\x12y\xcbT\xd1\xa4%\xd2!\x9d@q\xc7\x8f\xad^\x01\\'), chr(0b1100100) + chr(3224 - 3123) + '\x63' + chr(4133 - 4022) + chr(100) + chr(101))(chr(2665 - 2548) + chr(1127 - 1011) + chr(102) + chr(0b101101) + chr(0b111000)))
del roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa6z}\xc7\x8c\xaf\x03[\x13\x14\xab\x95'), chr(0b1100100) + chr(101) + chr(99) + '\157' + '\x64' + '\x65')('\165' + '\164' + chr(0b1100110) + chr(505 - 460) + chr(56)))[pLvIyXSV7qW5]
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa6C`\xc2\x95\xaf\x02F\x1c\x1e\x84\x95-9\xbf'), chr(0b10000 + 0o124) + chr(101) + chr(99) + '\157' + chr(0b1100100) + '\145')('\x75' + '\164' + chr(0b110011 + 0o63) + chr(0b101011 + 0o2) + chr(0b1111 + 0o51)))(pLvIyXSV7qW5)
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa6V}\xcf\x86\xa3\x1eH-\n\xaf\x83)'), chr(0b1100100) + '\x65' + chr(0b1100011) + '\x6f' + '\x64' + chr(0b1000100 + 0o41))(chr(117) + chr(116) + '\x66' + '\055' + '\x38'))(pLvIyXSV7qW5)
else:
for lyR5fSKYE8JM in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa6I`\xdd\x95\x95\x11Z\x16\x10\xb4\xb9?5\xa3\xf3\xd7'), chr(100) + chr(101) + chr(4579 - 4480) + '\157' + chr(0b1100100) + '\145')(chr(7700 - 7583) + chr(116) + chr(102) + chr(546 - 501) + chr(56)))():
if lyR5fSKYE8JM in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa6z}\xc7\x8c\xaf\x03[\x13\x14\xab\x95'), chr(100) + '\x65' + chr(0b1100011) + '\x6f' + chr(0b1001100 + 0o30) + '\x65')(chr(0b1110101) + chr(6760 - 6644) + chr(8868 - 8766) + chr(0b101101) + chr(0b100010 + 0o26))):
if OPx_IY40mhId:
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x9e@}\xf1\x97\xaf\x02M\x1d\n\xb2\x92 '), '\144' + '\x65' + chr(0b1011011 + 0o10) + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(0b100100 + 0o121) + '\x74' + chr(102) + chr(0b101101) + '\070'))():
v8jsMqaYV6U2(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xb8I{\xcb\x80\xae\t\x0f\x1b\x17\xbf\x83!9\xab\xb6\xdf\xf9\x92\xdd\xeaN\xda\x08\x14(b\x1c\xa7\x15eD2'), '\144' + '\x65' + chr(0b1100011) + chr(111) + chr(100) + chr(6774 - 6673))(chr(0b1110101) + '\x74' + chr(8691 - 8589) + '\x2d' + chr(0b101001 + 0o17)), roI3spqORKae(ES5oEprVxulp(b'\x88\x16:\xe5\xa6\xf9\x16@#&\x98\xac'), chr(100) + chr(101) + chr(0b1110 + 0o125) + chr(2136 - 2025) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(0b1100110) + '\x2d' + chr(56)))(lyR5fSKYE8JM))
del roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa6z}\xc7\x8c\xaf\x03[\x13\x14\xab\x95'), chr(9933 - 9833) + chr(0b1100101) + '\143' + '\157' + chr(100) + chr(101))(chr(1232 - 1115) + chr(5278 - 5162) + '\146' + chr(45) + chr(0b111000)))[lyR5fSKYE8JM]
else:
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x9e@}\xf1\x97\xaf\x02M\x1d\n\xb2\x92 '), '\144' + chr(0b1100101) + chr(0b1100011) + chr(0b111100 + 0o63) + '\x64' + chr(0b1100101))(chr(6648 - 6531) + chr(116) + chr(102) + chr(1609 - 1564) + chr(0b111000)))():
v8jsMqaYV6U2(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xb8I{\xcb\x80\xae\t\x0f\x1b\x17\xbf\x83!9\xab\xb6\xdf\xf9\x92\xdd\xeb@\xda\x16\x00$t\x12\xe7\\e'), '\x64' + '\x65' + chr(99) + '\x6f' + chr(100) + '\145')(chr(117) + '\x74' + chr(0b1001010 + 0o34) + '\055' + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\x88\x16:\xe5\xa6\xf9\x16@#&\x98\xac'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(11114 - 11003) + chr(625 - 525) + chr(0b111101 + 0o50))('\x75' + chr(0b1110100) + '\x66' + chr(45) + chr(0b1001 + 0o57)))(lyR5fSKYE8JM))
continue
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa6C`\xc2\x95\xaf\x02F\x1c\x1e\x84\x95-9\xbf'), chr(3164 - 3064) + chr(3054 - 2953) + '\143' + '\157' + chr(1705 - 1605) + '\145')('\x75' + '\x74' + chr(102) + '\x2d' + chr(0b111000)))(lyR5fSKYE8JM)
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa6V}\xcf\x86\xa3\x1eH-\n\xaf\x83)'), '\x64' + '\x65' + chr(3604 - 3505) + chr(0b1010101 + 0o32) + chr(0b1100100) + chr(0b10110 + 0o117))('\165' + chr(116) + chr(0b1101 + 0o131) + chr(45) + chr(0b10010 + 0o46)))(lyR5fSKYE8JM)
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer._index_audio_cmu
|
def _index_audio_cmu(self, basename=None, replace_already_indexed=False):
"""
Indexes audio with pocketsphinx. Beware that the output would not be
sufficiently accurate. Use this only if you don't want to upload your
files to IBM.
Parameters
-----------
basename : str, optional
A specific basename to be indexed and is placed in src_dir
E.g. `audio.wav`.
If `None` is selected, all the valid audio files would be indexed.
Default is `None`.
Raises
------
OSError
If the output of pocketsphinx command results in an error.
"""
self._prepare_audio(basename=basename,
replace_already_indexed=replace_already_indexed)
for staging_audio_basename in self._list_audio_files(
sub_dir="staging"):
original_audio_name = ''.join(
staging_audio_basename.split('.')[:-1])[:-3]
pocketsphinx_command = ''.join([
"pocketsphinx_continuous", "-infile",
str("{}/staging/{}".format(
self.src_dir, staging_audio_basename)),
"-time", "yes", "-logfn", "/dev/null"])
try:
if self.get_verbosity():
print("Now indexing {}".format(staging_audio_basename))
output = subprocess.check_output([
"pocketsphinx_continuous", "-infile",
str("{}/staging/{}".format(
self.src_dir, staging_audio_basename)),
"-time", "yes", "-logfn", "/dev/null"
], universal_newlines=True).split('\n')
str_timestamps_with_sil_conf = list(map(
lambda x: x.split(" "), filter(None, output[1:])))
# Timestamps are putted in a list of a single element. To match
# Watson's output.
self.__timestamps_unregulated[
original_audio_name + ".wav"] = [(
self._timestamp_extractor_cmu(
staging_audio_basename,
str_timestamps_with_sil_conf))]
if self.get_verbosity():
print("Done indexing {}".format(staging_audio_basename))
except OSError as e:
if self.get_verbosity():
print(e, "The command was: {}".format(
pocketsphinx_command))
self.__errors[(time(), staging_audio_basename)] = e
self._timestamp_regulator()
if self.get_verbosity():
print("Finished indexing procedure")
|
python
|
def _index_audio_cmu(self, basename=None, replace_already_indexed=False):
"""
Indexes audio with pocketsphinx. Beware that the output would not be
sufficiently accurate. Use this only if you don't want to upload your
files to IBM.
Parameters
-----------
basename : str, optional
A specific basename to be indexed and is placed in src_dir
E.g. `audio.wav`.
If `None` is selected, all the valid audio files would be indexed.
Default is `None`.
Raises
------
OSError
If the output of pocketsphinx command results in an error.
"""
self._prepare_audio(basename=basename,
replace_already_indexed=replace_already_indexed)
for staging_audio_basename in self._list_audio_files(
sub_dir="staging"):
original_audio_name = ''.join(
staging_audio_basename.split('.')[:-1])[:-3]
pocketsphinx_command = ''.join([
"pocketsphinx_continuous", "-infile",
str("{}/staging/{}".format(
self.src_dir, staging_audio_basename)),
"-time", "yes", "-logfn", "/dev/null"])
try:
if self.get_verbosity():
print("Now indexing {}".format(staging_audio_basename))
output = subprocess.check_output([
"pocketsphinx_continuous", "-infile",
str("{}/staging/{}".format(
self.src_dir, staging_audio_basename)),
"-time", "yes", "-logfn", "/dev/null"
], universal_newlines=True).split('\n')
str_timestamps_with_sil_conf = list(map(
lambda x: x.split(" "), filter(None, output[1:])))
# Timestamps are putted in a list of a single element. To match
# Watson's output.
self.__timestamps_unregulated[
original_audio_name + ".wav"] = [(
self._timestamp_extractor_cmu(
staging_audio_basename,
str_timestamps_with_sil_conf))]
if self.get_verbosity():
print("Done indexing {}".format(staging_audio_basename))
except OSError as e:
if self.get_verbosity():
print(e, "The command was: {}".format(
pocketsphinx_command))
self.__errors[(time(), staging_audio_basename)] = e
self._timestamp_regulator()
if self.get_verbosity():
print("Finished indexing procedure")
|
[
"def",
"_index_audio_cmu",
"(",
"self",
",",
"basename",
"=",
"None",
",",
"replace_already_indexed",
"=",
"False",
")",
":",
"self",
".",
"_prepare_audio",
"(",
"basename",
"=",
"basename",
",",
"replace_already_indexed",
"=",
"replace_already_indexed",
")",
"for",
"staging_audio_basename",
"in",
"self",
".",
"_list_audio_files",
"(",
"sub_dir",
"=",
"\"staging\"",
")",
":",
"original_audio_name",
"=",
"''",
".",
"join",
"(",
"staging_audio_basename",
".",
"split",
"(",
"'.'",
")",
"[",
":",
"-",
"1",
"]",
")",
"[",
":",
"-",
"3",
"]",
"pocketsphinx_command",
"=",
"''",
".",
"join",
"(",
"[",
"\"pocketsphinx_continuous\"",
",",
"\"-infile\"",
",",
"str",
"(",
"\"{}/staging/{}\"",
".",
"format",
"(",
"self",
".",
"src_dir",
",",
"staging_audio_basename",
")",
")",
",",
"\"-time\"",
",",
"\"yes\"",
",",
"\"-logfn\"",
",",
"\"/dev/null\"",
"]",
")",
"try",
":",
"if",
"self",
".",
"get_verbosity",
"(",
")",
":",
"print",
"(",
"\"Now indexing {}\"",
".",
"format",
"(",
"staging_audio_basename",
")",
")",
"output",
"=",
"subprocess",
".",
"check_output",
"(",
"[",
"\"pocketsphinx_continuous\"",
",",
"\"-infile\"",
",",
"str",
"(",
"\"{}/staging/{}\"",
".",
"format",
"(",
"self",
".",
"src_dir",
",",
"staging_audio_basename",
")",
")",
",",
"\"-time\"",
",",
"\"yes\"",
",",
"\"-logfn\"",
",",
"\"/dev/null\"",
"]",
",",
"universal_newlines",
"=",
"True",
")",
".",
"split",
"(",
"'\\n'",
")",
"str_timestamps_with_sil_conf",
"=",
"list",
"(",
"map",
"(",
"lambda",
"x",
":",
"x",
".",
"split",
"(",
"\" \"",
")",
",",
"filter",
"(",
"None",
",",
"output",
"[",
"1",
":",
"]",
")",
")",
")",
"# Timestamps are putted in a list of a single element. To match",
"# Watson's output.",
"self",
".",
"__timestamps_unregulated",
"[",
"original_audio_name",
"+",
"\".wav\"",
"]",
"=",
"[",
"(",
"self",
".",
"_timestamp_extractor_cmu",
"(",
"staging_audio_basename",
",",
"str_timestamps_with_sil_conf",
")",
")",
"]",
"if",
"self",
".",
"get_verbosity",
"(",
")",
":",
"print",
"(",
"\"Done indexing {}\"",
".",
"format",
"(",
"staging_audio_basename",
")",
")",
"except",
"OSError",
"as",
"e",
":",
"if",
"self",
".",
"get_verbosity",
"(",
")",
":",
"print",
"(",
"e",
",",
"\"The command was: {}\"",
".",
"format",
"(",
"pocketsphinx_command",
")",
")",
"self",
".",
"__errors",
"[",
"(",
"time",
"(",
")",
",",
"staging_audio_basename",
")",
"]",
"=",
"e",
"self",
".",
"_timestamp_regulator",
"(",
")",
"if",
"self",
".",
"get_verbosity",
"(",
")",
":",
"print",
"(",
"\"Finished indexing procedure\"",
")"
] |
Indexes audio with pocketsphinx. Beware that the output would not be
sufficiently accurate. Use this only if you don't want to upload your
files to IBM.
Parameters
-----------
basename : str, optional
A specific basename to be indexed and is placed in src_dir
E.g. `audio.wav`.
If `None` is selected, all the valid audio files would be indexed.
Default is `None`.
Raises
------
OSError
If the output of pocketsphinx command results in an error.
|
[
"Indexes",
"audio",
"with",
"pocketsphinx",
".",
"Beware",
"that",
"the",
"output",
"would",
"not",
"be",
"sufficiently",
"accurate",
".",
"Use",
"this",
"only",
"if",
"you",
"don",
"t",
"want",
"to",
"upload",
"your",
"files",
"to",
"IBM",
"."
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L748-L808
|
train
|
This method indexes the audio files in IBM using pocketsphinx.
|
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,IAGRfZDRy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,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(0b1010101 + 0o32) + chr(244 - 194) + '\x37' + chr(1869 - 1816), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(0b10001 + 0o42) + '\061', 0o10), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\x6f' + chr(0b100110 + 0o13) + chr(0b11001 + 0o31) + chr(824 - 771), 43274 - 43266), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + chr(49) + '\061', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + '\067' + '\063', 46450 - 46442), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + chr(0b11 + 0o62) + chr(0b11 + 0o63), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b100100 + 0o16) + chr(55) + '\x31', 4288 - 4280), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b11000 + 0o127) + chr(51) + chr(53) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\157' + '\x34', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + chr(0b11011 + 0o26), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100 + 0o143) + '\061' + chr(0b110001), 11654 - 11646), nzTpIcepk0o8(chr(992 - 944) + chr(0b111 + 0o150) + chr(48), 21774 - 21766), nzTpIcepk0o8('\060' + chr(0b11 + 0o154) + '\064', 8), nzTpIcepk0o8(chr(380 - 332) + chr(111) + chr(550 - 495) + chr(53), 50277 - 50269), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\066' + chr(0b11100 + 0o27), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1036 - 986) + '\061' + chr(48), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x32' + '\067' + chr(0b110101), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1100 + 0o45) + '\x32' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(523 - 473) + chr(0b110 + 0o55), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(6033 - 5922) + chr(2152 - 2101) + chr(49) + chr(0b110001), 8), nzTpIcepk0o8(chr(1860 - 1812) + chr(0b1000110 + 0o51) + chr(0b110011) + chr(0b110100) + chr(54), 47132 - 47124), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(0b110111) + chr(0b11010 + 0o32), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101000 + 0o7) + '\x31' + '\066' + chr(1003 - 949), 29134 - 29126), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(53) + chr(2262 - 2209), 35641 - 35633), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10000 + 0o43) + chr(0b101 + 0o57) + chr(0b1 + 0o60), 0o10), nzTpIcepk0o8(chr(175 - 127) + chr(111) + '\x31' + chr(0b110101) + '\062', 37391 - 37383), nzTpIcepk0o8('\x30' + chr(0b101 + 0o152) + '\x31' + chr(792 - 738) + chr(0b11000 + 0o30), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(1077 - 966) + '\x36' + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110110 + 0o0) + chr(414 - 363), 8), nzTpIcepk0o8(chr(318 - 270) + chr(0b1001 + 0o146) + '\067' + '\x37', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\062' + chr(0b110101) + chr(0b11010 + 0o34), 8), nzTpIcepk0o8('\x30' + chr(0b100010 + 0o115) + chr(0b110010) + chr(0b100011 + 0o20), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(49) + chr(0b101101 + 0o11) + chr(53), 27053 - 27045), nzTpIcepk0o8('\x30' + chr(0b1010001 + 0o36) + chr(0b11 + 0o57) + chr(0b110000) + chr(0b1011 + 0o45), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + chr(2256 - 2205) + '\065', ord("\x08")), nzTpIcepk0o8(chr(2028 - 1980) + chr(9907 - 9796) + chr(0b110001) + chr(52) + '\060', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110100) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(2138 - 2090) + chr(0b1101111) + '\061' + chr(48) + chr(1768 - 1717), 0o10), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(878 - 767) + '\066' + chr(0b110000), 51380 - 51372)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(128 - 80) + chr(111) + chr(53) + chr(48), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x93'), '\x64' + '\x65' + '\143' + chr(7737 - 7626) + chr(0b1100100) + chr(101))('\165' + chr(12719 - 12603) + chr(102) + chr(0b101101) + chr(0b10000 + 0o50)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def MR6cNomoTgyN(hXMPsSrOQzbh, pLvIyXSV7qW5=None, OPx_IY40mhId=nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(4442 - 4331) + '\060', 8)):
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"\xe2)'\xac\x0b\xcf\xcb\x8a[p|dmR"), '\x64' + '\x65' + '\143' + chr(0b1101111) + chr(1861 - 1761) + chr(0b101110 + 0o67))(chr(117) + chr(0b101111 + 0o105) + chr(0b1100110) + chr(0b11000 + 0o25) + chr(0b111000)))(basename=pLvIyXSV7qW5, replace_already_indexed=OPx_IY40mhId)
for EznGQrHh2uKU in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe25<\xba\x0f\xf1\xd8\x9a`xf_bTuV\xfb'), '\144' + '\145' + '\x63' + chr(0b1101111) + '\x64' + '\145')(chr(0b111000 + 0o75) + chr(3245 - 3129) + chr(0b101 + 0o141) + '\055' + '\x38'))(sub_dir=roI3spqORKae(ES5oEprVxulp(b'\xce-4\xae\x12\xc0\xde'), chr(7319 - 7219) + chr(0b1100101) + chr(0b101011 + 0o70) + '\157' + chr(0b11100 + 0o110) + '\x65')(chr(0b1110101) + chr(0b111001 + 0o73) + chr(0b1100110) + chr(45) + chr(0b111 + 0o61))):
Fbj2JVGH607O = roI3spqORKae(ES5oEprVxulp(b''), '\144' + chr(0b1010101 + 0o20) + chr(0b11111 + 0o104) + chr(0b110111 + 0o70) + chr(100) + '\145')(chr(117) + chr(11755 - 11639) + '\x66' + chr(0b11100 + 0o21) + '\x38').Y4yM9BcfTCNq(EznGQrHh2uKU.LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b'\x93'), chr(100) + '\145' + chr(0b1 + 0o142) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(11209 - 11092) + chr(116) + chr(0b1011100 + 0o12) + '\055' + chr(56)))[:-nzTpIcepk0o8('\060' + chr(111) + '\061', 0o10)])[:-nzTpIcepk0o8(chr(868 - 820) + chr(9016 - 8905) + '\x33', 54427 - 54419)]
wPOHlOPQpSTx = roI3spqORKae(ES5oEprVxulp(b''), '\x64' + chr(7798 - 7697) + '\143' + chr(0b110111 + 0o70) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + '\x2d' + '\x38').Y4yM9BcfTCNq([roI3spqORKae(ES5oEprVxulp(b'\xcd66\xa2\x1e\xda\xca\x9flxgx[^v]\xfc\xd4=f\xa6\x93\xcf'), chr(9566 - 9466) + chr(3334 - 3233) + chr(0b11 + 0o140) + chr(3739 - 3628) + chr(6666 - 6566) + chr(7241 - 7140))(chr(0b1010111 + 0o36) + '\x74' + '\146' + chr(45) + '\070'), roI3spqORKae(ES5oEprVxulp(b'\x900;\xaf\x12\xc2\xdc'), chr(5631 - 5531) + '\145' + '\x63' + chr(0b1101111) + chr(0b101111 + 0o65) + chr(0b10111 + 0o116))(chr(0b1100110 + 0o17) + '\x74' + chr(0b1011110 + 0o10) + chr(1492 - 1447) + chr(0b111000)), N9zlRy29S1SS(roI3spqORKae(ES5oEprVxulp(b'\xc6$z\xba\x0f\xcf\xde\x86jv&{y'), chr(2690 - 2590) + chr(0b1011000 + 0o15) + chr(99) + '\x6f' + chr(0b1100100) + chr(4893 - 4792))(chr(0b1110101) + chr(5534 - 5418) + chr(0b100100 + 0o102) + chr(1739 - 1694) + chr(0b10 + 0o66)).q33KG3foQ_CJ(hXMPsSrOQzbh.src_dir, EznGQrHh2uKU)), roI3spqORKae(ES5oEprVxulp(b'\x90-<\xa4\x1e'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(5428 - 5317) + '\144' + chr(6882 - 6781))(chr(0b1110101) + chr(11659 - 11543) + chr(9459 - 9357) + chr(0b101101) + chr(1161 - 1105)), roI3spqORKae(ES5oEprVxulp(b'\xc4<&'), '\144' + chr(8387 - 8286) + '\143' + chr(0b1001110 + 0o41) + chr(0b101 + 0o137) + chr(5991 - 5890))(chr(117) + chr(0b100011 + 0o121) + chr(102) + '\055' + chr(808 - 752)), roI3spqORKae(ES5oEprVxulp(b'\x905:\xae\x1d\xc0'), '\x64' + chr(1559 - 1458) + chr(0b1011100 + 0o7) + chr(111) + chr(0b1000100 + 0o40) + chr(1661 - 1560))('\165' + chr(0b1110100) + chr(102) + chr(0b100011 + 0o12) + '\070'), roI3spqORKae(ES5oEprVxulp(b'\x92=0\xbfT\xc0\xcc\x83h'), '\x64' + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(0b110 + 0o136) + '\145')(chr(0b100011 + 0o122) + chr(0b1110100) + chr(102) + chr(0b1011 + 0o42) + '\x38')])
try:
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xda<!\x96\r\xcb\xcb\x8dkb`t}'), chr(0b100110 + 0o76) + '\145' + '\143' + chr(0b101110 + 0o101) + chr(100) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + '\146' + chr(1365 - 1320) + '\x38'))():
v8jsMqaYV6U2(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xf36"\xe9\x12\xc0\xdd\x8a|xgg$Fd'), chr(0b111111 + 0o45) + chr(7280 - 7179) + '\x63' + chr(0b10100 + 0o133) + chr(100) + chr(1271 - 1170))('\x75' + chr(0b1010010 + 0o42) + '\146' + chr(1754 - 1709) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xccjf\x82<\x9d\xdf\x80UNJJ'), chr(100) + chr(0b1010111 + 0o16) + '\143' + '\157' + chr(0b11010 + 0o112) + chr(101))(chr(13326 - 13209) + '\x74' + chr(10001 - 9899) + chr(0b10000 + 0o35) + chr(56)))(EznGQrHh2uKU))
toKQXlEvBKaK = eT8Y087E_kfd.check_output([roI3spqORKae(ES5oEprVxulp(b'\xcd66\xa2\x1e\xda\xca\x9flxgx[^v]\xfc\xd4=f\xa6\x93\xcf'), chr(100) + '\145' + chr(99) + chr(0b1010110 + 0o31) + chr(0b1100100) + chr(101))('\x75' + chr(0b1110100) + chr(5598 - 5496) + chr(0b101101) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\x900;\xaf\x12\xc2\xdc'), chr(100) + '\145' + chr(99) + '\x6f' + chr(0b1100100) + chr(101))('\165' + chr(116) + chr(102) + chr(150 - 105) + chr(1855 - 1799)), N9zlRy29S1SS(roI3spqORKae(ES5oEprVxulp(b'\xc6$z\xba\x0f\xcf\xde\x86jv&{y'), chr(0b1100100) + '\145' + chr(99) + chr(0b1001110 + 0o41) + chr(100) + chr(7970 - 7869))(chr(117) + chr(116) + chr(102) + '\x2d' + '\x38').format(hXMPsSrOQzbh.src_dir, EznGQrHh2uKU)), roI3spqORKae(ES5oEprVxulp(b'\x90-<\xa4\x1e'), chr(0b1100100) + chr(0b111100 + 0o51) + '\143' + '\x6f' + chr(0b1010000 + 0o24) + chr(0b1111 + 0o126))('\165' + chr(116) + '\146' + chr(45) + chr(2197 - 2141)), roI3spqORKae(ES5oEprVxulp(b'\xc4<&'), chr(100) + '\145' + chr(99) + chr(0b101110 + 0o101) + chr(0b1100100) + chr(0b110110 + 0o57))('\x75' + chr(0b1011000 + 0o34) + '\x66' + '\x2d' + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\x905:\xae\x1d\xc0'), chr(100) + '\145' + chr(0b1100011) + '\157' + chr(0b1100100) + chr(5654 - 5553))('\x75' + '\164' + chr(0b1100110 + 0o0) + '\055' + '\070'), roI3spqORKae(ES5oEprVxulp(b'\x92=0\xbfT\xc0\xcc\x83h'), chr(100) + '\145' + '\x63' + chr(111) + chr(100) + chr(0b1100101))(chr(0b1110101) + '\x74' + '\146' + chr(45) + chr(598 - 542))], universal_newlines=nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49), 8)).LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b'\xb7'), '\x64' + chr(0b1001100 + 0o31) + '\x63' + chr(0b10000 + 0o137) + chr(0b111 + 0o135) + chr(5758 - 5657))(chr(5026 - 4909) + '\x74' + '\x66' + chr(45) + '\x38'))
PqIJpJ0Y9Qxc = H4NoA26ON7iG(VVP82lOIz6CD(lambda bI5jsQ9OkQtj: bI5jsQ9OkQtj.LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b'\x9d'), chr(0b101010 + 0o72) + chr(101) + chr(0b1100010 + 0o1) + chr(111) + chr(0b1100100) + '\145')('\x75' + chr(0b1110100) + chr(102) + chr(1195 - 1150) + '\x38')), qEahrGEDF7Tq(None, toKQXlEvBKaK[nzTpIcepk0o8('\060' + chr(0b1101111) + '\061', 8):])))
hXMPsSrOQzbh.HYK38tp8WLQ4[Fbj2JVGH607O + roI3spqORKae(ES5oEprVxulp(b'\x93.4\xbf'), chr(0b101000 + 0o74) + chr(2812 - 2711) + chr(99) + chr(2599 - 2488) + '\x64' + chr(8970 - 8869))(chr(0b1110101) + chr(0b100010 + 0o122) + chr(1754 - 1652) + chr(0b101101) + chr(1813 - 1757))] = [hXMPsSrOQzbh._timestamp_extractor_cmu(EznGQrHh2uKU, PqIJpJ0Y9Qxc)]
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xda<!\x96\r\xcb\xcb\x8dkb`t}'), chr(0b11011 + 0o111) + chr(1696 - 1595) + chr(99) + chr(1317 - 1206) + '\x64' + chr(0b1100101))('\165' + chr(0b1110100) + '\146' + chr(203 - 158) + chr(0b111000)))():
v8jsMqaYV6U2(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xf96;\xac[\xc7\xd7\x8bai`nc\x1dbN'), '\x64' + '\145' + chr(0b10 + 0o141) + chr(0b1101111) + '\144' + chr(101))(chr(12913 - 12796) + chr(116) + '\146' + '\055' + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xccjf\x82<\x9d\xdf\x80UNJJ'), '\144' + '\145' + chr(0b1000001 + 0o42) + chr(0b1101111) + chr(610 - 510) + '\145')(chr(0b1110101) + chr(5337 - 5221) + chr(6960 - 6858) + chr(45) + chr(0b111000)))(EznGQrHh2uKU))
except zsedrPqY_EmW as wgf0sgcu_xPL:
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xda<!\x96\r\xcb\xcb\x8dkb`t}'), chr(0b1100100) + chr(5507 - 5406) + chr(0b100011 + 0o100) + '\x6f' + '\x64' + chr(101))('\165' + '\x74' + '\x66' + '\x2d' + chr(1733 - 1677)))():
v8jsMqaYV6U2(wgf0sgcu_xPL, roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xe910\xe9\x18\xc1\xd4\x82e\x7fm s\\j\t\xa8\xc6.'), chr(7359 - 7259) + chr(0b1001110 + 0o27) + chr(8475 - 8376) + chr(111) + chr(0b1100100) + chr(0b110000 + 0o65))('\165' + chr(116) + chr(4151 - 4049) + chr(0b101101 + 0o0) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xccjf\x82<\x9d\xdf\x80UNJJ'), chr(2981 - 2881) + '\x65' + '\x63' + '\x6f' + chr(8117 - 8017) + '\x65')(chr(9332 - 9215) + chr(0b1110100) + chr(0b1100110) + chr(0b100010 + 0o13) + chr(0b100100 + 0o24)))(wPOHlOPQpSTx))
hXMPsSrOQzbh.Kqm3Ap8PgTvf[oprIvDIRQyCb(), EznGQrHh2uKU] = wgf0sgcu_xPL
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe2-<\xa4\x1e\xdd\xcd\x8eiaVraZl_\xe9\xc9<a'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(5035 - 4924) + '\x64' + chr(0b1100101))('\x75' + '\x74' + chr(0b1100110) + chr(0b101101) + chr(56)))()
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xda<!\x96\r\xcb\xcb\x8dkb`t}'), chr(0b1100100) + '\x65' + chr(0b100100 + 0o77) + '\x6f' + chr(100) + chr(101))('\165' + chr(0b10001 + 0o143) + chr(102) + chr(45) + chr(56)))():
v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'\xfb0;\xa0\x08\xc6\xdc\x8b$xgdaEp]\xef\x9d#a\xa6\x85\xd9\x12\x98\x93\x0f'), chr(0b1100010 + 0o2) + chr(0b1010000 + 0o25) + '\x63' + chr(0b1101111) + chr(4524 - 4424) + chr(0b11001 + 0o114))('\165' + chr(0b1110001 + 0o3) + chr(0b1100110) + chr(45) + '\x38'))
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer._timestamp_extractor_cmu
|
def _timestamp_extractor_cmu(self, staging_audio_basename,
str_timestamps_with_sil_conf):
"""
Parameters
----------
str_timestamps_with_sil_conf : [[str, str, str, str]]
Of the form [[word, starting_sec, ending_sec, confidence]]
Returns
-------
timestamps : [[str, float, float]]
"""
filter_untimed = filter(lambda x: len(x) == 4,
str_timestamps_with_sil_conf)
if filter_untimed != str_timestamps_with_sil_conf:
self.__errors[
(time(), staging_audio_basename)
] = str_timestamps_with_sil_conf
str_timestamps = [
str_timestamp[:-1]
for str_timestamp in filter_untimed
if not any([letter in {"<", ">", "/"}
for letter in ''.join(str_timestamp)])]
timestamps = list([
_WordBlock(
word=re.findall("^[^\(]+", x[0])[0],
start=round(float(x[1]), 2),
end=round(float(x[2]), 2)
) for x in str_timestamps])
return timestamps
|
python
|
def _timestamp_extractor_cmu(self, staging_audio_basename,
str_timestamps_with_sil_conf):
"""
Parameters
----------
str_timestamps_with_sil_conf : [[str, str, str, str]]
Of the form [[word, starting_sec, ending_sec, confidence]]
Returns
-------
timestamps : [[str, float, float]]
"""
filter_untimed = filter(lambda x: len(x) == 4,
str_timestamps_with_sil_conf)
if filter_untimed != str_timestamps_with_sil_conf:
self.__errors[
(time(), staging_audio_basename)
] = str_timestamps_with_sil_conf
str_timestamps = [
str_timestamp[:-1]
for str_timestamp in filter_untimed
if not any([letter in {"<", ">", "/"}
for letter in ''.join(str_timestamp)])]
timestamps = list([
_WordBlock(
word=re.findall("^[^\(]+", x[0])[0],
start=round(float(x[1]), 2),
end=round(float(x[2]), 2)
) for x in str_timestamps])
return timestamps
|
[
"def",
"_timestamp_extractor_cmu",
"(",
"self",
",",
"staging_audio_basename",
",",
"str_timestamps_with_sil_conf",
")",
":",
"filter_untimed",
"=",
"filter",
"(",
"lambda",
"x",
":",
"len",
"(",
"x",
")",
"==",
"4",
",",
"str_timestamps_with_sil_conf",
")",
"if",
"filter_untimed",
"!=",
"str_timestamps_with_sil_conf",
":",
"self",
".",
"__errors",
"[",
"(",
"time",
"(",
")",
",",
"staging_audio_basename",
")",
"]",
"=",
"str_timestamps_with_sil_conf",
"str_timestamps",
"=",
"[",
"str_timestamp",
"[",
":",
"-",
"1",
"]",
"for",
"str_timestamp",
"in",
"filter_untimed",
"if",
"not",
"any",
"(",
"[",
"letter",
"in",
"{",
"\"<\"",
",",
"\">\"",
",",
"\"/\"",
"}",
"for",
"letter",
"in",
"''",
".",
"join",
"(",
"str_timestamp",
")",
"]",
")",
"]",
"timestamps",
"=",
"list",
"(",
"[",
"_WordBlock",
"(",
"word",
"=",
"re",
".",
"findall",
"(",
"\"^[^\\(]+\"",
",",
"x",
"[",
"0",
"]",
")",
"[",
"0",
"]",
",",
"start",
"=",
"round",
"(",
"float",
"(",
"x",
"[",
"1",
"]",
")",
",",
"2",
")",
",",
"end",
"=",
"round",
"(",
"float",
"(",
"x",
"[",
"2",
"]",
")",
",",
"2",
")",
")",
"for",
"x",
"in",
"str_timestamps",
"]",
")",
"return",
"timestamps"
] |
Parameters
----------
str_timestamps_with_sil_conf : [[str, str, str, str]]
Of the form [[word, starting_sec, ending_sec, confidence]]
Returns
-------
timestamps : [[str, float, float]]
|
[
"Parameters",
"----------",
"str_timestamps_with_sil_conf",
":",
"[[",
"str",
"str",
"str",
"str",
"]]",
"Of",
"the",
"form",
"[[",
"word",
"starting_sec",
"ending_sec",
"confidence",
"]]"
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L810-L839
|
train
|
Extract the CMU timestamps from the given string.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2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ributeError,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(55) + chr(49), 15267 - 15259), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + chr(55) + chr(0b110011), 51349 - 51341), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b100001 + 0o22) + chr(2041 - 1993) + '\x30', 0b1000), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(581 - 526) + chr(0b101001 + 0o14), 17271 - 17263), nzTpIcepk0o8(chr(48) + chr(0b10101 + 0o132) + '\061' + chr(0b11 + 0o62) + '\x30', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b101101 + 0o5) + '\061' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001 + 0o2) + chr(54) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(111) + chr(51) + '\063' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(8657 - 8546) + chr(495 - 442) + chr(51), 22162 - 22154), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10 + 0o57) + chr(1099 - 1048), ord("\x08")), nzTpIcepk0o8(chr(1335 - 1287) + chr(0b111011 + 0o64) + chr(49) + chr(759 - 711) + chr(0b101 + 0o53), 13659 - 13651), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + chr(2366 - 2313) + '\x36', 9786 - 9778), nzTpIcepk0o8('\060' + '\x6f' + chr(1066 - 1013) + chr(0b110110), 28733 - 28725), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b100001 + 0o20) + '\x33' + chr(0b100111 + 0o16), 0o10), nzTpIcepk0o8(chr(1880 - 1832) + chr(0b1101111) + chr(49) + chr(437 - 389) + chr(0b110110), 0b1000), nzTpIcepk0o8('\060' + chr(0b11010 + 0o125) + '\066' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b11101 + 0o23) + '\157' + chr(151 - 100) + chr(964 - 916) + chr(583 - 528), 0o10), nzTpIcepk0o8(chr(2005 - 1957) + chr(0b1101111) + '\x34' + '\063', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(51) + '\063' + chr(125 - 77), 0b1000), nzTpIcepk0o8(chr(544 - 496) + chr(111) + chr(0b11010 + 0o30) + '\062' + chr(0b110111), 37480 - 37472), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100 + 0o55) + chr(0b10 + 0o65), 41446 - 41438), nzTpIcepk0o8(chr(619 - 571) + '\157' + '\x31' + chr(620 - 570) + chr(53), 0o10), nzTpIcepk0o8('\x30' + chr(0b101 + 0o152) + '\063' + chr(0b110011) + '\x32', 63363 - 63355), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + chr(0b110010) + chr(1982 - 1927), 8), nzTpIcepk0o8(chr(48) + chr(8486 - 8375) + '\064' + chr(0b101101 + 0o12), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1010100 + 0o33) + chr(0b1111 + 0o44) + chr(0b110011) + chr(0b101000 + 0o10), 8), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(0b110100) + '\063', 0b1000), nzTpIcepk0o8('\x30' + chr(5379 - 5268) + '\x31' + chr(50) + '\063', 0o10), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(111) + chr(2171 - 2122) + chr(1862 - 1814) + chr(53), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(1982 - 1933) + chr(51) + chr(0b101011 + 0o14), ord("\x08")), nzTpIcepk0o8(chr(1386 - 1338) + chr(0b101 + 0o152) + chr(49) + chr(0b110000) + '\x32', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(0b101010 + 0o14) + chr(1672 - 1620), 0b1000), nzTpIcepk0o8(chr(1141 - 1093) + '\x6f' + chr(49), 0b1000), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\x6f' + chr(0b110011) + chr(0b1 + 0o66) + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(327 - 276) + chr(2501 - 2448) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(50) + chr(0b101 + 0o62), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x35' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1000001 + 0o56) + '\x32' + chr(0b10101 + 0o33) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(0b10000 + 0o45) + chr(0b100111 + 0o15), 39474 - 39466), nzTpIcepk0o8('\x30' + chr(1542 - 1431) + chr(0b110011) + '\x30' + chr(48), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(111) + chr(53) + '\060', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x17'), '\144' + chr(0b10100 + 0o121) + chr(99) + chr(0b1101111) + chr(4536 - 4436) + chr(5301 - 5200))('\165' + chr(0b1110100) + chr(2170 - 2068) + chr(1361 - 1316) + chr(2079 - 2023)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def pTubTJ9WNyqA(hXMPsSrOQzbh, EznGQrHh2uKU, PqIJpJ0Y9Qxc):
zuDoUEn1FWA0 = qEahrGEDF7Tq(lambda bI5jsQ9OkQtj: ftfygxgFas5X(bI5jsQ9OkQtj) == nzTpIcepk0o8('\060' + chr(2036 - 1925) + chr(1941 - 1889), 40819 - 40811), PqIJpJ0Y9Qxc)
if zuDoUEn1FWA0 != PqIJpJ0Y9Qxc:
hXMPsSrOQzbh.Kqm3Ap8PgTvf[oprIvDIRQyCb(), EznGQrHh2uKU] = PqIJpJ0Y9Qxc
KaIX1tflC4qb = [RDLo8PYJ3_Ss[:-nzTpIcepk0o8(chr(48) + chr(0b101011 + 0o104) + '\061', 8)] for RDLo8PYJ3_Ss in zuDoUEn1FWA0 if not VF4pKOObtlPc([ZJXdHGT7fNTC in {roI3spqORKae(ES5oEprVxulp(b'\x05'), chr(0b10010 + 0o122) + '\145' + '\143' + '\157' + chr(5037 - 4937) + '\x65')(chr(117) + '\164' + chr(0b1100 + 0o132) + chr(0b101101) + '\070'), roI3spqORKae(ES5oEprVxulp(b'\x07'), '\144' + '\145' + chr(0b1100011) + chr(0b1101111) + '\144' + chr(0b1100101))('\x75' + chr(0b1110100) + chr(0b1100110) + chr(0b11010 + 0o23) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\x16'), chr(100) + '\x65' + chr(99) + chr(290 - 179) + chr(0b1100100) + '\x65')(chr(0b10000 + 0o145) + chr(0b1110100) + chr(102) + chr(1266 - 1221) + chr(0b11010 + 0o36))} for ZJXdHGT7fNTC in roI3spqORKae(ES5oEprVxulp(b''), chr(0b1100100) + '\x65' + chr(0b1100011) + '\x6f' + chr(0b1100100) + '\x65')('\x75' + chr(0b10001 + 0o143) + chr(0b1100110) + chr(45) + chr(56)).Y4yM9BcfTCNq(RDLo8PYJ3_Ss)])]
P_zdJsig8rNF = H4NoA26ON7iG([LiTKA3pCZ_0l(word=aoTc4YA2bs2R.findall(roI3spqORKae(ES5oEprVxulp(b'g\xa0\x9e!@\xd7\xdb'), chr(0b1000000 + 0o44) + chr(101) + '\x63' + '\157' + '\x64' + chr(9976 - 9875))('\x75' + '\164' + chr(0b1100110) + '\055' + chr(0b111000)), bI5jsQ9OkQtj[nzTpIcepk0o8('\060' + chr(0b1101111) + '\x30', 36998 - 36990)])[nzTpIcepk0o8(chr(2301 - 2253) + '\157' + chr(0b110000), 8)], start=sOS7b2Ofrbne(jLW6pRf2DSRk(bI5jsQ9OkQtj[nzTpIcepk0o8(chr(2124 - 2076) + '\157' + chr(389 - 340), 8)]), nzTpIcepk0o8('\060' + chr(0b1011010 + 0o25) + chr(374 - 324), ord("\x08"))), end=sOS7b2Ofrbne(jLW6pRf2DSRk(bI5jsQ9OkQtj[nzTpIcepk0o8('\060' + chr(111) + '\062', 8)]), nzTpIcepk0o8('\x30' + chr(111) + chr(0b0 + 0o62), 8))) for bI5jsQ9OkQtj in KaIX1tflC4qb])
return P_zdJsig8rNF
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer._index_audio_ibm
|
def _index_audio_ibm(self, basename=None, replace_already_indexed=False,
continuous=True, model="en-US_BroadbandModel",
word_confidence=True, word_alternatives_threshold=0.9,
profanity_filter_for_US_results=False):
"""
Implements a search-suitable interface for Watson speech API.
Some explaination of the parameters here have been taken from [1]_
Parameters
----------
basename : str, optional
A specific basename to be indexed and is placed in src_dir
e.g `audio.wav`.
If `None` is selected, all the valid audio files would be indexed.
Default is `None`.
replace_already_indexed : bool
`True`, To reindex some audio file that's already in the
timestamps.
Default is `False`.
continuous : bool
Indicates whether multiple final results that represent consecutive
phrases separated by long pauses are returned.
If true, such phrases are returned; if false (the default),
recognition ends after the first end-of-speech (EOS) incident is
detected.
Default is `True`.
model : {
'ar-AR_BroadbandModel',
'en-UK_BroadbandModel'
'en-UK_NarrowbandModel',
'en-US_BroadbandModel', (the default)
'en-US_NarrowbandModel',
'es-ES_BroadbandModel',
'es-ES_NarrowbandModel',
'fr-FR_BroadbandModel',
'ja-JP_BroadbandModel',
'ja-JP_NarrowbandModel',
'pt-BR_BroadbandModel',
'pt-BR_NarrowbandModel',
'zh-CN_BroadbandModel',
'zh-CN_NarrowbandModel'
}
The identifier of the model to be used for the recognition
Default is 'en-US_BroadbandModel'
word_confidence : bool
Indicates whether a confidence measure in the range of 0 to 1 is
returned for each word.
The default is True. (It's False in the original)
word_alternatives_threshold : numeric
A confidence value that is the lower bound for identifying a
hypothesis as a possible word alternative (also known as
"Confusion Networks"). An alternative word is considered if its
confidence is greater than or equal to the threshold. Specify a
probability between 0 and 1 inclusive.
Default is `0.9`.
profanity_filter_for_US_results : bool
Indicates whether profanity filtering is performed on the
transcript. If true, the service filters profanity from all output
by replacing inappropriate words with a series of asterisks.
If false, the service returns results with no censoring. Applies
to US English transcription only.
Default is `False`.
References
----------
.. [1] : https://ibm.com/watson/developercloud/speech-to-text/api/v1/
"""
params = {'continuous': continuous,
'model': model,
'word_alternatives_threshold': word_alternatives_threshold,
'word_confidence': word_confidence,
'timestamps': True,
'inactivity_timeout': str(-1),
'profanity_filter': profanity_filter_for_US_results}
self._prepare_audio(basename=basename,
replace_already_indexed=replace_already_indexed)
for staging_audio_basename in self._list_audio_files(
sub_dir="staging"):
original_audio_name = ''.join(
staging_audio_basename.split('.')[:-1])[:-3]
with open("{}/staging/{}".format(
self.src_dir, staging_audio_basename), "rb") as f:
if self.get_verbosity():
print("Uploading {}...".format(staging_audio_basename))
response = requests.post(
url=("https://stream.watsonplatform.net/"
"speech-to-text/api/v1/recognize"),
auth=(self.get_username_ibm(), self.get_password_ibm()),
headers={'content-type': 'audio/wav'},
data=f.read(),
params=params)
if self.get_verbosity():
print("Indexing {}...".format(staging_audio_basename))
self.__timestamps_unregulated[
original_audio_name + ".wav"].append(
self._timestamp_extractor_ibm(
staging_audio_basename, json.loads(response.text)))
if self.get_verbosity():
print("Done indexing {}".format(staging_audio_basename))
self._timestamp_regulator()
if self.get_verbosity():
print("Indexing procedure finished")
|
python
|
def _index_audio_ibm(self, basename=None, replace_already_indexed=False,
continuous=True, model="en-US_BroadbandModel",
word_confidence=True, word_alternatives_threshold=0.9,
profanity_filter_for_US_results=False):
"""
Implements a search-suitable interface for Watson speech API.
Some explaination of the parameters here have been taken from [1]_
Parameters
----------
basename : str, optional
A specific basename to be indexed and is placed in src_dir
e.g `audio.wav`.
If `None` is selected, all the valid audio files would be indexed.
Default is `None`.
replace_already_indexed : bool
`True`, To reindex some audio file that's already in the
timestamps.
Default is `False`.
continuous : bool
Indicates whether multiple final results that represent consecutive
phrases separated by long pauses are returned.
If true, such phrases are returned; if false (the default),
recognition ends after the first end-of-speech (EOS) incident is
detected.
Default is `True`.
model : {
'ar-AR_BroadbandModel',
'en-UK_BroadbandModel'
'en-UK_NarrowbandModel',
'en-US_BroadbandModel', (the default)
'en-US_NarrowbandModel',
'es-ES_BroadbandModel',
'es-ES_NarrowbandModel',
'fr-FR_BroadbandModel',
'ja-JP_BroadbandModel',
'ja-JP_NarrowbandModel',
'pt-BR_BroadbandModel',
'pt-BR_NarrowbandModel',
'zh-CN_BroadbandModel',
'zh-CN_NarrowbandModel'
}
The identifier of the model to be used for the recognition
Default is 'en-US_BroadbandModel'
word_confidence : bool
Indicates whether a confidence measure in the range of 0 to 1 is
returned for each word.
The default is True. (It's False in the original)
word_alternatives_threshold : numeric
A confidence value that is the lower bound for identifying a
hypothesis as a possible word alternative (also known as
"Confusion Networks"). An alternative word is considered if its
confidence is greater than or equal to the threshold. Specify a
probability between 0 and 1 inclusive.
Default is `0.9`.
profanity_filter_for_US_results : bool
Indicates whether profanity filtering is performed on the
transcript. If true, the service filters profanity from all output
by replacing inappropriate words with a series of asterisks.
If false, the service returns results with no censoring. Applies
to US English transcription only.
Default is `False`.
References
----------
.. [1] : https://ibm.com/watson/developercloud/speech-to-text/api/v1/
"""
params = {'continuous': continuous,
'model': model,
'word_alternatives_threshold': word_alternatives_threshold,
'word_confidence': word_confidence,
'timestamps': True,
'inactivity_timeout': str(-1),
'profanity_filter': profanity_filter_for_US_results}
self._prepare_audio(basename=basename,
replace_already_indexed=replace_already_indexed)
for staging_audio_basename in self._list_audio_files(
sub_dir="staging"):
original_audio_name = ''.join(
staging_audio_basename.split('.')[:-1])[:-3]
with open("{}/staging/{}".format(
self.src_dir, staging_audio_basename), "rb") as f:
if self.get_verbosity():
print("Uploading {}...".format(staging_audio_basename))
response = requests.post(
url=("https://stream.watsonplatform.net/"
"speech-to-text/api/v1/recognize"),
auth=(self.get_username_ibm(), self.get_password_ibm()),
headers={'content-type': 'audio/wav'},
data=f.read(),
params=params)
if self.get_verbosity():
print("Indexing {}...".format(staging_audio_basename))
self.__timestamps_unregulated[
original_audio_name + ".wav"].append(
self._timestamp_extractor_ibm(
staging_audio_basename, json.loads(response.text)))
if self.get_verbosity():
print("Done indexing {}".format(staging_audio_basename))
self._timestamp_regulator()
if self.get_verbosity():
print("Indexing procedure finished")
|
[
"def",
"_index_audio_ibm",
"(",
"self",
",",
"basename",
"=",
"None",
",",
"replace_already_indexed",
"=",
"False",
",",
"continuous",
"=",
"True",
",",
"model",
"=",
"\"en-US_BroadbandModel\"",
",",
"word_confidence",
"=",
"True",
",",
"word_alternatives_threshold",
"=",
"0.9",
",",
"profanity_filter_for_US_results",
"=",
"False",
")",
":",
"params",
"=",
"{",
"'continuous'",
":",
"continuous",
",",
"'model'",
":",
"model",
",",
"'word_alternatives_threshold'",
":",
"word_alternatives_threshold",
",",
"'word_confidence'",
":",
"word_confidence",
",",
"'timestamps'",
":",
"True",
",",
"'inactivity_timeout'",
":",
"str",
"(",
"-",
"1",
")",
",",
"'profanity_filter'",
":",
"profanity_filter_for_US_results",
"}",
"self",
".",
"_prepare_audio",
"(",
"basename",
"=",
"basename",
",",
"replace_already_indexed",
"=",
"replace_already_indexed",
")",
"for",
"staging_audio_basename",
"in",
"self",
".",
"_list_audio_files",
"(",
"sub_dir",
"=",
"\"staging\"",
")",
":",
"original_audio_name",
"=",
"''",
".",
"join",
"(",
"staging_audio_basename",
".",
"split",
"(",
"'.'",
")",
"[",
":",
"-",
"1",
"]",
")",
"[",
":",
"-",
"3",
"]",
"with",
"open",
"(",
"\"{}/staging/{}\"",
".",
"format",
"(",
"self",
".",
"src_dir",
",",
"staging_audio_basename",
")",
",",
"\"rb\"",
")",
"as",
"f",
":",
"if",
"self",
".",
"get_verbosity",
"(",
")",
":",
"print",
"(",
"\"Uploading {}...\"",
".",
"format",
"(",
"staging_audio_basename",
")",
")",
"response",
"=",
"requests",
".",
"post",
"(",
"url",
"=",
"(",
"\"https://stream.watsonplatform.net/\"",
"\"speech-to-text/api/v1/recognize\"",
")",
",",
"auth",
"=",
"(",
"self",
".",
"get_username_ibm",
"(",
")",
",",
"self",
".",
"get_password_ibm",
"(",
")",
")",
",",
"headers",
"=",
"{",
"'content-type'",
":",
"'audio/wav'",
"}",
",",
"data",
"=",
"f",
".",
"read",
"(",
")",
",",
"params",
"=",
"params",
")",
"if",
"self",
".",
"get_verbosity",
"(",
")",
":",
"print",
"(",
"\"Indexing {}...\"",
".",
"format",
"(",
"staging_audio_basename",
")",
")",
"self",
".",
"__timestamps_unregulated",
"[",
"original_audio_name",
"+",
"\".wav\"",
"]",
".",
"append",
"(",
"self",
".",
"_timestamp_extractor_ibm",
"(",
"staging_audio_basename",
",",
"json",
".",
"loads",
"(",
"response",
".",
"text",
")",
")",
")",
"if",
"self",
".",
"get_verbosity",
"(",
")",
":",
"print",
"(",
"\"Done indexing {}\"",
".",
"format",
"(",
"staging_audio_basename",
")",
")",
"self",
".",
"_timestamp_regulator",
"(",
")",
"if",
"self",
".",
"get_verbosity",
"(",
")",
":",
"print",
"(",
"\"Indexing procedure finished\"",
")"
] |
Implements a search-suitable interface for Watson speech API.
Some explaination of the parameters here have been taken from [1]_
Parameters
----------
basename : str, optional
A specific basename to be indexed and is placed in src_dir
e.g `audio.wav`.
If `None` is selected, all the valid audio files would be indexed.
Default is `None`.
replace_already_indexed : bool
`True`, To reindex some audio file that's already in the
timestamps.
Default is `False`.
continuous : bool
Indicates whether multiple final results that represent consecutive
phrases separated by long pauses are returned.
If true, such phrases are returned; if false (the default),
recognition ends after the first end-of-speech (EOS) incident is
detected.
Default is `True`.
model : {
'ar-AR_BroadbandModel',
'en-UK_BroadbandModel'
'en-UK_NarrowbandModel',
'en-US_BroadbandModel', (the default)
'en-US_NarrowbandModel',
'es-ES_BroadbandModel',
'es-ES_NarrowbandModel',
'fr-FR_BroadbandModel',
'ja-JP_BroadbandModel',
'ja-JP_NarrowbandModel',
'pt-BR_BroadbandModel',
'pt-BR_NarrowbandModel',
'zh-CN_BroadbandModel',
'zh-CN_NarrowbandModel'
}
The identifier of the model to be used for the recognition
Default is 'en-US_BroadbandModel'
word_confidence : bool
Indicates whether a confidence measure in the range of 0 to 1 is
returned for each word.
The default is True. (It's False in the original)
word_alternatives_threshold : numeric
A confidence value that is the lower bound for identifying a
hypothesis as a possible word alternative (also known as
"Confusion Networks"). An alternative word is considered if its
confidence is greater than or equal to the threshold. Specify a
probability between 0 and 1 inclusive.
Default is `0.9`.
profanity_filter_for_US_results : bool
Indicates whether profanity filtering is performed on the
transcript. If true, the service filters profanity from all output
by replacing inappropriate words with a series of asterisks.
If false, the service returns results with no censoring. Applies
to US English transcription only.
Default is `False`.
References
----------
.. [1] : https://ibm.com/watson/developercloud/speech-to-text/api/v1/
|
[
"Implements",
"a",
"search",
"-",
"suitable",
"interface",
"for",
"Watson",
"speech",
"API",
"."
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L841-L956
|
train
|
This method is used to index the audio files in src_dir_wav.
|
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,_1qUu0g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Xup,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(810 - 756) + chr(0b11010 + 0o35), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1010000 + 0o37) + chr(0b10010 + 0o40) + chr(0b110100) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + chr(1621 - 1566) + chr(0b110101), 12440 - 12432), nzTpIcepk0o8('\060' + chr(8780 - 8669) + chr(0b101001 + 0o12) + chr(952 - 901) + '\x34', 0o10), nzTpIcepk0o8(chr(2146 - 2098) + chr(0b1101111) + '\061' + chr(0b101111 + 0o5) + chr(1149 - 1096), 27823 - 27815), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + chr(0b110000) + chr(54), 53760 - 53752), nzTpIcepk0o8(chr(59 - 11) + '\157' + '\x33' + '\062' + chr(48), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1528 - 1479) + '\x34' + chr(0b101100 + 0o10), ord("\x08")), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b1011100 + 0o23) + chr(1674 - 1624) + chr(551 - 496), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110100) + '\x32', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + '\064' + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + '\x32' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b101110 + 0o101) + '\063' + chr(977 - 925) + '\067', 16678 - 16670), nzTpIcepk0o8(chr(48) + chr(111) + chr(2103 - 2053) + chr(0b110011) + '\065', 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\061' + chr(884 - 831), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b1101 + 0o44) + '\065' + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(3339 - 3228) + '\067' + chr(0b11111 + 0o24), 0o10), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1101111) + chr(1861 - 1812) + chr(50) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(882 - 832) + chr(0b11100 + 0o33) + chr(55), 27860 - 27852), nzTpIcepk0o8(chr(760 - 712) + chr(0b1101111) + chr(49) + '\x32' + '\x33', 8), nzTpIcepk0o8('\060' + chr(0b1010 + 0o145) + '\x36', 23217 - 23209), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\x6f' + chr(2337 - 2282) + chr(49), 0b1000), nzTpIcepk0o8('\060' + chr(1091 - 980) + chr(1850 - 1800) + chr(0b110100) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\157' + '\067' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(1568 - 1520) + '\157' + chr(0b101011 + 0o7) + '\062', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2165 - 2116) + chr(0b11100 + 0o26) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + chr(0b100101 + 0o22) + chr(0b110 + 0o52), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\067' + '\063', 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110110) + '\x36', 21170 - 21162), nzTpIcepk0o8(chr(0b0 + 0o60) + '\157' + '\x33' + chr(0b110011) + '\060', ord("\x08")), nzTpIcepk0o8(chr(1343 - 1295) + chr(5118 - 5007) + '\063' + chr(0b110110) + chr(0b101 + 0o57), 11670 - 11662), nzTpIcepk0o8('\060' + chr(809 - 698) + '\062' + chr(51) + chr(53), 8), nzTpIcepk0o8('\060' + chr(0b0 + 0o157) + chr(50) + chr(0b10101 + 0o40), 0o10), nzTpIcepk0o8(chr(799 - 751) + chr(12122 - 12011) + '\061' + chr(0b110111) + chr(0b110000), 8), nzTpIcepk0o8(chr(0b110000) + chr(9868 - 9757) + '\067', 6993 - 6985), nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + chr(0b0 + 0o67) + chr(0b110 + 0o57), 0o10), nzTpIcepk0o8(chr(1836 - 1788) + chr(0b1101111) + chr(1616 - 1565) + chr(0b110110 + 0o1) + chr(49), 37156 - 37148), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1260 - 1210) + chr(856 - 804) + chr(2263 - 2215), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\061' + chr(54), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b10001 + 0o136) + '\065' + chr(0b10011 + 0o35), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x19'), chr(100) + chr(10041 - 9940) + '\143' + '\157' + '\144' + chr(6479 - 6378))(chr(117) + chr(0b110001 + 0o103) + chr(0b1 + 0o145) + '\055' + chr(2764 - 2708)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def bxJ7ZBTARXeK(hXMPsSrOQzbh, pLvIyXSV7qW5=None, OPx_IY40mhId=nzTpIcepk0o8('\x30' + chr(0b111 + 0o150) + chr(0b110000), 0b1000), pfRlQvucAe_I=nzTpIcepk0o8(chr(0b1 + 0o57) + '\x6f' + '\061', 54595 - 54587), KW0sEfjlgNpM=roI3spqORKae(ES5oEprVxulp(b'R\xcd\xd0\x896\x99\x92\x16xC\x03\xf2\x86\xf3i$T7\xda?'), '\x64' + chr(0b11111 + 0o106) + chr(0b101010 + 0o71) + chr(0b1 + 0o156) + '\x64' + '\x65')(chr(0b100010 + 0o123) + chr(1756 - 1640) + '\146' + '\055' + chr(0b111000)), us7YMGBNL6BG=nzTpIcepk0o8('\x30' + chr(111) + chr(49), 8), KsMfnGzhFu41=0.9, McnUvKLuEzst=nzTpIcepk0o8(chr(48) + '\157' + chr(0b110000), 8)):
GVgFAYMz7Sw8 = {roI3spqORKae(ES5oEprVxulp(b'T\xcc\x93\xa8\x0c\xa8\xa5\x0bbQ'), '\144' + '\145' + chr(0b1100011) + chr(111) + chr(0b10 + 0o142) + chr(0b100001 + 0o104))('\x75' + '\164' + chr(0b110111 + 0o57) + chr(0b101101) + chr(56)): pfRlQvucAe_I, roI3spqORKae(ES5oEprVxulp(b'Z\xcc\x99\xb9\t'), '\144' + chr(0b1100101) + chr(99) + '\157' + chr(100) + chr(9099 - 8998))('\x75' + chr(116) + chr(102) + chr(45) + chr(503 - 447)): KW0sEfjlgNpM, roI3spqORKae(ES5oEprVxulp(b'@\xcc\x8f\xb8:\xa7\xbc\x10rP\t\xf1\x93\xf4{\x0cH\x0c\xcb;t\\\xd5W}>\x1c'), chr(100) + '\145' + chr(0b1100011) + chr(8849 - 8738) + '\144' + '\x65')('\165' + chr(116) + chr(0b1100110) + chr(1648 - 1603) + '\x38'): KsMfnGzhFu41, roI3spqORKae(ES5oEprVxulp(b'@\xcc\x8f\xb8:\xa5\xbf\nqK\x03\xf5\x89\xfeh'), chr(0b110100 + 0o60) + '\145' + chr(0b1100011) + chr(0b100010 + 0o115) + chr(3118 - 3018) + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(1523 - 1421) + chr(0b101101) + chr(2172 - 2116)): us7YMGBNL6BG, roI3spqORKae(ES5oEprVxulp(b'C\xca\x90\xb9\x16\xb2\xb1\tgQ'), '\x64' + chr(101) + '\x63' + '\x6f' + chr(0b1100100) + chr(9938 - 9837))('\165' + chr(0b1000101 + 0o57) + chr(102) + '\x2d' + chr(56)): nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061', 8), roI3spqORKae(ES5oEprVxulp(b"^\xcd\x9c\xbf\x11\xaf\xa6\rc[8\xe4\x8e\xf0h\x06N'"), '\x64' + chr(7265 - 7164) + chr(6839 - 6740) + '\x6f' + chr(0b1100100) + '\x65')('\165' + '\164' + chr(8200 - 8098) + chr(704 - 659) + '\x38'): N9zlRy29S1SS(-nzTpIcepk0o8('\x30' + '\157' + '\x31', 8)), roI3spqORKae(ES5oEprVxulp(b'G\xd1\x92\xba\x04\xa8\xb9\x10n}\x01\xf9\x8b\xe9h\x1b'), chr(0b1100100) + chr(0b1100101) + '\x63' + '\157' + chr(0b1010000 + 0o24) + chr(0b1100101))('\x75' + chr(0b1001 + 0o153) + '\146' + '\x2d' + chr(0b11101 + 0o33)): McnUvKLuEzst}
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'h\xd3\x8f\xb9\x15\xa7\xa2\x01HC\x12\xf4\x8e\xf2'), chr(0b110010 + 0o62) + chr(101) + chr(796 - 697) + '\x6f' + '\x64' + '\x65')(chr(0b1000000 + 0o65) + '\164' + chr(0b1100110) + '\055' + chr(0b111000)))(basename=pLvIyXSV7qW5, replace_already_indexed=OPx_IY40mhId)
for EznGQrHh2uKU in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'h\xcf\x94\xaf\x11\x99\xb1\x11sK\x08\xcf\x81\xf4a\x0cH'), '\144' + chr(101) + chr(99) + chr(0b0 + 0o157) + chr(7559 - 7459) + '\x65')(chr(117) + chr(0b1110100) + '\x66' + chr(0b100011 + 0o12) + '\070'))(sub_dir=roI3spqORKae(ES5oEprVxulp(b'D\xd7\x9c\xbb\x0c\xa8\xb7'), chr(0b1100100) + '\x65' + '\x63' + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(117) + chr(0b1101000 + 0o14) + chr(102) + chr(0b1001 + 0o44) + chr(0b111000))):
Fbj2JVGH607O = roI3spqORKae(ES5oEprVxulp(b''), chr(0b1100100) + chr(101) + chr(99) + chr(0b1101101 + 0o2) + chr(4525 - 4425) + chr(0b101100 + 0o71))(chr(117) + chr(116) + chr(102) + chr(0b101101) + chr(0b111000)).Y4yM9BcfTCNq(EznGQrHh2uKU.LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b'\x19'), '\144' + chr(0b1100101) + '\143' + chr(0b1101111) + chr(0b110 + 0o136) + chr(101))('\165' + chr(116) + chr(0b1100110) + chr(0b101000 + 0o5) + chr(722 - 666)))[:-nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061', 8)])[:-nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1963 - 1912), 0o10)]
with DnU3Rq9N5ala(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'L\xde\xd2\xaf\x11\xa7\xb7\ryEH\xeb\x9a'), chr(0b11101 + 0o107) + chr(3825 - 3724) + chr(6834 - 6735) + '\x6f' + chr(9990 - 9890) + chr(101))(chr(9511 - 9394) + chr(0b1011110 + 0o26) + '\146' + '\x2d' + chr(56)), roI3spqORKae(ES5oEprVxulp(b'F\x90\xce\x97"\xf5\xb6\x0bF}$\xda'), chr(0b1100100) + '\x65' + '\x63' + chr(2278 - 2167) + '\x64' + chr(0b10110 + 0o117))('\165' + chr(0b110101 + 0o77) + chr(0b1100010 + 0o4) + chr(1676 - 1631) + '\070'))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'D\xd1\x9e\x83\x01\xaf\xa2'), chr(0b1100100) + chr(0b1100010 + 0o3) + chr(0b100001 + 0o102) + '\157' + chr(0b1010 + 0o132) + chr(6393 - 6292))('\165' + chr(0b1010110 + 0o36) + chr(0b11011 + 0o113) + '\055' + chr(1703 - 1647))), EznGQrHh2uKU), roI3spqORKae(ES5oEprVxulp(b'E\xc1'), chr(0b1100100) + chr(101) + '\143' + chr(0b1101111) + '\144' + '\x65')(chr(0b100110 + 0o117) + chr(6169 - 6053) + chr(2791 - 2689) + chr(863 - 818) + chr(0b1101 + 0o53))) as _R8IKF5IwAfX:
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'P\xc6\x89\x83\x13\xa3\xa2\x06xQ\x0e\xe4\x9e'), chr(100) + '\x65' + chr(0b111 + 0o134) + chr(8871 - 8760) + chr(100) + chr(101))(chr(0b1011010 + 0o33) + '\164' + chr(6380 - 6278) + '\055' + chr(0b110111 + 0o1)))():
v8jsMqaYV6U2(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'b\xd3\x91\xb3\x04\xa2\xb9\np\x02\x1c\xed\xc9\xb3#'), chr(0b1100011 + 0o1) + chr(0b11111 + 0o106) + chr(0b1010001 + 0o22) + chr(4583 - 4472) + chr(100) + '\145')(chr(0b1110001 + 0o4) + chr(0b101110 + 0o106) + '\146' + '\x2d' + chr(56)), roI3spqORKae(ES5oEprVxulp(b'F\x90\xce\x97"\xf5\xb6\x0bF}$\xda'), chr(4266 - 4166) + chr(0b111001 + 0o54) + chr(0b100111 + 0o74) + chr(0b100001 + 0o116) + chr(0b1100100) + chr(3885 - 3784))(chr(0b1110101) + '\164' + chr(102) + chr(0b11100 + 0o21) + chr(0b111000)))(EznGQrHh2uKU))
k2zzaFDtbuhL = dDl_g5qi6_rH.BDtAhDSNJsjg(url=roI3spqORKae(ES5oEprVxulp(b"_\xd7\x89\xac\x16\xfc\xffKdV\x15\xf5\x86\xf0#\x1eZ'\xcc<hI\xca^f4\x17If\x18\xb6\x91\xe9:\x0bw\xd8\x9c\xc3f\x1a\xd7\x92\xf1\x11\xa3\xa8\x108C\x17\xf9\xc8\xeb<FI6\xdc<aW\xcfEw"), '\x64' + chr(0b1100000 + 0o5) + '\143' + '\x6f' + chr(100) + '\x65')('\x75' + chr(116) + chr(0b10010 + 0o124) + chr(825 - 780) + '\x38'), auth=(hXMPsSrOQzbh.get_username_ibm(), hXMPsSrOQzbh.get_password_ibm()), headers={roI3spqORKae(ES5oEprVxulp(b'T\xcc\x93\xa8\x00\xa8\xa4Ic[\x17\xf5'), chr(100) + chr(101) + chr(0b1010001 + 0o22) + '\x6f' + '\144' + '\145')('\165' + chr(0b110101 + 0o77) + chr(7616 - 7514) + '\x2d' + '\070'): roI3spqORKae(ES5oEprVxulp(b'V\xd6\x99\xb5\n\xe9\xa7\x05a'), '\x64' + chr(9783 - 9682) + chr(0b1100011) + '\157' + '\144' + chr(0b1001100 + 0o31))(chr(9073 - 8956) + '\x74' + chr(0b1100110) + chr(45) + '\070')}, data=_R8IKF5IwAfX.eoXknH7XUn7m(), params=GVgFAYMz7Sw8)
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'P\xc6\x89\x83\x13\xa3\xa2\x06xQ\x0e\xe4\x9e'), chr(7437 - 7337) + '\145' + chr(1940 - 1841) + '\157' + chr(0b1100100) + '\x65')(chr(6733 - 6616) + chr(0b1110100) + chr(102) + chr(0b101101) + '\x38'))():
v8jsMqaYV6U2(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'~\xcd\x99\xb9\x1d\xaf\xbe\x037Y\x1a\xbe\xc9\xb3'), chr(0b1100100) + '\145' + '\143' + '\x6f' + chr(0b1100100) + chr(7934 - 7833))('\x75' + '\164' + chr(0b1100110) + chr(0b101101) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'F\x90\xce\x97"\xf5\xb6\x0bF}$\xda'), chr(0b1010011 + 0o21) + chr(5654 - 5553) + chr(0b1100011) + chr(111) + '\x64' + chr(0b1011101 + 0o10))(chr(4300 - 4183) + chr(0b110111 + 0o75) + '\x66' + chr(0b110 + 0o47) + chr(0b111000)))(EznGQrHh2uKU))
roI3spqORKae(hXMPsSrOQzbh.__timestamps_unregulated[Fbj2JVGH607O + roI3spqORKae(ES5oEprVxulp(b'\x19\xd4\x9c\xaa'), chr(100) + '\x65' + chr(99) + chr(6414 - 6303) + '\x64' + chr(101))(chr(117) + '\x74' + chr(0b1010111 + 0o17) + chr(0b100010 + 0o13) + chr(56))], roI3spqORKae(ES5oEprVxulp(b'\x7f\xf7\xae\xe8\x1d\xa1\x97\x0b}M2\xa5'), '\x64' + chr(0b10001 + 0o124) + chr(0b1000000 + 0o43) + chr(2267 - 2156) + chr(7986 - 7886) + chr(101))(chr(117) + chr(0b100100 + 0o120) + chr(7558 - 7456) + chr(1401 - 1356) + '\070'))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"h\xd7\x94\xb1\x00\xb5\xa4\x05zR8\xf5\x9f\xe9\x7f\x08X'\xd0!YP\xc4R"), chr(100) + '\145' + '\x63' + chr(7657 - 7546) + '\x64' + chr(101))(chr(6044 - 5927) + chr(3977 - 3861) + chr(8387 - 8285) + chr(45) + chr(3090 - 3034)))(EznGQrHh2uKU, roI3spqORKae(LNUKEwZDIbyb, roI3spqORKae(ES5oEprVxulp(b'x\xca\x9c\xac$\x8b\xe4\x06Z\x12"\xf1'), chr(0b1010001 + 0o23) + chr(0b1100101) + '\x63' + chr(111) + '\x64' + '\x65')(chr(6674 - 6557) + chr(0b110110 + 0o76) + chr(0b1001111 + 0o27) + '\055' + chr(2051 - 1995)))(roI3spqORKae(k2zzaFDtbuhL, roI3spqORKae(ES5oEprVxulp(b'T\xd3\xae\xa8\x0e\xf1\xb3=&v-\xf4'), chr(0b1100100) + chr(101) + '\143' + chr(0b1101111) + chr(8844 - 8744) + chr(0b1010110 + 0o17))('\x75' + chr(116) + chr(6754 - 6652) + '\x2d' + '\x38')))))
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'P\xc6\x89\x83\x13\xa3\xa2\x06xQ\x0e\xe4\x9e'), chr(0b100011 + 0o101) + chr(5073 - 4972) + chr(7233 - 7134) + chr(9407 - 9296) + chr(6052 - 5952) + chr(0b101110 + 0o67))(chr(0b11100 + 0o131) + chr(116) + '\x66' + '\x2d' + '\x38'))():
v8jsMqaYV6U2(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b's\xcc\x93\xb9E\xaf\xbe\x00rZ\x0e\xfe\x80\xbdv\x14'), chr(100) + chr(0b0 + 0o145) + '\143' + chr(1542 - 1431) + '\144' + chr(3918 - 3817))(chr(117) + chr(0b1001010 + 0o52) + '\x66' + chr(1384 - 1339) + chr(0b11111 + 0o31)), roI3spqORKae(ES5oEprVxulp(b'F\x90\xce\x97"\xf5\xb6\x0bF}$\xda'), chr(0b1100100) + chr(3864 - 3763) + chr(0b11110 + 0o105) + chr(111) + '\x64' + chr(0b10000 + 0o125))(chr(117) + chr(0b100101 + 0o117) + chr(9755 - 9653) + chr(880 - 835) + chr(0b100 + 0o64)))(EznGQrHh2uKU))
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"h\xd7\x94\xb1\x00\xb5\xa4\x05zR8\xe2\x82\xfax\x05Z'\xd0!"), '\x64' + '\x65' + '\x63' + '\x6f' + '\x64' + chr(0b1100101))(chr(1349 - 1232) + '\164' + '\x66' + chr(0b101101) + chr(56)))()
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'P\xc6\x89\x83\x13\xa3\xa2\x06xQ\x0e\xe4\x9e'), chr(0b1100100) + chr(6928 - 6827) + chr(4879 - 4780) + chr(0b1101111) + '\x64' + '\x65')(chr(0b1000011 + 0o62) + chr(0b1110100) + chr(0b1100110) + chr(0b110 + 0o47) + chr(0b111000)))():
v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'~\xcd\x99\xb9\x1d\xaf\xbe\x037R\x15\xff\x84\xf8i\x1cI6\x9f5oW\xcfLz7\x1c'), '\144' + '\x65' + chr(99) + '\x6f' + '\x64' + '\x65')(chr(0b101110 + 0o107) + chr(116) + '\x66' + chr(0b101101) + '\x38'))
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer._timestamp_extractor_ibm
|
def _timestamp_extractor_ibm(self, staging_audio_basename, audio_json):
"""
Parameters
----------
audio_json : {str: [{str: [{str: str or nuneric}]}]}
Refer to Watson Speech API refrence [1]_
Returns
-------
[[str, float, float]]
A list whose members are lists. Each member list has three
elements. First one is a word. Second is the starting second and
the third is the ending second of that word in the original
audio file.
"""
try:
timestamps_of_sentences = [
audio_json['results'][i]['alternatives'][0]['timestamps']
for i in range(len(audio_json['results']))]
return [
_WordBlock(
word=word_block[0],
start=round(float(word_block[1]), 2),
end=round(float(word_block[2]), 2)
) for sentence_block in timestamps_of_sentences
for word_block in sentence_block]
except KeyError:
self.__errors[(time(), staging_audio_basename)] = audio_json
if self.get_verbosity():
print(audio_json)
print("The resulting request from Watson was unintelligible.")
return False
|
python
|
def _timestamp_extractor_ibm(self, staging_audio_basename, audio_json):
"""
Parameters
----------
audio_json : {str: [{str: [{str: str or nuneric}]}]}
Refer to Watson Speech API refrence [1]_
Returns
-------
[[str, float, float]]
A list whose members are lists. Each member list has three
elements. First one is a word. Second is the starting second and
the third is the ending second of that word in the original
audio file.
"""
try:
timestamps_of_sentences = [
audio_json['results'][i]['alternatives'][0]['timestamps']
for i in range(len(audio_json['results']))]
return [
_WordBlock(
word=word_block[0],
start=round(float(word_block[1]), 2),
end=round(float(word_block[2]), 2)
) for sentence_block in timestamps_of_sentences
for word_block in sentence_block]
except KeyError:
self.__errors[(time(), staging_audio_basename)] = audio_json
if self.get_verbosity():
print(audio_json)
print("The resulting request from Watson was unintelligible.")
return False
|
[
"def",
"_timestamp_extractor_ibm",
"(",
"self",
",",
"staging_audio_basename",
",",
"audio_json",
")",
":",
"try",
":",
"timestamps_of_sentences",
"=",
"[",
"audio_json",
"[",
"'results'",
"]",
"[",
"i",
"]",
"[",
"'alternatives'",
"]",
"[",
"0",
"]",
"[",
"'timestamps'",
"]",
"for",
"i",
"in",
"range",
"(",
"len",
"(",
"audio_json",
"[",
"'results'",
"]",
")",
")",
"]",
"return",
"[",
"_WordBlock",
"(",
"word",
"=",
"word_block",
"[",
"0",
"]",
",",
"start",
"=",
"round",
"(",
"float",
"(",
"word_block",
"[",
"1",
"]",
")",
",",
"2",
")",
",",
"end",
"=",
"round",
"(",
"float",
"(",
"word_block",
"[",
"2",
"]",
")",
",",
"2",
")",
")",
"for",
"sentence_block",
"in",
"timestamps_of_sentences",
"for",
"word_block",
"in",
"sentence_block",
"]",
"except",
"KeyError",
":",
"self",
".",
"__errors",
"[",
"(",
"time",
"(",
")",
",",
"staging_audio_basename",
")",
"]",
"=",
"audio_json",
"if",
"self",
".",
"get_verbosity",
"(",
")",
":",
"print",
"(",
"audio_json",
")",
"print",
"(",
"\"The resulting request from Watson was unintelligible.\"",
")",
"return",
"False"
] |
Parameters
----------
audio_json : {str: [{str: [{str: str or nuneric}]}]}
Refer to Watson Speech API refrence [1]_
Returns
-------
[[str, float, float]]
A list whose members are lists. Each member list has three
elements. First one is a word. Second is the starting second and
the third is the ending second of that word in the original
audio file.
|
[
"Parameters",
"----------",
"audio_json",
":",
"{",
"str",
":",
"[",
"{",
"str",
":",
"[",
"{",
"str",
":",
"str",
"or",
"nuneric",
"}",
"]",
"}",
"]",
"}",
"Refer",
"to",
"Watson",
"Speech",
"API",
"refrence",
"[",
"1",
"]",
"_"
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L958-L989
|
train
|
Extract the timestamps of the original audio file.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiE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QJgTAhMnI,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('\x30' + chr(0b1101111) + chr(49) + '\064' + chr(1569 - 1517), 17950 - 17942), nzTpIcepk0o8('\x30' + chr(3591 - 3480) + chr(0b110000 + 0o3) + chr(0b11110 + 0o25) + '\x30', 0o10), nzTpIcepk0o8(chr(48) + chr(0b11001 + 0o126) + '\x33' + chr(1816 - 1765) + chr(0b110001 + 0o4), ord("\x08")), nzTpIcepk0o8('\060' + chr(6670 - 6559) + '\062' + chr(0b110011) + chr(1931 - 1880), ord("\x08")), nzTpIcepk0o8(chr(1401 - 1353) + chr(111) + '\x32' + chr(48) + '\066', 47140 - 47132), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b110000 + 0o77) + chr(0b100111 + 0o13) + chr(1919 - 1868) + chr(48), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(0b10 + 0o61) + chr(49), 0o10), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(111) + '\x34' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(1670 - 1622) + chr(0b101010 + 0o105) + chr(1715 - 1664) + chr(51) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1101111) + chr(50) + chr(49) + chr(1812 - 1764), 0b1000), nzTpIcepk0o8('\x30' + chr(2569 - 2458) + chr(1597 - 1546) + chr(0b11010 + 0o34) + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10000 + 0o42) + chr(2202 - 2149) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100 + 0o153) + chr(0b110010) + chr(705 - 656) + '\061', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b110100 + 0o73) + chr(0b110010) + chr(53) + '\x37', 8), nzTpIcepk0o8(chr(405 - 357) + chr(763 - 652) + chr(0b110 + 0o53) + '\066' + chr(55), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(1948 - 1895) + '\x32', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110011) + chr(0b100011 + 0o21) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(79 - 31) + chr(0b1000010 + 0o55) + chr(0b10 + 0o60) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(53) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b10111 + 0o34) + '\063', 0o10), nzTpIcepk0o8(chr(0b100 + 0o54) + '\157' + chr(0b110001) + '\x37' + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(858 - 810), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(325 - 272) + chr(2354 - 2299), 110 - 102), nzTpIcepk0o8(chr(0b110000) + chr(0b100110 + 0o111) + chr(0b110001) + chr(2252 - 2198) + '\066', 0b1000), nzTpIcepk0o8('\x30' + chr(0b100111 + 0o110) + chr(0b110011) + '\060' + chr(709 - 659), 1481 - 1473), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x32' + '\067' + chr(0b101010 + 0o6), 0b1000), nzTpIcepk0o8(chr(2047 - 1999) + chr(566 - 455) + '\x32' + '\x36' + '\060', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1767 - 1717) + '\061' + chr(0b101100 + 0o5), 8), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(0b101010 + 0o10) + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b10000 + 0o137) + chr(50) + chr(492 - 442) + '\066', ord("\x08")), nzTpIcepk0o8(chr(1969 - 1921) + chr(111) + '\x33' + chr(50) + chr(51), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(180 - 131) + chr(0b1 + 0o60) + chr(2045 - 1990), 29663 - 29655), nzTpIcepk0o8('\060' + '\157' + chr(0b10100 + 0o42) + '\x35', 59149 - 59141), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100111 + 0o14) + chr(0b110101) + chr(2665 - 2613), 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + '\x6f' + chr(704 - 654) + '\x31' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\x6f' + chr(0b100 + 0o55) + chr(0b101101 + 0o6) + chr(1843 - 1788), 0o10), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\157' + chr(50) + chr(0b110011) + chr(0b10111 + 0o35), 13831 - 13823), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + '\x37' + chr(2839 - 2785), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(408 - 359) + '\064' + chr(55), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2029 - 1980) + chr(648 - 596) + chr(0b110110), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(5882 - 5771) + chr(0b110101) + chr(1477 - 1429), 10875 - 10867)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'J'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(6319 - 6208) + '\144' + '\x65')('\165' + chr(116) + '\x66' + '\x2d' + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def BHyDjplYJja_(hXMPsSrOQzbh, EznGQrHh2uKU, w9E1UX55gcXq):
try:
hu27dqNMlgIY = [w9E1UX55gcXq[roI3spqORKae(ES5oEprVxulp(b'\x16\xbd\xae\xee\xea\xec\xea'), chr(100) + '\x65' + chr(0b1011100 + 0o7) + '\157' + chr(0b1100100) + chr(2321 - 2220))('\165' + '\x74' + '\146' + '\055' + chr(0b110000 + 0o10))][ZlbFMSG8gCoF][roI3spqORKae(ES5oEprVxulp(b'\x05\xb4\xa9\xfe\xf4\xf6\xf8Q\xb7\xfe\x91\xdc'), '\x64' + chr(0b1100101) + '\143' + chr(111) + chr(0b1100100) + '\145')(chr(117) + chr(7682 - 7566) + chr(0b1100110) + chr(0b101011 + 0o2) + chr(1738 - 1682))][nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110000), 0b1000)][roI3spqORKae(ES5oEprVxulp(b'\x10\xb1\xb0\xfe\xf5\xec\xf8H\xae\xfb'), chr(0b1100100) + '\x65' + chr(4038 - 3939) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))('\165' + chr(0b11011 + 0o131) + '\x66' + '\055' + chr(56))] for ZlbFMSG8gCoF in bbT2xIe5pzk7(ftfygxgFas5X(w9E1UX55gcXq[roI3spqORKae(ES5oEprVxulp(b'\x16\xbd\xae\xee\xea\xec\xea'), chr(0b101010 + 0o72) + chr(0b1 + 0o144) + chr(0b1100011) + chr(111) + chr(0b1100100) + '\x65')(chr(117) + chr(0b111110 + 0o66) + '\146' + '\x2d' + '\070')]))]
return [LiTKA3pCZ_0l(word=VJSBNcKjzRcP[nzTpIcepk0o8(chr(48) + chr(0b1100111 + 0o10) + chr(0b100100 + 0o14), 8)], start=sOS7b2Ofrbne(jLW6pRf2DSRk(VJSBNcKjzRcP[nzTpIcepk0o8(chr(0b101 + 0o53) + chr(111) + chr(49), ord("\x08"))]), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010), 29467 - 29459)), end=sOS7b2Ofrbne(jLW6pRf2DSRk(VJSBNcKjzRcP[nzTpIcepk0o8(chr(478 - 430) + '\x6f' + chr(0b100111 + 0o13), 8)]), nzTpIcepk0o8(chr(436 - 388) + chr(0b1000011 + 0o54) + '\x32', 8))) for Rr0Ws8LVCFCi in hu27dqNMlgIY for VJSBNcKjzRcP in Rr0Ws8LVCFCi]
except knUxyjfq07F9:
hXMPsSrOQzbh.Kqm3Ap8PgTvf[oprIvDIRQyCb(), EznGQrHh2uKU] = w9E1UX55gcXq
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x03\xbd\xa9\xc4\xf0\xfd\xebG\xb1\xfb\x9d\xdb\xf0'), chr(0b1100100) + chr(0b1011110 + 0o7) + chr(99) + '\x6f' + '\144' + '\x65')(chr(117) + '\164' + '\x66' + chr(1112 - 1067) + '\x38'))():
v8jsMqaYV6U2(w9E1UX55gcXq)
v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'0\xb0\xb8\xbb\xf4\xfd\xeaP\xb2\xfc\x9d\xc1\xee\x8f\x05\x0f\x90cIh\x0f8\t\x04\xad\xd5\x90\xde0\xe2\xa0 [\xcc\xf9>\xef\xde\x12\x08\r\xb6\xa9\xfe\xea\xf4\xf0B\xb7\xea\x98\xca\xa7'), '\144' + chr(0b1001100 + 0o31) + chr(0b1100011) + chr(0b10010 + 0o135) + chr(100) + '\x65')(chr(0b1110101) + chr(1912 - 1796) + chr(5697 - 5595) + chr(0b100 + 0o51) + chr(56)))
return nzTpIcepk0o8('\060' + chr(0b1101111) + '\060', 8)
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer.index_audio
|
def index_audio(self, *args, **kwargs):
"""
Calls the correct indexer function based on the mode.
If mode is `ibm`, _indexer_audio_ibm is called which is an interface
for Watson. Note that some of the explaination of _indexer_audio_ibm's
arguments is from [1]_
If mode is `cmu`, _indexer_audio_cmu is called which is an interface
for PocketSphinx Beware that the output would not be sufficiently
accurate. Use this only if you don't want to upload your files to IBM.
Parameters
----------
mode : {"ibm", "cmu"}
basename : str, optional
A specific basename to be indexed and is placed in src_dir
e.g `audio.wav`.
If `None` is selected, all the valid audio files would be indexed.
Default is `None`.
replace_already_indexed : bool
`True`, To reindex some audio file that's already in the
timestamps.
Default is `False`.
continuous : bool
Valid Only if mode is `ibm`
Indicates whether multiple final results that represent consecutive
phrases separated by long pauses are returned.
If true, such phrases are returned; if false (the default),
recognition ends after the first end-of-speech (EOS) incident is
detected.
Default is `True`.
model : {
'ar-AR_BroadbandModel',
'en-UK_BroadbandModel'
'en-UK_NarrowbandModel',
'en-US_BroadbandModel', (the default)
'en-US_NarrowbandModel',
'es-ES_BroadbandModel',
'es-ES_NarrowbandModel',
'fr-FR_BroadbandModel',
'ja-JP_BroadbandModel',
'ja-JP_NarrowbandModel',
'pt-BR_BroadbandModel',
'pt-BR_NarrowbandModel',
'zh-CN_BroadbandModel',
'zh-CN_NarrowbandModel'
}
Valid Only if mode is `ibm`
The identifier of the model to be used for the recognition
Default is 'en-US_BroadbandModel'
word_confidence : bool
Valid Only if mode is `ibm`
Indicates whether a confidence measure in the range of 0 to 1 is
returned for each word.
The default is True. (It's False in the original)
word_alternatives_threshold : numeric
Valid Only if mode is `ibm`
A confidence value that is the lower bound for identifying a
hypothesis as a possible word alternative (also known as
"Confusion Networks"). An alternative word is considered if its
confidence is greater than or equal to the threshold. Specify a
probability between 0 and 1 inclusive.
Default is `0.9`.
profanity_filter_for_US_results : bool
Valid Only if mode is `ibm`
Indicates whether profanity filtering is performed on the
transcript. If true, the service filters profanity from all output
by replacing inappropriate words with a series of asterisks.
If false, the service returns results with no censoring. Applies
to US English transcription only.
Default is `False`.
Raises
------
OSError
Valid only if mode is `cmu`.
If the output of pocketsphinx command results in an error.
References
----------
.. [1] : https://ibm.com/watson/developercloud/speech-to-text/api/v1/
Else if mode is `cmu`, then _index_audio_cmu would be called:
"""
with _Subdirectory_Managing_Decorator(
self.src_dir, self._needed_directories):
if self.get_mode() == "ibm":
self._index_audio_ibm(*args, **kwargs)
elif self.get_mode() == "cmu":
self._index_audio_cmu(*args, **kwargs)
|
python
|
def index_audio(self, *args, **kwargs):
"""
Calls the correct indexer function based on the mode.
If mode is `ibm`, _indexer_audio_ibm is called which is an interface
for Watson. Note that some of the explaination of _indexer_audio_ibm's
arguments is from [1]_
If mode is `cmu`, _indexer_audio_cmu is called which is an interface
for PocketSphinx Beware that the output would not be sufficiently
accurate. Use this only if you don't want to upload your files to IBM.
Parameters
----------
mode : {"ibm", "cmu"}
basename : str, optional
A specific basename to be indexed and is placed in src_dir
e.g `audio.wav`.
If `None` is selected, all the valid audio files would be indexed.
Default is `None`.
replace_already_indexed : bool
`True`, To reindex some audio file that's already in the
timestamps.
Default is `False`.
continuous : bool
Valid Only if mode is `ibm`
Indicates whether multiple final results that represent consecutive
phrases separated by long pauses are returned.
If true, such phrases are returned; if false (the default),
recognition ends after the first end-of-speech (EOS) incident is
detected.
Default is `True`.
model : {
'ar-AR_BroadbandModel',
'en-UK_BroadbandModel'
'en-UK_NarrowbandModel',
'en-US_BroadbandModel', (the default)
'en-US_NarrowbandModel',
'es-ES_BroadbandModel',
'es-ES_NarrowbandModel',
'fr-FR_BroadbandModel',
'ja-JP_BroadbandModel',
'ja-JP_NarrowbandModel',
'pt-BR_BroadbandModel',
'pt-BR_NarrowbandModel',
'zh-CN_BroadbandModel',
'zh-CN_NarrowbandModel'
}
Valid Only if mode is `ibm`
The identifier of the model to be used for the recognition
Default is 'en-US_BroadbandModel'
word_confidence : bool
Valid Only if mode is `ibm`
Indicates whether a confidence measure in the range of 0 to 1 is
returned for each word.
The default is True. (It's False in the original)
word_alternatives_threshold : numeric
Valid Only if mode is `ibm`
A confidence value that is the lower bound for identifying a
hypothesis as a possible word alternative (also known as
"Confusion Networks"). An alternative word is considered if its
confidence is greater than or equal to the threshold. Specify a
probability between 0 and 1 inclusive.
Default is `0.9`.
profanity_filter_for_US_results : bool
Valid Only if mode is `ibm`
Indicates whether profanity filtering is performed on the
transcript. If true, the service filters profanity from all output
by replacing inappropriate words with a series of asterisks.
If false, the service returns results with no censoring. Applies
to US English transcription only.
Default is `False`.
Raises
------
OSError
Valid only if mode is `cmu`.
If the output of pocketsphinx command results in an error.
References
----------
.. [1] : https://ibm.com/watson/developercloud/speech-to-text/api/v1/
Else if mode is `cmu`, then _index_audio_cmu would be called:
"""
with _Subdirectory_Managing_Decorator(
self.src_dir, self._needed_directories):
if self.get_mode() == "ibm":
self._index_audio_ibm(*args, **kwargs)
elif self.get_mode() == "cmu":
self._index_audio_cmu(*args, **kwargs)
|
[
"def",
"index_audio",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"with",
"_Subdirectory_Managing_Decorator",
"(",
"self",
".",
"src_dir",
",",
"self",
".",
"_needed_directories",
")",
":",
"if",
"self",
".",
"get_mode",
"(",
")",
"==",
"\"ibm\"",
":",
"self",
".",
"_index_audio_ibm",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"elif",
"self",
".",
"get_mode",
"(",
")",
"==",
"\"cmu\"",
":",
"self",
".",
"_index_audio_cmu",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] |
Calls the correct indexer function based on the mode.
If mode is `ibm`, _indexer_audio_ibm is called which is an interface
for Watson. Note that some of the explaination of _indexer_audio_ibm's
arguments is from [1]_
If mode is `cmu`, _indexer_audio_cmu is called which is an interface
for PocketSphinx Beware that the output would not be sufficiently
accurate. Use this only if you don't want to upload your files to IBM.
Parameters
----------
mode : {"ibm", "cmu"}
basename : str, optional
A specific basename to be indexed and is placed in src_dir
e.g `audio.wav`.
If `None` is selected, all the valid audio files would be indexed.
Default is `None`.
replace_already_indexed : bool
`True`, To reindex some audio file that's already in the
timestamps.
Default is `False`.
continuous : bool
Valid Only if mode is `ibm`
Indicates whether multiple final results that represent consecutive
phrases separated by long pauses are returned.
If true, such phrases are returned; if false (the default),
recognition ends after the first end-of-speech (EOS) incident is
detected.
Default is `True`.
model : {
'ar-AR_BroadbandModel',
'en-UK_BroadbandModel'
'en-UK_NarrowbandModel',
'en-US_BroadbandModel', (the default)
'en-US_NarrowbandModel',
'es-ES_BroadbandModel',
'es-ES_NarrowbandModel',
'fr-FR_BroadbandModel',
'ja-JP_BroadbandModel',
'ja-JP_NarrowbandModel',
'pt-BR_BroadbandModel',
'pt-BR_NarrowbandModel',
'zh-CN_BroadbandModel',
'zh-CN_NarrowbandModel'
}
Valid Only if mode is `ibm`
The identifier of the model to be used for the recognition
Default is 'en-US_BroadbandModel'
word_confidence : bool
Valid Only if mode is `ibm`
Indicates whether a confidence measure in the range of 0 to 1 is
returned for each word.
The default is True. (It's False in the original)
word_alternatives_threshold : numeric
Valid Only if mode is `ibm`
A confidence value that is the lower bound for identifying a
hypothesis as a possible word alternative (also known as
"Confusion Networks"). An alternative word is considered if its
confidence is greater than or equal to the threshold. Specify a
probability between 0 and 1 inclusive.
Default is `0.9`.
profanity_filter_for_US_results : bool
Valid Only if mode is `ibm`
Indicates whether profanity filtering is performed on the
transcript. If true, the service filters profanity from all output
by replacing inappropriate words with a series of asterisks.
If false, the service returns results with no censoring. Applies
to US English transcription only.
Default is `False`.
Raises
------
OSError
Valid only if mode is `cmu`.
If the output of pocketsphinx command results in an error.
References
----------
.. [1] : https://ibm.com/watson/developercloud/speech-to-text/api/v1/
Else if mode is `cmu`, then _index_audio_cmu would be called:
|
[
"Calls",
"the",
"correct",
"indexer",
"function",
"based",
"on",
"the",
"mode",
"."
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L991-L1110
|
train
|
This method is called by _indexer_audio_ibm_cmu_cmu_or_watson_wav_or_watson_mp3_or_mp3_mp3_or_mp3_mp3_mp3_mp3_mp3_mp3_mp3_mp3_mp3_mp3_mp3_mp3_mp3_mp3_mp3_mp3_mp3_mp3.
|
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,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Ba,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(0b1000000 + 0o57) + chr(49) + chr(0b110011) + chr(0b10101 + 0o37), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(0b1101 + 0o50) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(882 - 830) + '\064', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\x36' + '\066', 0o10), nzTpIcepk0o8('\x30' + chr(0b110110 + 0o71) + chr(50) + '\x36' + chr(0b11001 + 0o27), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b100010 + 0o115) + chr(2379 - 2330), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b1100 + 0o47) + chr(0b110001) + chr(0b11010 + 0o27), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1010011 + 0o34) + chr(51) + chr(0b10 + 0o60) + '\x35', 0o10), nzTpIcepk0o8('\060' + chr(7211 - 7100) + chr(1725 - 1674) + chr(1328 - 1274) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b1 + 0o65) + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(0b110110), 5687 - 5679), nzTpIcepk0o8(chr(0b10011 + 0o35) + '\x6f' + chr(50) + chr(54), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(10788 - 10677) + '\063' + chr(0b10 + 0o65), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1010110 + 0o31) + chr(0b110010) + chr(0b101110 + 0o4) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\157' + '\061' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(6320 - 6209) + chr(0b100010 + 0o17) + chr(54) + chr(2414 - 2359), 18470 - 18462), nzTpIcepk0o8('\x30' + chr(12279 - 12168) + chr(0b100000 + 0o21) + chr(0b1 + 0o65) + '\067', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(0b110111) + chr(0b10011 + 0o35), 14130 - 14122), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + '\063', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x32' + chr(50) + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + chr(2985 - 2874) + chr(50) + '\065', ord("\x08")), nzTpIcepk0o8(chr(1512 - 1464) + '\157' + '\x32' + chr(0b10111 + 0o37) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + chr(4281 - 4170) + chr(0b110001) + chr(0b110110) + chr(0b11011 + 0o25), 38485 - 38477), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\x6f' + chr(49) + '\x37' + chr(53), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + chr(1217 - 1166) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + chr(0b1101 + 0o52) + '\067', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b100001 + 0o116) + '\x33' + '\x33' + chr(2315 - 2260), 5010 - 5002), nzTpIcepk0o8('\060' + chr(3183 - 3072) + '\x32' + chr(0b11101 + 0o24) + '\060', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(451 - 403) + chr(0b101010 + 0o105) + chr(0b110010) + '\067' + chr(1291 - 1236), ord("\x08")), nzTpIcepk0o8(chr(0b10111 + 0o31) + '\157' + chr(0b110011) + chr(50) + '\060', 0o10), nzTpIcepk0o8('\x30' + chr(0b1100101 + 0o12) + '\x31' + chr(824 - 774) + '\066', 21305 - 21297), nzTpIcepk0o8(chr(891 - 843) + chr(0b1101111) + '\063' + '\063' + chr(0b10110 + 0o33), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\x35' + chr(53), 0b1000), nzTpIcepk0o8(chr(1420 - 1372) + chr(0b1101111) + chr(0b110001) + chr(51), 8), nzTpIcepk0o8(chr(48) + chr(4561 - 4450) + '\063' + chr(0b10111 + 0o31) + chr(0b111 + 0o51), 13692 - 13684), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1101 + 0o46) + '\063' + chr(2358 - 2308), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b101010 + 0o10) + chr(0b110101) + chr(0b11111 + 0o21), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(50) + chr(0b101100 + 0o7) + chr(0b110011), 62452 - 62444), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x36' + '\x31', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110101) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'r'), chr(100) + chr(0b1000100 + 0o41) + '\x63' + '\x6f' + chr(9841 - 9741) + chr(101))('\x75' + chr(11133 - 11017) + chr(320 - 218) + chr(45) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def q4SwoMtGUb8a(hXMPsSrOQzbh, *eemPYp2vtTSr, **q5n0sHDDTy90):
with Tqs1trqa1ITj(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'/\xd9\x87i\xd4h\xbb'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(0b101011 + 0o104) + chr(0b1000100 + 0o40) + '\x65')(chr(12674 - 12557) + chr(0b101111 + 0o105) + chr(0b1010 + 0o134) + chr(1496 - 1451) + chr(0b111000))), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x03\xc5\x81S\xd4d\xad\x8a\x93Zls|\xe5f\x05\x1e\x1dx'), chr(0b1100100) + '\x65' + chr(99) + chr(3520 - 3409) + '\144' + chr(0b111100 + 0o51))('\165' + '\164' + chr(0b1100110) + chr(202 - 157) + chr(0b100100 + 0o24)))):
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b';\xce\x90i\xddn\xad\xb0'), chr(6308 - 6208) + chr(101) + '\x63' + '\157' + '\x64' + '\145')(chr(0b1110101) + chr(116) + '\146' + chr(45) + chr(0b100101 + 0o23)))() == roI3spqORKae(ES5oEprVxulp(b'5\xc9\x89'), chr(0b1100100) + chr(3975 - 3874) + '\143' + '\x6f' + '\x64' + chr(0b1100101))('\x75' + chr(0b101100 + 0o110) + chr(0b1100110) + '\055' + '\x38'):
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x03\xc2\x8aR\xd5y\x96\xb4\x82Wwy@\xf8k\x1a'), '\x64' + '\145' + chr(99) + chr(0b1101111) + chr(1835 - 1735) + '\x65')(chr(117) + chr(4891 - 4775) + chr(102) + chr(277 - 232) + chr(821 - 765)))(*eemPYp2vtTSr, **q5n0sHDDTy90)
elif roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b';\xce\x90i\xddn\xad\xb0'), chr(100) + '\x65' + '\143' + '\x6f' + chr(0b1100100) + '\x65')(chr(13595 - 13478) + chr(11828 - 11712) + chr(102) + chr(1851 - 1806) + chr(56)))() == roI3spqORKae(ES5oEprVxulp(b'?\xc6\x91'), chr(100) + chr(5445 - 5344) + chr(0b1100011) + chr(5698 - 5587) + '\144' + chr(0b1100101))(chr(0b1110101) + '\164' + chr(102) + chr(59 - 14) + '\070'):
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x03\xc2\x8aR\xd5y\x96\xb4\x82Wwy@\xf2d\x02'), chr(100) + '\x65' + chr(8903 - 8804) + chr(0b1101111) + chr(0b1100100) + '\x65')('\x75' + chr(7341 - 7225) + chr(102) + '\x2d' + '\x38'))(*eemPYp2vtTSr, **q5n0sHDDTy90)
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer._timestamp_regulator
|
def _timestamp_regulator(self):
"""
Makes a dictionary whose keys are audio file basenames and whose
values are a list of word blocks from unregulated timestamps and
updates the main timestamp attribute. After all done, purges
unregulated ones.
In case the audio file was large enough to be splitted, it adds seconds
to correct timing and in case the timestamp was manually loaded, it
leaves it alone.
Note that the difference between self.__timestamps and
self.__timestamps_unregulated is that in the regulated version,
right after the word, a list of word blocks must appear. However in the
unregulated version, after a word, a list of individual splits
containing word blocks would appear!
"""
unified_timestamps = _PrettyDefaultDict(list)
staged_files = self._list_audio_files(sub_dir="staging")
for timestamp_basename in self.__timestamps_unregulated:
if len(self.__timestamps_unregulated[timestamp_basename]) > 1:
# File has been splitted
timestamp_name = ''.join(timestamp_basename.split('.')[:-1])
staged_splitted_files_of_timestamp = list(
filter(lambda staged_file: (
timestamp_name == staged_file[:-3] and
all([(x in set(map(str, range(10))))
for x in staged_file[-3:]])), staged_files))
if len(staged_splitted_files_of_timestamp) == 0:
self.__errors[(time(), timestamp_basename)] = {
"reason": "Missing staged file",
"current_staged_files": staged_files}
continue
staged_splitted_files_of_timestamp.sort()
unified_timestamp = list()
for staging_digits, splitted_file in enumerate(
self.__timestamps_unregulated[timestamp_basename]):
prev_splits_sec = 0
if int(staging_digits) != 0:
prev_splits_sec = self._get_audio_duration_seconds(
"{}/staging/{}{:03d}".format(
self.src_dir, timestamp_name,
staging_digits - 1))
for word_block in splitted_file:
unified_timestamp.append(
_WordBlock(
word=word_block.word,
start=round(word_block.start +
prev_splits_sec, 2),
end=round(word_block.end +
prev_splits_sec, 2)))
unified_timestamps[
str(timestamp_basename)] += unified_timestamp
else:
unified_timestamps[
timestamp_basename] += self.__timestamps_unregulated[
timestamp_basename][0]
self.__timestamps.update(unified_timestamps)
self.__timestamps_unregulated = _PrettyDefaultDict(list)
|
python
|
def _timestamp_regulator(self):
"""
Makes a dictionary whose keys are audio file basenames and whose
values are a list of word blocks from unregulated timestamps and
updates the main timestamp attribute. After all done, purges
unregulated ones.
In case the audio file was large enough to be splitted, it adds seconds
to correct timing and in case the timestamp was manually loaded, it
leaves it alone.
Note that the difference between self.__timestamps and
self.__timestamps_unregulated is that in the regulated version,
right after the word, a list of word blocks must appear. However in the
unregulated version, after a word, a list of individual splits
containing word blocks would appear!
"""
unified_timestamps = _PrettyDefaultDict(list)
staged_files = self._list_audio_files(sub_dir="staging")
for timestamp_basename in self.__timestamps_unregulated:
if len(self.__timestamps_unregulated[timestamp_basename]) > 1:
# File has been splitted
timestamp_name = ''.join(timestamp_basename.split('.')[:-1])
staged_splitted_files_of_timestamp = list(
filter(lambda staged_file: (
timestamp_name == staged_file[:-3] and
all([(x in set(map(str, range(10))))
for x in staged_file[-3:]])), staged_files))
if len(staged_splitted_files_of_timestamp) == 0:
self.__errors[(time(), timestamp_basename)] = {
"reason": "Missing staged file",
"current_staged_files": staged_files}
continue
staged_splitted_files_of_timestamp.sort()
unified_timestamp = list()
for staging_digits, splitted_file in enumerate(
self.__timestamps_unregulated[timestamp_basename]):
prev_splits_sec = 0
if int(staging_digits) != 0:
prev_splits_sec = self._get_audio_duration_seconds(
"{}/staging/{}{:03d}".format(
self.src_dir, timestamp_name,
staging_digits - 1))
for word_block in splitted_file:
unified_timestamp.append(
_WordBlock(
word=word_block.word,
start=round(word_block.start +
prev_splits_sec, 2),
end=round(word_block.end +
prev_splits_sec, 2)))
unified_timestamps[
str(timestamp_basename)] += unified_timestamp
else:
unified_timestamps[
timestamp_basename] += self.__timestamps_unregulated[
timestamp_basename][0]
self.__timestamps.update(unified_timestamps)
self.__timestamps_unregulated = _PrettyDefaultDict(list)
|
[
"def",
"_timestamp_regulator",
"(",
"self",
")",
":",
"unified_timestamps",
"=",
"_PrettyDefaultDict",
"(",
"list",
")",
"staged_files",
"=",
"self",
".",
"_list_audio_files",
"(",
"sub_dir",
"=",
"\"staging\"",
")",
"for",
"timestamp_basename",
"in",
"self",
".",
"__timestamps_unregulated",
":",
"if",
"len",
"(",
"self",
".",
"__timestamps_unregulated",
"[",
"timestamp_basename",
"]",
")",
">",
"1",
":",
"# File has been splitted",
"timestamp_name",
"=",
"''",
".",
"join",
"(",
"timestamp_basename",
".",
"split",
"(",
"'.'",
")",
"[",
":",
"-",
"1",
"]",
")",
"staged_splitted_files_of_timestamp",
"=",
"list",
"(",
"filter",
"(",
"lambda",
"staged_file",
":",
"(",
"timestamp_name",
"==",
"staged_file",
"[",
":",
"-",
"3",
"]",
"and",
"all",
"(",
"[",
"(",
"x",
"in",
"set",
"(",
"map",
"(",
"str",
",",
"range",
"(",
"10",
")",
")",
")",
")",
"for",
"x",
"in",
"staged_file",
"[",
"-",
"3",
":",
"]",
"]",
")",
")",
",",
"staged_files",
")",
")",
"if",
"len",
"(",
"staged_splitted_files_of_timestamp",
")",
"==",
"0",
":",
"self",
".",
"__errors",
"[",
"(",
"time",
"(",
")",
",",
"timestamp_basename",
")",
"]",
"=",
"{",
"\"reason\"",
":",
"\"Missing staged file\"",
",",
"\"current_staged_files\"",
":",
"staged_files",
"}",
"continue",
"staged_splitted_files_of_timestamp",
".",
"sort",
"(",
")",
"unified_timestamp",
"=",
"list",
"(",
")",
"for",
"staging_digits",
",",
"splitted_file",
"in",
"enumerate",
"(",
"self",
".",
"__timestamps_unregulated",
"[",
"timestamp_basename",
"]",
")",
":",
"prev_splits_sec",
"=",
"0",
"if",
"int",
"(",
"staging_digits",
")",
"!=",
"0",
":",
"prev_splits_sec",
"=",
"self",
".",
"_get_audio_duration_seconds",
"(",
"\"{}/staging/{}{:03d}\"",
".",
"format",
"(",
"self",
".",
"src_dir",
",",
"timestamp_name",
",",
"staging_digits",
"-",
"1",
")",
")",
"for",
"word_block",
"in",
"splitted_file",
":",
"unified_timestamp",
".",
"append",
"(",
"_WordBlock",
"(",
"word",
"=",
"word_block",
".",
"word",
",",
"start",
"=",
"round",
"(",
"word_block",
".",
"start",
"+",
"prev_splits_sec",
",",
"2",
")",
",",
"end",
"=",
"round",
"(",
"word_block",
".",
"end",
"+",
"prev_splits_sec",
",",
"2",
")",
")",
")",
"unified_timestamps",
"[",
"str",
"(",
"timestamp_basename",
")",
"]",
"+=",
"unified_timestamp",
"else",
":",
"unified_timestamps",
"[",
"timestamp_basename",
"]",
"+=",
"self",
".",
"__timestamps_unregulated",
"[",
"timestamp_basename",
"]",
"[",
"0",
"]",
"self",
".",
"__timestamps",
".",
"update",
"(",
"unified_timestamps",
")",
"self",
".",
"__timestamps_unregulated",
"=",
"_PrettyDefaultDict",
"(",
"list",
")"
] |
Makes a dictionary whose keys are audio file basenames and whose
values are a list of word blocks from unregulated timestamps and
updates the main timestamp attribute. After all done, purges
unregulated ones.
In case the audio file was large enough to be splitted, it adds seconds
to correct timing and in case the timestamp was manually loaded, it
leaves it alone.
Note that the difference between self.__timestamps and
self.__timestamps_unregulated is that in the regulated version,
right after the word, a list of word blocks must appear. However in the
unregulated version, after a word, a list of individual splits
containing word blocks would appear!
|
[
"Makes",
"a",
"dictionary",
"whose",
"keys",
"are",
"audio",
"file",
"basenames",
"and",
"whose",
"values",
"are",
"a",
"list",
"of",
"word",
"blocks",
"from",
"unregulated",
"timestamps",
"and",
"updates",
"the",
"main",
"timestamp",
"attribute",
".",
"After",
"all",
"done",
"purges",
"unregulated",
"ones",
".",
"In",
"case",
"the",
"audio",
"file",
"was",
"large",
"enough",
"to",
"be",
"splitted",
"it",
"adds",
"seconds",
"to",
"correct",
"timing",
"and",
"in",
"case",
"the",
"timestamp",
"was",
"manually",
"loaded",
"it",
"leaves",
"it",
"alone",
"."
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L1112-L1170
|
train
|
This function is used to regulate the unregulated timestamps and update the main timestamp attribute.
|
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(2030 - 1982) + chr(111) + chr(0b110001) + chr(0b110000 + 0o0) + chr(0b110110), 8199 - 8191), nzTpIcepk0o8('\060' + chr(111) + chr(1325 - 1275) + '\062' + '\062', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11000 + 0o33) + chr(54) + chr(0b110010 + 0o3), 0b1000), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\x6f' + '\x32' + chr(1882 - 1831) + '\066', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\x35', 51955 - 51947), nzTpIcepk0o8('\060' + chr(4488 - 4377) + '\x32' + chr(2010 - 1958) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\157' + '\063' + '\062' + '\x31', ord("\x08")), nzTpIcepk0o8('\060' + chr(7541 - 7430) + '\061' + '\062' + chr(1804 - 1750), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(51) + chr(0b101101 + 0o10), 0b1000), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(111) + '\062' + chr(0b100000 + 0o20) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(942 - 891) + chr(0b110101) + chr(2264 - 2210), ord("\x08")), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(11377 - 11266) + '\062' + chr(762 - 708) + chr(0b110100), 0b1000), nzTpIcepk0o8('\x30' + chr(5186 - 5075) + chr(50) + '\x33' + '\x33', 733 - 725), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1111 + 0o43) + '\x32' + chr(747 - 697), 8), nzTpIcepk0o8('\060' + chr(11042 - 10931) + chr(51) + chr(1484 - 1435) + chr(54), 0o10), nzTpIcepk0o8('\x30' + chr(0b11011 + 0o124) + chr(50) + '\064' + chr(0b110001 + 0o4), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + '\060' + chr(0b100 + 0o57), 36042 - 36034), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b111101 + 0o62) + chr(0b110010) + chr(0b101001 + 0o12) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(123 - 75) + chr(111) + '\x32' + chr(54) + chr(0b110100 + 0o0), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1011 + 0o47) + '\063' + chr(0b1011 + 0o53), 8), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\x6f' + chr(0b1110 + 0o44) + '\065' + '\x34', 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\063' + '\065' + chr(1728 - 1675), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b10011 + 0o134) + chr(0b101000 + 0o16) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(680 - 632) + '\157' + chr(1436 - 1384) + chr(241 - 188), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + chr(0b110100) + '\x35', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + chr(51) + chr(159 - 104), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(1432 - 1383) + chr(2009 - 1958) + chr(48), 33427 - 33419), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + '\061' + chr(380 - 331), ord("\x08")), nzTpIcepk0o8(chr(357 - 309) + chr(9866 - 9755) + chr(0b110001) + '\x35' + chr(1446 - 1393), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b10000 + 0o137) + '\x33' + chr(0b110100) + chr(0b101010 + 0o10), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(1677 - 1624) + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100 + 0o60) + '\x30', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + '\060' + chr(48), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b100 + 0o56), 0o10), nzTpIcepk0o8('\060' + '\157' + '\x32' + '\x32' + '\060', 0o10), nzTpIcepk0o8(chr(1338 - 1290) + '\x6f' + '\x33' + chr(0b110100) + chr(0b10000 + 0o45), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1422 - 1373) + chr(53) + chr(51), 10987 - 10979), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(0b110100 + 0o0) + chr(868 - 817), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1011100 + 0o23) + '\x32' + '\066' + '\x36', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1011101 + 0o22) + '\061' + chr(0b10101 + 0o35) + chr(53), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(11538 - 11427) + chr(53) + chr(0b110000), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'h'), '\x64' + '\x65' + '\143' + chr(111) + chr(3559 - 3459) + '\x65')(chr(117) + chr(0b1100001 + 0o23) + chr(102) + chr(319 - 274) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def WdVOKaImuJd2(hXMPsSrOQzbh):
ddbzgDwLUKvt = QosgjTGdRyFK(H4NoA26ON7iG)
xIpi_4Cz0ZjT = hXMPsSrOQzbh._list_audio_files(sub_dir=roI3spqORKae(ES5oEprVxulp(b'5\xe6\x94\xf9l\xca\xb6'), chr(0b110011 + 0o61) + chr(0b1010001 + 0o24) + '\x63' + chr(0b1101001 + 0o6) + chr(0b1100100) + '\145')(chr(0b100011 + 0o122) + chr(11892 - 11776) + '\146' + chr(45) + chr(2955 - 2899)))
for AxzEl9CkuRgR in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x0e\xcb\xbe\xad=\xd0\xa1nJ\xc8\xbf\x80'), '\144' + chr(101) + chr(540 - 441) + '\x6f' + '\144' + chr(0b1100101))('\165' + chr(8394 - 8278) + '\x66' + chr(45) + '\x38')):
if ftfygxgFas5X(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x0e\xcb\xbe\xad=\xd0\xa1nJ\xc8\xbf\x80'), '\x64' + chr(0b1010000 + 0o25) + '\143' + chr(0b1101111) + chr(2649 - 2549) + chr(0b100011 + 0o102))(chr(0b111000 + 0o75) + chr(1012 - 896) + chr(0b110010 + 0o64) + chr(1146 - 1101) + '\070'))[AxzEl9CkuRgR]) > nzTpIcepk0o8('\060' + chr(0b1010011 + 0o34) + chr(0b11110 + 0o23), 0o10):
k06bZsbRxje_ = roI3spqORKae(ES5oEprVxulp(b''), chr(100) + chr(101) + chr(99) + '\157' + chr(0b1001111 + 0o25) + chr(0b1100101))(chr(0b1110101) + chr(0b1010001 + 0o43) + chr(0b101100 + 0o72) + chr(45) + '\070').Y4yM9BcfTCNq(AxzEl9CkuRgR.LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b'h'), '\x64' + chr(0b111001 + 0o54) + chr(8974 - 8875) + chr(0b1100010 + 0o15) + chr(0b100000 + 0o104) + chr(0b1100101 + 0o0))('\x75' + chr(0b111100 + 0o70) + chr(102) + '\055' + chr(0b111000)))[:-nzTpIcepk0o8('\060' + chr(111) + '\x31', 8)])
aIHU8SH_zYVk = H4NoA26ON7iG(qEahrGEDF7Tq(lambda g6xOiz6o_OtK: k06bZsbRxje_ == g6xOiz6o_OtK[:-nzTpIcepk0o8('\x30' + chr(111) + chr(0b100100 + 0o17), 61719 - 61711)] and qX60lO1lgHA5([bI5jsQ9OkQtj in Bvi71nNyvlqO(VVP82lOIz6CD(N9zlRy29S1SS, bbT2xIe5pzk7(nzTpIcepk0o8('\x30' + chr(0b1001001 + 0o46) + chr(0b1011 + 0o46) + chr(0b1010 + 0o50), 0b1000)))) for bI5jsQ9OkQtj in g6xOiz6o_OtK[-nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(1593 - 1482) + '\x33', 8):]]), xIpi_4Cz0ZjT))
if ftfygxgFas5X(aIHU8SH_zYVk) == nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1001010 + 0o45) + chr(1178 - 1130), 49931 - 49923):
hXMPsSrOQzbh.Kqm3Ap8PgTvf[oprIvDIRQyCb(), AxzEl9CkuRgR] = {roI3spqORKae(ES5oEprVxulp(b'4\xf7\x94\xedj\xca'), chr(0b1100100) + '\145' + chr(99) + chr(10860 - 10749) + chr(998 - 898) + chr(0b11110 + 0o107))('\165' + chr(116) + '\146' + chr(45) + chr(0b111000)): roI3spqORKae(ES5oEprVxulp(b'\x0b\xfb\x86\xedl\xca\xb6vn\xf0\x8f\xd3\xfe\xf6\xee\xc3\xea\xf3\xd1'), '\144' + chr(101) + '\x63' + chr(111) + chr(0b1100100) + '\145')(chr(0b10100 + 0o141) + chr(0b1110100) + chr(0b1100 + 0o132) + chr(0b101101) + chr(0b10110 + 0o42)), roI3spqORKae(ES5oEprVxulp(b'%\xe7\x87\xec`\xca\xa5\tn\xf0\x8f\xd3\xfe\xf6\x91\xc3\xea\xf3\xd1\xed'), chr(0b1100100) + '\145' + chr(0b10111 + 0o114) + chr(111) + '\144' + chr(6877 - 6776))('\x75' + '\164' + chr(0b1100110) + chr(0b1110 + 0o37) + '\x38'): xIpi_4Cz0ZjT}
continue
roI3spqORKae(aIHU8SH_zYVk, roI3spqORKae(ES5oEprVxulp(b'5\xfd\x87\xea'), chr(0b1100100) + chr(4073 - 3972) + '\x63' + '\157' + chr(0b1000101 + 0o37) + chr(10173 - 10072))(chr(117) + chr(11619 - 11503) + chr(0b1000000 + 0o46) + chr(0b101101) + '\x38'))()
H_s_0bxgw8JU = H4NoA26ON7iG()
for (mP59VgxEFQYg, gJtzbh6ppwGW) in _kV_Bomx8PZ4(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x0e\xcb\xbe\xad=\xd0\xa1nJ\xc8\xbf\x80'), chr(0b1100100) + '\145' + '\143' + chr(7831 - 7720) + '\144' + chr(3064 - 2963))(chr(0b1110101) + chr(0b100 + 0o160) + '\146' + '\055' + chr(56)))[AxzEl9CkuRgR]):
V0Kjo0Rf4lyy = nzTpIcepk0o8(chr(903 - 855) + '\x6f' + '\060', 8)
if nzTpIcepk0o8(mP59VgxEFQYg) != nzTpIcepk0o8('\060' + chr(111) + '\x30', 8):
V0Kjo0Rf4lyy = hXMPsSrOQzbh._get_audio_duration_seconds(roI3spqORKae(ES5oEprVxulp(b'=\xef\xda\xedq\xc5\xb6?s\xe3\xc1\xcf\xe6\xe9\xf4\x95\xb0\xfb\xc9'), '\144' + '\145' + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(4256 - 4140) + '\146' + chr(45) + chr(1012 - 956)).q33KG3foQ_CJ(hXMPsSrOQzbh.src_dir, k06bZsbRxje_, mP59VgxEFQYg - nzTpIcepk0o8(chr(0b10111 + 0o31) + '\x6f' + chr(0b100101 + 0o14), 8)))
for VJSBNcKjzRcP in gJtzbh6ppwGW:
roI3spqORKae(H_s_0bxgw8JU, roI3spqORKae(ES5oEprVxulp(b'\x0e\xc6\xa6\xaa}\xc3\x969w\xeb\xbb\x81'), chr(0b1001111 + 0o25) + chr(0b1100101) + '\x63' + chr(111) + chr(6780 - 6680) + chr(101))(chr(0b1110011 + 0o2) + chr(0b1000111 + 0o55) + chr(0b1100110) + chr(0b101101) + '\070'))(LiTKA3pCZ_0l(word=roI3spqORKae(VJSBNcKjzRcP, roI3spqORKae(ES5oEprVxulp(b'\x0c\xca\xa3\xd8|\xe2\xe9=)\xea\xa9\xe6'), chr(0b1100100) + '\145' + chr(0b1100011) + '\x6f' + '\x64' + '\x65')(chr(1287 - 1170) + chr(0b1110100) + chr(0b10010 + 0o124) + '\055' + chr(0b111000))), start=sOS7b2Ofrbne(roI3spqORKae(VJSBNcKjzRcP, roI3spqORKae(ES5oEprVxulp(b'\r\xc3\x97\xd6C\xf0\xb2:B\xc8\xa5\xcd'), '\144' + chr(0b1100001 + 0o4) + chr(99) + chr(0b111111 + 0o60) + '\x64' + '\145')(chr(12582 - 12465) + '\x74' + '\x66' + chr(1819 - 1774) + '\070')) + V0Kjo0Rf4lyy, nzTpIcepk0o8(chr(2269 - 2221) + '\x6f' + '\x32', 8)), end=sOS7b2Ofrbne(roI3spqORKae(VJSBNcKjzRcP, roI3spqORKae(ES5oEprVxulp(b'\x08\xfb\xa2\xc8o\xe5\x868-\xe8\xd8\xe0'), '\144' + chr(101) + chr(0b1000010 + 0o41) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(117) + '\x74' + chr(8697 - 8595) + '\055' + chr(0b10010 + 0o46))) + V0Kjo0Rf4lyy, nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062', 8))))
ddbzgDwLUKvt[N9zlRy29S1SS(AxzEl9CkuRgR)] += H_s_0bxgw8JU
else:
ddbzgDwLUKvt[AxzEl9CkuRgR] += hXMPsSrOQzbh.HYK38tp8WLQ4[AxzEl9CkuRgR][nzTpIcepk0o8(chr(48) + '\157' + chr(0b11011 + 0o25), 8)]
roI3spqORKae(hXMPsSrOQzbh.__timestamps, roI3spqORKae(ES5oEprVxulp(b'\x0c\xcd\x9e\xacL\xfd\x93g~\xe1\x9f\xda'), chr(7829 - 7729) + chr(0b1011101 + 0o10) + '\x63' + '\x6f' + chr(0b1100100) + chr(0b10000 + 0o125))('\165' + chr(0b1101101 + 0o7) + '\146' + chr(1204 - 1159) + chr(56)))(ddbzgDwLUKvt)
hXMPsSrOQzbh.HYK38tp8WLQ4 = QosgjTGdRyFK(H4NoA26ON7iG)
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer.save_indexed_audio
|
def save_indexed_audio(self, indexed_audio_file_abs_path):
"""
Writes the corrected timestamps to a file. Timestamps are a python
dictionary.
Parameters
----------
indexed_audio_file_abs_path : str
"""
with open(indexed_audio_file_abs_path, "wb") as f:
pickle.dump(self.get_timestamps(), f, pickle.HIGHEST_PROTOCOL)
|
python
|
def save_indexed_audio(self, indexed_audio_file_abs_path):
"""
Writes the corrected timestamps to a file. Timestamps are a python
dictionary.
Parameters
----------
indexed_audio_file_abs_path : str
"""
with open(indexed_audio_file_abs_path, "wb") as f:
pickle.dump(self.get_timestamps(), f, pickle.HIGHEST_PROTOCOL)
|
[
"def",
"save_indexed_audio",
"(",
"self",
",",
"indexed_audio_file_abs_path",
")",
":",
"with",
"open",
"(",
"indexed_audio_file_abs_path",
",",
"\"wb\"",
")",
"as",
"f",
":",
"pickle",
".",
"dump",
"(",
"self",
".",
"get_timestamps",
"(",
")",
",",
"f",
",",
"pickle",
".",
"HIGHEST_PROTOCOL",
")"
] |
Writes the corrected timestamps to a file. Timestamps are a python
dictionary.
Parameters
----------
indexed_audio_file_abs_path : str
|
[
"Writes",
"the",
"corrected",
"timestamps",
"to",
"a",
"file",
".",
"Timestamps",
"are",
"a",
"python",
"dictionary",
"."
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L1172-L1182
|
train
|
Writes the corrected timestamps to a file.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1r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uqoXdKZ,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' + '\x6f' + '\062' + chr(0b10010 + 0o44) + chr(0b10000 + 0o42), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110000), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(342 - 292) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(1478 - 1430) + chr(2597 - 2486) + chr(0b110011) + chr(0b1011 + 0o52) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(0b110100) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + chr(489 - 436) + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + chr(54) + chr(55), 6226 - 6218), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b1000100 + 0o53) + '\x31' + chr(53) + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(1647 - 1596) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(337 - 287) + chr(0b1111 + 0o43) + '\x33', 0o10), nzTpIcepk0o8(chr(1588 - 1540) + '\x6f' + '\061' + '\065' + chr(0b100 + 0o54), 8), nzTpIcepk0o8('\060' + chr(111) + '\x31' + chr(48), 0o10), nzTpIcepk0o8(chr(2226 - 2178) + '\x6f' + '\x32' + chr(632 - 581) + chr(55), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1000111 + 0o50) + chr(0b10110 + 0o33) + chr(0b110001) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(2716 - 2605) + chr(0b110011) + chr(0b110101) + '\x36', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101000 + 0o7) + chr(0b11011 + 0o30) + chr(51) + chr(52), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(48) + '\066', 0o10), nzTpIcepk0o8(chr(48) + chr(4131 - 4020) + '\062' + '\064' + '\x32', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x31' + chr(0b110010) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(0b1101111) + chr(0b10000 + 0o43) + '\x30' + chr(51), 4129 - 4121), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(0b101111 + 0o1) + '\061', 0b1000), nzTpIcepk0o8(chr(649 - 601) + chr(111) + '\062' + '\063' + '\062', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110101) + chr(0b101111 + 0o2), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + chr(0b10 + 0o63) + chr(0b101101 + 0o5), 36187 - 36179), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + chr(0b11011 + 0o25), 8), nzTpIcepk0o8(chr(48) + '\157' + '\063' + chr(48) + '\x33', 8), nzTpIcepk0o8(chr(654 - 606) + chr(3223 - 3112) + chr(52) + '\061', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b101000 + 0o107) + chr(0b110001) + chr(0b110100) + '\067', 8), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101110 + 0o4) + chr(1699 - 1645) + chr(51), ord("\x08")), nzTpIcepk0o8('\x30' + chr(3890 - 3779) + chr(49) + '\x30' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\065' + chr(54), 0o10), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(111) + '\x31' + '\067' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(183 - 135) + chr(0b110100 + 0o73) + chr(0b101111 + 0o4) + '\062' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\157' + chr(0b110011) + chr(0b100011 + 0o21), 0o10), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(0b110100) + chr(2166 - 2111), 8), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + chr(548 - 493) + chr(0b110111), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(0b110000) + chr(0b110111), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\067' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\x6f' + chr(49) + chr(0b11 + 0o55) + '\x31', 8), nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(52), 37347 - 37339)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(111) + '\x35' + chr(48), 7025 - 7017)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x9c'), chr(0b1100100) + '\x65' + chr(0b110110 + 0o55) + '\x6f' + chr(5824 - 5724) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b1100110) + chr(45) + chr(0b1010 + 0o56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def wC_X3oWclJ2u(hXMPsSrOQzbh, ULRIKrJ26zT2):
with DnU3Rq9N5ala(ULRIKrJ26zT2, roI3spqORKae(ES5oEprVxulp(b'\xc5b'), chr(100) + '\145' + chr(0b1100011) + chr(111) + chr(100) + chr(0b1100101))(chr(117) + '\164' + '\x66' + chr(45) + chr(0b110101 + 0o3))) as _R8IKF5IwAfX:
roI3spqORKae(crHBwl6R77Za, roI3spqORKae(ES5oEprVxulp(b'\xd6u\x7f\x99'), chr(0b1100100 + 0o0) + chr(0b1011100 + 0o11) + chr(6152 - 6053) + chr(0b1101111) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + '\x66' + '\x2d' + chr(56)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xd5ef\xb6\x13\x01\x1a\x0b\xab\xe7\te\xef:'), chr(100) + chr(1384 - 1283) + chr(7964 - 7865) + chr(0b1010111 + 0o30) + '\x64' + '\145')(chr(117) + chr(4899 - 4783) + '\146' + chr(1210 - 1165) + chr(2197 - 2141)))(), _R8IKF5IwAfX, roI3spqORKae(crHBwl6R77Za, roI3spqORKae(ES5oEprVxulp(b'\xfaIU\xa1";#1\x88\xc1\'\\\xd0\n\xa1\x90'), chr(100) + '\145' + chr(9430 - 9331) + '\157' + chr(4712 - 4612) + '\145')(chr(2827 - 2710) + chr(0b1110100) + chr(0b1100110) + '\x2d' + '\070')))
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer.load_indexed_audio
|
def load_indexed_audio(self, indexed_audio_file_abs_path):
"""
Parameters
----------
indexed_audio_file_abs_path : str
"""
with open(indexed_audio_file_abs_path, "rb") as f:
self.__timestamps = pickle.load(f)
|
python
|
def load_indexed_audio(self, indexed_audio_file_abs_path):
"""
Parameters
----------
indexed_audio_file_abs_path : str
"""
with open(indexed_audio_file_abs_path, "rb") as f:
self.__timestamps = pickle.load(f)
|
[
"def",
"load_indexed_audio",
"(",
"self",
",",
"indexed_audio_file_abs_path",
")",
":",
"with",
"open",
"(",
"indexed_audio_file_abs_path",
",",
"\"rb\"",
")",
"as",
"f",
":",
"self",
".",
"__timestamps",
"=",
"pickle",
".",
"load",
"(",
"f",
")"
] |
Parameters
----------
indexed_audio_file_abs_path : str
|
[
"Parameters",
"----------",
"indexed_audio_file_abs_path",
":",
"str"
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L1184-L1191
|
train
|
Loads the indexed audio file into the internal dictionary.
|
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,VwkB9reRD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nTXOd5N96r1,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(4696 - 4585) + chr(0b101011 + 0o7), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(403 - 352) + chr(0b110101) + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(1791 - 1737) + '\x31', 0o10), nzTpIcepk0o8(chr(48) + chr(9968 - 9857) + '\x31' + chr(549 - 499) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\x6f' + '\x33' + chr(1177 - 1129) + chr(722 - 668), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101100 + 0o3) + chr(0b110001) + '\066' + '\x36', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x37' + '\x30', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + '\x34' + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1297 - 1246) + chr(0b1101 + 0o44) + '\060', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1000110 + 0o51) + chr(2249 - 2200) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + '\x30' + chr(0b11100 + 0o32), 8), nzTpIcepk0o8(chr(423 - 375) + '\x6f' + chr(0b110010) + chr(51) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001 + 0o0) + '\x30' + '\063', 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x31' + chr(0b10100 + 0o43) + '\067', ord("\x08")), nzTpIcepk0o8(chr(1726 - 1678) + '\x6f' + chr(49) + chr(55) + chr(55), 8), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1101111) + chr(0b101110 + 0o5) + chr(0b101011 + 0o12) + chr(0b0 + 0o64), 58488 - 58480), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b110111 + 0o70) + chr(324 - 275) + chr(472 - 420) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(0b1101110 + 0o1) + '\x31' + '\064' + chr(2201 - 2150), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(49) + '\066', 42621 - 42613), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b11100 + 0o27) + chr(635 - 581) + chr(0b100 + 0o54), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + '\064' + chr(0b110001 + 0o4), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110100) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(48) + chr(0b10110 + 0o131) + '\061' + chr(0b11111 + 0o26) + chr(54), 0b1000), nzTpIcepk0o8(chr(1690 - 1642) + chr(10786 - 10675) + '\x33' + chr(1693 - 1644) + chr(2330 - 2275), 41966 - 41958), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(53) + chr(52), 8), nzTpIcepk0o8(chr(48) + chr(4165 - 4054) + '\x33' + chr(54) + chr(0b110000 + 0o7), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(55) + chr(2359 - 2307), 0o10), nzTpIcepk0o8(chr(206 - 158) + chr(0b1101111) + chr(0b1110 + 0o44) + '\065' + chr(87 - 37), 26159 - 26151), nzTpIcepk0o8(chr(209 - 161) + '\x6f' + '\061' + '\x34' + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + '\x32', 0o10), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\x6f' + chr(2052 - 2003) + chr(0b11100 + 0o25) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + chr(0b110111) + '\060', 0o10), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(11052 - 10941) + chr(0b110010) + chr(49) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + '\060' + chr(55), 0b1000), nzTpIcepk0o8(chr(666 - 618) + chr(795 - 684) + chr(0b1 + 0o61) + '\063' + '\x36', 3185 - 3177), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + '\065' + chr(0b1100 + 0o50), 46753 - 46745), nzTpIcepk0o8(chr(280 - 232) + chr(111) + chr(2041 - 1990), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b10111 + 0o130) + chr(49) + chr(553 - 500) + '\067', 10800 - 10792), nzTpIcepk0o8('\060' + chr(290 - 179) + chr(0b110011 + 0o0) + '\064', ord("\x08")), nzTpIcepk0o8(chr(899 - 851) + chr(111) + '\062' + chr(0b1101 + 0o52), 29650 - 29642)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(53) + chr(0b1110 + 0o42), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b','), '\x64' + chr(0b1100101) + chr(0b1001000 + 0o33) + '\x6f' + '\144' + '\145')('\x75' + chr(116) + chr(0b101110 + 0o70) + chr(1616 - 1571) + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def IWkoDQcULHky(hXMPsSrOQzbh, ULRIKrJ26zT2):
with DnU3Rq9N5ala(ULRIKrJ26zT2, roI3spqORKae(ES5oEprVxulp(b'p\x89'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + '\157' + chr(0b1000 + 0o134) + chr(101))(chr(117) + '\164' + chr(0b1100110) + chr(0b1101 + 0o40) + chr(56))) as _R8IKF5IwAfX:
hXMPsSrOQzbh.ErkbQyT8WnEy = crHBwl6R77Za.ZERsdc7c1d8E(_R8IKF5IwAfX)
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer._is_subsequence_of
|
def _is_subsequence_of(self, sub, sup):
"""
Parameters
----------
sub : str
sup : str
Returns
-------
bool
"""
return bool(re.search(".*".join(sub), sup))
|
python
|
def _is_subsequence_of(self, sub, sup):
"""
Parameters
----------
sub : str
sup : str
Returns
-------
bool
"""
return bool(re.search(".*".join(sub), sup))
|
[
"def",
"_is_subsequence_of",
"(",
"self",
",",
"sub",
",",
"sup",
")",
":",
"return",
"bool",
"(",
"re",
".",
"search",
"(",
"\".*\"",
".",
"join",
"(",
"sub",
")",
",",
"sup",
")",
")"
] |
Parameters
----------
sub : str
sup : str
Returns
-------
bool
|
[
"Parameters",
"----------",
"sub",
":",
"str",
"sup",
":",
"str"
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L1206-L1217
|
train
|
Returns True if the subsequence of the supsequence of the current set of keys.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtb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bagO6,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('\x30' + '\157' + chr(0b100 + 0o57) + '\066' + '\063', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b101010 + 0o7) + chr(53) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b111 + 0o51) + '\157' + chr(51) + chr(2849 - 2795) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b10001 + 0o136) + chr(0b110111) + '\064', 62957 - 62949), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(0b101110 + 0o7) + '\x33', 6961 - 6953), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + chr(0b110101) + chr(0b1110 + 0o45), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(2279 - 2224) + chr(51), 19803 - 19795), nzTpIcepk0o8('\060' + chr(0b1101111) + '\060', 23577 - 23569), nzTpIcepk0o8(chr(0b110000) + chr(6157 - 6046) + chr(2316 - 2267) + '\064', 61323 - 61315), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b1 + 0o60), 64426 - 64418), nzTpIcepk0o8(chr(1303 - 1255) + chr(0b1001011 + 0o44) + '\063' + chr(0b101101 + 0o7) + '\060', ord("\x08")), nzTpIcepk0o8(chr(127 - 79) + chr(111) + chr(0b11100 + 0o25) + chr(49) + '\x36', 0o10), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\157' + chr(51) + chr(0b100 + 0o54) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b10010 + 0o40) + chr(0b110001) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b110000 + 0o77) + chr(50) + chr(49) + chr(2222 - 2167), 0o10), nzTpIcepk0o8('\060' + chr(6489 - 6378) + chr(55) + chr(0b100010 + 0o20), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(0b110101) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b111 + 0o51) + '\x6f' + chr(51) + chr(0b110010) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b100010 + 0o17) + chr(0b110111), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x31' + chr(51) + chr(2163 - 2112), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + '\061' + '\x33', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(0b110010) + '\066', 48434 - 48426), nzTpIcepk0o8(chr(144 - 96) + chr(111) + chr(0b110010) + '\x36' + '\x31', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(2455 - 2400), ord("\x08")), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(9403 - 9292) + chr(49) + chr(0b1101 + 0o43) + '\064', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b111000 + 0o67) + '\061' + chr(0b100000 + 0o25) + chr(852 - 802), 8), nzTpIcepk0o8(chr(48) + chr(331 - 220) + '\x37' + chr(0b10 + 0o56), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b11100 + 0o123) + '\x33' + chr(0b110001) + chr(2069 - 2014), 0o10), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(10551 - 10440) + '\x31' + chr(51) + chr(0b110101), 14853 - 14845), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + chr(0b110010) + chr(1294 - 1239), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(2046 - 1997) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b1 + 0o57) + '\x6f' + chr(49) + '\x31' + chr(1852 - 1800), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + '\x31' + '\064', 13612 - 13604), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + chr(52) + '\063', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(1564 - 1513) + chr(301 - 252) + '\067', 8), nzTpIcepk0o8('\060' + chr(111) + chr(0b11011 + 0o26) + '\066' + chr(51), 62311 - 62303), nzTpIcepk0o8('\x30' + chr(595 - 484) + chr(0b110001) + chr(2791 - 2736) + '\061', 0o10), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b100101 + 0o112) + chr(0b110001) + chr(0b101011 + 0o10) + chr(0b110101), 8), nzTpIcepk0o8(chr(1591 - 1543) + chr(0b1101111) + '\062' + chr(54) + '\x30', 0b1000), nzTpIcepk0o8(chr(48) + chr(3982 - 3871) + chr(49) + chr(2887 - 2833) + chr(0b110111), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(8952 - 8841) + '\x35' + '\060', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xdd'), '\144' + '\145' + '\143' + '\x6f' + '\x64' + '\x65')('\x75' + chr(5714 - 5598) + chr(102) + chr(45) + chr(0b100001 + 0o27)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def Lh3LUtSaHsE_(hXMPsSrOQzbh, _zPndKq6xMgp, tWHRwT9nCYX1):
return TVUhqOt5_BbS(roI3spqORKae(aoTc4YA2bs2R, roI3spqORKae(ES5oEprVxulp(b'\xb7\x0b\xaf\x04\xa2\x85\xc1QkG\xaa8'), chr(0b1100100) + chr(101) + '\143' + chr(111) + chr(0b1100100) + chr(0b1100101))('\x75' + '\164' + '\x66' + chr(958 - 913) + chr(56)))(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xdd@'), '\144' + chr(0b1100101) + '\143' + chr(111) + chr(0b111100 + 0o50) + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(45) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\xaa^\x8cq\xd2\xa9\xd8fXB\xae?'), '\x64' + '\145' + chr(0b101101 + 0o66) + chr(10422 - 10311) + '\144' + chr(0b1001011 + 0o32))('\165' + '\164' + chr(0b111101 + 0o51) + chr(0b101101) + chr(0b111000)))(_zPndKq6xMgp), tWHRwT9nCYX1))
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer._partial_search_validator
|
def _partial_search_validator(self, sub, sup, anagram=False,
subsequence=False, supersequence=False):
"""
It's responsible for validating the partial results of `search` method.
If it returns True, the search would return its result. Else, search
method would discard what it found and look for others.
First, checks to see if all elements of `sub` is in `sup` with at least
the same frequency and then checks to see if every element `sub`
appears in `sup` with the same order (index-wise).
If advanced control sturctures are specified, the containment condition
won't be checked.
The code for index checking is from [1]_.
Parameters
----------
sub : list
sup : list
anagram : bool, optional
Default is `False`
subsequence : bool, optional
Default is `False`
supersequence : bool, optional
Default is `False`
Returns
-------
bool
References
----------
.. [1] : `
https://stackoverflow.com/questions/35964155/checking-if-list-is-a-sublist`
"""
def get_all_in(one, another):
for element in one:
if element in another:
yield element
def containment_check(sub, sup):
return (set(Counter(sub).keys()).issubset(
set(Counter(sup).keys())))
def containment_freq_check(sub, sup):
return (all([Counter(sub)[element] <= Counter(sup)[element]
for element in Counter(sub)]))
def extra_freq_check(sub, sup, list_of_tups):
# Would be used for matching anagrams, subsequences etc.
return (len(list_of_tups) > 0 and
all([Counter(sub)[tup[0]] <= Counter(sup)[tup[1]]
for tup in list_of_tups]))
# Regarding containment checking while having extra conditions,
# there's no good way to map each anagram or subseuqnece etc. that was
# found to the query word, without making it more complicated than
# it already is, because a query word can be anagram/subsequence etc.
# to multiple words of the timestamps yet finding the one with the
# right index would be the problem.
# Therefore we just approximate the solution by just counting
# the elements.
if len(sub) > len(sup):
return False
for pred, func in set([(anagram, self._is_anagram_of),
(subsequence, self._is_subsequence_of),
(supersequence, self._is_supersequence_of)]):
if pred:
pred_seive = [(sub_key, sup_key)
for sub_key in set(Counter(sub).keys())
for sup_key in set(Counter(sup).keys())
if func(sub_key, sup_key)]
if not extra_freq_check(sub, sup, pred_seive):
return False
if (
not any([anagram, subsequence, supersequence]) and
(not containment_check(sub, sup) or
not containment_freq_check(sub, sup))
):
return False
for x1, x2 in zip(get_all_in(sup, sub), get_all_in(sub, sup)):
if x1 != x2:
return False
return True
|
python
|
def _partial_search_validator(self, sub, sup, anagram=False,
subsequence=False, supersequence=False):
"""
It's responsible for validating the partial results of `search` method.
If it returns True, the search would return its result. Else, search
method would discard what it found and look for others.
First, checks to see if all elements of `sub` is in `sup` with at least
the same frequency and then checks to see if every element `sub`
appears in `sup` with the same order (index-wise).
If advanced control sturctures are specified, the containment condition
won't be checked.
The code for index checking is from [1]_.
Parameters
----------
sub : list
sup : list
anagram : bool, optional
Default is `False`
subsequence : bool, optional
Default is `False`
supersequence : bool, optional
Default is `False`
Returns
-------
bool
References
----------
.. [1] : `
https://stackoverflow.com/questions/35964155/checking-if-list-is-a-sublist`
"""
def get_all_in(one, another):
for element in one:
if element in another:
yield element
def containment_check(sub, sup):
return (set(Counter(sub).keys()).issubset(
set(Counter(sup).keys())))
def containment_freq_check(sub, sup):
return (all([Counter(sub)[element] <= Counter(sup)[element]
for element in Counter(sub)]))
def extra_freq_check(sub, sup, list_of_tups):
# Would be used for matching anagrams, subsequences etc.
return (len(list_of_tups) > 0 and
all([Counter(sub)[tup[0]] <= Counter(sup)[tup[1]]
for tup in list_of_tups]))
# Regarding containment checking while having extra conditions,
# there's no good way to map each anagram or subseuqnece etc. that was
# found to the query word, without making it more complicated than
# it already is, because a query word can be anagram/subsequence etc.
# to multiple words of the timestamps yet finding the one with the
# right index would be the problem.
# Therefore we just approximate the solution by just counting
# the elements.
if len(sub) > len(sup):
return False
for pred, func in set([(anagram, self._is_anagram_of),
(subsequence, self._is_subsequence_of),
(supersequence, self._is_supersequence_of)]):
if pred:
pred_seive = [(sub_key, sup_key)
for sub_key in set(Counter(sub).keys())
for sup_key in set(Counter(sup).keys())
if func(sub_key, sup_key)]
if not extra_freq_check(sub, sup, pred_seive):
return False
if (
not any([anagram, subsequence, supersequence]) and
(not containment_check(sub, sup) or
not containment_freq_check(sub, sup))
):
return False
for x1, x2 in zip(get_all_in(sup, sub), get_all_in(sub, sup)):
if x1 != x2:
return False
return True
|
[
"def",
"_partial_search_validator",
"(",
"self",
",",
"sub",
",",
"sup",
",",
"anagram",
"=",
"False",
",",
"subsequence",
"=",
"False",
",",
"supersequence",
"=",
"False",
")",
":",
"def",
"get_all_in",
"(",
"one",
",",
"another",
")",
":",
"for",
"element",
"in",
"one",
":",
"if",
"element",
"in",
"another",
":",
"yield",
"element",
"def",
"containment_check",
"(",
"sub",
",",
"sup",
")",
":",
"return",
"(",
"set",
"(",
"Counter",
"(",
"sub",
")",
".",
"keys",
"(",
")",
")",
".",
"issubset",
"(",
"set",
"(",
"Counter",
"(",
"sup",
")",
".",
"keys",
"(",
")",
")",
")",
")",
"def",
"containment_freq_check",
"(",
"sub",
",",
"sup",
")",
":",
"return",
"(",
"all",
"(",
"[",
"Counter",
"(",
"sub",
")",
"[",
"element",
"]",
"<=",
"Counter",
"(",
"sup",
")",
"[",
"element",
"]",
"for",
"element",
"in",
"Counter",
"(",
"sub",
")",
"]",
")",
")",
"def",
"extra_freq_check",
"(",
"sub",
",",
"sup",
",",
"list_of_tups",
")",
":",
"# Would be used for matching anagrams, subsequences etc.",
"return",
"(",
"len",
"(",
"list_of_tups",
")",
">",
"0",
"and",
"all",
"(",
"[",
"Counter",
"(",
"sub",
")",
"[",
"tup",
"[",
"0",
"]",
"]",
"<=",
"Counter",
"(",
"sup",
")",
"[",
"tup",
"[",
"1",
"]",
"]",
"for",
"tup",
"in",
"list_of_tups",
"]",
")",
")",
"# Regarding containment checking while having extra conditions,",
"# there's no good way to map each anagram or subseuqnece etc. that was",
"# found to the query word, without making it more complicated than",
"# it already is, because a query word can be anagram/subsequence etc.",
"# to multiple words of the timestamps yet finding the one with the",
"# right index would be the problem.",
"# Therefore we just approximate the solution by just counting",
"# the elements.",
"if",
"len",
"(",
"sub",
")",
">",
"len",
"(",
"sup",
")",
":",
"return",
"False",
"for",
"pred",
",",
"func",
"in",
"set",
"(",
"[",
"(",
"anagram",
",",
"self",
".",
"_is_anagram_of",
")",
",",
"(",
"subsequence",
",",
"self",
".",
"_is_subsequence_of",
")",
",",
"(",
"supersequence",
",",
"self",
".",
"_is_supersequence_of",
")",
"]",
")",
":",
"if",
"pred",
":",
"pred_seive",
"=",
"[",
"(",
"sub_key",
",",
"sup_key",
")",
"for",
"sub_key",
"in",
"set",
"(",
"Counter",
"(",
"sub",
")",
".",
"keys",
"(",
")",
")",
"for",
"sup_key",
"in",
"set",
"(",
"Counter",
"(",
"sup",
")",
".",
"keys",
"(",
")",
")",
"if",
"func",
"(",
"sub_key",
",",
"sup_key",
")",
"]",
"if",
"not",
"extra_freq_check",
"(",
"sub",
",",
"sup",
",",
"pred_seive",
")",
":",
"return",
"False",
"if",
"(",
"not",
"any",
"(",
"[",
"anagram",
",",
"subsequence",
",",
"supersequence",
"]",
")",
"and",
"(",
"not",
"containment_check",
"(",
"sub",
",",
"sup",
")",
"or",
"not",
"containment_freq_check",
"(",
"sub",
",",
"sup",
")",
")",
")",
":",
"return",
"False",
"for",
"x1",
",",
"x2",
"in",
"zip",
"(",
"get_all_in",
"(",
"sup",
",",
"sub",
")",
",",
"get_all_in",
"(",
"sub",
",",
"sup",
")",
")",
":",
"if",
"x1",
"!=",
"x2",
":",
"return",
"False",
"return",
"True"
] |
It's responsible for validating the partial results of `search` method.
If it returns True, the search would return its result. Else, search
method would discard what it found and look for others.
First, checks to see if all elements of `sub` is in `sup` with at least
the same frequency and then checks to see if every element `sub`
appears in `sup` with the same order (index-wise).
If advanced control sturctures are specified, the containment condition
won't be checked.
The code for index checking is from [1]_.
Parameters
----------
sub : list
sup : list
anagram : bool, optional
Default is `False`
subsequence : bool, optional
Default is `False`
supersequence : bool, optional
Default is `False`
Returns
-------
bool
References
----------
.. [1] : `
https://stackoverflow.com/questions/35964155/checking-if-list-is-a-sublist`
|
[
"It",
"s",
"responsible",
"for",
"validating",
"the",
"partial",
"results",
"of",
"search",
"method",
".",
"If",
"it",
"returns",
"True",
"the",
"search",
"would",
"return",
"its",
"result",
".",
"Else",
"search",
"method",
"would",
"discard",
"what",
"it",
"found",
"and",
"look",
"for",
"others",
"."
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L1232-L1318
|
train
|
This method is responsible for validating the partial results of a list of elements.
|
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,gCu7Qd75URN1,yfEeqQiUoqWT,zGgTE_CdZf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qQiUoqWT,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' + '\x31' + chr(1699 - 1648) + chr(51), 1932 - 1924), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + chr(0b110010) + chr(2189 - 2139), 0b1000), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(183 - 72) + '\063' + chr(2314 - 2265) + chr(54), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(1361 - 1312) + '\x32' + chr(449 - 399), 8), nzTpIcepk0o8(chr(624 - 576) + '\x6f' + chr(49) + '\066' + '\067', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + chr(0b100010 + 0o17) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101101 + 0o5) + '\067' + chr(0b100000 + 0o26), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(51) + chr(0b10101 + 0o42) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b110001 + 0o76) + '\x32' + chr(0b110000), 28015 - 28007), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(2886 - 2775) + '\067' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b11011 + 0o124) + '\x33' + chr(0b110001) + '\063', 61061 - 61053), nzTpIcepk0o8(chr(48) + '\157' + '\063' + chr(51) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(11116 - 11005) + '\x33' + chr(969 - 920), 0b1000), nzTpIcepk0o8(chr(980 - 932) + '\x6f' + '\061' + chr(0b100000 + 0o24) + chr(0b11010 + 0o33), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + '\062' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + chr(1837 - 1785) + chr(55), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1100 + 0o143) + chr(0b110010) + '\x33' + chr(48), 8785 - 8777), nzTpIcepk0o8(chr(986 - 938) + '\x6f' + chr(2471 - 2421) + '\x36', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(51) + chr(55) + '\064', 2837 - 2829), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(111) + '\x34' + '\x31', 17401 - 17393), nzTpIcepk0o8('\060' + chr(9450 - 9339) + chr(0b11010 + 0o30) + '\x33' + chr(1405 - 1353), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\061' + chr(52) + '\x35', 8), nzTpIcepk0o8(chr(0b110000) + chr(9087 - 8976) + chr(0b110010) + chr(73 - 21) + chr(0b101010 + 0o12), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b111100 + 0o63) + chr(2371 - 2322) + chr(723 - 672) + chr(0b101 + 0o55), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001 + 0o1) + '\x32' + '\x32', 0o10), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b100101 + 0o112) + chr(0b11011 + 0o26) + chr(0b10 + 0o57) + chr(0b110010 + 0o4), 14517 - 14509), nzTpIcepk0o8(chr(0b110000) + chr(0b1000101 + 0o52) + chr(1110 - 1060) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(0b101 + 0o56) + '\064', 8), nzTpIcepk0o8(chr(48) + chr(0b100011 + 0o114) + chr(0b110011) + chr(1369 - 1316) + '\062', 18392 - 18384), nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(208 - 160) + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b110111 + 0o70) + chr(0b110011) + chr(807 - 754) + '\x31', 21601 - 21593), nzTpIcepk0o8(chr(466 - 418) + chr(0b10000 + 0o137) + '\062' + chr(53) + chr(0b10001 + 0o37), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(0b110010) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(523 - 475) + chr(0b1101111) + '\063' + '\x33' + chr(2576 - 2521), 20912 - 20904), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10001 + 0o42) + chr(55) + '\065', 8), nzTpIcepk0o8(chr(1598 - 1550) + chr(0b1101111) + chr(51) + chr(2677 - 2622) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(2102 - 1991) + chr(49) + '\x33' + '\x30', 0b1000), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b1000101 + 0o52) + chr(0b110001) + '\065' + chr(49), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b0 + 0o157) + chr(0b110001) + '\x32' + chr(54), 22752 - 22744), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + chr(0b100010 + 0o20), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b100010 + 0o115) + '\065' + chr(823 - 775), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'u'), '\x64' + chr(0b10001 + 0o124) + chr(564 - 465) + chr(0b11011 + 0o124) + chr(978 - 878) + chr(1735 - 1634))(chr(117) + '\164' + chr(0b1100110) + chr(0b101101) + chr(0b110110 + 0o2)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def t04mglpZ7Nec(hXMPsSrOQzbh, _zPndKq6xMgp, tWHRwT9nCYX1, MrpOzVwEWRZI=nzTpIcepk0o8(chr(48) + '\157' + chr(0b110000), ord("\x08")), cJjBeLr31wFT=nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(111) + '\060', 8), rPy4TKveBQ36=nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110000), 8)):
def Au9ssB_gsYT2(Qrz6A852vqAn, txE74ASJBhMX):
for pXRQUD7VR93J in Qrz6A852vqAn:
if pXRQUD7VR93J in txE74ASJBhMX:
yield pXRQUD7VR93J
def tVnucQQmaEzo(_zPndKq6xMgp, tWHRwT9nCYX1):
return roI3spqORKae(Bvi71nNyvlqO(rVBixICc7LDz(_zPndKq6xMgp).keys()), roI3spqORKae(ES5oEprVxulp(b"2!\xbd'\x15\xfd\xdb\x89"), chr(0b1100100) + chr(0b1000111 + 0o36) + chr(0b11011 + 0o110) + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(11825 - 11709) + chr(102) + chr(45) + chr(56)))(Bvi71nNyvlqO(roI3spqORKae(rVBixICc7LDz(tWHRwT9nCYX1), roI3spqORKae(ES5oEprVxulp(b'07\xb7!'), '\144' + chr(7371 - 7270) + chr(99) + '\x6f' + '\144' + chr(2256 - 2155))(chr(6765 - 6648) + chr(11839 - 11723) + chr(102) + chr(90 - 45) + chr(93 - 37)))()))
def od6i7se_DDfL(_zPndKq6xMgp, tWHRwT9nCYX1):
return qX60lO1lgHA5([rVBixICc7LDz(_zPndKq6xMgp)[pXRQUD7VR93J] <= rVBixICc7LDz(tWHRwT9nCYX1)[pXRQUD7VR93J] for pXRQUD7VR93J in rVBixICc7LDz(_zPndKq6xMgp)])
def bqXbOERF7o2I(_zPndKq6xMgp, tWHRwT9nCYX1, vXhvomWNCWYl):
return ftfygxgFas5X(vXhvomWNCWYl) > nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\060', 8) and qX60lO1lgHA5([rVBixICc7LDz(_zPndKq6xMgp)[WRQDInte8Ztr[nzTpIcepk0o8('\060' + chr(1220 - 1109) + '\x30', 8)]] <= rVBixICc7LDz(tWHRwT9nCYX1)[WRQDInte8Ztr[nzTpIcepk0o8(chr(48) + chr(111) + chr(0b111 + 0o52), 0b1000)]] for WRQDInte8Ztr in vXhvomWNCWYl])
if ftfygxgFas5X(_zPndKq6xMgp) > ftfygxgFas5X(tWHRwT9nCYX1):
return nzTpIcepk0o8('\x30' + '\157' + '\x30', 8)
for (BkvcYpYRB6Zb, h0klhChk4Vv6) in Bvi71nNyvlqO([(MrpOzVwEWRZI, roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x04;\xbd\r\x16\xe0\xdf\x9abY\xa6\x86v\x03'), chr(332 - 232) + '\145' + chr(0b1100011) + chr(0b1101111) + '\144' + chr(101))('\x75' + chr(0b1110100) + '\146' + chr(0b1000 + 0o45) + chr(56)))), (cJjBeLr31wFT, roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x04;\xbd\r\x04\xfb\xdc\x8euI\xbe\xbcw\x06\xf68\xf7p'), '\x64' + '\145' + chr(0b111100 + 0o47) + '\x6f' + chr(100) + chr(0b1100101))('\x75' + '\164' + chr(102) + '\x2d' + chr(56)))), (rPy4TKveBQ36, roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x04;\xbd\r\x04\xfb\xce\x98bK\xae\xa8l\x00\xfd\x04\xfdI\x93G'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + '\157' + chr(100) + chr(0b1100101))(chr(3495 - 3378) + chr(0b1110100) + chr(0b1000011 + 0o43) + '\055' + '\070')))]):
if BkvcYpYRB6Zb:
fwjxS51LIUOM = [(IgCc_UOwkYHL, sPl33m1SXAQM) for IgCc_UOwkYHL in Bvi71nNyvlqO(rVBixICc7LDz(_zPndKq6xMgp).keys()) for sPl33m1SXAQM in Bvi71nNyvlqO(rVBixICc7LDz(tWHRwT9nCYX1).keys()) if h0klhChk4Vv6(IgCc_UOwkYHL, sPl33m1SXAQM)]
if not bqXbOERF7o2I(_zPndKq6xMgp, tWHRwT9nCYX1, fwjxS51LIUOM):
return nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(111) + chr(0b110000), 8)
if not VF4pKOObtlPc([MrpOzVwEWRZI, cJjBeLr31wFT, rPy4TKveBQ36]) and (not tVnucQQmaEzo(_zPndKq6xMgp, tWHRwT9nCYX1) or not od6i7se_DDfL(_zPndKq6xMgp, tWHRwT9nCYX1)):
return nzTpIcepk0o8(chr(0b110000) + chr(12258 - 12147) + chr(0b110000), 8)
for (yZDwVNk0Rmbq, rpGiIBuTNlZH) in TxMFWa_Xzviv(Au9ssB_gsYT2(tWHRwT9nCYX1, _zPndKq6xMgp), Au9ssB_gsYT2(_zPndKq6xMgp, tWHRwT9nCYX1)):
if yZDwVNk0Rmbq != rpGiIBuTNlZH:
return nzTpIcepk0o8('\060' + '\157' + '\060', 8)
return nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001), 8)
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer.search_gen
|
def search_gen(self, query, audio_basename=None, case_sensitive=False,
subsequence=False, supersequence=False, timing_error=0.0,
anagram=False, missing_word_tolerance=0):
"""
A generator that searches for the `query` within the audiofiles of the
src_dir.
Parameters
----------
query : str
A string that'll be searched. It'll be splitted on spaces and then
each word gets sequentially searched.
audio_basename : str, optional
Search only within the given audio_basename.
Default is `None`
case_sensitive : bool, optional
Default is `False`
subsequence : bool, optional
`True` if it's not needed for the exact word be detected and larger
strings that contain the given one are fine.
If the query is a sentences with multiple words, it'll be
considered for each word, not the whole sentence.
Default is `False`.
supersequence : bool, optional
`True` if it's not needed for the exact word be detected and
smaller strings that are contained within the given one are fine.
If the query is a sentences with multiple words, it'll be
considered for each word, not the whole sentence.
Default is `False`.
anagram : bool, optional
`True` if it's acceptable for a complete permutation of the word to
be found. e.g. "abcde" would be acceptable for "edbac".
If the query is a sentences with multiple words, it'll be
considered for each word, not the whole sentence.
Default is `False`.
timing_error : None or float, optional
Sometimes other words (almost always very small) would be detected
between the words of the `query`. This parameter defines the
timing difference/tolerance of the search.
Default is 0.0 i.e. No timing error is tolerated.
missing_word_tolerance : int, optional
The number of words that can be missed within the result.
For example, if the query is "Some random text" and the tolerance
value is `1`, then "Some text" would be a valid response.
Note that the first and last words cannot be missed. Also,
there'll be an error if the value is more than the number of
available words. For the example above, any value more than 1
would have given an error (since there's only one word i.e.
"random" that can be missed)
Default is 0.
Yields
------
{"File Name": str, "Query": `query`, "Result": (float, float)}
The result of the search is returned as a tuple which is the value
of the "Result" key. The first element of the tuple is the
starting second of `query` and the last element is the ending
second of `query`
Raises
------
AssertionError
If `missing_word_tolerance` value is more than the total number of
words in the query minus 2 (since the first and the last word
cannot be removed)
"""
def case_sensitivity_handler(case_sensitive=case_sensitive):
def get_query_words(query, case_sensitive=case_sensitive):
query_words = list(
filter(None, ''.join(
filter(lambda char: char in (ascii_letters + " "),
list(query))).split(" ")))
if case_sensitive:
return query_words
return [q.lower() for q in query_words]
def get_timestamps(case_sensitive=case_sensitive):
timestamps = self.get_timestamps().copy()
if not case_sensitive:
return {
audio_basename: [
_WordBlock(word=word_block.word.lower(),
start=word_block.start,
end=word_block.end)
for word_block in timestamps[audio_basename]]
for audio_basename in timestamps}
return timestamps
return locals()
query_words = case_sensitivity_handler()["get_query_words"](query)
timestamps = case_sensitivity_handler()["get_timestamps"]()
assert abs(missing_word_tolerance -
(len(query_words) - 2)) >= 0, (
"The number of words that can be missing must be less than "
"the total number of words within the query minus the first and "
"the last word."
)
for audio_filename in (
(lambda: (timestamps.keys() if audio_basename is None else
[audio_basename]))()):
result = list()
missed_words_so_far = 0
query_cursor = 0
try:
for word_block in timestamps[audio_filename]:
if (
# When the query is identical
(word_block.word == query_words[query_cursor]) or
# When the query is a subsequence of what's
# available
(subsequence and
self._is_subsequence_of(query_words[query_cursor],
word_block.word)) or
# When the query is a supersequence of what's
# available
(supersequence and self._is_supersequence_of(
query_words[query_cursor], word_block.word)) or
# When query is a permutation of what's available.
(anagram and self._is_anagram_of(
query_words[query_cursor], word_block.word))
):
result.append(word_block)
if timing_error is not None:
try:
if round(result[-1].start -
result[-2].end, 4) > timing_error:
result = list()
query_cursor = 0
except IndexError:
pass
if self._partial_search_validator(
query_words, [x.word for x in result],
anagram=anagram,
subsequence=subsequence,
supersequence=supersequence):
yield {
"File Name": audio_filename,
"Query": query,
"Result": tuple([result[0].start,
result[-1].end])}
result = list()
query_cursor = 0
else:
query_cursor += 1
elif missed_words_so_far > missing_word_tolerance:
result = list()
query_cursor = 0
elif (missing_word_tolerance > 0) and (len(result) > 0):
result.append(word_block)
missed_words_so_far += 1
except KeyError:
# This is needed for the case where no timestamp is present.
pass
except IndexError:
# This is needed when multiple timestamps are present, and
# advanced control structures like `missed_word_tolerance` are
# non-zero. In that case, it can search to the end of the first
# timestamp looking to complete its partial result and since
# there are no more `word_block`s left, it returns an error.
# `continue` should be used to reset the partial result and
# move to the next timestamp.
continue
|
python
|
def search_gen(self, query, audio_basename=None, case_sensitive=False,
subsequence=False, supersequence=False, timing_error=0.0,
anagram=False, missing_word_tolerance=0):
"""
A generator that searches for the `query` within the audiofiles of the
src_dir.
Parameters
----------
query : str
A string that'll be searched. It'll be splitted on spaces and then
each word gets sequentially searched.
audio_basename : str, optional
Search only within the given audio_basename.
Default is `None`
case_sensitive : bool, optional
Default is `False`
subsequence : bool, optional
`True` if it's not needed for the exact word be detected and larger
strings that contain the given one are fine.
If the query is a sentences with multiple words, it'll be
considered for each word, not the whole sentence.
Default is `False`.
supersequence : bool, optional
`True` if it's not needed for the exact word be detected and
smaller strings that are contained within the given one are fine.
If the query is a sentences with multiple words, it'll be
considered for each word, not the whole sentence.
Default is `False`.
anagram : bool, optional
`True` if it's acceptable for a complete permutation of the word to
be found. e.g. "abcde" would be acceptable for "edbac".
If the query is a sentences with multiple words, it'll be
considered for each word, not the whole sentence.
Default is `False`.
timing_error : None or float, optional
Sometimes other words (almost always very small) would be detected
between the words of the `query`. This parameter defines the
timing difference/tolerance of the search.
Default is 0.0 i.e. No timing error is tolerated.
missing_word_tolerance : int, optional
The number of words that can be missed within the result.
For example, if the query is "Some random text" and the tolerance
value is `1`, then "Some text" would be a valid response.
Note that the first and last words cannot be missed. Also,
there'll be an error if the value is more than the number of
available words. For the example above, any value more than 1
would have given an error (since there's only one word i.e.
"random" that can be missed)
Default is 0.
Yields
------
{"File Name": str, "Query": `query`, "Result": (float, float)}
The result of the search is returned as a tuple which is the value
of the "Result" key. The first element of the tuple is the
starting second of `query` and the last element is the ending
second of `query`
Raises
------
AssertionError
If `missing_word_tolerance` value is more than the total number of
words in the query minus 2 (since the first and the last word
cannot be removed)
"""
def case_sensitivity_handler(case_sensitive=case_sensitive):
def get_query_words(query, case_sensitive=case_sensitive):
query_words = list(
filter(None, ''.join(
filter(lambda char: char in (ascii_letters + " "),
list(query))).split(" ")))
if case_sensitive:
return query_words
return [q.lower() for q in query_words]
def get_timestamps(case_sensitive=case_sensitive):
timestamps = self.get_timestamps().copy()
if not case_sensitive:
return {
audio_basename: [
_WordBlock(word=word_block.word.lower(),
start=word_block.start,
end=word_block.end)
for word_block in timestamps[audio_basename]]
for audio_basename in timestamps}
return timestamps
return locals()
query_words = case_sensitivity_handler()["get_query_words"](query)
timestamps = case_sensitivity_handler()["get_timestamps"]()
assert abs(missing_word_tolerance -
(len(query_words) - 2)) >= 0, (
"The number of words that can be missing must be less than "
"the total number of words within the query minus the first and "
"the last word."
)
for audio_filename in (
(lambda: (timestamps.keys() if audio_basename is None else
[audio_basename]))()):
result = list()
missed_words_so_far = 0
query_cursor = 0
try:
for word_block in timestamps[audio_filename]:
if (
# When the query is identical
(word_block.word == query_words[query_cursor]) or
# When the query is a subsequence of what's
# available
(subsequence and
self._is_subsequence_of(query_words[query_cursor],
word_block.word)) or
# When the query is a supersequence of what's
# available
(supersequence and self._is_supersequence_of(
query_words[query_cursor], word_block.word)) or
# When query is a permutation of what's available.
(anagram and self._is_anagram_of(
query_words[query_cursor], word_block.word))
):
result.append(word_block)
if timing_error is not None:
try:
if round(result[-1].start -
result[-2].end, 4) > timing_error:
result = list()
query_cursor = 0
except IndexError:
pass
if self._partial_search_validator(
query_words, [x.word for x in result],
anagram=anagram,
subsequence=subsequence,
supersequence=supersequence):
yield {
"File Name": audio_filename,
"Query": query,
"Result": tuple([result[0].start,
result[-1].end])}
result = list()
query_cursor = 0
else:
query_cursor += 1
elif missed_words_so_far > missing_word_tolerance:
result = list()
query_cursor = 0
elif (missing_word_tolerance > 0) and (len(result) > 0):
result.append(word_block)
missed_words_so_far += 1
except KeyError:
# This is needed for the case where no timestamp is present.
pass
except IndexError:
# This is needed when multiple timestamps are present, and
# advanced control structures like `missed_word_tolerance` are
# non-zero. In that case, it can search to the end of the first
# timestamp looking to complete its partial result and since
# there are no more `word_block`s left, it returns an error.
# `continue` should be used to reset the partial result and
# move to the next timestamp.
continue
|
[
"def",
"search_gen",
"(",
"self",
",",
"query",
",",
"audio_basename",
"=",
"None",
",",
"case_sensitive",
"=",
"False",
",",
"subsequence",
"=",
"False",
",",
"supersequence",
"=",
"False",
",",
"timing_error",
"=",
"0.0",
",",
"anagram",
"=",
"False",
",",
"missing_word_tolerance",
"=",
"0",
")",
":",
"def",
"case_sensitivity_handler",
"(",
"case_sensitive",
"=",
"case_sensitive",
")",
":",
"def",
"get_query_words",
"(",
"query",
",",
"case_sensitive",
"=",
"case_sensitive",
")",
":",
"query_words",
"=",
"list",
"(",
"filter",
"(",
"None",
",",
"''",
".",
"join",
"(",
"filter",
"(",
"lambda",
"char",
":",
"char",
"in",
"(",
"ascii_letters",
"+",
"\" \"",
")",
",",
"list",
"(",
"query",
")",
")",
")",
".",
"split",
"(",
"\" \"",
")",
")",
")",
"if",
"case_sensitive",
":",
"return",
"query_words",
"return",
"[",
"q",
".",
"lower",
"(",
")",
"for",
"q",
"in",
"query_words",
"]",
"def",
"get_timestamps",
"(",
"case_sensitive",
"=",
"case_sensitive",
")",
":",
"timestamps",
"=",
"self",
".",
"get_timestamps",
"(",
")",
".",
"copy",
"(",
")",
"if",
"not",
"case_sensitive",
":",
"return",
"{",
"audio_basename",
":",
"[",
"_WordBlock",
"(",
"word",
"=",
"word_block",
".",
"word",
".",
"lower",
"(",
")",
",",
"start",
"=",
"word_block",
".",
"start",
",",
"end",
"=",
"word_block",
".",
"end",
")",
"for",
"word_block",
"in",
"timestamps",
"[",
"audio_basename",
"]",
"]",
"for",
"audio_basename",
"in",
"timestamps",
"}",
"return",
"timestamps",
"return",
"locals",
"(",
")",
"query_words",
"=",
"case_sensitivity_handler",
"(",
")",
"[",
"\"get_query_words\"",
"]",
"(",
"query",
")",
"timestamps",
"=",
"case_sensitivity_handler",
"(",
")",
"[",
"\"get_timestamps\"",
"]",
"(",
")",
"assert",
"abs",
"(",
"missing_word_tolerance",
"-",
"(",
"len",
"(",
"query_words",
")",
"-",
"2",
")",
")",
">=",
"0",
",",
"(",
"\"The number of words that can be missing must be less than \"",
"\"the total number of words within the query minus the first and \"",
"\"the last word.\"",
")",
"for",
"audio_filename",
"in",
"(",
"(",
"lambda",
":",
"(",
"timestamps",
".",
"keys",
"(",
")",
"if",
"audio_basename",
"is",
"None",
"else",
"[",
"audio_basename",
"]",
")",
")",
"(",
")",
")",
":",
"result",
"=",
"list",
"(",
")",
"missed_words_so_far",
"=",
"0",
"query_cursor",
"=",
"0",
"try",
":",
"for",
"word_block",
"in",
"timestamps",
"[",
"audio_filename",
"]",
":",
"if",
"(",
"# When the query is identical",
"(",
"word_block",
".",
"word",
"==",
"query_words",
"[",
"query_cursor",
"]",
")",
"or",
"# When the query is a subsequence of what's",
"# available",
"(",
"subsequence",
"and",
"self",
".",
"_is_subsequence_of",
"(",
"query_words",
"[",
"query_cursor",
"]",
",",
"word_block",
".",
"word",
")",
")",
"or",
"# When the query is a supersequence of what's",
"# available",
"(",
"supersequence",
"and",
"self",
".",
"_is_supersequence_of",
"(",
"query_words",
"[",
"query_cursor",
"]",
",",
"word_block",
".",
"word",
")",
")",
"or",
"# When query is a permutation of what's available.",
"(",
"anagram",
"and",
"self",
".",
"_is_anagram_of",
"(",
"query_words",
"[",
"query_cursor",
"]",
",",
"word_block",
".",
"word",
")",
")",
")",
":",
"result",
".",
"append",
"(",
"word_block",
")",
"if",
"timing_error",
"is",
"not",
"None",
":",
"try",
":",
"if",
"round",
"(",
"result",
"[",
"-",
"1",
"]",
".",
"start",
"-",
"result",
"[",
"-",
"2",
"]",
".",
"end",
",",
"4",
")",
">",
"timing_error",
":",
"result",
"=",
"list",
"(",
")",
"query_cursor",
"=",
"0",
"except",
"IndexError",
":",
"pass",
"if",
"self",
".",
"_partial_search_validator",
"(",
"query_words",
",",
"[",
"x",
".",
"word",
"for",
"x",
"in",
"result",
"]",
",",
"anagram",
"=",
"anagram",
",",
"subsequence",
"=",
"subsequence",
",",
"supersequence",
"=",
"supersequence",
")",
":",
"yield",
"{",
"\"File Name\"",
":",
"audio_filename",
",",
"\"Query\"",
":",
"query",
",",
"\"Result\"",
":",
"tuple",
"(",
"[",
"result",
"[",
"0",
"]",
".",
"start",
",",
"result",
"[",
"-",
"1",
"]",
".",
"end",
"]",
")",
"}",
"result",
"=",
"list",
"(",
")",
"query_cursor",
"=",
"0",
"else",
":",
"query_cursor",
"+=",
"1",
"elif",
"missed_words_so_far",
">",
"missing_word_tolerance",
":",
"result",
"=",
"list",
"(",
")",
"query_cursor",
"=",
"0",
"elif",
"(",
"missing_word_tolerance",
">",
"0",
")",
"and",
"(",
"len",
"(",
"result",
")",
">",
"0",
")",
":",
"result",
".",
"append",
"(",
"word_block",
")",
"missed_words_so_far",
"+=",
"1",
"except",
"KeyError",
":",
"# This is needed for the case where no timestamp is present.",
"pass",
"except",
"IndexError",
":",
"# This is needed when multiple timestamps are present, and",
"# advanced control structures like `missed_word_tolerance` are",
"# non-zero. In that case, it can search to the end of the first",
"# timestamp looking to complete its partial result and since",
"# there are no more `word_block`s left, it returns an error.",
"# `continue` should be used to reset the partial result and",
"# move to the next timestamp.",
"continue"
] |
A generator that searches for the `query` within the audiofiles of the
src_dir.
Parameters
----------
query : str
A string that'll be searched. It'll be splitted on spaces and then
each word gets sequentially searched.
audio_basename : str, optional
Search only within the given audio_basename.
Default is `None`
case_sensitive : bool, optional
Default is `False`
subsequence : bool, optional
`True` if it's not needed for the exact word be detected and larger
strings that contain the given one are fine.
If the query is a sentences with multiple words, it'll be
considered for each word, not the whole sentence.
Default is `False`.
supersequence : bool, optional
`True` if it's not needed for the exact word be detected and
smaller strings that are contained within the given one are fine.
If the query is a sentences with multiple words, it'll be
considered for each word, not the whole sentence.
Default is `False`.
anagram : bool, optional
`True` if it's acceptable for a complete permutation of the word to
be found. e.g. "abcde" would be acceptable for "edbac".
If the query is a sentences with multiple words, it'll be
considered for each word, not the whole sentence.
Default is `False`.
timing_error : None or float, optional
Sometimes other words (almost always very small) would be detected
between the words of the `query`. This parameter defines the
timing difference/tolerance of the search.
Default is 0.0 i.e. No timing error is tolerated.
missing_word_tolerance : int, optional
The number of words that can be missed within the result.
For example, if the query is "Some random text" and the tolerance
value is `1`, then "Some text" would be a valid response.
Note that the first and last words cannot be missed. Also,
there'll be an error if the value is more than the number of
available words. For the example above, any value more than 1
would have given an error (since there's only one word i.e.
"random" that can be missed)
Default is 0.
Yields
------
{"File Name": str, "Query": `query`, "Result": (float, float)}
The result of the search is returned as a tuple which is the value
of the "Result" key. The first element of the tuple is the
starting second of `query` and the last element is the ending
second of `query`
Raises
------
AssertionError
If `missing_word_tolerance` value is more than the total number of
words in the query minus 2 (since the first and the last word
cannot be removed)
|
[
"A",
"generator",
"that",
"searches",
"for",
"the",
"query",
"within",
"the",
"audiofiles",
"of",
"the",
"src_dir",
"."
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L1320-L1501
|
train
|
Generates a generator that searches for the given query within the source directory.
|
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,fPFTJxVnGSh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6pRf2DSRk,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(0b1100001 + 0o16) + chr(2343 - 2294) + chr(1724 - 1674) + chr(0b110101), 31636 - 31628), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + '\x34' + chr(2711 - 2658), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(9889 - 9778) + chr(0b0 + 0o62) + chr(167 - 117) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(8766 - 8655) + chr(340 - 291) + chr(669 - 615) + chr(0b11000 + 0o33), 0b1000), nzTpIcepk0o8(chr(530 - 482) + '\x6f' + '\x31' + chr(0b110100) + chr(0b101 + 0o54), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + chr(0b100101 + 0o20), 0o10), nzTpIcepk0o8(chr(0b1101 + 0o43) + '\157' + chr(51) + chr(0b11110 + 0o30) + chr(2011 - 1960), 0o10), nzTpIcepk0o8('\x30' + chr(7863 - 7752) + chr(0b101010 + 0o7) + chr(0b110111) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(5275 - 5164) + chr(2436 - 2385) + chr(0b10101 + 0o33) + chr(1323 - 1271), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + '\064' + '\x36', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(10819 - 10708) + chr(0b1001 + 0o51) + chr(0b1110 + 0o45) + '\062', 0b1000), nzTpIcepk0o8('\x30' + chr(420 - 309) + '\061' + chr(2469 - 2417) + chr(0b110 + 0o54), 966 - 958), nzTpIcepk0o8(chr(2014 - 1966) + chr(10961 - 10850) + chr(0b101110 + 0o3), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x32' + chr(2273 - 2223) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b1101111) + chr(2497 - 2447) + chr(1780 - 1726) + '\060', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100111 + 0o14) + chr(0b110110) + chr(0b11 + 0o56), 0o10), nzTpIcepk0o8('\x30' + chr(0b111 + 0o150) + chr(1556 - 1504) + '\x32', 41829 - 41821), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(3680 - 3569) + '\x32' + '\x34' + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(135 - 87) + chr(0b1101111) + '\062' + chr(1125 - 1071) + '\067', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(0b100111 + 0o15) + chr(54), 33279 - 33271), nzTpIcepk0o8(chr(48) + chr(1006 - 895) + chr(2291 - 2240) + '\x30', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b1 + 0o61) + chr(0b1001 + 0o51) + '\x35', 18641 - 18633), nzTpIcepk0o8(chr(48) + chr(11236 - 11125) + '\x31' + '\x31' + chr(0b10110 + 0o37), 0b1000), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\157' + chr(0b110010) + chr(0b110000) + chr(589 - 537), ord("\x08")), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(759 - 648) + '\066' + chr(0b1000 + 0o53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(1907 - 1796) + chr(622 - 571) + '\x33' + '\067', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b101001 + 0o11) + chr(0b101010 + 0o12) + chr(2146 - 2093), 0b1000), nzTpIcepk0o8(chr(48) + chr(10015 - 9904) + chr(0b110011) + '\062' + chr(0b100001 + 0o20), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b100001 + 0o116) + '\x31' + chr(0b110001) + chr(2894 - 2839), 0b1000), nzTpIcepk0o8('\x30' + chr(0b101 + 0o152) + chr(49), 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1 + 0o65) + chr(0b100001 + 0o17), ord("\x08")), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b11111 + 0o120) + '\062' + chr(0b110101) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + chr(0b11111 + 0o24) + chr(0b100101 + 0o20), 0o10), nzTpIcepk0o8(chr(1634 - 1586) + chr(0b1001000 + 0o47) + chr(0b110111) + chr(1596 - 1546), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + chr(2103 - 2053) + chr(48), 60013 - 60005), nzTpIcepk0o8(chr(0b110000) + chr(0b10110 + 0o131) + '\061' + '\061' + chr(0b110011), 6810 - 6802), nzTpIcepk0o8(chr(0b110000) + chr(3604 - 3493) + '\x33' + chr(0b110011) + '\063', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b100111 + 0o13) + '\x32' + '\x33', 17301 - 17293), nzTpIcepk0o8('\060' + chr(6398 - 6287) + chr(0b1001 + 0o50) + chr(0b1001 + 0o53) + chr(0b1100 + 0o51), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101001 + 0o6) + chr(0b10010 + 0o40) + chr(0b100001 + 0o26) + chr(1019 - 971), 59739 - 59731)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10100 + 0o41) + chr(202 - 154), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'{'), chr(0b10110 + 0o116) + chr(1387 - 1286) + chr(4710 - 4611) + '\x6f' + '\x64' + chr(0b1001010 + 0o33))(chr(117) + chr(1725 - 1609) + chr(102) + '\x2d' + chr(0b101011 + 0o15)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def pUWzIPp1BX_d(hXMPsSrOQzbh, wKKXKFBlqW0G, lyR5fSKYE8JM=None, tYk_gZQD_svR=nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1101111) + chr(0b101000 + 0o10), ord("\x08")), cJjBeLr31wFT=nzTpIcepk0o8(chr(48) + chr(111) + '\060', 8), rPy4TKveBQ36=nzTpIcepk0o8(chr(0b110000) + chr(0b110100 + 0o73) + '\x30', 8), RHOBvOmd8my9=0.0, MrpOzVwEWRZI=nzTpIcepk0o8(chr(1999 - 1951) + chr(0b1001 + 0o146) + chr(0b110000), 8), x0v58r2N9cEk=nzTpIcepk0o8(chr(2261 - 2213) + chr(0b1101111) + chr(0b110000), 8)):
def v3NrqeLNYvST(tYk_gZQD_svR=tYk_gZQD_svR):
def tiEhS9inYdjl(wKKXKFBlqW0G, tYk_gZQD_svR=tYk_gZQD_svR):
WTnHSL2AYDN5 = H4NoA26ON7iG(qEahrGEDF7Tq(None, roI3spqORKae(ES5oEprVxulp(b''), chr(155 - 55) + '\x65' + '\143' + chr(0b1101111) + chr(0b1100100) + chr(101))('\x75' + '\164' + chr(0b1100110) + chr(0b101101) + chr(56)).join(qEahrGEDF7Tq(lambda JZZiMnH571E1: JZZiMnH571E1 in BwCPS10Shn7h + roI3spqORKae(ES5oEprVxulp(b'u'), '\144' + chr(6704 - 6603) + chr(6372 - 6273) + '\x6f' + chr(0b1100100) + chr(0b1000011 + 0o42))(chr(750 - 633) + chr(0b1110100) + chr(0b1100110) + '\055' + chr(56)), H4NoA26ON7iG(wKKXKFBlqW0G))).LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b'u'), chr(0b1100100) + chr(1620 - 1519) + chr(0b10010 + 0o121) + '\157' + chr(0b1011 + 0o131) + chr(0b1100101))('\165' + chr(0b1110100) + chr(102) + chr(441 - 396) + chr(56)))))
if tYk_gZQD_svR:
return WTnHSL2AYDN5
return [roI3spqORKae(P1yWu4gF7vxH, roI3spqORKae(ES5oEprVxulp(b'\r\x8b\xa96/J\xbe&\xa0\xaf\xc8\x16'), '\144' + chr(2321 - 2220) + chr(99) + chr(6481 - 6370) + chr(0b10001 + 0o123) + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(102) + chr(0b100000 + 0o15) + chr(56)))() for P1yWu4gF7vxH in WTnHSL2AYDN5]
def oKll0lV4hz4N(tYk_gZQD_svR=tYk_gZQD_svR):
P_zdJsig8rNF = hXMPsSrOQzbh.get_timestamps().copy()
if not tYk_gZQD_svR:
return {lyR5fSKYE8JM: [LiTKA3pCZ_0l(word=roI3spqORKae(VJSBNcKjzRcP.word, roI3spqORKae(ES5oEprVxulp(b'\r\x8b\xa96/J\xbe&\xa0\xaf\xc8\x16'), chr(0b111101 + 0o47) + '\145' + '\143' + chr(3176 - 3065) + '\144' + '\x65')('\165' + chr(5639 - 5523) + '\146' + '\055' + chr(0b111000)))(), start=roI3spqORKae(VJSBNcKjzRcP, roI3spqORKae(ES5oEprVxulp(b"\x1e\xb4\xf3;'I\x90\x10\x9b\xaa\xd1\x1b"), chr(0b1011101 + 0o7) + chr(0b1110 + 0o127) + chr(99) + chr(0b100101 + 0o112) + '\x64' + chr(0b1000011 + 0o42))(chr(3133 - 3016) + chr(0b1101001 + 0o13) + chr(0b1100110) + chr(45) + chr(0b11101 + 0o33))), end=roI3spqORKae(VJSBNcKjzRcP, roI3spqORKae(ES5oEprVxulp(b'\x1b\x8c\xc6%\x0b\\\xa4\x12\xf4\x8a\xac6'), '\x64' + '\145' + chr(0b110000 + 0o63) + chr(1237 - 1126) + chr(1340 - 1240) + chr(0b1100101))('\x75' + '\164' + '\x66' + '\055' + '\x38'))) for VJSBNcKjzRcP in P_zdJsig8rNF[lyR5fSKYE8JM]] for lyR5fSKYE8JM in P_zdJsig8rNF}
return P_zdJsig8rNF
return y0cCpS6dh4OT()
WTnHSL2AYDN5 = v3NrqeLNYvST()[roI3spqORKae(ES5oEprVxulp(b'2\x80\xe5,\x10h\x96\x0e\xbd\xb9\xed\rs\xf3\xc3'), chr(3105 - 3005) + chr(8050 - 7949) + chr(0b101111 + 0o64) + '\157' + chr(9178 - 9078) + '\145')(chr(0b1110101) + chr(0b1110100) + '\x66' + '\055' + chr(56))](wKKXKFBlqW0G)
P_zdJsig8rNF = v3NrqeLNYvST()[roI3spqORKae(ES5oEprVxulp(b'2\x80\xe5,\x15t\x9e\x19\xb7\x92\xfb\x0fq\xe4'), '\x64' + chr(101) + chr(0b1100011) + chr(2075 - 1964) + '\144' + '\x65')(chr(5955 - 5838) + '\164' + chr(9879 - 9777) + '\055' + '\x38')]()
assert zQBGwUT7UU8L(x0v58r2N9cEk - (ftfygxgFas5X(WTnHSL2AYDN5) - nzTpIcepk0o8(chr(0b110000) + chr(2264 - 2153) + chr(0b10110 + 0o34), 26837 - 26829))) >= nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1101 + 0o43), 8), roI3spqORKae(ES5oEprVxulp(b"\x01\x8d\xf4S\x0fh\x9e\x1e\xa1\x94\xba\rg\xb7\xc7\x9eP\xc0\xc4\x86l\xfd,\xf0\x13\xbc\xc4\xbfocU\x88\xf0S\xe38\xb2\xfd\x02\x988\x90\xe2\x07A\x7f\x96\\\xa8\x83\xe9\x11!\xe3\xd8\x90L\x84\xc3\xce}\xb59\xebG\xbe\xc9\xf1!t]\xca\xf8H\xb0$\xbd\xb3\x12\xd7'\x81\xe2S\x16t\x87\x14\xad\x88\xba\x16i\xf2\x90\x80W\xc1\xc5\xdf8\xf8$\xeaF\xac\x85\xa5'd\x10\xce\xf4H\xe3?\xfb\xf2\x0b\xdcu\x91\xf9\x16Aq\x92\x0f\xb0\xc6\xed\rs\xf3\x9e"), '\x64' + chr(6895 - 6794) + chr(99) + chr(11357 - 11246) + chr(100) + '\145')('\165' + chr(116) + chr(0b1011011 + 0o13) + chr(0b101101) + chr(56))
for Qqt4QnbP7kDr in (lambda : roI3spqORKae(P_zdJsig8rNF, roI3spqORKae(ES5oEprVxulp(b'>\x80\xe8\x00'), chr(0b1100100) + '\145' + '\143' + '\x6f' + '\x64' + '\x65')(chr(10759 - 10642) + '\164' + chr(0b101010 + 0o74) + chr(1608 - 1563) + '\x38'))() if lyR5fSKYE8JM is None else [lyR5fSKYE8JM])():
POx95m7SPOVy = H4NoA26ON7iG()
FFomP0Ut01in = nzTpIcepk0o8('\060' + chr(0b1101111) + chr(838 - 790), 8)
PF69qG3H1lnB = nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b101000 + 0o10), 8)
try:
for VJSBNcKjzRcP in P_zdJsig8rNF[Qqt4QnbP7kDr]:
if roI3spqORKae(VJSBNcKjzRcP, roI3spqORKae(ES5oEprVxulp(b'\x1f\xbd\xc75\x18[\xcb\x17\xf0\x88\xdd0'), '\144' + '\x65' + chr(0b1100011) + chr(111) + chr(100) + chr(0b1100101))(chr(0b1110101) + chr(2115 - 1999) + chr(0b1100110) + '\055' + chr(2062 - 2006))) == WTnHSL2AYDN5[PF69qG3H1lnB] or (cJjBeLr31wFT and roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\n\x8c\xe2,\x12h\x91\x0f\xa1\x97\xef\x07o\xf4\xd5\xaeM\xc2'), '\x64' + chr(101) + chr(0b1100011) + '\x6f' + chr(0b1000000 + 0o44) + chr(0b1100101))(chr(117) + '\x74' + '\146' + chr(0b101101) + chr(0b111000)))(WTnHSL2AYDN5[PF69qG3H1lnB], roI3spqORKae(VJSBNcKjzRcP, roI3spqORKae(ES5oEprVxulp(b'\x1f\xbd\xc75\x18[\xcb\x17\xf0\x88\xdd0'), chr(100) + chr(0b101111 + 0o66) + chr(3370 - 3271) + chr(111) + chr(0b100110 + 0o76) + chr(0b1001 + 0o134))(chr(0b101011 + 0o112) + chr(1987 - 1871) + '\146' + '\055' + chr(2628 - 2572))))) or (rPy4TKveBQ36 and roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\n\x8c\xe2,\x12h\x83\x19\xb6\x95\xff\x13t\xf2\xde\x92G\xfb\xd8\xc0'), chr(100) + '\x65' + chr(99) + chr(0b1101111) + '\144' + chr(101))(chr(3850 - 3733) + chr(0b1110100) + chr(102) + chr(0b101101) + '\x38'))(WTnHSL2AYDN5[PF69qG3H1lnB], roI3spqORKae(VJSBNcKjzRcP, roI3spqORKae(ES5oEprVxulp(b'\x1f\xbd\xc75\x18[\xcb\x17\xf0\x88\xdd0'), '\x64' + '\145' + chr(99) + '\x6f' + chr(100) + chr(0b1011101 + 0o10))('\165' + chr(0b1110010 + 0o2) + chr(0b1100110) + chr(0b101101) + '\070')))) or (MrpOzVwEWRZI and roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\n\x8c\xe2,\x00s\x92\x1b\xb6\x87\xf7=n\xf1'), chr(100) + '\x65' + chr(7224 - 7125) + '\157' + chr(100) + chr(101))(chr(9846 - 9729) + chr(5075 - 4959) + '\146' + chr(1816 - 1771) + '\070'))(WTnHSL2AYDN5[PF69qG3H1lnB], roI3spqORKae(VJSBNcKjzRcP, roI3spqORKae(ES5oEprVxulp(b'\x1f\xbd\xc75\x18[\xcb\x17\xf0\x88\xdd0'), chr(0b1010 + 0o132) + chr(771 - 670) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(0b1011110 + 0o7))(chr(0b1110101) + chr(0b10111 + 0o135) + '\x66' + '\x2d' + chr(2780 - 2724))))):
roI3spqORKae(POx95m7SPOVy, roI3spqORKae(ES5oEprVxulp(b'\x1d\xb1\xc2G\x19z\xb4\x13\xae\x89\xcfW'), chr(0b110100 + 0o60) + chr(0b10110 + 0o117) + chr(99) + '\157' + chr(8446 - 8346) + '\x65')('\165' + '\164' + '\x66' + chr(0b101100 + 0o1) + chr(2309 - 2253)))(VJSBNcKjzRcP)
if RHOBvOmd8my9 is not None:
try:
if sOS7b2Ofrbne(roI3spqORKae(POx95m7SPOVy[-nzTpIcepk0o8('\060' + chr(0b1010110 + 0o31) + chr(0b101111 + 0o2), 8)], roI3spqORKae(ES5oEprVxulp(b"\x1e\xb4\xf3;'I\x90\x10\x9b\xaa\xd1\x1b"), '\x64' + chr(0b1100101) + chr(0b10000 + 0o123) + chr(0b1001011 + 0o44) + chr(0b111100 + 0o50) + chr(101))(chr(9736 - 9619) + chr(0b1110100) + chr(0b111100 + 0o52) + '\055' + '\x38')) - roI3spqORKae(POx95m7SPOVy[-nzTpIcepk0o8('\x30' + '\157' + '\062', 8)], roI3spqORKae(ES5oEprVxulp(b'\x1b\x8c\xc6%\x0b\\\xa4\x12\xf4\x8a\xac6'), chr(0b1010001 + 0o23) + '\x65' + chr(3433 - 3334) + chr(0b1000010 + 0o55) + chr(1251 - 1151) + '\x65')('\x75' + chr(116) + chr(0b111000 + 0o56) + chr(45) + chr(838 - 782))), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\064', 27260 - 27252)) > RHOBvOmd8my9:
POx95m7SPOVy = H4NoA26ON7iG()
PF69qG3H1lnB = nzTpIcepk0o8('\060' + '\x6f' + '\x30', 8)
except ah0DLMBSEU5j:
pass
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\n\x95\xf0\x01\x15t\x92\x10\x9b\x95\xff\x03s\xf4\xd8\xaeT\xc5\xdb\xcf|\xf49\xebA'), chr(0b1100100) + '\145' + '\x63' + '\x6f' + chr(2772 - 2672) + chr(0b100001 + 0o104))('\x75' + '\164' + chr(102) + '\055' + chr(0b111000)))(WTnHSL2AYDN5, [roI3spqORKae(bI5jsQ9OkQtj, roI3spqORKae(ES5oEprVxulp(b'\x1f\xbd\xc75\x18[\xcb\x17\xf0\x88\xdd0'), '\144' + '\x65' + chr(5778 - 5679) + '\x6f' + chr(0b1001101 + 0o27) + '\145')(chr(6933 - 6816) + chr(0b1110100) + chr(102) + '\055' + chr(0b111000))) for bI5jsQ9OkQtj in POx95m7SPOVy], anagram=MrpOzVwEWRZI, subsequence=cJjBeLr31wFT, supersequence=rPy4TKveBQ36):
yield {roI3spqORKae(ES5oEprVxulp(b'\x13\x8c\xfd\x16AS\x92\x11\xa1'), chr(100) + '\145' + chr(0b111110 + 0o45) + '\x6f' + '\144' + chr(0b1100101))(chr(0b1110101) + chr(0b1100100 + 0o20) + chr(7792 - 7690) + chr(0b101000 + 0o5) + '\x38'): Qqt4QnbP7kDr, roI3spqORKae(ES5oEprVxulp(b'\x04\x90\xf4\x01\x18'), chr(0b1100100) + chr(2517 - 2416) + chr(0b1100011) + chr(422 - 311) + chr(0b1100100) + chr(7305 - 7204))('\165' + '\x74' + '\146' + '\055' + chr(56)): wKKXKFBlqW0G, roI3spqORKae(ES5oEprVxulp(b'\x07\x80\xe2\x06\ri'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(10938 - 10827) + chr(100) + '\x65')('\x75' + chr(0b1110010 + 0o2) + '\146' + '\x2d' + chr(0b111000)): nfNqtJL5aRaY([roI3spqORKae(POx95m7SPOVy[nzTpIcepk0o8('\060' + chr(0b100 + 0o153) + chr(0b10000 + 0o40), 8)], roI3spqORKae(ES5oEprVxulp(b"\x1e\xb4\xf3;'I\x90\x10\x9b\xaa\xd1\x1b"), chr(8082 - 7982) + '\145' + '\x63' + '\x6f' + chr(0b110000 + 0o64) + '\145')(chr(117) + chr(116) + chr(0b1010101 + 0o21) + chr(1556 - 1511) + '\x38')), roI3spqORKae(POx95m7SPOVy[-nzTpIcepk0o8('\x30' + chr(1217 - 1106) + chr(0b110001), 8)], roI3spqORKae(ES5oEprVxulp(b'\x1b\x8c\xc6%\x0b\\\xa4\x12\xf4\x8a\xac6'), chr(100) + chr(0b1010 + 0o133) + chr(0b1100011) + '\x6f' + '\144' + chr(0b1100101))(chr(0b110100 + 0o101) + chr(0b1010010 + 0o42) + chr(102) + '\055' + chr(0b11 + 0o65)))])}
POx95m7SPOVy = H4NoA26ON7iG()
PF69qG3H1lnB = nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101101 + 0o3), 8)
else:
PF69qG3H1lnB += nzTpIcepk0o8(chr(1777 - 1729) + chr(111) + chr(49), 8)
elif FFomP0Ut01in > x0v58r2N9cEk:
POx95m7SPOVy = H4NoA26ON7iG()
PF69qG3H1lnB = nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110000), 8)
elif x0v58r2N9cEk > nzTpIcepk0o8(chr(48) + '\157' + chr(48), 8) and ftfygxgFas5X(POx95m7SPOVy) > nzTpIcepk0o8(chr(48) + chr(111) + '\060', 8):
roI3spqORKae(POx95m7SPOVy, roI3spqORKae(ES5oEprVxulp(b'\x1d\xb1\xc2G\x19z\xb4\x13\xae\x89\xcfW'), '\x64' + '\145' + chr(4004 - 3905) + '\157' + chr(100) + chr(0b1100101))(chr(9816 - 9699) + '\x74' + chr(0b1100110) + chr(0b1011 + 0o42) + chr(0b111000)))(VJSBNcKjzRcP)
FFomP0Ut01in += nzTpIcepk0o8(chr(0b1010 + 0o46) + '\x6f' + '\061', 8)
except knUxyjfq07F9:
pass
except ah0DLMBSEU5j:
continue
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer.search_all
|
def search_all(self, queries, audio_basename=None, case_sensitive=False,
subsequence=False, supersequence=False, timing_error=0.0,
anagram=False, missing_word_tolerance=0):
"""
Returns a dictionary of all results of all of the queries for all of
the audio files.
All the specified parameters work per query.
Parameters
----------
queries : [str] or str
A list of the strings that'll be searched. If type of queries is
`str`, it'll be insterted into a list within the body of the
method.
audio_basename : str, optional
Search only within the given audio_basename.
Default is `None`.
case_sensitive : bool
Default is `False`
subsequence : bool, optional
`True` if it's not needed for the exact word be detected and larger
strings that contain the given one are fine.
If the query is a sentences with multiple words, it'll be
considered for each word, not the whole sentence.
Default is `False`.
supersequence : bool, optional
`True` if it's not needed for the exact word be detected and
smaller strings that are contained within the given one are fine.
If the query is a sentences with multiple words, it'll be
considered for each word, not the whole sentence.
Default is `False`.
anagram : bool, optional
`True` if it's acceptable for a complete permutation of the word to
be found. e.g. "abcde" would be acceptable for "edbac".
If the query is a sentences with multiple words, it'll be
considered for each word, not the whole sentence.
Default is `False`.
timing_error : None or float, optional
Sometimes other words (almost always very small) would be detected
between the words of the `query`. This parameter defines the
timing difference/tolerance of the search.
Default is 0.0 i.e. No timing error is tolerated.
missing_word_tolerance : int, optional
The number of words that can be missed within the result.
For example, if the query is "Some random text" and the tolerance
value is `1`, then "Some text" would be a valid response.
Note that the first and last words cannot be missed. Also,
there'll be an error if the value is more than the number of
available words. For the example above, any value more than 1
would have given an error (since there's only one word i.e.
"random" that can be missed)
Default is 0.
Returns
-------
search_results : {str: {str: [(float, float)]}}
A dictionary whose keys are queries and whose values are
dictionaries whose keys are all the audiofiles in which the query
is present and whose values are a list whose elements are 2-tuples
whose first element is the starting second of the query and whose
values are the ending second. e.g.
{"apple": {"fruits.wav" : [(1.1, 1.12)]}}
Raises
------
TypeError
if `queries` is neither a list nor a str
"""
search_gen_rest_of_kwargs = {
"audio_basename": audio_basename,
"case_sensitive": case_sensitive,
"subsequence": subsequence,
"supersequence": supersequence,
"timing_error": timing_error,
"anagram": anagram,
"missing_word_tolerance": missing_word_tolerance}
if not isinstance(queries, (list, str)):
raise TypeError("Invalid query type.")
if type(queries) is not list:
queries = [queries]
search_results = _PrettyDefaultDict(lambda: _PrettyDefaultDict(list))
for query in queries:
search_gen = self.search_gen(query=query,
**search_gen_rest_of_kwargs)
for search_result in search_gen:
search_results[query][
search_result["File Name"]].append(search_result["Result"])
return search_results
|
python
|
def search_all(self, queries, audio_basename=None, case_sensitive=False,
subsequence=False, supersequence=False, timing_error=0.0,
anagram=False, missing_word_tolerance=0):
"""
Returns a dictionary of all results of all of the queries for all of
the audio files.
All the specified parameters work per query.
Parameters
----------
queries : [str] or str
A list of the strings that'll be searched. If type of queries is
`str`, it'll be insterted into a list within the body of the
method.
audio_basename : str, optional
Search only within the given audio_basename.
Default is `None`.
case_sensitive : bool
Default is `False`
subsequence : bool, optional
`True` if it's not needed for the exact word be detected and larger
strings that contain the given one are fine.
If the query is a sentences with multiple words, it'll be
considered for each word, not the whole sentence.
Default is `False`.
supersequence : bool, optional
`True` if it's not needed for the exact word be detected and
smaller strings that are contained within the given one are fine.
If the query is a sentences with multiple words, it'll be
considered for each word, not the whole sentence.
Default is `False`.
anagram : bool, optional
`True` if it's acceptable for a complete permutation of the word to
be found. e.g. "abcde" would be acceptable for "edbac".
If the query is a sentences with multiple words, it'll be
considered for each word, not the whole sentence.
Default is `False`.
timing_error : None or float, optional
Sometimes other words (almost always very small) would be detected
between the words of the `query`. This parameter defines the
timing difference/tolerance of the search.
Default is 0.0 i.e. No timing error is tolerated.
missing_word_tolerance : int, optional
The number of words that can be missed within the result.
For example, if the query is "Some random text" and the tolerance
value is `1`, then "Some text" would be a valid response.
Note that the first and last words cannot be missed. Also,
there'll be an error if the value is more than the number of
available words. For the example above, any value more than 1
would have given an error (since there's only one word i.e.
"random" that can be missed)
Default is 0.
Returns
-------
search_results : {str: {str: [(float, float)]}}
A dictionary whose keys are queries and whose values are
dictionaries whose keys are all the audiofiles in which the query
is present and whose values are a list whose elements are 2-tuples
whose first element is the starting second of the query and whose
values are the ending second. e.g.
{"apple": {"fruits.wav" : [(1.1, 1.12)]}}
Raises
------
TypeError
if `queries` is neither a list nor a str
"""
search_gen_rest_of_kwargs = {
"audio_basename": audio_basename,
"case_sensitive": case_sensitive,
"subsequence": subsequence,
"supersequence": supersequence,
"timing_error": timing_error,
"anagram": anagram,
"missing_word_tolerance": missing_word_tolerance}
if not isinstance(queries, (list, str)):
raise TypeError("Invalid query type.")
if type(queries) is not list:
queries = [queries]
search_results = _PrettyDefaultDict(lambda: _PrettyDefaultDict(list))
for query in queries:
search_gen = self.search_gen(query=query,
**search_gen_rest_of_kwargs)
for search_result in search_gen:
search_results[query][
search_result["File Name"]].append(search_result["Result"])
return search_results
|
[
"def",
"search_all",
"(",
"self",
",",
"queries",
",",
"audio_basename",
"=",
"None",
",",
"case_sensitive",
"=",
"False",
",",
"subsequence",
"=",
"False",
",",
"supersequence",
"=",
"False",
",",
"timing_error",
"=",
"0.0",
",",
"anagram",
"=",
"False",
",",
"missing_word_tolerance",
"=",
"0",
")",
":",
"search_gen_rest_of_kwargs",
"=",
"{",
"\"audio_basename\"",
":",
"audio_basename",
",",
"\"case_sensitive\"",
":",
"case_sensitive",
",",
"\"subsequence\"",
":",
"subsequence",
",",
"\"supersequence\"",
":",
"supersequence",
",",
"\"timing_error\"",
":",
"timing_error",
",",
"\"anagram\"",
":",
"anagram",
",",
"\"missing_word_tolerance\"",
":",
"missing_word_tolerance",
"}",
"if",
"not",
"isinstance",
"(",
"queries",
",",
"(",
"list",
",",
"str",
")",
")",
":",
"raise",
"TypeError",
"(",
"\"Invalid query type.\"",
")",
"if",
"type",
"(",
"queries",
")",
"is",
"not",
"list",
":",
"queries",
"=",
"[",
"queries",
"]",
"search_results",
"=",
"_PrettyDefaultDict",
"(",
"lambda",
":",
"_PrettyDefaultDict",
"(",
"list",
")",
")",
"for",
"query",
"in",
"queries",
":",
"search_gen",
"=",
"self",
".",
"search_gen",
"(",
"query",
"=",
"query",
",",
"*",
"*",
"search_gen_rest_of_kwargs",
")",
"for",
"search_result",
"in",
"search_gen",
":",
"search_results",
"[",
"query",
"]",
"[",
"search_result",
"[",
"\"File Name\"",
"]",
"]",
".",
"append",
"(",
"search_result",
"[",
"\"Result\"",
"]",
")",
"return",
"search_results"
] |
Returns a dictionary of all results of all of the queries for all of
the audio files.
All the specified parameters work per query.
Parameters
----------
queries : [str] or str
A list of the strings that'll be searched. If type of queries is
`str`, it'll be insterted into a list within the body of the
method.
audio_basename : str, optional
Search only within the given audio_basename.
Default is `None`.
case_sensitive : bool
Default is `False`
subsequence : bool, optional
`True` if it's not needed for the exact word be detected and larger
strings that contain the given one are fine.
If the query is a sentences with multiple words, it'll be
considered for each word, not the whole sentence.
Default is `False`.
supersequence : bool, optional
`True` if it's not needed for the exact word be detected and
smaller strings that are contained within the given one are fine.
If the query is a sentences with multiple words, it'll be
considered for each word, not the whole sentence.
Default is `False`.
anagram : bool, optional
`True` if it's acceptable for a complete permutation of the word to
be found. e.g. "abcde" would be acceptable for "edbac".
If the query is a sentences with multiple words, it'll be
considered for each word, not the whole sentence.
Default is `False`.
timing_error : None or float, optional
Sometimes other words (almost always very small) would be detected
between the words of the `query`. This parameter defines the
timing difference/tolerance of the search.
Default is 0.0 i.e. No timing error is tolerated.
missing_word_tolerance : int, optional
The number of words that can be missed within the result.
For example, if the query is "Some random text" and the tolerance
value is `1`, then "Some text" would be a valid response.
Note that the first and last words cannot be missed. Also,
there'll be an error if the value is more than the number of
available words. For the example above, any value more than 1
would have given an error (since there's only one word i.e.
"random" that can be missed)
Default is 0.
Returns
-------
search_results : {str: {str: [(float, float)]}}
A dictionary whose keys are queries and whose values are
dictionaries whose keys are all the audiofiles in which the query
is present and whose values are a list whose elements are 2-tuples
whose first element is the starting second of the query and whose
values are the ending second. e.g.
{"apple": {"fruits.wav" : [(1.1, 1.12)]}}
Raises
------
TypeError
if `queries` is neither a list nor a str
|
[
"Returns",
"a",
"dictionary",
"of",
"all",
"results",
"of",
"all",
"of",
"the",
"queries",
"for",
"all",
"of",
"the",
"audio",
"files",
".",
"All",
"the",
"specified",
"parameters",
"work",
"per",
"query",
"."
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L1503-L1601
|
train
|
This method searches all of the audio files for all of the specified words.
|
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,QhZR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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(0b1000010 + 0o55) + '\x33' + chr(0b110110 + 0o1) + '\063', 4084 - 4076), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1001000 + 0o47) + chr(1155 - 1106) + chr(50) + chr(54), 0o10), nzTpIcepk0o8(chr(0b0 + 0o60) + '\x6f' + '\x32' + '\x36' + chr(53), 60004 - 59996), nzTpIcepk0o8('\060' + chr(1608 - 1497) + chr(0b110010) + '\060' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b1101111) + chr(51) + chr(0b11010 + 0o32) + '\060', 0o10), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\x6f' + chr(335 - 281) + chr(50), 0o10), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(111) + chr(0b110001) + chr(0b1111 + 0o42) + '\x31', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10001 + 0o40) + chr(49) + chr(0b110100), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(187 - 139) + '\064', 0o10), nzTpIcepk0o8(chr(190 - 142) + chr(0b1101111) + chr(0b11 + 0o60) + chr(49), 10126 - 10118), nzTpIcepk0o8(chr(48) + chr(111) + '\063' + chr(0b110010) + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(8102 - 7991) + chr(0b101111 + 0o4) + chr(2308 - 2254) + chr(0b100001 + 0o25), 0b1000), nzTpIcepk0o8(chr(1992 - 1944) + '\x6f' + chr(0b110011) + chr(0b110111) + '\x36', 0b1000), nzTpIcepk0o8('\x30' + chr(6707 - 6596) + chr(0b110011) + '\x31' + '\x30', 14846 - 14838), nzTpIcepk0o8('\060' + '\157' + '\x33' + '\x34' + '\x30', 8), nzTpIcepk0o8(chr(48) + chr(0b110101 + 0o72) + chr(0b110000 + 0o2) + chr(1177 - 1125) + chr(0b11010 + 0o35), 0b1000), nzTpIcepk0o8('\060' + chr(523 - 412) + chr(0b10010 + 0o37) + '\060', 46407 - 46399), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(52) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2292 - 2241) + '\062', 62532 - 62524), nzTpIcepk0o8(chr(642 - 594) + '\x6f' + chr(1225 - 1175) + '\065' + chr(0b101100 + 0o7), 0o10), nzTpIcepk0o8(chr(1604 - 1556) + chr(3629 - 3518) + chr(0b110001) + chr(0b110010) + '\067', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(0b101111 + 0o5) + '\063', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(0b110100) + chr(0b110100), 61622 - 61614), nzTpIcepk0o8(chr(0b110000) + chr(5271 - 5160) + chr(1330 - 1275) + chr(49), 10203 - 10195), nzTpIcepk0o8('\x30' + chr(11059 - 10948) + chr(0b1111 + 0o45) + chr(49), 0b1000), nzTpIcepk0o8(chr(1243 - 1195) + chr(111) + chr(0b110001) + chr(0b110011) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(2228 - 2180) + '\x6f' + chr(50) + chr(704 - 656) + '\065', 51572 - 51564), nzTpIcepk0o8(chr(525 - 477) + chr(4144 - 4033) + chr(1765 - 1714) + chr(51) + chr(48), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1100100 + 0o13) + chr(2244 - 2195) + chr(115 - 60) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b1101111) + chr(51) + '\065' + chr(1013 - 964), 0o10), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(111) + chr(1486 - 1436) + chr(49) + chr(0b11010 + 0o32), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\x31' + chr(1212 - 1161), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b11101 + 0o25) + chr(0b110000) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(54) + '\066', 0b1000), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(111) + '\x33' + chr(0b11110 + 0o24) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\157' + '\x31' + chr(0b110001) + chr(0b11010 + 0o27), 8), nzTpIcepk0o8('\x30' + chr(0b111000 + 0o67) + '\x35' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(8798 - 8687) + '\x37' + chr(1962 - 1914), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + chr(51), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\063' + chr(0b10 + 0o64) + chr(0b110111), 31513 - 31505)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b11101 + 0o122) + '\x35' + chr(605 - 557), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd5'), chr(0b1100100) + chr(0b1001111 + 0o26) + chr(0b1100011) + '\x6f' + chr(100) + chr(3208 - 3107))(chr(0b100111 + 0o116) + chr(116) + chr(102) + '\055' + chr(331 - 275)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def j0qatZMd0vve(hXMPsSrOQzbh, wv6ZySc8Kitu, lyR5fSKYE8JM=None, tYk_gZQD_svR=nzTpIcepk0o8(chr(0b1 + 0o57) + '\x6f' + chr(0b10000 + 0o40), 0b1000), cJjBeLr31wFT=nzTpIcepk0o8('\060' + chr(0b1000001 + 0o56) + '\060', 8), rPy4TKveBQ36=nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10101 + 0o33), 8), RHOBvOmd8my9=0.0, MrpOzVwEWRZI=nzTpIcepk0o8(chr(1455 - 1407) + chr(0b1000001 + 0o56) + '\060', 8), x0v58r2N9cEk=nzTpIcepk0o8(chr(1783 - 1735) + chr(111) + chr(0b110000), 8)):
n4cSykASx23g = {roI3spqORKae(ES5oEprVxulp(b'\x9a#\xd1\xef\x8fm+-\xb7|\xb9\x97\x93\xad'), chr(0b1100100) + '\x65' + chr(0b10001 + 0o122) + '\x6f' + '\144' + chr(5810 - 5709))(chr(2785 - 2668) + chr(2207 - 2091) + '\x66' + '\x2d' + chr(0b100101 + 0o23)): lyR5fSKYE8JM, roI3spqORKae(ES5oEprVxulp(b'\x987\xc6\xe3\xbfA,"\xb7p\xa3\x9f\x88\xad'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(1326 - 1215) + chr(1080 - 980) + '\145')(chr(13282 - 13165) + chr(116) + '\146' + '\055' + chr(56)): tYk_gZQD_svR, roI3spqORKae(ES5oEprVxulp(b'\x88#\xd7\xf5\x85C<)\xaaz\xb2'), chr(0b1100100) + chr(101) + '\143' + '\157' + '\x64' + '\x65')(chr(0b1110101) + '\x74' + '\146' + '\x2d' + '\070'): cJjBeLr31wFT, roI3spqORKae(ES5oEprVxulp(b'\x88#\xc5\xe3\x92A,=\xb1|\xb9\x95\x9b'), chr(0b1001101 + 0o27) + chr(0b110000 + 0o65) + chr(99) + chr(111) + chr(0b1100100) + chr(0b101001 + 0o74))('\165' + '\x74' + chr(102) + chr(1678 - 1633) + chr(0b111000)): rPy4TKveBQ36, roI3spqORKae(ES5oEprVxulp(b'\x8f?\xd8\xef\x8eU\x16)\xb6k\xb8\x84'), chr(0b101010 + 0o72) + '\x65' + chr(0b100110 + 0o75) + chr(0b1101111) + chr(0b111000 + 0o54) + chr(0b1100101))(chr(13214 - 13097) + chr(0b1001101 + 0o47) + chr(102) + '\055' + chr(56)): RHOBvOmd8my9, roI3spqORKae(ES5oEprVxulp(b'\x9a8\xd4\xe1\x92S$'), chr(100) + '\x65' + '\x63' + '\x6f' + chr(0b1100100) + chr(0b1001001 + 0o34))(chr(117) + chr(0b10 + 0o162) + chr(102) + chr(0b1101 + 0o40) + '\070'): MrpOzVwEWRZI, roI3spqORKae(ES5oEprVxulp(b'\x96?\xc6\xf5\x89\\.\x13\xb3v\xa5\x92\xa1\xbc\x8f\xcbm\x17{\xc54\x86'), '\144' + '\x65' + '\143' + chr(2621 - 2510) + chr(0b1100100) + '\145')(chr(0b1110101) + chr(116) + chr(0b101001 + 0o75) + '\055' + chr(211 - 155)): x0v58r2N9cEk}
if not suIjIS24Zkqw(wv6ZySc8Kitu, (H4NoA26ON7iG, N9zlRy29S1SS)):
raise jZIjKu8IFANs(roI3spqORKae(ES5oEprVxulp(b'\xb28\xc3\xe7\x8c[-l\xb5l\xb2\x84\x87\xe8\x94\xdex\x004'), chr(7036 - 6936) + chr(101) + '\x63' + '\157' + chr(0b110111 + 0o55) + chr(0b1100101))('\165' + chr(0b1110100) + chr(102) + chr(45) + chr(2875 - 2819)))
if not suIjIS24Zkqw(wv6ZySc8Kitu, H4NoA26ON7iG):
wv6ZySc8Kitu = [wv6ZySc8Kitu]
Pq9qv_Qh_7tH = QosgjTGdRyFK(lambda : QosgjTGdRyFK(H4NoA26ON7iG))
for wKKXKFBlqW0G in wv6ZySc8Kitu:
pUWzIPp1BX_d = hXMPsSrOQzbh.search_gen(query=wKKXKFBlqW0G, **n4cSykASx23g)
for FD5Vw0NCfEfL in pUWzIPp1BX_d:
roI3spqORKae(Pq9qv_Qh_7tH[wKKXKFBlqW0G][FD5Vw0NCfEfL[roI3spqORKae(ES5oEprVxulp(b'\xbd?\xd9\xe3\xc0|(!\xa1'), chr(4940 - 4840) + chr(0b1011111 + 0o6) + chr(99) + chr(2409 - 2298) + chr(4147 - 4047) + chr(3827 - 3726))('\165' + chr(116) + chr(0b1100110) + '\055' + chr(859 - 803))]], roI3spqORKae(ES5oEprVxulp(b'\xb3\x02\xe6\xb2\x98U\x0e#\xaev\x82\xc3'), '\144' + chr(0b1100101) + chr(0b1 + 0o142) + '\x6f' + chr(0b10110 + 0o116) + '\145')('\165' + '\x74' + chr(0b1100110) + chr(688 - 643) + chr(1277 - 1221)))(FD5Vw0NCfEfL[roI3spqORKae(ES5oEprVxulp(b'\xa93\xc6\xf3\x8cF'), '\144' + chr(101) + chr(8601 - 8502) + chr(111) + '\144' + chr(101))(chr(117) + chr(0b1110100) + chr(2956 - 2854) + '\055' + chr(56))])
return Pq9qv_Qh_7tH
|
aalireza/SimpleAudioIndexer
|
SimpleAudioIndexer/__init__.py
|
SimpleAudioIndexer.search_regexp
|
def search_regexp(self, pattern, audio_basename=None):
"""
First joins the words of the word_blocks of timestamps with space, per
audio_basename. Then matches `pattern` and calculates the index of the
word_block where the first and last word of the matched result appears
in. Then presents the output like `search_all` method.
Note that the leading and trailing spaces from the matched results
would be removed while determining which word_block they belong to.
Parameters
----------
pattern : str
A regex pattern.
audio_basename : str, optional
Search only within the given audio_basename.
Default is `False`.
Returns
-------
search_results : {str: {str: [(float, float)]}}
A dictionary whose keys are queries and whose values are
dictionaries whose keys are all the audiofiles in which the query
is present and whose values are a list whose elements are 2-tuples
whose first element is the starting second of the query and whose
values are the ending second. e.g.
{"apple": {"fruits.wav" : [(1.1, 1.12)]}}
"""
def indexes_in_transcript_to_start_end_second(index_tup,
audio_basename):
"""
Calculates the word block index by having the beginning and ending
index of the matched result from the transcription
Parameters
----------
index_tup : (int, tup)
index_tup is of the form tuple(index_start, index_end)
audio_basename : str
Retrun
------
[float, float]
The time of the output of the matched result. Derived from two
separate word blocks belonging to the beginning and the end of
the index_start and index_end.
"""
space_indexes = [i for i, x in enumerate(
transcription[audio_basename]) if x == " "]
space_indexes.sort(reverse=True)
index_start, index_end = index_tup
# re.finditer returns the ending index by one more
index_end -= 1
while transcription[audio_basename][index_start] == " ":
index_start += 1
while transcription[audio_basename][index_end] == " ":
index_end -= 1
block_number_start = 0
block_number_end = len(space_indexes)
for block_cursor, space_index in enumerate(space_indexes):
if index_start > space_index:
block_number_start = (len(space_indexes) - block_cursor)
break
for block_cursor, space_index in enumerate(space_indexes):
if index_end > space_index:
block_number_end = (len(space_indexes) - block_cursor)
break
return (timestamps[audio_basename][block_number_start].start,
timestamps[audio_basename][block_number_end].end)
timestamps = self.get_timestamps()
if audio_basename is not None:
timestamps = {audio_basename: timestamps[audio_basename]}
transcription = {
audio_basename: ' '.join(
[word_block.word for word_block in timestamps[audio_basename]]
) for audio_basename in timestamps}
match_map = map(
lambda audio_basename: tuple((
audio_basename,
re.finditer(pattern, transcription[audio_basename]))),
transcription.keys())
search_results = _PrettyDefaultDict(lambda: _PrettyDefaultDict(list))
for audio_basename, match_iter in match_map:
for match in match_iter:
search_results[match.group()][audio_basename].append(
tuple(indexes_in_transcript_to_start_end_second(
match.span(), audio_basename)))
return search_results
|
python
|
def search_regexp(self, pattern, audio_basename=None):
"""
First joins the words of the word_blocks of timestamps with space, per
audio_basename. Then matches `pattern` and calculates the index of the
word_block where the first and last word of the matched result appears
in. Then presents the output like `search_all` method.
Note that the leading and trailing spaces from the matched results
would be removed while determining which word_block they belong to.
Parameters
----------
pattern : str
A regex pattern.
audio_basename : str, optional
Search only within the given audio_basename.
Default is `False`.
Returns
-------
search_results : {str: {str: [(float, float)]}}
A dictionary whose keys are queries and whose values are
dictionaries whose keys are all the audiofiles in which the query
is present and whose values are a list whose elements are 2-tuples
whose first element is the starting second of the query and whose
values are the ending second. e.g.
{"apple": {"fruits.wav" : [(1.1, 1.12)]}}
"""
def indexes_in_transcript_to_start_end_second(index_tup,
audio_basename):
"""
Calculates the word block index by having the beginning and ending
index of the matched result from the transcription
Parameters
----------
index_tup : (int, tup)
index_tup is of the form tuple(index_start, index_end)
audio_basename : str
Retrun
------
[float, float]
The time of the output of the matched result. Derived from two
separate word blocks belonging to the beginning and the end of
the index_start and index_end.
"""
space_indexes = [i for i, x in enumerate(
transcription[audio_basename]) if x == " "]
space_indexes.sort(reverse=True)
index_start, index_end = index_tup
# re.finditer returns the ending index by one more
index_end -= 1
while transcription[audio_basename][index_start] == " ":
index_start += 1
while transcription[audio_basename][index_end] == " ":
index_end -= 1
block_number_start = 0
block_number_end = len(space_indexes)
for block_cursor, space_index in enumerate(space_indexes):
if index_start > space_index:
block_number_start = (len(space_indexes) - block_cursor)
break
for block_cursor, space_index in enumerate(space_indexes):
if index_end > space_index:
block_number_end = (len(space_indexes) - block_cursor)
break
return (timestamps[audio_basename][block_number_start].start,
timestamps[audio_basename][block_number_end].end)
timestamps = self.get_timestamps()
if audio_basename is not None:
timestamps = {audio_basename: timestamps[audio_basename]}
transcription = {
audio_basename: ' '.join(
[word_block.word for word_block in timestamps[audio_basename]]
) for audio_basename in timestamps}
match_map = map(
lambda audio_basename: tuple((
audio_basename,
re.finditer(pattern, transcription[audio_basename]))),
transcription.keys())
search_results = _PrettyDefaultDict(lambda: _PrettyDefaultDict(list))
for audio_basename, match_iter in match_map:
for match in match_iter:
search_results[match.group()][audio_basename].append(
tuple(indexes_in_transcript_to_start_end_second(
match.span(), audio_basename)))
return search_results
|
[
"def",
"search_regexp",
"(",
"self",
",",
"pattern",
",",
"audio_basename",
"=",
"None",
")",
":",
"def",
"indexes_in_transcript_to_start_end_second",
"(",
"index_tup",
",",
"audio_basename",
")",
":",
"\"\"\"\n Calculates the word block index by having the beginning and ending\n index of the matched result from the transcription\n\n Parameters\n ----------\n index_tup : (int, tup)\n index_tup is of the form tuple(index_start, index_end)\n audio_basename : str\n\n Retrun\n ------\n [float, float]\n The time of the output of the matched result. Derived from two\n separate word blocks belonging to the beginning and the end of\n the index_start and index_end.\n \"\"\"",
"space_indexes",
"=",
"[",
"i",
"for",
"i",
",",
"x",
"in",
"enumerate",
"(",
"transcription",
"[",
"audio_basename",
"]",
")",
"if",
"x",
"==",
"\" \"",
"]",
"space_indexes",
".",
"sort",
"(",
"reverse",
"=",
"True",
")",
"index_start",
",",
"index_end",
"=",
"index_tup",
"# re.finditer returns the ending index by one more",
"index_end",
"-=",
"1",
"while",
"transcription",
"[",
"audio_basename",
"]",
"[",
"index_start",
"]",
"==",
"\" \"",
":",
"index_start",
"+=",
"1",
"while",
"transcription",
"[",
"audio_basename",
"]",
"[",
"index_end",
"]",
"==",
"\" \"",
":",
"index_end",
"-=",
"1",
"block_number_start",
"=",
"0",
"block_number_end",
"=",
"len",
"(",
"space_indexes",
")",
"for",
"block_cursor",
",",
"space_index",
"in",
"enumerate",
"(",
"space_indexes",
")",
":",
"if",
"index_start",
">",
"space_index",
":",
"block_number_start",
"=",
"(",
"len",
"(",
"space_indexes",
")",
"-",
"block_cursor",
")",
"break",
"for",
"block_cursor",
",",
"space_index",
"in",
"enumerate",
"(",
"space_indexes",
")",
":",
"if",
"index_end",
">",
"space_index",
":",
"block_number_end",
"=",
"(",
"len",
"(",
"space_indexes",
")",
"-",
"block_cursor",
")",
"break",
"return",
"(",
"timestamps",
"[",
"audio_basename",
"]",
"[",
"block_number_start",
"]",
".",
"start",
",",
"timestamps",
"[",
"audio_basename",
"]",
"[",
"block_number_end",
"]",
".",
"end",
")",
"timestamps",
"=",
"self",
".",
"get_timestamps",
"(",
")",
"if",
"audio_basename",
"is",
"not",
"None",
":",
"timestamps",
"=",
"{",
"audio_basename",
":",
"timestamps",
"[",
"audio_basename",
"]",
"}",
"transcription",
"=",
"{",
"audio_basename",
":",
"' '",
".",
"join",
"(",
"[",
"word_block",
".",
"word",
"for",
"word_block",
"in",
"timestamps",
"[",
"audio_basename",
"]",
"]",
")",
"for",
"audio_basename",
"in",
"timestamps",
"}",
"match_map",
"=",
"map",
"(",
"lambda",
"audio_basename",
":",
"tuple",
"(",
"(",
"audio_basename",
",",
"re",
".",
"finditer",
"(",
"pattern",
",",
"transcription",
"[",
"audio_basename",
"]",
")",
")",
")",
",",
"transcription",
".",
"keys",
"(",
")",
")",
"search_results",
"=",
"_PrettyDefaultDict",
"(",
"lambda",
":",
"_PrettyDefaultDict",
"(",
"list",
")",
")",
"for",
"audio_basename",
",",
"match_iter",
"in",
"match_map",
":",
"for",
"match",
"in",
"match_iter",
":",
"search_results",
"[",
"match",
".",
"group",
"(",
")",
"]",
"[",
"audio_basename",
"]",
".",
"append",
"(",
"tuple",
"(",
"indexes_in_transcript_to_start_end_second",
"(",
"match",
".",
"span",
"(",
")",
",",
"audio_basename",
")",
")",
")",
"return",
"search_results"
] |
First joins the words of the word_blocks of timestamps with space, per
audio_basename. Then matches `pattern` and calculates the index of the
word_block where the first and last word of the matched result appears
in. Then presents the output like `search_all` method.
Note that the leading and trailing spaces from the matched results
would be removed while determining which word_block they belong to.
Parameters
----------
pattern : str
A regex pattern.
audio_basename : str, optional
Search only within the given audio_basename.
Default is `False`.
Returns
-------
search_results : {str: {str: [(float, float)]}}
A dictionary whose keys are queries and whose values are
dictionaries whose keys are all the audiofiles in which the query
is present and whose values are a list whose elements are 2-tuples
whose first element is the starting second of the query and whose
values are the ending second. e.g.
{"apple": {"fruits.wav" : [(1.1, 1.12)]}}
|
[
"First",
"joins",
"the",
"words",
"of",
"the",
"word_blocks",
"of",
"timestamps",
"with",
"space",
"per",
"audio_basename",
".",
"Then",
"matches",
"pattern",
"and",
"calculates",
"the",
"index",
"of",
"the",
"word_block",
"where",
"the",
"first",
"and",
"last",
"word",
"of",
"the",
"matched",
"result",
"appears",
"in",
".",
"Then",
"presents",
"the",
"output",
"like",
"search_all",
"method",
"."
] |
73f9d75897d785bdaea9d28dde5fa48104428164
|
https://github.com/aalireza/SimpleAudioIndexer/blob/73f9d75897d785bdaea9d28dde5fa48104428164/SimpleAudioIndexer/__init__.py#L1603-L1693
|
train
|
Search the word_blocks of the given pattern and returns a dictionary of the word_blocks that match the given pattern.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64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KZ,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(0b10011 + 0o35) + chr(111) + '\x32' + chr(0b110000) + '\x32', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + chr(793 - 744) + '\x31', 48671 - 48663), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + chr(55) + '\x37', 65470 - 65462), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b101100 + 0o6) + chr(0b11001 + 0o33) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(0b110001) + '\x31', 8), nzTpIcepk0o8('\060' + chr(111) + '\x32' + chr(49) + chr(0b110010 + 0o3), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1431 - 1381) + chr(0b110111) + chr(0b110001), 8390 - 8382), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + '\067' + chr(1668 - 1614), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(52) + chr(54), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + chr(0b101000 + 0o10) + chr(0b110111), 0o10), nzTpIcepk0o8('\x30' + chr(0b111 + 0o150) + chr(2073 - 2024) + '\063' + '\065', 0b1000), nzTpIcepk0o8(chr(1460 - 1412) + chr(2190 - 2079) + '\x31' + chr(1651 - 1597) + chr(0b1010 + 0o51), 15257 - 15249), nzTpIcepk0o8(chr(191 - 143) + chr(0b100001 + 0o116) + chr(49) + chr(0b101 + 0o55) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32' + chr(2118 - 2066) + chr(51), 37276 - 37268), nzTpIcepk0o8(chr(491 - 443) + chr(0b1101111) + '\x32' + '\x37' + chr(0b110110), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10001 + 0o40) + '\x34' + '\x37', 0b1000), nzTpIcepk0o8(chr(1364 - 1316) + '\x6f' + '\062' + '\065' + chr(49), 51950 - 51942), nzTpIcepk0o8('\060' + chr(11688 - 11577) + '\x32' + chr(0b110110) + '\x33', 33811 - 33803), nzTpIcepk0o8(chr(48) + chr(0b1000 + 0o147) + '\x31' + chr(0b11 + 0o63) + chr(0b110011), 8), nzTpIcepk0o8('\x30' + '\157' + chr(0b101100 + 0o7) + '\061' + chr(0b10100 + 0o42), 0b1000), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b1101111) + chr(0b101100 + 0o7) + chr(0b110000) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b1000 + 0o147) + chr(0b110011) + chr(0b110101) + '\x31', 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(3745 - 3634) + chr(55) + '\066', 0b1000), nzTpIcepk0o8(chr(607 - 559) + chr(11247 - 11136) + '\x31' + '\060' + '\x33', 0b1000), nzTpIcepk0o8(chr(1479 - 1431) + '\157' + chr(1991 - 1936) + '\x30', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + chr(51) + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1576 - 1524) + chr(2964 - 2909), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(8531 - 8420) + chr(51) + chr(697 - 649) + '\067', 0b1000), nzTpIcepk0o8('\060' + chr(4905 - 4794) + '\x33' + '\x37' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\157' + chr(0b10001 + 0o41) + chr(2626 - 2571) + chr(0b101100 + 0o12), 8), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b1101111) + '\063' + '\060' + chr(0b0 + 0o62), 58857 - 58849), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + '\064' + chr(1965 - 1910), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\063' + chr(0b110110) + chr(53), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1001000 + 0o47) + chr(2211 - 2162) + chr(1234 - 1180) + chr(0b110001 + 0o6), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110110) + '\x31', 0o10), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(0b111111 + 0o60) + '\062' + chr(1949 - 1895), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b101111 + 0o100) + chr(0b110001) + chr(50) + chr(0b101011 + 0o12), 44330 - 44322), nzTpIcepk0o8(chr(48) + chr(9003 - 8892) + chr(536 - 487) + chr(725 - 672) + '\063', 0b1000), nzTpIcepk0o8('\x30' + chr(11515 - 11404) + chr(49) + chr(0b10011 + 0o44) + '\x33', 11791 - 11783), nzTpIcepk0o8('\060' + chr(111) + '\x33' + chr(0b110011) + chr(0b1111 + 0o43), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\157' + '\x35' + chr(0b100110 + 0o12), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xac'), '\144' + '\145' + '\143' + chr(0b110101 + 0o72) + '\144' + chr(101))(chr(0b100101 + 0o120) + '\x74' + chr(0b1100110) + '\055' + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def hx_njgYarxnM(hXMPsSrOQzbh, UYtHA0XyNB9C, lyR5fSKYE8JM=None):
def Ylt3IzHDgIg3(bhSce0RsEqem, lyR5fSKYE8JM):
zyBjrbYBLI0F = [ZlbFMSG8gCoF for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(jpq1L102bowq[lyR5fSKYE8JM]) if bI5jsQ9OkQtj == roI3spqORKae(ES5oEprVxulp(b'\xa2'), '\144' + chr(0b1100101) + chr(99) + chr(9091 - 8980) + '\x64' + chr(0b1100101))('\x75' + chr(116) + chr(6468 - 6366) + chr(0b1 + 0o54) + '\070')]
roI3spqORKae(zyBjrbYBLI0F, roI3spqORKae(ES5oEprVxulp(b'\xf1\xe6\x8d\xd4'), chr(9545 - 9445) + '\x65' + chr(0b101011 + 0o70) + chr(0b11 + 0o154) + '\144' + chr(0b1100101))(chr(0b11100 + 0o131) + chr(116) + '\x66' + chr(1522 - 1477) + chr(0b111000)))(reverse=nzTpIcepk0o8('\x30' + chr(111) + '\x31', 0o10))
(SG95WWJS3mFv, riUKRc__Yo4b) = bhSce0RsEqem
riUKRc__Yo4b -= nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1101111) + '\x31', 8)
while jpq1L102bowq[lyR5fSKYE8JM][SG95WWJS3mFv] == roI3spqORKae(ES5oEprVxulp(b'\xa2'), chr(100) + '\145' + '\x63' + chr(0b1101111) + chr(5487 - 5387) + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(102) + '\055' + '\x38'):
SG95WWJS3mFv += nzTpIcepk0o8('\060' + chr(111) + '\x31', 8)
while jpq1L102bowq[lyR5fSKYE8JM][riUKRc__Yo4b] == roI3spqORKae(ES5oEprVxulp(b'\xa2'), chr(0b1011011 + 0o11) + chr(101) + chr(0b110010 + 0o61) + chr(10125 - 10014) + chr(8268 - 8168) + '\145')(chr(117) + '\x74' + chr(10212 - 10110) + chr(619 - 574) + chr(56)):
riUKRc__Yo4b -= nzTpIcepk0o8(chr(0b101100 + 0o4) + '\x6f' + chr(0b11010 + 0o27), 8)
xLNxoF43ZPoU = nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(111) + chr(48), ord("\x08"))
AUeQfTNEt5KN = ftfygxgFas5X(zyBjrbYBLI0F)
for (jr1eBQZq17p1, dexRxMtuzeJ6) in _kV_Bomx8PZ4(zyBjrbYBLI0F):
if SG95WWJS3mFv > dexRxMtuzeJ6:
xLNxoF43ZPoU = ftfygxgFas5X(zyBjrbYBLI0F) - jr1eBQZq17p1
break
for (jr1eBQZq17p1, dexRxMtuzeJ6) in _kV_Bomx8PZ4(zyBjrbYBLI0F):
if riUKRc__Yo4b > dexRxMtuzeJ6:
AUeQfTNEt5KN = ftfygxgFas5X(zyBjrbYBLI0F) - jr1eBQZq17p1
break
return (roI3spqORKae(P_zdJsig8rNF[lyR5fSKYE8JM][xLNxoF43ZPoU], roI3spqORKae(ES5oEprVxulp(b'\xc9\xd8\x9d\xe8\xcf\xd9\xda\x12\xb9\x0b\x16\n'), chr(7459 - 7359) + chr(0b100 + 0o141) + chr(0b1100011) + '\157' + '\x64' + chr(3772 - 3671))('\165' + chr(0b1011110 + 0o26) + chr(102) + chr(0b101101) + chr(1147 - 1091))), roI3spqORKae(P_zdJsig8rNF[lyR5fSKYE8JM][AUeQfTNEt5KN], roI3spqORKae(ES5oEprVxulp(b"\xcc\xe0\xa8\xf6\xe3\xcc\xee\x10\xd6+k'"), '\144' + '\145' + chr(0b1100011) + chr(0b1101111) + chr(5137 - 5037) + '\145')('\x75' + '\164' + chr(102) + chr(0b101101) + chr(0b111000))))
P_zdJsig8rNF = hXMPsSrOQzbh.oKll0lV4hz4N()
if lyR5fSKYE8JM is not None:
P_zdJsig8rNF = {lyR5fSKYE8JM: P_zdJsig8rNF[lyR5fSKYE8JM]}
jpq1L102bowq = {lyR5fSKYE8JM: roI3spqORKae(ES5oEprVxulp(b'\xa2'), chr(7164 - 7064) + chr(0b1100101) + '\143' + '\x6f' + chr(0b1100100) + chr(7726 - 7625))(chr(117) + chr(0b1011100 + 0o30) + '\146' + '\x2d' + '\070').Y4yM9BcfTCNq([VJSBNcKjzRcP.JXVFyF8k4nGR for VJSBNcKjzRcP in P_zdJsig8rNF[lyR5fSKYE8JM]]) for lyR5fSKYE8JM in P_zdJsig8rNF}
xXpJmAx5KP0x = VVP82lOIz6CD(lambda lyR5fSKYE8JM: nfNqtJL5aRaY((lyR5fSKYE8JM, aoTc4YA2bs2R.finditer(UYtHA0XyNB9C, jpq1L102bowq[lyR5fSKYE8JM]))), jpq1L102bowq.keys())
Pq9qv_Qh_7tH = QosgjTGdRyFK(lambda : QosgjTGdRyFK(H4NoA26ON7iG))
for (lyR5fSKYE8JM, JeWvAiZD6Q6J) in xXpJmAx5KP0x:
for hk9OijmiC_zA in JeWvAiZD6Q6J:
roI3spqORKae(Pq9qv_Qh_7tH[hk9OijmiC_zA.group()][lyR5fSKYE8JM], roI3spqORKae(ES5oEprVxulp(b'\xca\xdd\xac\x94\xf1\xea\xfe\x11\x8c(\x08F'), chr(2231 - 2131) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(100) + '\145')('\x75' + chr(3895 - 3779) + chr(102) + chr(0b10101 + 0o30) + chr(56)))(nfNqtJL5aRaY(Ylt3IzHDgIg3(roI3spqORKae(hk9OijmiC_zA, roI3spqORKae(ES5oEprVxulp(b'\xdb\xcc\xa0\xc7\xe6\xd7\xf61\x97\x10\x08\x1a'), chr(0b1100100) + chr(1518 - 1417) + chr(4229 - 4130) + chr(0b10100 + 0o133) + chr(100) + '\145')(chr(0b110 + 0o157) + '\x74' + chr(102) + '\055' + chr(2681 - 2625)))(), lyR5fSKYE8JM)))
return Pq9qv_Qh_7tH
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/reedsolomon/reedsolo.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 xrange(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 xrange(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 xrange(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 xrange(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",
"xrange",
"(",
"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",
"xrange",
"(",
"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/reedsolomon/reedsolo.py#L117-L124
|
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,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,LqOf4dRs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8jsMqaYV6U2,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(1659 - 1609) + chr(0b11001 + 0o31) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1011111 + 0o20) + chr(49) + chr(0b111 + 0o53) + chr(50), 0b1000), nzTpIcepk0o8(chr(1876 - 1828) + '\x6f' + chr(0b110001) + chr(55) + '\x30', 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\x31' + chr(50) + chr(0b110 + 0o55), ord("\x08")), nzTpIcepk0o8('\x30' + chr(8653 - 8542) + '\x31' + chr(0b11101 + 0o27) + chr(1707 - 1657), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(2772 - 2719) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b1101111) + chr(0b101010 + 0o7) + '\x33' + chr(0b101100 + 0o6), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(888 - 835) + '\060', 8), nzTpIcepk0o8(chr(48) + '\157' + chr(0b0 + 0o65) + chr(2039 - 1985), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b101010 + 0o7) + '\067' + '\x30', 8), nzTpIcepk0o8('\x30' + chr(0b1000101 + 0o52) + chr(0b10 + 0o61) + '\x32' + '\063', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(49) + '\065' + chr(49), 0b1000), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\x6f' + chr(0b11010 + 0o27) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(860 - 812) + chr(0b1010111 + 0o30) + '\x32' + chr(0b110111) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(3592 - 3481) + '\061' + chr(0b110101) + chr(165 - 110), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b1110 + 0o47), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + chr(0b110101) + chr(54), 24176 - 24168), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(0b1000 + 0o50) + '\064', 0o10), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(11533 - 11422) + chr(0b110001) + chr(0b110000) + chr(51), 33967 - 33959), nzTpIcepk0o8('\060' + '\x6f' + chr(2529 - 2474) + chr(2252 - 2197), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b10110 + 0o131) + chr(1472 - 1422) + chr(50) + chr(2205 - 2156), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + '\066' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b100101 + 0o17), 0o10), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(111) + chr(49) + '\x36' + chr(84 - 34), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101000 + 0o11) + chr(0b110010) + chr(1819 - 1765), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(1258 - 1208) + '\062' + chr(0b110101), 45547 - 45539), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b1101111) + chr(1815 - 1765) + chr(0b110100) + chr(55), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b11010 + 0o31) + '\061' + chr(0b110100 + 0o1), 0b1000), nzTpIcepk0o8(chr(0b101 + 0o53) + '\157' + chr(1334 - 1284) + chr(933 - 882) + chr(0b110110), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\061', 53903 - 53895), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(111) + '\x31' + chr(0b110011) + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + '\x34' + chr(55), 0o10), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(5609 - 5498) + '\x31' + '\x34' + chr(0b110000), 0o10), nzTpIcepk0o8('\060' + chr(11727 - 11616) + chr(0b110001) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(7577 - 7466) + '\064' + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b101 + 0o152) + chr(1910 - 1857) + '\061', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + '\x37' + '\063', 0o10), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\157' + chr(0b110001) + chr(0b110111) + chr(2042 - 1993), 49879 - 49871), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + '\064', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1200 - 1151) + chr(0b1100 + 0o44) + chr(0b100111 + 0o14), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(53) + chr(985 - 937), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xba'), chr(0b1100100) + '\145' + chr(9096 - 8997) + chr(0b100111 + 0o110) + chr(0b1100100) + chr(0b1100101))(chr(12628 - 12511) + chr(0b110001 + 0o103) + chr(9940 - 9838) + chr(45) + chr(2411 - 2355)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def n4VoqWZPobZq(NoZxuO7wjArS):
YY7jrjV1nd1k = [nzTpIcepk0o8(chr(1038 - 990) + '\157' + '\061', 8)] * (NoZxuO7wjArS / nzTpIcepk0o8('\060' + chr(0b100000 + 0o117) + chr(0b110 + 0o54), ord("\x08")))
for ZlbFMSG8gCoF in zBiXJ6gPq38D(nzTpIcepk0o8('\x30' + chr(0b111011 + 0o64) + chr(51), 54298 - 54290), nzTpIcepk0o8(NoZxuO7wjArS ** 0.5) + nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(0b1100001 + 0o16) + chr(0b101 + 0o54), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010), 8)):
if YY7jrjV1nd1k[ZlbFMSG8gCoF / nzTpIcepk0o8(chr(793 - 745) + '\x6f' + chr(0b110010), 8)]:
YY7jrjV1nd1k[ZlbFMSG8gCoF * ZlbFMSG8gCoF / nzTpIcepk0o8('\x30' + '\157' + chr(0b110010), 8)::ZlbFMSG8gCoF] = [nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1101 + 0o142) + chr(0b110000), 0o10)] * ((NoZxuO7wjArS - ZlbFMSG8gCoF * ZlbFMSG8gCoF - nzTpIcepk0o8(chr(0b1100 + 0o44) + '\x6f' + '\061', 8)) / (nzTpIcepk0o8(chr(0b110 + 0o52) + chr(11872 - 11761) + chr(0b101 + 0o55), 8) * ZlbFMSG8gCoF) + nzTpIcepk0o8(chr(0b1011 + 0o45) + '\x6f' + chr(0b110001), 8))
return [nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(6157 - 6046) + chr(0b101100 + 0o6), 8)] + [nzTpIcepk0o8('\x30' + chr(0b10100 + 0o133) + '\062', 8) * ZlbFMSG8gCoF + nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1101111) + chr(0b100110 + 0o13), 8) for ZlbFMSG8gCoF in zBiXJ6gPq38D(nzTpIcepk0o8('\060' + '\x6f' + chr(49), 8), NoZxuO7wjArS / nzTpIcepk0o8(chr(0b1000 + 0o50) + '\x6f' + chr(0b110010), 8)) if YY7jrjV1nd1k[ZlbFMSG8gCoF]]
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/reedsolomon/reedsolo.py
|
find_prime_polys
|
def find_prime_polys(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 = xrange(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 = 1
for i in xrange(field_charac):
# Compute the next value in the field (ie, the next power of alpha/generator)
x = gf_mult_noLUT(x, 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_polys(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 = xrange(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 = 1
for i in xrange(field_charac):
# Compute the next value in the field (ie, the next power of alpha/generator)
x = gf_mult_noLUT(x, 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_polys",
"(",
"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",
"=",
"xrange",
"(",
"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",
"=",
"1",
"for",
"i",
"in",
"xrange",
"(",
"field_charac",
")",
":",
"# Compute the next value in the field (ie, the next power of alpha/generator)",
"x",
"=",
"gf_mult_noLUT",
"(",
"x",
",",
"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/reedsolomon/reedsolo.py#L126-L178
|
train
|
Compute the list of prime polynomials for the given generator and galois field characteristic expon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,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) + chr(0b110010) + chr(0b110110) + chr(1710 - 1662), 35906 - 35898), nzTpIcepk0o8('\x30' + chr(0b1011110 + 0o21) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(1568 - 1520) + chr(0b1101111) + chr(0b110110) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(450 - 402) + chr(0b1101111) + chr(50) + chr(1409 - 1360) + '\067', 56921 - 56913), nzTpIcepk0o8(chr(1026 - 978) + chr(0b1010110 + 0o31) + chr(0b110010) + chr(0b1111 + 0o44) + '\x34', 0b1000), nzTpIcepk0o8('\x30' + chr(11007 - 10896) + '\x31' + chr(0b100000 + 0o26) + '\061', 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x32' + '\x35' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(2239 - 2191) + chr(111) + chr(54) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b10 + 0o56) + '\157' + chr(1864 - 1815) + '\x32', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(944 - 893) + chr(2666 - 2611) + '\x35', 31810 - 31802), nzTpIcepk0o8(chr(0b110000) + chr(8014 - 7903) + chr(50) + '\x33' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(11101 - 10990) + '\x32' + chr(0b110110) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(610 - 562) + '\x6f' + chr(54) + chr(52), 16693 - 16685), nzTpIcepk0o8(chr(483 - 435) + chr(0b1101111) + '\062' + chr(2130 - 2079) + '\x33', 59203 - 59195), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1011 + 0o50) + '\060' + chr(0b100111 + 0o13), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + '\066' + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(52) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(0b110011 + 0o3), 48327 - 48319), nzTpIcepk0o8(chr(48) + chr(111) + chr(1927 - 1876) + chr(0b100001 + 0o17) + '\065', 0o10), nzTpIcepk0o8(chr(1176 - 1128) + chr(0b1011010 + 0o25) + '\062' + chr(927 - 874) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + chr(1357 - 1308) + chr(1818 - 1766), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(10996 - 10885) + chr(760 - 710) + chr(976 - 927) + '\x30', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b100100 + 0o113) + chr(563 - 513) + '\x32' + chr(1828 - 1779), 0b1000), nzTpIcepk0o8(chr(701 - 653) + chr(0b11101 + 0o122) + chr(565 - 515) + chr(0b10010 + 0o44) + '\x32', 8), nzTpIcepk0o8('\060' + chr(10488 - 10377) + chr(0b100101 + 0o14) + chr(52) + chr(0b101010 + 0o6), ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(10758 - 10647) + '\x35' + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + '\063' + chr(50), 0b1000), nzTpIcepk0o8(chr(118 - 70) + '\x6f' + chr(51) + chr(51) + chr(0b11111 + 0o24), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + '\x35' + chr(0b110111), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + chr(53) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(0b110100) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(10297 - 10186) + '\x33' + chr(48), 0o10), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(2187 - 2076) + chr(0b110 + 0o52), 15014 - 15006), nzTpIcepk0o8(chr(0b110000) + chr(11400 - 11289) + chr(1096 - 1044) + chr(481 - 428), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(0b110100) + chr(327 - 273), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + '\066' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(0b110010) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(10478 - 10367) + chr(2401 - 2352) + chr(52) + chr(48), 8), nzTpIcepk0o8(chr(450 - 402) + chr(0b1000 + 0o147) + '\064' + chr(0b110101), 8), nzTpIcepk0o8(chr(92 - 44) + chr(0b1101111) + chr(49) + chr(0b110110) + '\x37', 21470 - 21462)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(111) + '\065' + chr(0b1001 + 0o47), 36667 - 36659)] 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(4594 - 4483) + chr(0b1100100) + chr(0b110110 + 0o57))(chr(0b1110101) + '\x74' + '\x66' + chr(0b101101) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def Ch5mVEj8vec4(utrvLf8Qjpjk=nzTpIcepk0o8('\x30' + '\x6f' + '\x32', ord("\x08")), kOldCzQvrHFu=nzTpIcepk0o8('\x30' + chr(1311 - 1200) + '\x31' + chr(48), 0b1000), N1z7gruMyc63=nzTpIcepk0o8('\060' + '\x6f' + chr(48), 8), sMOkKa20uKiC=nzTpIcepk0o8(chr(0b110000) + chr(0b10011 + 0o134) + chr(48), 8)):
bXeJIzx5uNzM = nzTpIcepk0o8(chr(675 - 627) + chr(111) + chr(0b110010), 8)
r2S5hBmJ_9QZ = nzTpIcepk0o8(bXeJIzx5uNzM ** kOldCzQvrHFu - nzTpIcepk0o8('\060' + '\x6f' + chr(0b101011 + 0o6), 45048 - 45040))
fNbpCSM5Albu = nzTpIcepk0o8(bXeJIzx5uNzM ** (kOldCzQvrHFu + nzTpIcepk0o8(chr(260 - 212) + chr(0b1101111) + chr(49), 8)) - nzTpIcepk0o8(chr(1100 - 1052) + '\157' + chr(49), 8))
SRSIAzAagKpR = []
if N1z7gruMyc63:
SRSIAzAagKpR = n4VoqWZPobZq(fNbpCSM5Albu)
SRSIAzAagKpR = [bI5jsQ9OkQtj for bI5jsQ9OkQtj in SRSIAzAagKpR if bI5jsQ9OkQtj > r2S5hBmJ_9QZ]
else:
SRSIAzAagKpR = zBiXJ6gPq38D(r2S5hBmJ_9QZ + nzTpIcepk0o8(chr(0b110000) + chr(6228 - 6117) + chr(0b11100 + 0o26), 8), fNbpCSM5Albu, bXeJIzx5uNzM)
e9lWo8kw1Fip = []
for NX_Q3jNq1TRI in SRSIAzAagKpR:
Exa2os6rsBY0 = MdkNqd1bagO6(r2S5hBmJ_9QZ + nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49), 8))
iOdbm50gY9eE = nzTpIcepk0o8(chr(1155 - 1107) + '\x6f' + '\060', 8)
bI5jsQ9OkQtj = nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31', 8)
for ZlbFMSG8gCoF in zBiXJ6gPq38D(r2S5hBmJ_9QZ):
bI5jsQ9OkQtj = XR6cXufkI7Hb(bI5jsQ9OkQtj, utrvLf8Qjpjk, NX_Q3jNq1TRI, r2S5hBmJ_9QZ + nzTpIcepk0o8(chr(0b110000) + '\157' + '\061', 8))
if bI5jsQ9OkQtj > r2S5hBmJ_9QZ or Exa2os6rsBY0[bI5jsQ9OkQtj] == nzTpIcepk0o8('\x30' + '\x6f' + '\x31', 8):
iOdbm50gY9eE = nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001), 8)
break
else:
Exa2os6rsBY0[bI5jsQ9OkQtj] = nzTpIcepk0o8('\x30' + chr(0b11110 + 0o121) + chr(49), 8)
if not iOdbm50gY9eE:
roI3spqORKae(e9lWo8kw1Fip, roI3spqORKae(ES5oEprVxulp(b'\xf8Qd\xbb\xe4\x16\xee_`\x92\xca\x87'), chr(0b1011110 + 0o6) + chr(0b11111 + 0o106) + chr(1532 - 1433) + chr(8605 - 8494) + chr(0b1100100) + chr(101))(chr(4328 - 4211) + '\x74' + chr(102) + chr(682 - 637) + chr(0b101110 + 0o12)))(NX_Q3jNq1TRI)
if sMOkKa20uKiC:
return NX_Q3jNq1TRI
return e9lWo8kw1Fip
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/reedsolomon/reedsolo.py
|
init_tables
|
def init_tables(prim=0x11d, generator=2, c_exp=8):
'''Precompute the logarithm and anti-log 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 (ie, 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 field_charac+1 and field_charac*2, and not a list of gf values. The prime polynomial will be used to reduce the overflows back into the range of the Galois Field without duplicating values (all values should be unique). See the function find_prime_polys() and: http://research.swtch.com/field and http://www.pclviewer.com/rs2/galois.html
# 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).
# c_exp is the exponent for the field's characteristic GF(2^c_exp)
global gf_exp, gf_log, field_charac
field_charac = int(2**c_exp - 1)
gf_exp = bytearray(field_charac * 2) # anti-log (exponential) table. The first two elements will always be [GF256int(1), generator]
gf_log = bytearray(field_charac+1) # log table, log[0] is impossible and thus unused
# For each possible value in the galois field 2^8, we will pre-compute the logarithm and anti-logarithm (exponential) of this value
# To do that, we generate the Galois Field F(2^p) by building a list starting with the element 0 followed by the (p-1) successive powers of the generator α : 1, α, α^1, α^2, ..., α^(p-1).
x = 1
for i in xrange(field_charac): # we could skip index 255 which is equal to index 0 because of modulo: g^255==g^0 but either way, this does not change the later outputs (ie, the ecc symbols will be the same either way)
gf_exp[i] = x # compute anti-log for this value and store it in a table
gf_log[x] = i # compute log at the same time
x = gf_mult_noLUT(x, generator, prim, field_charac+1)
# If you use only generator==2 or a power of 2, you can use the following which is faster than gf_mult_noLUT():
#x <<= 1 # multiply by 2 (change 1 by another number y to multiply by a power of 2^y)
#if x & 0x100: # similar to x >= 256, but a lot faster (because 0x100 == 256)
#x ^= prim # substract the primary polynomial to the current value (instead of 255, so that we get a unique set made of coprime numbers), this is the core of the tables generation
# Optimization: double the size of the anti-log table so that we don't need to mod 255 to stay inside the bounds (because we will mainly use this table for the multiplication of two GF numbers, no more).
for i in xrange(field_charac, field_charac * 2):
gf_exp[i] = gf_exp[i - field_charac]
return [gf_log, gf_exp]
|
python
|
def init_tables(prim=0x11d, generator=2, c_exp=8):
'''Precompute the logarithm and anti-log 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 (ie, 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 field_charac+1 and field_charac*2, and not a list of gf values. The prime polynomial will be used to reduce the overflows back into the range of the Galois Field without duplicating values (all values should be unique). See the function find_prime_polys() and: http://research.swtch.com/field and http://www.pclviewer.com/rs2/galois.html
# 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).
# c_exp is the exponent for the field's characteristic GF(2^c_exp)
global gf_exp, gf_log, field_charac
field_charac = int(2**c_exp - 1)
gf_exp = bytearray(field_charac * 2) # anti-log (exponential) table. The first two elements will always be [GF256int(1), generator]
gf_log = bytearray(field_charac+1) # log table, log[0] is impossible and thus unused
# For each possible value in the galois field 2^8, we will pre-compute the logarithm and anti-logarithm (exponential) of this value
# To do that, we generate the Galois Field F(2^p) by building a list starting with the element 0 followed by the (p-1) successive powers of the generator α : 1, α, α^1, α^2, ..., α^(p-1).
x = 1
for i in xrange(field_charac): # we could skip index 255 which is equal to index 0 because of modulo: g^255==g^0 but either way, this does not change the later outputs (ie, the ecc symbols will be the same either way)
gf_exp[i] = x # compute anti-log for this value and store it in a table
gf_log[x] = i # compute log at the same time
x = gf_mult_noLUT(x, generator, prim, field_charac+1)
# If you use only generator==2 or a power of 2, you can use the following which is faster than gf_mult_noLUT():
#x <<= 1 # multiply by 2 (change 1 by another number y to multiply by a power of 2^y)
#if x & 0x100: # similar to x >= 256, but a lot faster (because 0x100 == 256)
#x ^= prim # substract the primary polynomial to the current value (instead of 255, so that we get a unique set made of coprime numbers), this is the core of the tables generation
# Optimization: double the size of the anti-log table so that we don't need to mod 255 to stay inside the bounds (because we will mainly use this table for the multiplication of two GF numbers, no more).
for i in xrange(field_charac, field_charac * 2):
gf_exp[i] = gf_exp[i - field_charac]
return [gf_log, gf_exp]
|
[
"def",
"init_tables",
"(",
"prim",
"=",
"0x11d",
",",
"generator",
"=",
"2",
",",
"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 (ie, 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 field_charac+1 and field_charac*2, and not a list of gf values. The prime polynomial will be used to reduce the overflows back into the range of the Galois Field without duplicating values (all values should be unique). See the function find_prime_polys() and: http://research.swtch.com/field and http://www.pclviewer.com/rs2/galois.html",
"# 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).",
"# c_exp is the exponent for the field's characteristic GF(2^c_exp)",
"global",
"gf_exp",
",",
"gf_log",
",",
"field_charac",
"field_charac",
"=",
"int",
"(",
"2",
"**",
"c_exp",
"-",
"1",
")",
"gf_exp",
"=",
"bytearray",
"(",
"field_charac",
"*",
"2",
")",
"# anti-log (exponential) table. The first two elements will always be [GF256int(1), generator]",
"gf_log",
"=",
"bytearray",
"(",
"field_charac",
"+",
"1",
")",
"# log table, log[0] is impossible and thus unused",
"# For each possible value in the galois field 2^8, we will pre-compute the logarithm and anti-logarithm (exponential) of this value",
"# To do that, we generate the Galois Field F(2^p) by building a list starting with the element 0 followed by the (p-1) successive powers of the generator α : 1, α, α^1, α^2, ..., α^(p-1).",
"x",
"=",
"1",
"for",
"i",
"in",
"xrange",
"(",
"field_charac",
")",
":",
"# we could skip index 255 which is equal to index 0 because of modulo: g^255==g^0 but either way, this does not change the later outputs (ie, the ecc symbols will be the same either way)",
"gf_exp",
"[",
"i",
"]",
"=",
"x",
"# compute anti-log for this value and store it in a table",
"gf_log",
"[",
"x",
"]",
"=",
"i",
"# compute log at the same time",
"x",
"=",
"gf_mult_noLUT",
"(",
"x",
",",
"generator",
",",
"prim",
",",
"field_charac",
"+",
"1",
")",
"# If you use only generator==2 or a power of 2, you can use the following which is faster than gf_mult_noLUT():",
"#x <<= 1 # multiply by 2 (change 1 by another number y to multiply by a power of 2^y)",
"#if x & 0x100: # similar to x >= 256, but a lot faster (because 0x100 == 256)",
"#x ^= prim # substract the primary polynomial to the current value (instead of 255, so that we get a unique set made of coprime numbers), this is the core of the tables generation",
"# Optimization: double the size of the anti-log table so that we don't need to mod 255 to stay inside the bounds (because we will mainly use this table for the multiplication of two GF numbers, no more).",
"for",
"i",
"in",
"xrange",
"(",
"field_charac",
",",
"field_charac",
"*",
"2",
")",
":",
"gf_exp",
"[",
"i",
"]",
"=",
"gf_exp",
"[",
"i",
"-",
"field_charac",
"]",
"return",
"[",
"gf_log",
",",
"gf_exp",
"]"
] |
Precompute the logarithm and anti-log 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",
"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/reedsolomon/reedsolo.py#L180-L214
|
train
|
Precompute the logarithm and anti - log tables for faster computation later using the provided primitive 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,Aw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ssA8,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(50) + chr(0b100001 + 0o23) + chr(0b1110 + 0o45), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + '\065' + '\064', 0o10), nzTpIcepk0o8(chr(1986 - 1938) + chr(2479 - 2368) + '\x33' + chr(56 - 5) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1000000 + 0o57) + chr(713 - 662) + chr(1743 - 1691), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(2553 - 2502) + chr(0b110001) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + chr(0b11001 + 0o27) + chr(0b11101 + 0o31), 14017 - 14009), nzTpIcepk0o8('\060' + '\157' + '\062' + chr(52) + chr(662 - 613), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + '\x33' + '\x37', 0o10), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\x6f' + '\062' + chr(0b110110) + chr(0b100000 + 0o21), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010 + 0o0) + chr(0b110001) + '\067', 0b1000), nzTpIcepk0o8(chr(48) + chr(11632 - 11521) + chr(0b11011 + 0o27) + chr(0b110000) + chr(0b111 + 0o51), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + chr(0b110110) + chr(0b101000 + 0o15), 48035 - 48027), nzTpIcepk0o8('\060' + chr(6817 - 6706) + chr(0b100011 + 0o16) + '\065' + chr(0b10111 + 0o37), 0o10), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(9688 - 9577) + chr(188 - 137) + chr(51) + chr(0b110010), 40211 - 40203), nzTpIcepk0o8('\x30' + chr(111) + chr(0b100001 + 0o20) + chr(50), 34729 - 34721), nzTpIcepk0o8(chr(0b110000) + chr(0b1010011 + 0o34) + chr(0b1 + 0o61) + chr(0b110001) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1101111) + chr(0b110101) + chr(2165 - 2117), 21257 - 21249), nzTpIcepk0o8('\060' + chr(8765 - 8654) + chr(49) + chr(0b110000) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\x6f' + '\x33' + chr(0b110001) + chr(48), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101110 + 0o1) + chr(2210 - 2155) + chr(800 - 746), ord("\x08")), nzTpIcepk0o8(chr(736 - 688) + chr(0b1101111) + chr(51) + '\060' + '\065', 0b1000), nzTpIcepk0o8(chr(1847 - 1799) + '\x6f' + chr(0b110011) + chr(2340 - 2291) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(49) + '\067' + chr(1194 - 1145), ord("\x08")), nzTpIcepk0o8(chr(880 - 832) + '\157' + '\062' + chr(0b101 + 0o57) + '\x33', 8), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1101111) + chr(0b110010) + chr(0b10011 + 0o43) + '\061', 8), nzTpIcepk0o8('\060' + '\x6f' + '\066' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + chr(0b110001), 0o10), nzTpIcepk0o8('\x30' + chr(9924 - 9813) + '\067' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b11001 + 0o27) + '\157' + '\061' + chr(1983 - 1930) + '\x31', 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\061' + '\066' + chr(51), 0b1000), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b111010 + 0o65) + chr(49) + chr(1243 - 1192) + chr(0b10010 + 0o40), 36591 - 36583), nzTpIcepk0o8(chr(1241 - 1193) + chr(0b1100111 + 0o10) + '\063' + chr(50) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b1100 + 0o47) + chr(51) + chr(0b101111 + 0o3), 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010) + chr(0b110011) + chr(270 - 218), 0o10), nzTpIcepk0o8(chr(750 - 702) + chr(0b1000 + 0o147) + chr(0b110011) + chr(0b111 + 0o51) + chr(0b10011 + 0o36), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(0b1001 + 0o51), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1000010 + 0o55) + '\064' + chr(0b11 + 0o57), 0o10), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\157' + '\062' + chr(0b10010 + 0o42) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(4565 - 4454) + chr(52) + chr(55), 0o10), nzTpIcepk0o8('\060' + chr(2938 - 2827) + chr(802 - 751) + chr(52) + '\x32', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b11101 + 0o23) + '\157' + chr(53) + chr(1643 - 1595), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x8d'), chr(0b111011 + 0o51) + chr(0b110111 + 0o56) + chr(0b1001010 + 0o31) + '\x6f' + '\144' + chr(0b101100 + 0o71))(chr(7097 - 6980) + chr(3290 - 3174) + chr(335 - 233) + '\x2d' + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def PWY036YSAI0O(NX_Q3jNq1TRI=nzTpIcepk0o8('\060' + '\157' + '\x34' + chr(1922 - 1871) + '\065', 0o10), utrvLf8Qjpjk=nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1101111) + chr(0b110010), ord("\x08")), kOldCzQvrHFu=nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + '\x30', 0o10)):
global BL1lB9SRZgNZ, mZuXWV26mhsE, r2S5hBmJ_9QZ
r2S5hBmJ_9QZ = nzTpIcepk0o8(nzTpIcepk0o8(chr(0b11110 + 0o22) + '\x6f' + chr(0b110010), 8) ** kOldCzQvrHFu - nzTpIcepk0o8(chr(48) + chr(5650 - 5539) + chr(49), 0o10))
BL1lB9SRZgNZ = MdkNqd1bagO6(r2S5hBmJ_9QZ * nzTpIcepk0o8(chr(48) + chr(0b111111 + 0o60) + chr(0b10 + 0o60), 8))
mZuXWV26mhsE = MdkNqd1bagO6(r2S5hBmJ_9QZ + nzTpIcepk0o8(chr(919 - 871) + chr(111) + '\x31', 8))
bI5jsQ9OkQtj = nzTpIcepk0o8('\060' + chr(3172 - 3061) + chr(0b1101 + 0o44), 8)
for ZlbFMSG8gCoF in zBiXJ6gPq38D(r2S5hBmJ_9QZ):
BL1lB9SRZgNZ[ZlbFMSG8gCoF] = bI5jsQ9OkQtj
mZuXWV26mhsE[bI5jsQ9OkQtj] = ZlbFMSG8gCoF
bI5jsQ9OkQtj = XR6cXufkI7Hb(bI5jsQ9OkQtj, utrvLf8Qjpjk, NX_Q3jNq1TRI, r2S5hBmJ_9QZ + nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001), 8))
for ZlbFMSG8gCoF in zBiXJ6gPq38D(r2S5hBmJ_9QZ, r2S5hBmJ_9QZ * nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(111) + chr(50), 8)):
BL1lB9SRZgNZ[ZlbFMSG8gCoF] = BL1lB9SRZgNZ[ZlbFMSG8gCoF - r2S5hBmJ_9QZ]
return [mZuXWV26mhsE, BL1lB9SRZgNZ]
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/reedsolomon/reedsolo.py
|
gf_mult_noLUT_slow
|
def gf_mult_noLUT_slow(x, y, prim=0):
'''Multiplication in Galois Fields without using a precomputed look-up table (and thus it's slower) 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 xrange(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 gf_mult_noLUT_slow(x, y, prim=0):
'''Multiplication in Galois Fields without using a precomputed look-up table (and thus it's slower) 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 xrange(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",
"gf_mult_noLUT_slow",
"(",
"x",
",",
"y",
",",
"prim",
"=",
"0",
")",
":",
"### 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",
"xrange",
"(",
"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"
] |
Multiplication in Galois Fields without using a precomputed look-up table (and thus it's slower) by using the standard carry-less multiplication + modular reduction using an irreducible prime polynomial.
|
[
"Multiplication",
"in",
"Galois",
"Fields",
"without",
"using",
"a",
"precomputed",
"look",
"-",
"up",
"table",
"(",
"and",
"thus",
"it",
"s",
"slower",
")",
"by",
"using",
"the",
"standard",
"carry",
"-",
"less",
"multiplication",
"+",
"modular",
"reduction",
"using",
"an",
"irreducible",
"prime",
"polynomial",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/reedsolomon/reedsolo.py#L243-L287
|
train
|
Multiplication in Galois Fields without using a precomputed look - up table.
|
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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4sFo6RhVJa,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(3506 - 3395) + chr(0b10110 + 0o34) + chr(0b10111 + 0o40) + chr(481 - 426), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(4798 - 4687) + chr(0b110001) + chr(2098 - 2049) + chr(1160 - 1110), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + chr(0b110001) + '\x30', 54173 - 54165), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + chr(55) + chr(1404 - 1355), 4180 - 4172), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + '\x37' + chr(0b1001 + 0o50), 43877 - 43869), nzTpIcepk0o8(chr(0b110000) + chr(7884 - 7773) + chr(0b110 + 0o57), 0o10), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(1459 - 1348) + '\063' + chr(0b100011 + 0o22) + chr(48), 0o10), nzTpIcepk0o8('\060' + chr(11911 - 11800) + chr(0b110010) + chr(0b1000 + 0o55) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(2057 - 2009) + chr(111) + chr(0b1110 + 0o45) + chr(0b101101 + 0o10) + chr(51), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + chr(1917 - 1869) + chr(0b110011), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + chr(1170 - 1121), 41723 - 41715), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(52) + chr(0b100010 + 0o21), 55169 - 55161), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(7527 - 7416) + chr(898 - 846) + '\060', ord("\x08")), nzTpIcepk0o8(chr(1584 - 1536) + '\x6f' + '\062' + '\x30' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(1529 - 1481) + '\x6f' + '\061' + chr(0b110001) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(225 - 174) + chr(719 - 666) + chr(51), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(863 - 809) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + '\062' + '\x36', 59107 - 59099), nzTpIcepk0o8('\060' + '\157' + '\x33' + '\063' + '\067', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(392 - 343) + chr(0b100100 + 0o21), 56194 - 56186), nzTpIcepk0o8('\060' + '\157' + chr(51) + chr(1151 - 1101) + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + '\065' + chr(0b110001), 32555 - 32547), nzTpIcepk0o8('\x30' + chr(111) + chr(1616 - 1565) + chr(0b11001 + 0o31) + chr(0b110011 + 0o1), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(298 - 249) + chr(49) + '\x32', 8), nzTpIcepk0o8('\060' + chr(11067 - 10956) + chr(2218 - 2169) + '\061' + chr(1959 - 1911), 0o10), nzTpIcepk0o8('\060' + chr(0b1100111 + 0o10) + chr(54) + chr(0b101100 + 0o10), ord("\x08")), nzTpIcepk0o8(chr(1055 - 1007) + chr(0b1101111) + '\x31' + '\062' + '\061', 17980 - 17972), nzTpIcepk0o8(chr(1506 - 1458) + '\157' + chr(0b100011 + 0o17) + chr(0b110001) + chr(2746 - 2693), 0o10), nzTpIcepk0o8('\x30' + chr(0b1000010 + 0o55) + '\066' + chr(53), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(2811 - 2700) + chr(50) + chr(49) + chr(1589 - 1536), 8), nzTpIcepk0o8(chr(1291 - 1243) + chr(9520 - 9409) + chr(0b110010) + chr(0b110101) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + chr(0b100001 + 0o26) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(477 - 429) + chr(0b1001010 + 0o45) + '\067' + chr(771 - 722), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + chr(0b110110) + chr(0b10000 + 0o46), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(720 - 668) + chr(1117 - 1068), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + '\x36' + '\x32', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(55) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(1128 - 1080) + '\157' + chr(51) + chr(0b100 + 0o60) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(2112 - 2064) + chr(8600 - 8489) + chr(1916 - 1867) + chr(49) + chr(637 - 586), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(6635 - 6524) + chr(0b110100 + 0o1) + chr(1152 - 1104), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x91'), chr(4033 - 3933) + chr(0b1100101) + '\143' + chr(111) + chr(2585 - 2485) + '\x65')('\165' + chr(0b1000010 + 0o62) + chr(7160 - 7058) + chr(0b101101) + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def Oim7_dXTT1nH(bI5jsQ9OkQtj, Fi3yzxctM1zW, NX_Q3jNq1TRI=nzTpIcepk0o8(chr(279 - 231) + chr(0b1101111) + '\060', 9301 - 9293)):
def GgUNdRcqS1cG(bI5jsQ9OkQtj, Fi3yzxctM1zW):
ZkpORfAzQ9Hw = nzTpIcepk0o8(chr(0b110000) + chr(111) + '\060', 8)
ZlbFMSG8gCoF = nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11001 + 0o27), 8)
while Fi3yzxctM1zW >> ZlbFMSG8gCoF > nzTpIcepk0o8(chr(1403 - 1355) + chr(475 - 364) + chr(0b10 + 0o56), 8):
if Fi3yzxctM1zW & nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061', 0o10) << ZlbFMSG8gCoF:
ZkpORfAzQ9Hw ^= bI5jsQ9OkQtj << ZlbFMSG8gCoF
ZlbFMSG8gCoF += nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(8743 - 8632) + '\x31', 8)
return ZkpORfAzQ9Hw
def xg_MIA7A135O(NoZxuO7wjArS):
TFnKUIaosDDX = nzTpIcepk0o8('\x30' + '\157' + chr(48), 8)
while NoZxuO7wjArS >> TFnKUIaosDDX:
TFnKUIaosDDX += nzTpIcepk0o8('\x30' + chr(1114 - 1003) + chr(2276 - 2227), 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 zBiXJ6gPq38D(UczHojZB8CMC - j5M87l_nDVWj, -nzTpIcepk0o8(chr(442 - 394) + chr(111) + chr(1669 - 1620), 8), -nzTpIcepk0o8('\060' + chr(111) + chr(113 - 64), 8)):
if ZWi94J6MYolQ & nzTpIcepk0o8(chr(48) + chr(111) + chr(0b100 + 0o55), 8) << ZlbFMSG8gCoF + j5M87l_nDVWj - nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49), 8):
ZWi94J6MYolQ ^= jmeC1TQzXJxs << ZlbFMSG8gCoF
return ZWi94J6MYolQ
POx95m7SPOVy = GgUNdRcqS1cG(bI5jsQ9OkQtj, Fi3yzxctM1zW)
if NX_Q3jNq1TRI > nzTpIcepk0o8(chr(922 - 874) + '\157' + chr(48), 8):
POx95m7SPOVy = pgO_BfNaZi3U(POx95m7SPOVy, NX_Q3jNq1TRI)
return POx95m7SPOVy
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/reedsolomon/reedsolo.py
|
gf_mult_noLUT
|
def gf_mult_noLUT(x, y, prim=0, field_charac_full=256, carryless=True):
'''Galois Field integer multiplication using Russian Peasant Multiplication algorithm (faster than the standard multiplication + modular reduction).
If prim is 0 and carryless=False, then the function produces the result for a standard integers multiplication (no carry-less arithmetics nor modular reduction).'''
r = 0
while y: # while y is above 0
if y & 1: r = r ^ x if carryless else r + x # y is odd, then add the corresponding x to r (the sum of all x's corresponding to odd y'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!).
y = y >> 1 # equivalent to y // 2
x = x << 1 # equivalent to x*2
if prim > 0 and x & field_charac_full: x = x ^ prim # GF modulo: if x >= 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 r
|
python
|
def gf_mult_noLUT(x, y, prim=0, field_charac_full=256, carryless=True):
'''Galois Field integer multiplication using Russian Peasant Multiplication algorithm (faster than the standard multiplication + modular reduction).
If prim is 0 and carryless=False, then the function produces the result for a standard integers multiplication (no carry-less arithmetics nor modular reduction).'''
r = 0
while y: # while y is above 0
if y & 1: r = r ^ x if carryless else r + x # y is odd, then add the corresponding x to r (the sum of all x's corresponding to odd y'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!).
y = y >> 1 # equivalent to y // 2
x = x << 1 # equivalent to x*2
if prim > 0 and x & field_charac_full: x = x ^ prim # GF modulo: if x >= 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 r
|
[
"def",
"gf_mult_noLUT",
"(",
"x",
",",
"y",
",",
"prim",
"=",
"0",
",",
"field_charac_full",
"=",
"256",
",",
"carryless",
"=",
"True",
")",
":",
"r",
"=",
"0",
"while",
"y",
":",
"# while y is above 0",
"if",
"y",
"&",
"1",
":",
"r",
"=",
"r",
"^",
"x",
"if",
"carryless",
"else",
"r",
"+",
"x",
"# y is odd, then add the corresponding x to r (the sum of all x's corresponding to odd y'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!).",
"y",
"=",
"y",
">>",
"1",
"# equivalent to y // 2",
"x",
"=",
"x",
"<<",
"1",
"# equivalent to x*2",
"if",
"prim",
">",
"0",
"and",
"x",
"&",
"field_charac_full",
":",
"x",
"=",
"x",
"^",
"prim",
"# GF modulo: if x >= 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",
"r"
] |
Galois Field integer multiplication using Russian Peasant Multiplication algorithm (faster than the standard multiplication + modular reduction).
If prim is 0 and carryless=False, then the function produces the result for a standard integers multiplication (no carry-less arithmetics nor modular reduction).
|
[
"Galois",
"Field",
"integer",
"multiplication",
"using",
"Russian",
"Peasant",
"Multiplication",
"algorithm",
"(",
"faster",
"than",
"the",
"standard",
"multiplication",
"+",
"modular",
"reduction",
")",
".",
"If",
"prim",
"is",
"0",
"and",
"carryless",
"=",
"False",
"then",
"the",
"function",
"produces",
"the",
"result",
"for",
"a",
"standard",
"integers",
"multiplication",
"(",
"no",
"carry",
"-",
"less",
"arithmetics",
"nor",
"modular",
"reduction",
")",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/reedsolomon/reedsolo.py#L289-L299
|
train
|
Galois Field integer multiplication using Russian Peasant Multiplication algorithm.
|
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,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qZE,_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) + '\063' + '\062' + chr(2401 - 2348), 29864 - 29856), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010 + 0o2) + chr(566 - 511), 16817 - 16809), nzTpIcepk0o8('\060' + chr(111) + chr(0b110101) + chr(1072 - 1017), 0b1000), nzTpIcepk0o8('\060' + chr(0b111010 + 0o65) + '\061' + '\x36' + chr(0b11101 + 0o26), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(2248 - 2198) + '\063' + chr(1125 - 1070), 33052 - 33044), nzTpIcepk0o8('\x30' + chr(2067 - 1956) + chr(0b1010 + 0o50) + chr(0b1000 + 0o50) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + chr(0b110001) + '\x31', 0o10), nzTpIcepk0o8('\x30' + chr(0b101001 + 0o106) + chr(0b100011 + 0o20) + chr(0b110110), 4859 - 4851), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + chr(0b110001) + chr(405 - 351), 19050 - 19042), nzTpIcepk0o8(chr(513 - 465) + chr(0b11111 + 0o120) + chr(0b110011) + chr(2171 - 2122) + chr(0b1110 + 0o46), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10000 + 0o43) + '\063' + chr(54), 65040 - 65032), nzTpIcepk0o8(chr(48) + chr(9523 - 9412) + chr(50) + chr(50) + chr(2718 - 2665), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2306 - 2252) + '\x36', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110111) + chr(0b110 + 0o57), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(53), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(53) + '\066', 0o10), nzTpIcepk0o8(chr(378 - 330) + chr(0b100001 + 0o116) + chr(0b11000 + 0o31) + chr(548 - 497) + chr(2369 - 2320), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + chr(1447 - 1395) + '\x31', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b11000 + 0o32) + chr(0b101010 + 0o10) + chr(0b101010 + 0o6), 0b1000), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1100011 + 0o14) + chr(0b100111 + 0o17) + chr(51), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(11869 - 11758) + chr(1037 - 987) + '\063' + chr(0b101000 + 0o11), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(358 - 304) + '\x30', 0o10), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(5826 - 5715) + '\x31' + '\x36' + chr(2244 - 2191), ord("\x08")), nzTpIcepk0o8('\060' + chr(6160 - 6049) + chr(0b100101 + 0o14) + chr(0b110010) + '\063', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + chr(53) + chr(0b10110 + 0o33), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b11111 + 0o120) + '\062' + chr(0b110100) + chr(0b110111), 26517 - 26509), nzTpIcepk0o8('\060' + chr(0b1010000 + 0o37) + chr(52) + chr(0b111 + 0o57), ord("\x08")), nzTpIcepk0o8(chr(1889 - 1841) + '\157' + chr(51) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + chr(4349 - 4238) + chr(0b110001) + '\x32' + chr(51), 8), nzTpIcepk0o8(chr(698 - 650) + '\157' + chr(0b11111 + 0o22) + '\x35' + '\x36', 8), nzTpIcepk0o8(chr(1201 - 1153) + chr(1768 - 1657) + chr(0b10010 + 0o40) + chr(50) + chr(53), 8), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(111) + '\061' + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(825 - 776) + chr(0b110101) + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + '\x30' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(1249 - 1201) + '\157' + chr(0b110011) + chr(53) + chr(740 - 689), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\061' + '\x37' + '\x37', 0o10), nzTpIcepk0o8(chr(1011 - 963) + chr(111) + '\063' + chr(176 - 124) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\x6f' + chr(0b11100 + 0o26) + '\x34' + chr(0b10011 + 0o41), 0o10), nzTpIcepk0o8(chr(2088 - 2040) + '\x6f' + chr(0b11010 + 0o27) + '\067' + '\x33', 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(7088 - 6977) + chr(195 - 146) + chr(955 - 907), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(11615 - 11504) + chr(0b101111 + 0o6) + chr(1433 - 1385), 39976 - 39968)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xfb'), chr(0b100100 + 0o100) + chr(0b10 + 0o143) + chr(0b1100011) + chr(631 - 520) + chr(0b1010111 + 0o15) + '\145')('\x75' + chr(116) + chr(102) + chr(0b101010 + 0o3) + chr(0b11100 + 0o34)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def XR6cXufkI7Hb(bI5jsQ9OkQtj, Fi3yzxctM1zW, NX_Q3jNq1TRI=nzTpIcepk0o8('\060' + chr(111) + '\x30', ord("\x08")), uAnhB3Pbsp11=nzTpIcepk0o8(chr(48) + chr(0b1010111 + 0o30) + '\x34' + chr(48) + chr(1677 - 1629), 0o10), F4w4uHdQYgPJ=nzTpIcepk0o8(chr(1337 - 1289) + '\x6f' + chr(49), 0b1000)):
LCrwg7lcbmU9 = nzTpIcepk0o8(chr(0b110000 + 0o0) + '\157' + '\x30', 8)
while Fi3yzxctM1zW:
if Fi3yzxctM1zW & nzTpIcepk0o8(chr(558 - 510) + chr(0b1101111) + '\x31', 8):
LCrwg7lcbmU9 = LCrwg7lcbmU9 ^ bI5jsQ9OkQtj if F4w4uHdQYgPJ else LCrwg7lcbmU9 + bI5jsQ9OkQtj
Fi3yzxctM1zW = Fi3yzxctM1zW >> nzTpIcepk0o8('\x30' + '\157' + chr(0b110001), 8)
bI5jsQ9OkQtj = bI5jsQ9OkQtj << nzTpIcepk0o8(chr(0b11110 + 0o22) + '\157' + '\x31', 8)
if NX_Q3jNq1TRI > nzTpIcepk0o8(chr(355 - 307) + '\x6f' + chr(0b100010 + 0o16), 8) and bI5jsQ9OkQtj & uAnhB3Pbsp11:
bI5jsQ9OkQtj = bI5jsQ9OkQtj ^ NX_Q3jNq1TRI
return LCrwg7lcbmU9
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/reedsolomon/reedsolo.py
|
gf_poly_mul
|
def gf_poly_mul(p, q):
'''Multiply two polynomials, inside Galois Field (but the procedure is generic). Optimized function by precomputation of log.'''
# Pre-allocate the result array
r = bytearray(len(p) + len(q) - 1)
# Precompute the logarithm of p
lp = [gf_log[p[i]] for i in xrange(len(p))]
# Compute the polynomial multiplication (just like the outer product of two vectors, we multiply each coefficients of p with all coefficients of q)
for j in xrange(len(q)):
qj = q[j] # optimization: load the coefficient once
if qj != 0: # log(0) is undefined, we need to check that
lq = gf_log[qj] # Optimization: precache the logarithm of the current coefficient of q
for i in xrange(len(p)):
if p[i] != 0: # log(0) is undefined, need to check that...
r[i + j] ^= gf_exp[lp[i] + lq] # equivalent to: r[i + j] = gf_add(r[i+j], gf_mul(p[i], q[j]))
return r
|
python
|
def gf_poly_mul(p, q):
'''Multiply two polynomials, inside Galois Field (but the procedure is generic). Optimized function by precomputation of log.'''
# Pre-allocate the result array
r = bytearray(len(p) + len(q) - 1)
# Precompute the logarithm of p
lp = [gf_log[p[i]] for i in xrange(len(p))]
# Compute the polynomial multiplication (just like the outer product of two vectors, we multiply each coefficients of p with all coefficients of q)
for j in xrange(len(q)):
qj = q[j] # optimization: load the coefficient once
if qj != 0: # log(0) is undefined, we need to check that
lq = gf_log[qj] # Optimization: precache the logarithm of the current coefficient of q
for i in xrange(len(p)):
if p[i] != 0: # log(0) is undefined, need to check that...
r[i + j] ^= gf_exp[lp[i] + lq] # equivalent to: r[i + j] = gf_add(r[i+j], gf_mul(p[i], q[j]))
return r
|
[
"def",
"gf_poly_mul",
"(",
"p",
",",
"q",
")",
":",
"# Pre-allocate the result array",
"r",
"=",
"bytearray",
"(",
"len",
"(",
"p",
")",
"+",
"len",
"(",
"q",
")",
"-",
"1",
")",
"# Precompute the logarithm of p",
"lp",
"=",
"[",
"gf_log",
"[",
"p",
"[",
"i",
"]",
"]",
"for",
"i",
"in",
"xrange",
"(",
"len",
"(",
"p",
")",
")",
"]",
"# Compute the polynomial multiplication (just like the outer product of two vectors, we multiply each coefficients of p with all coefficients of q)",
"for",
"j",
"in",
"xrange",
"(",
"len",
"(",
"q",
")",
")",
":",
"qj",
"=",
"q",
"[",
"j",
"]",
"# optimization: load the coefficient once",
"if",
"qj",
"!=",
"0",
":",
"# log(0) is undefined, we need to check that",
"lq",
"=",
"gf_log",
"[",
"qj",
"]",
"# Optimization: precache the logarithm of the current coefficient of q",
"for",
"i",
"in",
"xrange",
"(",
"len",
"(",
"p",
")",
")",
":",
"if",
"p",
"[",
"i",
"]",
"!=",
"0",
":",
"# log(0) is undefined, need to check that...",
"r",
"[",
"i",
"+",
"j",
"]",
"^=",
"gf_exp",
"[",
"lp",
"[",
"i",
"]",
"+",
"lq",
"]",
"# equivalent to: r[i + j] = gf_add(r[i+j], gf_mul(p[i], q[j]))",
"return",
"r"
] |
Multiply two polynomials, inside Galois Field (but the procedure is generic). Optimized function by precomputation of log.
|
[
"Multiply",
"two",
"polynomials",
"inside",
"Galois",
"Field",
"(",
"but",
"the",
"procedure",
"is",
"generic",
")",
".",
"Optimized",
"function",
"by",
"precomputation",
"of",
"log",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/reedsolomon/reedsolo.py#L316-L330
|
train
|
Multiply two polynomials inside Galois Field. Optimized function by precomputation of log.
|
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('\x30' + chr(0b1101111) + chr(50) + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + chr(51) + '\061', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(53) + chr(927 - 877), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b111000 + 0o67) + '\x32' + chr(0b110000) + '\x31', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + '\060', 2348 - 2340), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(2471 - 2360) + chr(1443 - 1392) + chr(907 - 858) + '\061', 44965 - 44957), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(1443 - 1391) + chr(1510 - 1461), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1123 - 1073) + chr(54) + chr(0b100110 + 0o15), ord("\x08")), nzTpIcepk0o8(chr(2273 - 2225) + '\x6f' + chr(1079 - 1024) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(3444 - 3333) + '\x34', 33014 - 33006), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(111) + chr(49) + chr(254 - 201) + chr(849 - 798), 0b1000), nzTpIcepk0o8(chr(1423 - 1375) + chr(0b101000 + 0o107) + chr(0b110011) + chr(55) + chr(50), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\061' + '\x32' + '\x36', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b0 + 0o157) + chr(990 - 940) + '\x35' + chr(0b10000 + 0o42), 39607 - 39599), nzTpIcepk0o8(chr(0b110000) + chr(0b1001 + 0o146) + '\x32' + chr(0b101101 + 0o7), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b100000 + 0o117) + '\064' + '\x32', 64625 - 64617), nzTpIcepk0o8(chr(48) + chr(9221 - 9110) + chr(51) + chr(0b110100) + '\067', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(3118 - 3007) + chr(0b11001 + 0o32) + chr(52), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(526 - 474) + chr(50), 41994 - 41986), nzTpIcepk0o8(chr(803 - 755) + chr(0b1101 + 0o142) + chr(0b110011) + chr(0b101010 + 0o6) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101111) + chr(0b110010) + '\062' + chr(2436 - 2386), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1681 - 1630) + chr(53) + chr(2213 - 2159), 0o10), nzTpIcepk0o8(chr(1171 - 1123) + '\157' + chr(54) + '\x33', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(0b1011 + 0o50) + chr(0b100010 + 0o16), ord("\x08")), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1001 + 0o146) + '\x32' + '\x33' + chr(0b101100 + 0o6), 49267 - 49259), nzTpIcepk0o8(chr(0b110 + 0o52) + '\x6f' + chr(0b110101) + '\066', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100000 + 0o22) + chr(0b101100 + 0o7) + '\x35', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + chr(0b0 + 0o63) + chr(0b110101), 10716 - 10708), nzTpIcepk0o8(chr(882 - 834) + chr(0b1101111) + chr(1768 - 1717) + chr(0b110111) + chr(1061 - 1013), 31427 - 31419), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + chr(212 - 162) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + '\064' + '\x33', ord("\x08")), nzTpIcepk0o8('\060' + chr(8244 - 8133) + chr(2050 - 1999) + chr(1579 - 1531) + chr(757 - 703), 8), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b1101111) + '\x31' + '\062' + chr(51), 46156 - 46148), nzTpIcepk0o8(chr(0b1 + 0o57) + '\157' + chr(0b110011) + chr(0b100011 + 0o24) + chr(55), 0b1000), nzTpIcepk0o8('\060' + chr(0b1000010 + 0o55) + '\x32' + chr(0b110 + 0o54) + chr(1710 - 1662), 0b1000), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(8004 - 7893) + '\065' + '\x37', 41470 - 41462), nzTpIcepk0o8('\060' + chr(111) + '\x31' + '\x36' + '\066', 0o10), nzTpIcepk0o8(chr(1774 - 1726) + chr(4240 - 4129) + chr(0b110010) + chr(2870 - 2815) + '\x33', 11891 - 11883), nzTpIcepk0o8('\x30' + chr(10491 - 10380) + chr(49) + chr(429 - 379) + chr(0b110100), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(111) + chr(0b11101 + 0o30) + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'9'), '\144' + chr(101) + chr(99) + chr(9579 - 9468) + chr(100) + chr(101))('\165' + chr(5759 - 5643) + chr(102) + '\055' + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def W5uVc0sKhkRP(fSdw5wwLo9MO, P1yWu4gF7vxH):
LCrwg7lcbmU9 = MdkNqd1bagO6(ftfygxgFas5X(fSdw5wwLo9MO) + ftfygxgFas5X(P1yWu4gF7vxH) - nzTpIcepk0o8(chr(48) + chr(0b100 + 0o153) + '\x31', 0b1000))
zWftNxhdLirm = [mZuXWV26mhsE[fSdw5wwLo9MO[ZlbFMSG8gCoF]] for ZlbFMSG8gCoF in zBiXJ6gPq38D(ftfygxgFas5X(fSdw5wwLo9MO))]
for sChW4gUsXrIC in zBiXJ6gPq38D(ftfygxgFas5X(P1yWu4gF7vxH)):
blR7opXOBUvX = P1yWu4gF7vxH[sChW4gUsXrIC]
if blR7opXOBUvX != nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(48), 0b1000):
yhHhCG1LnE_P = mZuXWV26mhsE[blR7opXOBUvX]
for ZlbFMSG8gCoF in zBiXJ6gPq38D(ftfygxgFas5X(fSdw5wwLo9MO)):
if fSdw5wwLo9MO[ZlbFMSG8gCoF] != nzTpIcepk0o8(chr(0b110000) + chr(0b1000000 + 0o57) + chr(0b110000), 8):
LCrwg7lcbmU9[ZlbFMSG8gCoF + sChW4gUsXrIC] ^= BL1lB9SRZgNZ[zWftNxhdLirm[ZlbFMSG8gCoF] + yhHhCG1LnE_P]
return LCrwg7lcbmU9
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/reedsolomon/reedsolo.py
|
gf_poly_mul_simple
|
def gf_poly_mul_simple(p, q): # simple equivalent way of multiplying two polynomials without precomputation, but thus it's slower
'''Multiply two polynomials, inside Galois Field'''
# Pre-allocate the result array
r = bytearray(len(p) + len(q) - 1)
# Compute the polynomial multiplication (just like the outer product of two vectors, we multiply each coefficients of p with all coefficients of q)
for j in xrange(len(q)):
for i in xrange(len(p)):
r[i + j] ^= gf_mul(p[i], q[j]) # equivalent to: r[i + j] = gf_add(r[i+j], gf_mul(p[i], q[j])) -- you can see it's your usual polynomial multiplication
return r
|
python
|
def gf_poly_mul_simple(p, q): # simple equivalent way of multiplying two polynomials without precomputation, but thus it's slower
'''Multiply two polynomials, inside Galois Field'''
# Pre-allocate the result array
r = bytearray(len(p) + len(q) - 1)
# Compute the polynomial multiplication (just like the outer product of two vectors, we multiply each coefficients of p with all coefficients of q)
for j in xrange(len(q)):
for i in xrange(len(p)):
r[i + j] ^= gf_mul(p[i], q[j]) # equivalent to: r[i + j] = gf_add(r[i+j], gf_mul(p[i], q[j])) -- you can see it's your usual polynomial multiplication
return r
|
[
"def",
"gf_poly_mul_simple",
"(",
"p",
",",
"q",
")",
":",
"# simple equivalent way of multiplying two polynomials without precomputation, but thus it's slower",
"# Pre-allocate the result array",
"r",
"=",
"bytearray",
"(",
"len",
"(",
"p",
")",
"+",
"len",
"(",
"q",
")",
"-",
"1",
")",
"# Compute the polynomial multiplication (just like the outer product of two vectors, we multiply each coefficients of p with all coefficients of q)",
"for",
"j",
"in",
"xrange",
"(",
"len",
"(",
"q",
")",
")",
":",
"for",
"i",
"in",
"xrange",
"(",
"len",
"(",
"p",
")",
")",
":",
"r",
"[",
"i",
"+",
"j",
"]",
"^=",
"gf_mul",
"(",
"p",
"[",
"i",
"]",
",",
"q",
"[",
"j",
"]",
")",
"# equivalent to: r[i + j] = gf_add(r[i+j], gf_mul(p[i], q[j])) -- you can see it's your usual polynomial multiplication",
"return",
"r"
] |
Multiply two polynomials, inside Galois Field
|
[
"Multiply",
"two",
"polynomials",
"inside",
"Galois",
"Field"
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/reedsolomon/reedsolo.py#L332-L340
|
train
|
Multiply two polynomials inside Galois Field
|
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,pZy5DBJ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aIUMv,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(1547 - 1496) + '\x32' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(568 - 520) + chr(9661 - 9550) + chr(0b101000 + 0o11) + chr(0b1111 + 0o46) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b101100 + 0o103) + chr(2152 - 2103) + '\063' + chr(2854 - 2800), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(631 - 577) + chr(1400 - 1346), 63507 - 63499), nzTpIcepk0o8('\060' + '\x6f' + chr(2066 - 2011) + chr(51), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b110000) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + chr(555 - 504) + chr(0b110001), 20119 - 20111), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\067', 25848 - 25840), nzTpIcepk0o8(chr(828 - 780) + '\x6f' + '\x31' + chr(0b110100) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(49) + chr(576 - 528) + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b1010 + 0o47) + chr(0b110011 + 0o4) + chr(0b110001), 0b1000), nzTpIcepk0o8('\x30' + chr(12044 - 11933) + chr(0b10101 + 0o36) + chr(1628 - 1579) + chr(725 - 677), 0o10), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b11011 + 0o124) + chr(0b1110 + 0o43) + chr(0b110100) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b1101111) + chr(0b11001 + 0o30) + '\061' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1101111) + chr(1938 - 1887) + chr(186 - 135) + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\065', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1945 - 1894) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(1476 - 1428) + '\x6f' + '\066', 28072 - 28064), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\067', 8), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(50) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(1377 - 1329) + chr(0b1101111) + chr(206 - 157) + chr(0b110100) + chr(0b1010 + 0o53), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(0b110101) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(7187 - 7076) + chr(51) + chr(0b110001) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(2114 - 2066) + chr(9489 - 9378) + '\062' + '\x33' + chr(68 - 18), 4840 - 4832), nzTpIcepk0o8('\060' + chr(111) + chr(49) + chr(0b110001) + '\x35', 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\157' + '\063' + '\063' + chr(1821 - 1771), 0o10), nzTpIcepk0o8('\060' + chr(2005 - 1894) + chr(52) + chr(1366 - 1318), 6005 - 5997), nzTpIcepk0o8(chr(1579 - 1531) + chr(0b1011001 + 0o26) + '\061' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(1622 - 1574) + '\157' + chr(0b101 + 0o54) + chr(54) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + '\x36' + chr(1728 - 1679), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(1547 - 1498) + '\x35' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\157' + chr(50) + chr(0b101 + 0o61) + chr(2793 - 2740), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(586 - 534) + chr(0b101000 + 0o11), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + chr(2838 - 2784) + chr(1709 - 1656), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(0b10001 + 0o44), ord("\x08")), nzTpIcepk0o8('\x30' + chr(11697 - 11586) + chr(0b110010) + chr(0b1010 + 0o46) + chr(0b110101), 0o10), nzTpIcepk0o8('\x30' + chr(8371 - 8260) + chr(1031 - 978) + '\065', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(0b110100) + chr(0b11100 + 0o30), 8), nzTpIcepk0o8(chr(48) + chr(0b1101010 + 0o5) + chr(0b110011) + chr(0b11110 + 0o31) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + chr(1726 - 1676) + '\x30', 64661 - 64653)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1693 - 1645) + chr(5991 - 5880) + chr(384 - 331) + chr(48), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf8'), chr(100) + '\145' + chr(3019 - 2920) + chr(111) + chr(0b1001111 + 0o25) + chr(7770 - 7669))(chr(0b1110101) + '\x74' + '\x66' + chr(0b101101) + chr(1727 - 1671)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def r3GikBzLwmvX(fSdw5wwLo9MO, P1yWu4gF7vxH):
LCrwg7lcbmU9 = MdkNqd1bagO6(ftfygxgFas5X(fSdw5wwLo9MO) + ftfygxgFas5X(P1yWu4gF7vxH) - nzTpIcepk0o8(chr(2137 - 2089) + '\x6f' + chr(387 - 338), 0o10))
for sChW4gUsXrIC in zBiXJ6gPq38D(ftfygxgFas5X(P1yWu4gF7vxH)):
for ZlbFMSG8gCoF in zBiXJ6gPq38D(ftfygxgFas5X(fSdw5wwLo9MO)):
LCrwg7lcbmU9[ZlbFMSG8gCoF + sChW4gUsXrIC] ^= SAAS18dHJACg(fSdw5wwLo9MO[ZlbFMSG8gCoF], P1yWu4gF7vxH[sChW4gUsXrIC])
return LCrwg7lcbmU9
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/reedsolomon/reedsolo.py
|
gf_poly_div
|
def gf_poly_div(dividend, divisor):
'''Fast polynomial division by using Extended Synthetic Division and optimized for GF(2^p) computations (doesn't work with standard polynomials outside of this galois field).'''
# CAUTION: this function expects polynomials to follow the opposite convention at decoding: the terms must go from the biggest to lowest degree (while most other functions here expect a list from lowest to biggest degree). eg: 1 + 2x + 5x^2 = [5, 2, 1], NOT [1, 2, 5]
msg_out = bytearray(dividend) # Copy the dividend list and pad with 0 where the ecc bytes will be computed
#normalizer = divisor[0] # precomputing for performance
for i in xrange(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). In fact if you remove it, it should still work because gf_mul() will take care of the condition. But it's still a good practice to put the condition here.
for j in xrange(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
msg_out[i + j] ^= gf_mul(divisor[j], coef) # equivalent to the more mathematically correct (but xoring directly is faster): 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 msg_out[:separator], msg_out[separator:]
|
python
|
def gf_poly_div(dividend, divisor):
'''Fast polynomial division by using Extended Synthetic Division and optimized for GF(2^p) computations (doesn't work with standard polynomials outside of this galois field).'''
# CAUTION: this function expects polynomials to follow the opposite convention at decoding: the terms must go from the biggest to lowest degree (while most other functions here expect a list from lowest to biggest degree). eg: 1 + 2x + 5x^2 = [5, 2, 1], NOT [1, 2, 5]
msg_out = bytearray(dividend) # Copy the dividend list and pad with 0 where the ecc bytes will be computed
#normalizer = divisor[0] # precomputing for performance
for i in xrange(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). In fact if you remove it, it should still work because gf_mul() will take care of the condition. But it's still a good practice to put the condition here.
for j in xrange(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
msg_out[i + j] ^= gf_mul(divisor[j], coef) # equivalent to the more mathematically correct (but xoring directly is faster): 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 msg_out[:separator], msg_out[separator:]
|
[
"def",
"gf_poly_div",
"(",
"dividend",
",",
"divisor",
")",
":",
"# CAUTION: this function expects polynomials to follow the opposite convention at decoding: the terms must go from the biggest to lowest degree (while most other functions here expect a list from lowest to biggest degree). eg: 1 + 2x + 5x^2 = [5, 2, 1], NOT [1, 2, 5]",
"msg_out",
"=",
"bytearray",
"(",
"dividend",
")",
"# Copy the dividend list and pad with 0 where the ecc bytes will be computed",
"#normalizer = divisor[0] # precomputing for performance",
"for",
"i",
"in",
"xrange",
"(",
"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). In fact if you remove it, it should still work because gf_mul() will take care of the condition. But it's still a good practice to put the condition here.",
"for",
"j",
"in",
"xrange",
"(",
"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",
"msg_out",
"[",
"i",
"+",
"j",
"]",
"^=",
"gf_mul",
"(",
"divisor",
"[",
"j",
"]",
",",
"coef",
")",
"# equivalent to the more mathematically correct (but xoring directly is faster): 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",
"msg_out",
"[",
":",
"separator",
"]",
",",
"msg_out",
"[",
"separator",
":",
"]"
] |
Fast polynomial division by using Extended Synthetic Division and optimized for GF(2^p) computations (doesn't work with standard polynomials outside of this galois field).
|
[
"Fast",
"polynomial",
"division",
"by",
"using",
"Extended",
"Synthetic",
"Division",
"and",
"optimized",
"for",
"GF",
"(",
"2^p",
")",
"computations",
"(",
"doesn",
"t",
"work",
"with",
"standard",
"polynomials",
"outside",
"of",
"this",
"galois",
"field",
")",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/reedsolomon/reedsolo.py#L346-L362
|
train
|
Fast polynomial division by using Extended Synthetic Division and optimized for GF ( 2^p 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,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(0b110000) + chr(0b1101111) + chr(0b10100 + 0o37) + '\x32' + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(147 - 96) + chr(0b1101 + 0o52) + chr(0b111 + 0o55), 41911 - 41903), nzTpIcepk0o8('\060' + '\x6f' + chr(392 - 342) + chr(310 - 256), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(52), 0o10), nzTpIcepk0o8('\x30' + chr(0b1011110 + 0o21) + chr(54), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x33' + '\060' + '\067', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + chr(1152 - 1100), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b0 + 0o61) + '\x36' + chr(52), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x32' + chr(0b1101 + 0o45) + chr(48), 0b1000), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\x6f' + '\061' + chr(1528 - 1473) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(1408 - 1359) + '\061' + '\x37', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\060' + '\060', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1011000 + 0o27) + chr(395 - 344) + chr(921 - 873) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(2278 - 2167) + chr(0b10111 + 0o32) + '\062' + chr(390 - 339), 4481 - 4473), nzTpIcepk0o8('\060' + chr(11917 - 11806) + chr(0b1010 + 0o51) + chr(0b110011 + 0o4) + chr(52), 8), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(50), 0b1000), nzTpIcepk0o8('\060' + chr(0b1000110 + 0o51) + '\062' + chr(0b110 + 0o61) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(55) + chr(0b110111), 2164 - 2156), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(485 - 434) + chr(0b10010 + 0o43) + chr(0b11 + 0o57), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b1000 + 0o53) + chr(1018 - 967) + '\065', 0o10), nzTpIcepk0o8(chr(956 - 908) + chr(0b1000011 + 0o54) + '\061' + chr(589 - 537) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(111) + '\x34' + '\062', 0b1000), nzTpIcepk0o8('\x30' + chr(11346 - 11235) + chr(0b110010) + chr(0b110 + 0o61) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10101 + 0o34) + '\065' + chr(54), 54388 - 54380), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(111) + chr(0b110011) + chr(0b110000) + chr(55), 8), nzTpIcepk0o8('\x30' + chr(10671 - 10560) + chr(0b110010) + chr(50) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110111), 0o10), nzTpIcepk0o8('\060' + chr(0b1100000 + 0o17) + chr(0b110 + 0o54) + chr(0b101000 + 0o16) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(842 - 794) + '\x6f' + chr(0b110011) + chr(0b110011) + '\061', 35821 - 35813), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\066' + chr(48), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x33' + chr(49) + '\060', 0b1000), nzTpIcepk0o8(chr(0b11 + 0o55) + '\x6f' + chr(50) + '\x31' + chr(797 - 746), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101011 + 0o4) + '\063' + chr(2798 - 2744) + chr(0b1010 + 0o51), 5881 - 5873), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + chr(0b101100 + 0o13) + chr(0b10000 + 0o45), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1010010 + 0o35) + chr(0b110011) + '\x30' + chr(0b110101), 8), nzTpIcepk0o8('\060' + chr(8201 - 8090) + '\062' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(48) + chr(5007 - 4896) + chr(0b110010) + chr(51) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(1122 - 1074) + chr(3149 - 3038) + '\x31' + '\x34', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + chr(0b110111) + '\x34', 60968 - 60960), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(0b101011 + 0o5) + '\x36', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(111) + chr(0b10001 + 0o44) + chr(0b10110 + 0o32), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf9'), '\x64' + '\x65' + '\143' + chr(6522 - 6411) + chr(0b1100100) + '\x65')('\165' + '\x74' + chr(0b1000 + 0o136) + '\055' + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def tKUKm4503pG0(ZWi94J6MYolQ, jmeC1TQzXJxs):
V2F_8TVYpkai = MdkNqd1bagO6(ZWi94J6MYolQ)
for ZlbFMSG8gCoF in zBiXJ6gPq38D(ftfygxgFas5X(ZWi94J6MYolQ) - (ftfygxgFas5X(jmeC1TQzXJxs) - nzTpIcepk0o8(chr(0b110000) + chr(0b1100110 + 0o11) + chr(0b110001), 21992 - 21984))):
twRKeb6oMfIh = V2F_8TVYpkai[ZlbFMSG8gCoF]
if twRKeb6oMfIh != nzTpIcepk0o8(chr(439 - 391) + '\x6f' + chr(1886 - 1838), ord("\x08")):
for sChW4gUsXrIC in zBiXJ6gPq38D(nzTpIcepk0o8(chr(48) + chr(0b111111 + 0o60) + chr(1541 - 1492), 8), ftfygxgFas5X(jmeC1TQzXJxs)):
if jmeC1TQzXJxs[sChW4gUsXrIC] != nzTpIcepk0o8(chr(0b111 + 0o51) + chr(111) + '\060', 8):
V2F_8TVYpkai[ZlbFMSG8gCoF + sChW4gUsXrIC] ^= SAAS18dHJACg(jmeC1TQzXJxs[sChW4gUsXrIC], twRKeb6oMfIh)
SQO3S2UoWTbW = -(ftfygxgFas5X(jmeC1TQzXJxs) - nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061', 8))
return (V2F_8TVYpkai[:SQO3S2UoWTbW], V2F_8TVYpkai[SQO3S2UoWTbW:])
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/reedsolomon/reedsolo.py
|
gf_poly_square
|
def gf_poly_square(poly):
'''Linear time implementation of polynomial squaring. For details, see paper: "A fast software implementation for arithmetic operations in GF (2n)". De Win, E., Bosselaers, A., Vandenberghe, S., De Gersem, P., & Vandewalle, J. (1996, January). In Advances in Cryptology - Asiacrypt'96 (pp. 65-76). Springer Berlin Heidelberg.'''
length = len(poly)
out = bytearray(2*length - 1)
for i in xrange(length-1):
p = poly[i]
k = 2*i
if p != 0:
#out[k] = gf_exp[(2*gf_log[p]) % field_charac] # not necessary to modulo (2^r)-1 since gf_exp is duplicated up to 510.
out[k] = gf_exp[2*gf_log[p]]
#else: # not necessary since the output is already initialized to an array of 0
#out[k] = 0
out[2*length-2] = gf_exp[2*gf_log[poly[length-1]]]
if out[0] == 0: out[0] = 2*poly[1] - 1
return out
|
python
|
def gf_poly_square(poly):
'''Linear time implementation of polynomial squaring. For details, see paper: "A fast software implementation for arithmetic operations in GF (2n)". De Win, E., Bosselaers, A., Vandenberghe, S., De Gersem, P., & Vandewalle, J. (1996, January). In Advances in Cryptology - Asiacrypt'96 (pp. 65-76). Springer Berlin Heidelberg.'''
length = len(poly)
out = bytearray(2*length - 1)
for i in xrange(length-1):
p = poly[i]
k = 2*i
if p != 0:
#out[k] = gf_exp[(2*gf_log[p]) % field_charac] # not necessary to modulo (2^r)-1 since gf_exp is duplicated up to 510.
out[k] = gf_exp[2*gf_log[p]]
#else: # not necessary since the output is already initialized to an array of 0
#out[k] = 0
out[2*length-2] = gf_exp[2*gf_log[poly[length-1]]]
if out[0] == 0: out[0] = 2*poly[1] - 1
return out
|
[
"def",
"gf_poly_square",
"(",
"poly",
")",
":",
"length",
"=",
"len",
"(",
"poly",
")",
"out",
"=",
"bytearray",
"(",
"2",
"*",
"length",
"-",
"1",
")",
"for",
"i",
"in",
"xrange",
"(",
"length",
"-",
"1",
")",
":",
"p",
"=",
"poly",
"[",
"i",
"]",
"k",
"=",
"2",
"*",
"i",
"if",
"p",
"!=",
"0",
":",
"#out[k] = gf_exp[(2*gf_log[p]) % field_charac] # not necessary to modulo (2^r)-1 since gf_exp is duplicated up to 510.",
"out",
"[",
"k",
"]",
"=",
"gf_exp",
"[",
"2",
"*",
"gf_log",
"[",
"p",
"]",
"]",
"#else: # not necessary since the output is already initialized to an array of 0",
"#out[k] = 0",
"out",
"[",
"2",
"*",
"length",
"-",
"2",
"]",
"=",
"gf_exp",
"[",
"2",
"*",
"gf_log",
"[",
"poly",
"[",
"length",
"-",
"1",
"]",
"]",
"]",
"if",
"out",
"[",
"0",
"]",
"==",
"0",
":",
"out",
"[",
"0",
"]",
"=",
"2",
"*",
"poly",
"[",
"1",
"]",
"-",
"1",
"return",
"out"
] |
Linear time implementation of polynomial squaring. For details, see paper: "A fast software implementation for arithmetic operations in GF (2n)". De Win, E., Bosselaers, A., Vandenberghe, S., De Gersem, P., & Vandewalle, J. (1996, January). In Advances in Cryptology - Asiacrypt'96 (pp. 65-76). Springer Berlin Heidelberg.
|
[
"Linear",
"time",
"implementation",
"of",
"polynomial",
"squaring",
".",
"For",
"details",
"see",
"paper",
":",
"A",
"fast",
"software",
"implementation",
"for",
"arithmetic",
"operations",
"in",
"GF",
"(",
"2n",
")",
".",
"De",
"Win",
"E",
".",
"Bosselaers",
"A",
".",
"Vandenberghe",
"S",
".",
"De",
"Gersem",
"P",
".",
"&",
"Vandewalle",
"J",
".",
"(",
"1996",
"January",
")",
".",
"In",
"Advances",
"in",
"Cryptology",
"-",
"Asiacrypt",
"96",
"(",
"pp",
".",
"65",
"-",
"76",
")",
".",
"Springer",
"Berlin",
"Heidelberg",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/reedsolomon/reedsolo.py#L364-L378
|
train
|
Linear time implementation of polynomial squaring.
|
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,K3alqet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U2,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) + '\x36' + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b101101 + 0o6) + chr(0b0 + 0o61) + chr(645 - 593), 0o10), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(111) + '\062' + chr(0b11010 + 0o31) + chr(52), 0o10), nzTpIcepk0o8(chr(2287 - 2239) + chr(0b1100001 + 0o16) + chr(0b110001) + '\x36' + chr(0b1110 + 0o45), 53447 - 53439), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + chr(1983 - 1931) + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x34' + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b101110 + 0o5) + '\x36' + chr(2971 - 2916), 0o10), nzTpIcepk0o8('\x30' + chr(9291 - 9180) + chr(50) + '\x34' + chr(55), 39217 - 39209), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b1101111) + '\x32' + '\x33', 0o10), nzTpIcepk0o8(chr(920 - 872) + '\x6f' + '\061' + '\x30' + '\x31', 0b1000), nzTpIcepk0o8(chr(0b1 + 0o57) + '\x6f' + chr(2508 - 2457) + '\066' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100000 + 0o117) + chr(0b100110 + 0o15) + chr(49) + chr(51), 43387 - 43379), nzTpIcepk0o8('\x30' + '\x6f' + chr(53) + chr(0b100100 + 0o14), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b1001 + 0o52) + '\x33' + chr(1725 - 1674), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + '\061' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(1412 - 1364) + chr(0b1101111) + chr(0b110001) + chr(50) + '\x34', 0o10), nzTpIcepk0o8(chr(708 - 660) + chr(111) + chr(0b1101 + 0o46) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(0b1001 + 0o146) + '\062' + '\065' + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b110000 + 0o77) + chr(51) + '\061' + chr(0b101100 + 0o11), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + chr(2125 - 2076) + chr(1731 - 1676), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b111100 + 0o63) + chr(50) + chr(0b0 + 0o64) + chr(51), 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11 + 0o56) + chr(53) + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(53), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1100 + 0o46) + '\x35' + '\x37', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b101101 + 0o4) + chr(0b110110) + chr(155 - 101), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + '\x37', 0o10), nzTpIcepk0o8('\060' + chr(0b111 + 0o150) + chr(50) + chr(561 - 509) + '\063', 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + chr(857 - 807) + chr(48), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x35' + chr(80 - 32), 8), nzTpIcepk0o8(chr(1619 - 1571) + '\157' + '\062' + chr(53) + '\x30', 8), nzTpIcepk0o8('\x30' + chr(111) + chr(2331 - 2282) + chr(0b110111) + '\067', ord("\x08")), nzTpIcepk0o8(chr(1222 - 1174) + chr(6134 - 6023) + chr(50) + chr(53) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(468 - 420) + chr(0b1001010 + 0o45) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10000 + 0o42) + '\x30' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\x6f' + chr(0b110101) + '\063', 420 - 412), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + chr(0b110001 + 0o1) + chr(958 - 910), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + '\062' + chr(909 - 861), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1010011 + 0o34) + chr(0b110111) + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(12169 - 12058) + '\x33' + '\x36' + chr(49), 0o10), nzTpIcepk0o8(chr(0b11 + 0o55) + '\x6f' + chr(388 - 339) + '\x31' + chr(0b110100 + 0o2), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x35' + chr(48), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x1d'), '\144' + '\145' + chr(3799 - 3700) + '\x6f' + '\x64' + '\145')('\165' + chr(116) + '\146' + chr(45) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def e3Jb7_9272wN(dlT9YcWsoiw_):
a1RCQZREo3Kd = ftfygxgFas5X(dlT9YcWsoiw_)
VwOu8WkJ9cpc = MdkNqd1bagO6(nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1400 - 1350), ord("\x08")) * a1RCQZREo3Kd - nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061', 39214 - 39206))
for ZlbFMSG8gCoF in zBiXJ6gPq38D(a1RCQZREo3Kd - nzTpIcepk0o8('\060' + chr(0b1011111 + 0o20) + chr(0b101011 + 0o6), 8)):
fSdw5wwLo9MO = dlT9YcWsoiw_[ZlbFMSG8gCoF]
B6UAF1zReOyJ = nzTpIcepk0o8(chr(48) + '\x6f' + chr(50), 8) * ZlbFMSG8gCoF
if fSdw5wwLo9MO != nzTpIcepk0o8(chr(48) + chr(111) + chr(48), ord("\x08")):
VwOu8WkJ9cpc[B6UAF1zReOyJ] = BL1lB9SRZgNZ[nzTpIcepk0o8('\060' + chr(0b1101111) + '\062', 8) * mZuXWV26mhsE[fSdw5wwLo9MO]]
VwOu8WkJ9cpc[nzTpIcepk0o8('\x30' + chr(111) + chr(0b10001 + 0o41), 8) * a1RCQZREo3Kd - nzTpIcepk0o8(chr(1800 - 1752) + chr(111) + '\062', 8)] = BL1lB9SRZgNZ[nzTpIcepk0o8(chr(331 - 283) + chr(111) + chr(139 - 89), 8) * mZuXWV26mhsE[dlT9YcWsoiw_[a1RCQZREo3Kd - nzTpIcepk0o8('\060' + '\157' + '\x31', 8)]]]
if VwOu8WkJ9cpc[nzTpIcepk0o8(chr(1772 - 1724) + chr(111) + '\x30', 8)] == nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(48), 8):
VwOu8WkJ9cpc[nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110000), 8)] = nzTpIcepk0o8('\060' + '\x6f' + '\062', 8) * dlT9YcWsoiw_[nzTpIcepk0o8(chr(2054 - 2006) + chr(0b110111 + 0o70) + chr(1664 - 1615), 8)] - nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49), 8)
return VwOu8WkJ9cpc
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/reedsolomon/reedsolo.py
|
gf_poly_eval
|
def gf_poly_eval(poly, x):
'''Evaluates a polynomial in GF(2^p) given the value for x. This is based on Horner's scheme for maximum efficiency.'''
y = poly[0]
for i in xrange(1, len(poly)):
y = gf_mul(y, x) ^ poly[i]
return y
|
python
|
def gf_poly_eval(poly, x):
'''Evaluates a polynomial in GF(2^p) given the value for x. This is based on Horner's scheme for maximum efficiency.'''
y = poly[0]
for i in xrange(1, len(poly)):
y = gf_mul(y, x) ^ poly[i]
return y
|
[
"def",
"gf_poly_eval",
"(",
"poly",
",",
"x",
")",
":",
"y",
"=",
"poly",
"[",
"0",
"]",
"for",
"i",
"in",
"xrange",
"(",
"1",
",",
"len",
"(",
"poly",
")",
")",
":",
"y",
"=",
"gf_mul",
"(",
"y",
",",
"x",
")",
"^",
"poly",
"[",
"i",
"]",
"return",
"y"
] |
Evaluates a polynomial in GF(2^p) given the value for x. This is based on Horner's scheme for maximum efficiency.
|
[
"Evaluates",
"a",
"polynomial",
"in",
"GF",
"(",
"2^p",
")",
"given",
"the",
"value",
"for",
"x",
".",
"This",
"is",
"based",
"on",
"Horner",
"s",
"scheme",
"for",
"maximum",
"efficiency",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/reedsolomon/reedsolo.py#L380-L385
|
train
|
Evaluates a polynomial in GF ( 2^p given the value for x. This is based on Horner s scheme for maximum efficiency.
|
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(chr(48) + chr(0b1100010 + 0o15) + chr(51) + '\067' + chr(51), 0o10), nzTpIcepk0o8(chr(892 - 844) + chr(0b1011011 + 0o24) + chr(0b110011) + chr(1082 - 1031) + chr(0b110011), 35925 - 35917), nzTpIcepk0o8('\x30' + '\157' + chr(197 - 146) + '\x37' + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + '\066' + chr(1238 - 1187), ord("\x08")), nzTpIcepk0o8(chr(1283 - 1235) + chr(0b1001011 + 0o44) + chr(0b10011 + 0o37) + chr(2160 - 2109) + '\061', 0o10), nzTpIcepk0o8('\x30' + chr(4155 - 4044) + '\061' + '\x35' + '\060', 0b1000), nzTpIcepk0o8(chr(1767 - 1719) + chr(0b1101111) + '\062' + '\x33' + chr(51), 6789 - 6781), nzTpIcepk0o8(chr(761 - 713) + '\x6f' + chr(1455 - 1406) + chr(144 - 91), ord("\x08")), nzTpIcepk0o8('\x30' + chr(5662 - 5551) + chr(0b110010) + chr(54) + chr(0b101000 + 0o12), ord("\x08")), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\157' + '\063' + chr(0b110 + 0o60) + '\x33', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + chr(1367 - 1319) + chr(2456 - 2405), 42500 - 42492), nzTpIcepk0o8('\060' + chr(111) + chr(0b10001 + 0o42) + chr(0b110101) + '\x33', 0o10), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\x6f' + chr(0b110111) + chr(48), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(1643 - 1588) + chr(54), 48196 - 48188), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + chr(1726 - 1671) + chr(51), 39168 - 39160), nzTpIcepk0o8(chr(48) + chr(9463 - 9352) + chr(49) + chr(0b110110) + chr(2188 - 2136), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(0b110010) + chr(53), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b110011 + 0o74) + chr(49) + '\x34' + '\x36', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + '\x34' + chr(1502 - 1448), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(7766 - 7655) + chr(0b100100 + 0o16) + chr(0b1000 + 0o55) + chr(0b10100 + 0o40), 19400 - 19392), nzTpIcepk0o8(chr(1943 - 1895) + chr(111) + '\x33' + chr(0b1001 + 0o55) + chr(2081 - 2029), 0o10), nzTpIcepk0o8(chr(636 - 588) + '\157' + '\063' + chr(0b1111 + 0o47) + chr(811 - 757), 0o10), nzTpIcepk0o8(chr(48) + chr(0b111011 + 0o64) + '\x31' + '\061' + '\x34', 3516 - 3508), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1393 - 1341) + chr(53), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + chr(0b101100 + 0o12) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + chr(0b1011 + 0o54) + chr(53), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(54), 0b1000), nzTpIcepk0o8(chr(1092 - 1044) + chr(111) + chr(0b110101) + '\x30', 0o10), nzTpIcepk0o8('\060' + chr(0b10010 + 0o135) + chr(0b110111 + 0o0) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b1101111) + chr(2228 - 2179) + chr(0b110111) + chr(197 - 147), 63638 - 63630), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(483 - 433) + chr(1540 - 1488) + '\x37', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010 + 0o0) + chr(0b100111 + 0o16) + chr(0b1000 + 0o57), 0o10), nzTpIcepk0o8('\x30' + chr(0b1010001 + 0o36) + chr(0b11110 + 0o25) + chr(0b101101 + 0o4) + chr(0b110 + 0o55), ord("\x08")), nzTpIcepk0o8(chr(340 - 292) + chr(0b101011 + 0o104) + chr(2256 - 2205) + '\064' + chr(1687 - 1638), 0b1000), nzTpIcepk0o8(chr(1109 - 1061) + chr(9681 - 9570) + chr(0b110001) + '\x33', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101011 + 0o10), 0b1000), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(111) + chr(50) + chr(0b101000 + 0o14), 58474 - 58466), nzTpIcepk0o8(chr(48) + '\x6f' + chr(52) + chr(344 - 296), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + '\x34' + chr(0b100100 + 0o23), 25038 - 25030), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b11010 + 0o125) + chr(1198 - 1148) + '\x33' + '\x31', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(171 - 123) + chr(0b1101111) + chr(0b110101) + '\x30', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd5'), chr(100) + chr(0b1100101) + chr(2570 - 2471) + '\157' + '\x64' + chr(101))(chr(8638 - 8521) + '\164' + chr(9480 - 9378) + '\x2d' + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def Fwpv2d6sLQS7(dlT9YcWsoiw_, bI5jsQ9OkQtj):
Fi3yzxctM1zW = dlT9YcWsoiw_[nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b1000 + 0o147) + chr(300 - 252), 23865 - 23857)]
for ZlbFMSG8gCoF in zBiXJ6gPq38D(nzTpIcepk0o8(chr(48) + chr(10026 - 9915) + chr(559 - 510), 0o10), ftfygxgFas5X(dlT9YcWsoiw_)):
Fi3yzxctM1zW = SAAS18dHJACg(Fi3yzxctM1zW, bI5jsQ9OkQtj) ^ dlT9YcWsoiw_[ZlbFMSG8gCoF]
return Fi3yzxctM1zW
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/reedsolomon/reedsolo.py
|
rs_generator_poly
|
def rs_generator_poly(nsym, fcr=0, generator=2):
'''Generate an irreducible generator polynomial (necessary to encode a message into Reed-Solomon)'''
g = bytearray([1])
for i in xrange(nsym):
g = gf_poly_mul(g, [1, gf_pow(generator, i+fcr)])
return g
|
python
|
def rs_generator_poly(nsym, fcr=0, generator=2):
'''Generate an irreducible generator polynomial (necessary to encode a message into Reed-Solomon)'''
g = bytearray([1])
for i in xrange(nsym):
g = gf_poly_mul(g, [1, gf_pow(generator, i+fcr)])
return g
|
[
"def",
"rs_generator_poly",
"(",
"nsym",
",",
"fcr",
"=",
"0",
",",
"generator",
"=",
"2",
")",
":",
"g",
"=",
"bytearray",
"(",
"[",
"1",
"]",
")",
"for",
"i",
"in",
"xrange",
"(",
"nsym",
")",
":",
"g",
"=",
"gf_poly_mul",
"(",
"g",
",",
"[",
"1",
",",
"gf_pow",
"(",
"generator",
",",
"i",
"+",
"fcr",
")",
"]",
")",
"return",
"g"
] |
Generate an irreducible generator polynomial (necessary to encode a message into Reed-Solomon)
|
[
"Generate",
"an",
"irreducible",
"generator",
"polynomial",
"(",
"necessary",
"to",
"encode",
"a",
"message",
"into",
"Reed",
"-",
"Solomon",
")"
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/reedsolomon/reedsolo.py#L390-L395
|
train
|
Generate an irreducible generator 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,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WshwTzZfwvC,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(1431 - 1382) + '\066' + chr(0b110000 + 0o3), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(673 - 624) + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(2084 - 2035) + '\x32' + chr(54), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(0b110000) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(52) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(941 - 893) + chr(111) + chr(2020 - 1971) + chr(901 - 853), 0o10), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(1879 - 1768) + chr(0b111 + 0o54) + chr(1133 - 1084), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + '\067' + chr(49), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b100000 + 0o23) + '\067' + '\x30', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(2376 - 2326) + '\060' + '\060', 0o10), nzTpIcepk0o8(chr(1500 - 1452) + '\x6f' + chr(0b0 + 0o62) + '\x31' + chr(0b101111 + 0o10), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x34', 48661 - 48653), nzTpIcepk0o8(chr(0b110000) + chr(0b1 + 0o156) + '\x33' + chr(0b11100 + 0o24) + chr(0b10111 + 0o37), 49614 - 49606), nzTpIcepk0o8(chr(2175 - 2127) + '\157' + chr(816 - 766) + chr(0b100011 + 0o21) + '\060', 0o10), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(0b1101111) + chr(1921 - 1870) + '\x34' + chr(53), 0o10), nzTpIcepk0o8(chr(1719 - 1671) + chr(2225 - 2114) + chr(0b110010) + '\067' + chr(0b10111 + 0o40), 26483 - 26475), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(0b1101111) + chr(2098 - 2047) + '\x32' + chr(2106 - 2058), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b111000 + 0o67) + '\x31' + '\066' + chr(51), 8), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(11312 - 11201) + chr(0b11001 + 0o36) + '\065', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(53) + '\x33', 0o10), nzTpIcepk0o8(chr(746 - 698) + '\157' + '\x31' + chr(1328 - 1276), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + chr(49) + chr(0b101101 + 0o4), 0b1000), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(111) + chr(183 - 132) + '\x30' + chr(0b110011), 33467 - 33459), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(187 - 135) + chr(607 - 552), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + '\060' + chr(0b100110 + 0o21), 14777 - 14769), nzTpIcepk0o8(chr(48) + chr(0b1001110 + 0o41) + '\061' + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(2320 - 2209) + chr(1190 - 1139) + '\x33' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b1101111 + 0o0) + chr(0b110011) + chr(0b101111 + 0o2) + '\x31', 8), nzTpIcepk0o8(chr(1403 - 1355) + chr(0b1001011 + 0o44) + '\066' + chr(2935 - 2880), ord("\x08")), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(9280 - 9169) + chr(438 - 389) + '\x37', 27742 - 27734), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(444 - 391) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1011111 + 0o20) + chr(0b110010) + chr(518 - 469) + '\067', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2072 - 2023) + '\066' + chr(53), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(4112 - 4001) + '\x33' + chr(0b11111 + 0o23) + '\067', 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b11000 + 0o127) + chr(0b11100 + 0o25) + chr(722 - 670) + chr(0b110101), 8), nzTpIcepk0o8('\x30' + chr(0b1010110 + 0o31) + chr(54) + chr(0b1 + 0o63), 0b1000), nzTpIcepk0o8(chr(1288 - 1240) + chr(0b1101111) + '\x32' + '\x35' + chr(1753 - 1700), 0o10), nzTpIcepk0o8('\x30' + chr(0b100010 + 0o115) + chr(0b110010) + '\065' + chr(2230 - 2178), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(2790 - 2737) + chr(2417 - 2366), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(2392 - 2343) + chr(0b100101 + 0o15), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011 + 0o2) + '\060', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b']'), chr(3220 - 3120) + '\145' + chr(0b110101 + 0o56) + chr(0b1101111) + chr(100) + chr(313 - 212))(chr(0b1110101) + chr(2413 - 2297) + chr(0b1100110) + '\x2d' + chr(0b100111 + 0o21)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def R1JfMu301447(yKA2GO91skvs, wLDWw21nmA1I=nzTpIcepk0o8(chr(1799 - 1751) + chr(4035 - 3924) + chr(48), 0o10), utrvLf8Qjpjk=nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32', ord("\x08"))):
KQq7Z9J63zv1 = MdkNqd1bagO6([nzTpIcepk0o8(chr(48) + chr(111) + chr(1021 - 972), 0b1000)])
for ZlbFMSG8gCoF in zBiXJ6gPq38D(yKA2GO91skvs):
KQq7Z9J63zv1 = W5uVc0sKhkRP(KQq7Z9J63zv1, [nzTpIcepk0o8(chr(0b110000) + chr(9226 - 9115) + chr(151 - 102), 8), iakazqxZgUL8(utrvLf8Qjpjk, ZlbFMSG8gCoF + wLDWw21nmA1I)])
return KQq7Z9J63zv1
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/reedsolomon/reedsolo.py
|
rs_generator_poly_all
|
def rs_generator_poly_all(max_nsym, fcr=0, generator=2):
'''Generate all irreducible generator polynomials up to max_nsym (usually you can use n, the length of the message+ecc). Very useful to reduce processing time if you want to encode using variable schemes and nsym rates.'''
g_all = {}
g_all[0] = g_all[1] = [1]
for nsym in xrange(max_nsym):
g_all[nsym] = rs_generator_poly(nsym, fcr, generator)
return g_all
|
python
|
def rs_generator_poly_all(max_nsym, fcr=0, generator=2):
'''Generate all irreducible generator polynomials up to max_nsym (usually you can use n, the length of the message+ecc). Very useful to reduce processing time if you want to encode using variable schemes and nsym rates.'''
g_all = {}
g_all[0] = g_all[1] = [1]
for nsym in xrange(max_nsym):
g_all[nsym] = rs_generator_poly(nsym, fcr, generator)
return g_all
|
[
"def",
"rs_generator_poly_all",
"(",
"max_nsym",
",",
"fcr",
"=",
"0",
",",
"generator",
"=",
"2",
")",
":",
"g_all",
"=",
"{",
"}",
"g_all",
"[",
"0",
"]",
"=",
"g_all",
"[",
"1",
"]",
"=",
"[",
"1",
"]",
"for",
"nsym",
"in",
"xrange",
"(",
"max_nsym",
")",
":",
"g_all",
"[",
"nsym",
"]",
"=",
"rs_generator_poly",
"(",
"nsym",
",",
"fcr",
",",
"generator",
")",
"return",
"g_all"
] |
Generate all irreducible generator polynomials up to max_nsym (usually you can use n, the length of the message+ecc). Very useful to reduce processing time if you want to encode using variable schemes and nsym rates.
|
[
"Generate",
"all",
"irreducible",
"generator",
"polynomials",
"up",
"to",
"max_nsym",
"(",
"usually",
"you",
"can",
"use",
"n",
"the",
"length",
"of",
"the",
"message",
"+",
"ecc",
")",
".",
"Very",
"useful",
"to",
"reduce",
"processing",
"time",
"if",
"you",
"want",
"to",
"encode",
"using",
"variable",
"schemes",
"and",
"nsym",
"rates",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/reedsolomon/reedsolo.py#L397-L403
|
train
|
Generate all irreducible generator polynomials up to max_nsym.
|
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,K3alq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6U2,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(0b1001001 + 0o46) + chr(0b110010) + chr(0b110100) + '\063', 34094 - 34086), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110 + 0o53) + '\x32' + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(569 - 458) + '\063' + chr(50) + chr(52), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\067', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x36' + '\060', 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\061' + '\x33' + chr(2023 - 1969), ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(111) + '\x31' + '\061' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + '\x37' + chr(49), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(1435 - 1385) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(0b1 + 0o64) + chr(0b110111), 62568 - 62560), nzTpIcepk0o8(chr(0b110000) + chr(12286 - 12175) + '\x31' + '\060' + chr(0b1000 + 0o50), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(0b110101) + chr(0b1001 + 0o55), 54424 - 54416), nzTpIcepk0o8(chr(0b110000) + chr(9000 - 8889) + '\061' + '\063' + chr(669 - 620), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b10110 + 0o131) + chr(0b100000 + 0o26), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(945 - 891) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(111) + '\x37' + chr(0b110111), 33335 - 33327), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + '\062' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110000 + 0o1) + chr(0b110011) + '\x31', 8), nzTpIcepk0o8(chr(1028 - 980) + chr(111) + chr(1594 - 1545) + chr(2287 - 2232) + chr(0b11000 + 0o33), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b1110 + 0o44) + '\063' + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100000 + 0o23) + chr(50) + '\x34', 8), nzTpIcepk0o8('\x30' + chr(111) + chr(0b1111 + 0o44) + '\x34' + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + '\x36' + '\065', 0b1000), nzTpIcepk0o8(chr(1372 - 1324) + '\x6f' + chr(51) + '\x37' + '\x30', 0b1000), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\157' + '\062' + chr(49) + chr(273 - 220), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(49) + chr(48) + '\061', 50920 - 50912), nzTpIcepk0o8('\x30' + chr(0b110010 + 0o75) + chr(0b110011) + chr(0b101100 + 0o6) + chr(405 - 350), 0o10), nzTpIcepk0o8(chr(48) + chr(0b110000 + 0o77) + chr(0b110011) + '\x37' + chr(0b10010 + 0o37), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1011110 + 0o21) + chr(0b110010) + chr(50), 1964 - 1956), nzTpIcepk0o8(chr(48) + chr(0b1000111 + 0o50) + '\062' + chr(52) + chr(0b10101 + 0o35), 28081 - 28073), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1493 - 1442) + chr(1082 - 1027) + chr(0b110010), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10111 + 0o33) + chr(0b10110 + 0o36) + '\x31', 54081 - 54073), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + chr(52) + chr(0b110010), 50845 - 50837), nzTpIcepk0o8('\060' + '\157' + '\066', 8), nzTpIcepk0o8(chr(750 - 702) + '\x6f' + chr(49) + chr(0b110100) + chr(51), 28228 - 28220), nzTpIcepk0o8('\060' + chr(111) + chr(0b1000 + 0o53) + '\x35' + '\x30', 0b1000), nzTpIcepk0o8('\060' + chr(5492 - 5381) + chr(0b1101 + 0o45) + chr(0b110001) + chr(0b100001 + 0o20), ord("\x08")), nzTpIcepk0o8(chr(367 - 319) + '\157' + chr(49) + chr(0b101000 + 0o17) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(111) + '\063' + chr(0b101000 + 0o10) + '\063', 48768 - 48760), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(0b110000) + chr(0b11111 + 0o27), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\157' + chr(0b110101) + chr(0b1100 + 0o44), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x8d'), chr(5108 - 5008) + chr(2606 - 2505) + '\143' + '\x6f' + chr(100) + '\x65')(chr(0b100000 + 0o125) + chr(11824 - 11708) + chr(8742 - 8640) + chr(45) + chr(80 - 24)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def jn5CXgK9XTRT(mwkJgBUigkRP, wLDWw21nmA1I=nzTpIcepk0o8(chr(0b11001 + 0o27) + '\157' + chr(497 - 449), ord("\x08")), utrvLf8Qjpjk=nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b1101111) + '\062', ord("\x08"))):
aDW8aCMO5uBZ = {}
aDW8aCMO5uBZ[nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110000), 8)] = aDW8aCMO5uBZ[nzTpIcepk0o8(chr(1475 - 1427) + chr(9517 - 9406) + chr(574 - 525), 0o10)] = [nzTpIcepk0o8(chr(48) + chr(0b1111 + 0o140) + '\x31', 8)]
for yKA2GO91skvs in zBiXJ6gPq38D(mwkJgBUigkRP):
aDW8aCMO5uBZ[yKA2GO91skvs] = R1JfMu301447(yKA2GO91skvs, wLDWw21nmA1I, utrvLf8Qjpjk)
return aDW8aCMO5uBZ
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/reedsolomon/reedsolo.py
|
rs_simple_encode_msg
|
def rs_simple_encode_msg(msg_in, nsym, fcr=0, generator=2, gen=None):
'''Simple Reed-Solomon encoding (mainly an example for you to understand how it works, because it's slower than the inlined function below)'''
global field_charac
if (len(msg_in) + nsym) > field_charac: raise ValueError("Message is too long (%i when max is %i)" % (len(msg_in)+nsym, field_charac))
if gen is None: gen = rs_generator_poly(nsym, fcr, generator)
# Pad the message, then divide it by the irreducible generator polynomial
_, remainder = gf_poly_div(msg_in + bytearray(len(gen)-1), gen)
# The remainder is our RS code! Just append it to our original message to get our full codeword (this represents a polynomial of max 256 terms)
msg_out = msg_in + remainder
# Return the codeword
return msg_out
|
python
|
def rs_simple_encode_msg(msg_in, nsym, fcr=0, generator=2, gen=None):
'''Simple Reed-Solomon encoding (mainly an example for you to understand how it works, because it's slower than the inlined function below)'''
global field_charac
if (len(msg_in) + nsym) > field_charac: raise ValueError("Message is too long (%i when max is %i)" % (len(msg_in)+nsym, field_charac))
if gen is None: gen = rs_generator_poly(nsym, fcr, generator)
# Pad the message, then divide it by the irreducible generator polynomial
_, remainder = gf_poly_div(msg_in + bytearray(len(gen)-1), gen)
# The remainder is our RS code! Just append it to our original message to get our full codeword (this represents a polynomial of max 256 terms)
msg_out = msg_in + remainder
# Return the codeword
return msg_out
|
[
"def",
"rs_simple_encode_msg",
"(",
"msg_in",
",",
"nsym",
",",
"fcr",
"=",
"0",
",",
"generator",
"=",
"2",
",",
"gen",
"=",
"None",
")",
":",
"global",
"field_charac",
"if",
"(",
"len",
"(",
"msg_in",
")",
"+",
"nsym",
")",
">",
"field_charac",
":",
"raise",
"ValueError",
"(",
"\"Message is too long (%i when max is %i)\"",
"%",
"(",
"len",
"(",
"msg_in",
")",
"+",
"nsym",
",",
"field_charac",
")",
")",
"if",
"gen",
"is",
"None",
":",
"gen",
"=",
"rs_generator_poly",
"(",
"nsym",
",",
"fcr",
",",
"generator",
")",
"# Pad the message, then divide it by the irreducible generator polynomial",
"_",
",",
"remainder",
"=",
"gf_poly_div",
"(",
"msg_in",
"+",
"bytearray",
"(",
"len",
"(",
"gen",
")",
"-",
"1",
")",
",",
"gen",
")",
"# The remainder is our RS code! Just append it to our original message to get our full codeword (this represents a polynomial of max 256 terms)",
"msg_out",
"=",
"msg_in",
"+",
"remainder",
"# Return the codeword",
"return",
"msg_out"
] |
Simple Reed-Solomon encoding (mainly an example for you to understand how it works, because it's slower than the inlined function below)
|
[
"Simple",
"Reed",
"-",
"Solomon",
"encoding",
"(",
"mainly",
"an",
"example",
"for",
"you",
"to",
"understand",
"how",
"it",
"works",
"because",
"it",
"s",
"slower",
"than",
"the",
"inlined",
"function",
"below",
")"
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/reedsolomon/reedsolo.py#L405-L416
|
train
|
Simple Reed - Solomon encoding.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nA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q33HEV_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' + '\157' + chr(1807 - 1752), 35833 - 35825), nzTpIcepk0o8('\060' + chr(111) + chr(60 - 9) + chr(0b10110 + 0o34) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(488 - 438) + '\x30', 31133 - 31125), nzTpIcepk0o8(chr(0b110000) + chr(9605 - 9494) + chr(0b110010) + chr(0b110101) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + '\062' + '\x30', 0b1000), nzTpIcepk0o8('\060' + chr(8166 - 8055) + chr(0b110010) + chr(50) + chr(1428 - 1377), 0o10), nzTpIcepk0o8(chr(48) + chr(11994 - 11883) + '\063' + chr(0b110111) + chr(0b110 + 0o60), 0b1000), nzTpIcepk0o8(chr(1609 - 1561) + '\x6f' + '\061' + chr(51) + chr(504 - 450), 15623 - 15615), nzTpIcepk0o8('\x30' + chr(111) + chr(1125 - 1074) + chr(0b101110 + 0o6) + '\063', 0b1000), nzTpIcepk0o8('\060' + chr(0b1011111 + 0o20) + chr(49) + '\067', ord("\x08")), nzTpIcepk0o8(chr(944 - 896) + chr(111) + chr(2000 - 1950) + chr(54) + chr(2340 - 2286), 0o10), nzTpIcepk0o8(chr(1703 - 1655) + chr(0b1101111) + chr(49) + '\063' + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(746 - 698) + chr(111) + '\x31' + '\x36' + '\x35', 2743 - 2735), nzTpIcepk0o8('\060' + chr(7699 - 7588) + chr(0b1001 + 0o52) + '\067' + chr(1057 - 1005), 34936 - 34928), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + chr(2061 - 2009), 22376 - 22368), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110000 + 0o5) + '\063', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(936 - 825) + chr(49) + chr(375 - 323) + chr(2266 - 2216), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b100000 + 0o20) + '\063', ord("\x08")), nzTpIcepk0o8(chr(453 - 405) + '\x6f' + chr(53) + chr(351 - 296), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(49) + chr(0b110110) + chr(52), 0b1000), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b100001 + 0o116) + '\061' + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b111111 + 0o60) + chr(49) + chr(398 - 347) + chr(0b11000 + 0o31), 29462 - 29454), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\157' + chr(0b110011) + chr(0b110111), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(49) + '\x32' + chr(52), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + chr(0b110110) + chr(1515 - 1462), 0b1000), nzTpIcepk0o8(chr(1301 - 1253) + '\x6f' + chr(1549 - 1500) + chr(50) + chr(0b100111 + 0o12), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\065' + '\063', 8), nzTpIcepk0o8('\x30' + chr(980 - 869) + chr(0b110010) + '\x33' + chr(0b10101 + 0o35), 0b1000), nzTpIcepk0o8(chr(364 - 316) + chr(0b1101111) + chr(53) + chr(50), 38713 - 38705), nzTpIcepk0o8('\x30' + '\157' + '\x31' + chr(0b110111) + chr(55), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\062' + chr(0b100001 + 0o23) + chr(372 - 322), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(51) + chr(143 - 92) + chr(2470 - 2416), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(817 - 764) + chr(0b111 + 0o55), ord("\x08")), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1101111) + chr(0b100010 + 0o17) + chr(1647 - 1592) + chr(52), 20823 - 20815), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\x6f' + '\x34' + chr(51), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + chr(0b110100) + '\x31', 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b100111 + 0o13) + '\x31' + '\063', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(4775 - 4664) + chr(0b110011) + chr(0b110000) + chr(2118 - 2063), 0o10), nzTpIcepk0o8('\x30' + chr(0b100111 + 0o110) + chr(49) + chr(1002 - 947) + '\060', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110100) + chr(0b11001 + 0o36), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(178 - 130) + chr(0b1000010 + 0o55) + 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(4125 - 4024) + chr(6809 - 6710) + '\157' + chr(100) + chr(7628 - 7527))('\165' + chr(1217 - 1101) + chr(0b1011110 + 0o10) + '\055' + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def TAfBsNODDBwV(njLB1HQ8UbxC, yKA2GO91skvs, wLDWw21nmA1I=nzTpIcepk0o8(chr(0b110000) + chr(0b1101001 + 0o6) + '\060', ord("\x08")), utrvLf8Qjpjk=nzTpIcepk0o8(chr(1719 - 1671) + chr(0b1010111 + 0o30) + chr(0b100010 + 0o20), 40184 - 40176), xvmMASm51mgF=None):
global r2S5hBmJ_9QZ
if ftfygxgFas5X(njLB1HQ8UbxC) + yKA2GO91skvs > r2S5hBmJ_9QZ:
raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'J\xb6c\xdc\xb1\xf4\x9b~\x8a|\x96)\x1a\x93<G\r\xedHT&|vt\xc29N\xf4\n\x12\xc3\xa6\x0c\x15PA\xae\xaeQ'), chr(0b1100100) + chr(0b1100101) + chr(3012 - 2913) + chr(0b1101111) + '\x64' + chr(0b1100 + 0o131))('\165' + '\164' + chr(0b1100110) + chr(160 - 115) + '\x38') % (ftfygxgFas5X(njLB1HQ8UbxC) + yKA2GO91skvs, r2S5hBmJ_9QZ))
if xvmMASm51mgF is None:
xvmMASm51mgF = R1JfMu301447(yKA2GO91skvs, wLDWw21nmA1I, utrvLf8Qjpjk)
(zIqcgNgQ9U6F, xaYwx5pDThHb) = tKUKm4503pG0(njLB1HQ8UbxC + MdkNqd1bagO6(ftfygxgFas5X(xvmMASm51mgF) - nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001), 0o10)), xvmMASm51mgF)
V2F_8TVYpkai = njLB1HQ8UbxC + xaYwx5pDThHb
return V2F_8TVYpkai
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/reedsolomon/reedsolo.py
|
rs_encode_msg
|
def rs_encode_msg(msg_in, nsym, fcr=0, generator=2, gen=None):
'''Reed-Solomon main encoding function, using polynomial division (Extended Synthetic Division, the fastest algorithm available to my knowledge), better explained at http://research.swtch.com/field'''
global field_charac
if (len(msg_in) + nsym) > field_charac: raise ValueError("Message is too long (%i when max is %i)" % (len(msg_in)+nsym, field_charac))
if gen is None: gen = rs_generator_poly(nsym, fcr, generator)
msg_in = bytearray(msg_in)
msg_out = bytearray(msg_in) + bytearray(len(gen)-1) # init msg_out with the values inside msg_in and pad with len(gen)-1 bytes (which is the number of ecc symbols).
# Precompute the logarithm of every items in the generator
lgen = bytearray([gf_log[gen[j]] for j in xrange(len(gen))])
# Extended synthetic division main loop
# Fastest implementation with PyPy (but the Cython version in creedsolo.pyx is about 2x faster)
for i in xrange(len(msg_in)):
coef = msg_out[i] # Note that it's msg_out here, not msg_in. Thus, we reuse the updated value at each iteration (this is how Synthetic Division works: instead of storing in a temporary register the intermediate values, we directly commit them to the output).
# coef = gf_mul(msg_out[i], gf_inverse(gen[0])) # 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]
if coef != 0: # log(0) is undefined, so we need to manually check for this case. There's no need to check the divisor here because we know it can't be 0 since we generated it.
lcoef = gf_log[coef] # precaching
for j in xrange(1, len(gen)): # 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 gen[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] ^= gf_exp[lcoef + lgen[j]] # optimization, equivalent to gf_mul(gen[j], msg_out[i]) and we just substract it to msg_out[i+j] (but since we are in GF256, it's equivalent to an addition and to an XOR). In other words, this is simply a "multiply-accumulate operation"
# Recopy the original message bytes (overwrites the part where the quotient was computed)
msg_out[:len(msg_in)] = msg_in # equivalent to c = mprime - b, where mprime is msg_in padded with [0]*nsym
return msg_out
|
python
|
def rs_encode_msg(msg_in, nsym, fcr=0, generator=2, gen=None):
'''Reed-Solomon main encoding function, using polynomial division (Extended Synthetic Division, the fastest algorithm available to my knowledge), better explained at http://research.swtch.com/field'''
global field_charac
if (len(msg_in) + nsym) > field_charac: raise ValueError("Message is too long (%i when max is %i)" % (len(msg_in)+nsym, field_charac))
if gen is None: gen = rs_generator_poly(nsym, fcr, generator)
msg_in = bytearray(msg_in)
msg_out = bytearray(msg_in) + bytearray(len(gen)-1) # init msg_out with the values inside msg_in and pad with len(gen)-1 bytes (which is the number of ecc symbols).
# Precompute the logarithm of every items in the generator
lgen = bytearray([gf_log[gen[j]] for j in xrange(len(gen))])
# Extended synthetic division main loop
# Fastest implementation with PyPy (but the Cython version in creedsolo.pyx is about 2x faster)
for i in xrange(len(msg_in)):
coef = msg_out[i] # Note that it's msg_out here, not msg_in. Thus, we reuse the updated value at each iteration (this is how Synthetic Division works: instead of storing in a temporary register the intermediate values, we directly commit them to the output).
# coef = gf_mul(msg_out[i], gf_inverse(gen[0])) # 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]
if coef != 0: # log(0) is undefined, so we need to manually check for this case. There's no need to check the divisor here because we know it can't be 0 since we generated it.
lcoef = gf_log[coef] # precaching
for j in xrange(1, len(gen)): # 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 gen[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] ^= gf_exp[lcoef + lgen[j]] # optimization, equivalent to gf_mul(gen[j], msg_out[i]) and we just substract it to msg_out[i+j] (but since we are in GF256, it's equivalent to an addition and to an XOR). In other words, this is simply a "multiply-accumulate operation"
# Recopy the original message bytes (overwrites the part where the quotient was computed)
msg_out[:len(msg_in)] = msg_in # equivalent to c = mprime - b, where mprime is msg_in padded with [0]*nsym
return msg_out
|
[
"def",
"rs_encode_msg",
"(",
"msg_in",
",",
"nsym",
",",
"fcr",
"=",
"0",
",",
"generator",
"=",
"2",
",",
"gen",
"=",
"None",
")",
":",
"global",
"field_charac",
"if",
"(",
"len",
"(",
"msg_in",
")",
"+",
"nsym",
")",
">",
"field_charac",
":",
"raise",
"ValueError",
"(",
"\"Message is too long (%i when max is %i)\"",
"%",
"(",
"len",
"(",
"msg_in",
")",
"+",
"nsym",
",",
"field_charac",
")",
")",
"if",
"gen",
"is",
"None",
":",
"gen",
"=",
"rs_generator_poly",
"(",
"nsym",
",",
"fcr",
",",
"generator",
")",
"msg_in",
"=",
"bytearray",
"(",
"msg_in",
")",
"msg_out",
"=",
"bytearray",
"(",
"msg_in",
")",
"+",
"bytearray",
"(",
"len",
"(",
"gen",
")",
"-",
"1",
")",
"# init msg_out with the values inside msg_in and pad with len(gen)-1 bytes (which is the number of ecc symbols).",
"# Precompute the logarithm of every items in the generator",
"lgen",
"=",
"bytearray",
"(",
"[",
"gf_log",
"[",
"gen",
"[",
"j",
"]",
"]",
"for",
"j",
"in",
"xrange",
"(",
"len",
"(",
"gen",
")",
")",
"]",
")",
"# Extended synthetic division main loop",
"# Fastest implementation with PyPy (but the Cython version in creedsolo.pyx is about 2x faster)",
"for",
"i",
"in",
"xrange",
"(",
"len",
"(",
"msg_in",
")",
")",
":",
"coef",
"=",
"msg_out",
"[",
"i",
"]",
"# Note that it's msg_out here, not msg_in. Thus, we reuse the updated value at each iteration (this is how Synthetic Division works: instead of storing in a temporary register the intermediate values, we directly commit them to the output).",
"# coef = gf_mul(msg_out[i], gf_inverse(gen[0])) # 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]",
"if",
"coef",
"!=",
"0",
":",
"# log(0) is undefined, so we need to manually check for this case. There's no need to check the divisor here because we know it can't be 0 since we generated it.",
"lcoef",
"=",
"gf_log",
"[",
"coef",
"]",
"# precaching",
"for",
"j",
"in",
"xrange",
"(",
"1",
",",
"len",
"(",
"gen",
")",
")",
":",
"# 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 gen[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",
"]",
"^=",
"gf_exp",
"[",
"lcoef",
"+",
"lgen",
"[",
"j",
"]",
"]",
"# optimization, equivalent to gf_mul(gen[j], msg_out[i]) and we just substract it to msg_out[i+j] (but since we are in GF256, it's equivalent to an addition and to an XOR). In other words, this is simply a \"multiply-accumulate operation\"",
"# Recopy the original message bytes (overwrites the part where the quotient was computed)",
"msg_out",
"[",
":",
"len",
"(",
"msg_in",
")",
"]",
"=",
"msg_in",
"# equivalent to c = mprime - b, where mprime is msg_in padded with [0]*nsym",
"return",
"msg_out"
] |
Reed-Solomon main encoding function, using polynomial division (Extended Synthetic Division, the fastest algorithm available to my knowledge), better explained at http://research.swtch.com/field
|
[
"Reed",
"-",
"Solomon",
"main",
"encoding",
"function",
"using",
"polynomial",
"division",
"(",
"Extended",
"Synthetic",
"Division",
"the",
"fastest",
"algorithm",
"available",
"to",
"my",
"knowledge",
")",
"better",
"explained",
"at",
"http",
":",
"//",
"research",
".",
"swtch",
".",
"com",
"/",
"field"
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/reedsolomon/reedsolo.py#L418-L444
|
train
|
Reed - Solomon main encoding function using polynomial division
|
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(48) + chr(111) + chr(54) + '\067', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + '\062' + chr(1133 - 1083), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(2174 - 2121) + '\x35', 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110101 + 0o1) + '\063', 0b1000), nzTpIcepk0o8('\060' + chr(0b1100111 + 0o10) + '\x32' + chr(2759 - 2706) + chr(0b1100 + 0o44), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + '\060' + chr(0b101110 + 0o5), 17153 - 17145), nzTpIcepk0o8('\x30' + '\157' + chr(0b100000 + 0o21) + chr(50) + chr(0b1110 + 0o44), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + chr(1573 - 1525), 0b1000), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\x6f' + chr(0b110001) + '\062' + chr(0b110010 + 0o2), 56423 - 56415), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + '\062' + '\x33', 38324 - 38316), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32' + '\063', 0o10), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\157' + chr(1434 - 1385) + '\x35' + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1001000 + 0o47) + chr(0b110010) + chr(49), 0o10), nzTpIcepk0o8(chr(1354 - 1306) + '\x6f' + chr(0b110011) + chr(1273 - 1225) + chr(0b11001 + 0o33), 0o10), nzTpIcepk0o8('\x30' + chr(0b1010001 + 0o36) + chr(51) + chr(52) + '\065', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(3091 - 2980) + chr(49) + chr(54), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1010101 + 0o32) + '\x31' + '\067' + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + chr(0b110010), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\x31' + chr(0b110101) + '\062', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(0b110111) + chr(51), 11345 - 11337), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1111 + 0o140) + '\x32' + '\x31', 8), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(0b110011) + '\x30', 40356 - 40348), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(111) + chr(268 - 218) + '\061' + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b110110 + 0o71) + '\063' + '\x32' + '\063', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1001000 + 0o47) + '\063' + '\x33' + chr(0b101 + 0o53), 0o10), nzTpIcepk0o8('\x30' + chr(0b1111 + 0o140) + chr(0b100011 + 0o17) + chr(2317 - 2266) + chr(49), 10105 - 10097), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(0b101 + 0o60) + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + chr(114 - 62) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11110 + 0o24) + chr(48) + chr(1533 - 1480), 58194 - 58186), nzTpIcepk0o8(chr(1658 - 1610) + '\x6f' + chr(0b110011) + '\067' + '\067', ord("\x08")), nzTpIcepk0o8(chr(837 - 789) + chr(111) + chr(1355 - 1305) + chr(892 - 840) + '\066', 0o10), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + chr(0b110000 + 0o1) + chr(2220 - 2170) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + chr(0b101 + 0o54) + '\061' + chr(163 - 111), 53276 - 53268), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\157' + '\x32' + chr(0b11100 + 0o24) + chr(53), 8), nzTpIcepk0o8('\060' + '\x6f' + chr(342 - 292) + chr(0b110100) + '\064', 0b1000), nzTpIcepk0o8(chr(507 - 459) + chr(0b1101000 + 0o7) + chr(0b110010) + chr(1007 - 957) + chr(926 - 872), 0b1000), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b100001 + 0o116) + chr(0b110010) + chr(0b110010) + '\062', 8), nzTpIcepk0o8('\x30' + chr(111) + '\063' + chr(53) + chr(0b100 + 0o55), 9328 - 9320), nzTpIcepk0o8(chr(0b110000) + chr(0b110 + 0o151) + '\062' + chr(50) + '\065', 0o10), nzTpIcepk0o8('\060' + chr(5180 - 5069) + chr(0b10111 + 0o33) + '\061' + '\x34', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(594 - 546) + chr(0b1101111) + chr(2079 - 2026) + chr(0b11001 + 0o27), 27451 - 27443)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x19'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(0b1000101 + 0o52) + chr(0b1001000 + 0o34) + chr(101))(chr(0b1011011 + 0o32) + chr(0b1110100) + chr(102) + chr(45) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def Jbve8znsbeqk(njLB1HQ8UbxC, yKA2GO91skvs, wLDWw21nmA1I=nzTpIcepk0o8('\x30' + '\157' + '\x30', 0b1000), utrvLf8Qjpjk=nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b0 + 0o62), ord("\x08")), xvmMASm51mgF=None):
global r2S5hBmJ_9QZ
if ftfygxgFas5X(njLB1HQ8UbxC) + yKA2GO91skvs > r2S5hBmJ_9QZ:
raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'z\xf7^@\xc9$70=\xe03\x1d~\xab\xc5b\x10t\r\x9b9\xbd\xe6\xf3\xaf\xf1\r\xcb\xa5\x92\xc7.l\xec\xd7\xb6\xb7\x80\xbc'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(111) + '\144' + chr(101))(chr(0b1110101) + '\x74' + chr(102) + chr(0b101101) + '\070') % (ftfygxgFas5X(njLB1HQ8UbxC) + yKA2GO91skvs, r2S5hBmJ_9QZ))
if xvmMASm51mgF is None:
xvmMASm51mgF = R1JfMu301447(yKA2GO91skvs, wLDWw21nmA1I, utrvLf8Qjpjk)
njLB1HQ8UbxC = MdkNqd1bagO6(njLB1HQ8UbxC)
V2F_8TVYpkai = MdkNqd1bagO6(njLB1HQ8UbxC) + MdkNqd1bagO6(ftfygxgFas5X(xvmMASm51mgF) - nzTpIcepk0o8('\x30' + chr(10012 - 9901) + '\x31', 41110 - 41102))
ivPHs7PAs3nk = MdkNqd1bagO6([mZuXWV26mhsE[xvmMASm51mgF[sChW4gUsXrIC]] for sChW4gUsXrIC in zBiXJ6gPq38D(ftfygxgFas5X(xvmMASm51mgF))])
for ZlbFMSG8gCoF in zBiXJ6gPq38D(ftfygxgFas5X(njLB1HQ8UbxC)):
twRKeb6oMfIh = V2F_8TVYpkai[ZlbFMSG8gCoF]
if twRKeb6oMfIh != nzTpIcepk0o8(chr(1537 - 1489) + chr(9515 - 9404) + chr(0b110000), 8):
mSrJxaQb72Gc = mZuXWV26mhsE[twRKeb6oMfIh]
for sChW4gUsXrIC in zBiXJ6gPq38D(nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(603 - 554), 8), ftfygxgFas5X(xvmMASm51mgF)):
V2F_8TVYpkai[ZlbFMSG8gCoF + sChW4gUsXrIC] ^= BL1lB9SRZgNZ[mSrJxaQb72Gc + ivPHs7PAs3nk[sChW4gUsXrIC]]
V2F_8TVYpkai[:ftfygxgFas5X(njLB1HQ8UbxC)] = njLB1HQ8UbxC
return V2F_8TVYpkai
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/reedsolomon/reedsolo.py
|
rs_calc_syndromes
|
def rs_calc_syndromes(msg, nsym, fcr=0, generator=2):
'''Given the received codeword msg and the number of error correcting symbols (nsym), computes the syndromes polynomial.
Mathematically, it's essentially equivalent to a Fourrier Transform (Chien search being the inverse).
'''
# Note the "[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 [0] + [gf_poly_eval(msg, gf_pow(generator, i+fcr)) for i in xrange(nsym)]
|
python
|
def rs_calc_syndromes(msg, nsym, fcr=0, generator=2):
'''Given the received codeword msg and the number of error correcting symbols (nsym), computes the syndromes polynomial.
Mathematically, it's essentially equivalent to a Fourrier Transform (Chien search being the inverse).
'''
# Note the "[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 [0] + [gf_poly_eval(msg, gf_pow(generator, i+fcr)) for i in xrange(nsym)]
|
[
"def",
"rs_calc_syndromes",
"(",
"msg",
",",
"nsym",
",",
"fcr",
"=",
"0",
",",
"generator",
"=",
"2",
")",
":",
"# Note the \"[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",
"[",
"0",
"]",
"+",
"[",
"gf_poly_eval",
"(",
"msg",
",",
"gf_pow",
"(",
"generator",
",",
"i",
"+",
"fcr",
")",
")",
"for",
"i",
"in",
"xrange",
"(",
"nsym",
")",
"]"
] |
Given the received codeword msg and the number of error correcting symbols (nsym), computes the syndromes polynomial.
Mathematically, it's essentially equivalent to a Fourrier Transform (Chien search being the inverse).
|
[
"Given",
"the",
"received",
"codeword",
"msg",
"and",
"the",
"number",
"of",
"error",
"correcting",
"symbols",
"(",
"nsym",
")",
"computes",
"the",
"syndromes",
"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/reedsolomon/reedsolo.py#L449-L455
|
train
|
Calculates the syndromes polynomial for a given codeword msg.
|
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,I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3XQk26HKr,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(0b110010) + chr(54) + chr(0b10 + 0o60), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + chr(0b110110) + chr(2428 - 2376), 20957 - 20949), nzTpIcepk0o8(chr(48) + chr(1085 - 974) + '\x32' + chr(0b110010) + '\x37', 0o10), nzTpIcepk0o8(chr(1272 - 1224) + chr(0b1101111) + chr(931 - 880) + chr(0b101 + 0o54), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\061' + chr(50) + chr(2217 - 2168), 46744 - 46736), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + chr(0b100011 + 0o17) + chr(0b110001), 43989 - 43981), nzTpIcepk0o8('\060' + chr(0b100010 + 0o115) + '\x32' + '\060', 0b1000), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + '\x31' + chr(0b10100 + 0o36) + chr(0b11011 + 0o30), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\061' + chr(0b110100) + chr(0b11 + 0o55), 0b1000), nzTpIcepk0o8('\060' + chr(0b1100101 + 0o12) + chr(50) + chr(51) + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x32' + chr(0b10000 + 0o47) + '\065', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + '\x32' + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(10719 - 10608) + chr(2331 - 2276) + chr(54), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(1244 - 1193) + chr(1456 - 1404), 39207 - 39199), nzTpIcepk0o8(chr(2280 - 2232) + chr(1277 - 1166) + chr(1471 - 1420) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1 + 0o156) + chr(0b110010) + '\064' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(1274 - 1226) + chr(11481 - 11370) + chr(51) + chr(52) + '\064', 53091 - 53083), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + '\x36' + chr(0b101001 + 0o10), 1830 - 1822), nzTpIcepk0o8('\060' + chr(2935 - 2824) + chr(1066 - 1017) + '\065' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1101111) + '\067' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1101111) + chr(0b11100 + 0o26) + chr(0b110101) + chr(0b11000 + 0o33), 0b1000), nzTpIcepk0o8(chr(1980 - 1932) + '\157' + chr(49) + '\066' + chr(51), 55940 - 55932), nzTpIcepk0o8('\x30' + '\157' + chr(2181 - 2131) + chr(0b1 + 0o57) + chr(0b110101), 40525 - 40517), nzTpIcepk0o8(chr(1648 - 1600) + chr(6427 - 6316) + chr(0b1 + 0o62) + '\x36' + chr(50), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(49) + '\066', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(2124 - 2075) + '\x32', 10975 - 10967), nzTpIcepk0o8(chr(48) + '\x6f' + chr(361 - 311) + chr(0b10111 + 0o31), 8), nzTpIcepk0o8(chr(460 - 412) + chr(10650 - 10539) + chr(50) + '\064' + '\063', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(55) + '\x31', 30519 - 30511), nzTpIcepk0o8(chr(539 - 491) + chr(0b101000 + 0o107) + chr(51) + chr(0b110111) + chr(49), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101101 + 0o2) + chr(0b110010) + '\065', 0b1000), nzTpIcepk0o8('\x30' + chr(11864 - 11753) + '\063' + chr(51) + chr(0b11111 + 0o23), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1704 - 1655) + '\065' + '\062', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + chr(0b1100 + 0o44) + '\067', 0b1000), nzTpIcepk0o8('\x30' + chr(0b101110 + 0o101) + '\x31' + '\x34' + '\x32', 0b1000), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(111) + chr(1774 - 1721) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(9881 - 9770) + chr(2407 - 2354) + '\x32', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + '\x30' + '\066', 46927 - 46919), nzTpIcepk0o8('\060' + chr(0b1001101 + 0o42) + '\x31' + chr(0b110011) + chr(0b100011 + 0o16), 0o10), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1101111) + chr(0b110011) + chr(0b110010) + chr(2718 - 2664), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\157' + '\065' + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x9c'), '\144' + '\145' + '\143' + chr(111) + chr(100) + chr(0b1100101))(chr(7547 - 7430) + chr(116) + chr(0b1100110) + '\055' + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def hgTBD2NxmQJE(sldzbHve8G1S, yKA2GO91skvs, wLDWw21nmA1I=nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x30', 0o10), utrvLf8Qjpjk=nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062', 39240 - 39232)):
return [nzTpIcepk0o8('\060' + chr(1129 - 1018) + chr(0b110000), 8)] + [Fwpv2d6sLQS7(sldzbHve8G1S, iakazqxZgUL8(utrvLf8Qjpjk, ZlbFMSG8gCoF + wLDWw21nmA1I)) for ZlbFMSG8gCoF in zBiXJ6gPq38D(yKA2GO91skvs)]
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/reedsolomon/reedsolo.py
|
rs_correct_errata
|
def rs_correct_errata(msg_in, synd, err_pos, fcr=0, generator=2): # err_pos is a list of the positions of the errors/erasures/errata
'''Forney algorithm, computes the values (error magnitude) to correct the input message.'''
global field_charac
msg = bytearray(msg_in)
# calculate errata locator polynomial to correct both errors and erasures (by combining the errors positions given by the error locator polynomial found by BM with the erasures positions given by caller)
coef_pos = [len(msg) - 1 - p for p in err_pos] # need to convert the positions to coefficients degrees for the errata locator algo to work (eg: instead of [0, 1, 2] it will become [len(msg)-1, len(msg)-2, len(msg) -3])
err_loc = rs_find_errata_locator(coef_pos, generator)
# calculate errata evaluator polynomial (often called Omega or Gamma in academic papers)
err_eval = rs_find_error_evaluator(synd[::-1], err_loc, len(err_loc)-1)[::-1]
# Second part of Chien search to get the error location polynomial X from the error positions in err_pos (the roots of the error locator polynomial, ie, where it evaluates to 0)
X = [] # will store the position of the errors
for i in xrange(len(coef_pos)):
l = field_charac - coef_pos[i]
X.append( gf_pow(generator, -l) )
# Forney algorithm: compute the magnitudes
E = bytearray(len(msg)) # will store the values that need to be corrected (substracted) to the message containing errors. This is sometimes called the error magnitude polynomial.
Xlength = len(X)
for i, Xi in enumerate(X):
Xi_inv = gf_inverse(Xi)
# 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.
err_loc_prime_tmp = []
for j in xrange(Xlength):
if j != i:
err_loc_prime_tmp.append( gf_sub(1, gf_mul(Xi_inv, X[j])) )
# compute the product, which is the denominator of the Forney algorithm (errata locator derivative)
err_loc_prime = 1
for coef in err_loc_prime_tmp:
err_loc_prime = gf_mul(err_loc_prime, coef)
# equivalent to: err_loc_prime = functools.reduce(gf_mul, err_loc_prime_tmp, 1)
# Compute y (evaluation of the errata evaluator polynomial)
# 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.
y = gf_poly_eval(err_eval[::-1], Xi_inv) # numerator of the Forney algorithm (errata evaluator evaluated)
y = gf_mul(gf_pow(Xi, 1-fcr), y) # adjust to fcr parameter
# Compute the magnitude
magnitude = gf_div(y, err_loc_prime) # magnitude value of the error, calculated by the Forney algorithm (an equation in fact): dividing the errata evaluator with the errata locator derivative gives us the errata magnitude (ie, value to repair) the ith symbol
E[err_pos[i]] = magnitude # store the magnitude for this error into the magnitude polynomial
# Apply the correction of values to get our message corrected! (note that the ecc bytes also gets corrected!)
# (this isn't the Forney algorithm, we just apply the result of decoding here)
msg = gf_poly_add(msg, E) # equivalent to Ci = Ri - Ei where Ci is the correct message, Ri the received (senseword) message, and Ei the errata magnitudes (minus is replaced by XOR since it's equivalent in GF(2^p)). So in fact here we substract from the received message the errors magnitude, which logically corrects the value to what it should be.
return msg
|
python
|
def rs_correct_errata(msg_in, synd, err_pos, fcr=0, generator=2): # err_pos is a list of the positions of the errors/erasures/errata
'''Forney algorithm, computes the values (error magnitude) to correct the input message.'''
global field_charac
msg = bytearray(msg_in)
# calculate errata locator polynomial to correct both errors and erasures (by combining the errors positions given by the error locator polynomial found by BM with the erasures positions given by caller)
coef_pos = [len(msg) - 1 - p for p in err_pos] # need to convert the positions to coefficients degrees for the errata locator algo to work (eg: instead of [0, 1, 2] it will become [len(msg)-1, len(msg)-2, len(msg) -3])
err_loc = rs_find_errata_locator(coef_pos, generator)
# calculate errata evaluator polynomial (often called Omega or Gamma in academic papers)
err_eval = rs_find_error_evaluator(synd[::-1], err_loc, len(err_loc)-1)[::-1]
# Second part of Chien search to get the error location polynomial X from the error positions in err_pos (the roots of the error locator polynomial, ie, where it evaluates to 0)
X = [] # will store the position of the errors
for i in xrange(len(coef_pos)):
l = field_charac - coef_pos[i]
X.append( gf_pow(generator, -l) )
# Forney algorithm: compute the magnitudes
E = bytearray(len(msg)) # will store the values that need to be corrected (substracted) to the message containing errors. This is sometimes called the error magnitude polynomial.
Xlength = len(X)
for i, Xi in enumerate(X):
Xi_inv = gf_inverse(Xi)
# 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.
err_loc_prime_tmp = []
for j in xrange(Xlength):
if j != i:
err_loc_prime_tmp.append( gf_sub(1, gf_mul(Xi_inv, X[j])) )
# compute the product, which is the denominator of the Forney algorithm (errata locator derivative)
err_loc_prime = 1
for coef in err_loc_prime_tmp:
err_loc_prime = gf_mul(err_loc_prime, coef)
# equivalent to: err_loc_prime = functools.reduce(gf_mul, err_loc_prime_tmp, 1)
# Compute y (evaluation of the errata evaluator polynomial)
# 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.
y = gf_poly_eval(err_eval[::-1], Xi_inv) # numerator of the Forney algorithm (errata evaluator evaluated)
y = gf_mul(gf_pow(Xi, 1-fcr), y) # adjust to fcr parameter
# Compute the magnitude
magnitude = gf_div(y, err_loc_prime) # magnitude value of the error, calculated by the Forney algorithm (an equation in fact): dividing the errata evaluator with the errata locator derivative gives us the errata magnitude (ie, value to repair) the ith symbol
E[err_pos[i]] = magnitude # store the magnitude for this error into the magnitude polynomial
# Apply the correction of values to get our message corrected! (note that the ecc bytes also gets corrected!)
# (this isn't the Forney algorithm, we just apply the result of decoding here)
msg = gf_poly_add(msg, E) # equivalent to Ci = Ri - Ei where Ci is the correct message, Ri the received (senseword) message, and Ei the errata magnitudes (minus is replaced by XOR since it's equivalent in GF(2^p)). So in fact here we substract from the received message the errors magnitude, which logically corrects the value to what it should be.
return msg
|
[
"def",
"rs_correct_errata",
"(",
"msg_in",
",",
"synd",
",",
"err_pos",
",",
"fcr",
"=",
"0",
",",
"generator",
"=",
"2",
")",
":",
"# err_pos is a list of the positions of the errors/erasures/errata",
"global",
"field_charac",
"msg",
"=",
"bytearray",
"(",
"msg_in",
")",
"# calculate errata locator polynomial to correct both errors and erasures (by combining the errors positions given by the error locator polynomial found by BM with the erasures positions given by caller)",
"coef_pos",
"=",
"[",
"len",
"(",
"msg",
")",
"-",
"1",
"-",
"p",
"for",
"p",
"in",
"err_pos",
"]",
"# need to convert the positions to coefficients degrees for the errata locator algo to work (eg: instead of [0, 1, 2] it will become [len(msg)-1, len(msg)-2, len(msg) -3])",
"err_loc",
"=",
"rs_find_errata_locator",
"(",
"coef_pos",
",",
"generator",
")",
"# calculate errata evaluator polynomial (often called Omega or Gamma in academic papers)",
"err_eval",
"=",
"rs_find_error_evaluator",
"(",
"synd",
"[",
":",
":",
"-",
"1",
"]",
",",
"err_loc",
",",
"len",
"(",
"err_loc",
")",
"-",
"1",
")",
"[",
":",
":",
"-",
"1",
"]",
"# Second part of Chien search to get the error location polynomial X from the error positions in err_pos (the roots of the error locator polynomial, ie, where it evaluates to 0)",
"X",
"=",
"[",
"]",
"# will store the position of the errors",
"for",
"i",
"in",
"xrange",
"(",
"len",
"(",
"coef_pos",
")",
")",
":",
"l",
"=",
"field_charac",
"-",
"coef_pos",
"[",
"i",
"]",
"X",
".",
"append",
"(",
"gf_pow",
"(",
"generator",
",",
"-",
"l",
")",
")",
"# Forney algorithm: compute the magnitudes",
"E",
"=",
"bytearray",
"(",
"len",
"(",
"msg",
")",
")",
"# will store the values that need to be corrected (substracted) to the message containing errors. This is sometimes called the error magnitude polynomial.",
"Xlength",
"=",
"len",
"(",
"X",
")",
"for",
"i",
",",
"Xi",
"in",
"enumerate",
"(",
"X",
")",
":",
"Xi_inv",
"=",
"gf_inverse",
"(",
"Xi",
")",
"# 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.",
"err_loc_prime_tmp",
"=",
"[",
"]",
"for",
"j",
"in",
"xrange",
"(",
"Xlength",
")",
":",
"if",
"j",
"!=",
"i",
":",
"err_loc_prime_tmp",
".",
"append",
"(",
"gf_sub",
"(",
"1",
",",
"gf_mul",
"(",
"Xi_inv",
",",
"X",
"[",
"j",
"]",
")",
")",
")",
"# compute the product, which is the denominator of the Forney algorithm (errata locator derivative)",
"err_loc_prime",
"=",
"1",
"for",
"coef",
"in",
"err_loc_prime_tmp",
":",
"err_loc_prime",
"=",
"gf_mul",
"(",
"err_loc_prime",
",",
"coef",
")",
"# equivalent to: err_loc_prime = functools.reduce(gf_mul, err_loc_prime_tmp, 1)",
"# Compute y (evaluation of the errata evaluator polynomial)",
"# 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.",
"y",
"=",
"gf_poly_eval",
"(",
"err_eval",
"[",
":",
":",
"-",
"1",
"]",
",",
"Xi_inv",
")",
"# numerator of the Forney algorithm (errata evaluator evaluated)",
"y",
"=",
"gf_mul",
"(",
"gf_pow",
"(",
"Xi",
",",
"1",
"-",
"fcr",
")",
",",
"y",
")",
"# adjust to fcr parameter",
"# Compute the magnitude",
"magnitude",
"=",
"gf_div",
"(",
"y",
",",
"err_loc_prime",
")",
"# magnitude value of the error, calculated by the Forney algorithm (an equation in fact): dividing the errata evaluator with the errata locator derivative gives us the errata magnitude (ie, value to repair) the ith symbol",
"E",
"[",
"err_pos",
"[",
"i",
"]",
"]",
"=",
"magnitude",
"# store the magnitude for this error into the magnitude polynomial",
"# Apply the correction of values to get our message corrected! (note that the ecc bytes also gets corrected!)",
"# (this isn't the Forney algorithm, we just apply the result of decoding here)",
"msg",
"=",
"gf_poly_add",
"(",
"msg",
",",
"E",
")",
"# equivalent to Ci = Ri - Ei where Ci is the correct message, Ri the received (senseword) message, and Ei the errata magnitudes (minus is replaced by XOR since it's equivalent in GF(2^p)). So in fact here we substract from the received message the errors magnitude, which logically corrects the value to what it should be.",
"return",
"msg"
] |
Forney algorithm, computes the values (error magnitude) to correct the input message.
|
[
"Forney",
"algorithm",
"computes",
"the",
"values",
"(",
"error",
"magnitude",
")",
"to",
"correct",
"the",
"input",
"message",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/reedsolomon/reedsolo.py#L457-L505
|
train
|
Forney algorithm computes the values to correct the input message.
|
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_4UfQF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OS7b2Ofrbne,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(10472 - 10361) + chr(0b11010 + 0o30) + chr(1522 - 1468) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(4906 - 4795) + chr(694 - 644) + '\063' + '\x33', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(0b1010 + 0o50) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\157' + chr(2543 - 2492) + chr(886 - 838) + chr(143 - 90), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(885 - 834) + chr(0b100010 + 0o17) + chr(0b110010), 13640 - 13632), nzTpIcepk0o8(chr(0b110000) + chr(0b101101 + 0o102) + chr(0b110110) + '\065', 0o10), nzTpIcepk0o8(chr(1675 - 1627) + chr(0b1011 + 0o144) + chr(49) + '\x31' + chr(54), 33372 - 33364), nzTpIcepk0o8(chr(268 - 220) + '\x6f' + chr(0b110111) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x34' + chr(271 - 217), 36184 - 36176), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(111) + '\x31' + chr(0b110010) + chr(0b10 + 0o56), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + '\060' + '\067', 48185 - 48177), nzTpIcepk0o8(chr(48) + '\157' + '\x32' + chr(50) + chr(0b110110), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + '\065' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\x32' + chr(0b110010), 60430 - 60422), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + '\066' + chr(0b10 + 0o65), 37497 - 37489), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(841 - 791) + '\x30', 8), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b101111 + 0o100) + chr(0b11 + 0o63) + '\063', 11222 - 11214), nzTpIcepk0o8('\060' + chr(0b1011100 + 0o23) + '\061' + chr(0b110011) + chr(1120 - 1072), 43018 - 43010), nzTpIcepk0o8('\060' + '\x6f' + chr(2359 - 2309) + '\064' + '\x34', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(562 - 513) + '\x31' + chr(49), 11382 - 11374), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + '\064' + chr(0b10101 + 0o36), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + chr(1732 - 1681), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b100101 + 0o112) + chr(52) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(54) + '\062', 0o10), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b1101111) + chr(2354 - 2303) + '\x34' + chr(0b110011 + 0o4), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + '\x37' + chr(53), 38895 - 38887), nzTpIcepk0o8('\060' + chr(0b110111 + 0o70) + chr(0b10111 + 0o32) + chr(0b10100 + 0o40) + chr(0b100011 + 0o17), 62566 - 62558), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101111) + '\063' + chr(0b101111 + 0o1), 1534 - 1526), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x34' + chr(53), 0b1000), nzTpIcepk0o8(chr(627 - 579) + '\157' + chr(0b10110 + 0o34) + chr(1751 - 1697) + chr(0b110001 + 0o6), 8), nzTpIcepk0o8(chr(149 - 101) + chr(0b1101111) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1001 + 0o52) + chr(134 - 86) + '\x35', 8), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\157' + '\064' + chr(53), 8), nzTpIcepk0o8(chr(48) + chr(0b1011110 + 0o21) + '\061' + chr(0b110001) + chr(0b110100), 18657 - 18649), nzTpIcepk0o8(chr(0b110000) + chr(0b1100100 + 0o13) + '\x32' + '\060' + '\061', 62033 - 62025), nzTpIcepk0o8(chr(0b10111 + 0o31) + '\x6f' + chr(0b11001 + 0o31) + chr(2559 - 2508), 0b1000), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\157' + chr(0b10101 + 0o36) + chr(0b110001) + chr(0b100000 + 0o21), 0o10), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1101111) + '\061' + chr(0b101100 + 0o4) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(257 - 209) + '\x6f' + '\063' + chr(54) + '\x32', 8), nzTpIcepk0o8('\060' + chr(0b10110 + 0o131) + '\x33' + '\066' + chr(0b110100), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\x6f' + chr(53) + chr(1575 - 1527), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x9b'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(11938 - 11822) + chr(0b10110 + 0o120) + chr(0b101101) + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def xyaH5TxFejz_(njLB1HQ8UbxC, xCTaXwhNTbxS, C3Ywi64zGi0P, wLDWw21nmA1I=nzTpIcepk0o8('\060' + chr(111) + '\x30', 24871 - 24863), utrvLf8Qjpjk=nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32', 0b1000)):
global r2S5hBmJ_9QZ
sldzbHve8G1S = MdkNqd1bagO6(njLB1HQ8UbxC)
uvgK7_A8qERI = [ftfygxgFas5X(sldzbHve8G1S) - nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b110110 + 0o71) + chr(0b100101 + 0o14), 0b1000) - fSdw5wwLo9MO for fSdw5wwLo9MO in C3Ywi64zGi0P]
_HnOsX5Sp56U = f02JaLeFX9z9(uvgK7_A8qERI, utrvLf8Qjpjk)
vijOybVhzv4e = PND5iT9NHbr4(xCTaXwhNTbxS[::-nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31', 8)], _HnOsX5Sp56U, ftfygxgFas5X(_HnOsX5Sp56U) - nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b1000011 + 0o54) + chr(0b101111 + 0o2), 8))[::-nzTpIcepk0o8(chr(0b110000) + chr(6512 - 6401) + '\061', 8)]
mxhyDqTAMpMC = []
for ZlbFMSG8gCoF in zBiXJ6gPq38D(ftfygxgFas5X(uvgK7_A8qERI)):
fPrVrKACaFCC = r2S5hBmJ_9QZ - uvgK7_A8qERI[ZlbFMSG8gCoF]
roI3spqORKae(mxhyDqTAMpMC, roI3spqORKae(ES5oEprVxulp(b'\xfd\xcf\x82\xf1\xb2R\tQL?\x12\xa3'), chr(100) + chr(0b1100 + 0o131) + chr(6301 - 6202) + chr(0b111 + 0o150) + chr(0b1010011 + 0o21) + chr(101))(chr(0b1110101) + chr(10114 - 9998) + chr(102) + chr(45) + chr(0b100000 + 0o30)))(iakazqxZgUL8(utrvLf8Qjpjk, -fPrVrKACaFCC))
L63iXCLJOwQn = MdkNqd1bagO6(ftfygxgFas5X(sldzbHve8G1S))
TrIoMjwlXqvx = ftfygxgFas5X(mxhyDqTAMpMC)
for (ZlbFMSG8gCoF, TRYvmwMvHQXL) in _kV_Bomx8PZ4(mxhyDqTAMpMC):
_9fO6nFhveyi = FWkjA8FCUk_Z(TRYvmwMvHQXL)
KJvsXxk9rBoc = []
for sChW4gUsXrIC in zBiXJ6gPq38D(TrIoMjwlXqvx):
if sChW4gUsXrIC != ZlbFMSG8gCoF:
roI3spqORKae(KJvsXxk9rBoc, roI3spqORKae(ES5oEprVxulp(b'\xfd\xcf\x82\xf1\xb2R\tQL?\x12\xa3'), '\144' + chr(9031 - 8930) + chr(4448 - 4349) + chr(10423 - 10312) + chr(0b1010000 + 0o24) + chr(0b1100101))('\165' + chr(116) + chr(0b1111 + 0o127) + chr(0b101101) + '\070'))(gUiDNssIGxf7(nzTpIcepk0o8(chr(90 - 42) + '\157' + '\061', 8), SAAS18dHJACg(_9fO6nFhveyi, mxhyDqTAMpMC[sChW4gUsXrIC])))
IWXRBdr1dIX5 = nzTpIcepk0o8('\x30' + '\157' + '\x31', 8)
for twRKeb6oMfIh in KJvsXxk9rBoc:
IWXRBdr1dIX5 = SAAS18dHJACg(IWXRBdr1dIX5, twRKeb6oMfIh)
Fi3yzxctM1zW = Fwpv2d6sLQS7(vijOybVhzv4e[::-nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b11001 + 0o126) + '\061', 8)], _9fO6nFhveyi)
Fi3yzxctM1zW = SAAS18dHJACg(iakazqxZgUL8(TRYvmwMvHQXL, nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49), 8) - wLDWw21nmA1I), Fi3yzxctM1zW)
JXhvkieeWs5Y = jNec8T416uC5(Fi3yzxctM1zW, IWXRBdr1dIX5)
L63iXCLJOwQn[C3Ywi64zGi0P[ZlbFMSG8gCoF]] = JXhvkieeWs5Y
sldzbHve8G1S = lBCrAmYEOGle(sldzbHve8G1S, L63iXCLJOwQn)
return sldzbHve8G1S
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/reedsolomon/reedsolo.py
|
rs_find_error_locator
|
def rs_find_error_locator(synd, nsym, erase_loc=None, erase_count=0):
'''Find error/errata locator and evaluator polynomials with Berlekamp-Massey algorithm'''
# The idea is that BM will iteratively estimate the error locator polynomial.
# To do this, it will compute a Discrepancy term called Delta, which will tell us if the error locator polynomial needs an update or not
# (hence why it's called discrepancy: it tells us when we are getting off board from the correct value).
# Init the polynomials
if erase_loc: # if the erasure locator polynomial is supplied, we init with its value, so that we include erasures in the final locator polynomial
err_loc = bytearray(erase_loc)
old_loc = bytearray(erase_loc)
else:
err_loc = bytearray([1]) # This is the main variable we want to fill, also called Sigma in other notations or more formally the errors/errata locator polynomial.
old_loc = bytearray([1]) # BM is an iterative algorithm, and we need the errata locator polynomial of the previous iteration in order to update other necessary variables.
#L = 0 # update flag variable, not needed here because we use an alternative equivalent way of checking if update is needed (but using the flag could potentially be faster depending on if using length(list) is taking linear time in your language, here in Python it's constant so it's as fast.
# 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, which set to 0 the coefficients corresponding to erasures, leaving only the coefficients corresponding to errors.
synd_shift = 0
if len(synd) > nsym: synd_shift = len(synd) - nsym
for i in xrange(nsym-erase_count): # generally: nsym-erase_count == len(synd), except when you input a partial erase_loc and using the full syndrome instead of the Forney syndrome, in which case nsym-erase_count is more correct (len(synd) will fail badly with IndexError).
if erase_loc: # if an erasures locator polynomial was provided to init the errors locator polynomial, then we must skip the FIRST erase_count iterations (not the last iterations, this is very important!)
K = erase_count+i+synd_shift
else: # if erasures locator is not provided, then either there's no erasures to account or we use the Forney syndromes, so we don't need to use erase_count nor erase_loc (the erasures have been trimmed out of the Forney syndromes).
K = i+synd_shift
# Compute the discrepancy Delta
# Here is the close-to-the-books operation to compute the discrepancy Delta: it's a simple polynomial multiplication of error locator with the syndromes, and then we get the Kth element.
#delta = gf_poly_mul(err_loc[::-1], synd)[K] # theoretically it should be gf_poly_add(synd[::-1], [1])[::-1] instead of just synd, but it seems it's not absolutely necessary to correctly decode.
# But this can be optimized: since we only need the Kth element, we don't need to compute the polynomial multiplication for any other element but the Kth. Thus to optimize, we compute the polymul only at the item we need, skipping the rest (avoiding a nested loop, thus we are linear time instead of quadratic).
# This optimization is actually described in several figures of the book "Algebraic codes for data transmission", Blahut, Richard E., 2003, Cambridge university press.
delta = synd[K]
for j in xrange(1, len(err_loc)):
delta ^= gf_mul(err_loc[-(j+1)], synd[K - j]) # delta is also called discrepancy. Here we do a partial polynomial multiplication (ie, we compute the polynomial multiplication only for the term of degree K). Should be equivalent to brownanrs.polynomial.mul_at().
#print "delta", K, delta, list(gf_poly_mul(err_loc[::-1], synd)) # debugline
# Shift polynomials to compute the next degree
old_loc = old_loc + bytearray([0])
# Iteratively estimate the errata locator and evaluator polynomials
if delta != 0: # Update only if there's a discrepancy
if len(old_loc) > len(err_loc): # Rule B (rule A is implicitly defined because rule A just says that we skip any modification for this iteration)
#if 2*L <= K+erase_count: # equivalent to len(old_loc) > len(err_loc), as long as L is correctly computed
# Computing errata locator polynomial Sigma
new_loc = gf_poly_scale(old_loc, delta)
old_loc = gf_poly_scale(err_loc, gf_inverse(delta)) # effectively we are doing err_loc * 1/delta = err_loc // delta
err_loc = new_loc
# Update the update flag
#L = K - L # the update flag L is tricky: in Blahut's schema, it's mandatory to use `L = K - L - erase_count` (and indeed in a previous draft of this function, if you forgot to do `- erase_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 `- erase_count` to update L on your own implementation and see which one works OK without producing wrong decoding failures.
# Update with the discrepancy
err_loc = gf_poly_add(err_loc, gf_poly_scale(old_loc, delta))
# Check if the result is correct, that there's not too many errors to correct
err_loc = list(itertools.dropwhile(lambda x: x == 0, err_loc)) # drop leading 0s, else errs will not be of the correct size
errs = len(err_loc) - 1
if (errs-erase_count) * 2 + erase_count > nsym:
raise ReedSolomonError("Too many errors to correct")
return err_loc
|
python
|
def rs_find_error_locator(synd, nsym, erase_loc=None, erase_count=0):
'''Find error/errata locator and evaluator polynomials with Berlekamp-Massey algorithm'''
# The idea is that BM will iteratively estimate the error locator polynomial.
# To do this, it will compute a Discrepancy term called Delta, which will tell us if the error locator polynomial needs an update or not
# (hence why it's called discrepancy: it tells us when we are getting off board from the correct value).
# Init the polynomials
if erase_loc: # if the erasure locator polynomial is supplied, we init with its value, so that we include erasures in the final locator polynomial
err_loc = bytearray(erase_loc)
old_loc = bytearray(erase_loc)
else:
err_loc = bytearray([1]) # This is the main variable we want to fill, also called Sigma in other notations or more formally the errors/errata locator polynomial.
old_loc = bytearray([1]) # BM is an iterative algorithm, and we need the errata locator polynomial of the previous iteration in order to update other necessary variables.
#L = 0 # update flag variable, not needed here because we use an alternative equivalent way of checking if update is needed (but using the flag could potentially be faster depending on if using length(list) is taking linear time in your language, here in Python it's constant so it's as fast.
# 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, which set to 0 the coefficients corresponding to erasures, leaving only the coefficients corresponding to errors.
synd_shift = 0
if len(synd) > nsym: synd_shift = len(synd) - nsym
for i in xrange(nsym-erase_count): # generally: nsym-erase_count == len(synd), except when you input a partial erase_loc and using the full syndrome instead of the Forney syndrome, in which case nsym-erase_count is more correct (len(synd) will fail badly with IndexError).
if erase_loc: # if an erasures locator polynomial was provided to init the errors locator polynomial, then we must skip the FIRST erase_count iterations (not the last iterations, this is very important!)
K = erase_count+i+synd_shift
else: # if erasures locator is not provided, then either there's no erasures to account or we use the Forney syndromes, so we don't need to use erase_count nor erase_loc (the erasures have been trimmed out of the Forney syndromes).
K = i+synd_shift
# Compute the discrepancy Delta
# Here is the close-to-the-books operation to compute the discrepancy Delta: it's a simple polynomial multiplication of error locator with the syndromes, and then we get the Kth element.
#delta = gf_poly_mul(err_loc[::-1], synd)[K] # theoretically it should be gf_poly_add(synd[::-1], [1])[::-1] instead of just synd, but it seems it's not absolutely necessary to correctly decode.
# But this can be optimized: since we only need the Kth element, we don't need to compute the polynomial multiplication for any other element but the Kth. Thus to optimize, we compute the polymul only at the item we need, skipping the rest (avoiding a nested loop, thus we are linear time instead of quadratic).
# This optimization is actually described in several figures of the book "Algebraic codes for data transmission", Blahut, Richard E., 2003, Cambridge university press.
delta = synd[K]
for j in xrange(1, len(err_loc)):
delta ^= gf_mul(err_loc[-(j+1)], synd[K - j]) # delta is also called discrepancy. Here we do a partial polynomial multiplication (ie, we compute the polynomial multiplication only for the term of degree K). Should be equivalent to brownanrs.polynomial.mul_at().
#print "delta", K, delta, list(gf_poly_mul(err_loc[::-1], synd)) # debugline
# Shift polynomials to compute the next degree
old_loc = old_loc + bytearray([0])
# Iteratively estimate the errata locator and evaluator polynomials
if delta != 0: # Update only if there's a discrepancy
if len(old_loc) > len(err_loc): # Rule B (rule A is implicitly defined because rule A just says that we skip any modification for this iteration)
#if 2*L <= K+erase_count: # equivalent to len(old_loc) > len(err_loc), as long as L is correctly computed
# Computing errata locator polynomial Sigma
new_loc = gf_poly_scale(old_loc, delta)
old_loc = gf_poly_scale(err_loc, gf_inverse(delta)) # effectively we are doing err_loc * 1/delta = err_loc // delta
err_loc = new_loc
# Update the update flag
#L = K - L # the update flag L is tricky: in Blahut's schema, it's mandatory to use `L = K - L - erase_count` (and indeed in a previous draft of this function, if you forgot to do `- erase_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 `- erase_count` to update L on your own implementation and see which one works OK without producing wrong decoding failures.
# Update with the discrepancy
err_loc = gf_poly_add(err_loc, gf_poly_scale(old_loc, delta))
# Check if the result is correct, that there's not too many errors to correct
err_loc = list(itertools.dropwhile(lambda x: x == 0, err_loc)) # drop leading 0s, else errs will not be of the correct size
errs = len(err_loc) - 1
if (errs-erase_count) * 2 + erase_count > nsym:
raise ReedSolomonError("Too many errors to correct")
return err_loc
|
[
"def",
"rs_find_error_locator",
"(",
"synd",
",",
"nsym",
",",
"erase_loc",
"=",
"None",
",",
"erase_count",
"=",
"0",
")",
":",
"# The idea is that BM will iteratively estimate the error locator polynomial.",
"# To do this, it will compute a Discrepancy term called Delta, which will tell us if the error locator polynomial needs an update or not",
"# (hence why it's called discrepancy: it tells us when we are getting off board from the correct value).",
"# Init the polynomials",
"if",
"erase_loc",
":",
"# if the erasure locator polynomial is supplied, we init with its value, so that we include erasures in the final locator polynomial",
"err_loc",
"=",
"bytearray",
"(",
"erase_loc",
")",
"old_loc",
"=",
"bytearray",
"(",
"erase_loc",
")",
"else",
":",
"err_loc",
"=",
"bytearray",
"(",
"[",
"1",
"]",
")",
"# This is the main variable we want to fill, also called Sigma in other notations or more formally the errors/errata locator polynomial.",
"old_loc",
"=",
"bytearray",
"(",
"[",
"1",
"]",
")",
"# BM is an iterative algorithm, and we need the errata locator polynomial of the previous iteration in order to update other necessary variables.",
"#L = 0 # update flag variable, not needed here because we use an alternative equivalent way of checking if update is needed (but using the flag could potentially be faster depending on if using length(list) is taking linear time in your language, here in Python it's constant so it's as fast.",
"# 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, which set to 0 the coefficients corresponding to erasures, leaving only the coefficients corresponding to errors.",
"synd_shift",
"=",
"0",
"if",
"len",
"(",
"synd",
")",
">",
"nsym",
":",
"synd_shift",
"=",
"len",
"(",
"synd",
")",
"-",
"nsym",
"for",
"i",
"in",
"xrange",
"(",
"nsym",
"-",
"erase_count",
")",
":",
"# generally: nsym-erase_count == len(synd), except when you input a partial erase_loc and using the full syndrome instead of the Forney syndrome, in which case nsym-erase_count is more correct (len(synd) will fail badly with IndexError).",
"if",
"erase_loc",
":",
"# if an erasures locator polynomial was provided to init the errors locator polynomial, then we must skip the FIRST erase_count iterations (not the last iterations, this is very important!)",
"K",
"=",
"erase_count",
"+",
"i",
"+",
"synd_shift",
"else",
":",
"# if erasures locator is not provided, then either there's no erasures to account or we use the Forney syndromes, so we don't need to use erase_count nor erase_loc (the erasures have been trimmed out of the Forney syndromes).",
"K",
"=",
"i",
"+",
"synd_shift",
"# Compute the discrepancy Delta",
"# Here is the close-to-the-books operation to compute the discrepancy Delta: it's a simple polynomial multiplication of error locator with the syndromes, and then we get the Kth element.",
"#delta = gf_poly_mul(err_loc[::-1], synd)[K] # theoretically it should be gf_poly_add(synd[::-1], [1])[::-1] instead of just synd, but it seems it's not absolutely necessary to correctly decode.",
"# But this can be optimized: since we only need the Kth element, we don't need to compute the polynomial multiplication for any other element but the Kth. Thus to optimize, we compute the polymul only at the item we need, skipping the rest (avoiding a nested loop, thus we are linear time instead of quadratic).",
"# This optimization is actually described in several figures of the book \"Algebraic codes for data transmission\", Blahut, Richard E., 2003, Cambridge university press.",
"delta",
"=",
"synd",
"[",
"K",
"]",
"for",
"j",
"in",
"xrange",
"(",
"1",
",",
"len",
"(",
"err_loc",
")",
")",
":",
"delta",
"^=",
"gf_mul",
"(",
"err_loc",
"[",
"-",
"(",
"j",
"+",
"1",
")",
"]",
",",
"synd",
"[",
"K",
"-",
"j",
"]",
")",
"# delta is also called discrepancy. Here we do a partial polynomial multiplication (ie, we compute the polynomial multiplication only for the term of degree K). Should be equivalent to brownanrs.polynomial.mul_at().",
"#print \"delta\", K, delta, list(gf_poly_mul(err_loc[::-1], synd)) # debugline",
"# Shift polynomials to compute the next degree",
"old_loc",
"=",
"old_loc",
"+",
"bytearray",
"(",
"[",
"0",
"]",
")",
"# Iteratively estimate the errata locator and evaluator polynomials",
"if",
"delta",
"!=",
"0",
":",
"# Update only if there's a discrepancy",
"if",
"len",
"(",
"old_loc",
")",
">",
"len",
"(",
"err_loc",
")",
":",
"# Rule B (rule A is implicitly defined because rule A just says that we skip any modification for this iteration)",
"#if 2*L <= K+erase_count: # equivalent to len(old_loc) > len(err_loc), as long as L is correctly computed",
"# Computing errata locator polynomial Sigma",
"new_loc",
"=",
"gf_poly_scale",
"(",
"old_loc",
",",
"delta",
")",
"old_loc",
"=",
"gf_poly_scale",
"(",
"err_loc",
",",
"gf_inverse",
"(",
"delta",
")",
")",
"# effectively we are doing err_loc * 1/delta = err_loc // delta",
"err_loc",
"=",
"new_loc",
"# Update the update flag",
"#L = K - L # the update flag L is tricky: in Blahut's schema, it's mandatory to use `L = K - L - erase_count` (and indeed in a previous draft of this function, if you forgot to do `- erase_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 `- erase_count` to update L on your own implementation and see which one works OK without producing wrong decoding failures.",
"# Update with the discrepancy",
"err_loc",
"=",
"gf_poly_add",
"(",
"err_loc",
",",
"gf_poly_scale",
"(",
"old_loc",
",",
"delta",
")",
")",
"# Check if the result is correct, that there's not too many errors to correct",
"err_loc",
"=",
"list",
"(",
"itertools",
".",
"dropwhile",
"(",
"lambda",
"x",
":",
"x",
"==",
"0",
",",
"err_loc",
")",
")",
"# drop leading 0s, else errs will not be of the correct size",
"errs",
"=",
"len",
"(",
"err_loc",
")",
"-",
"1",
"if",
"(",
"errs",
"-",
"erase_count",
")",
"*",
"2",
"+",
"erase_count",
">",
"nsym",
":",
"raise",
"ReedSolomonError",
"(",
"\"Too many errors to correct\"",
")",
"return",
"err_loc"
] |
Find error/errata locator and evaluator polynomials with Berlekamp-Massey algorithm
|
[
"Find",
"error",
"/",
"errata",
"locator",
"and",
"evaluator",
"polynomials",
"with",
"Berlekamp",
"-",
"Massey",
"algorithm"
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/reedsolomon/reedsolo.py#L507-L566
|
train
|
Find error and errata locator polynomials for a syndrometric symbol.
|
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,wX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vLAglV8A,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(6261 - 6150) + '\062' + chr(55) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(111) + chr(0b110011) + chr(617 - 565) + chr(0b11001 + 0o32), 0o10), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(111) + chr(54) + chr(0b101110 + 0o2), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b100100 + 0o15) + chr(1759 - 1705) + '\061', 0b1000), nzTpIcepk0o8(chr(0b10110 + 0o32) + '\157' + chr(1982 - 1933), 43048 - 43040), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(53) + chr(0b101000 + 0o12), 10581 - 10573), nzTpIcepk0o8('\x30' + chr(9710 - 9599) + '\063' + chr(51) + chr(0b1110 + 0o51), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1 + 0o156) + '\062' + chr(2308 - 2254) + chr(1140 - 1085), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + '\x36' + chr(55), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(0b11 + 0o60) + chr(49), 13845 - 13837), nzTpIcepk0o8(chr(1379 - 1331) + '\x6f' + '\x33' + chr(49) + chr(0b110111), 684 - 676), nzTpIcepk0o8('\060' + chr(0b1000110 + 0o51) + '\x31' + chr(0b101001 + 0o11) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b111011 + 0o64) + chr(53) + chr(0b110101), 61143 - 61135), nzTpIcepk0o8('\060' + chr(0b111000 + 0o67) + chr(0b110011) + chr(2542 - 2490), ord("\x08")), nzTpIcepk0o8(chr(812 - 764) + '\x6f' + chr(0b110111) + '\063', 7636 - 7628), nzTpIcepk0o8('\060' + chr(111) + '\x32' + chr(0b101011 + 0o5) + chr(595 - 540), 0o10), nzTpIcepk0o8(chr(2008 - 1960) + chr(111) + chr(0b110111) + chr(0b101011 + 0o10), 8), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(111) + chr(51) + chr(0b10001 + 0o46) + '\062', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(2005 - 1956) + '\x35' + chr(0b101111 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(1038 - 990) + chr(0b1101111) + chr(0b101001 + 0o10) + chr(0b10011 + 0o42) + '\061', ord("\x08")), nzTpIcepk0o8(chr(1707 - 1659) + '\157' + '\x31' + chr(0b110110) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1001 + 0o146) + chr(0b110010) + chr(55) + chr(2413 - 2361), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1001110 + 0o41) + '\x32' + chr(0b100010 + 0o24) + chr(161 - 106), 8), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(5389 - 5278) + chr(1408 - 1357) + chr(0b110101) + chr(0b110001), 0b1000), nzTpIcepk0o8('\x30' + chr(0b10110 + 0o131) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(111) + chr(0b110011) + chr(0b110011 + 0o0) + '\067', 8), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\x6f' + chr(50) + '\066' + '\065', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\x31' + chr(1655 - 1602) + chr(503 - 448), 0o10), nzTpIcepk0o8(chr(498 - 450) + chr(0b101011 + 0o104) + '\x32' + '\061' + chr(50), 0o10), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b101011 + 0o104) + '\061' + chr(53) + chr(1495 - 1443), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + chr(50) + '\060', 39432 - 39424), nzTpIcepk0o8(chr(1341 - 1293) + chr(3640 - 3529) + chr(1223 - 1173) + chr(50) + chr(0b11010 + 0o32), 0b1000), nzTpIcepk0o8(chr(0b110000 + 0o0) + '\157' + chr(0b110111) + chr(2471 - 2418), 57388 - 57380), nzTpIcepk0o8('\060' + chr(0b10110 + 0o131) + chr(0b110010) + '\x34', 15838 - 15830), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1621 - 1572) + '\064' + '\x36', 28696 - 28688), nzTpIcepk0o8('\060' + '\157' + chr(50) + chr(0b110011) + chr(416 - 363), 0o10), nzTpIcepk0o8('\x30' + chr(0b10100 + 0o133) + '\x32' + chr(101 - 53) + chr(0b110010), 48169 - 48161), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + '\x34' + '\x33', 9924 - 9916), nzTpIcepk0o8(chr(1446 - 1398) + '\157' + '\x33' + chr(0b10110 + 0o34) + chr(0b101111 + 0o6), 12242 - 12234), nzTpIcepk0o8(chr(0b110000) + chr(10216 - 10105) + chr(0b110111) + chr(55), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1165 - 1117) + chr(111) + chr(0b110101) + chr(1786 - 1738), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x92'), '\x64' + chr(0b1100101) + '\143' + '\157' + chr(100) + chr(0b1100101))(chr(0b110110 + 0o77) + chr(0b1100111 + 0o15) + '\x66' + '\x2d' + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def ZHuR8GitbwhT(xCTaXwhNTbxS, yKA2GO91skvs, iR4sM24MmyhC=None, SpAAi3pFECfq=nzTpIcepk0o8('\060' + chr(111) + chr(204 - 156), 8)):
if iR4sM24MmyhC:
_HnOsX5Sp56U = MdkNqd1bagO6(iR4sM24MmyhC)
S9RzM4qwV1xX = MdkNqd1bagO6(iR4sM24MmyhC)
else:
_HnOsX5Sp56U = MdkNqd1bagO6([nzTpIcepk0o8(chr(667 - 619) + chr(0b1101111) + chr(0b110001), 8)])
S9RzM4qwV1xX = MdkNqd1bagO6([nzTpIcepk0o8(chr(690 - 642) + '\x6f' + chr(0b110001), 8)])
TAV7nzqrSsKx = nzTpIcepk0o8(chr(136 - 88) + chr(111) + chr(48), 8)
if ftfygxgFas5X(xCTaXwhNTbxS) > yKA2GO91skvs:
TAV7nzqrSsKx = ftfygxgFas5X(xCTaXwhNTbxS) - yKA2GO91skvs
for ZlbFMSG8gCoF in zBiXJ6gPq38D(yKA2GO91skvs - SpAAi3pFECfq):
if iR4sM24MmyhC:
tmj9o95fctlO = SpAAi3pFECfq + ZlbFMSG8gCoF + TAV7nzqrSsKx
else:
tmj9o95fctlO = ZlbFMSG8gCoF + TAV7nzqrSsKx
FLz8xIvnAyD6 = xCTaXwhNTbxS[tmj9o95fctlO]
for sChW4gUsXrIC in zBiXJ6gPq38D(nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b11111 + 0o22), 8), ftfygxgFas5X(_HnOsX5Sp56U)):
FLz8xIvnAyD6 ^= SAAS18dHJACg(_HnOsX5Sp56U[-(sChW4gUsXrIC + nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49), 8))], xCTaXwhNTbxS[tmj9o95fctlO - sChW4gUsXrIC])
S9RzM4qwV1xX = S9RzM4qwV1xX + MdkNqd1bagO6([nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(977 - 929), 8)])
if FLz8xIvnAyD6 != nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110000), 8):
if ftfygxgFas5X(S9RzM4qwV1xX) > ftfygxgFas5X(_HnOsX5Sp56U):
mONcK6ObxfYO = MNJIgRgr7ela(S9RzM4qwV1xX, FLz8xIvnAyD6)
S9RzM4qwV1xX = MNJIgRgr7ela(_HnOsX5Sp56U, FWkjA8FCUk_Z(FLz8xIvnAyD6))
_HnOsX5Sp56U = mONcK6ObxfYO
_HnOsX5Sp56U = lBCrAmYEOGle(_HnOsX5Sp56U, MNJIgRgr7ela(S9RzM4qwV1xX, FLz8xIvnAyD6))
_HnOsX5Sp56U = H4NoA26ON7iG(Tgki_5Gr1fIS.dropwhile(lambda bI5jsQ9OkQtj: bI5jsQ9OkQtj == nzTpIcepk0o8(chr(1639 - 1591) + chr(1692 - 1581) + chr(0b101 + 0o53), 8), _HnOsX5Sp56U))
DI1hIB0rgA8W = ftfygxgFas5X(_HnOsX5Sp56U) - nzTpIcepk0o8(chr(0b101001 + 0o7) + '\x6f' + chr(2285 - 2236), 8)
if (DI1hIB0rgA8W - SpAAi3pFECfq) * nzTpIcepk0o8(chr(747 - 699) + '\x6f' + '\062', 0b1000) + SpAAi3pFECfq > yKA2GO91skvs:
raise m6bqPbBYhVl1(roI3spqORKae(ES5oEprVxulp(b'\xe8\x8c_QlK\xb1\xceW<\xbd$BnH\xa7O\x95J\n\x1c\xce\xc5\x8cc\xab'), '\x64' + chr(101) + '\143' + chr(7697 - 7586) + '\144' + chr(101))(chr(4172 - 4055) + '\x74' + chr(5753 - 5651) + chr(45) + chr(0b100101 + 0o23)))
return _HnOsX5Sp56U
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/reedsolomon/reedsolo.py
|
rs_find_errata_locator
|
def rs_find_errata_locator(e_pos, generator=2):
'''Compute the erasures/errors/errata locator polynomial from the erasures/errors/errata 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
e_loc = [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**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.
for i in e_pos:
e_loc = gf_poly_mul( e_loc, gf_poly_add([1], [gf_pow(generator, i), 0]) )
return e_loc
|
python
|
def rs_find_errata_locator(e_pos, generator=2):
'''Compute the erasures/errors/errata locator polynomial from the erasures/errors/errata 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
e_loc = [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**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.
for i in e_pos:
e_loc = gf_poly_mul( e_loc, gf_poly_add([1], [gf_pow(generator, i), 0]) )
return e_loc
|
[
"def",
"rs_find_errata_locator",
"(",
"e_pos",
",",
"generator",
"=",
"2",
")",
":",
"# 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",
"e_loc",
"=",
"[",
"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**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.",
"for",
"i",
"in",
"e_pos",
":",
"e_loc",
"=",
"gf_poly_mul",
"(",
"e_loc",
",",
"gf_poly_add",
"(",
"[",
"1",
"]",
",",
"[",
"gf_pow",
"(",
"generator",
",",
"i",
")",
",",
"0",
"]",
")",
")",
"return",
"e_loc"
] |
Compute the erasures/errors/errata locator polynomial from the erasures/errors/errata 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",
"/",
"errors",
"/",
"errata",
"locator",
"polynomial",
"from",
"the",
"erasures",
"/",
"errors",
"/",
"errata",
"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/reedsolomon/reedsolo.py#L568-L575
|
train
|
Find the error locator polynomial from the erasures and errors positions.
|
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,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epk0o8,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' + '\157' + chr(0b100111 + 0o14) + '\x36' + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10101 + 0o42) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b0 + 0o157) + chr(51) + chr(55), 64181 - 64173), nzTpIcepk0o8(chr(691 - 643) + chr(0b1101111) + '\x33' + chr(818 - 763) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(1963 - 1915) + chr(7534 - 7423) + chr(661 - 611) + chr(53) + '\064', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b101100 + 0o5) + chr(0b110110) + chr(52), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1597 - 1546) + chr(1365 - 1310), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(52) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + '\x32' + chr(55), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + '\066' + chr(1825 - 1775), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + chr(0b11101 + 0o30) + '\067', 0o10), nzTpIcepk0o8('\060' + chr(0b1111 + 0o140) + '\061' + chr(50) + chr(146 - 95), ord("\x08")), nzTpIcepk0o8(chr(350 - 302) + chr(0b1100010 + 0o15) + chr(0b110001) + chr(0b110011) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(1192 - 1144) + chr(0b1101111) + '\062' + '\062' + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + chr(53) + chr(52), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1041 - 991) + chr(0b110101) + chr(0b110111), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\066' + chr(0b1 + 0o62), 0o10), nzTpIcepk0o8(chr(883 - 835) + chr(0b1101111) + '\061' + '\x33' + chr(0b100010 + 0o16), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(55) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(0b101010 + 0o12) + chr(52), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b100 + 0o56) + '\x36' + '\x33', 57663 - 57655), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(0b10110 + 0o131) + '\061' + chr(54) + chr(0b10001 + 0o42), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110110) + chr(0b100000 + 0o23), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(407 - 356) + chr(53) + chr(54), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(0b1110 + 0o45) + chr(0b10111 + 0o35), 182 - 174), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(55) + chr(0b11000 + 0o30), 52 - 44), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1782 - 1733) + '\064' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b100011 + 0o114) + '\063' + chr(0b110111), 8), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1101111) + chr(0b110011) + chr(1992 - 1942) + chr(675 - 624), 8011 - 8003), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100101 + 0o15) + chr(2053 - 2005) + chr(2134 - 2083), 53791 - 53783), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + chr(0b100100 + 0o23) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(507 - 459) + '\157' + '\x37' + chr(54), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110101) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + chr(53), 21213 - 21205), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(111) + chr(1051 - 1001) + chr(0b110111 + 0o0) + '\065', 0b1000), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(111) + chr(0b10 + 0o60) + '\065' + chr(0b11110 + 0o25), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1430 - 1379) + chr(51) + chr(48), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(1375 - 1324) + '\061', 8), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1101111) + chr(0b10010 + 0o41) + chr(0b110110) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\x6f' + chr(0b10101 + 0o34) + '\067', 17240 - 17232)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\157' + chr(0b11 + 0o62) + '\x30', 8600 - 8592)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xda'), chr(100) + chr(10057 - 9956) + '\x63' + chr(0b101101 + 0o102) + '\x64' + chr(101))(chr(0b1110101) + chr(116) + chr(7372 - 7270) + '\055' + chr(2914 - 2858)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def f02JaLeFX9z9(KPHokFY7x6oo, utrvLf8Qjpjk=nzTpIcepk0o8('\x30' + chr(3871 - 3760) + chr(0b101001 + 0o11), 0o10)):
CsEutIvvrzll = [nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(5895 - 5784) + chr(1745 - 1696), 0o10)]
for ZlbFMSG8gCoF in KPHokFY7x6oo:
CsEutIvvrzll = W5uVc0sKhkRP(CsEutIvvrzll, lBCrAmYEOGle([nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(111) + chr(49), 8)], [iakazqxZgUL8(utrvLf8Qjpjk, ZlbFMSG8gCoF), nzTpIcepk0o8('\x30' + chr(7747 - 7636) + '\x30', 0b1000)]))
return CsEutIvvrzll
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/reedsolomon/reedsolo.py
|
rs_find_error_evaluator
|
def rs_find_error_evaluator(synd, err_loc, nsym):
'''Compute the error (or erasures if you supply sigma=erasures locator polynomial, or errata) 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.'''
# Omega(x) = [ Synd(x) * Error_loc(x) ] mod x^(n-k+1)
_, remainder = gf_poly_div( gf_poly_mul(synd, err_loc), ([1] + [0]*(nsym+1)) ) # first multiply syndromes * errata_locator, then do a polynomial division to truncate the polynomial to the required length
# Faster way that is equivalent
#remainder = gf_poly_mul(synd, err_loc) # first multiply the syndromes with the errata locator polynomial
#remainder = remainder[len(remainder)-(nsym+1):] # then divide by a polynomial of the length we want, which is equivalent to slicing the list (which represents the polynomial)
return remainder
|
python
|
def rs_find_error_evaluator(synd, err_loc, nsym):
'''Compute the error (or erasures if you supply sigma=erasures locator polynomial, or errata) 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.'''
# Omega(x) = [ Synd(x) * Error_loc(x) ] mod x^(n-k+1)
_, remainder = gf_poly_div( gf_poly_mul(synd, err_loc), ([1] + [0]*(nsym+1)) ) # first multiply syndromes * errata_locator, then do a polynomial division to truncate the polynomial to the required length
# Faster way that is equivalent
#remainder = gf_poly_mul(synd, err_loc) # first multiply the syndromes with the errata locator polynomial
#remainder = remainder[len(remainder)-(nsym+1):] # then divide by a polynomial of the length we want, which is equivalent to slicing the list (which represents the polynomial)
return remainder
|
[
"def",
"rs_find_error_evaluator",
"(",
"synd",
",",
"err_loc",
",",
"nsym",
")",
":",
"# Omega(x) = [ Synd(x) * Error_loc(x) ] mod x^(n-k+1)",
"_",
",",
"remainder",
"=",
"gf_poly_div",
"(",
"gf_poly_mul",
"(",
"synd",
",",
"err_loc",
")",
",",
"(",
"[",
"1",
"]",
"+",
"[",
"0",
"]",
"*",
"(",
"nsym",
"+",
"1",
")",
")",
")",
"# first multiply syndromes * errata_locator, then do a polynomial division to truncate the polynomial to the required length",
"# Faster way that is equivalent",
"#remainder = gf_poly_mul(synd, err_loc) # first multiply the syndromes with the errata locator polynomial",
"#remainder = remainder[len(remainder)-(nsym+1):] # then divide by a polynomial of the length we want, which is equivalent to slicing the list (which represents the polynomial)",
"return",
"remainder"
] |
Compute the error (or erasures if you supply sigma=erasures locator polynomial, or errata) 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.
|
[
"Compute",
"the",
"error",
"(",
"or",
"erasures",
"if",
"you",
"supply",
"sigma",
"=",
"erasures",
"locator",
"polynomial",
"or",
"errata",
")",
"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",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/reedsolomon/reedsolo.py#L577-L586
|
train
|
Compute the error evaluator polynomial Omega from the syndrome and the error locator 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,_1qUu0gKi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up,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(332 - 284) + chr(0b1101111) + chr(644 - 595) + chr(49) + '\x35', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(352 - 301) + chr(1220 - 1166) + chr(2682 - 2630), 56259 - 56251), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(0b1101111) + chr(384 - 334) + chr(52), 0b1000), nzTpIcepk0o8(chr(477 - 429) + '\x6f' + chr(0b110001 + 0o2) + chr(53) + chr(481 - 429), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + '\060' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(11386 - 11275) + chr(0b1100 + 0o47) + '\x30' + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b1000 + 0o53) + chr(0b110001), 29462 - 29454), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1668 - 1616) + '\066', 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + chr(0b100110 + 0o15) + chr(50) + chr(1766 - 1712), 0b1000), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1011010 + 0o25) + chr(0b110010) + chr(0b11101 + 0o30) + '\066', 0b1000), nzTpIcepk0o8(chr(896 - 848) + '\x6f' + chr(55) + chr(2133 - 2082), 5868 - 5860), nzTpIcepk0o8(chr(554 - 506) + chr(111) + chr(1626 - 1577) + chr(51) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(6267 - 6156) + '\x31' + chr(2062 - 2014) + '\x37', 8), nzTpIcepk0o8('\060' + '\x6f' + '\063' + chr(0b110011) + chr(0b110000 + 0o4), 47393 - 47385), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + '\061' + '\065', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + chr(1547 - 1494), 22416 - 22408), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(6480 - 6369) + chr(0b110011 + 0o0) + chr(629 - 581) + chr(49), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + chr(0b110010) + '\060', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + '\063' + chr(54), 0b1000), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(111) + chr(50) + '\066' + chr(54), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(52) + chr(740 - 688), 19534 - 19526), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + '\x32' + chr(2342 - 2290), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(0b1100 + 0o45) + chr(1445 - 1396), ord("\x08")), nzTpIcepk0o8(chr(0b0 + 0o60) + '\x6f' + chr(0b11110 + 0o24) + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(7080 - 6969) + chr(49) + '\062' + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\063' + chr(175 - 127) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\157' + '\x32' + chr(1722 - 1672) + chr(0b11 + 0o55), 0o10), nzTpIcepk0o8(chr(48) + chr(6625 - 6514) + chr(0b11101 + 0o25) + '\060' + chr(55), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(2105 - 2056) + chr(650 - 601) + '\065', 8), nzTpIcepk0o8(chr(978 - 930) + '\x6f' + chr(0b1100 + 0o46) + chr(2280 - 2230), 0b1000), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\157' + '\x31' + chr(0b100111 + 0o17), 0b1000), nzTpIcepk0o8('\x30' + chr(0b111001 + 0o66) + chr(0b101001 + 0o12) + chr(0b10000 + 0o41) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(1289 - 1241) + '\x6f' + chr(0b110001) + '\061' + chr(0b10010 + 0o44), 54370 - 54362), nzTpIcepk0o8('\060' + '\157' + '\x31' + chr(0b110000) + '\x36', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + '\x33' + '\x34', 52739 - 52731), nzTpIcepk0o8(chr(1590 - 1542) + '\157' + chr(0b110010) + '\x35', 0o10), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(182 - 127) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(1655 - 1607) + chr(0b111010 + 0o65) + '\066' + chr(1914 - 1862), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\063' + '\064' + chr(0b101001 + 0o12), 0b1000), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b1101010 + 0o5) + '\x33' + chr(55) + chr(0b101011 + 0o7), 5497 - 5489)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b1100 + 0o51) + '\060', 51564 - 51556)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'c'), '\144' + chr(5691 - 5590) + chr(0b1100011) + chr(111) + chr(9318 - 9218) + chr(0b1001 + 0o134))('\x75' + chr(116) + chr(0b100100 + 0o102) + chr(0b110 + 0o47) + chr(0b11001 + 0o37)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def PND5iT9NHbr4(xCTaXwhNTbxS, _HnOsX5Sp56U, yKA2GO91skvs):
(zIqcgNgQ9U6F, xaYwx5pDThHb) = tKUKm4503pG0(W5uVc0sKhkRP(xCTaXwhNTbxS, _HnOsX5Sp56U), [nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b111011 + 0o64) + chr(49), ord("\x08"))] + [nzTpIcepk0o8(chr(1675 - 1627) + chr(0b10 + 0o155) + chr(0b101001 + 0o7), 0o10)] * (yKA2GO91skvs + nzTpIcepk0o8(chr(48) + chr(7994 - 7883) + chr(0b110001), 8)))
return xaYwx5pDThHb
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/reedsolomon/reedsolo.py
|
rs_find_errors
|
def rs_find_errors(err_loc, nmess, generator=2):
'''Find the roots (ie, where evaluation = zero) of error polynomial by bruteforce trial, this is a sort of Chien's search (but less efficient, Chien's search is a way to evaluate the polynomial such that each evaluation only takes constant time).'''
# nmess = length of whole codeword (message + ecc symbols)
errs = len(err_loc) - 1
err_pos = []
for i in xrange(nmess): # normally we should try all 2^8 possible values, but here we optimize to just check the interesting symbols
if gf_poly_eval(err_loc, gf_pow(generator, i)) == 0: # It's a 0? Bingo, it's a root of the error locator polynomial, in other terms this is the location of an error
err_pos.append(nmess - 1 - i)
# Sanity check: the number of errors/errata positions found should be exactly the same as the length of the errata locator polynomial
if len(err_pos) != errs:
# TODO: to decode messages+ecc with length n > 255, 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 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 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 I'm not sure the bruteforce approach may even be possible.
raise ReedSolomonError("Too many (or few) errors found by Chien Search for the errata locator polynomial!")
return err_pos
|
python
|
def rs_find_errors(err_loc, nmess, generator=2):
'''Find the roots (ie, where evaluation = zero) of error polynomial by bruteforce trial, this is a sort of Chien's search (but less efficient, Chien's search is a way to evaluate the polynomial such that each evaluation only takes constant time).'''
# nmess = length of whole codeword (message + ecc symbols)
errs = len(err_loc) - 1
err_pos = []
for i in xrange(nmess): # normally we should try all 2^8 possible values, but here we optimize to just check the interesting symbols
if gf_poly_eval(err_loc, gf_pow(generator, i)) == 0: # It's a 0? Bingo, it's a root of the error locator polynomial, in other terms this is the location of an error
err_pos.append(nmess - 1 - i)
# Sanity check: the number of errors/errata positions found should be exactly the same as the length of the errata locator polynomial
if len(err_pos) != errs:
# TODO: to decode messages+ecc with length n > 255, 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 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 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 I'm not sure the bruteforce approach may even be possible.
raise ReedSolomonError("Too many (or few) errors found by Chien Search for the errata locator polynomial!")
return err_pos
|
[
"def",
"rs_find_errors",
"(",
"err_loc",
",",
"nmess",
",",
"generator",
"=",
"2",
")",
":",
"# nmess = length of whole codeword (message + ecc symbols)",
"errs",
"=",
"len",
"(",
"err_loc",
")",
"-",
"1",
"err_pos",
"=",
"[",
"]",
"for",
"i",
"in",
"xrange",
"(",
"nmess",
")",
":",
"# normally we should try all 2^8 possible values, but here we optimize to just check the interesting symbols",
"if",
"gf_poly_eval",
"(",
"err_loc",
",",
"gf_pow",
"(",
"generator",
",",
"i",
")",
")",
"==",
"0",
":",
"# It's a 0? Bingo, it's a root of the error locator polynomial, in other terms this is the location of an error",
"err_pos",
".",
"append",
"(",
"nmess",
"-",
"1",
"-",
"i",
")",
"# Sanity check: the number of errors/errata positions found should be exactly the same as the length of the errata locator polynomial",
"if",
"len",
"(",
"err_pos",
")",
"!=",
"errs",
":",
"# TODO: to decode messages+ecc with length n > 255, 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 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 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 I'm not sure the bruteforce approach may even be possible.",
"raise",
"ReedSolomonError",
"(",
"\"Too many (or few) errors found by Chien Search for the errata locator polynomial!\"",
")",
"return",
"err_pos"
] |
Find the roots (ie, where evaluation = zero) of error polynomial by bruteforce trial, this is a sort of Chien's search (but less efficient, Chien's search is a way to evaluate the polynomial such that each evaluation only takes constant time).
|
[
"Find",
"the",
"roots",
"(",
"ie",
"where",
"evaluation",
"=",
"zero",
")",
"of",
"error",
"polynomial",
"by",
"bruteforce",
"trial",
"this",
"is",
"a",
"sort",
"of",
"Chien",
"s",
"search",
"(",
"but",
"less",
"efficient",
"Chien",
"s",
"search",
"is",
"a",
"way",
"to",
"evaluate",
"the",
"polynomial",
"such",
"that",
"each",
"evaluation",
"only",
"takes",
"constant",
"time",
")",
"."
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/reedsolomon/reedsolo.py#L588-L600
|
train
|
Find the roots of the error locator polynomial by Chien s search.
|
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,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_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' + '\062' + chr(0b100010 + 0o23) + '\x33', 33548 - 33540), nzTpIcepk0o8(chr(48) + chr(0b111 + 0o150) + '\x31' + chr(54) + chr(48), 0o10), nzTpIcepk0o8('\x30' + chr(10621 - 10510) + '\061' + chr(0b110001) + chr(49), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100000 + 0o17) + '\x31' + chr(0b110101) + chr(1228 - 1176), 0o10), nzTpIcepk0o8(chr(2065 - 2017) + chr(0b1101111) + chr(51) + chr(0b10 + 0o56) + '\x37', 55239 - 55231), nzTpIcepk0o8(chr(48) + chr(4195 - 4084) + chr(50) + chr(131 - 76) + '\062', 59653 - 59645), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1101111) + chr(537 - 486) + chr(53), 39358 - 39350), nzTpIcepk0o8('\x30' + chr(3399 - 3288) + chr(0b100 + 0o57) + chr(548 - 497) + chr(0b11010 + 0o30), 0b1000), nzTpIcepk0o8(chr(120 - 72) + chr(0b1101100 + 0o3) + chr(0b10 + 0o60) + chr(52) + chr(0b110101), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(2343 - 2288) + '\062', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(7905 - 7794) + chr(0b11 + 0o56) + '\064' + '\066', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x32' + '\065' + chr(49), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\063' + chr(49) + '\x35', 0o10), nzTpIcepk0o8('\060' + chr(10583 - 10472) + chr(2272 - 2222) + chr(55) + '\x37', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(0b110011) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(367 - 319) + '\x6f' + chr(654 - 603) + '\x34' + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(57 - 8) + chr(0b11000 + 0o35), 8), nzTpIcepk0o8(chr(115 - 67) + chr(111) + chr(0b1111 + 0o43) + chr(1133 - 1081) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(5446 - 5335) + chr(51) + chr(1197 - 1147) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(1921 - 1873) + '\x6f' + '\063' + '\060' + chr(666 - 617), ord("\x08")), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(4499 - 4388) + '\062' + '\061' + chr(0b10110 + 0o36), 0o10), nzTpIcepk0o8(chr(48) + chr(0b11010 + 0o125) + '\x33' + chr(0b101100 + 0o4) + chr(0b11100 + 0o32), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + chr(54) + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(0b11100 + 0o33) + '\062', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(1385 - 1330) + chr(1362 - 1312), 8), nzTpIcepk0o8(chr(48) + chr(11178 - 11067) + chr(0b10110 + 0o35) + chr(0b110111) + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110110) + chr(0b110110), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x37' + chr(1412 - 1360), ord("\x08")), nzTpIcepk0o8('\x30' + chr(11176 - 11065) + chr(0b110010) + '\x32' + chr(49), 27175 - 27167), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(0b10011 + 0o40) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(1636 - 1588) + chr(11723 - 11612) + chr(0b110011) + chr(0b110 + 0o60) + '\066', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + chr(262 - 209) + chr(0b110001), 51742 - 51734), nzTpIcepk0o8(chr(0b110000) + chr(6826 - 6715) + '\x31' + chr(0b110000) + chr(0b110010), 60678 - 60670), nzTpIcepk0o8('\x30' + chr(111) + chr(0b10100 + 0o35) + chr(2199 - 2147) + '\x35', 0b1000), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\x6f' + chr(0b110100), 44813 - 44805), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + '\x31', 42496 - 42488), nzTpIcepk0o8(chr(486 - 438) + chr(569 - 458) + '\062' + chr(55) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(1687 - 1639) + chr(11025 - 10914) + chr(0b100100 + 0o16) + '\060' + '\060', 0b1000), nzTpIcepk0o8('\060' + chr(0b1010011 + 0o34) + '\x33' + chr(0b101001 + 0o7) + '\x35', 0o10), nzTpIcepk0o8(chr(511 - 463) + '\x6f' + chr(0b110001) + chr(0b110110) + chr(53), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100 + 0o61) + chr(0b11101 + 0o23), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x85'), chr(0b1100100) + chr(5800 - 5699) + chr(0b1011101 + 0o6) + chr(111) + '\144' + '\145')(chr(10398 - 10281) + chr(0b1110100) + chr(102) + chr(0b101101) + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def saYrMW0uv6ge(_HnOsX5Sp56U, EocL3InzUMmo, utrvLf8Qjpjk=nzTpIcepk0o8(chr(48) + chr(0b1100100 + 0o13) + chr(0b110010), 0b1000)):
DI1hIB0rgA8W = ftfygxgFas5X(_HnOsX5Sp56U) - nzTpIcepk0o8('\x30' + chr(828 - 717) + chr(0b110001), 0b1000)
C3Ywi64zGi0P = []
for ZlbFMSG8gCoF in zBiXJ6gPq38D(EocL3InzUMmo):
if Fwpv2d6sLQS7(_HnOsX5Sp56U, iakazqxZgUL8(utrvLf8Qjpjk, ZlbFMSG8gCoF)) == nzTpIcepk0o8(chr(0b110000) + chr(7908 - 7797) + chr(0b1111 + 0o41), ord("\x08")):
roI3spqORKae(C3Ywi64zGi0P, roI3spqORKae(ES5oEprVxulp(b'\xe3$\x1aX\xbf\xddZ\xb5\xcfU3\x9c'), chr(100) + chr(0b1100101) + '\x63' + chr(0b110010 + 0o75) + chr(100) + chr(9786 - 9685))(chr(11175 - 11058) + chr(6996 - 6880) + chr(3733 - 3631) + chr(1404 - 1359) + '\x38'))(EocL3InzUMmo - nzTpIcepk0o8(chr(0b110000) + '\157' + '\061', 8) - ZlbFMSG8gCoF)
if ftfygxgFas5X(C3Ywi64zGi0P) != DI1hIB0rgA8W:
raise m6bqPbBYhVl1(roI3spqORKae(ES5oEprVxulp(b'\xff\x1f&L\xaa\xdbs\xa3\x85\x12\t\xdb\xed\xd9>\x97\xe4\x80\xb7\xb3\xfe\xa9\x81\tZ\x9dYI\xff\xbb\xd6\x0b;EGy\xd4\xe5\xabU\xf8\x15(\x1e\xa4\xd2=\xbc\xcaHF\xdd\xa5\xda{\x85\xbf\xd2\xb3\xb5\xed\xe6\x9f\x15\x19\x9aBS\xe3\xff\x86\x06.\x1cj~\xd0\xe9\xa4\x19\x8a'), chr(0b1100100) + chr(0b101000 + 0o75) + '\x63' + '\x6f' + chr(0b1100100) + '\145')(chr(628 - 511) + chr(0b1110100) + chr(8182 - 8080) + chr(0b101011 + 0o2) + chr(2652 - 2596)))
return C3Ywi64zGi0P
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/reedsolomon/reedsolo.py
|
rs_correct_msg
|
def rs_correct_msg(msg_in, nsym, fcr=0, generator=2, erase_pos=None, only_erasures=False):
'''Reed-Solomon main decoding function'''
global field_charac
if len(msg_in) > field_charac:
# Note that it is in fact possible to encode/decode messages that are longer than field_charac, but because this will be above the field, this will generate more error positions during Chien Search than it should, because this will generate duplicate values, which should normally be prevented thank's to the prime polynomial reduction (eg, because it can't discriminate between error at position 1 or 256, both being exactly equal under galois field 2^8). So it's really not advised to do it, but it's possible (but then you're not guaranted to be able to correct any error/erasure on symbols with a position above the length of field_charac -- if you really need a bigger message without chunking, then you should better enlarge c_exp so that you get a bigger field).
raise ValueError("Message is too long (%i when max is %i)" % (len(msg_in), field_charac))
msg_out = bytearray(msg_in) # copy of message
# erasures: set them to null bytes for easier decoding (but this is not necessary, they will be corrected anyway, but debugging will be easier with null bytes because the error locator polynomial values will only depend on the errors locations, not their values)
if erase_pos is None:
erase_pos = []
else:
for e_pos in erase_pos:
msg_out[e_pos] = 0
# check if there are too many erasures to correct (beyond the Singleton bound)
if len(erase_pos) > nsym: raise ReedSolomonError("Too many erasures to correct")
# prepare the syndrome polynomial using only errors (ie: errors = characters that were either replaced by null byte or changed to another character, but we don't know their positions)
synd = rs_calc_syndromes(msg_out, nsym, fcr, generator)
# check if there's any error/erasure in the input codeword. If not (all syndromes coefficients are 0), then just return the codeword as-is.
if max(synd) == 0:
return msg_out[:-nsym], msg_out[-nsym:] # no errors
# Find errors locations
if only_erasures:
err_pos = []
else:
# compute the Forney syndromes, which hide the erasures from the original syndrome (so that BM will just have to deal with errors, not erasures)
fsynd = rs_forney_syndromes(synd, erase_pos, len(msg_out), generator)
# compute the error locator polynomial using Berlekamp-Massey
err_loc = rs_find_error_locator(fsynd, nsym, erase_count=len(erase_pos))
# locate the message errors using Chien search (or bruteforce search)
err_pos = rs_find_errors(err_loc[::-1], len(msg_out), generator)
if err_pos is None:
raise ReedSolomonError("Could not locate error")
# Find errors values and apply them to correct the message
# compute errata evaluator and errata magnitude polynomials, then correct errors and erasures
msg_out = rs_correct_errata(msg_out, synd, (erase_pos + err_pos), fcr, generator) # note that we here use the original syndrome, not the forney syndrome (because we will correct both errors and erasures, so we need the full syndrome)
# check if the final message is fully repaired
synd = rs_calc_syndromes(msg_out, nsym, fcr, generator)
if max(synd) > 0:
raise ReedSolomonError("Could not correct message")
# return the successfully decoded message
return msg_out[:-nsym], msg_out[-nsym:]
|
python
|
def rs_correct_msg(msg_in, nsym, fcr=0, generator=2, erase_pos=None, only_erasures=False):
'''Reed-Solomon main decoding function'''
global field_charac
if len(msg_in) > field_charac:
# Note that it is in fact possible to encode/decode messages that are longer than field_charac, but because this will be above the field, this will generate more error positions during Chien Search than it should, because this will generate duplicate values, which should normally be prevented thank's to the prime polynomial reduction (eg, because it can't discriminate between error at position 1 or 256, both being exactly equal under galois field 2^8). So it's really not advised to do it, but it's possible (but then you're not guaranted to be able to correct any error/erasure on symbols with a position above the length of field_charac -- if you really need a bigger message without chunking, then you should better enlarge c_exp so that you get a bigger field).
raise ValueError("Message is too long (%i when max is %i)" % (len(msg_in), field_charac))
msg_out = bytearray(msg_in) # copy of message
# erasures: set them to null bytes for easier decoding (but this is not necessary, they will be corrected anyway, but debugging will be easier with null bytes because the error locator polynomial values will only depend on the errors locations, not their values)
if erase_pos is None:
erase_pos = []
else:
for e_pos in erase_pos:
msg_out[e_pos] = 0
# check if there are too many erasures to correct (beyond the Singleton bound)
if len(erase_pos) > nsym: raise ReedSolomonError("Too many erasures to correct")
# prepare the syndrome polynomial using only errors (ie: errors = characters that were either replaced by null byte or changed to another character, but we don't know their positions)
synd = rs_calc_syndromes(msg_out, nsym, fcr, generator)
# check if there's any error/erasure in the input codeword. If not (all syndromes coefficients are 0), then just return the codeword as-is.
if max(synd) == 0:
return msg_out[:-nsym], msg_out[-nsym:] # no errors
# Find errors locations
if only_erasures:
err_pos = []
else:
# compute the Forney syndromes, which hide the erasures from the original syndrome (so that BM will just have to deal with errors, not erasures)
fsynd = rs_forney_syndromes(synd, erase_pos, len(msg_out), generator)
# compute the error locator polynomial using Berlekamp-Massey
err_loc = rs_find_error_locator(fsynd, nsym, erase_count=len(erase_pos))
# locate the message errors using Chien search (or bruteforce search)
err_pos = rs_find_errors(err_loc[::-1], len(msg_out), generator)
if err_pos is None:
raise ReedSolomonError("Could not locate error")
# Find errors values and apply them to correct the message
# compute errata evaluator and errata magnitude polynomials, then correct errors and erasures
msg_out = rs_correct_errata(msg_out, synd, (erase_pos + err_pos), fcr, generator) # note that we here use the original syndrome, not the forney syndrome (because we will correct both errors and erasures, so we need the full syndrome)
# check if the final message is fully repaired
synd = rs_calc_syndromes(msg_out, nsym, fcr, generator)
if max(synd) > 0:
raise ReedSolomonError("Could not correct message")
# return the successfully decoded message
return msg_out[:-nsym], msg_out[-nsym:]
|
[
"def",
"rs_correct_msg",
"(",
"msg_in",
",",
"nsym",
",",
"fcr",
"=",
"0",
",",
"generator",
"=",
"2",
",",
"erase_pos",
"=",
"None",
",",
"only_erasures",
"=",
"False",
")",
":",
"global",
"field_charac",
"if",
"len",
"(",
"msg_in",
")",
">",
"field_charac",
":",
"# Note that it is in fact possible to encode/decode messages that are longer than field_charac, but because this will be above the field, this will generate more error positions during Chien Search than it should, because this will generate duplicate values, which should normally be prevented thank's to the prime polynomial reduction (eg, because it can't discriminate between error at position 1 or 256, both being exactly equal under galois field 2^8). So it's really not advised to do it, but it's possible (but then you're not guaranted to be able to correct any error/erasure on symbols with a position above the length of field_charac -- if you really need a bigger message without chunking, then you should better enlarge c_exp so that you get a bigger field).",
"raise",
"ValueError",
"(",
"\"Message is too long (%i when max is %i)\"",
"%",
"(",
"len",
"(",
"msg_in",
")",
",",
"field_charac",
")",
")",
"msg_out",
"=",
"bytearray",
"(",
"msg_in",
")",
"# copy of message",
"# erasures: set them to null bytes for easier decoding (but this is not necessary, they will be corrected anyway, but debugging will be easier with null bytes because the error locator polynomial values will only depend on the errors locations, not their values)",
"if",
"erase_pos",
"is",
"None",
":",
"erase_pos",
"=",
"[",
"]",
"else",
":",
"for",
"e_pos",
"in",
"erase_pos",
":",
"msg_out",
"[",
"e_pos",
"]",
"=",
"0",
"# check if there are too many erasures to correct (beyond the Singleton bound)",
"if",
"len",
"(",
"erase_pos",
")",
">",
"nsym",
":",
"raise",
"ReedSolomonError",
"(",
"\"Too many erasures to correct\"",
")",
"# prepare the syndrome polynomial using only errors (ie: errors = characters that were either replaced by null byte or changed to another character, but we don't know their positions)",
"synd",
"=",
"rs_calc_syndromes",
"(",
"msg_out",
",",
"nsym",
",",
"fcr",
",",
"generator",
")",
"# check if there's any error/erasure in the input codeword. If not (all syndromes coefficients are 0), then just return the codeword as-is.",
"if",
"max",
"(",
"synd",
")",
"==",
"0",
":",
"return",
"msg_out",
"[",
":",
"-",
"nsym",
"]",
",",
"msg_out",
"[",
"-",
"nsym",
":",
"]",
"# no errors",
"# Find errors locations",
"if",
"only_erasures",
":",
"err_pos",
"=",
"[",
"]",
"else",
":",
"# compute the Forney syndromes, which hide the erasures from the original syndrome (so that BM will just have to deal with errors, not erasures)",
"fsynd",
"=",
"rs_forney_syndromes",
"(",
"synd",
",",
"erase_pos",
",",
"len",
"(",
"msg_out",
")",
",",
"generator",
")",
"# compute the error locator polynomial using Berlekamp-Massey",
"err_loc",
"=",
"rs_find_error_locator",
"(",
"fsynd",
",",
"nsym",
",",
"erase_count",
"=",
"len",
"(",
"erase_pos",
")",
")",
"# locate the message errors using Chien search (or bruteforce search)",
"err_pos",
"=",
"rs_find_errors",
"(",
"err_loc",
"[",
":",
":",
"-",
"1",
"]",
",",
"len",
"(",
"msg_out",
")",
",",
"generator",
")",
"if",
"err_pos",
"is",
"None",
":",
"raise",
"ReedSolomonError",
"(",
"\"Could not locate error\"",
")",
"# Find errors values and apply them to correct the message",
"# compute errata evaluator and errata magnitude polynomials, then correct errors and erasures",
"msg_out",
"=",
"rs_correct_errata",
"(",
"msg_out",
",",
"synd",
",",
"(",
"erase_pos",
"+",
"err_pos",
")",
",",
"fcr",
",",
"generator",
")",
"# note that we here use the original syndrome, not the forney syndrome (because we will correct both errors and erasures, so we need the full syndrome)",
"# check if the final message is fully repaired",
"synd",
"=",
"rs_calc_syndromes",
"(",
"msg_out",
",",
"nsym",
",",
"fcr",
",",
"generator",
")",
"if",
"max",
"(",
"synd",
")",
">",
"0",
":",
"raise",
"ReedSolomonError",
"(",
"\"Could not correct message\"",
")",
"# return the successfully decoded message",
"return",
"msg_out",
"[",
":",
"-",
"nsym",
"]",
",",
"msg_out",
"[",
"-",
"nsym",
":",
"]"
] |
Reed-Solomon main decoding function
|
[
"Reed",
"-",
"Solomon",
"main",
"decoding",
"function"
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/reedsolomon/reedsolo.py#L622-L665
|
train
|
Correct a message using the Chien Search algorithm.
|
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_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_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(1699 - 1651) + '\157' + chr(98 - 43) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\060', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + chr(0b1010 + 0o55), ord("\x08")), nzTpIcepk0o8(chr(0b10 + 0o56) + '\x6f' + chr(0b1011 + 0o50) + chr(0b110110) + '\060', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + chr(52) + chr(2519 - 2468), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(207 - 159), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(108 - 57) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(1647 - 1599) + '\x6f' + chr(53) + chr(0b110111), 33494 - 33486), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\x6f' + chr(0b10001 + 0o45) + '\063', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(2314 - 2203) + '\x33' + '\064' + '\061', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\064', 0b1000), nzTpIcepk0o8(chr(510 - 462) + chr(1449 - 1338) + '\063' + chr(0b1110 + 0o43) + chr(0b1100 + 0o51), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b10 + 0o61) + '\x37' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + chr(120 - 69) + chr(2280 - 2231) + chr(0b11 + 0o62), 8), nzTpIcepk0o8(chr(1808 - 1760) + '\157' + chr(0b110010) + chr(196 - 142) + '\064', 52921 - 52913), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + chr(51) + chr(0b110010), 54992 - 54984), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10111 + 0o32) + '\x33' + '\x32', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(7964 - 7853) + chr(705 - 655) + chr(0b110000) + chr(0b100000 + 0o21), ord("\x08")), nzTpIcepk0o8(chr(252 - 204) + chr(5966 - 5855) + '\x33' + chr(52), 0b1000), nzTpIcepk0o8(chr(305 - 257) + chr(0b10001 + 0o136) + chr(0b110000), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + chr(0b110100) + chr(1465 - 1410), 0o10), nzTpIcepk0o8('\060' + '\157' + '\x32' + chr(725 - 671) + '\x30', 38233 - 38225), nzTpIcepk0o8(chr(992 - 944) + chr(6206 - 6095) + chr(0b101011 + 0o6) + chr(2367 - 2316) + '\065', 0b1000), nzTpIcepk0o8('\x30' + chr(12185 - 12074) + '\061' + chr(0b11011 + 0o33) + '\061', 31086 - 31078), nzTpIcepk0o8(chr(914 - 866) + '\x6f' + '\063' + '\x31' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b10011 + 0o134) + chr(0b1111 + 0o44) + '\x37' + chr(53), 8), nzTpIcepk0o8(chr(48) + '\157' + chr(49) + chr(0b110100) + chr(51), 8), nzTpIcepk0o8(chr(1301 - 1253) + '\157' + '\x31' + chr(249 - 198) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101010 + 0o5) + '\062' + '\067' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(8075 - 7964) + '\061' + chr(566 - 515) + chr(0b11001 + 0o27), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\157' + '\061' + '\x35' + chr(0b110000), 15912 - 15904), nzTpIcepk0o8(chr(0b110000) + chr(8107 - 7996) + chr(0b110001) + chr(1946 - 1892) + chr(1738 - 1684), ord("\x08")), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(111) + chr(2207 - 2158) + chr(48) + chr(1292 - 1242), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\063' + chr(2301 - 2249) + chr(0b110000), 8545 - 8537), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\157' + chr(0b11011 + 0o27) + chr(2639 - 2585), 59082 - 59074), nzTpIcepk0o8('\060' + '\157' + chr(277 - 226) + '\066' + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(5744 - 5633) + chr(50) + '\061', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b10100 + 0o37) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + '\x37' + chr(1949 - 1894), 61647 - 61639), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11 + 0o57) + '\065' + '\063', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b11111 + 0o120) + chr(0b110101) + chr(48), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x17'), '\144' + chr(0b1100101) + chr(0b11101 + 0o106) + chr(0b1101111) + chr(100) + chr(0b1100101 + 0o0))(chr(6559 - 6442) + '\x74' + chr(0b111 + 0o137) + '\x2d' + chr(2532 - 2476)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def oqAJqGSZj4nd(njLB1HQ8UbxC, yKA2GO91skvs, wLDWw21nmA1I=nzTpIcepk0o8('\x30' + '\x6f' + chr(48), 8), utrvLf8Qjpjk=nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(3375 - 3264) + chr(0b110010), 57615 - 57607), v_Wbp_vl3wTC=None, Xz01uG11ClMN=nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\060', 8)):
global r2S5hBmJ_9QZ
if ftfygxgFas5X(njLB1HQ8UbxC) > r2S5hBmJ_9QZ:
raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'ted\x83\x02g\xba\x0fZ\x92$\xb9\x92\xa2\x94\xb65\xef{ \x8f\x954Q\xbd\x95\x062\x9b5\t\x0eb\x89e\xd64\xb0\xd6'), chr(0b1000101 + 0o37) + chr(2139 - 2038) + chr(0b1100011) + '\x6f' + chr(0b1100100) + '\x65')('\165' + chr(116) + chr(0b110 + 0o140) + chr(0b1111 + 0o36) + chr(0b111000)) % (ftfygxgFas5X(njLB1HQ8UbxC), r2S5hBmJ_9QZ))
V2F_8TVYpkai = MdkNqd1bagO6(njLB1HQ8UbxC)
if v_Wbp_vl3wTC is None:
v_Wbp_vl3wTC = []
else:
for KPHokFY7x6oo in v_Wbp_vl3wTC:
V2F_8TVYpkai[KPHokFY7x6oo] = nzTpIcepk0o8('\x30' + '\x6f' + chr(48), 8)
if ftfygxgFas5X(v_Wbp_vl3wTC) > yKA2GO91skvs:
raise m6bqPbBYhVl1(roI3spqORKae(ES5oEprVxulp(b'mox\xd0\x0ea\xb1V\x13\x84v\xac\x8e\xb8\xc6\xbf)\xa1ho\x87\xd32\x03\xb8\x98\x00('), '\x64' + chr(0b1100101) + chr(3533 - 3434) + '\157' + chr(0b1100100) + '\145')('\x75' + '\164' + chr(8689 - 8587) + '\055' + chr(0b111000)))
xCTaXwhNTbxS = hgTBD2NxmQJE(V2F_8TVYpkai, yKA2GO91skvs, wLDWw21nmA1I, utrvLf8Qjpjk)
if KV9ckIhroIia(xCTaXwhNTbxS) == nzTpIcepk0o8(chr(48) + chr(8955 - 8844) + chr(48), 8):
return (V2F_8TVYpkai[:-yKA2GO91skvs], V2F_8TVYpkai[-yKA2GO91skvs:])
if Xz01uG11ClMN:
C3Ywi64zGi0P = []
else:
WEr6iKSpLfWl = p53ixQRreUd0(xCTaXwhNTbxS, v_Wbp_vl3wTC, ftfygxgFas5X(V2F_8TVYpkai), utrvLf8Qjpjk)
_HnOsX5Sp56U = ZHuR8GitbwhT(WEr6iKSpLfWl, yKA2GO91skvs, erase_count=ftfygxgFas5X(v_Wbp_vl3wTC))
C3Ywi64zGi0P = saYrMW0uv6ge(_HnOsX5Sp56U[::-nzTpIcepk0o8(chr(2170 - 2122) + chr(111) + chr(0b11 + 0o56), 0b1000)], ftfygxgFas5X(V2F_8TVYpkai), utrvLf8Qjpjk)
if C3Ywi64zGi0P is None:
raise m6bqPbBYhVl1(roI3spqORKae(ES5oEprVxulp(b'zob\x9c\x07 \xb1@G\xc1h\xa2\x9e\xac\xc0\xbfz\xe4nr\xc8\xc2'), chr(100) + chr(0b11011 + 0o112) + chr(99) + chr(0b10011 + 0o134) + '\144' + '\145')(chr(0b1110101) + '\164' + '\x66' + chr(0b10111 + 0o26) + chr(56)))
V2F_8TVYpkai = xyaH5TxFejz_(V2F_8TVYpkai, xCTaXwhNTbxS, v_Wbp_vl3wTC + C3Ywi64zGi0P, wLDWw21nmA1I, utrvLf8Qjpjk)
xCTaXwhNTbxS = hgTBD2NxmQJE(V2F_8TVYpkai, yKA2GO91skvs, wLDWw21nmA1I, utrvLf8Qjpjk)
if KV9ckIhroIia(xCTaXwhNTbxS) > nzTpIcepk0o8(chr(0b110000) + chr(9109 - 8998) + chr(1279 - 1231), 8):
raise m6bqPbBYhVl1(roI3spqORKae(ES5oEprVxulp(b'zob\x9c\x07 \xb1@G\xc1g\xa2\x8f\xbf\xd1\xb9.\xa1qe\xd4\xc3<\x16\xaf'), chr(0b1011 + 0o131) + '\145' + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(9676 - 9575))('\165' + '\x74' + '\x66' + chr(594 - 549) + chr(0b11110 + 0o32)))
return (V2F_8TVYpkai[:-yKA2GO91skvs], V2F_8TVYpkai[-yKA2GO91skvs:])
|
lrq3000/pyFileFixity
|
pyFileFixity/lib/reedsolomon/reedsolo.py
|
rs_correct_msg_nofsynd
|
def rs_correct_msg_nofsynd(msg_in, nsym, fcr=0, generator=2, erase_pos=None, only_erasures=False):
'''Reed-Solomon main decoding function, without using the modified Forney syndromes'''
global field_charac
if len(msg_in) > field_charac:
raise ValueError("Message is too long (%i when max is %i)" % (len(msg_in), field_charac))
msg_out = bytearray(msg_in) # copy of message
# erasures: set them to null bytes for easier decoding (but this is not necessary, they will be corrected anyway, but debugging will be easier with null bytes because the error locator polynomial values will only depend on the errors locations, not their values)
if erase_pos is None:
erase_pos = []
else:
for e_pos in erase_pos:
msg_out[e_pos] = 0
# check if there are too many erasures
if len(erase_pos) > nsym: raise ReedSolomonError("Too many erasures to correct")
# prepare the syndrome polynomial using only errors (ie: errors = characters that were either replaced by null byte or changed to another character, but we don't know their positions)
synd = rs_calc_syndromes(msg_out, nsym, fcr, generator)
# check if there's any error/erasure in the input codeword. If not (all syndromes coefficients are 0), then just return the codeword as-is.
if max(synd) == 0:
return msg_out[:-nsym], msg_out[-nsym:] # no errors
# prepare erasures locator and evaluator polynomials
erase_loc = None
#erase_eval = None
erase_count = 0
if erase_pos:
erase_count = len(erase_pos)
erase_pos_reversed = [len(msg_out)-1-eras for eras in erase_pos]
erase_loc = rs_find_errata_locator(erase_pos_reversed, generator=generator)
#erase_eval = rs_find_error_evaluator(synd[::-1], erase_loc, len(erase_loc)-1)
# prepare errors/errata locator polynomial
if only_erasures:
err_loc = erase_loc[::-1]
#err_eval = erase_eval[::-1]
else:
err_loc = rs_find_error_locator(synd, nsym, erase_loc=erase_loc, erase_count=erase_count)
err_loc = err_loc[::-1]
#err_eval = rs_find_error_evaluator(synd[::-1], err_loc[::-1], len(err_loc)-1)[::-1] # find error/errata evaluator polynomial (not really necessary since we already compute it at the same time as the error locator poly in BM)
# locate the message errors
err_pos = rs_find_errors(err_loc, len(msg_out), generator) # find the roots of the errata locator polynomial (ie: the positions of the errors/errata)
if err_pos is None:
raise ReedSolomonError("Could not locate error")
# compute errata evaluator and errata magnitude polynomials, then correct errors and erasures
msg_out = rs_correct_errata(msg_out, synd, err_pos, fcr=fcr, generator=generator)
# check if the final message is fully repaired
synd = rs_calc_syndromes(msg_out, nsym, fcr, generator)
if max(synd) > 0:
raise ReedSolomonError("Could not correct message")
# return the successfully decoded message
return msg_out[:-nsym], msg_out[-nsym:]
|
python
|
def rs_correct_msg_nofsynd(msg_in, nsym, fcr=0, generator=2, erase_pos=None, only_erasures=False):
'''Reed-Solomon main decoding function, without using the modified Forney syndromes'''
global field_charac
if len(msg_in) > field_charac:
raise ValueError("Message is too long (%i when max is %i)" % (len(msg_in), field_charac))
msg_out = bytearray(msg_in) # copy of message
# erasures: set them to null bytes for easier decoding (but this is not necessary, they will be corrected anyway, but debugging will be easier with null bytes because the error locator polynomial values will only depend on the errors locations, not their values)
if erase_pos is None:
erase_pos = []
else:
for e_pos in erase_pos:
msg_out[e_pos] = 0
# check if there are too many erasures
if len(erase_pos) > nsym: raise ReedSolomonError("Too many erasures to correct")
# prepare the syndrome polynomial using only errors (ie: errors = characters that were either replaced by null byte or changed to another character, but we don't know their positions)
synd = rs_calc_syndromes(msg_out, nsym, fcr, generator)
# check if there's any error/erasure in the input codeword. If not (all syndromes coefficients are 0), then just return the codeword as-is.
if max(synd) == 0:
return msg_out[:-nsym], msg_out[-nsym:] # no errors
# prepare erasures locator and evaluator polynomials
erase_loc = None
#erase_eval = None
erase_count = 0
if erase_pos:
erase_count = len(erase_pos)
erase_pos_reversed = [len(msg_out)-1-eras for eras in erase_pos]
erase_loc = rs_find_errata_locator(erase_pos_reversed, generator=generator)
#erase_eval = rs_find_error_evaluator(synd[::-1], erase_loc, len(erase_loc)-1)
# prepare errors/errata locator polynomial
if only_erasures:
err_loc = erase_loc[::-1]
#err_eval = erase_eval[::-1]
else:
err_loc = rs_find_error_locator(synd, nsym, erase_loc=erase_loc, erase_count=erase_count)
err_loc = err_loc[::-1]
#err_eval = rs_find_error_evaluator(synd[::-1], err_loc[::-1], len(err_loc)-1)[::-1] # find error/errata evaluator polynomial (not really necessary since we already compute it at the same time as the error locator poly in BM)
# locate the message errors
err_pos = rs_find_errors(err_loc, len(msg_out), generator) # find the roots of the errata locator polynomial (ie: the positions of the errors/errata)
if err_pos is None:
raise ReedSolomonError("Could not locate error")
# compute errata evaluator and errata magnitude polynomials, then correct errors and erasures
msg_out = rs_correct_errata(msg_out, synd, err_pos, fcr=fcr, generator=generator)
# check if the final message is fully repaired
synd = rs_calc_syndromes(msg_out, nsym, fcr, generator)
if max(synd) > 0:
raise ReedSolomonError("Could not correct message")
# return the successfully decoded message
return msg_out[:-nsym], msg_out[-nsym:]
|
[
"def",
"rs_correct_msg_nofsynd",
"(",
"msg_in",
",",
"nsym",
",",
"fcr",
"=",
"0",
",",
"generator",
"=",
"2",
",",
"erase_pos",
"=",
"None",
",",
"only_erasures",
"=",
"False",
")",
":",
"global",
"field_charac",
"if",
"len",
"(",
"msg_in",
")",
">",
"field_charac",
":",
"raise",
"ValueError",
"(",
"\"Message is too long (%i when max is %i)\"",
"%",
"(",
"len",
"(",
"msg_in",
")",
",",
"field_charac",
")",
")",
"msg_out",
"=",
"bytearray",
"(",
"msg_in",
")",
"# copy of message",
"# erasures: set them to null bytes for easier decoding (but this is not necessary, they will be corrected anyway, but debugging will be easier with null bytes because the error locator polynomial values will only depend on the errors locations, not their values)",
"if",
"erase_pos",
"is",
"None",
":",
"erase_pos",
"=",
"[",
"]",
"else",
":",
"for",
"e_pos",
"in",
"erase_pos",
":",
"msg_out",
"[",
"e_pos",
"]",
"=",
"0",
"# check if there are too many erasures",
"if",
"len",
"(",
"erase_pos",
")",
">",
"nsym",
":",
"raise",
"ReedSolomonError",
"(",
"\"Too many erasures to correct\"",
")",
"# prepare the syndrome polynomial using only errors (ie: errors = characters that were either replaced by null byte or changed to another character, but we don't know their positions)",
"synd",
"=",
"rs_calc_syndromes",
"(",
"msg_out",
",",
"nsym",
",",
"fcr",
",",
"generator",
")",
"# check if there's any error/erasure in the input codeword. If not (all syndromes coefficients are 0), then just return the codeword as-is.",
"if",
"max",
"(",
"synd",
")",
"==",
"0",
":",
"return",
"msg_out",
"[",
":",
"-",
"nsym",
"]",
",",
"msg_out",
"[",
"-",
"nsym",
":",
"]",
"# no errors",
"# prepare erasures locator and evaluator polynomials",
"erase_loc",
"=",
"None",
"#erase_eval = None",
"erase_count",
"=",
"0",
"if",
"erase_pos",
":",
"erase_count",
"=",
"len",
"(",
"erase_pos",
")",
"erase_pos_reversed",
"=",
"[",
"len",
"(",
"msg_out",
")",
"-",
"1",
"-",
"eras",
"for",
"eras",
"in",
"erase_pos",
"]",
"erase_loc",
"=",
"rs_find_errata_locator",
"(",
"erase_pos_reversed",
",",
"generator",
"=",
"generator",
")",
"#erase_eval = rs_find_error_evaluator(synd[::-1], erase_loc, len(erase_loc)-1)",
"# prepare errors/errata locator polynomial",
"if",
"only_erasures",
":",
"err_loc",
"=",
"erase_loc",
"[",
":",
":",
"-",
"1",
"]",
"#err_eval = erase_eval[::-1]",
"else",
":",
"err_loc",
"=",
"rs_find_error_locator",
"(",
"synd",
",",
"nsym",
",",
"erase_loc",
"=",
"erase_loc",
",",
"erase_count",
"=",
"erase_count",
")",
"err_loc",
"=",
"err_loc",
"[",
":",
":",
"-",
"1",
"]",
"#err_eval = rs_find_error_evaluator(synd[::-1], err_loc[::-1], len(err_loc)-1)[::-1] # find error/errata evaluator polynomial (not really necessary since we already compute it at the same time as the error locator poly in BM)",
"# locate the message errors",
"err_pos",
"=",
"rs_find_errors",
"(",
"err_loc",
",",
"len",
"(",
"msg_out",
")",
",",
"generator",
")",
"# find the roots of the errata locator polynomial (ie: the positions of the errors/errata)",
"if",
"err_pos",
"is",
"None",
":",
"raise",
"ReedSolomonError",
"(",
"\"Could not locate error\"",
")",
"# compute errata evaluator and errata magnitude polynomials, then correct errors and erasures",
"msg_out",
"=",
"rs_correct_errata",
"(",
"msg_out",
",",
"synd",
",",
"err_pos",
",",
"fcr",
"=",
"fcr",
",",
"generator",
"=",
"generator",
")",
"# check if the final message is fully repaired",
"synd",
"=",
"rs_calc_syndromes",
"(",
"msg_out",
",",
"nsym",
",",
"fcr",
",",
"generator",
")",
"if",
"max",
"(",
"synd",
")",
">",
"0",
":",
"raise",
"ReedSolomonError",
"(",
"\"Could not correct message\"",
")",
"# return the successfully decoded message",
"return",
"msg_out",
"[",
":",
"-",
"nsym",
"]",
",",
"msg_out",
"[",
"-",
"nsym",
":",
"]"
] |
Reed-Solomon main decoding function, without using the modified Forney syndromes
|
[
"Reed",
"-",
"Solomon",
"main",
"decoding",
"function",
"without",
"using",
"the",
"modified",
"Forney",
"syndromes"
] |
fd5ef23bb13835faf1e3baa773619b86a1cc9bdf
|
https://github.com/lrq3000/pyFileFixity/blob/fd5ef23bb13835faf1e3baa773619b86a1cc9bdf/pyFileFixity/lib/reedsolomon/reedsolo.py#L667-L719
|
train
|
This function is used to correct the message using the modified Forney syndromes.
|
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M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M,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(0b1010 + 0o46) + chr(0b100101 + 0o112) + chr(2756 - 2702) + '\063', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b11011 + 0o124) + chr(0b110001) + chr(0b110111) + chr(50), 0b1000), nzTpIcepk0o8(chr(493 - 445) + '\157' + '\x35' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b100111 + 0o110) + '\x32' + chr(0b10 + 0o63) + chr(48), 35385 - 35377), nzTpIcepk0o8('\x30' + chr(4522 - 4411) + chr(0b110001) + chr(0b1110 + 0o47) + '\x34', 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\063' + '\x35' + chr(48), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(1826 - 1715) + chr(0b0 + 0o63) + chr(0b110001 + 0o4) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2325 - 2274) + chr(722 - 669) + '\x32', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2181 - 2132) + '\x37' + chr(525 - 472), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b10 + 0o57) + chr(54) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(1769 - 1721) + chr(0b110100 + 0o73) + chr(0b110011) + '\067' + '\062', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b10000 + 0o43) + '\x31' + chr(1698 - 1648), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + '\x37' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101 + 0o142) + chr(49) + chr(519 - 470) + chr(0b110000 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(608 - 560) + chr(111) + chr(0b110101 + 0o2) + chr(51), 12054 - 12046), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + chr(52), 0o10), nzTpIcepk0o8('\060' + chr(5962 - 5851) + chr(0b110010) + chr(2700 - 2645) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(1843 - 1795) + chr(111) + chr(49) + chr(0b110010), 58998 - 58990), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1326 - 1277) + '\x37' + chr(1389 - 1334), ord("\x08")), nzTpIcepk0o8(chr(1212 - 1164) + '\x6f' + chr(0b110100) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + chr(0b110011) + '\x31', 0o10), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(111) + chr(1973 - 1923) + chr(0b1111 + 0o46) + chr(0b101101 + 0o4), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(11610 - 11499) + '\x32' + '\x31' + chr(52), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b101011 + 0o6) + '\066' + chr(50), 0o10), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b1010000 + 0o37) + chr(51) + chr(2046 - 1992) + chr(1624 - 1573), ord("\x08")), nzTpIcepk0o8(chr(1796 - 1748) + chr(0b1101111) + '\x33' + '\067' + chr(51), 27118 - 27110), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10111 + 0o37) + chr(52), 0o10), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(0b10110 + 0o131) + '\x36' + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(334 - 283) + chr(51) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(1408 - 1360) + '\157' + chr(0b110010) + chr(0b11100 + 0o27) + '\x36', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\062' + '\x34' + chr(0b10000 + 0o45), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b110000 + 0o77) + '\061' + chr(0b10011 + 0o35) + chr(2917 - 2862), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1901 - 1852) + chr(0b101 + 0o53) + chr(0b110100), 30148 - 30140), nzTpIcepk0o8('\060' + '\157' + chr(700 - 649) + chr(0b1011 + 0o47) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(53) + chr(0b1110 + 0o50), 0o10), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b1011100 + 0o23) + chr(0b111 + 0o53) + '\x35', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + chr(554 - 503) + chr(2506 - 2451), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\061' + '\060' + '\063', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2484 - 2429) + '\x32', 0b1000), nzTpIcepk0o8(chr(1960 - 1912) + '\157' + '\062' + chr(0b10111 + 0o31) + '\x34', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\157' + '\x35' + '\x30', 30203 - 30195)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x1d'), chr(0b110011 + 0o61) + chr(101) + '\x63' + chr(111) + '\144' + chr(0b10100 + 0o121))('\165' + chr(0b1110100) + chr(515 - 413) + chr(0b101101) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def x1Kc4sjHlcCp(njLB1HQ8UbxC, yKA2GO91skvs, wLDWw21nmA1I=nzTpIcepk0o8(chr(878 - 830) + chr(7936 - 7825) + chr(48), 0o10), utrvLf8Qjpjk=nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1101111) + '\x32', 0b1000), v_Wbp_vl3wTC=None, Xz01uG11ClMN=nzTpIcepk0o8('\x30' + '\x6f' + '\060', 8)):
global r2S5hBmJ_9QZ
if ftfygxgFas5X(njLB1HQ8UbxC) > r2S5hBmJ_9QZ:
raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'~\x1f^\xdb\r\x8f\x8b\xca\x14\x07\xda\xbe\xd0$\x1bp\xd3d\x18\x00q\x8c\xe5R\x84\x93Q\\\xf8\xf3\xc4?d\xbf\x1d5\xfa*\x13'), chr(100) + '\145' + chr(0b1000101 + 0o36) + '\157' + '\x64' + chr(3730 - 3629))('\x75' + chr(0b10011 + 0o141) + '\146' + chr(0b100101 + 0o10) + '\x38') % (ftfygxgFas5X(njLB1HQ8UbxC), r2S5hBmJ_9QZ))
V2F_8TVYpkai = MdkNqd1bagO6(njLB1HQ8UbxC)
if v_Wbp_vl3wTC is None:
v_Wbp_vl3wTC = []
else:
for KPHokFY7x6oo in v_Wbp_vl3wTC:
V2F_8TVYpkai[KPHokFY7x6oo] = nzTpIcepk0o8(chr(48) + chr(111) + chr(2271 - 2223), 8)
if ftfygxgFas5X(v_Wbp_vl3wTC) > yKA2GO91skvs:
raise m6bqPbBYhVl1(roI3spqORKae(ES5oEprVxulp(b'g\x15B\x88\x01\x89\x80\x93]\x11\x88\xab\xcc>Iy\xcf*\x0bOy\xca\xe3\x00\x81\x9eWF'), '\x64' + '\145' + chr(0b10 + 0o141) + chr(10081 - 9970) + chr(4177 - 4077) + '\145')('\165' + chr(0b1110100) + chr(0b1100110) + chr(45) + chr(0b110111 + 0o1)))
xCTaXwhNTbxS = hgTBD2NxmQJE(V2F_8TVYpkai, yKA2GO91skvs, wLDWw21nmA1I, utrvLf8Qjpjk)
if KV9ckIhroIia(xCTaXwhNTbxS) == nzTpIcepk0o8(chr(877 - 829) + chr(2553 - 2442) + chr(48), 8):
return (V2F_8TVYpkai[:-yKA2GO91skvs], V2F_8TVYpkai[-yKA2GO91skvs:])
iR4sM24MmyhC = None
SpAAi3pFECfq = nzTpIcepk0o8('\060' + chr(0b1001100 + 0o43) + '\x30', 8)
if v_Wbp_vl3wTC:
SpAAi3pFECfq = ftfygxgFas5X(v_Wbp_vl3wTC)
TL18xW1Tb0PK = [ftfygxgFas5X(V2F_8TVYpkai) - nzTpIcepk0o8(chr(1278 - 1230) + chr(3831 - 3720) + chr(0b1101 + 0o44), ord("\x08")) - XDCLD85iZo92 for XDCLD85iZo92 in v_Wbp_vl3wTC]
iR4sM24MmyhC = f02JaLeFX9z9(TL18xW1Tb0PK, generator=utrvLf8Qjpjk)
if Xz01uG11ClMN:
_HnOsX5Sp56U = iR4sM24MmyhC[::-nzTpIcepk0o8('\060' + '\157' + chr(0b110001), 8)]
else:
_HnOsX5Sp56U = ZHuR8GitbwhT(xCTaXwhNTbxS, yKA2GO91skvs, erase_loc=iR4sM24MmyhC, erase_count=SpAAi3pFECfq)
_HnOsX5Sp56U = _HnOsX5Sp56U[::-nzTpIcepk0o8('\x30' + chr(0b101011 + 0o104) + chr(49), 8)]
C3Ywi64zGi0P = saYrMW0uv6ge(_HnOsX5Sp56U, ftfygxgFas5X(V2F_8TVYpkai), utrvLf8Qjpjk)
if C3Ywi64zGi0P is None:
raise m6bqPbBYhVl1(roI3spqORKae(ES5oEprVxulp(b'p\x15X\xc4\x08\xc8\x80\x85\tT\x96\xa5\xdc*Oy\x9co\rR6\xdb'), '\144' + '\145' + chr(0b1100011) + '\157' + '\144' + chr(3194 - 3093))(chr(0b101011 + 0o112) + '\x74' + chr(0b1100110) + '\055' + chr(1739 - 1683)))
V2F_8TVYpkai = xyaH5TxFejz_(V2F_8TVYpkai, xCTaXwhNTbxS, C3Ywi64zGi0P, fcr=wLDWw21nmA1I, generator=utrvLf8Qjpjk)
xCTaXwhNTbxS = hgTBD2NxmQJE(V2F_8TVYpkai, yKA2GO91skvs, wLDWw21nmA1I, utrvLf8Qjpjk)
if KV9ckIhroIia(xCTaXwhNTbxS) > nzTpIcepk0o8(chr(0b1001 + 0o47) + '\x6f' + chr(1961 - 1913), 8):
raise m6bqPbBYhVl1(roI3spqORKae(ES5oEprVxulp(b'p\x15X\xc4\x08\xc8\x80\x85\tT\x99\xa5\xcd9^\x7f\xc8*\x12E*\xda\xed\x15\x96'), chr(100) + chr(0b1100101) + chr(0b1011 + 0o130) + chr(111) + chr(1539 - 1439) + '\145')('\165' + chr(116) + chr(0b1001111 + 0o27) + chr(45) + chr(56)))
return (V2F_8TVYpkai[:-yKA2GO91skvs], V2F_8TVYpkai[-yKA2GO91skvs:])
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.