Frontend Labs
⋯

0.2 The series: OS → networking → security → AI, in Python

This guide belongs to one course. The systems series gives you the machine, the network, and the threats; the AI guide gives you models. Python is the language you will use to automate the first three and to build the fourth.

   1  OS & Linux  ──▶  2  Networking  ──▶  3  Security  ──▶  4  HTTPS  ──▶  5  AI / ML
                         2a OSI map          3a From Zero      (one request    from classical ML
                         2b TCP/IP           3b In Depth        end to end)    to LLMs and agents
   ════════════  Go, Rust and Python alongside every step  ════════════

   Languages track:   Go  ──▶  C  ──▶  Rust  ──▶  Python  (you are here)
                      GC +     the       safety      the glue language:
                      runtime  machine   by compiler readable code over fast native libraries
Step Guide What it gives you What you build here in Python
1 Operating Systems, Linux, and Containers processes, memory, files, sockets, signals, containers Part IV: syscalls with strace, a supervisor with signals, atomic writes, ps from /proc, mmap, a namespace container
2a The OSI Model, One Click at a Time one click through all seven layers Ch 72 walks the same layers from a Python program
2b Networking from Zero (TCP/IP) addressing, TCP, UDP, DNS, HTTP, packet capture Ch 40–42: four echo servers, a raw-bytes DNS client, HTTP from a socket
3a Security from Zero hashing, AEAD, passwords, TLS, PKI, OWASP Top 10 Ch 45, 47–49, 51: ssl and mTLS, AES-GCM, Argon2, HMAC, injection-proof SQL, JWT auth
3b Security Engineering in Depth SSRF, deserialization, supply chain, detection Ch 43, 47, 50, 52: SSRF guard, pickle exploits, pip-audit, a log detector
4 The HTTPS Request Lifecycle one request end to end, then the server side Ch 43–45, 64: production clients and servers, and requests traced to the socket
5 AI from Zero to LLMs ML, neural networks, Transformers, LLMs, agents Part VII: NumPy to PyTorch, autograd from scratch, RAG, agents, an MCP server
— Real-Life Mathematics linear algebra, probability, calculus Ch 53, 57: the same maths as NumPy code
L1–L3 Go, C, Rust three compiled languages the phrasebook in §0.3, and comparisons in every chapter
L4 Python — The Complete Field Guide ← you are here the glue language of data and AI —

Why Python comes after the systems series. Python hides the machine well. That is why beginners like it, and why experienced engineers get surprised by it in production. When your data loader is slow you need the OS guide's page cache. When a training job gets OOM-killed you need OS Ch 13. When requests.get() hangs you need TCP from the networking guide. And when someone sends you a model file, you need deserialization attacks from Security in Depth, because a PyTorch checkpoint can be a pickle that runs code. This guide assumes you can follow those links when it uses them.

Reading paths:

  • New to programming: Part 0 → Part I slowly (do every exercise) → Ch 13–21 → Part VII Ch 53–56 → the AI guide.
  • From Go or Rust (backend / systems engineer), heading to AI: §0.3 → Ch 1–2, 5–7 → 13–18 → 25–29 → Part VII → Part VIII.
  • ML engineer / data scientist who learned Python informally: Ch 2, 5–6, 13, 15–18, 20–21, 25–28, 31 → 53–62 → 71. Chapter 2 alone will explain several bugs you have already hit.
  • Security engineer: Ch 1–9 → 33–34 → 40–45 → Part VI → 64.
  • SRE / platform: Ch 1–12 → 19 → 21 → Part IV → 43–44 → 68–70.

Across the series, at a glance

Topic OS / network / security / AI side Go / Rust side Python chapter
System calls OS Ch 2 OS Ch 73, Rust §39 33
Processes and signals OS Ch 20 OS Ch 74, Rust §40 34
Threads and races OS Ch 17 Go §17, Rust §28 27
Crash-safe files OS Ch 14 OS Ch 77, Rust §41 35
/proc OS Ch 23 OS Ch 79 36
Containers OS Ch 44 OS Ch 80, Rust §44 39
Many connections OS Ch 19 OS Ch 78 29, 40
DNS Net Ch 18 Rust §45 41
TCP Net Ch 21 Go §34 40
HTTP Net Ch 28, Net Ch 39 Rust §46 42, 64
Retries, timeouts HTTPS Ch 21 Rust §48 43
SSRF Sec 3b Ch 33 HTTPS Ch 22 43
TLS / mTLS Sec Ch 28, Sec Ch 53 Rust §49 45
Password storage Sec Ch 10 Go §48 48, 51
Injection Sec Ch 42 — 49
Deserialization Sec 3b Ch 37 — 47
Supply chain Sec Ch 47 Rust §55 50
Detection Sec 3b Ch 51 — 52
Vectors, matrices Maths guide — 53
Your first model AI Ch 9 — 56
Backpropagation AI Ch 15 — 57
Training an LLM AI Ch 41 — 58–59
RAG AI Ch 47 — 61
Agents and tools AI Ch 51 — 61
MCP AI Ch 58 — 61

Generated from real-life-python-guide.md · 8 Oct 2026 16:36