HF RL Explorer

Streaming Top-K Aggregator over UTF-8 Log File

Streaming Top-K Aggregator over UTF-8 Log File: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). You must implement a command-line tool topk that reads a large UTF-8 encoded log file and computes the top-K lines by a numeric score extracted from each line, with…

The task

You must implement a command-line tool `topk` that reads a large UTF-8 encoded log file and computes the top-K lines by a numeric score extracted from each line, with stable tie-breaking. The tool must handle streaming efficiently (not load the entire file into memory at once) while maintaining a fixed-size data…

Part of ai-and/termgrade-environments.