def comp_now(mn): list1 = now_ddlist(mn) mdic = get_mdic() com_res = {} res = {} for i in mdic.keys(): if abs(len(mdic[i])-len(list1))<= 5: com_res.update({i:marco_comp(list1,mdic[i])}) for j in com_res.keys(): if com_res[j] >0.5: res.update({j:com_res[j]}) return res
def pred_now(mn): list1 = now_ddlist(mn) mdic = get_mdic() mr = get_allresult() mo = get_iodds() com_res = {} res = {} for i in mdic.keys(): if abs(len(mdic[i])-len(list1))<= 10: com_res.update({i:marco_comp(list1,mdic[i])}) for j in com_res.keys(): if com_res[j] >0.5: res.update({j:res_jud(mres(mr[j]),float(mo[j]))}) return res