1
0
forked from tdwojak/Python2018

rozwiazanie cw5

This commit is contained in:
Andrea Góralczyk 2018-06-02 20:23:24 +00:00
parent 776abbce40
commit 2f180bdafd

17
labs04/cw5.py Normal file
View File

@ -0,0 +1,17 @@
import glob
sciezka = "/home/andrea/Pulpit/scores/model.iter*.npz.bleu"
for file in glob.glob(sciezka):
with open(file, 'r') as plik:
for line in plik.readlines():
bleu = float(line[line.find("=")+ 1:line.find(",")])
if bleu >0:
max = bleu
maxi = file
plik.close()
print ( maxi )