scratch/2021-08-18/nichol_help/main.py

15 lines
293 B
Python
Raw Normal View History

2022-06-07 18:05:34 +00:00
import re;
def main():
file = open("anova_rf-0.txt", "r")
val_acc_rgx = re.compile("val_acc:\s\d\.\d{4}")
for line in file.readlines():
m = val_acc_rgx.search(line)
if m:
print(float(m.group(0).split(" ")[1]))
if __name__ == "__main__":
main()