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

python

Auto-created tag for python

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 »

dotenvx: Commit .env Files to Git Without Leaking Secrets

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

📅 Today’s Picks

dotenvx: Commit .env Files to Git Without Leaking Secrets

Problem
A .env file stores configuration like API keys and database URLs in plain text.
Because of that, committing it to git would leak every secret. Teams usually gitignore the file and distribute credentials manually through Slack or password managers instead.
Over time, this leads to secrets being scattered across different places without a clear source of truth.
Solution
dotenvx changes this by encrypting .env files with public-key cryptography.
You can commit the encrypted file to git, and your team only needs a private key (kept in a gitignored .env.keys file) to decrypt it when running the application.
Key capabilities:

Works with Python, Node, Go, Ruby, Rust, and more via a single CLI
Encrypts .env files using the same cryptography as Bitcoin (secp256k1)
Separates environments with .env.production, .env.staging, and .env.ci
Requires zero infrastructure (no Vault, no KMS, no cloud setup)

Bandit: Find Python Security Flaws with One Pre-Commit Hook

Problem
AI code generators can produce working code in seconds, but they often introduce risky patterns like hardcoding passwords or API keys directly in the source.
These issues can easily slip through a quick review.
Solution
Bandit is a Python security linter that automatically detects vulnerability patterns in your code, from hardcoded secrets to unsafe function calls.
Key capabilities:

Detects hardcoded passwords, tokens, and API keys
Flags risky calls like eval, exec, and pickle
Seamlessly integrates into pre-commit hooks, CI workflows, and editors
Generates severity-ranked reports so you can prioritize fixes

☕️ Weekly Finds

vulture
[Code Quality]
– Find dead Python code with confidence-scored static analysis

responses
[Testing]
– A utility library for mocking out the Python Requests library

beartype
[Code Quality]
– Unbearably fast near-real-time pure-Python runtime type-checker

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

dotenvx: Commit .env Files to Git Without Leaking Secrets Read More »

Ibis: Write Once, Query 22+ SQL Databases

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

📅 Today’s Picks

mem0: Auto-Update LLM Memory When Facts Change

Problem
Developers commonly store conversation embeddings in ChromaDB or Pinecone, then retrieve similar chunks before each LLM response.
But these systems do not handle changing information. When facts evolve, they simply accumulate, leaving your AI with conflicting context and no way to resolve it.
Solution
mem0 introduces a smarter memory layer. It identifies contradictions, updates existing knowledge, and ensures only the latest facts are retained.
Key capabilities:

Extracts structured facts directly from raw conversations
Conflict resolution that replaces outdated facts instead of duplicating them
Memory isolation across users, sessions, and agents
Retrieves context semantically, not just by similarity

Ibis: Write Once, Query 22+ SQL Databases

Problem
Running queries across multiple databases often means rewriting the same logic for each backend’s SQL dialect. A query that works in DuckDB may require syntax changes for PostgreSQL, and another rewrite for BigQuery.
Solution
Ibis removes that friction by compiling Python expressions into each backend’s native SQL. Swap the connection, and the same code runs across 22+ databases.
Key features:

Write once, run on DuckDB, PostgreSQL, BigQuery, Snowflake, and 18+ more
Lazy execution that builds and optimizes the query plan before sending it to the database
Intuitive chaining syntax similar to Polars

📖 View Full Article

☕️ Weekly Finds

doccano
[Data Processing]
– Open source annotation tool for text classification, sequence labeling, and sequence-to-sequence tasks

Data Formulator
[Data Visualization]
– AI-powered data visualization tool that transforms and explores data with drag-and-drop charts and AI agents

qsv
[Data Processing]
– Blazing-fast CLI toolkit for querying, transforming, and analyzing CSV data at scale

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

Ibis: Write Once, Query 22+ SQL Databases Read More »

Autoresearch: Run ML Experiments on Autopilot with Git-Backed Rollback

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

📅 Today’s Picks

gws: One CLI for Drive, Gmail, Calendar, and Sheets

Problem
Managing Workspace through the browser means clicking through multiple apps just to pull a spreadsheet, check your calendar, and send a follow-up email.
That manual loop adds up fast when you repeat it daily or weekly.
Solution
gws is a CLI that unifies every Workspace service behind simple terminal commands with structured JSON output ready for scripting.
Key capabilities:

