Concepts 🚀 Project 🧮 Labs

🧮 Interactive Labs — edit code, see live output

Every lab has a code editor on the left and a live preview on the right. Change a value (e.g. box-shadow: 2px → 10px) and the output updates instantly. CSS/HTML labs use a live iframe (no server round-trip). Python labs run real Python via the server kernel. FastAPI labs show a simulated request/response so you can see what each route does without booting a server.

102 labs 4 categories Live preview No setup required
🐍

Python

Variables, loops, functions, lists, dicts, classes — the language the whole backend is written in.

10 labs
🌐

HTML

Tags, forms, semantic structure. The skeleton of every web page.

12 labs
Common tags — h1, p, ul, a, img, div
The 6 tags you'll use 90% of the time. Change the tag name, see the rendering change.
html
Forms — input, label, button
Forms collect user input. Each input needs a name and a label.
html
Tables — the right way (not for layout!)
Use tables for TABULAR DATA only (not for page layout). thead, tbody, tr, th, td.
html
Semantic tags — header, nav, main, article, footer
Semantic tags describe the CONTENT, not just the look. Better for SEO and accessibility.
html
Links and images — the web's basics
Links connect pages. Images display pictures. Both use URL attributes (href / src).
html
HTML entities — < > & © —
Special characters that need a code because they'd otherwise be parsed as HTML.
html
HTML5 boilerplate — the complete starting template
Every HTML page starts with this. DOCTYPE, html, head with meta tags, body. Copy-paste this as your starting point.
html
Complete dashboard page — sidebar + KPIs + charts + table
The full HTML structure of a data-science dashboard. Semantic tags: header, aside, main, section, article.
html
Complete form — all input types + validation
Every input type in one form: text, email, password, number, range, date, checkbox, radio, select, textarea, file.
html
Complete data table — caption, thead, tbody, colspan
A proper data table with caption, header, body, footer, and cells that span multiple columns.
html
Article/blog page — complete content layout
A blog post or article page with header, metadata, content blocks, code blocks, and a footer.
html
Login page — complete auth form
A complete login page with email/password, remember me, forgot password, and social login buttons.
html
🎨

CSS

Classic CSS (no Tailwind, no framework). Colors, borders, box-shadow, flexbox, grid, transitions.

32 labs
color — change the text color
The most basic CSS property. Change the color value and watch the text recolor instantly.
css
background — fill the element's box
background-color fills the box. background-image uses an image. background gradient blends colors.
css
border — outline the element
border needs 3 values: width, style, color. Change any of the three.
css
box-shadow — give the card depth
The example from your message. 5 values: x-offset, y-offset, blur, spread, color.
css
margin vs padding — the box model
margin is OUTSIDE the border (space between elements). padding is INSIDE the border (space between border and content).
css
font-family, font-size, font-weight — typography
Change the typeface, size, and boldness. Use system fonts for instant loading.
css
display — block, inline, none
Controls how an element fits in the page flow. block = full width. inline = only as wide as content. none = hidden.
css
position — static, relative, absolute, fixed
Controls how an element is positioned. The most confusing CSS property — play with it.
css
flexbox — the modern layout system
display: flex turns a parent into a flex container. justify-content and align-items control alignment.
css
grid — 2D layouts
display: grid creates a 2D grid. grid-template-columns defines columns. The most powerful CSS layout.
css
transition — smooth animations
transition: <property> <duration> <easing>. Makes changes animate instead of snapping.
css
z-index — stacking order
z-index controls which element appears on top when they overlap. Higher = on top. Only works on positioned elements.
css
border-radius — round the corners
Rounds each corner. One value = all corners. Four values = top-left, top-right, bottom-right, bottom-left.
css
:hover, :focus, :active, :nth-child
Pseudo-classes target elements based on state or position. Hover, focus, nth-child are the most common.
css
@media — responsive design
@media (max-width: 600px) applies styles only on small screens. Resize your browser to see.
css
Cascade + specificity — which rule wins?
When multiple rules target the same element, the browser picks the winner by specificity. IDs beat classes, classes beat tags.
css
CSS Reset — start every project with this
Remove default browser margins, set box-sizing: border-box on everything. The FIRST 4 lines of every CSS file.
css
CSS Variables (custom properties) — :root
Define colors/sizes once in :root, use var(--name) everywhere. Change once, updates everywhere.
css
Full page layout — header + sidebar + main + footer
The classic dashboard layout: fixed header on top, sidebar on left, main content fills the rest, footer at bottom.
css
Navbar — horizontal navigation bar
Logo on the left, links on the right. Sticky at the top. The most common UI element.
css
Responsive card grid — auto-fit
Grid that automatically shows 1/2/3/4 columns based on screen width. No media queries needed!
css
Form styling — inputs, labels, focus, validation
Make forms look professional: full-width inputs, clear labels, focus rings, error states.
css
Data table — striped rows, hover, sortable header
The table style every dashboard needs: striped rows, hover highlight, bold header, right-aligned numbers.
css
Alert boxes — success, error, warning, info
4 colored boxes for user feedback. Each has an icon, a title, and a message.
css
Loading spinner — pure CSS animation
A spinning circle that shows 'loading in progress'. No JavaScript, no images — pure CSS.
css
Chart container — figure + caption for plots
A styled wrapper for matplotlib/plotly charts. White card, title, the chart, and a caption.
css
Modal dialog — overlay + centered box
A dialog that floats above the page. Dark overlay behind, centered white box, close button.
css
Badges + tags — small status labels
Pills, dots, and tags for status indicators. 'Trained', 'v2.1', 'GPU', 'beta' — small colored labels.
css
Footer — bottom of the page
Multi-column footer with links, social icons, and copyright. The pattern every website uses.
css
Tabs — switch between panels
Tab navigation that switches content panels. Pure CSS using :target or radio inputs (no JS needed for basic tabs).
css
Full dashboard layout — sidebar + KPIs + charts + table
The complete data-science dashboard: sidebar nav, KPI row, 2-column charts, data table.
css
Responsive form page — centered card, mobile-friendly
A complete login/register page: centered card, responsive, branded. The pattern every auth page uses.
css
⚡

