2021-06-06 20:50:36 +08:00
|
|
|
import os
|
|
|
|
|
2021-06-30 19:20:12 +08:00
|
|
|
# ORIGINAL_DATA_BASE = "/home/ming/malware/data/elfasm_inst_pairs"
|
2024-04-11 16:43:57 +08:00
|
|
|
ORIGINAL_DATA_BASE = "/mnt/d/bishe/Inst2Vec/dataset/all"
|
|
|
|
CURRENT_DATA_BASE = "/mnt/d/bishe/Inst2Vec/dataset/all"
|
2021-06-06 20:50:36 +08:00
|
|
|
|
|
|
|
|
|
|
|
def read_file(filename):
|
|
|
|
with open(filename, "r", encoding="utf-8") as fin:
|
|
|
|
return fin.readlines()
|
|
|
|
|
2021-06-07 18:42:22 +08:00
|
|
|
|
|
|
|
def write_file(sents, filename):
|
|
|
|
with open(filename, "w", encoding="utf-8") as fout:
|
|
|
|
for sent in sents:
|
|
|
|
fout.write(sent)
|
|
|
|
|