Single interface for Drive, Gmail, Calendar, Sheets, Docs, and more
JSON output that pipes directly into your existing scripts and workflows
100+ AI agent skills that let LLMs orchestrate Workspace tasks programmatically

Autoresearch: Run ML Experiments on Autopilot with Git-Backed Rollback

Problem
Running experiments manually means adjusting one hyperparameter, waiting for training to finish, checking results, and repeating for hours.
Progress stops the moment you step away, and you only explore the narrow set of ideas you thought of.
Solution
Autoresearch is an open-source framework that solves this with an autonomous loop. An AI agent commits each change to git, trains for 5 minutes, and checks whether the model actually improved.
If the metric improves, the change stays. If not, the agent reverts to the last good state automatically.
Key benefits:

Git-backed snapshots before every experiment for instant rollback
Structured results log that survives crashes and tracks every attempt
Continuous looping with no human confirmation needed

☕️ Weekly Finds

PyMC
[ML]
– Bayesian statistical modeling with advanced MCMC and variational inference algorithms

lifelines
[ML]
– Survival analysis in Python, including Kaplan-Meier, Nelson-Aalen, and regression

causal-learn
[ML]
– Causal discovery with constraint-based, score-based, and functional causal model methods

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

Autoresearch: Run ML Experiments on Autopilot with Git-Backed Rollback Read More »

Type Check Your Python Codebase 15x Faster with Pyrefly

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

📅 Today’s Picks

Codon: One Decorator to Turn Python into C Speed

Problem
Slow Python functions in large codebases are painful to optimize. You might try Numba or Cython, but Numba only works for numerical code with NumPy arrays.
You might try Cython, but it needs .pyx files, variable type annotations, and build setup. That’s hours of refactoring before you see any speedup.
Solution
Codon solves this with a single @codon.jit decorator that compiles your Python to machine code.
Key benefits:

Works on any Python code, not just NumPy arrays
No type annotations required since types are inferred automatically
Compiled functions are cached for instant repeated calls
Zero code changes beyond adding the decorator

The example below shows the real performance:

Pure Python: 0.240s
Codon first call: 0.324s (one-time compilation)
Codon cached calls: 0.006s (37x faster)

🧪 Run code

Datadog: Trace Bad Data from Dashboard to Root Cause in One View (Sponsored)

Problem
If your pipeline isn’t connected end to end, debugging means jumping between tools and manually tracing the issue. It’s slow and error-prone.
Solution
Instead of jumping between tools, Datadog Data Observability gives you one connected view from ingestion to dashboards.
It does this through:

Quality Monitoring: catches anomalies like missing rows or stale data automatically
Jobs Monitoring: gives visibility into Spark and Airflow runs, including failures and cost
Data and code lineage: traces problems upstream to the source and downstream to every affected dashboard, model, and report

📖 View Full Article

Type Check Your Python Codebase 15x Faster with Pyrefly

Problem
Tools like MyPy and Pyright process files sequentially, so larger codebases lead to longer wait times.
Solution
Pyrefly, Meta’s Rust-based type checker, runs checks in parallel, keeping performance nearly constant as your codebase grows.
Key features:

Re-checks only changed modules for faster incremental runs
Automatically infers types for variables and return values

On the PyTorch codebase, Pyrefly completes a full check in 2.4 seconds, about 15x faster than Pyright and 20x faster than MyPy.

📚 Latest Deep Dives

browser-use: Turn Plain English Prompts into Working Browser Automation

Traditional tools like Playwright rely on CSS selectors, tightly coupling your scraper to a site’s HTML. When the site changes, everything breaks and needs to be rewritten.
browser-use takes a different approach. You describe the goal in plain English, and an LLM decides what to click, type, and extract.
In this article, I tested browser-use on two real tasks:

Finding AI stories on Hacker News and synthesizing themes
Scraping Newegg for gaming laptops with specific constraints

I share the actual outputs, cost per run, and an honest breakdown of what worked and what didn’t so you can decide if it fits your use case.

📖 View Full Article

☕️ Weekly Finds

