Datasets:
Formats:
csv
Languages:
English
Size:
< 1K
Tags:
quantum-control
quantum-noise-spectroscopy
non-gaussian-noise
identifiability
boolean-fourier-analysis
robust-prediction
Download research/scripts/verify_release.py from PureOne/EIROQ-PHI: direct link, hf CLI and curl.
- Browser
- Download file 1.47 kB
-
https://huggingface.co/datasets/PureOne/EIROQ-PHI/resolve/main/research/scripts/verify_release.py
- Command line
-
hf download hf://datasets/PureOne/EIROQ-PHI/research/scripts/verify_release.py
-
curl -L -o verify_release.py https://huggingface.co/datasets/PureOne/EIROQ-PHI/resolve/main/research/scripts/verify_release.py
1.47 kB
| """Check the frozen SHA-256 manifest without modifying the release. | |
| Integrity is not a certificate of scientific validity. Rebuilding a PDF or | |
| rerunning into the frozen directory can legitimately change a hash; reproduce | |
| into a new directory when comparing scientific results. | |
| """ | |
| from __future__ import annotations | |
| import hashlib | |
| from pathlib import Path | |
| import sys | |
| def main() -> None: | |
| root = Path(__file__).resolve().parents[1] | |
| manifest = root / 'SHA256SUMS.txt' | |
| if not manifest.is_file(): | |
| raise SystemExit('No SHA256SUMS.txt found at the package root.') | |
| failures = [] | |
| checked = 0 | |
| for number, line in enumerate(manifest.read_text().splitlines(), 1): | |
| if not line.strip(): | |
| continue | |
| try: | |
| expected, relative = line.split(' ', 1) | |
| path = (root / relative).resolve() | |
| if not path.is_relative_to(root) or len(expected) != 64: | |
| raise ValueError('unsafe or malformed entry') | |
| actual = hashlib.sha256(path.read_bytes()).hexdigest() | |
| if actual != expected: | |
| failures.append(relative + ': hash mismatch') | |
| checked += 1 | |
| except (ValueError, OSError) as exc: | |
| failures.append(f'line {number}: {exc}') | |
| if failures: | |
| print('\n'.join(failures), file=sys.stderr) | |
| raise SystemExit(1) | |
| print(f'{checked} manifest entries verified; no mismatches.') | |
| if __name__ == '__main__': | |
| main() | |