# /// script
# requires-python = ">=3.12"
# dependencies = [
# "pandas",
# ]
# ///
h/t https://simonwillison.net/2024/Dec/19/one-shot-python-tools/ # /// script
# requires-python = ">=3.12"
# dependencies = [
# "pandas",
# ]
# ///
h/t https://simonwillison.net/2024/Dec/19/one-shot-python-tools/A simple example a came across is having to rename some files:
1. you just open the shell in the location you want
2. and run this command:
uv run https://raw.githubusercontent.com/SimonB97/MOS/main/AITaskRu... "check the contents of the .md files in the working dir and structure them in folders"
There's a link to Magentic-1 docs and further info in the repo: https://github.com/SimonB97/MOS/tree/main/AITaskRunner (plus two other simple scripts).
https://packaging.python.org/en/latest/specifications/inline...
I would want distributed projects to do things properly, but as a way to shorthand a lot of futzing about? It's excellent
python's wheels are falling off at an ever faster and faster rate
A more Pythonic way of doing this might be __pyproject__ bit that has the tiiiiny snag of needing to execute the file to figure out its deps. I would have loved if __name__ == "pyproject" but while neat and tidy it is admittedly super confusing for beginners, has a "react hooks" style gotcha where to can't use any deps in that block, and you can't use top level imports. The comment was really the easiest way.