<commit_before>"""
This script should replicate all the runs
presented in the paper. Note:
plots will be generated, which need to be manually
closed for the script to continue. It assumes
everything has been compiled already.

NOTE: the RJObject_1DMixture example is fairly time-consuming.
"""
import os

# Python command on your system
my_python = "python"

def run_example(directory):
    os.chdir(directory)
    os.system("./main -s 0")
    os.system(my_python + " showresults.py")
    os.chdir("..")

os.chdir("../code/Examples")
run_example("StraightLine")
run_example("RJObject_1DMixture")
run_example("ABC")
<commit_msg>Updated replicate so it'll work stand-alone<commit_after>import os

# Python command on your system
my_python = "/home/brendon/local/anaconda3/bin/python"

print("This script should replicate all the runs presented in the paper.\nNote:\
plots will be generated, which need to be manually\n\
closed for the script to continue. It assumes\n\
everything has been compiled already.\n\
\n\
NOTE: the RJObject_1DMixture example is fairly time-consuming.\n\n\
Press ENTER to begin.")
junk = input()

os.system("wget https://github.com/eggplantbren/DNest4/archive/0.1.0.tar.gz")
os.system("tar xvzf 0.1.0.tar.gz")
os.system("mv DNest4-0.1.0 DNest4")
os.chdir("DNest4/code")
os.system("make")
os.chdir("../python")
os.system("python setup.py install")

def run_example(directory):
    os.chdir(directory)
    os.system("./main -s 0")
    os.system(my_python + " showresults.py")
    os.chdir("..")

os.chdir("../code/Examples")
run_example("StraightLine")
run_example("RJObject_1DMixture")
run_example("ABC")

{'fraction_non_alphanumeric': 0.13644744929317762, 'fraction_numerical': 0.012292562999385371, 'mean_word_length': 4.51864406779661, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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}}
{'dir': 'git-commits-cleaned', 'id': '1955790', 'n_tokens_mistral': 573, 'n_tokens_neox': 546, 'n_words': 152}