Skip to main content

Blogs

Schema-First PDF Extraction in Python with Pydantic

·1186 words·6 mins
Most PDF extraction projects start with the document. You open a PDF, look at the text, write a regex, extract a value. Repeat for each field. This works for one document type with one layout. It doesn’t scale. Schema-first extraction inverts the order: define exactly what the output should look like before you write a single line of extraction code. The schema becomes the specification that every extraction function has to satisfy — and the tool that tells you, immediately and explicitly, when an extraction fails.

What is Intelligent Document Processing?

·1559 words·8 mins
Intelligent Document Processing (IDP) is a category of software that extracts structured data from unstructured documents — automatically, reliably, and at scale. The document arrives as a PDF, an image, or a scan. IDP reads it, identifies what matters, and outputs structured data: fields, values, tables — in the format your system expects. No manual entry. No copy-paste.

FAISS Index Types for Production RAG

·420 words·2 mins
IndexFlatIP works for small corpora. For production with 100K+ vectors, you need smarter indexes. Here’s how to choose and implement them. FAISS Index Types Overview # Index Corpus Size Memory Accuracy Build Time IndexFlatIP < 50K High Exact Fast IndexIVFFlat 50K - 1M Medium ~95-99% Medium IndexHNSWFlat 50K - 10M High ~95-99% Slow IndexIVFPQ 1M+ Low ~90-95% Slow IndexFlatIP (Baseline) # Exact search, no training required. Use for prototypes and small corpora.

Detect and Remove Outliers in Python: IQR and Z-Score

·1925 words·10 mins
Outliers can significantly skew statistical analysis and machine learning model performance. This guide covers every practical method to detect, visualize, and handle outliers in Python — from IQR and Z-Score to Isolation Forest — with runnable code at each step.

Outliers Detection in Python

·14 words·1 min
This post has moved. Read the updated guide: Detect and Remove Outliers in Python.

Beginners Guide to Building and Securing APIs

·771 words·4 mins
New to APIs? This guide explains core concepts in clear language, then walks you through building a small FastAPI service with essential security and testing tips. When you’re ready for advanced patterns, read the companion: Designing Secure and Scalable APIs — A Comprehensive Guide.

Designing Secure and Scalable APIs — A Comprehensive Guide

·1487 words·7 mins
APIs are the connective tissue of modern products. This guide distills proven practices for API design, security, observability, and reliability—covering the most frequent questions and edge cases teams face in production. Examples use FastAPI and Pydantic v2, but the principles generalize to any stack.

Git & GitHub: The Definitive Version Control Guide

·1559 words·8 mins
Version control is the foundation of reliable software delivery. This guide teaches Git from first principles, then layers in practical GitHub workflows used by high-performing teams. You’ll learn the mental models, the everyday commands, and the advanced tools to collaborate confidently without fear of breaking anything.

Git 101 – Commands and Workflows Cheat Sheet

·448 words·3 mins
A quick, task-oriented Git reference. Pair this with the in-depth guide for concepts and best practices. TL;DR Working tree → git add → Staging area → git commit → Local repo → git push → Remote. Most common daily commands: status, add, commit, push, pull, checkout, merge. Undo staged changes: git restore --staged <file>. Undo last commit (keep changes): git reset HEAD~1. For concepts and workflows, read the full Git guide. Minimal Mental Model # graph LR WD[Working Dir] -- add --> ST[Staging] ST -- commit --> REPO[Local Repo] REPO -- push --> ORI[Origin] ORI -- fetch/pull --> REPO Setup # git --version git config --global user.name "Your Name" git config --global user.email "you@example.com" git config --global init.defaultBranch main Create or Clone # git init git clone <url> Status and Diffs # git status git diff # unstaged git diff --staged # staged vs HEAD Stage and Commit # git add <path> git add -p # interactive hunks git commit -m "feat: message" git commit --amend # edit last commit Branching # git branch git switch -c feature/x git switch main git branch -d feature/x Sync with Remote # git remote -v git fetch git pull # merge git pull --rebase # rebase git push -u origin my-branch Merge vs Rebase # git switch my-branch && git merge main git switch my-branch && git rebase main Resolve Conflicts # git status # edit files, remove markers git add <file> git commit # after merge git rebase --continue # during rebase Stash Work # git stash push -m "wip" git stash list git stash pop Undo Safely # git restore --staged <file> # unstage git restore <file> # discard local edits git revert <sha> # new commit to undo git reset --soft HEAD~1 # keep changes, drop last commit git reflog # find lost commits Tags and Releases # git tag -a v1.0.0 -m "msg" git push --tags Ignore and Clean # echo "node_modules/" >> .gitignore git clean -fdx # dangerous: removes untracked files Authentication (Quick) # # HTTPS + PAT git clone https://github.com/owner/repo.git # SSH ssh-keygen -t ed25519 -C "you@example.com" ssh-add ~/.ssh/id_ed25519 git clone git@github.com:owner/repo.git Conventional Commits (Optional) # feat(auth): add oauth login fix(api): handle null pointer in user service chore(ci): update node to 20 Common One-Liners # # See last commit summary git log -1 --stat # Interactive rebase last 5 commits git rebase -i HEAD~5 # Squash branch onto main git switch my-branch && git rebase -i main Quick PR Flow (GitHub) # git switch -c feat/x # edit, add, commit git push -u origin feat/x # open PR on GitHub See also: the full guide “The Definitive Guide to Version Control with Git and GitHub”.