Download load_data.py from invariant-computing-lab/d06-neurobrain-null-battery: direct link, hf CLI and curl.
- Browser
- Download file 296 Bytes
-
https://huggingface.co/datasets/invariant-computing-lab/d06-neurobrain-null-battery/resolve/main/load_data.py
- Command line
-
hf download hf://datasets/invariant-computing-lab/d06-neurobrain-null-battery/load_data.py
-
curl -L -o load_data.py https://huggingface.co/datasets/invariant-computing-lab/d06-neurobrain-null-battery/resolve/main/load_data.py
296 Bytes
| from pathlib import Path | |
| import json | |
| def load_records(path=None): | |
| p=Path(path) if path else Path(__file__).with_name("data.jsonl") | |
| with p.open(encoding="utf8") as f: | |
| return [json.loads(line) for line in f if line.strip()] | |
| if __name__ == "__main__": | |
| print(len(load_records())) | |