Download scripts/common.py from alejandrosalastexido/ModuleMap-Bench: direct link, hf CLI and curl.
- Browser
- Download file 469 Bytes
-
https://huggingface.co/datasets/alejandrosalastexido/ModuleMap-Bench/resolve/main/scripts/common.py
- Command line
-
hf download hf://datasets/alejandrosalastexido/ModuleMap-Bench/scripts/common.py
-
curl -L -o common.py https://huggingface.co/datasets/alejandrosalastexido/ModuleMap-Bench/resolve/main/scripts/common.py
469 Bytes
| """Shared helpers for the ModuleMap-Bench scripts: Python 3.8+, standard library only.""" | |
| import json | |
| import os | |
| ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | |
| ROLES = ["entry", "client", "service", "domain", "persistence", "event", "config", "none"] | |
| def read_jsonl(path): | |
| with open(path, encoding="utf-8") as f: | |
| return [json.loads(line) for line in f if line.strip()] | |
| def data(*parts): | |
| return os.path.join(ROOT, "data", *parts) | |