HF RL Explorer

Create a POSIX-compliant unified diff/patch applier that transforms an original file into a target file by…

Create a POSIX-compliant unified diff/patch applier that transforms an original file into a target file by…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input/Output contract: - Usage: python apply diff.py <original file path (diff is always via stdin) -…

The task

Input/Output contract: - Usage: `python apply_diff.py <original_file_path>` (diff is always via stdin) - Output: the fully patched file content to stdout - The diff will contain one or more hunks in unified format (lines starting with `@@` header, then context lines, `+` additions, `-` deletions) - The program must…

Part of ai-and/termgrade-environments.