bandit
[Code Quality]
– A security linter that scans Python code for common vulnerabilities by building and analyzing abstract syntax trees.

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

vulture
[Code Quality]
– Finds unused code in Python programs, including dead functions, classes, variables, and unreachable code blocks.

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

Type Check Your Python Codebase 15x Faster with Pyrefly Read More »

browser-use: Turn Plain English Prompts into Working Browser Automation

Table of Contents

Introduction
What is browser-use?
Synthesizing Hacker News Themes
Working with the Output
What This Run Cost
A Second Experiment: Scraping Newegg
Trade-offs
When to Use Each Tool
Conclusion

Introduction
Traditional browser automation tools like Playwright require you to write CSS selectors for every element you want to extract:
# Extract a laptop's price from a product card
price = await card.locator("h4.price").text_content()

This approach works, but it tightly couples your scraper to the site’s HTML structure. If a class name changes, your scraper breaks. You then have to inspect the updated HTML and rewrite your selectors from scratch.
What if you could just describe what you want in plain English?
# Tell an AI agent what to extract
agent = Agent(
task="Find gaming laptops under $1500 and extract the name, price, and GPU",
llm=ChatOpenAI(model="gpt-4o"),
)

That is what browser-use does. Instead of describing the steps, you describe the goal, and an LLM works out the steps for you.

💻 Get the Code: Open the notebook in Google Colab to run it in your browser, or grab the source from GitHub.

Stay Current with CodeCut
Easy-to-digest articles on Python, AI, and open-source tools. Delivered twice a week.

.codecut-subscribe-wrap {
display: flex;
justify-content: center;
}

.codecut-subscribe-btn {
background: #72BEFA !important;
color: #2F2D2E !important;
border: none;
border-radius: 8px;
padding: 12px 28px;
font-family: inherit;
font-size: 16px;
font-weight: 700;
cursor: pointer;
text-decoration: none !important;
display: inline-flex;
align-items: center;
justify-content: center;
transition: background 0.3s ease;
}

.codecut-subscribe-btn:hover,
.codecut-subscribe-btn:focus {
background: #5aa8e8 !important;
color: #2F2D2E !important;
text-decoration: none !important;
}

/* Mobile responsive */
@media (max-width: 480px) {
.codecut-subscribe-btn {
width: 100%;
text-align: center;
}
}

Subscribe for free

What is browser-use?
browser-use is a Python library that gives an LLM a working browser. Under the hood it uses Playwright to drive the browser, but the LLM reads each page and decides what to click, type, and extract. You write the task in plain English, and the agent figures out the rest.
To install browser-use:
pip install browser-use
playwright install chromium

This article uses browser-use v0.12.5.
Since this tutorial uses OpenAI’s GPT-4o as the agent’s model, you will need an OpenAI API key. Store it in a .env file:
OPENAI_API_KEY=your-key-here

Then load it with python-dotenv:
import nest_asyncio

nest_asyncio.apply()

from dotenv import load_dotenv
load_dotenv()

Synthesizing Hacker News Themes
We will point browser-use at Hacker News and ask it to:
Find the top AI-related stories on the front page and identify the common themes.
This task is a good fit for browser-use because it mixes extraction with judgment: the agent has to classify each story and then reason across all of them to pull out themes.
Let’s set it up. First, define the output schema using Pydantic. This tells browser-use what structure to return:
import asyncio
from pydantic import BaseModel
from browser_use import Agent, ChatOpenAI

class HNResults(BaseModel):
titles: list[str]
points: list[int]
comments: list[int]
urls: list[str]
themes: list[str]
summary: str

Now define the agent. It takes four parameters:

task: the natural language instructions for what you want the agent to do.
llm: the model that drives the agent. Here we use GPT-4o.
output_model_schema: the Pydantic schema that tells the agent how to structure its final result.
calculate_cost: when set to True, browser-use tracks token usage and dollar cost so you can inspect them later.

async def find_ai_stories():
# Configure the agent with task, model, schema, and cost tracking
agent = Agent(
task=(
"Go to https://news.ycombinator.com/ and find "
"all stories on the front page that are "
"about AI, LLMs, or AI agents. "
"For each story, extract the title, points, "
"comment count, and URL. "
"Then identify 2-3 common themes across these "
"stories and write a short summary of what the "
"Hacker News community is currently excited or "
"concerned about regarding AI."
),
llm=ChatOpenAI(model="gpt-4o"),
output_model_schema=HNResults,
calculate_cost=True,
)

