Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Filter by Categories
About Article
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 #229: latexify: Turn Python Functions Into Clean Math Formulas

Newsletter #229: latexify: Turn Python Functions Into Clean Math Formulas


๐Ÿ“… Today’s Picks

Build Faster Tests with pytest Session Fixtures

Code example: Build Faster Tests with pytest Session Fixtures

Problem

pytest fixtures provide reusable test data, but they reload for every test function by default.

When your fixture loads a large DataFrame, every test reloads the same data, wasting time and delaying your development workflow.

Solution

Session-scoped fixtures load data once at the start and reuse it across all test functions.

Apply this pattern to:

  • Load large datasets once instead of reloading for each test function
  • Share a database connection across all tests without passing it as a parameter
  • Automatically set random seeds for reproducible train/test splits

latexify: Turn Python Functions Into Clean Math Formulas

Code example: latexify: Turn Python Functions Into Clean Math Formulas

Problem

It is not ideal to present mathematical formulas written in Python code to executives and stakeholders as they are often not familiar with Python code.

However, writing LaTeX manually to show the formulas is time-consuming and tedious.

Solution

latexify transforms Python functions into clean mathematical notation with a single decorator. No manual LaTeX required.

Key features:

  • Automatic LaTeX generation from Python functions
  • Functions remain executable for calculations
  • Compatible with various notebooks such as Jupyter, Colab, and Marimo

โ˜•๏ธ Weekly Finds

ty [Python Utils] – An extremely fast Python type checker and language server, written in Rust

giotto-tda [ML] – A high-performance topological machine learning toolbox in Python built on top of scikit-learn

vibekit [MLOps] – Run Claude Code, Gemini, Codex โ€” or any coding agent โ€” in a clean, isolated sandbox with sensitive data redaction and observability baked in

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.

Leave a Comment

Your email address will not be published. Required fields are marked *

0
    0
    Your Cart
    Your cart is empty
    Scroll to Top

    Work with Khuyen Tran

    Work with Khuyen Tran