Implement a command-line tool at /app/topk that reads a large, possibly malformed, UTF-8 encoded log file…
Implement a command-line tool at /app/topk that reads a large, possibly malformed, UTF-8 encoded log file…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Goal : Given a large log file where each line contains an IP address and an integer count separated by…
The task
**Goal**: Given a large log file where each line contains an IP address and an integer count separated by whitespace, the tool must output the top K IP addresses by total count, along with their 50th (median) and 95th percentile statistics, in a stable, machine-readable format, without loading the entire file into…
Part of ai-and/termgrade-environments.