▤Study Index ← Overview

Programming · Index

The Programming column of the University Plan · click any entry to open

Free legal textbooksfree from the authors

Released free by their authors (mostly CC-licensed); already downloaded locally.

▤
Think Python 2e (Allen Downey)
Widely considered the best Python intro · free · 900 KB
↗
▦
Think Stats 2e (Allen Downey)
Learn statistics with Python · feeds straight into cognitive science data analysis · 2.0 MB
↗
⬡
Think Complexity 2e (Allen Downey)
Complex systems · networks · cellular automata · exploring complexity with code · 6.0 MB
↗

Official free resourcesneeds internet

All links tested working (2026-09-10).

◈
Python official tutorial
The authoritative reference · Chinese translation available
↗
◈
Harvard CS50P · Python
An intro course with problem sets and feedback · widely praised
↗
◈
Automate the Boring Stuff with Python
Learn Python by building small tools · full text free online
↗
◈
Python Data Science Handbook
The best textbook for the scientific stack · numpy / pandas / matplotlib, free online
↗
◈
Think Bayes 2e (online)
Bayesian statistics · the most relevant book for cognitive science · free online full text (the PDF is not downloadable)
↗
◈
MIT · The Missing Semester
Git / shell / debugging — what school never teaches but you use every day · strongly recommended
↗
◈
The Missing Semester · Chinese edition
Same course, translated
↗
◈
Pro Git · official Chinese edition
The authoritative Git textbook · free online
↗
◈
PsychoPy documentation
Experiment programming for cognitive science · used from Year 2 fall
↗
◈
jsPsych documentation
Online psychology experiments · runs in the browser
↗
◈
PyTorch tutorials
Deep learning · cognitive modelling · used from Year 2 spring
↗
▤
Dive into Deep Learning (D2L)
Free and open source · Chinese edition · Mu Li's team (in the 数学工具/教材 folder)
↗

Cheatsheetlook up as needed

Use this when you know what you want to do but not how to write it. The key is the need, not the function name.

Q
Code Cheatsheet Chinese
53 snippets grouped into 10 "what do I want to do" buckets · the keyword column is searchable with Cmd+F · each line notes its source and its trap
→

Correctness self-checkre-runnable

Every snippet in the notes was actually run. You can re-run them yourself at any time.

✓
自检脚本.py Chinese output
Python traps · numpy broadcasting · axis semantics · vectorisation speedups · pandas pipelines · random seeds
→
How to use: read the original notes to build the frame → then Think Python for fundamentals → go deep on the scientific stack with the Python Data Science Handbook → push code to GitHub all the way through.

Environment: the Python environment lives in 数学工具/ (miniconda) and is shared between programming and maths. Double-click 「启动 Jupyter.command」 to start it. Installed: numpy / scipy / matplotlib / pandas / jupyter / pytest.

Not installed yet (install on demand): PsychoPy (~100 MB), PyTorch (~2–3 GB) — per the plan they're needed in Year 2 fall and spring respectively; install them when you need them, commands are in the notes.

Honest limitation: the code in the notes was actually run and verified (including the examples that are supposed to error); but the PsychoPy / jsPsych / PyTorch examples are structural sketches (no environment installed, so they could not be run) — for systematic learning, go by the official docs.