{"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":"9d95a4f7-82ec-5bc9-8f77-4aef7110efcf","task_key":"default--v0~2e1~2e0~5fhf--9d95a4f7-82ec-5bc9-8f77-4aef7110efcf","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 9d95a4f7-82ec-5bc9-8f77-4aef7110efcf","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import os\\nimport glob\\nimport csv\\ndef task_func(directory_path, file_extension='.csv'):\\n\",\"complete_prompt\":\"import os\\nimport glob\\nimport csv\\n\\ndef task_func(directory_path, file_extension='.csv'):\\n    \\\"\\\"\\\"\\n    Reads all files with a specified extension in a given directory and returns their data in a dictionary.\\n    - Reads all files with the specified extension in the given directory.\\n    - Uses the filename without the extension as a key in the output dictionary.\\n    - The value for each key is a list of rows from the file, where each row is represented as a list of values.\\n\\n    Parameters:\\n    - directory_path (str): The path to the directory containing the files.\\n    - file_extension (str, optional): The file extension to look for. Default is '.csv'.\\n\\n    Returns:\\n    - Returns a dictionary where each key is the filename (without extension) and the value is a list of rows from the file.\\n\\n    Requirements:\\n    - os\\n    - glob\\n    - csv\\n\\n    Example:\\n    >>> data = task_func('/home/user/data')\\n    >>> print(data['file1'])\\n    [['header1', 'header2'], ['row1_col1', 'row1_col2'], ['row2_col1', 'row2_col2']]\\n    \\n    >>> data = task_func('/home/user/data', '.txt')\\n    >>> print(data)\\n    {}\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Reads all files with a specified extension in a given directory and returns their data in a dictionary. - Reads all files with the specified extension in the given directory. - Uses the filename without the extension as a key in the output dictionary. - The value for each key is a list of rows from the file, where each row is represented as a list of values. >>> data = task_func('/home/user/data', '.txt') >>> print(data) {}\\nThe function should output with:\\n    Returns a dictionary where each key is the filename (without extension) and the value is a list of rows from the file.\\nYou should write self-contained code starting with:\\n```\\nimport os\\nimport glob\\nimport csv\\ndef task_func(directory_path, file_extension='.csv'):\\n```\",\"libs\":\"['glob', 'csv', 'os']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}