Elsewhere
Release TIL Research Tool Museum
Filters: Sorted by date
3,015 results
«« first
« previous
page 41 / 101
next »
last »»
TIL
Using tree-sitter with Python
— [tree-sitter](https://tree-sitter.github.io/tree-sitter/) is a "parser generator tool and an incremental parsing library". It has a very good reputation these days.
TIL
Auto-formatting YAML files with yamlfmt
— I decided to see if there was an equivalent of [Black](https://pypi.org/project/black/) or [Prettier](https://prettier.io/) for YAML files. I found [yamlfmt](https://github.com/google/yamlfmt) from Google.
TIL
Quickly testing code in a different Python version using pyenv
— I had [a bug](https://github.com/simonw/llm/issues/82#issuecomment-1629735729) that was only showing up in CI against Python 3.8.
TIL
Using git-filter-repo to set commit dates to author dates
— After rebasing a branch with 60+ commits onto `main` I was disappointed to see that the commit dates on the commits (which are a different thing from the author dates) had all been reset to the same time. This meant the GitHub default UI for commits implied everything had been written at the same moment.
TIL
Using OpenAI functions and their Python library for data extraction
— Here's the pattern I figured out for using the [openai](https://github.com/openai/openai-python) Python library to extract structured data from text using a single call to the model.
TIL
Python packages with pyproject.toml and nothing else
— I've been using `setuptools` and `setup.py` for my Python packages for a long time: I like that it works without me having to think about installing and learning any additional tools such as [Flit](https://flit.pypa.io/) or [pip-tools](https://pip-tools.readthedocs.io/) or [Poetry](https://python-poetry.org/) or [Hatch](https://github.com/pypa/hatch).
TIL
Syntax highlighted code examples in Datasette
— I wanted to add syntax highlighting to the new tutorial [Data analysis with SQLite and Python](https://datasette.io/tutorials/data-analysis).
TIL
Custom Jinja template tags with attributes
— I decided to implement a custom Jinja template block tag for my [datasette-render-markdown](https://datasette.io/plugins/datasette-render-markdown) plugin. I wanted the tag to work like this:
«« first
« previous
page 41 / 101
next »
last »»