{"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":"noindex","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[]}},"task_id":"e4451104-7ee1-58da-a34f-0b4e7437cea7","task_key":"default--v0~2e1~2e0~5fhf--e4451104-7ee1-58da-a34f-0b4e7437cea7","task_revision_id":"2","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf e4451104-7ee1-58da-a34f-0b4e7437cea7","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import os\\nimport re\\ndef task_func(pattern, log_dir='/var/log/'):\\n\",\"complete_prompt\":\"import os\\nimport re\\n\\ndef task_func(pattern, log_dir='/var/log/'):\\n    \\\"\\\"\\\"\\n    Find the latest log file in a specified directory that matches a given regex pattern.\\n\\n    This function searches through all files in the specified directory, filters them based on the provided regex pattern, \\n    and returns the path to the most recent log file based on modification time. If no files match the pattern or the directory \\n    is empty, the function returns None.\\n\\n    Parameters:\\n        pattern (str): The regex pattern to match the names of the log files.\\n        log_dir (str, optional): The directory to search for log files. Defaults to '/var/log/'.\\n\\n    Returns:\\n        str or None: The path to the most recent log file that matches the pattern, or None if no matching files are found.\\n\\n    Requirements:\\n    - os\\n    - re\\n\\n    Example:\\n    >>> task_func(r'^access.log.[0-9]+$', '/var/log/')\\n    '/var/log/access.log.1234'\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Find the latest log file in a specified directory that matches a given regex pattern. This function searches through all files in the specified directory, filters them based on the provided regex pattern, and returns the path to the most recent log file based on modification time. If no files match the pattern or the directory is empty, the function returns None.\\nThe function should output with:\\n    str or None: The path to the most recent log file that matches the pattern, or None if no matching files are found.\\nYou should write self-contained code starting with:\\n```\\nimport os\\nimport re\\ndef task_func(pattern, log_dir='/var/log/'):\\n```\",\"libs\":\"['re', 'os']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}