Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Filter by Categories
About Article
AI Tools
Analyze Data
Archive
Best Practices
Better Outputs
Blog
Code Optimization
Code Quality
Command Line
Course
Daily tips
Dashboard
Data Analysis & Manipulation
Data Engineer
Data Visualization
DataFrame
Delta Lake
DevOps
DuckDB
Environment Management
Feature Engineer
Git
Jupyter Notebook
LLM
LLM Tools
Machine Learning
Machine Learning & AI
Machine Learning Tools
Manage Data
MLOps
Natural Language Processing
Newsletter Archive
NumPy
Pandas
Polars
PySpark
Python Helpers
Python Tips
Python Utilities
Scrape Data
SQL
Testing
Time Series
Tools
Visualization
Visualization & Reporting
Workflow & Automation
Workflow Automation

Newsletter Archive

Automated newsletter archive from Klaviyo campaigns

Polars 1.41 – Speed Up Wide Parquet Scans Without Code Changes

Grab your coffee. Here are this week’s highlights.

📅 Today’s Picks

LiteLLM – One interface for OpenAI, Anthropic, and Gemini

Problem
Frameworks like LangChain and LlamaIndex are useful when you need chains, agents, retrieval, memory, or orchestration.
But if you only need to call different providers through the same interface, you may not want to restructure your app around a full LLM framework.
Solution
LiteLLM solves this as a lightweight interface layer.
You can keep one completion() call across 100+ providers, then switch models by changing only the model string.

📖 View Full Article

Polars 1.41 – Speed Up Wide Parquet Scans Without Code Changes

Problem
scan_parquet is Polars’ lazy way to read a Parquet file, allowing it to optimize the query before loading data.
Before the query runs, Polars still needs to decode the Parquet footer to understand the schema, row groups, and column statistics. For very wide files, that setup step can take noticeable time.
Solution
Polars 1.41 makes scan_parquet faster by replacing the old metadata decoder with one built specifically for Parquet files.
In the Polars 1.41 release benchmark, footer decoding was up to 3.29x faster on a 10,000-column file.

📖 Read the release

Stay Current with CodeCut

Actionable Python tips, curated for busy data pros. Skim in under 2 minutes, three times a week.

.codecut-subscribe-form .codecut-input {
background: #2F2D2E !important;
border: 1px solid #72BEFA !important;
color: #FFFFFF !important;
}
.codecut-subscribe-form .codecut-input::placeholder {
color: #999999 !important;
}
.codecut-subscribe-form .codecut-subscribe-btn {
background: #72BEFA !important;
color: #2F2D2E !important;
}
.codecut-subscribe-form .codecut-subscribe-btn:hover {
background: #5aa8e8 !important;
}

.codecut-subscribe-form {
max-width: 650px;
display: flex;
flex-direction: column;
gap: 8px;
}
.codecut-input {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background: #FFFFFF;
border-radius: 8px !important;
padding: 8px 12px;
font-family: ‘Comfortaa’, sans-serif !important;
font-size: 14px !important;
color: #333333;
border: none !important;
outline: none;
width: 100%;
box-sizing: border-box;
}
input[type=”email”].codecut-input {
border-radius: 8px !important;
}
.codecut-input::placeholder {
color: #666666;
}
.codecut-email-row {
display: flex;
align-items: stretch;
height: 36px;
gap: 8px;
}
.codecut-email-row .codecut-input {
flex: 1;
}
.codecut-subscribe-btn {
background: #72BEFA;
color: #2F2D2E;
border: none;
border-radius: 8px;
padding: 8px 14px;
font-family: ‘Comfortaa’, sans-serif;
font-size: 14px;
font-weight: 500;
cursor: pointer;
text-decoration: none;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.3s ease;
}
.codecut-subscribe-btn:hover {
background: #5aa8e8;
}
.codecut-subscribe-btn:disabled {
background: #999;
cursor: not-allowed;
}
.codecut-message {
font-family: ‘Comfortaa’, sans-serif;
font-size: 12px;
padding: 8px;
border-radius: 6px;
display: none;
}
.codecut-message.success {
background: #d4edda;
color: #155724;
display: block;
}
@media (max-width: 480px) {
.codecut-email-row {
flex-direction: column;
height: auto;
gap: 8px;
}
.codecut-input {
border-radius: 8px;
height: 36px;
}
.codecut-subscribe-btn {
width: 100%;
text-align: center;
border-radius: 8px;
height: 36px;
}
}

Subscribe

Polars 1.41 – Speed Up Wide Parquet Scans Without Code Changes Read More »

Claude Code – Move Session Context Across Folders with /export

Grab your coffee. Here are this week’s highlights.

📅 Today’s Picks

Python contextlib – Reuse Context Managers as Function Decorators

Problem
Many developers know @contextmanager as a convenient way to add setup and teardown logic around a with block.
But fewer realize it can also be used as a function decorator.
A common pattern for timing or logging functions is to write a separate decorator using functools.wraps. But this means maintaining two versions of the same logic, which can drift over time.
Solution
Since Python 3.3, any function decorated with @contextmanager can be used both ways:

Need to time a code block? with duration("…"):
Need to time a whole function? @duration("…")

Claude Code – Move Session Context Across Folders with /export

Problem
Each Claude session lives in the folder where it was started. When you open Claude somewhere else, the previous context does not carry over.
You could ask Claude to summarize the old session and paste it into the new one, but summaries can miss important details, decisions, or tool outputs.
Solution
Claude Code‘s /export command gives you the full conversation as a plain text file, including tool calls.
How to use it:

