AllenDowney/ModSimPy hiện có 939 sao trên GitHub, viết chủ yếu bằng Jupyter Notebook. Text and supporting code for Modeling and Simulation in Python
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Modeling and Simulation in Python is an introduction to physical modeling in Python, suitable for people with no programming experience.
Printed and electronic copies of the book are available from No Starch Press and Bookshop.org and Amazon.
Here is the home page for this book at Green Tea Press.
Read the book and run the code.
Read documentation of the modsim.py module
The notebooks download modsim.py from this repository, so there is nothing to install. The modsimpy package on PyPI (last released in 2020) is outdated and no longer maintained.
Outline
Modeling and Simulation in Python is an introduction to physical modeling using a computational approach. It is organized in three parts:
The first part presents discrete models, including a bikeshare system and world population growth.
The second part introduces first-order systems, including models of infectious disease, thermal systems, and pharmacokinetics.
The third part is about second-order systems, including mechanical systems like projectiles, celestial mechanics, and rotating rigid bodies.
Taking a computational approach makes it possible to work with more realistic models than what you typically see in a first-year physics class, with the option to include features like friction and drag.
Python is an ideal programming language for this material. It is a good first language for people who have not programmed before, and it provides high-level data structures that are well-suited to express solutions to the problems we are interested in.
Installation
For Users
To set up the environment for running the notebooks, you can use either conda or mamba:
mamba env update -f environment.yml --prune
# or
make update_environment
Development environment:
mamba env update -f environment-dev.yml --prune
# or
make update_environment_dev
Development
Three repositories are involved:
ModSimPy (this one, public, branch master): the notebooks without solutions (chapters/, examples/), the modsim.py library, and the Jupyter Book site, published on the gh-pages branch.
ModSimPySolutions (private, branch master): where development happens and the solutions live. It is cloned inside this working tree as ModSimPySolutions/ (gitignored here). Its GitHub Actions run the notebooks on every push and once a month.
ModSim (AllenDowney/ModSim, branch main): figures and data shared with the MATLAB version.
The canonical copy of modsim.py is modsim/modsim.py, next to its tests (modsim/test_modsim.py). modsim/build.sh copies it everywhere else; edit only that copy. The top-level modsim.py and chapNN.py files, data/World_population_estimates.html, and figs/baseball_drag.png must stay where they are: the notebooks download them from github.com/AllenDowney/ModSimPy/raw/master/....
Updating a notebook
Edit the notebook in ModSimPySolutions/chapters/ or ModSimPySolutions/examples/.
Run the whole pipeline with make build, or the steps one at a time:
cd modsim && sh build.sh # copy modsim.py to all locations
cd ModSimPySolutions/chapters && sh build.sh # commit and push solutions; export and commit chapNN.py in ModSimPy
cd ModSimPySolutions && sh build.sh # zip of the solution notebooks
cd examples && sh build.sh # copy notebooks, remove solutions, commit
cd chapters && sh build.sh # same for the chapters, then rebuild the notebook zip
git push # push ModSimPy once
sh build.sh # MkDocs API docs into site/
cd jb && sh build.sh # build the Jupyter Book and push gh-pages
The ModSimPy scripts only commit; push once at the end, since every push to master runs CI. Run examples before chapters, because the notebook zip includes both.
Testing
Testing is a separate step from building:
make tests # modsim unit tests and the chapter notebooks
cd ModSimPySolutions && make tests # all notebooks, with solutions
cd chapters && sh test_run.sh # refresh the chapters from ModSimPySolutions and test them
Some of the examples don't run without their solutions, so they aren't tested here.
License
The text of the book is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. The code, including modsim.py, is under the MIT License (see LICENSE).
This and other Free Books by Allen Downey are available from Green Tea Press.
AllenDowney/ModSimPy có 939 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/AllenDowney/ModSimPy. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
AllenDowney/ModSimPy có phải mã nguồn mở không?
Có — AllenDowney/ModSimPy phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/AllenDowney/ModSimPy.
AllenDowney/ModSimPy còn đang phát triển không?
Commit gần nhất trên AllenDowney/ModSimPy là 27 ngày trước (theo timestamp GitHub). Repo có 1.8k fork — một chỉ báo về mức độ quan tâm của cộng đồng.
AllenDowney/ModSimPy dùng license gì?
AllenDowney/ModSimPy phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
AllenDowney/ModSimPy là gì?
AllenDowney/ModSimPy (AllenDowney/ModSimPy) là dự án Jupyter Notebook trên GitHub. Theo mô tả gốc: Text and supporting code for Modeling and Simulation in Python
AllenDowney/ModSimPy viết bằng ngôn ngữ gì?
AllenDowney/ModSimPy chủ yếu viết bằng Jupyter Notebook. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc thêm về AllenDowney/ModSimPy ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/AllenDowney/ModSimPy là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
ModSimPy có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về ModSimPy.