Inst2Vec/process_data/utils.py

18 lines
452 B
Python
Raw Normal View History

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"
def read_file(filename):
with open(filename, "r", encoding="utf-8") as fin:
return fin.readlines()
def write_file(sents, filename):
with open(filename, "w", encoding="utf-8") as fout:
for sent in sents:
fout.write(sent)