Decrease runtime by only loading pieces of libraries that are used in dicemechanicsim.py and plotdicemechanic.py. Instead of lines like this:
import csv
import pandas as pd
Check which pieces are actually used an only import those pieces with imports like this:
from argparse import ArgumentParser
from random import randrange
Make sure to adjust usage of those library calls as the syntax changes and test that the program still works.