# Run the agent and get the structured result
history = await agent.run()
result = history.final_result()

# Parse into HNResults, falling back to an empty result if nothing came back
parsed = HNResults.model_validate_json(result) if result else HNResults(
titles=[], points=[], comments=[], urls=[], themes=[], summary="",
)
return parsed, history

Run the agent:
results, history = asyncio.run(find_ai_stories())
print(f"Found {len(results.titles)} AI-related stories")

📍 Step 1:
👍 Eval: Successfully navigated to the Hacker News front page
and identified several stories that may relate to AI.
🧠 Memory: On the Hacker News front page. Identified potential
AI-related stories by their titles. Need to extract
details for analysis.
🎯 Next goal: Extract details from the identified AI-related
stories on the front page.
▶️ extract: query: AI|LLM|AI agent, extract_links: True

📍 Step 2:
👍 Eval: Successfully extracted details of AI-related stories
from Hacker News.
🧠 Memory: Extracted details of AI-related stories. Ready to
analyze for common themes and summarize.
🎯 Next goal: Analyze the extracted stories to identify 2-3
common themes and write a summary.
▶️ done: 8 stories extracted, 3 themes identified

✅ Task completed successfully

⚠️ Agent reported success but judge thinks task failed
⚖️ Judge Verdict: ❌ FAIL
Failure Reason: The agent included a non-AI related story
('Solod – A subset of Go that translates to C') in its results.

Found 8 AI-related stories

Each step in the log shows the agent’s internal reasoning loop. There are four fields, and they work together to drive the next action:

Eval checks whether the last action worked. This makes the agent self-correcting, so failures get retried instead of silently propagating.
Memory tracks what has been done so far. This stops the agent from repeating expensive actions and is what makes multi-step tasks possible.
Next goal plans the next action based on eval and memory. The LLM decides what to do next, so you do not have to write a state machine.
Action executes the plan from a built-in toolkit of navigate, click, extract, and scroll. The agent picks the right tool on its own, so the same code works on a new site.

%%{init: {“theme”: “dark”}}%%
flowchart TD
Task([Task prompt]) –> Eval
Eval[Eval: check last action] –> Memory[Memory: track progress]
Memory –> NextGoal[Next goal: plan next step]
NextGoal –> Action[Action: execute from toolkit]
Action –>|Not done| Eval
Action –>|Done| Result([Worker result])
Once the worker declares success, a second LLM steps in as a judge.
This is a clever setup. Workers rarely catch their own mistakes without an independent perspective. Since the judge only sees the prompt and final result, it can objectively evaluate the output.
Here, it correctly identified that Solod is not an AI story.
%%{init: {“theme”: “dark”}}%%
flowchart TD
Result([Worker result]) –> Review[Judge: review against original task]
Review –> Verdict{Pass or fail?}
Verdict –>|Pass| Output([Trusted output])
Verdict –>|Fail| Retry([Retry or alert])
Let’s look at the results:
for title, points, comments, url in zip(
results.titles, results.points, results.comments, results.urls
):
print(f" {title}")
print(f" {points} points | {comments} comments")
print(f" {url}")
print()

print("Themes:")
for theme in results.themes:
print(f" – {theme}")

print(f"\nSummary: {results.summary}")

Show HN: Ghost Pepper – Local hold-to-talk speech-to-text for macOS
363 points | 170 comments
https://github.com/matthartman/ghost-pepper

Solod – A subset of Go that translates to C
122 points | 30 comments
https://github.com/solod-dev/solod

Issue: Claude Code is unusable for complex engineering tasks with Feb updates
1047 points | 587 comments
https://github.com/anthropics/claude-code/issues/42796

Sam Altman may control our future – can he be trusted?
1340 points | 542 comments
https://www.newyorker.com/magazine/2026/04/13/sam-altman-may-control-our-future-can-he-be-trusted

Launch HN: Freestyle – Sandboxes for Coding Agents
265 points | 145 comments
https://www.freestyle.sh/

