SamePinout v0: 204 questions, preregistered evaluation of 20 models, raw runs, audit, scripts
1b2c3dd verified Download src/sample_check.py from shimmerhuang/same-pinout: direct link, hf CLI and curl.
- Browser
- Download file 581 Bytes
-
https://huggingface.co/datasets/shimmerhuang/same-pinout/resolve/main/src/sample_check.py
- Command line
-
hf download hf://datasets/shimmerhuang/same-pinout/src/sample_check.py
-
curl -L -o sample_check.py https://huggingface.co/datasets/shimmerhuang/same-pinout/resolve/main/src/sample_check.py
581 Bytes
| #!/usr/bin/env python3 | |
| """抽人工核对的 30 题:A、B 各 15。算法写死,谁跑都一样。 | |
| 用法:sample_check.py <questions.jsonl>""" | |
| import json | |
| import random | |
| import sys | |
| SEED = 20261204 | |
| PER_CLASS = 15 | |
| def sample(qs): | |
| rng = random.Random(SEED) | |
| out = {} | |
| for cls in ("A", "B"): | |
| ids = sorted(q["id"] for q in qs if q["class"] == cls) | |
| out[cls] = sorted(rng.sample(ids, PER_CLASS)) | |
| return out | |
| if __name__ == "__main__": | |
| for cls, ids in sample([json.loads(l) for l in open(sys.argv[1])]).items(): | |
| print(cls, " ".join(ids)) | |