Loading...
Loading...
Unit-aware computation with Pint - convert units, dimensional analysis, unit arithmetic
npx skill4agent add parcadei/continuous-claude-v3 pint-compute| I want to... | Command | Example |
|---|---|---|
| Convert units | | |
| Unit math | | |
| Check dimensions | | |
| Parse quantity | | |
| Simplify units | | |
uv run python -m runtime.harness scripts/pint_compute.py \
parse "100 km/h"
uv run python -m runtime.harness scripts/pint_compute.py \
parse "9.8 m/s^2"uv run python -m runtime.harness scripts/pint_compute.py \
convert "5 meters" --to feet
uv run python -m runtime.harness scripts/pint_compute.py \
convert "100 km/h" --to mph
uv run python -m runtime.harness scripts/pint_compute.py \
convert "1 atmosphere" --to pascaluv run python -m runtime.harness scripts/pint_compute.py \
calc "5 m * 3 s"
uv run python -m runtime.harness scripts/pint_compute.py \
calc "10 m / 2 s"
uv run python -m runtime.harness scripts/pint_compute.py \
calc "5 meters + 300 cm"uv run python -m runtime.harness scripts/pint_compute.py \
check newton --against "kg * m / s^2"
uv run python -m runtime.harness scripts/pint_compute.py \
check joule --against "kg * m^2 / s^2"uv run python -m runtime.harness scripts/pint_compute.py \
simplify "1 kg*m/s^2"
uv run python -m runtime.harness scripts/pint_compute.py \
simplify "1000 m"| Domain | Examples |
|---|---|
| Length | meter, foot, inch, mile, km, yard |
| Time | second, minute, hour, day, year |
| Mass | kg, gram, pound, ounce, ton |
| Velocity | m/s, km/h, mph, knot |
| Energy | joule, calorie, eV, kWh, BTU |
| Force | newton, pound_force, dyne |
| Temperature | kelvin, celsius, fahrenheit |
| Pressure | pascal, bar, atmosphere, psi |
| Power | watt, horsepower |
{
"result": "16.4042 foot",
"magnitude": 16.4042,
"units": "foot",
"dimensionality": "[length]",
"latex": "16.4042\\,\\mathrm{ft}"
}# This will error - incompatible dimensions
uv run python -m runtime.harness scripts/pint_compute.py \
convert "5 meters" --to kg
# Error: Cannot convert '[length]' to '[mass]'