Download scripts/verify_artifacts.py from ChatterjeeLab/PepPA: direct link, hf CLI and curl.
- Browser
- Download file 422 Bytes
-
https://huggingface.co/ChatterjeeLab/PepPA/resolve/main/scripts/verify_artifacts.py
- Command line
-
hf download hf://ChatterjeeLab/PepPA/scripts/verify_artifacts.py
-
curl -L -o verify_artifacts.py https://huggingface.co/ChatterjeeLab/PepPA/resolve/main/scripts/verify_artifacts.py
422 Bytes
| import hashlib,json | |
| from pathlib import Path | |
| root=Path(__file__).resolve().parents[1] | |
| entries={str(p.relative_to(root)):hashlib.sha256(p.read_bytes()).hexdigest() for p in sorted(root.rglob('*')) if p.is_file() and '__pycache__' not in str(p) and p.name!='MANIFEST.sha256.json' and '.egg-info' not in str(p)} | |
| (root/'MANIFEST.sha256.json').write_text(json.dumps(entries,indent=2)+'\n') | |
| print('Hashed',len(entries),'files') | |