Run /export filename.md in the original folder before switching
Open a new Claude session in the other folder
Ask Claude to read filename.md and continue the task

Stay Current with CodeCut

Actionable Python tips, curated for busy data pros. Skim in under 2 minutes, three times a week.

.codecut-subscribe-form .codecut-input {
background: #2F2D2E !important;
border: 1px solid #72BEFA !important;
color: #FFFFFF !important;
}
.codecut-subscribe-form .codecut-input::placeholder {
color: #999999 !important;
}
.codecut-subscribe-form .codecut-subscribe-btn {
background: #72BEFA !important;
color: #2F2D2E !important;
}
.codecut-subscribe-form .codecut-subscribe-btn:hover {
background: #5aa8e8 !important;
}

.codecut-subscribe-form {
max-width: 650px;
display: flex;
flex-direction: column;
gap: 8px;
}
.codecut-input {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background: #FFFFFF;
border-radius: 8px !important;
padding: 8px 12px;
font-family: ‘Comfortaa’, sans-serif !important;
font-size: 14px !important;
color: #333333;
border: none !important;
outline: none;
width: 100%;
box-sizing: border-box;
}
input[type=”email”].codecut-input {
border-radius: 8px !important;
}
.codecut-input::placeholder {
color: #666666;
}
.codecut-email-row {
display: flex;
align-items: stretch;
height: 36px;
gap: 8px;
}
.codecut-email-row .codecut-input {
flex: 1;
}
.codecut-subscribe-btn {
background: #72BEFA;
color: #2F2D2E;
border: none;
border-radius: 8px;
padding: 8px 14px;
font-family: ‘Comfortaa’, sans-serif;
font-size: 14px;
font-weight: 500;
cursor: pointer;
text-decoration: none;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.3s ease;
}
.codecut-subscribe-btn:hover {
background: #5aa8e8;
}
.codecut-subscribe-btn:disabled {
background: #999;
cursor: not-allowed;
}
.codecut-message {
font-family: ‘Comfortaa’, sans-serif;
font-size: 12px;
padding: 8px;
border-radius: 6px;
display: none;
}
.codecut-message.success {
background: #d4edda;
color: #155724;
display: block;
}
@media (max-width: 480px) {
.codecut-email-row {
flex-direction: column;
height: auto;
gap: 8px;
}
.codecut-input {
border-radius: 8px;
height: 36px;
}
.codecut-subscribe-btn {
width: 100%;
text-align: center;
border-radius: 8px;
height: 36px;
}
}

Subscribe

Claude Code – Move Session Context Across Folders with /export Read More »

smolagents: Build an AI Agent in 4 Lines of Code

Grab your coffee. Here are this week’s highlights.

📅 Today’s Picks

Claude Code: Run Tasks to Completion with /goal

Problem
Starting a task in Claude Code often means spending multiple turns going back and forth before it finally reaches the result you wanted.
Solution
Claude Code‘s /goal command lets you define a completion condition once, then continues working until that condition is met.
After each turn, a lightweight model evaluates the conversation against your condition. If the goal is not satisfied, Claude gets sent back for another turn with a short explanation of what still needs to be done.
To get the most out of /goal, write a condition the evaluator can actually verify.

Name a measurable end state instead of a vague target (e.g. “all tests in test/auth pass” instead of “auth is working”)
List constraints that must hold along the way (e.g. “no other test file is modified” or “no tests are skipped or deleted”)
Add a safety limit like “stop after 20 turns” to avoid endless iterations.

📖 View Full Article

smolagents: Build an AI Agent in 4 Lines of Code

Problem
LangChain and LangGraph are powerful, but they also come with concepts like chains, runnables, and state graphs.
That is useful for complex workflows, but overkill when you just want to give a model a tool and let it solve a task.
Solution
smolagents from Hugging Face is a barebones agent library designed for simplicity.
In roughly 1,000 lines of code, it gives you the core pieces needed to build a working agent with a single import and three lines of setup.
Key features:

Agents act by writing Python in a sandbox, the same way you’d script a task in a notebook
Model-agnostic design, swap between OpenAI, Anthropic, local Ollama, or Hugging Face Inference
Push agents to the Hugging Face Hub to share with the community

Stay Current with CodeCut

Actionable Python tips, curated for busy data pros. Skim in under 2 minutes, three times a week.

.codecut-subscribe-form .codecut-input {
background: #2F2D2E !important;
border: 1px solid #72BEFA !important;
color: #FFFFFF !important;
}
.codecut-subscribe-form .codecut-input::placeholder {
color: #999999 !important;
}
.codecut-subscribe-form .codecut-subscribe-btn {
background: #72BEFA !important;
color: #2F2D2E !important;
}
.codecut-subscribe-form .codecut-subscribe-btn:hover {
background: #5aa8e8 !important;
}

.codecut-subscribe-form {
max-width: 650px;
display: flex;
flex-direction: column;
gap: 8px;
}
.codecut-input {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background: #FFFFFF;
border-radius: 8px !important;
padding: 8px 12px;
font-family: ‘Comfortaa’, sans-serif !important;
font-size: 14px !important;
color: #333333;
border: none !important;
outline: none;
width: 100%;
box-sizing: border-box;
}
input[type=”email”].codecut-input {
border-radius: 8px !important;
}
.codecut-input::placeholder {
color: #666666;
}
.codecut-email-row {
display: flex;
align-items: stretch;
height: 36px;
gap: 8px;
}
.codecut-email-row .codecut-input {
flex: 1;
}
.codecut-subscribe-btn {
background: #72BEFA;
color: #2F2D2E;
border: none;
border-radius: 8px;
padding: 8px 14px;
font-family: ‘Comfortaa’, sans-serif;
font-size: 14px;
font-weight: 500;
cursor: pointer;
text-decoration: none;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.3s ease;
}
.codecut-subscribe-btn:hover {
background: #5aa8e8;
}
.codecut-subscribe-btn:disabled {
background: #999;
cursor: not-allowed;
}
.codecut-message {
font-family: ‘Comfortaa’, sans-serif;
font-size: 12px;
padding: 8px;
border-radius: 6px;
display: none;
}
.codecut-message.success {
background: #d4edda;
color: #155724;
display: block;
}
@media (max-width: 480px) {
.codecut-email-row {
flex-direction: column;
height: auto;
gap: 8px;
}
.codecut-input {
border-radius: 8px;
height: 36px;
}
.codecut-subscribe-btn {
width: 100%;
text-align: center;
border-radius: 8px;
height: 36px;
}
}

Subscribe

smolagents: Build an AI Agent in 4 Lines of Code Read More »

Never Use yaml.load() in Python. Here’s Why.

Grab your coffee. Here are this week’s highlights.

📅 Today’s Picks

Never Use yaml.load() in Python. Here’s Why.

Problem
Has your AI assistant ever suggested yaml.load() to parse a config file?
It’s an easy mistake: yaml.load() looks like a clean way to turn YAML into a Python dict, and AI tools generate it freely because it appears in plenty of legacy code.
But yaml.load() can do more than parse text. It can execute Python objects embedded in the YAML, meaning anyone who controls that file could run shell commands on your machine.
Solution
Use yaml.safe_load() instead. It only supports standard YAML types like mappings, lists, strings, numbers, booleans, and null, and rejects anything that tries to execute code.
To catch unsafe yaml.load() calls automatically, scan your codebase with Bandit.

📖 View Full Article

Context7: Stop AI Agents from Generating Deprecated Syntax

Problem
AI coding assistants often generate code using training data that may already be outdated.
That means if you ask for Polars 1.x code, the model may still generate deprecated 0.x APIs from older training data.
Solution
Context7 solves this by pulling the latest, version-specific library docs directly into the prompt before the assistant writes any code. That way, it generates code against the API that actually exists today.
Other capabilities:

One command sets it up across Cursor, Claude Code, Copilot, and 30+ clients
Trigger with use context7 in any prompt
Runs as either an MCP server or a CLI + skill, so it works with or without MCP support
Automatically loads version-matched docs like “Polars 1.0”

📚 Latest Deep Dives

Bandit: Audit AI-Generated Python for Security Flaws

LLMs have become extremely good at generating syntactically valid Python, but security quality has barely improved.
Veracode’s Spring 2026 GenAI Code Security Report found that security pass rates have remained stuck near 55% since 2024.
That gap exists because models learn from public code full of insecure patterns and reproduce them when prompted.
At the same time, reviewers usually verify whether code works, not whether it introduces vulnerabilities.
Bandit is a static analyzer for Python that identifies insecure patterns by matching code against 60+ Common Weakness Enumeration (CWE) rules.
This article walks through 8 common anti-patterns in AI-generated Python and how to fix them with Bandit.

📖 View Full Article

☕️ Weekly Finds

beartype
[Code Quality]
– Near-real-time pure-Python runtime type-checker. Decorate a function and catch type violations the moment they happen, not after a stack trace.

vulture
[Code Quality]
– Find dead Python code. Scans your project for unused functions, classes, imports, and variables so you can safely delete them.

pyupgrade
[Code Quality]
– A tool (and pre-commit hook) that automatically upgrades Python syntax to newer language versions. Drop f-strings, dict literals, and modern type hints in one sweep.

Looking for a specific tool? Explore 70+ Python tools →

Stay Current with CodeCut

Actionable Python tips, curated for busy data pros. Skim in under 2 minutes, three times a week.

.codecut-subscribe-form .codecut-input {
background: #2F2D2E !important;
border: 1px solid #72BEFA !important;
color: #FFFFFF !important;
}
.codecut-subscribe-form .codecut-input::placeholder {
color: #999999 !important;
}
.codecut-subscribe-form .codecut-subscribe-btn {
background: #72BEFA !important;
color: #2F2D2E !important;
}
.codecut-subscribe-form .codecut-subscribe-btn:hover {
background: #5aa8e8 !important;
}

.codecut-subscribe-form {
max-width: 650px;
display: flex;
flex-direction: column;
gap: 8px;
}
.codecut-input {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background: #FFFFFF;
border-radius: 8px !important;
padding: 8px 12px;
font-family: ‘Comfortaa’, sans-serif !important;
font-size: 14px !important;
color: #333333;
border: none !important;
outline: none;
width: 100%;
box-sizing: border-box;
}
input[type=”email”].codecut-input {
border-radius: 8px !important;
}
.codecut-input::placeholder {
color: #666666;
}
.codecut-email-row {
display: flex;
align-items: stretch;
height: 36px;
gap: 8px;
}
.codecut-email-row .codecut-input {
flex: 1;
}
.codecut-subscribe-btn {
background: #72BEFA;
color: #2F2D2E;
border: none;
border-radius: 8px;
padding: 8px 14px;
font-family: ‘Comfortaa’, sans-serif;
font-size: 14px;
font-weight: 500;
cursor: pointer;
text-decoration: none;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.3s ease;
}
.codecut-subscribe-btn:hover {
background: #5aa8e8;
}
.codecut-subscribe-btn:disabled {
background: #999;
cursor: not-allowed;
}
.codecut-message {
font-family: ‘Comfortaa’, sans-serif;
font-size: 12px;
padding: 8px;
border-radius: 6px;
display: none;
}
.codecut-message.success {
background: #d4edda;
color: #155724;
display: block;
}
@media (max-width: 480px) {
.codecut-email-row {
flex-direction: column;
height: auto;
gap: 8px;
}
.codecut-input {
border-radius: 8px;
height: 36px;
}
.codecut-subscribe-btn {
width: 100%;
text-align: center;
border-radius: 8px;
height: 36px;
}
}

