Skip to content

Instantly share code, notes, and snippets.

@ttm
Created April 20, 2019 16:54
Show Gist options
  • Save ttm/dab78c2dc94b05034708c1acc61b409c to your computer and use it in GitHub Desktop.
Save ttm/dab78c2dc94b05034708c1acc61b409c to your computer and use it in GitHub Desktop.
import json, os
fname = '../server/mlpb/input/input-moreno.json'
with open(fname, 'r') as f:
c = json.load(f)
c['directory'] = '../server/mlpb/abacaxi'
c['input'] = '../server/mlpb/input/moreno.ncol'
fname2 = '../server/mlpb/input/input-moreno2.json'
with open(fname2, 'w') as f:
json.dump(c, f)
os.system('python ../server/mlpb/coarsening.py -cnf ' + fname2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment