All posts
#python
Posts tagged python.
- Machine LearningCross-validation in scikit-learn explainedLearn how sklearn cross_val_score runs 5-fold cross-validation and why a single train/test split can give a misleading score.November 2, 2026 · 2 min read
- AI & LLMsLLM Structured Output with Pydantic in PythonTurn an LLM reply into a validated Python object: define a Pydantic model, extract order details from an email, and catch bad JSON early.November 1, 2026 · 2 min read
- PythonHow to count items with a Python dictionaryLearn how to count occurrences in Python with a dictionary, dict.get and a loop, by building a small word-frequency counter step by step.October 31, 2026 · 1 min read
- Career & InterviewsBig-O notation explained in plain wordsLearn what O(1), O(n) and O(n²) mean by timing three small Python functions and watching how each one grows when the input doubles.October 31, 2026 · 2 min read
- DevOps & CloudHow to write a Dockerfile for a Python appWrite a Dockerfile for a small Flask app, then build and run it with Docker. Learn what each line does and avoid the two most common mistakes.October 29, 2026 · 2 min read
- Machine Learningscikit-learn train_test_split and your first modelLearn how to split data with train_test_split, fit a KNeighborsClassifier, score it on test data and compare it with a baseline.October 29, 2026 · 2 min read
- Data ScienceHow to read a CSV file with pandasLearn how to load a CSV into a pandas DataFrame with read_csv, then check it with head, shape and info and load only some columns with usecols.October 28, 2026 · 1 min read
- AI & LLMsHow to Call the Claude API from Python with StreamingSend your first Claude API message from Python, read the stop reason and token usage, then stream the reply text as it is written.October 27, 2026 · 2 min read
- PythonPython f-strings explained with examplesLearn how Python f-strings put variables and calculations inside text, with a price and quantity receipt example and how to format money.October 27, 2026 · 1 min read