Subscribe

Never Use yaml.load() in Python. Here’s Why. Read More »

Bandit: Catch Insecure Patterns in AI-Generated Python Code

Grab your coffee. Here are this week’s highlights.

📅 Today’s Picks

Bandit: Catch Insecure Patterns in AI-Generated Python Code

Problem
LLMs have become extremely good at generating syntactically valid Python, but security quality has barely improved.
Veracode’s Spring 2026 GenAI Code Security Report found that security pass rates have remained stuck near 55% since 2024.
That gap exists because models learn from public code full of insecure patterns and reproduce them when prompted.
At the same time, reviewers usually verify whether code works, not whether it introduces vulnerabilities.
Solution
Bandit is a static analyzer for Python that identifies insecure patterns by matching code against 60+ Common Weakness Enumeration (CWE) rules.
Key capabilities:

Flags hardcoded secrets, weak hashes (MD5, SHA1), and unsafe deserialization
Detects SQL string concatenation, eval, and exec injection risks
Catches empty except blocks and unpinned Hugging Face downloads
Integrates with pre-commit hooks and GitHub Actions out of the box
Maps every finding to a CWE ID so issues stay auditable

📖 View Full Article

llama.cpp: Run LLMs 70% Faster Than Ollama on the Same GPU

Problem
An r/LocalLLaMA benchmark on Qwen-3 Coder 32B (FP16) measured Ollama at 30 tokens/sec and llama.cpp at 52 tokens/sec on the same model and hardware.
Ollama is built on top of llama.cpp, so the core inference engine is identical. The performance gap comes from configuration.
Solution
Ollama ships with conservative defaults designed to work reliably across many systems. llama.cpp exposes the low-level tuning flags so you can optimize specifically for your hardware.
Key flags to tune:

GPU offload (-ngl 99): put the entire model on your GPU instead of partial offload
Throughput (–batch-size): bigger means faster prompts but more GPU memory
Context length (–cache-type-k q4): use less GPU memory per token so longer prompts fit
Generation speed (-md): run a small helper model alongside your main model for 2-3x faster generation

📖 View Full Article

📚 Latest Deep Dives

Bandit: Audit AI-Generated Python for Security Flaws

LLMs have become extremely good at generating syntactically valid Python, but security quality has barely improved.
Veracode’s Spring 2026 GenAI Code Security Report found that security pass rates have remained stuck near 55% since 2024.
That gap exists because models learn from public code full of insecure patterns and reproduce them when prompted.
At the same time, reviewers usually verify whether code works, not whether it introduces vulnerabilities.
Bandit is a static analyzer for Python that identifies insecure patterns by matching code against 60+ Common Weakness Enumeration (CWE) rules.
This article walks through 8 common anti-patterns in AI-generated Python and how to fix them with Bandit.

📖 View Full Article

☕️ Weekly Finds

scalene
[Code Quality]
– A high-performance CPU, GPU, and memory profiler for Python with AI-powered optimization proposals.

pymc-marketing
[Data Analysis]
– Bayesian marketing toolbox in PyMC. Includes Media Mix Modeling (MMM), customer lifetime value (CLV), and buy-till-you-die (BTYD) models.

cronboard
[Workflow Automation]
– A terminal-based dashboard for managing cron jobs locally and on remote servers. Add, edit, pause, resume, and search jobs from the terminal.

Looking for a specific tool? Explore 70+ Python tools →

Stay Current with CodeCut

Actionable Python tips, curated for busy data pros. Skim in under 2 minutes, three times a week.

.codecut-subscribe-form .codecut-input {
background: #2F2D2E !important;
border: 1px solid #72BEFA !important;
color: #FFFFFF !important;
}
.codecut-subscribe-form .codecut-input::placeholder {
color: #999999 !important;
}
.codecut-subscribe-form .codecut-subscribe-btn {
background: #72BEFA !important;
color: #2F2D2E !important;
}
.codecut-subscribe-form .codecut-subscribe-btn:hover {
background: #5aa8e8 !important;
}

