Datasets:
Download scripts/dump_cells.py from iulio/plc-llm-bench: direct link, hf CLI and curl.
- Browser
- Download file 644 Bytes
-
https://huggingface.co/datasets/iulio/plc-llm-bench/resolve/main/scripts/dump_cells.py
- Command line
-
hf download hf://datasets/iulio/plc-llm-bench/scripts/dump_cells.py
-
curl -L -o dump_cells.py https://huggingface.co/datasets/iulio/plc-llm-bench/resolve/main/scripts/dump_cells.py
644 Bytes
| import json | |
| from pathlib import Path | |
| root = Path("d:/UsefulNotebooks/plc-llm-bench") | |
| nb_path = root / "PLC_LLM_Bench_Colab.ipynb" | |
| nb = json.loads(nb_path.read_text(encoding="utf-8")) | |
| out = [] | |
| for idx, c in enumerate(nb["cells"]): | |
| content = "".join(c.get("source", [])) | |
| if idx == 27: | |
| content = content.replace("MODE = 'smoke'", "MODE = 'tier2'") | |
| out.append({ | |
| "index": idx, | |
| "type": c["cell_type"], | |
| "content": content | |
| }) | |
| dump_path = root / "cells_to_push.json" | |
| dump_path.write_text(json.dumps(out, indent=2, ensure_ascii=False), encoding="utf-8") | |
| print(f"Dumped {len(out)} cells to {dump_path}") | |