script cleanup

This commit is contained in:
NT 2021-06-30 19:35:47 +02:00
parent 70becaf24e
commit dec213d4b0
2 changed files with 3 additions and 7 deletions

View File

@ -1,15 +1,13 @@
import json, re, os
fileList = [
"diffphys-code-burgers.ipynb", "diffphys-code-sol.ipynb", "physicalloss-code.ipynb", # TF
"bayesian-code.ipynb", "supervised-airfoils.ipynb" # pytorch
]
fileList = [ "diffphys-code-burgers.ipynb"] # debug
#fileList = [ "diffphys-code-burgers.ipynb"] # debug
# shorten "0.008612174447657694, 0.02584669669548606, 0.043136357266407785"
# shorten data line: "0.008612174447657694, 0.02584669669548606, 0.043136357266407785"
for fnOut in fileList:
fn = fnOut[:-5] + "bak"

View File

@ -1,8 +1,8 @@
import json
# for spell checking single files
fnOut="temp_reduced.txt"
#fn="t.json"
fn="temp.txt"
with open(fn) as file:
d = json.load(file)
@ -34,8 +34,6 @@ for i in range(len(d[t])):
if( 'image/png' in d[t][i]["outputs"][j]["data"].keys() ):
d[t][i]["outputs"][j]["data"]['image/png'] = ""
#print(d["cells"])
with open(fnOut,'w') as fileOut:
json.dump(d,fileOut, indent=1, sort_keys=True)