Farshid's Weblog

Posts tagged "python"

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