Download verify_files.py from TheTinyIntelLab/opal-norman: direct link, hf CLI and curl.
- Browser
- Download file 499 Bytes
-
https://huggingface.co/TheTinyIntelLab/opal-norman/resolve/main/verify_files.py
- Command line
-
hf download hf://TheTinyIntelLab/opal-norman/verify_files.py
-
curl -L -o verify_files.py https://huggingface.co/TheTinyIntelLab/opal-norman/resolve/main/verify_files.py
499 Bytes
| """Verify every file pinned in SHA256SUMS.txt; run from any directory.""" | |
| import hashlib | |
| from pathlib import Path | |
| root = Path(__file__).resolve().parent | |
| records = (root / "SHA256SUMS.txt").read_text().splitlines() | |
| for line in records: | |
| expected, name = line.split(" ", 1) | |
| path = (root / name).resolve() | |
| assert path.is_relative_to(root) and path.is_file(), name | |
| assert hashlib.sha256(path.read_bytes()).hexdigest() == expected, name | |
| print(f"Verified {len(records)} files") | |