Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/firelemons/probability-programs
The scripts for Introduction to Probability by Charles M. Grinstead and J. Laurie Snell ported to python
https://github.com/firelemons/probability-programs
mathematics probability python
Last synced: 22 days ago
JSON representation
The scripts for Introduction to Probability by Charles M. Grinstead and J. Laurie Snell ported to python
- Host: GitHub
- URL: https://github.com/firelemons/probability-programs
- Owner: FireLemons
- License: gpl-3.0
- Created: 2020-02-08T21:00:30.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-12T08:02:53.000Z (about 4 years ago)
- Last Synced: 2024-11-28T20:29:39.932Z (29 days ago)
- Topics: mathematics, probability, python
- Language: Mathematica
- Homepage:
- Size: 421 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: contributing/mathematica_scripts/Book Programs.3.0/Chapter 1 (3.0)/CoinTosses.Chpt1.mat.m
- License: LICENSE
Awesome Lists containing this project
README
# Probability-Programs
The scripts for [Introduction to Probability by Charles M. Grinstead and J. Laurie Snell](http://www.dartmouth.edu/~chance/teaching_aids/books_articles/probability_book/book.html) ported to python
## Setup
Install Python 3.8 and git
Other versions of python 3.X may work
To install using a different version of python, open `Pipfile` in a text editor and edit the version number[requires]
python_version = "3.8"### Linux
Make sure pip for python 3 is installed
`pip3 --version` should not print an error
Install pipenv via pip
`pip3 install --user pipenv`Clone the repo
`git clone [email protected]:FireLemons/Probability-Programs.git`
Install the project dependencies
`cd Probability-Programs`
`pipenv install`
**this may take several minutes**Install tkinter to be able to display graphs
`sudo apt install python3-tk`### Windows
Make sure pip for python 3 is installed
Make sure the `"%AppData%\Python\Python3X\Scripts"` directory is added to PATH env variable.
`pip3 --version` should not print an error
Install pipenv via pip
`pip install pipenv`Clone the repo
`git clone [email protected]:FireLemons/Probability-Programs.git`Install the project dependencies
`cd Probability-Programs`
`pipenv install`
**this may take several minutes**Tkinter comes bundled with Windows installer. Use `python -m tkinter` to check if Tkinter is installed properly
### MacOS
Help Wanted
## Running Programs
run `pipenv shell` in the project folder to start a subshell with all the dependencies loaded
In the subshell, run a program by typing `python3 name_of_program.py`.## Contributing
This repo aims to port the wolfram mathematica programs found [here](http://www.dartmouth.edu/~chance/teaching_aids/books_articles/probability_book/BookAlgorithms.html) to python.
When I first discovered the book, I went to download the programs and saw that they were all written in proprietary languages so I decided to port the programs to python.
The program files don't have to be 1 to 1 with the mathematica files. If you can find a way to simplify or improve a program, go for it.
When creating a program, first copy contributing/template.py and edit from there.
When editing programs please keep in mind they may need to be modified by someone who may not have a background in programming.
For the near future I only plan to port standalone programs. Eventually I would like help to port the mathematica notebook files to jupyter notebook.