forked from tdwojak/Python2018
rozwiazanie cw5
This commit is contained in:
parent
776abbce40
commit
2f180bdafd
17
labs04/cw5.py
Normal file
17
labs04/cw5.py
Normal 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 )
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user