HF RL Explorer

Write a program /app/decode.py that reads a binary file from /data/input.bin and writes valid JSON to…

Write a program /app/decode.py that reads a binary file from /data/input.bin and writes valid JSON to…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Person payload: UTF-8 name (1-byte length prefix, then characters), 1-byte age (unsigned), 4-byte big-endian…

The task

Person payload: UTF-8 name (1-byte length prefix, then characters), 1-byte age (unsigned), 4-byte big-endian float (IEEE754 single precision) height in meters. Device payload: 2-byte big-endian device_id, 1 byte status_flags (bit 0=active, bit 1=confidential, bits 2-7 reserved), 4-byte big-endian unsigned integer…

Part of ai-and/termgrade-environments.