{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"bigcodebench","formal_name":"BigCodeBench","introduction":"BigCodeBench poses 1,140 function-level tasks drawn across 139 libraries. It tests whether a model can compose several real APIs correctly rather than write one self-contained function.","introduction_ja":"","introduction_en":"","category":"Category not supplied","task_count":null,"acquisition_status":"Acquisition status not supplied","official_url":"https://bigcode-bench.github.io/","indexing_mode":"index","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[],"history":"","construction":"","limitations":"","saturation":"","scores":[]}},"task_id":"f5335ba7-8b09-56c0-89b7-30f7043aab4f","task_key":"default--v0~2e1~2e0~5fhf--f5335ba7-8b09-56c0-89b7-30f7043aab4f","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf f5335ba7-8b09-56c0-89b7-30f7043aab4f","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import os\\nimport glob\\nimport hashlib\\ndef task_func(source_dir, target_dir, prefix='#Hash: '):\\n\",\"complete_prompt\":\"import os\\nimport glob\\nimport hashlib\\n\\ndef task_func(source_dir, target_dir, prefix='#Hash: '):\\n    \\\"\\\"\\\"\\n    Computes the MD5 hash of each file's content in the specified `source_dir`, prepends the hash along with a prefix \\n    to the original content, and writes the modified content to new files in the `target_dir`. \\n    Existing files with the same name in `target_dir` are overwritten.\\n\\n    Parameters:\\n    - source_dir (str): The directory containing the files to be processed. Must exist.\\n    - target_dir (str): The directory where the processed files will be written. Created if it does not exist.\\n    - prefix (str): The prefix to prepend before the hash in each new file. Default is '#Hash: '.\\n\\n    Returns:\\n    - list: A list of paths to the newly created files in the `target_dir`, each with the hash prepended.\\n\\n    Requirements:\\n    - os\\n    - glob\\n    - hashlib\\n\\n    Raises:\\n    FileNotFoundError if the source directory does not exist.\\n\\n    Example:\\n    >>> task_func(source_dir='samples', target_dir='hashed_samples', prefix='#MD5: ')\\n    ['hashed_samples/file1.txt', 'hashed_samples/file2.txt']\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Computes the MD5 hash of each file's content in the specified `source_dir`, prepends the hash along with a prefix to the original content, and writes the modified content to new files in the `target_dir`. Existing files with the same name in `target_dir` are overwritten.\\nThe function should raise the exception for: FileNotFoundError if the source directory does not exist.\\nThe function should output with:\\n    list: A list of paths to the newly created files in the `target_dir`, each with the hash prepended.\\nYou should write self-contained code starting with:\\n```\\nimport os\\nimport glob\\nimport hashlib\\ndef task_func(source_dir, target_dir, prefix='#Hash: '):\\n```\",\"libs\":\"['glob', 'hashlib', 'os']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}