Skip to content

Commit 9bfc0a8

Browse files
committed
Updating scripts.
1 parent cb02143 commit 9bfc0a8

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

scripts/data/nuc/pasteandrotate.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,15 @@ def getdata(filename):
1414
ourdir=os.path.dirname(os.path.realpath(__file__))
1515
answer = []
1616
for file in os.listdir(ourdir):
17+
if file.startswith("all"):
18+
continue
1719
if file.endswith(".table"):
1820
fullpath = os.path.join(ourdir, file)
1921
answer.append([file[:-11]]+getdata(fullpath))
2022
print("#simdjson RapidJSON sajson")
2123
answer.sort()
2224
for l in answer:
2325
print("\t".join(map(str,l)))
26+
27+
28+
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import os
22
import csv
3-
import pandas as pd
3+
4+
try: import pandas as pd
5+
except ImportError:
6+
import pip
7+
pip.main(['install', '--user', 'pandas'])
8+
import pandas as pd
49

510
def getdata(filename):
611
df = pd.read_csv(filename, delim_whitespace=True)
@@ -9,10 +14,15 @@ def getdata(filename):
914
ourdir=os.path.dirname(os.path.realpath(__file__))
1015
answer = []
1116
for file in os.listdir(ourdir):
17+
if file.startswith("all"):
18+
continue
1219
if file.endswith(".table"):
1320
fullpath = os.path.join(ourdir, file)
1421
answer.append([file[:-11]]+getdata(fullpath))
1522
print("#simdjson RapidJSON sajson")
1623
answer.sort()
1724
for l in answer:
1825
print("\t".join(map(str,l)))
26+
27+
28+

0 commit comments

Comments
 (0)