HF RL Explorer

human-readable file sizes: add feature

human-readable file sizes: add feature: a task in smol-software-harbor (Harbor dataset). Add an optional si parameter to human() in sizes.py : human(n, si=True) uses decimal units (powers of 1000) named kB , MB , GB , TB , PB (the SI UNITS list), with the same rules as the binary mode: one…

The task

Add an optional `si` parameter to `human()` in `sizes.py`: `human(n, si=True)` uses decimal units (powers of 1000) named `kB`, `MB`, `GB`, `TB`, `PB` (the `SI_UNITS` list), with the same rules as the binary mode: one decimal, unit chosen after rounding, plain bytes below 1000 (`999 B`). The default stays binary. Run…

Part of efederici/smol-software-harbor.