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

Function _to_markdown

experiments/token_cost/measure_day_token_usage.py:393–400  ·  view source on GitHub ↗
(rows: List[Dict[str, Any]])

Source from the content-addressed store, hash-verified

391
392
393def _to_markdown(rows: List[Dict[str, Any]]) -> str:
394 if not rows:
395 return "(empty)\n"
396 headers = list(rows[0].keys())
397 lines = ["| " + " | ".join(headers) + " |", "| " + " | ".join(["---"] * len(headers)) + " |"]
398 for row in rows:
399 lines.append("| " + " | ".join(str(row.get(h, "")) for h in headers) + " |")
400 return "\n".join(lines) + "\n"
401
402
403def main() -> None:

Callers 1

mainFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected