P.01CVE-2026-48710: Starlette's BadHost Bug, Explained
BadHost sat quietly patched since May. In September, CISA flagged active exploitation. If you run FastAPI, vLLM, or any Starlette app, here's what to check.
Tag
70 articles tagged #Python.
P.01BadHost sat quietly patched since May. In September, CISA flagged active exploitation. If you run FastAPI, vLLM, or any Starlette app, here's what to check.
P.02Django 6.1 adds QuerySet.fetch_mode() to catch accidental N+1s, ON DELETE pushed into the database, and one MAILERS setting replacing loose EMAIL_ config.
P.03A 2021 firmware error made Coldcard wallets seed from a software PRNG, not hardware. Attackers drained $70M in 41 minutes. The lesson isn't about Bitcoin.
P.04BullMQ for Node, Celery for Python, Sidekiq for Ruby, and Temporal or a cloud queue when you need durability without owning a broker. The reasoning.
P.05A background task that outlives the function that spawned it is a real production bug. How structured concurrency fixes it in Python, Kotlin, and Swift.
P.06Google's open-source Colab CLI provisions T4, L4, A100, and H100 GPUs and TPUs from the command line. Install it, run a job, wire it into an AI agent.
P.07Full coverage means every line ran, not that your tests would notice it breaking. How mutation testing answers that, with Stryker and mutmut.
P.08FastAPI's June 2026 refactor preserves routes instead of cloning them, makes dynamic registration work, and adds app.frontend() for serving SPAs.
Data scientist and ML engineer are two different jobs. The distinction, what a strong data scientist does, and how to screen for real analytical judgment.
Everyone claims ML experience since the AI boom. The screen that separates people who ship ML systems from people who fine-tuned once in a Colab notebook.
Python spans AI, data, backend, and DevOps, so the title says little. How to define the role, screen for real ability, and avoid a costly mismatch.
Playwright dominates scraping now, but tooling is the easy part. A practical guide to scraping that works, and the legal lines to know before you ship.
Pydantic v2's Rust core made validation 5-50x faster, but the model redesign is what changes how you structure validation logic for real APIs.
Python asyncio fails in production from hidden blocking calls, CPU-bound work stalling the event loop, and cancellation bugs most tutorials skip.
Both frameworks can build RAG pipelines and agent systems, but they're designed with different priorities. Here's when to reach for each and when to skip both.
dbt turns SQL SELECT statements into a tested, documented, version-controlled data pipeline. Here's how it works and when you should add it to your data stack.
Getting a language model to return reliably structured data is not just about asking nicely. Here's the pattern that actually works at production scale.
AI tools write code fast. TDD asks you to slow down and write tests first. These two impulses seem to be in tension. Here's how they actually work together.
Clients ask agencies to automate PDFs constantly. Here's how to actually build document extraction pipelines: OCR, vision models, and validation.
DuckDB runs OLAP queries directly in your process, on files on your laptop, without a server. Here's how to use it and when it beats spinning up BigQuery or Redshift.
The command line tools most developers use today are a decade old. Here's what's replaced them and why: terminals, Git UIs, shell configuration, and the small tools that compound into significant time savings.
Three leading agent orchestration frameworks, three different mental models. Here's when each one earns its place, what each costs you in complexity, and what the choice looks like when you're debugging at 2am.
Python 3.13 shipped an experimental mode that removes the Global Interpreter Lock. Here's what the GIL actually does, what free-threaded Python changes, and what it still doesn't fix.
Python 3.14 shipped in October 2025. Seven months in, the features worth caring about have become clear. Here's what changed, what to upgrade for, and what to ignore.
Polars beats pandas on speed through Arrow memory, multi-threading, and lazy evaluation by default. Here's when the switch is worth it and how to migrate.
Background jobs that crash mid-run lose their state. Temporal makes workflows durable state machines that survive restarts and deploys. In TS and Python.
Unit tests confirm your code runs. They don't confirm your AI feature gives good answers. Here's how to build an eval pipeline that catches real failures.
Getting a language model to return valid, schema-conforming JSON is harder than it looks. Here's what works in production, from native structured output APIs to library-level validation.
uv is a Rust-written Python package manager covering dependencies, virtualenvs, and Python versions. What changed after moving eight projects onto it.
Async Django is production-ready in 2026, but landmines still exist. Four real projects, benchmarks, and a framework for deciding when async actually helps.
We migrated three production projects from Celery to Django's new Tasks framework. Two went smoothly. One was a disaster. Here is everything we learned.
The network latency between your Django app and your FastAPI ML service is probably longer than inference itself. Here is how to serve models from Django directly.
We rebuilt a React SPA as a Django + HTMX app. 847KB of JavaScript became 48KB. Here is every pattern, rough edge, and performance win from the migration.
Most DRF vs FastAPI comparisons are written by people who only use one. We ship both in production. Here is what actually matters and when to choose each.
How we built an AI-powered interface that lets non-technical users query any database using plain English, eliminating SQL expertise requirements and democratizing data access.
Step-by-step guide to configuring a complete full-stack development environment with Python, Django backend, and React frontend.
Learn Python variables and data types — integers, floats, strings, booleans, lists, tuples, and dictionaries with clear examples.
Perform EDA on the Boston Housing dataset using scatter plots and regression lines to identify relationships between features and housing prices.
GridSearchCV trains and cross-validates a model across every hyperparameter combination you define, then picks the best. How it works and where it costs you.
Build a sentiment analysis pipeline with text preprocessing, CountVectorizer token counts, and Multinomial Naive Bayes classification on Twitter data.
Explore time series forecasting methods including ARIMA, exponential smoothing, and seasonal decomposition for real-world prediction tasks.
Understand decision tree algorithms for classification and regression, their pros and cons, and build an Iris classifier with Python code.
Learn SVM theory including hyperplanes and the kernel trick, then build a classifier on the breast cancer dataset using scikit-learn.
Build a logistic regression model to predict diabetes outcomes using the Pima Indians dataset, covering sigmoid functions, feature scaling, and evaluation.
Implement K-Nearest Neighbors classification using scikit-learn with data visualization, model training, and performance evaluation on real datasets.
Understand the KNN algorithm — how it works, distance metrics, choosing K, and its applications in both classification and regression tasks.
Compare Naive Bayes, SVM, Decision Tree, and Random Forest for email spam detection with a complete Python pipeline from data loading to evaluation.
Master MAE, MSE, R², RMSE, accuracy, precision, recall, F1-score, AUC-ROC, and confusion matrices with formulas and Python code examples.
Build an insurance cost prediction model using multivariate linear regression with one-hot encoding, evaluation metrics, and residual analysis.
Master 7 encoding techniques for categorical variables — one-hot, label, dummy, binning, count, frequency, and target encoding with Python examples.
Build a linear regression model from scratch using scikit-learn, with data visualization, feature selection, and model evaluation metrics.
Explore derivatives, integrals, multivariate calculus, optimization, and differential equations with Python implementations using SymPy and NumPy.
Learn essential statistics concepts — mean, median, mode, variance, standard deviation, percentiles, quartiles, and z-scores with Python implementations.
Understand vectors, matrices, transpose, inverse, determinant, trace, dot product, and eigenvalues with NumPy implementations for data science.
Master SQL from basics to advanced — SELECT, JOIN, GROUP BY, ORDER BY, indexes, date functions, and more using SQLite with Python.
Learn to create compelling data visualizations using Matplotlib and Seaborn — line plots, scatter plots, bar charts, histograms, heatmaps, and more.
Master Pandas for data manipulation — reading data, selecting columns, grouping, merging DataFrames, handling missing values, and working with dates.
Learn NumPy essentials — arrays, shapes, reshaping, slicing, stacking, broadcasting, universal functions, and image processing with practical examples.
A deep dive into Python lists, tuples, sets, dictionaries, and functions with comprehensive code examples and practical exercises.
Learn Python fundamentals including identifiers, data types (int, float, str, list, tuple, set, dict), operators, and basic operations with hands-on examples.
A structured 100-day data science bootcamp roadmap covering Python, statistics, machine learning, deep learning, and real-world projects.
A comprehensive guide covering 10 regression types — linear, polynomial, logistic, ridge, lasso, elastic net, and more — with Python code examples and selection criteria.
Master Python list comprehensions including syntax, filtering, nested comprehensions, and dictionary/set comprehensions with practical code examples.
Learn OpenCV fundamentals including image I/O, pixel manipulation, color conversion, resizing, filtering, edge detection, and feature detection with SIFT and SURF.
Understand the divide and conquer algorithmic paradigm through the maximum subarray sum problem, with Python implementation and step-by-step analysis.
Exploratory data analysis means visualizing, cleaning, and summarizing data before modeling. This guide covers plots, correlation, PCA, and feature engineering.
Master bitwise operations, bitmasking, bit manipulation tricks, and bit-based algorithms for competitive programming and software engineering interviews.
Build a CNN model using ResNet50 transfer learning to classify gender from eye images, covering data preprocessing, model architecture, and evaluation.
Learn to predict stock prices using Long Short-Term Memory (LSTM) networks in Python with TensorFlow, from data preprocessing to building and evaluating the model.
A hands-on guide to building a fruit image classifier using transfer learning with ResNet50 in TensorFlow and Keras, achieving high accuracy on the Fruits-360 dataset.