Farshid's Weblog

Posts tagged “python”

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