.codecut-subscribe-form {
max-width: 650px;
display: flex;
flex-direction: column;
gap: 8px;
}
.codecut-input {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background: #FFFFFF;
border-radius: 8px !important;
padding: 8px 12px;
font-family: ‘Comfortaa’, sans-serif !important;
font-size: 14px !important;
color: #333333;
border: none !important;
outline: none;
width: 100%;
box-sizing: border-box;
}
input[type=”email”].codecut-input {
border-radius: 8px !important;
}
.codecut-input::placeholder {
color: #666666;
}
.codecut-email-row {
display: flex;
align-items: stretch;
height: 36px;
gap: 8px;
}
.codecut-email-row .codecut-input {
flex: 1;
}
.codecut-subscribe-btn {
background: #72BEFA;
color: #2F2D2E;
border: none;
border-radius: 8px;
padding: 8px 14px;
font-family: ‘Comfortaa’, sans-serif;
font-size: 14px;
font-weight: 500;
cursor: pointer;
text-decoration: none;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.3s ease;
}
.codecut-subscribe-btn:hover {
background: #5aa8e8;
}
.codecut-subscribe-btn:disabled {
background: #999;
cursor: not-allowed;
}
.codecut-message {
font-family: ‘Comfortaa’, sans-serif;
font-size: 12px;
padding: 8px;
border-radius: 6px;
display: none;
}
.codecut-message.success {
background: #d4edda;
color: #155724;
display: block;
}
@media (max-width: 480px) {
.codecut-email-row {
flex-direction: column;
height: auto;
gap: 8px;
}
.codecut-input {
border-radius: 8px;
height: 36px;
}
.codecut-subscribe-btn {
width: 100%;
text-align: center;
border-radius: 8px;
height: 36px;
}
}

Subscribe

Bandit: Catch Insecure Patterns in AI-Generated Python Code Read More »

Slim: Shrink Docker Images by 30x with One Command

Grab your coffee. Here are this week’s highlights.

📅 Today’s Picks

Slim: Shrink Docker Images by 30x with One Command

Problem
Docker images include the entire OS layer. For a simple Python app, this is unnecessary because it never touches the shells, compilers, and system utilities bundled inside.
This inflates images to hundreds of megabytes, wasting storage and adding time to every deploy.
Solution
Slim automatically analyzes your container at runtime to identify which files are actually used, then builds a minimal image with only essential components.
Slim works alongside Docker, not instead of it:

Step 1: Build your image with docker build
Step 2: Minify with slim build your-image
Step 3: Push the .slim image to your registry
Your Dockerfile and workflow stay the same

Polars: Vectorize List Column Transformations with list.eval

Problem
When working with list columns, most people reach for apply with a Python lambda that loops over every list row by row.
That approach breaks vectorization, so performance quickly degrades as the dataset grows.
Solution
Polars solves this with list.eval, which runs a full expression against each list using pl.element() and stays fully vectorized.
Key benefits:

Vectorized per-element transformations without Python loops
Support for a wide range of expressions, including aggregations like max, mean, and sum
Composable with other Polars expressions for clean, readable pipelines

📖 View Full Article

☕️ Weekly Finds

pyupgrade
[Code Quality]
– A tool (and pre-commit hook) to automatically upgrade syntax for newer versions of Python.

doxx
[Python Utils]
– Expose the contents of .docx files without leaving your terminal. Fast, safe, and smart, with no Office required.

ingestr
[Data Processing]
– ingestr is a CLI tool to copy data between any databases with a single command seamlessly.

Looking for a specific tool? Explore 70+ Python tools →

Stay Current with CodeCut

Actionable Python tips, curated for busy data pros. Skim in under 2 minutes, three times a week.

.codecut-subscribe-form .codecut-input {
background: #2F2D2E !important;
border: 1px solid #72BEFA !important;
color: #FFFFFF !important;
}
.codecut-subscribe-form .codecut-input::placeholder {
color: #999999 !important;
}
.codecut-subscribe-form .codecut-subscribe-btn {
background: #72BEFA !important;
color: #2F2D2E !important;
}
.codecut-subscribe-form .codecut-subscribe-btn:hover {
background: #5aa8e8 !important;
}

.codecut-subscribe-form {
max-width: 650px;
display: flex;
flex-direction: column;
gap: 8px;
}
.codecut-input {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background: #FFFFFF;
border-radius: 8px !important;
padding: 8px 12px;
font-family: ‘Comfortaa’, sans-serif !important;
font-size: 14px !important;
color: #333333;
border: none !important;
outline: none;
width: 100%;
box-sizing: border-box;
}
input[type=”email”].codecut-input {
border-radius: 8px !important;
}
.codecut-input::placeholder {
color: #666666;
}
.codecut-email-row {
display: flex;
align-items: stretch;
height: 36px;
gap: 8px;
}
.codecut-email-row .codecut-input {
flex: 1;
}
.codecut-subscribe-btn {
background: #72BEFA;
color: #2F2D2E;
border: none;
border-radius: 8px;
padding: 8px 14px;
font-family: ‘Comfortaa’, sans-serif;
font-size: 14px;
font-weight: 500;
cursor: pointer;
text-decoration: none;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.3s ease;
}
.codecut-subscribe-btn:hover {
background: #5aa8e8;
}
.codecut-subscribe-btn:disabled {
background: #999;
cursor: not-allowed;
}
.codecut-message {
font-family: ‘Comfortaa’, sans-serif;
font-size: 12px;
padding: 8px;
border-radius: 6px;
display: none;
}
.codecut-message.success {
background: #d4edda;
color: #155724;
display: block;
}
@media (max-width: 480px) {
.codecut-email-row {
flex-direction: column;
height: auto;
gap: 8px;
}
.codecut-input {
border-radius: 8px;
height: 36px;
}
.codecut-subscribe-btn {
width: 100%;
text-align: center;
border-radius: 8px;
height: 36px;
}
}

Subscribe

Slim: Shrink Docker Images by 30x with One Command Read More »

Mem0: Turn AI Conversations into a Knowledge Graph

Grab your coffee. Here are this week’s highlights.

📅 Today’s Picks

Mem0: Turn AI Conversations into a Knowledge Graph

