Write a script /solve.py that reads a UTF-8 log file from /logs/events.log , transforms and aggregates the…
Write a script /solve.py that reads a UTF-8 log file from /logs/events.log , transforms and aggregates the…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input format ( /logs/events.log ): - One JSON object per line (JSONL). - Each object has keys: - ts…
The task
**Input format** (`/logs/events.log`): - One JSON object per line (JSONL). - Each object has keys: - `ts` (string): ISO 8601 timestamp, possibly with fractional seconds (`.%f`), timezone offset `±HH:MM` or `Z`. May be missing, empty string, or malformed. - `user` (string): non-empty user ID. - `type` (string): one of…
Part of ai-and/termgrade-environments.