diff --git a/docs/lessons/14-advanced-python/01-closures-and-decorators.md b/docs/lessons/14-advanced-python/01-closures-and-decorators.md index 2f9187a..94a318b 100644 --- a/docs/lessons/14-advanced-python/01-closures-and-decorators.md +++ b/docs/lessons/14-advanced-python/01-closures-and-decorators.md @@ -5,6 +5,8 @@ description: "Learn how closures remember values, write your own decorators with # Closures and Decorators +![Illustration: Closures and Decorators](/images/topics-webp/closures-and-decorators.webp){.lesson-cover width=1536 height=1024} + ::: tip What you'll learn - What a **closure** is, and when an inner function needs `nonlocal` - How to write a **decorator** step by step, with `*args`, `**kwargs`, and `functools.wraps` @@ -166,6 +168,8 @@ By hand, this is `fetch_rate = retry(times=3)(fetch_rate)`. `times` lives in the You can put several decorators on one function. They are **applied bottom-up** (the one nearest the `def` wraps first), so at call time the **top one runs outermost**: +![Diagram: Stacked Decorators](/images/companions-webp/decorator-stack.webp){.lesson-diagram width=1536 height=1024 loading=lazy} + ```python from functools import wraps diff --git a/docs/lessons/14-advanced-python/02-python-data-model.md b/docs/lessons/14-advanced-python/02-python-data-model.md index b92aa44..7ab8d31 100644 --- a/docs/lessons/14-advanced-python/02-python-data-model.md +++ b/docs/lessons/14-advanced-python/02-python-data-model.md @@ -5,6 +5,8 @@ description: "Look under the hood of Python objects: types and __dict__, attribu # The Python Data Model +![Illustration: The Python Data Model](/images/topics-webp/python-data-model.webp){.lesson-cover width=1536 height=1024} + ::: tip What you'll learn - Why **everything is an object**: `type()`, `__class__`, and `__dict__` - How `__getattr__`, `__getattribute__`, `__setattr__`, and `__delattr__` hook into attribute access diff --git a/docs/lessons/14-advanced-python/03-context-managers-in-depth.md b/docs/lessons/14-advanced-python/03-context-managers-in-depth.md index 195ee39..aca1f73 100644 --- a/docs/lessons/14-advanced-python/03-context-managers-in-depth.md +++ b/docs/lessons/14-advanced-python/03-context-managers-in-depth.md @@ -5,6 +5,8 @@ description: "Write class-based context managers with __enter__ and __exit__, co # Context Managers in Depth +![Illustration: Context Managers in Depth](/images/topics-webp/context-managers-in-depth.webp){.lesson-cover width=1536 height=1024} + ::: tip What you'll learn - The exact **context manager protocol**: what `__enter__` returns and what `__exit__(exc_type, exc, tb)` receives - How the return value of `__exit__` decides whether an exception is **swallowed** or **propagated** @@ -63,6 +65,8 @@ If `__exit__` returns a **true** value, the exception is **swallowed**. `None` o This `Transaction` works on a copy of the accounts, commits on success, rolls back on error, and swallows only `ValueError`: +![Diagram: Context Manager Lifecycle](/images/companions-webp/context-manager-lifecycle.webp){.lesson-diagram width=1536 height=1024 loading=lazy} + ```python class Transaction: def __init__(self, accounts): diff --git a/docs/lessons/14-advanced-python/04-async-await.md b/docs/lessons/14-advanced-python/04-async-await.md index e2509ae..df31d8f 100644 --- a/docs/lessons/14-advanced-python/04-async-await.md +++ b/docs/lessons/14-advanced-python/04-async-await.md @@ -5,6 +5,8 @@ description: "Write asynchronous Python with async def and await: run coroutines # Async and await +![Illustration: Async and await](/images/topics-webp/async-await.webp){.lesson-cover width=1536 height=1024} + ::: tip What you'll learn - What a **coroutine** is, and what `await` does while a program waits - How to run coroutines **concurrently** with `asyncio.gather`, `create_task` and `TaskGroup` @@ -103,6 +105,8 @@ The total is the **longest** wait (0.3 s), not the sum (0.6 s), and there is sti `asyncio.create_task(coro)` wraps a coroutine in a **task** that starts as soon as the current coroutine pauses. `await` the task later to get its result: +![Diagram: Tasks and the Event Loop](/images/companions-webp/async-task-timeline.webp){.lesson-diagram width=1536 height=1024 loading=lazy} + ```python import asyncio diff --git a/docs/lessons/14-advanced-python/05-memory-and-performance.md b/docs/lessons/14-advanced-python/05-memory-and-performance.md index 0662874..4405bfc 100644 --- a/docs/lessons/14-advanced-python/05-memory-and-performance.md +++ b/docs/lessons/14-advanced-python/05-memory-and-performance.md @@ -5,6 +5,8 @@ description: "Measure before you optimise: time code with timeit, inspect memory # Memory and Performance +![Illustration: Memory and Performance](/images/topics-webp/memory-and-performance.webp){.lesson-cover width=1536 height=1024} + ::: tip What you'll learn - How to **measure** speed with `timeit` and `time.perf_counter` - What `sys.getsizeof` reports, and how `tracemalloc` shows **where** memory goes diff --git a/docs/lessons/14-advanced-python/06-design-patterns.md b/docs/lessons/14-advanced-python/06-design-patterns.md index 4dce48a..e668a37 100644 --- a/docs/lessons/14-advanced-python/06-design-patterns.md +++ b/docs/lessons/14-advanced-python/06-design-patterns.md @@ -5,6 +5,8 @@ description: "Use classic design patterns the Python way: strategies as function # Pythonic Design Patterns +![Illustration: Pythonic Design Patterns](/images/topics-webp/design-patterns.webp){.lesson-cover width=1536 height=1024} + ::: tip What you'll learn - Why **design patterns** are shared vocabulary, not code to copy - How to write **strategy**, **factory**, and **registry** with functions, classmethods, dicts, and decorators diff --git a/docs/lessons/14-advanced-python/07-threads-and-processes.md b/docs/lessons/14-advanced-python/07-threads-and-processes.md index 85cbfca..fc085dc 100644 --- a/docs/lessons/14-advanced-python/07-threads-and-processes.md +++ b/docs/lessons/14-advanced-python/07-threads-and-processes.md @@ -5,6 +5,8 @@ description: "Run work concurrently with threads and processes: I/O-bound versus # Threads and Processes +![Illustration: Threads and Processes](/images/topics-webp/threads-and-processes.webp){.lesson-cover width=1536 height=1024} + ::: tip What you'll learn - **I/O-bound** versus **CPU-bound** work, and what the **GIL** means for each - How to start and `join` a **thread**, and why shared data needs a **`Lock`** @@ -32,6 +34,8 @@ CPython has a **Global Interpreter Lock (GIL)**: only one thread runs Python cod Python 3.14 also offers an optional **free-threaded build** (`python3.14t`) without a GIL. The normal `python3.14` still has the GIL, and this lesson assumes it. +![Diagram: Shared or Separate Memory?](/images/companions-webp/thread-process-memory.webp){.lesson-diagram width=1536 height=1024 loading=lazy} + ## Starting threads `threading.Thread(target=..., args=...)` creates a thread. `start()` runs it; `join()` waits until it finishes. diff --git a/docs/lessons/14-advanced-python/08-testing-in-depth.md b/docs/lessons/14-advanced-python/08-testing-in-depth.md index 5964026..33f4ec6 100644 --- a/docs/lessons/14-advanced-python/08-testing-in-depth.md +++ b/docs/lessons/14-advanced-python/08-testing-in-depth.md @@ -5,6 +5,8 @@ description: "Organise a test suite with conftest.py and fixture scopes, use mon # Testing in Depth +![Illustration: Testing in Depth](/images/topics-webp/testing-in-depth.webp){.lesson-cover width=1536 height=1024} + ::: tip What you'll learn - How to organise tests with a **`tests/` folder**, **`conftest.py`** and `-k` - **Fixture scopes** and **`yield` fixtures** for setup and teardown @@ -44,6 +46,8 @@ shop_project/ A fixture that uses **`yield`** instead of `return` gets a **teardown**: the code after `yield` runs after the test, even a failed one. `tests/conftest.py`: +![Diagram: Fixture Setup and Teardown](/images/companions-webp/fixture-lifecycle.webp){.lesson-diagram width=1536 height=1024 loading=lazy} + ```py import pytest diff --git a/docs/lessons/14-advanced-python/09-advanced-project.md b/docs/lessons/14-advanced-python/09-advanced-project.md index 6ad4a84..5177def 100644 --- a/docs/lessons/14-advanced-python/09-advanced-project.md +++ b/docs/lessons/14-advanced-python/09-advanced-project.md @@ -5,6 +5,8 @@ description: "Build a log pipeline that combines generators, frozen dataclasses, # Project: Log Pipeline +![Illustration: Project: Log Pipeline](/images/topics-webp/advanced-project.webp){.lesson-cover width=1536 height=1024} + ::: tip What you'll learn - How to build a **lazy pipeline** of generators that parses a log line by line - How to register pipeline steps with a **decorator** and choose them by name @@ -36,6 +38,8 @@ Your program reads an access log, skips broken lines, filters and groups the req A log line looks like `2026-09-16T10:03:21 GET /products/12 200 0.128 192.168.1.20`. The fields are time, method, path, status code, duration in seconds, and client IP. The data flows through small stages: +![Diagram: Log Pipeline Architecture](/images/companions-webp/log-pipeline-architecture.webp){.lesson-diagram width=1536 height=1024 loading=lazy} + ```text access.log | diff --git a/docs/public/favicon.svg b/docs/public/favicon.svg index e0fe769..bf132f3 100644 --- a/docs/public/favicon.svg +++ b/docs/public/favicon.svg @@ -1,6 +1,202 @@ - - - - - - +AAAWgmp1bWIAAAAeanVtZGMycGEAEQAQgAAAqgA4m3EDYzJwYQAAABZcanVtYgAAAEdqdW1kYzJtYQARABCAAACqADibcQN1cm46YzJwYTo2OWQyNGU2Ni05MTEzLTR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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPZYQLRSkEobPx0G0mS+MMoCeTViJ6ptjxPGahvRdH9fvq+/31HT5hLCPf6U3W/wEPKVnKv3OzVLDxSQt//rupDw1Zk= + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/public/images/companions-webp-uzb/async-task-timeline.webp b/docs/public/images/companions-webp-uzb/async-task-timeline.webp new file mode 100644 index 0000000..82028a3 Binary files /dev/null and b/docs/public/images/companions-webp-uzb/async-task-timeline.webp differ diff --git a/docs/public/images/companions-webp-uzb/context-manager-lifecycle.webp b/docs/public/images/companions-webp-uzb/context-manager-lifecycle.webp new file mode 100644 index 0000000..dd41dba Binary files /dev/null and b/docs/public/images/companions-webp-uzb/context-manager-lifecycle.webp differ diff --git a/docs/public/images/companions-webp-uzb/decorator-stack.webp b/docs/public/images/companions-webp-uzb/decorator-stack.webp new file mode 100644 index 0000000..6e57400 Binary files /dev/null and b/docs/public/images/companions-webp-uzb/decorator-stack.webp differ diff --git a/docs/public/images/companions-webp-uzb/fixture-lifecycle.webp b/docs/public/images/companions-webp-uzb/fixture-lifecycle.webp new file mode 100644 index 0000000..8889017 Binary files /dev/null and b/docs/public/images/companions-webp-uzb/fixture-lifecycle.webp differ diff --git a/docs/public/images/companions-webp-uzb/log-pipeline-architecture.webp b/docs/public/images/companions-webp-uzb/log-pipeline-architecture.webp new file mode 100644 index 0000000..7f6bbdb Binary files /dev/null and b/docs/public/images/companions-webp-uzb/log-pipeline-architecture.webp differ diff --git a/docs/public/images/companions-webp-uzb/thread-process-memory.webp b/docs/public/images/companions-webp-uzb/thread-process-memory.webp new file mode 100644 index 0000000..a79bfa3 Binary files /dev/null and b/docs/public/images/companions-webp-uzb/thread-process-memory.webp differ diff --git a/docs/public/images/companions-webp/async-task-timeline.webp b/docs/public/images/companions-webp/async-task-timeline.webp new file mode 100644 index 0000000..dce32c4 Binary files /dev/null and b/docs/public/images/companions-webp/async-task-timeline.webp differ diff --git a/docs/public/images/companions-webp/context-manager-lifecycle.webp b/docs/public/images/companions-webp/context-manager-lifecycle.webp new file mode 100644 index 0000000..460cf6d Binary files /dev/null and b/docs/public/images/companions-webp/context-manager-lifecycle.webp differ diff --git a/docs/public/images/companions-webp/decorator-stack.webp b/docs/public/images/companions-webp/decorator-stack.webp new file mode 100644 index 0000000..0be0b43 Binary files /dev/null and b/docs/public/images/companions-webp/decorator-stack.webp differ diff --git a/docs/public/images/companions-webp/fixture-lifecycle.webp b/docs/public/images/companions-webp/fixture-lifecycle.webp new file mode 100644 index 0000000..3be7321 Binary files /dev/null and b/docs/public/images/companions-webp/fixture-lifecycle.webp differ diff --git a/docs/public/images/companions-webp/log-pipeline-architecture.webp b/docs/public/images/companions-webp/log-pipeline-architecture.webp new file mode 100644 index 0000000..fa95bd5 Binary files /dev/null and b/docs/public/images/companions-webp/log-pipeline-architecture.webp differ diff --git a/docs/public/images/companions-webp/thread-process-memory.webp b/docs/public/images/companions-webp/thread-process-memory.webp new file mode 100644 index 0000000..3ba12d1 Binary files /dev/null and b/docs/public/images/companions-webp/thread-process-memory.webp differ diff --git a/docs/public/images/topics-webp-uzb/advanced-project.webp b/docs/public/images/topics-webp-uzb/advanced-project.webp new file mode 100644 index 0000000..97f07df Binary files /dev/null and b/docs/public/images/topics-webp-uzb/advanced-project.webp differ diff --git a/docs/public/images/topics-webp-uzb/async-await.webp b/docs/public/images/topics-webp-uzb/async-await.webp new file mode 100644 index 0000000..7586b76 Binary files /dev/null and b/docs/public/images/topics-webp-uzb/async-await.webp differ diff --git a/docs/public/images/topics-webp-uzb/closures-and-decorators.webp b/docs/public/images/topics-webp-uzb/closures-and-decorators.webp new file mode 100644 index 0000000..6ecc4f9 Binary files /dev/null and b/docs/public/images/topics-webp-uzb/closures-and-decorators.webp differ diff --git a/docs/public/images/topics-webp-uzb/context-managers-in-depth.webp b/docs/public/images/topics-webp-uzb/context-managers-in-depth.webp new file mode 100644 index 0000000..d190b85 Binary files /dev/null and b/docs/public/images/topics-webp-uzb/context-managers-in-depth.webp differ diff --git a/docs/public/images/topics-webp-uzb/design-patterns.webp b/docs/public/images/topics-webp-uzb/design-patterns.webp new file mode 100644 index 0000000..00cd859 Binary files /dev/null and b/docs/public/images/topics-webp-uzb/design-patterns.webp differ diff --git a/docs/public/images/topics-webp-uzb/memory-and-performance.webp b/docs/public/images/topics-webp-uzb/memory-and-performance.webp new file mode 100644 index 0000000..5463aa5 Binary files /dev/null and b/docs/public/images/topics-webp-uzb/memory-and-performance.webp differ diff --git a/docs/public/images/topics-webp-uzb/operators-and-containers.webp b/docs/public/images/topics-webp-uzb/operators-and-containers.webp new file mode 100644 index 0000000..e5746e6 Binary files /dev/null and b/docs/public/images/topics-webp-uzb/operators-and-containers.webp differ diff --git a/docs/public/images/topics-webp-uzb/python-data-model.webp b/docs/public/images/topics-webp-uzb/python-data-model.webp new file mode 100644 index 0000000..411d16d Binary files /dev/null and b/docs/public/images/topics-webp-uzb/python-data-model.webp differ diff --git a/docs/public/images/topics-webp-uzb/recursion.webp b/docs/public/images/topics-webp-uzb/recursion.webp new file mode 100644 index 0000000..28ec1af Binary files /dev/null and b/docs/public/images/topics-webp-uzb/recursion.webp differ diff --git a/docs/public/images/topics-webp-uzb/special-methods.webp b/docs/public/images/topics-webp-uzb/special-methods.webp index 4f1e263..c0ffc8f 100644 Binary files a/docs/public/images/topics-webp-uzb/special-methods.webp and b/docs/public/images/topics-webp-uzb/special-methods.webp differ diff --git a/docs/public/images/topics-webp-uzb/testing-in-depth.webp b/docs/public/images/topics-webp-uzb/testing-in-depth.webp new file mode 100644 index 0000000..3d1c7d9 Binary files /dev/null and b/docs/public/images/topics-webp-uzb/testing-in-depth.webp differ diff --git a/docs/public/images/topics-webp-uzb/threads-and-processes.webp b/docs/public/images/topics-webp-uzb/threads-and-processes.webp new file mode 100644 index 0000000..06b29b1 Binary files /dev/null and b/docs/public/images/topics-webp-uzb/threads-and-processes.webp differ diff --git a/docs/public/images/topics-webp/advanced-project.webp b/docs/public/images/topics-webp/advanced-project.webp new file mode 100644 index 0000000..5083368 Binary files /dev/null and b/docs/public/images/topics-webp/advanced-project.webp differ diff --git a/docs/public/images/topics-webp/async-await.webp b/docs/public/images/topics-webp/async-await.webp new file mode 100644 index 0000000..fed5549 Binary files /dev/null and b/docs/public/images/topics-webp/async-await.webp differ diff --git a/docs/public/images/topics-webp/closures-and-decorators.webp b/docs/public/images/topics-webp/closures-and-decorators.webp new file mode 100644 index 0000000..2b636e6 Binary files /dev/null and b/docs/public/images/topics-webp/closures-and-decorators.webp differ diff --git a/docs/public/images/topics-webp/context-managers-in-depth.webp b/docs/public/images/topics-webp/context-managers-in-depth.webp new file mode 100644 index 0000000..9766cc2 Binary files /dev/null and b/docs/public/images/topics-webp/context-managers-in-depth.webp differ diff --git a/docs/public/images/topics-webp/design-patterns.webp b/docs/public/images/topics-webp/design-patterns.webp new file mode 100644 index 0000000..01d8de6 Binary files /dev/null and b/docs/public/images/topics-webp/design-patterns.webp differ diff --git a/docs/public/images/topics-webp/memory-and-performance.webp b/docs/public/images/topics-webp/memory-and-performance.webp new file mode 100644 index 0000000..f7c151d Binary files /dev/null and b/docs/public/images/topics-webp/memory-and-performance.webp differ diff --git a/docs/public/images/topics-webp/python-data-model.webp b/docs/public/images/topics-webp/python-data-model.webp new file mode 100644 index 0000000..eda9341 Binary files /dev/null and b/docs/public/images/topics-webp/python-data-model.webp differ diff --git a/docs/public/images/topics-webp/special-methods.webp b/docs/public/images/topics-webp/special-methods.webp index ef32a3d..7fa3e89 100644 Binary files a/docs/public/images/topics-webp/special-methods.webp and b/docs/public/images/topics-webp/special-methods.webp differ diff --git a/docs/public/images/topics-webp/testing-in-depth.webp b/docs/public/images/topics-webp/testing-in-depth.webp new file mode 100644 index 0000000..285e1ce Binary files /dev/null and b/docs/public/images/topics-webp/testing-in-depth.webp differ diff --git a/docs/public/images/topics-webp/threads-and-processes.webp b/docs/public/images/topics-webp/threads-and-processes.webp new file mode 100644 index 0000000..0a94711 Binary files /dev/null and b/docs/public/images/topics-webp/threads-and-processes.webp differ diff --git a/docs/uz/darslar/06-functions/05-recursion.md b/docs/uz/darslar/06-functions/05-recursion.md index 98af65d..0bc179c 100644 --- a/docs/uz/darslar/06-functions/05-recursion.md +++ b/docs/uz/darslar/06-functions/05-recursion.md @@ -5,6 +5,8 @@ description: "Özini özi çaqiradigan funksiyalar yozing: bazaviy va rekursiv h # Rekursiya +![Rasm: Rekursiya](/images/topics-webp-uzb/recursion.webp){.lesson-cover width=1536 height=1024} + ::: tip Nimalarni örganasiz - Funksiya **özini özi çaqirişi** nimani anglatadi va nega bu çeksiz sikl emas - Har bir rekursiv funksiyaga kerak bölgan ikki qism: **bazaviy holat** va **rekursiv holat** diff --git a/docs/uz/darslar/09-classes-and-objects/07-operators-and-containers.md b/docs/uz/darslar/09-classes-and-objects/07-operators-and-containers.md index 4f5b410..834863c 100644 --- a/docs/uz/darslar/09-classes-and-objects/07-operators-and-containers.md +++ b/docs/uz/darslar/09-classes-and-objects/07-operators-and-containers.md @@ -5,6 +5,8 @@ description: "Obyektlarga __add__ va __rmul__ orqali arifmetika bering, qöllab- # Operatorlar va konteynerlar +![Rasm: Operatorlar va konteynerlar](/images/topics-webp-uzb/operators-and-containers.webp){.lesson-cover width=1536 height=1024} + ::: tip Nimalarni örganasiz - `__add__` va `__mul__` obyektlarga arifmetikani qanday beradi va ular nega **yangi** obyekt qaytaradi - Nega qöllab-quvvatlanmaydigan turlar `NotImplemented` oladi va `__rmul__` `3 * price` ni qanday işlatadi diff --git a/docs/uz/darslar/14-advanced-python/01-closures-and-decorators.md b/docs/uz/darslar/14-advanced-python/01-closures-and-decorators.md index 88ead29..0c2c41a 100644 --- a/docs/uz/darslar/14-advanced-python/01-closures-and-decorators.md +++ b/docs/uz/darslar/14-advanced-python/01-closures-and-decorators.md @@ -5,6 +5,8 @@ description: "Closurelar qiymatlarni qanday eslab qolişini örganing, functools # Closure va dekoratorlar +![Rasm: Closure va dekoratorlar](/images/topics-webp-uzb/closures-and-decorators.webp){.lesson-cover width=1536 height=1024} + ::: tip Nimalarni örganasiz - **Closure** nima va içki funksiyaga qaçon `nonlocal` kerak - `*args`, `**kwargs` va `functools.wraps` bilan **dekoratorni** (decorator) qadamma-qadam qanday yoziş @@ -166,6 +168,8 @@ Qölda yozilsa, bu `fetch_rate = retry(times=3)(fetch_rate)`. `times` closureda Bitta funksiyaga bir neça dekorator qöyiş mumkin. Ular **pastdan yuqoriga qöllanadi** (`def` ga eng yaqini birinçi öraydi), şuning uçun çaqiruv paytida **eng yuqoridagisi eng taşqarida** işlaydi: +![Diagramma: Ustma-ust dekoratorlar](/images/companions-webp-uzb/decorator-stack.webp){.lesson-diagram width=1536 height=1024 loading=lazy} + ```python from functools import wraps diff --git a/docs/uz/darslar/14-advanced-python/02-python-data-model.md b/docs/uz/darslar/14-advanced-python/02-python-data-model.md index ad1d362..ef83a6f 100644 --- a/docs/uz/darslar/14-advanced-python/02-python-data-model.md +++ b/docs/uz/darslar/14-advanced-python/02-python-data-model.md @@ -5,6 +5,8 @@ description: "Python obyektlarining içki tuzilişini köring: turlar va __dict_ # Python maʼlumot modeli +![Rasm: Python maʼlumotlar modeli](/images/topics-webp-uzb/python-data-model.webp){.lesson-cover width=1536 height=1024} + ::: tip Nimalarni örganasiz - Nega **hamma narsa obyekt**: `type()`, `__class__` va `__dict__` - `__getattr__`, `__getattribute__`, `__setattr__` va `__delattr__` atributga murojaatga qanday ulanadi diff --git a/docs/uz/darslar/14-advanced-python/03-context-managers-in-depth.md b/docs/uz/darslar/14-advanced-python/03-context-managers-in-depth.md index 2621cc5..a2bd3dc 100644 --- a/docs/uz/darslar/14-advanced-python/03-context-managers-in-depth.md +++ b/docs/uz/darslar/14-advanced-python/03-context-managers-in-depth.md @@ -5,6 +5,8 @@ description: "__enter__ va __exit__ bilan klass körinişidagi kontekst menejerl # Kontekst menejerlarini çuqurroq örganiş +![Rasm: Kontekst menejerlari](/images/topics-webp-uzb/context-managers-in-depth.webp){.lesson-cover width=1536 height=1024} + ::: tip Nimalarni örganasiz - Aniq **kontekst menejeri protokoli** (context manager protocol): `__enter__` nima qaytaradi va `__exit__(exc_type, exc, tb)` nima qabul qiladi - `__exit__` ning qaytaradigan qiymati istisno **yutilişi** (swallow) yoki **yuqoriga uzatilişini** (propagate) qanday hal qiladi @@ -63,6 +65,8 @@ Obyektda saqlandi: 0.1 Bu `Transaction` hisoblarning nusxasi bilan işlaydi, muvaffaqiyatda özgarişlarni saqlaydi (commit), xatoda bekor qiladi (rollback) va faqat `ValueError` ni yutadi: +![Diagramma: Kontekst menejeri hayot sikli](/images/companions-webp-uzb/context-manager-lifecycle.webp){.lesson-diagram width=1536 height=1024 loading=lazy} + ```python class Transaction: def __init__(self, accounts): diff --git a/docs/uz/darslar/14-advanced-python/04-async-await.md b/docs/uz/darslar/14-advanced-python/04-async-await.md index 3763202..7df9abe 100644 --- a/docs/uz/darslar/14-advanced-python/04-async-await.md +++ b/docs/uz/darslar/14-advanced-python/04-async-await.md @@ -5,6 +5,8 @@ description: "async def va await bilan asinxron Python yoziş: gather, vazifalar # Async va await +![Rasm: Async va await](/images/topics-webp-uzb/async-await.webp){.lesson-cover width=1536 height=1024} + ::: tip Nimalarni örganasiz - **Korutina** (coroutine) nima va dastur kutayotganda `await` nima qiladi - `asyncio.gather`, `create_task` va `TaskGroup` bilan korutinalarni qanday qilib **bir vaqtda** (concurrently) işga tuşiriş @@ -103,6 +105,8 @@ Umumiy vaqt yiğindi (0.6 s) emas, balki **eng uzun** kutiş (0.3 s) va baribir `asyncio.create_task(coro)` korutinani **vazifaga** (task) öraydi; vazifa joriy korutina pauza qilişi bilanoq boşlanadi. Natijani oliş uçun vazifani keyinroq `await` qiling: +![Diagramma: Vazifalar va hodisalar sikli](/images/companions-webp-uzb/async-task-timeline.webp){.lesson-diagram width=1536 height=1024 loading=lazy} + ```python import asyncio diff --git a/docs/uz/darslar/14-advanced-python/05-memory-and-performance.md b/docs/uz/darslar/14-advanced-python/05-memory-and-performance.md index a1df81c..198f1be 100644 --- a/docs/uz/darslar/14-advanced-python/05-memory-and-performance.md +++ b/docs/uz/darslar/14-advanced-python/05-memory-and-performance.md @@ -5,6 +5,8 @@ description: "Optimallaştirişdan oldin ölçang: kodni timeit bilan vaqtlang, # Xotira va samaradorlik +![Rasm: Xotira va samaradorlik](/images/topics-webp-uzb/memory-and-performance.webp){.lesson-cover width=1536 height=1024} + ::: tip Nimalarni örganasiz - `timeit` va `time.perf_counter` bilan tezlikni qanday **ölçaş** - `sys.getsizeof` nimani körsatadi va `tracemalloc` xotira **qayerga** ketayotganini qanday körsatadi diff --git a/docs/uz/darslar/14-advanced-python/06-design-patterns.md b/docs/uz/darslar/14-advanced-python/06-design-patterns.md index 507ae8c..12f4e70 100644 --- a/docs/uz/darslar/14-advanced-python/06-design-patterns.md +++ b/docs/uz/darslar/14-advanced-python/06-design-patterns.md @@ -5,6 +5,8 @@ description: "Klassik dizayn patternlarni Python usulida qöllang: funksiya kör # Pythonça dizayn patternlar +![Rasm: Python uslubidagi dizayn andozalari](/images/topics-webp-uzb/design-patterns.webp){.lesson-cover width=1536 height=1024} + ::: tip Nimalarni örganasiz - Nega **dizayn patternlar** (design patterns) köçirib olinadigan kod emas, balki umumiy atamalar luğati - **Strategy** (strategiya), **Factory** (fabrika) va **Registry** (registr) patternlarini funksiyalar, classmethodlar, luğatlar va dekoratorlar bilan qanday yoziş diff --git a/docs/uz/darslar/14-advanced-python/07-threads-and-processes.md b/docs/uz/darslar/14-advanced-python/07-threads-and-processes.md index 8f85fd9..24bab98 100644 --- a/docs/uz/darslar/14-advanced-python/07-threads-and-processes.md +++ b/docs/uz/darslar/14-advanced-python/07-threads-and-processes.md @@ -5,6 +5,8 @@ description: "Işni oqimlar va jarayonlar yordamida parallel bajariş: I/O-bound # Oqimlar va jarayonlar +![Rasm: Oqimlar va jarayonlar](/images/topics-webp-uzb/threads-and-processes.webp){.lesson-cover width=1536 height=1024} + ::: tip Nimalarni örganasiz - **I/O-bound** va **CPU-bound** iş farqi hamda **GIL** ularning har biri uçun nimani anglatişi - **Oqimni** (thread) qanday işga tuşiriş va `join` qiliş, nega umumiy maʼlumotlarga **`Lock`** kerak @@ -32,6 +34,8 @@ CPython da **Global Interpreter Lock (GIL)** bor: bir vaqtda faqat bitta oqim Py Python 3.14 da GIL siz ixtiyoriy **free-threaded build** (`python3.14t`) ham bor. Oddiy `python3.14` da GIL hamon bor va bu dars şuni nazarda tutadi. +![Diagramma: Umumiy yoki alohida xotira?](/images/companions-webp-uzb/thread-process-memory.webp){.lesson-diagram width=1536 height=1024 loading=lazy} + ## Oqimlarni işga tuşiriş `threading.Thread(target=..., args=...)` oqim yaratadi. `start()` uni işga tuşiradi; `join()` u tugaşini kutadi. diff --git a/docs/uz/darslar/14-advanced-python/08-testing-in-depth.md b/docs/uz/darslar/14-advanced-python/08-testing-in-depth.md index 1aea365..24227e3 100644 --- a/docs/uz/darslar/14-advanced-python/08-testing-in-depth.md +++ b/docs/uz/darslar/14-advanced-python/08-testing-in-depth.md @@ -5,6 +5,8 @@ description: "Test töplamini conftest.py va fixture scopelari bilan tartiblaş, # Testlaşni çuqurroq örganiş +![Rasm: Testlaşni çuqurroq örganiş](/images/topics-webp-uzb/testing-in-depth.webp){.lesson-cover width=1536 height=1024} + ::: tip Nimalarni örganasiz - Testlarni **`tests/` papkasi**, **`conftest.py`** va `-k` bilan qanday tartiblaş - Tayyorlaş va tozalaş uçun **fixture scopelari** va **`yield` li fixturelar** @@ -44,6 +46,8 @@ shop_project/ `return` örniga **`yield`** işlatadigan fixture **tozalaş** (teardown) qismiga ega böladi: `yield` dan keyingi kod testdan keyin, hatto test yiqilsa ham bajariladi. `tests/conftest.py`: +![Diagramma: Fixture: tayyorlaş va tozalaş](/images/companions-webp-uzb/fixture-lifecycle.webp){.lesson-diagram width=1536 height=1024 loading=lazy} + ```py import pytest diff --git a/docs/uz/darslar/14-advanced-python/09-advanced-project.md b/docs/uz/darslar/14-advanced-python/09-advanced-project.md index fd4187d..8a7281c 100644 --- a/docs/uz/darslar/14-advanced-python/09-advanced-project.md +++ b/docs/uz/darslar/14-advanced-python/09-advanced-project.md @@ -5,6 +5,8 @@ description: "Generatorlar, muzlatilgan dataclasslar, dekorator bilan töldirila # Loyiha: Log konveyeri +![Rasm: Loyiha: Log konveyeri](/images/topics-webp-uzb/advanced-project.webp){.lesson-cover width=1536 height=1024} + ::: tip Nimalarni örganasiz - Logni qatorma-qator tahlil qiladigan generatorlardan **dangasa konveyer** (lazy pipeline) qanday quriş - Konveyer bosqiçlarini **dekorator** bilan qanday röyxatdan ötkaziş va ularni nomi böyiça tanlaş @@ -36,6 +38,8 @@ Dasturingiz kirişlar jurnalini öqiydi, buzilgan qatorlarni ötkazib yuboradi, Log qatori mana bunday körinadi: `2026-09-16T10:03:21 GET /products/12 200 0.128 192.168.1.20`. Maydonlar: vaqt, metod, yöl, holat kodi, soniyalardagi davomiylik va mijoz IP manzili. Maʼlumotlar kiçik bosqiçlar orqali oqib ötadi: +![Diagramma: Log konveyeri tuzilmasi](/images/companions-webp-uzb/log-pipeline-architecture.webp){.lesson-diagram width=1536 height=1024 loading=lazy} + ```text access.log |