Problem
Vector databases store each memory as an independent embedding. You can search for similar text, but they cannot link entities across facts or follow relationships between them.
Store “Alice and Bob are collaborating” and “Alice leads payments” separately, and a vector store cannot recognize that both facts refer to the same Alice.
Solution
Mem0 fixes this by extracting entities and relationships from each conversation.
When you store “Alice and Bob are collaborating” and “Alice leads payments,” Mem0 recognizes that both facts refer to the same Alice and links them in a knowledge graph.
Key capabilities:

Reads raw conversations and identifies the entities for you
Relationship tracking between people, projects, and concepts
A memory layer that grows smarter with every interaction

🧪 Run code

lakeFS: Bring Git-Style Branches and Commits to Cloud Storage

Problem
Cloud storage like S3, Google Cloud Storage, and Azure Blob has no concept of versions, branches, or commits like Git does.
As a result, testing changes can mean copying terabytes of data, and fixing mistakes requires tedious file-by-file restores.
Solution
lakeFS turns your cloud storage into a Git-like repository. You get branches, commits, merges, and instant rollback, all without copying data.

☕️ Weekly Finds

unsloth
[LLM]
– Fine-tune LLMs 5x faster with 60% less memory using QLoRA, no accuracy loss.

context7
[RAG]
– Pulls up-to-date, version-specific docs and code examples straight into your LLM prompts and AI code editors.

Repomix
[LLM]
– Packs your entire repository into a single AI-friendly file you can paste into Claude, ChatGPT, or Gemini.

Looking for a specific tool? Explore 70+ Python tools →

Stay Current with CodeCut

Actionable Python tips, curated for busy data pros. Skim in under 2 minutes, three times a week.

.codecut-subscribe-form .codecut-input {
background: #2F2D2E !important;
border: 1px solid #72BEFA !important;
color: #FFFFFF !important;
}
.codecut-subscribe-form .codecut-input::placeholder {
color: #999999 !important;
}
.codecut-subscribe-form .codecut-subscribe-btn {
background: #72BEFA !important;
color: #2F2D2E !important;
}
.codecut-subscribe-form .codecut-subscribe-btn:hover {
background: #5aa8e8 !important;
}

.codecut-subscribe-form {
max-width: 650px;
display: flex;
flex-direction: column;
gap: 8px;
}
.codecut-input {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background: #FFFFFF;
border-radius: 8px !important;
padding: 8px 12px;
font-family: ‘Comfortaa’, sans-serif !important;
font-size: 14px !important;
color: #333333;
border: none !important;
outline: none;
width: 100%;
box-sizing: border-box;
}
input[type=”email”].codecut-input {
border-radius: 8px !important;
}
.codecut-input::placeholder {
color: #666666;
}
.codecut-email-row {
display: flex;
align-items: stretch;
height: 36px;
gap: 8px;
}
.codecut-email-row .codecut-input {
flex: 1;
}
.codecut-subscribe-btn {
background: #72BEFA;
color: #2F2D2E;
border: none;
border-radius: 8px;
padding: 8px 14px;
font-family: ‘Comfortaa’, sans-serif;
font-size: 14px;
font-weight: 500;
cursor: pointer;
text-decoration: none;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.3s ease;
}
.codecut-subscribe-btn:hover {
background: #5aa8e8;
}
.codecut-subscribe-btn:disabled {
background: #999;
cursor: not-allowed;
}
.codecut-message {
font-family: ‘Comfortaa’, sans-serif;
font-size: 12px;
padding: 8px;
border-radius: 6px;
display: none;
}
.codecut-message.success {
background: #d4edda;
color: #155724;
display: block;
}
@media (max-width: 480px) {
.codecut-email-row {
flex-direction: column;
height: auto;
gap: 8px;
}
.codecut-input {
border-radius: 8px;
height: 36px;
}
.codecut-subscribe-btn {
width: 100%;
text-align: center;
border-radius: 8px;
height: 36px;
}
}

Subscribe

Mem0: Turn AI Conversations into a Knowledge Graph Read More »

Generate Time-Sortable IDs with Python 3.14’s UUID v7

Grab your coffee. Here are this week’s highlights.

📅 Today’s Picks

Generate Time-Sortable IDs with Python 3.14’s UUID v7

Problem
UUID4 generates purely random identifiers that lack chronological ordering.
Without embedded timestamps, you need separate timestamp fields and custom sorting logic to organize records by creation time.
Solution
Python 3.14 introduces UUID version 7 with built-in timestamp ordering.
Key features:

Determine creation order by comparing two UUIDs directly
Retrieve exact creation time by extracting the embedded timestamp

Pyrefly: Automatic Type Inference for Python

Problem
By default, MyPy ignores untyped function bodies, forcing you to manually annotate variables and return types to get meaningful type checking.
This adds overhead and clutters your code with types that don’t add much value.
Solution
Pyrefly automatically infers return types and local variable types from usage, so you only annotate function parameters and public APIs where it matters.
Other features:

Lightning-fast type checking built in Rust
Works with VSCode, Neovim, Helix, Emacs, and Zed
Recognizes dataclass transforms from attrs, Pydantic, and similar libraries

☕️ Weekly Finds

pyrsistent
[Python Utils]
– Persistent/Immutable/Functional data structures for Python

wrapt
[Python Utils]
– A Python module for decorators, wrappers and monkey patching

Shiny for Python
[Dashboard]
– Build fast, beautiful reactive web applications in Python