A cryptography engineer's perspective on quantum computing timelines
455 points | 186 comments
https://words.filippo.io/crqc-timeline/

AI singer now occupies eleven spots on iTunes singles chart
166 points | 257 comments
https://www.showbiz411.com/2026/04/05/itunes-takeover-by-fake-ai-singer…

Show HN: Hippo, biologically inspired memory for AI agents
90 points | 17 comments
https://github.com/kitfunso/hippo-memory

Themes:
– AI in media and entertainment
– Ethical concerns about AI leadership
– Technical challenges in AI development

Summary: The Hacker News community is currently excited about advancements in AI tools like speech-to-text applications and biologically inspired memory systems. There are also significant discussions around ethical concerns regarding influential figures in AI like Sam Altman. Additionally, there are technical challenges being highlighted in the development of complex AI systems.

Most of the output is solid:

Structured fields are accurate. Titles, points, comments, and URLs are correct for every row.
Themes map to real stories. “AI in media and entertainment” lines up with the AI singer post, “Ethical concerns about AI leadership” with the Sam Altman piece, and “Technical challenges in AI development” with the Claude Code issue.
The summary reads like a take, not a list. Instead of restating each story, it picks out what the community is excited about (new AI tools), worried about (Sam Altman), and struggling with (complex AI systems).

However, the classifications are wrong in two places. Solod (a Go-to-C transpiler) and the quantum computing post both made the list even though neither is about AI.
Working with the Output
Once you have the structured output, you can do something with it. The simplest first step is to load it into a pandas DataFrame:
import pandas as pd

df = pd.DataFrame({
"title": results.titles,
"points": results.points,
"comments": results.comments,
"url": results.urls,
})
df

title
points
comments
url

0
Show HN: Ghost Pepper – Local hold-to-talk spe…
363
170
https://github.com/matthartman/ghost-pepper

1
Solod – A subset of Go that translates to C
122
30
https://github.com/solod-dev/solod

2
Issue: Claude Code is unusable for complex eng…
1047
587
https://github.com/anthropics/claude-code/issu…

3
Sam Altman may control our future – can he be …
1340
542
https://www.newyorker.com/magazine/2026/04/13/…

4
Launch HN: Freestyle – Sandboxes for Coding Ag…
265
145
https://www.freestyle.sh/

5
A cryptography engineer’s perspective on quant…
455
186
https://words.filippo.io/crqc-timeline/

6
AI singer now occupies eleven spots on iTunes …
166
257
https://www.showbiz411.com/2026/04/05/itunes-t…

7
Show HN: Hippo, biologically inspired memory f…
90
17
https://github.com/kitfunso/hippo-memory

Now you can drop the misclassified rows the judge flagged earlier and keep only the true AI stories:
misclassified_rows = [1, 5]
ai_only = df.drop(misclassified_rows).reset_index(drop=True)
ai_only

title
points
comments
url

0
Show HN: Ghost Pepper – Local hold-to-talk spe…
363
170
https://github.com/matthartman/ghost-pepper

1
Issue: Claude Code is unusable for complex eng…
1047
587
https://github.com/anthropics/claude-code/issu…

2
Sam Altman may control our future – can he be …
1340
542
https://www.newyorker.com/magazine/2026/04/13/…

3
Launch HN: Freestyle – Sandboxes for Coding Ag…
265
145
https://www.freestyle.sh/

4
AI singer now occupies eleven spots on iTunes …
166
257
https://www.showbiz411.com/2026/04/05/itunes-t…

5
Show HN: Hippo, biologically inspired memory f…
90
17
https://github.com/kitfunso/hippo-memory

What This Run Cost
Now let’s check what this synthesis cost in tokens, dollars, and time.
usage = history.usage
print(f"Total tokens: {usage.total_tokens:,}")
print(f"Total cost: ${usage.total_cost:.4f}")
print(f"Steps: {len(history.history)}")
print(f"Duration: {history.total_duration_seconds():.1f}s")

Total tokens: 42,339
Total cost: $0.1157
Steps: 3
Duration: 53.2s

12 cents and 53 seconds is what this run cost. Here is what the same money buys you elsewhere:

