HF RL Explorer

Write a Python script /app/decoder.py that reads a binary file from stdin and writes JSON to stdout. The…

Write a Python script /app/decoder.py that reads a binary file from stdin and writes JSON to stdout. The…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Tag definitions: - Tag 0x01: UTF-8 string. Output as a JSON string. - Tag 0x02: Unsigned integer, big-endian…

The task

Tag definitions: - Tag 0x01: UTF-8 string. Output as a JSON string. - Tag 0x02: Unsigned integer, big-endian. Output as a JSON number. - Tag 0x0A: Nested record sequence. The Value bytes contain zero or more complete records (recursive structure). Output as a JSON array of decoded records. - Any other tag:…

Part of ai-and/termgrade-environments.