Download solve.py from zeechimp/chaos-chip-compressed: direct link, hf CLI and curl.
- Browser
- Download file 468 Bytes
-
https://huggingface.co/zeechimp/chaos-chip-compressed/resolve/main/solve.py
- Command line
-
hf download hf://zeechimp/chaos-chip-compressed/solve.py
-
curl -L -o solve.py https://huggingface.co/zeechimp/chaos-chip-compressed/resolve/main/solve.py
468 Bytes
| #!/usr/bin/env python3 | |
| """Load compressed chips and evaluate.""" | |
| import numpy as np | |
| from eval import decode_4bit, eval_4bit | |
| if __name__ == "__main__": | |
| data = np.fromfile("chips_4bit.bin", dtype=np.uint8).reshape(-1, 2) | |
| print(f"loaded {len(data)} compressed chips") | |
| solved = 0 | |
| for b0, b1 in data: | |
| if eval_4bit(int(b0), int(b1)) == 0: | |
| solved += 1 | |
| print(f"solved: {solved}/{len(data)} ({solved/len(data)*100:.1f}%)") | |