GPT-4o. A single long-prompt API call. Same dollar cost, but no browser, no scraping, no real page involved.
Your own time. Opening Hacker News, skimming 30 stories, copying the AI ones into a doc, and writing a summary by hand. Probably 10 to 20 minutes of focused work.
Playwright + LLM. A scraper to grab the page, one LLM call to classify, another to synthesize, and the code to glue them together. More code, more failure points, and likely more total tokens.

If 12 cents per run is too much for your use case, there are three ways to bring it down:

Use a cheaper model. Swap gpt-4o for gpt-4o-mini or claude-haiku. The same task often runs for under 2 cents, with some loss of reasoning quality.
Run a local model. browser-use works with Ollama and LM Studio, so the dollar cost drops to zero. The trade-off is that local models need to be 30B+ to handle structured output reliably, and each step is slower.
Tighten the prompt. Shorter tasks mean fewer steps, and each step carries the full conversation history forward, so cutting one step can save thousands of tokens.

For a full walkthrough on setting up local LLMs for workflows like this, see our LangChain and Ollama guide.

A Second Experiment: Scraping Newegg
browser-use doesn’t always work this well. To show where it breaks, I ran it on a harder task: scraping Newegg for gaming laptops. Here is the prompt:
task=(
"Go to https://www.newegg.com/Gaming-Laptops"
"/SubCategory/ID-3365 and find gaming laptops "
"matching these criteria:\n"
"- Price: $0-$1500\n"
"- GPU: NVIDIA GeForce RTX 50 Series\n"
"- RAM: 32GB\n"
"For each laptop, extract the name, "
"price, GPU, CPU, RAM, and storage. "
"Then pick the best value and explain why."
)

This run didn’t go well. Here are the issues:

Price filter: The agent typed the values but skipped APPLY, so the listings never refreshed.
32GB RAM constraint: Silently dropped. The final results all had 16GB.
Pagination: Stopped at the first page instead of collecting results from all pages.

Trade-offs
browser-use is powerful, but it comes with real trade-offs:

Speed: The agent took 30–60 seconds for the Hacker News task. Each step requires LLM reasoning, while a Playwright script would finish in ~5 seconds.
Cost: A single run is cheap (~$0.12), but costs grow quickly. Since each step carries full context, doubling steps can cost more than 2x.
Non-determinism: Results vary between runs. The agent may take different actions, and the judge may reach different conclusions.
Task fit: Results depend heavily on the page and what you ask for. The same tool can work well on one site and fail on another.

When to Use Each Tool
Knowing the trade-offs, here is how to decide which tool to reach for:

Metric
Playwright
browser-use

Speed
Fast
Slower

Cost per run
Free
Paid per LLM call

Deterministic
Yes
No

Works on a new site
Needs new selectors
Change the URL

Handles reasoning tasks
No (hardcoded rules)
Yes (LLM reasons)

Exact constraint satisfaction
Yes
No (silently relaxes hard constraints)

Choose Playwright when:

You need identical results every run
Speed matters (high-volume or frequent runs)
You need exact constraint satisfaction (e.g., “every result must have 32GB RAM”)

Choose browser-use when:

The task requires judgment or classification (e.g., “which of these stories are about AI”) rather than pattern matching
The task requires synthesis across multiple items (e.g., “what themes connect these”)
The page or task may change over time and you do not want to maintain selectors
You want scraping, classification, and reasoning in a single prompt instead of three separate pipelines

Conclusion
The best way to understand browser-use is to try it on a small project you actually care about. Here are a few ideas:

Summarize a Reddit thread. Provide a URL and ask for the top 3 arguments. Then schedule it to run daily across selected subreddits and post summaries to Slack.
Pull today’s top stories from a news site. Extract titles, sources, and short summaries, then schedule a daily digest sent to your inbox.
Watch the price of a single product. Monitor a product page and get notified when the price drops below a set threshold.

Each of these starts with a single prompt, costs just a few cents to test, and can quickly become something you use every day.
Related Tutorials

From CSS Selectors to Natural Language: Web Scraping with ScrapeGraphAI: Another natural-language scraping tool with a different architectural approach, built around graph-based extraction pipelines.

Stay Current with CodeCut
Easy-to-digest articles on Python, AI, and open-source tools. Delivered twice a week.

.codecut-subscribe-wrap {
display: flex;
justify-content: center;
}

