Here's the code I used for my physics project.
The code to the simulation was adapted from sirrandalot's version (https://github.com/sirrandalot/three-sided-coin), yet strongly altered (e.g. turned into 2D). The file browser used for making saving data more convenient was taken from yasirkula (https://github.com/yasirkula/UnitySimpleFileBrowser). See the releases to download an executable file. I apologize for the ugly code, it was my first time working with Unity as well as C#.
The python script I wrote myself to compute the model I derived in my project.