HF RL Explorer

Write a command-line tool /root/normalize (Python script) that reads a messy CSV or NDJSON file and outputs…

Write a command-line tool /root/normalize (Python script) that reads a messy CSV or NDJSON file and outputs…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input format detection: - If the first non-empty, non-comment line starts with { AND is valid JSON, treat…

The task

**Input format detection:** - If the first non-empty, non-comment line starts with `{` AND is valid JSON, treat the input as NDJSON (one JSON object per line). - Otherwise, treat it as CSV with header.

Part of ai-and/termgrade-environments.