.codecut-subscribe-btn {
background: #72BEFA !important;
color: #2F2D2E !important;
border: none;
border-radius: 8px;
padding: 12px 28px;
font-family: inherit;
font-size: 16px;
font-weight: 700;
cursor: pointer;
text-decoration: none !important;
display: inline-flex;
align-items: center;
justify-content: center;
transition: background 0.3s ease;
}

.codecut-subscribe-btn:hover,
.codecut-subscribe-btn:focus {
background: #5aa8e8 !important;
color: #2F2D2E !important;
text-decoration: none !important;
}

/* Mobile responsive */
@media (max-width: 480px) {
.codecut-subscribe-btn {
width: 100%;
text-align: center;
}
}

Subscribe for free

pre.mermaid { background: transparent !important; padding: 0 !important; } pre.mermaid svg { background: transparent !important; } pre.mermaid .cluster rect { fill: transparent !important; stroke: #555 !important; }

browser-use: Turn Plain English Prompts into Working Browser Automation Read More »

Chandra OCR: From Handwritten Notes to Structured Text in Seconds

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

🤝 Collaboration

Give Your AI Agent Live Web Access with Bright Data MCP
With basic search APIs, agents often miss critical context from sources like social platforms, forums, news, and answer engines. That leads to incomplete or outdated responses.
Bright Data’s MCP server unifies all web data access into one interface your AI agent can use directly.
With Bright Data MCP, your AI agent can access:

Search engines (Google, Bing, more)
Social media (Twitter/X, Reddit, Instagram, TikTok)
Web archives (historical web data, years deep)
Answer engines (ChatGPT, Perplexity, Gemini)

All through one connection.

🔗 Try Bright Data MCP

📅 Today’s Picks

Chandra OCR: From Handwritten Notes to Structured Text in Seconds

Problem
Most OCR tools are designed for printed text and struggle with handwritten notes, especially when they include diagrams, equations, and free-form writing.
Solution
Chandra OCR is built for this exact use case. It extracts text, images, and diagrams from handwritten notes and reconstructs them into clean Markdown or HTML.
How it compares to other OCR tools:

85.9% overall on the olmOCR benchmark, outperforming olmOCR 2 (82.4%), GPT-4o (69.9%), Gemini Flash 2 (63.8%), and Mistral OCR (72.0%)
Scores 89.3% on handwritten math, where most OCR tools struggle
Supports 90+ languages out of the box

Worktrunk: Give Every AI Agent Its Own Branch in Seconds

Problem
Git worktrees give each agent its own isolated copy of the repo, so multiple agents can edit files simultaneously without conflicts.
But the native commands are verbose and stop at creating the directory. Launching agents, installing dependencies, and cleaning up after merge are all separate manual steps.
Solution
Worktrunk is a CLI that makes git worktrees as easy as branches with just three core commands: switch, list, and remove.
Three commands cover the full lifecycle:

switch: Create a worktree, run hooks for dependency setup, and launch an agent
list: See diff status, commit counts, CI state, and AI-generated summaries per branch
merge: Squash, rebase, or fast-forward to main with automatic worktree and branch cleanup

☕️ Weekly Finds

niquests
[Python Utils]
– Drop-in replacement for Requests with automatic HTTP/1.1, HTTP/2, and HTTP/3 support, plus WebSocket and SSE built in.

codon
[Python Utils]
– A high-performance Python compiler that produces native machine code with 10-100x speedups and built-in multithreading support.

whenever
[Python Utils]
– Modern, type-safe datetime library for Python with a Rust extension for performance, inspired by Temporal.

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

Chandra OCR: From Handwritten Notes to Structured Text in Seconds Read More »

Browser-Use: Automate Any Browser Task with Plain English

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

📅 Today’s Picks

mem0: Give Your AI Memory Without Building a Vector DB

Problem
When you build an AI app using the OpenAI or Anthropic API, every conversation starts from scratch with no built-in memory between sessions.
Adding memory yourself with a vector database like ChromaDB requires writing custom extraction, deduplication, and scoping logic on top of the storage layer.
Solution
mem0 handles all of that in a single function call. Just pass in conversations and retrieve relevant memories when needed.
Key features:

Automatic fact extraction from raw conversations via memory.add()
Cross-session retrieval with memory.search() in any future conversation
Automatic conflict resolution when user preferences change over time

🧪 Run code

Browser-Use: Automate Any Browser Task with Plain English

Problem
Most data collection tasks go beyond simple extraction. You need to log in, apply filters, navigate pagination, and then gather results.
Selenium can handle navigation, but it requires maintaining CSS selectors that can easily break when a site changes.
Solution
Browser Use simplifies the entire process. Describe what you want, and it navigates, clicks, types, and extracts automatically.
Key features:

Natural language task descriptions
Works with GPT-4, Claude, Gemini, and local models via Ollama
Structured output with Pydantic models

📚 Latest Deep Dives

How to Test GitHub Actions Locally with act

Debugging GitHub Actions is painfully slow. Every YAML change requires a commit, a push, and a 2-5 minute wait just to find out you missed a colon.
This article introduces act, a CLI tool that runs GitHub Actions workflows locally in Docker containers.
You’ll set up an ML testing pipeline and learn to pass secrets, run specific jobs, and validate workflows in seconds.

📖 View Full Article

☕️ Weekly Finds

open-webui
[LLM]
– A self-hosted AI platform with built-in RAG, model builder, and support for Ollama and OpenAI-compatible APIs

ragflow
[RAG]
– An open-source RAG engine with deep document understanding for unstructured data in any format

vllm
[MLOps]
– A high-throughput, memory-efficient inference and serving engine for LLMs with multi-GPU support

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

Browser-Use: Automate Any Browser Task with Plain English Read More »

latexify_py: Turn Python Functions into LaTeX with One Decorator

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

🤝 COLLABORATION

Give Your AI Agent Live Web Access with Bright Data MCP
With basic search APIs, agents often miss critical context from sources like social platforms, forums, news, and answer engines. That leads to incomplete or outdated responses.
Bright Data’s MCP server unifies all web data access into one interface your AI agent can use directly.
With Bright Data MCP, your AI agent can access:

Search engines (Google, Bing, more)
Social media (Twitter/X, Reddit, Instagram, TikTok)
Web archives (historical web data, years deep)
Answer engines (ChatGPT, Perplexity, Gemini)

All through one connection.

🔗 Try Bright Data MCP

📅 Today’s Picks

latexify_py: Turn Python Functions into LaTeX with One Decorator

Problem
Non-programmers cannot easily read Python logic. However, manually converting it to LaTeX is slow and quickly becomes outdated as the code changes.
Solution
latexify_py solves this with a single decorator, generating LaTeX directly from your function so the math stays readable and always in sync with the code.
Key capabilities:

Three decorators for different outputs: expressions, full equations, or pseudocode
Displays rendered LaTeX directly in Jupyter cells
Functions still work normally when called

📖 View Full Article

🧪 Run code

act: Run GitHub Actions Locally with Docker

Problem
GitHub Actions has no local execution mode. You can’t test a step, inspect an environment variable, or reproduce a runner-specific failure on your own machine.
Each change requires a commit and a wait for the cloud runner. A small mistake like a missing secret means starting the loop again.
Solution
With act, you can execute workflows locally using Docker. Failures surface immediately, making it easier to iterate and commit only when the workflow passes.

📚 Latest Deep Dives

How to Test GitHub Actions Locally with act

Debugging GitHub Actions is painfully slow. Every YAML change requires a commit, a push, and a 2-5 minute wait just to find out you missed a colon.
This article introduces act, a CLI tool that runs GitHub Actions workflows locally in Docker containers.
You’ll set up an ML testing pipeline and learn to pass secrets, run specific jobs, and validate workflows in seconds.

📖 View Full Article

☕️ Weekly Finds

json_repair
[LLM]
– A Python module to repair invalid JSON, especially from LLM outputs, with schema validation support

pyrsistent
[Python Utilities]
– Persistent, immutable, and functional data structures for Python

prek
[Code Quality]
– A faster, Rust-based reimagining of pre-commit with monorepo support and parallel hook execution

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

latexify_py: Turn Python Functions into LaTeX with One Decorator Read More »

Scroll to Top

Work with Khuyen Tran

Work with Khuyen Tran