Updating scripts.
This commit is contained in:
parent
cb02143c2f
commit
9bfc0a816f
|
@ -14,6 +14,8 @@ def getdata(filename):
|
||||||
ourdir=os.path.dirname(os.path.realpath(__file__))
|
ourdir=os.path.dirname(os.path.realpath(__file__))
|
||||||
answer = []
|
answer = []
|
||||||
for file in os.listdir(ourdir):
|
for file in os.listdir(ourdir):
|
||||||
|
if file.startswith("all"):
|
||||||
|
continue
|
||||||
if file.endswith(".table"):
|
if file.endswith(".table"):
|
||||||
fullpath = os.path.join(ourdir, file)
|
fullpath = os.path.join(ourdir, file)
|
||||||
answer.append([file[:-11]]+getdata(fullpath))
|
answer.append([file[:-11]]+getdata(fullpath))
|
||||||
|
@ -21,3 +23,6 @@ print("#simdjson RapidJSON sajson")
|
||||||
answer.sort()
|
answer.sort()
|
||||||
for l in answer:
|
for l in answer:
|
||||||
print("\t".join(map(str,l)))
|
print("\t".join(map(str,l)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
import os
|
import os
|
||||||
import csv
|
import csv
|
||||||
import pandas as pd
|
|
||||||
|
try: import pandas as pd
|
||||||
|
except ImportError:
|
||||||
|
import pip
|
||||||
|
pip.main(['install', '--user', 'pandas'])
|
||||||
|
import pandas as pd
|
||||||
|
|
||||||
def getdata(filename):
|
def getdata(filename):
|
||||||
df = pd.read_csv(filename, delim_whitespace=True)
|
df = pd.read_csv(filename, delim_whitespace=True)
|
||||||
|
@ -9,6 +14,8 @@ def getdata(filename):
|
||||||
ourdir=os.path.dirname(os.path.realpath(__file__))
|
ourdir=os.path.dirname(os.path.realpath(__file__))
|
||||||
answer = []
|
answer = []
|
||||||
for file in os.listdir(ourdir):
|
for file in os.listdir(ourdir):
|
||||||
|
if file.startswith("all"):
|
||||||
|
continue
|
||||||
if file.endswith(".table"):
|
if file.endswith(".table"):
|
||||||
fullpath = os.path.join(ourdir, file)
|
fullpath = os.path.join(ourdir, file)
|
||||||
answer.append([file[:-11]]+getdata(fullpath))
|
answer.append([file[:-11]]+getdata(fullpath))
|
||||||
|
@ -16,3 +23,6 @@ print("#simdjson RapidJSON sajson")
|
||||||
answer.sort()
|
answer.sort()
|
||||||
for l in answer:
|
for l in answer:
|
||||||
print("\t".join(map(str,l)))
|
print("\t".join(map(str,l)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue