Skip to content

Commit c16ecd5

Browse files
committed
A
1 parent 9bfc0a8 commit c16ecd5

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

jsonchecker/pass14.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"string with backandquote \\\"":1, "string with back\\":2}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import os
2+
import csv
3+
4+
try: import pandas as pd
5+
except ImportError:
6+
import pip
7+
pip.main(['install', '--user', 'pandas'])
8+
import pandas as pd
9+
10+
def getdata(filename):
11+
df = pd.read_csv(filename, delim_whitespace=True)
12+
return (df["gb_per_s"].tolist())
13+
14+
ourdir=os.path.dirname(os.path.realpath(__file__))
15+
answer = []
16+
for file in os.listdir(ourdir):
17+
if file.startswith("all") and file.endswith(".table"):
18+
fullpath = os.path.join(ourdir, file)
19+
answer.append([file[3:-11]]+getdata(fullpath))
20+
print(" \t&\t simdjson \t&\t RapidJSON \t&\t RapidJSONinsitu \t&\t sajsondyn \t&\t sajson \t&\t dropbox-json11 \t&\t fastjson \t&\t gason \t&\t ultrajson \t&\t jsmn\t&\t cJSON \\\\")
21+
answer.sort()
22+
for l in answer:
23+
print("\t&\t".join(map(lambda x : (('{:.2f}'.format(x) if x < 1 else '{:.1f}'.format(x) ) if (type(x) is float) else x),l))+"\\\\")

0 commit comments

Comments
 (0)