Datasets:
Edward J. Schwartz
commited on
Commit
•
85a4ca2
1
Parent(s):
58b2c43
Script updates
Browse files- scripts/gen-training.bash +1 -1
- scripts/gen-training.py +1 -1
- scripts/import datasets.py +4 -0
scripts/gen-training.bash
CHANGED
@@ -2,4 +2,4 @@
|
|
2 |
|
3 |
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
4 |
|
5 |
-
find . -name '*.ground' | nice parallel -q --eta -I foo bash -c 'F=$(dirname foo)/$(basename foo .ground); echo $F; python3 '"$SCRIPT_DIR"'/gen-training.py $F{.ground,,.csv}'
|
|
|
2 |
|
3 |
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
4 |
|
5 |
+
find . -name '*.ground' | shuf | nice parallel -q --eta -I foo bash -c 'F=$(dirname foo)/$(basename foo .ground); echo $F; python3 '"$SCRIPT_DIR"'/gen-training.py $F{.ground,,.csv}'
|
scripts/gen-training.py
CHANGED
@@ -22,7 +22,7 @@ subprocess.check_output("/data/research/rose/install-latest/bin/bat-ana --no-pos
|
|
22 |
|
23 |
def get_all_dis():
|
24 |
|
25 |
-
output = subprocess.check_output("/data/research/rose/install-latest/bin/bat-dis --no-bb-cfg-arrows --color=off %s 2>/dev/null" % (ananame), shell=True)
|
26 |
output = re.sub(b' +', b' ', output)
|
27 |
|
28 |
func_dis = {}
|
|
|
22 |
|
23 |
def get_all_dis():
|
24 |
|
25 |
+
output = subprocess.check_output("/data/research/rose/install-latest/bin/bat-dis --no-insn-address --no-bb-cfg-arrows --color=off %s 2>/dev/null" % (ananame), shell=True)
|
26 |
output = re.sub(b' +', b' ', output)
|
27 |
|
28 |
func_dis = {}
|
scripts/import datasets.py
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import datasets
|
2 |
+
# find /wherever -name '*.csv' | tar -T - -c | tar -C /somewhere -x
|
3 |
+
ds = datasets.load_dataset("csv", "/somewhere")
|
4 |
+
ds = ds.class_encode_column('Type')
|