Create a command-line tool at /app/topk that reads a large text file of newline-separated records and…
Create a command-line tool at /app/topk that reads a large text file of newline-separated records and…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input: - A file where each line is a JSON object with exactly two keys: "id" (a string) and "score" (a number…
The task
**Input:** - A file where each line is a JSON object with exactly two keys: `"id"` (a string) and `"score"` (a number, possibly negative, possibly with decimal). Example: `{"id": "abc", "score": -4.2}` - The file may be arbitrarily large (stream it, do not load entirely into memory). - The file may contain malformed…
Part of ai-and/termgrade-environments.