Farshid's Weblog
Login
Posts tagged “python”
Installing lxml for Python on an M1/M2 Mac
(2025-10-18)
Understanding option names in Click
(2025-09-21)
Programmatically comparing Python version strings
(2025-09-20)
Checking if something is callable or async callable in Python
(2025-09-14)
Password hashing in Python with pbkdf2
(2025-09-14)
Configuring GitHub Codespaces using devcontainers
(2025-09-07)
Creating a minimal SpatiaLite database with Python
(2025-08-31)
Protocols in Python
(2025-08-31)
struct endianness in Python
(2025-08-23)
Using tree-sitter with Python
(2025-08-23)
Automatically maintaining Homebrew formulas using GitHub Actions
(2025-08-10)
Asserting a dictionary is a subset of another dictionary
(2025-08-02)
actions/setup-python caching for setup.py projects
(2025-07-20)
Efficiently copying a file
(2025-07-05)
Bundling Python inside an Electron app
(2025-06-21)
Format code examples in documentation with blacken-docs
(2025-06-21)
Embedding JavaScript in a Jupyter notebook
(2025-06-07)
Using io.BufferedReader to peek against a non-peekable stream
(2025-06-01)
---
(2025-05-04)
Simple load testing with Locust
(2025-05-03)
Generated a summary of nested JSON data
(2025-04-27)
macOS Catalina sort-of includes Python 3
(2025-04-19)
Embedding paragraphs from my blog with E5-large-v2
(2025-04-06)
How to mock httpx using pytest-mock
(2025-03-22)
Using cog to update --help in a Markdown README file
(2025-03-16)
Debugging a Click application using pdb
(2025-03-02)
Outputting JSON with reduced floating point precision
(2025-02-22)
Geocoding from Python on macOS using pyobjc-framework-CoreLocation
(2025-02-08)
Conditionally creating directories in cookiecutter
(2025-02-01)
Installing flash-attn without compiling it
(2025-01-25)
Using pprint() to print dictionaries while preserving their key order
(2025-01-25)
Build the official Python documentation locally
(2025-01-18)
Introspecting Python function parameters
(2025-01-12)
Async fixtures with pytest-asyncio
(2025-01-05)
How streaming LLM APIs work
(2025-01-04)
Adding project links to PyPI
(2024-12-28)
Convert a datetime object to UTC without using pytz
(2024-12-22)
Google OAuth for a CLI application
(2024-12-14)
Adding Sphinx autodoc to a project, and configuring Read The Docs to build it
(2024-11-17)
Creating a dynamic line chart with SVG
(2024-10-20)
Using C_INCLUDE_PATH to install Python packages
(2024-10-12)
Using psutil to investigate "Too many open files"
(2024-10-12)
Tracing every executed Python statement
(2024-10-06)
Using the sqlite3 Python module in Pyodide - Python WebAssembly
(2024-10-05)
Upgrading a pipx application to an alpha version
(2024-09-28)
Streaming indented output of a JSON array
(2024-09-22)
Exploring ColBERT with RAGatouille
(2024-09-21)
Handling CSV files with wide columns in Python
(2024-09-14)
Getting Python MD5 to work with FIPS systems
(2024-08-24)
Fixes for datetime UTC warnings in Python
(2024-08-17)
__init_subclass__
(2024-08-17)
Calculating embeddings with gtr-t5-large in Python
(2024-08-11)
Back-dating Git commits based on file modification dates
(2024-08-04)
The location of the pip cache directory
(2024-08-03)
A simple Python wrapper for the ChatGPT API
(2024-07-06)
Quickly testing code in a different Python version using pyenv
(2024-07-06)
Testing different Python versions with uv with-editable and uv-test
(2024-06-16)
Safely outputting JSON
(2024-06-08)
The pdb interact command
(2024-05-12)
Custom Jinja template tags with attributes
(2024-05-11)
Controlling the style of dumped YAML using PyYAML
(2024-04-14)
TOML in Python
(2024-04-13)
Generating a calendar week grid with the Python Calendar module
(2024-03-24)
Emulating a big-endian s390x with QEMU
(2024-03-02)
Python packages with pyproject.toml and nothing else
(2024-02-17)
Trying out Python packages with ipython and uvx
(2024-02-17)
os.remove() on Windows fails if the file is already open
(2024-02-11)
Trying out free-threaded Python on macOS
(2024-02-03)
Deploying Python web apps as AWS Lambda functions
(2024-01-20)
Configuring Dependabot for a Python project
(2024-01-06)
Formatting thousands in Jinja
(2023-12-31)
Packaging a Python app as a standalone binary with PyInstaller
(2023-12-30)
Freezing requirements with pip-tools
(2023-11-12)
Running PyPy on macOS using Homebrew
(2023-11-05)
Compile and run a new SQLite version with the existing sqlite3 Python library on macOS
(2023-10-22)
Using Fabric with an SSH public key
(2023-10-14)
Planning parallel downloads with TopologicalSorter
(2023-09-30)
Annotated explanation of David Beazley's dataklasses
(2023-09-17)
Check spelling using codespell
(2023-09-10)
CLI tools hidden in the Python standard library
(2023-08-26)
Counting SQLite virtual machine operations
(2023-08-13)
Fixing broken text encodings with sqlite-transform and ftfy
(2023-07-29)
A simple pattern for inlining binary content in a Python script
(2023-07-16)
Explicit file encodings using click.File
(2023-07-02)
Building Mastodon bots with GitHub Actions and toot
(2023-06-04)
Relinquishing control in Python asyncio
(2023-05-28)
Generating documentation from tests using files-to-prompt and LLM
(2023-05-20)
Downloading every video for a TikTok account
(2023-05-13)
Ignoring a line in both flake8 and mypy
(2023-04-30)
How to call pip programatically from Python
(2023-04-23)
Helper function for pagination using AWS boto3
(2023-04-22)
Use setup.py to install platform-specific dependencies
(2023-04-16)
Cryptography in Pyodide
(2023-04-15)
Expanding ChatGPT Code Interpreter with Python packages, Deno and Lua
(2023-04-15)
Code coverage using pytest and codecov.io
(2023-03-26)
Deploying the CLIP embedding model on Fly
(2023-03-11)
Running Python code in a subprocess with a time limit
(2023-02-26)
Find local variables in the traceback for an exception
(2023-02-25)
git bisect
(2023-02-25)
Defining setup.py dependencies using a URL
(2023-02-19)
Decorators with optional arguments
(2023-02-18)
Building a specific version of SQLite with pysqlite on macOS/Linux
(2023-02-11)
Using uv to develop Python command-line applications
(2023-02-05)
A tip for debugging pytest-httpx
(2023-02-04)
A simple Python implementation of the ReAct pattern for LLMs
(2023-01-28)