Esempio n. 1
0
# you can use difflib if you wish
# also the set, order, keyboard group theory
with open("ErrorAlien.log","r") as f**k:
    f****e=list(filter((lambda x : x!= "") , f**k.read().split("\n")))[-4:]
    bird=list(enumerate(f****e))
    print(bird)
    nameOfSubject=f****e[1]
    lineOfTrouble=f****e[2]
    errorCode=f****e[3]
    extractName=re.findall(r'File "[^"]+',nameOfSubject)[0][6:]
    extractNumber=re.findall(r'", line \d*',nameOfSubject)[0][8:]
    print (extractName)
    print (extractNumber)
    extractMissingName=re.findall(r"[^']+'$",errorCode)[0][:-1]
    print (extractMissingName)
    candidateList=letIt()
    print(candidateList)
    consult=(lambda x:list(enumerate(x)))
    processFuck=list(map((lambda x: diff(x,extractMissingName)),candidateList))
    process=list(map((lambda x : max(list(map((lambda y:len(y)),x)))/len(x) ),processFuck))
    sortOfShit=list(map((lambda x:consult(x)),[processFuck,process]))
    print(sortOfShit[0])
    print(sortOfShit[1])
    getCandidateRank=list(sorted(sortOfShit[1],key=(lambda x:x[1])))
    print(getCandidateRank)
    getLastTwo=list(reversed(list(map((lambda x:x[0]),getCandidateRank[-2:]))))
    print(getLastTwo)
    getCandidate=list(map((lambda x:candidateList[x]),getLastTwo))
    print(getCandidate)
    snapshot(extractName[:-3]+"_fixed.py",extractName,extractMissingName,getCandidate[0],int(extractNumber))
#    print(processFuck)
Esempio n. 2
0
def seekAWrapper(initialFactor):
    correction=letIt()
    # maybe need another fix if wanted to parse file under subdirectory
    return seekOn([initialFactor],[],correction)