{"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":"7bcab94f-58a3-5dd8-9a9b-306c70fbe385","task_key":"default--v0~2e1~2e0~5fhf--7bcab94f-58a3-5dd8-9a9b-306c70fbe385","task_revision_id":"2","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 7bcab94f-58a3-5dd8-9a9b-306c70fbe385","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"from PIL import Image\\nimport numpy as np\\nfrom skimage.transform import resize\\nimport matplotlib.pyplot as plt\\nimport os\\ndef task_func(img_path, scale_factors=[0.5, 0.75, 1.5, 2.0]):\\n\",\"complete_prompt\":\"from PIL import Image\\nimport numpy as np\\nfrom skimage.transform import resize\\nimport matplotlib.pyplot as plt\\nimport os\\n\\ndef task_func(img_path, scale_factors=[0.5, 0.75, 1.5, 2.0]):\\n    \\\"\\\"\\\"\\n    Open an image file and scale it by different scaling factors.\\n    Display each scaled image using matplotlib and return the scaled images with their Axes.\\n\\n    Parameters:\\n    img_path (str): Path to the image file.\\n    scale_factors (list): List of scaling factors to apply. Default is [0.5, 0.75, 1.5, 2.0].\\n\\n    Returns:\\n    list of tuples: Each tuple contains (matplotlib.axes.Axes, numpy.ndarray) representing the Axes and the pixel values of the scaled image.\\n\\n    Raises:\\n    FileNotFoundError: If the image file cannot be found.\\n\\n    Requirements:\\n    - PIL\\n    - numpy\\n    - scikit-image\\n    - matplotlib.pyplot\\n    - os\\n\\n    Example:\\n    >>> dummy_img_path = \\\"sample.png\\\"\\n    >>> Image.fromarray(np.random.randint(0, 255, (20, 20, 3), dtype=np.uint8)).save(dummy_img_path)\\n    >>> result = task_func('sample.png')\\n    >>> os.remove(dummy_img_path)\\n    >>> for ax, img in result:\\n    ...     print(ax.get_title(), img.shape)\\n    Scale factor: 0.5 (10, 10, 3)\\n    Scale factor: 0.75 (15, 15, 3)\\n    Scale factor: 1.5 (30, 30, 3)\\n    Scale factor: 2.0 (40, 40, 3)\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Open an image file and scale it by different scaling factors. Display each scaled image using matplotlib and return the scaled images with their Axes.\\nThe function should raise the exception for: FileNotFoundError: If the image file cannot be found.\\nThe function should output with:\\n    list of tuples: Each tuple contains (matplotlib.axes.Axes, numpy.ndarray) representing the Axes and the pixel values of the scaled image.\\nYou should write self-contained code starting with:\\n```\\nfrom PIL import Image\\nimport numpy as np\\nfrom skimage.transform import resize\\nimport matplotlib.pyplot as plt\\nimport os\\ndef task_func(img_path, scale_factors=[0.5, 0.75, 1.5, 2.0]):\\n```\",\"libs\":\"['matplotlib', 'PIL', 'numpy', 'os', 'skimage']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}