Posts tagged python

Python 101: Context Managers

Understanding Python context managers: what they are, why they matter for resource cleanup, and how to implement them.

Understanding the purpose of tox.ini

What the tox tool is, how to configure tox.ini, and why its config file is used by other Python tools like flake8 and pytest.

Algorithms in Python

Implementations of merge sort, quick sort, binary search, BFS, DFS, and Dijkstra's algorithm in Python.

Mocking in Python

A practical guide to mocking resources in Python tests using unittest.mock, covering decorators, patching, and common pitfalls.

Calculating Big-O

A quick reference for calculating Big O time complexity by identifying dominant operations in an algorithm.

Algorithmic Complexity in Python

An introduction to Big O notation and algorithmic time complexity with Python examples for common operations.

Security with Python

Building a Python encryption library using scrypt for key derivation, covering KDF, PBKDF2, and digest generation.

Profiling Python

Techniques and tools for profiling Python applications including timers, cProfile, line_profiler, memory_profiler, and pyflame.