FastAPI

Routes, params, Pydantic, templates, dependencies, websockets — the web framework.

10 labs
⚡

Benchmark Engine

Build a benchmarking engine for ANY .pkl model — load, predict, time, metrics, compare. Like OpenBenchML.

13 labs
Load a .pkl model file (joblib + pickle)
The first step of any benchmarking engine: load the model the user uploaded. joblib.load() and pickle.loads() both work.
python
Run predict() on a loaded model
Once the model is loaded, call .predict(X) to get predictions. This is the core of inference benchmarking.
python
Measure training time (time.perf_counter)
The 'benchmark' part: how long does model.fit() take? Use time.perf_counter() for high-precision timing.
python
Measure inference time + throughput
How fast can the model make predictions? Measure inference time, per-sample latency, and throughput (samples/sec).
python
Regression metrics — MAE, MSE, RMSE, R²
Compute the 4 standard regression metrics. Each tells you something different about model quality.
python
Classification metrics — accuracy, precision, recall, F1
For classification models: accuracy, precision, recall, F1, confusion matrix. Each catches a different kind of failure.
python
Cross-validation — more honest than a single split
Single train/test split = lucky or unlucky. 5-fold CV runs 5 different splits and averages — more honest.
python
Handle ANY model type (sklearn, xgboost, custom)
A benchmarking engine must work with ANY .pkl — not just LinearRegression. Use duck typing: check for .predict().
python
FastAPI endpoint — accept .pkl file upload
The FastAPI route that receives the .pkl file + form fields. Uses UploadFile = File() + Form().
fastapi
HTML form — upload .pkl + select dataset
The form users see. File input + dataset dropdown + framework dropdown. enctype=multipart/form-data is CRITICAL.
html
Full benchmark engine — putting it all together
The complete benchmarking function: load .pkl → detect model type → load dataset → predict → time → metrics → return JSON. This is what OpenBenchML does.
python
Save benchmark results + compare models
Run benchmarks on multiple models, save results to a DataFrame, compare side-by-side. This is how leaderboards work.
python
Error handling — when the .pkl is broken or wrong
Real users upload broken files. Your benchmark engine must handle: corrupt .pkl, wrong model type, feature mismatch, predict() crashes.
python
🧠

ML Advanced

The THINKING process — preprocessing, EDA, maths, model selection, overfitting. For data scientists who want to handle ANY dataset.

