<jupyter_start><jupyter_text>Run the dta on different link files<jupyter_code>import shutil
import os
import numpy as np

name_list = ['ctm', 'ltm', 'pq', 'lq']
target_file_name = 'MNM_input_link'
executable_name = 'exp_link'
output_name = 'cc_record'
for file_name in name_list:
    shutil.copy2(target_file_name + '_' + file_name, target_file_name)
    os.system('./' + executable_name)
    os.rename(output_name, output_name+'_'+file_name)<jupyter_output><empty_output><jupyter_text>Extract the cumulative curve info<jupyter_code>total_dict = dict()
for name in name_list:
    info_dict = dict()
    f = file(output_name + '_' + name, 'r')
    for line in f:
        words = line.split(',')
        link_ID = words[0]
        direction = words[1]
        key = link_ID + "_" + direction
        value = (list(), list())
        for e in words[2:]:
            one_value = e.split(":")
            value[0].append(np.float(one_value[0]))
            value[1].append(np.float(one_value[1]))
        info_dict[key] = value
    f.close()
    total_dict[name] = info_dict<jupyter_output><empty_output><jupyter_text>Plotting<jupyter_code>import matplotlib.pyplot as plt

link_name = '3_out'
# plt.subplot(2, 2, 1)
plt.plot(total_dict['ctm'][link_name][0], total_dict['ctm'][link_name][1])
# plt.subplot(2, 2, 2)
plt.plot(total_dict['ltm'][link_name][0], total_dict['ltm'][link_name][1])
# plt.subplot(2, 2, 3)
plt.plot(total_dict['pq'][link_name][0], total_dict['pq'][link_name][1])
# plt.subplot(2, 2, 4)
plt.plot(total_dict['lq'][link_name][0], total_dict['lq'][link_name][1])
plt.legend(name_list)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16605616605616605, 'fraction_numerical': 0.017704517704517704, 'mean_word_length': 4.730769230769231, 'pattern_counts': {'":': 1, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '269145', 'license': 'MIT', 'n_tokens_mistral': 653, 'n_tokens_neox': 645, 'n_words': 107, 'path': 'data/input_files_1link/exp_link.ipynb', 'repo_name': 'AlanPi1992/MAC-POSTS', 'size': '1638'}