script cleanup
This commit is contained in:
parent
70becaf24e
commit
dec213d4b0
@ -1,15 +1,13 @@
|
|||||||
import json, re, os
|
import json, re, os
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
fileList = [
|
fileList = [
|
||||||
"diffphys-code-burgers.ipynb", "diffphys-code-sol.ipynb", "physicalloss-code.ipynb", # TF
|
"diffphys-code-burgers.ipynb", "diffphys-code-sol.ipynb", "physicalloss-code.ipynb", # TF
|
||||||
"bayesian-code.ipynb", "supervised-airfoils.ipynb" # pytorch
|
"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:
|
for fnOut in fileList:
|
||||||
fn = fnOut[:-5] + "bak"
|
fn = fnOut[:-5] + "bak"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import json
|
import json
|
||||||
|
# for spell checking single files
|
||||||
|
|
||||||
fnOut="temp_reduced.txt"
|
fnOut="temp_reduced.txt"
|
||||||
|
|
||||||
#fn="t.json"
|
|
||||||
fn="temp.txt"
|
fn="temp.txt"
|
||||||
with open(fn) as file:
|
with open(fn) as file:
|
||||||
d = json.load(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() ):
|
if( 'image/png' in d[t][i]["outputs"][j]["data"].keys() ):
|
||||||
d[t][i]["outputs"][j]["data"]['image/png'] = ""
|
d[t][i]["outputs"][j]["data"]['image/png'] = ""
|
||||||
|
|
||||||
#print(d["cells"])
|
|
||||||
|
|
||||||
with open(fnOut,'w') as fileOut:
|
with open(fnOut,'w') as fileOut:
|
||||||
json.dump(d,fileOut, indent=1, sort_keys=True)
|
json.dump(d,fileOut, indent=1, sort_keys=True)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user