import json

def import_json(path):
    with open(path) as data_file:    
        return json.load(data_file)
        
# Import all files.
results_v = import_json('results_v.json')['runs']
results_nodict = import_json('results_nodict.json')['runs']
results_nodict_mcr = import_json('results_nodict_mcr.json')['runs']
results_nodict_mcr_fixed = import_json('results_nodict_mcr_fixed.json')['runs']
results_v_mcr = import_json('results_v_mcr.json')['runs']

# Produce CSV.
results = "Password, Default, Default T, HAPSL, HAPSL T, MCR, MCR T, MCR (fixed), MCR (fixed) T, MCR (HAPSL), MCR (HAPSL) T\n"
for i in range(0, 100000):
    results += results_v[i]['password']
    results += ", "
    results += str(results_nodict[i]['valid'])
    results += ", "
    results += str(results_nodict[i]['time'])
    results += ", "
    results += str(results_v[i]['valid'])
    results += ", "
    results += str(results_v[i]['time'])
    results += ", "
    results += str(results_nodict_mcr[i]['valid'])
    results += ", "
    results += str(results_nodict_mcr[i]['time'])
    results += ", "
    results += str(results_nodict_mcr_fixed[i]['valid'])
    results += ", "
    results += str(results_nodict_mcr_fixed[i]['time'])
    results += ", "
    results += str(results_v_mcr[i]['valid'])
    results += ", "
    results += str(results_v_mcr[i]['time'])
    results += "\n"

# Write CSV out.    
open('results.csv', 'w').write(results)

@@ -29,16 +29,167 @@
 (path):%0A
+    %22%22%22Decodes and returns the JSON object in the file at the specified path.%0A%09%0A    Args:%0A        path (str): The path of the file to read.%0A%09%09%0A    %22%22%22%0A
     with
@@ -598,16 +598,82 @@
 %5B'runs'%5D
+%0Aresults_v_basic16 = import_json('results_v_basic16.json')%5B'runs'%5D
 %0A%0A# Prod
@@ -802,16 +802,36 @@
  (HAPSL)
+ T, Basic16, Basic16
  T%5Cn%22%0Afo
@@ -1568,32 +1568,171 @@
 mcr%5Bi%5D%5B'time'%5D)%0A
+    results += %22, %22%0A    results += str(results_v_basic16%5Bi%5D%5B'valid'%5D)%0A    results += %22, %22%0A    results += str(results_v_basic16%5Bi%5D%5B'time'%5D)%0A
     results += %22

Update CSV script to import basic16 results