Looking for a specific tool? Explore 70+ Python tools →

Stay Current with CodeCut

Actionable Python tips, curated for busy data pros. Skim in under 2 minutes, three times a week.

.codecut-subscribe-form .codecut-input {
background: #2F2D2E !important;
border: 1px solid #72BEFA !important;
color: #FFFFFF !important;
}
.codecut-subscribe-form .codecut-input::placeholder {
color: #999999 !important;
}
.codecut-subscribe-form .codecut-subscribe-btn {
background: #72BEFA !important;
color: #2F2D2E !important;
}
.codecut-subscribe-form .codecut-subscribe-btn:hover {
background: #5aa8e8 !important;
}

.codecut-subscribe-form {
max-width: 650px;
display: flex;
flex-direction: column;
gap: 8px;
}
.codecut-input {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background: #FFFFFF;
border-radius: 8px !important;
padding: 8px 12px;
font-family: ‘Comfortaa’, sans-serif !important;
font-size: 14px !important;
color: #333333;
border: none !important;
outline: none;
width: 100%;
box-sizing: border-box;
}
input[type=”email”].codecut-input {
border-radius: 8px !important;
}
.codecut-input::placeholder {
color: #666666;
}
.codecut-email-row {
display: flex;
align-items: stretch;
height: 36px;
gap: 8px;
}
.codecut-email-row .codecut-input {
flex: 1;
}
.codecut-subscribe-btn {
background: #72BEFA;
color: #2F2D2E;
border: none;
border-radius: 8px;
padding: 8px 14px;
font-family: ‘Comfortaa’, sans-serif;
font-size: 14px;
font-weight: 500;
cursor: pointer;
text-decoration: none;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.3s ease;
}
.codecut-subscribe-btn:hover {
background: #5aa8e8;
}
.codecut-subscribe-btn:disabled {
background: #999;
cursor: not-allowed;
}
.codecut-message {
font-family: ‘Comfortaa’, sans-serif;
font-size: 12px;
padding: 8px;
border-radius: 6px;
display: none;
}
.codecut-message.success {
background: #d4edda;
color: #155724;
display: block;
}
@media (max-width: 480px) {
.codecut-email-row {
flex-direction: column;
height: auto;
gap: 8px;
}
.codecut-input {
border-radius: 8px;
height: 36px;
}
.codecut-subscribe-btn {
width: 100%;
text-align: center;
border-radius: 8px;
height: 36px;
}
}

Subscribe

Generate Time-Sortable IDs with Python 3.14’s UUID v7 Read More »

kotaemon: Self-Hosted Document QA with Citations in One Command

Grab your coffee. Here are this week’s highlights.

📅 Today’s Picks

kotaemon: Self-Hosted Document QA with Citations in One Command

Problem
Building a RAG app for document Q&A usually means assembling a parser, vector database, retrieval pipeline, and UI from scratch.
Each piece has its own setup, and getting everything to work together can take hours of debugging.
Solution
kotaemon packages the entire RAG stack into a single Docker image, letting you skip the setup and go straight to asking questions.
Key features:

Citations linked to exact PDF pages for verifiable answers
Question answering across multiple documents with figures and tables
Works with local models or cloud APIs like OpenAI, Azure, and Groq
Extensible Gradio-based UI with multi-user document management

gws: Replace Bulky MCP Tools with 100+ Modular Skill Files

Problem
Connecting AI agents to Google Workspace through MCP often means injecting every tool definition into each request, even if only a couple are needed.
That overhead quickly eats into the token budget, leaving less room for reasoning and task execution.
Solution
gws solves this by replacing bulky tool definitions with 100+ modular SKILL.md files.
Agents load only the skills they need, keeping the context lean and efficient.
Key features:

Works with Claude Code, Cursor, Gemini CLI, and other AI agents out of the box
100+ skill files covering Google Docs, Sheets, Drive, Calendar, and more
Agents load only relevant skills instead of full tool definitions

☕️ Weekly Finds

unstructured
[RAG]
– Turn any document into clean, structured data ready for RAG pipelines and LLM applications.

json_repair
[LLM]
– Repair malformed JSON from LLMs, APIs, and logs. A drop-in replacement for json.loads() that auto-fixes broken output.

MindsDB
[AI Agents]
– Query AI models directly from your database using SQL. Connect 200+ data sources to LLMs, ML, and vector operations.

Looking for a specific tool? Explore 70+ Python tools →

Stay Current with CodeCut

Actionable Python tips, curated for busy data pros. Skim in under 2 minutes, three times a week.

.codecut-subscribe-form .codecut-input {
background: #2F2D2E !important;
border: 1px solid #72BEFA !important;
color: #FFFFFF !important;
}
.codecut-subscribe-form .codecut-input::placeholder {
color: #999999 !important;
}
.codecut-subscribe-form .codecut-subscribe-btn {
background: #72BEFA !important;
color: #2F2D2E !important;
}
.codecut-subscribe-form .codecut-subscribe-btn:hover {
background: #5aa8e8 !important;
}

