MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / write_csv

Function write_csv

experiments/human_eval/build_main_human_eval_packet.py:356–362  ·  view source on GitHub ↗
(path: Path, rows: List[Dict[str, Any]])

Source from the content-addressed store, hash-verified

354
355
356def write_csv(path: Path, rows: List[Dict[str, Any]]) -> None:
357 path.parent.mkdir(parents=True, exist_ok=True)
358 fields = list(rows[0].keys()) if rows else []
359 with path.open("w", encoding="utf-8-sig", newline="") as handle:
360 writer = csv.DictWriter(handle, fieldnames=fields)
361 writer.writeheader()
362 writer.writerows(rows)
363
364
365def write_guidelines(path: Path) -> None:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected