u/Amazing_Concept_4026

▲ 27 r/Python

I wrote a free, open-source book: "Advanced Methods in SciPy and Statsmodels"

SciPy and statsmodels documentation tells you how to call a function. This book tells you what that function does and why it works.

23 chapters covering optimization, Monte Carlo methods, likelihood inference, time series, survival analysis, and causal inference — each with:

  • The mathematical theory explaining WHY the method works (not just the formula — the intuition that changes how you think about it)
  • From-scratch Python implementations verified against the library output
  • Diagnostics showing how to detect when the method fails
  • 92 exercises with full worked solutions

The book fills the gap between "read the docs" and "read the textbook." If you've ever wondered why scipy.optimize.minimize defaults to BFGS, why statsmodels uses HC1 for robust standard errors, why the bootstrap fails for the sample maximum, or why two-way fixed effects gives wrong answers under staggered adoption — this book explains it with code you can run.

147,000 words. All code executes in a pinned Python environment. Free to read online, source on GitHub.

Read it: https://kundeng.github.io/bayeslearner-scikit-refresh/ Source: https://github.com/kundeng/bayeslearner-scikit-refresh

reddit.com
u/Amazing_Concept_4026 — 21 days ago

SignalPy Kernel — a Vue-style reactive component microkernel for Python

backends. ~2,600 LOC, 9 files, zero required dependencies.

The premise: every injected service is a Signal. Reading self.rt.config

inside an u/effect or u/computed is a tracked read, so when config changes

or a provider gets hot-swapped, every effect that depended on it re-runs

automatically. No manual u/on_change, no re-injection.

13 decorators total — u/component / u/provides / u/requires / u/computed /

u/effect / u/lifecycle.* / u/runnable / u/api / u/subscribe / u/kind / u/skill /

u/prop / u/exportable. The same u/runnable is automatically a REST endpoint,

MCP tool, and CLI command depending on which transport adapter the kernel

discovers.

Built with Claude's help. I'm hoping it's somewhere between trash and

god code, and I'd really like Python folks who know reactive systems

(Vue 3, Solid, Preact Signals, MobX) or DI containers (iPOPO, Dapr,

Engin/Uber Fx) to tell me which mistakes I made — particularly around

contextvar tracking across awaits and the supersede semantics for

in-flight async effects.

- Repo: https://github.com/bayeslearner/signalpy-kernel

- Docs: https://bayeslearner.github.io/signalpy-kernel/

- pip install signalpy-kernel

Issues / Discussions on the repo are open. Honest reviews welcome.

reddit.com
u/Amazing_Concept_4026 — 23 days ago