.codecut-subscribe-form {
max-width: 650px;
display: flex;
flex-direction: column;
gap: 8px;
}
.codecut-input {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background: #FFFFFF;
border-radius: 8px !important;
padding: 8px 12px;
font-family: ‘Comfortaa’, sans-serif !important;
font-size: 14px !important;
color: #333333;
border: none !important;
outline: none;
width: 100%;
box-sizing: border-box;
}
input[type=”email”].codecut-input {
border-radius: 8px !important;
}
.codecut-input::placeholder {
color: #666666;
}
.codecut-email-row {
display: flex;
align-items: stretch;
height: 36px;
gap: 8px;
}
.codecut-email-row .codecut-input {
flex: 1;
}
.codecut-subscribe-btn {
background: #72BEFA;
color: #2F2D2E;
border: none;
border-radius: 8px;
padding: 8px 14px;
font-family: ‘Comfortaa’, sans-serif;
font-size: 14px;
font-weight: 500;
cursor: pointer;
text-decoration: none;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.3s ease;
}
.codecut-subscribe-btn:hover {
background: #5aa8e8;
}
.codecut-subscribe-btn:disabled {
background: #999;
cursor: not-allowed;
}
.codecut-message {
font-family: ‘Comfortaa’, sans-serif;
font-size: 12px;
padding: 8px;
border-radius: 6px;
display: none;
}
.codecut-message.success {
background: #d4edda;
color: #155724;
display: block;
}
@media (max-width: 480px) {
.codecut-email-row {
flex-direction: column;
height: auto;
gap: 8px;
}
.codecut-input {
border-radius: 8px;
height: 36px;
}
.codecut-subscribe-btn {
width: 100%;
text-align: center;
border-radius: 8px;
height: 36px;
}
}

Subscribe

kotaemon: Self-Hosted Document QA with Citations in One Command Read More »

TimescaleDB: Turn PostgreSQL into a Time-Series Engine with One Extension

Grab your coffee. Here are this week’s highlights.

📅 Today’s Picks

TimescaleDB: Turn PostgreSQL into a Time-Series Engine with One Extension

Problem
In standard PostgreSQL, all rows live in one table. As time-series data grows into the millions, queries cannot skip irrelevant data, so even recent lookups scan far more than needed.
Solution
TimescaleDB solves this with hypertables, which automatically partition data into time-based chunks.
Queries only touch the relevant chunks, leaving the rest untouched.
Other capabilities:

Shrink storage by up to 95% with columnar compression that stays fully queryable
Faster queries with continuous aggregates that refresh only new data
Built-in retention policies to automatically remove old data

Guidance: One Function for Clean LLM Labels

Problem
Classification tasks with LLMs can get messy. Instead of a clean label, you might get “Option A”, “The answer is A”, or a full explanation.
Cleaning this up requires extra parsing, retries, and validation that can make your system fragile.
Solution
With Guidance, the select() function constrains the model to return exactly one option from your list.
Key benefits:

Guarantees output matches one of your predefined options
Eliminate parsing code and regex patterns
Works with any list of valid choices

📖 View Full Article

☕️ Weekly Finds

TimesFM
[ML]
– Pretrained time-series foundation model by Google Research for zero-shot forecasting

timesketch
[Data Processing]
– Collaborative forensic timeline analysis tool

Orbit
[ML]
– Bayesian time series forecasting with an intuitive initialize-fit-predict interface

Looking for a specific tool? Explore 70+ Python tools →

Stay Current with CodeCut

Actionable Python tips, curated for busy data pros. Skim in under 2 minutes, three times a week.

.codecut-subscribe-form .codecut-input {
background: #2F2D2E !important;
border: 1px solid #72BEFA !important;
color: #FFFFFF !important;
}
.codecut-subscribe-form .codecut-input::placeholder {
color: #999999 !important;
}
.codecut-subscribe-form .codecut-subscribe-btn {
background: #72BEFA !important;
color: #2F2D2E !important;
}
.codecut-subscribe-form .codecut-subscribe-btn:hover {
background: #5aa8e8 !important;
}

.codecut-subscribe-form {
max-width: 650px;
display: flex;
flex-direction: column;
gap: 8px;
}
.codecut-input {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background: #FFFFFF;
border-radius: 8px !important;
padding: 8px 12px;
font-family: ‘Comfortaa’, sans-serif !important;
font-size: 14px !important;
color: #333333;
border: none !important;
outline: none;
width: 100%;
box-sizing: border-box;
}
input[type=”email”].codecut-input {
border-radius: 8px !important;
}
.codecut-input::placeholder {
color: #666666;
}
.codecut-email-row {
display: flex;
align-items: stretch;
height: 36px;
gap: 8px;
}
.codecut-email-row .codecut-input {
flex: 1;
}
.codecut-subscribe-btn {
background: #72BEFA;
color: #2F2D2E;
border: none;
border-radius: 8px;
padding: 8px 14px;
font-family: ‘Comfortaa’, sans-serif;
font-size: 14px;
font-weight: 500;
cursor: pointer;
text-decoration: none;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.3s ease;
}
.codecut-subscribe-btn:hover {
background: #5aa8e8;
}
.codecut-subscribe-btn:disabled {
background: #999;
cursor: not-allowed;
}
.codecut-message {
font-family: ‘Comfortaa’, sans-serif;
font-size: 12px;
padding: 8px;
border-radius: 6px;
display: none;
}
.codecut-message.success {
background: #d4edda;
color: #155724;
display: block;
}
@media (max-width: 480px) {
.codecut-email-row {
flex-direction: column;
height: auto;
gap: 8px;
}
.codecut-input {
border-radius: 8px;
height: 36px;
}
.codecut-subscribe-btn {
width: 100%;
text-align: center;
border-radius: 8px;
height: 36px;
}
}

Subscribe

TimescaleDB: Turn PostgreSQL into a Time-Series Engine with One Extension Read More »

Scroll to Top

Work with Khuyen Tran

Work with Khuyen Tran