Notes

Python

Security notes, SOC lab write-ups and tested code by Mahir Faysal, a SOC Level 1 cybersecurity learner in Bangladesh, plus notes from my Next.js and Gemini projects. Sample posts are marked and drafts stay in the admin area.

ModuleNotFoundError: No module named in Python: 10 Causes and Fixes (pip, venv, VS Code)
Coding tips

ModuleNotFoundError: No module named in Python: 10 Causes and Fixes (pip, venv, VS Code)

Python raises ModuleNotFoundError when it can’t find a module in the interpreter that’s running your code. The 10 causes I reproduced, from installing with the wrong pip to cv2/bs4/yaml package names, venvs, VS Code, Jupyter, local imports and externally-managed-environment, each with the exact fix.

October 12, 2026 · 13 min read · 227 views

Python Lazy Imports: How the New lazy Keyword Works in Python 3.15
Coding tips

Python Lazy Imports: How the New lazy Keyword Works in Python 3.15

Python 3.15 adds the lazy soft keyword: lazy import json loads the module only when you first use it. Tested examples of the startup saving, where lazy isn’t allowed, how errors appear, -X lazy_imports=all, filters and __lazy_modules__.

October 12, 2026 · 11 min read · 61 views

Python frozendict: The New Immutable Dictionary in Python 3.15 (Tested)
Coding tips

Python frozendict: The New Immutable Dictionary in Python 3.15 (Tested)

Python 3.15 adds frozendict, a built-in immutable, hashable dictionary. Tested examples: creating one, why you can’t change it, using it as a dict key or in a set, merging with |, isinstance checks and a fallback for older Python.

October 12, 2026 · 11 min read · 131 views

Python enumerate(): How to Start at 1 (and 12 Tested Examples)
Coding tips

Python enumerate(): How to Start at 1 (and 12 Tested Examples)

enumerate(items, start=1) gives you a counter that starts at 1 alongside each item. Tested examples for lists, dicts, zip, reversed order, file line numbers and comprehensions, plus why it beats range(len()) and the list.index() trap.

October 11, 2026 · 11 min read · 135 views

0%