Seven short guides that an AI assistant reads before it works in Python for you. They help it work the way a careful person would.
With them, the assistant:
- runs your code and checks whether it really worked;
- reads your data files without changing the numbers;
- makes figures at the size a journal asks for;
- uses code written by other people safely;
- writes tidy, well-explained functions;
- builds small apps that open in your web browser.
The guides are about using Python well. They do not teach any scientific method. They were checked with Python 3.12 on Windows, and each guide says what could not be checked.
Part of Lovelace's Square, the open home for chemometrics code, data and teaching material.
| Guide | What it helps with |
|---|---|
python-run |
Running code with the right Python, checking how it ended, and understanding common errors. |
python-notebooks |
Working in a Jupyter notebook you already have open, and leaving your variables as they were. |
python-data-files |
Reading and saving CSV, Excel, .mat and .npy files without losing or changing data. |
python-figures |
Making figures at the right size for a paper and checking the saved file. |
python-third-party-code |
Using packages and other people's code: which version is installed, what changed, and its licence. |
python-writing-code |
Writing functions with a clear explanation, an example, input checks and clear error messages. |
python-app-design |
Building a small app that runs on your own computer, with a clean look, and checking each screen. |
Each folder inside skills/ is one guide. Its main file is SKILL.md, and some folders also have a references/ folder with extra notes.
- If your AI assistant has a skills folder, copy the folders you want there.
- If it does not, give it the
SKILL.mdfile of the guide you need.
They work with any AI assistant that can read files and run commands on your computer.
MIT. See LICENSE. To cite these guides, see CITATION.cff.