25 labs
Preprocessing mindset — the 7 questions to ask ANY dataset
Before touching ML, ask these 7 questions of ANY dataset. This is how senior data scientists think — not 'load + fit'.
python
Imputation — when to use mean vs median vs mode vs KNN vs MICE
Missing values are NOT a 'fill with mean' problem. Different imputation strategies for different situations. Know when to use each.
python
Encoding — OneHot vs Label vs Target vs Frequency vs Embedding
Categorical encoding is NOT just pd.get_dummies(). 5 strategies, each for a different situation. Pick wrong = garbage model.
python
EDA mindset — 8 questions that reveal what the data is hiding
Exploratory Data Analysis is not 'df.describe()'. It's a systematic investigation. 8 questions that uncover patterns, leaks, and ML-readiness.
python
EDA visualization — 6 plots that tell you everything
Not 'make a chart'. 6 specific plots, each answering a different question. This is how you SEE the data before modeling.
python
Linear Regression maths — the equation behind .fit()
model.fit() is not magic. It solves y = Xβ + ε using least squares. Understand the equation, the cost function, and the geometry.
python
Gradient Descent — the engine behind neural networks
Most ML models (neural nets, logistic regression, SVMs) use gradient descent, not closed-form solutions. Understand the algorithm.
python
Probability for ML — Bayes, distributions, maximum likelihood
ML is applied probability. Understand Bayes' theorem, common distributions, and maximum likelihood estimation.
python
Model selection — which algorithm for which problem?
Not 'try RandomForest'. A decision framework: data size, feature type, interpretability need, linearity assumption. Pick the RIGHT model.
python
Overfitting — the #1 reason ML models fail in production
Understand the bias-variance tradeoff, why train > test means overfitting, and 5 techniques to fix it. This is what separates seniors from freshers.
python
Full ML workflow — the senior data scientist's process
Not 'load + fit + predict'. The REAL workflow: 10 steps from raw data to production-ready model. This is what senior DS actually do.
python
Logistic Regression visualized — sigmoid + decision boundary (iris)
SEE the sigmoid curve, SEE the decision boundary move as you change C. Uses the iris dataset. The maths becomes obvious when you can visualize it.
python
PCA visualized — variance + projection (iris + digits)
SEE PCA reduce 4D iris to 2D. SEE the scree plot. SEE 64D digits collapse to 2D. The geometry of dimensionality reduction.
python
SVM visualized — hyperplane + margins + support vectors (iris)
SEE the SVM hyperplane, the margin, and the support vectors. Compare linear vs RBF kernel. See how C controls the margin width.
python
Decision Tree visualized — the splits + overfitting (iris)
SEE the actual tree structure with its split rules. SEE how depth 3 vs depth 10 changes the decision regions. The most interpretable model.
python
Random Forest visualized — many trees + feature importance (wine)
SEE how 100 trees vote. SEE feature importance. SEE OOB error stabilize. The wine dataset (13 features, 3 classes).
python
KNN visualized — the K nearest neighbors + decision boundary (iris)
SEE how K=1 creates jagged boundaries (overfit) and K=15 creates smooth boundaries (underfit). The simplest ML algorithm, visualized.
python
K-Means visualized — centroid movement + elbow plot (iris)
SEE the centroids move iteration by iteration. SEE the elbow plot to pick K. Unsupervised learning made visual.
python
Gradient Boosting visualized — sequential learning + residuals (breast cancer)
SEE how each tree corrects the PREVIOUS tree's errors. SEE how learning rate + n_estimators interact. The competition-winning algorithm.
python
Interactive: Linear Regression — drag the slope + intercept
DRAG the slope and intercept sliders. SEE the line move in real-time. SEE the MSE (cost) change. This is how you build intuition for what .fit() does.
interactive
Interactive: Logistic Regression — drag the sigmoid + decision boundary
DRAG the weight + bias sliders. SEE the sigmoid curve shift. SEE the decision boundary move. SEE how probability changes for each data point.
interactive
Interactive: KNN — drag K and watch the boundary change
DRAG the K slider. SEE the decision boundary morph from jagged (K=1) to smooth (K=20). SEE how each K affects the classification of a new point.
interactive
Interactive: Overfitting — drag polynomial degree + see train vs test
DRAG the polynomial degree slider. SEE the curve go from straight line (underfit) to wiggly mess (overfit). SEE train vs test error diverge.
interactive
Interactive: K-Means — drag K and watch centroids + clusters
DRAG the K slider. SEE centroids move. SEE clusters form. SEE the elbow plot update. Find the natural number of clusters.
interactive
Interactive: Bias-Variance Tradeoff — the fundamental ML curve
DRAG the model complexity slider. SEE bias decrease, variance increase, and total error form a U-shape. The sweet spot is the minimum.
interactive