Download kernels/p4_prep_runner.py from Cion-lab/ounce100m-code: direct link, hf CLI and curl.
- Browser
- Download file 979 Bytes
-
https://huggingface.co/Cion-lab/ounce100m-code/resolve/main/kernels/p4_prep_runner.py
- Command line
-
hf download hf://Cion-lab/ounce100m-code/kernels/p4_prep_runner.py
-
curl -L -o p4_prep_runner.py https://huggingface.co/Cion-lab/ounce100m-code/resolve/main/kernels/p4_prep_runner.py
979 Bytes
| # Kaggle kernel body for the Phase 4 rehearsal (CPU). `save_notebook` can pass no arguments, so the kernel | |
| # is a pinned wrapper: fetch the rehearsal from the code archive, assert its sha256, then hand over. The | |
| # rehearsal itself pins the five run files it exercises, so this wrapper is the only trust anchor. | |
| import hashlib, os, runpy, subprocess, sys | |
| os.chdir("/kaggle/working") | |
| sys.path.insert(0, "/kaggle/working") | |
| REV = "add04ae7a24bd9925115773a93e870fc1dd01f59" | |
| SHA = "0f7aa77ecc4fa0439c656288085de133fd9110a3e1f9e8ccba0bd8bf21b0888d" | |
| url = f"https://huggingface.co/Cion-lab/ounce100m-code/resolve/{REV}/kernels/phase4_prep.py" | |
| assert subprocess.run(["curl", "-sfL", url, "-o", "phase4_prep.py"]).returncode == 0, "fetch prep" | |
| got = hashlib.sha256(open("phase4_prep.py", "rb").read()).hexdigest() | |
| assert got == SHA, ("PREP SHA MISMATCH", got[:16], SHA[:16]) | |
| print("PREP_BOOTSTRAP_OK", REV[:12], got[:12], flush=True) | |
| runpy.run_path("phase4_prep.py", run_name="__main__") | |