{"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":"7e99ece6-d30d-5f7e-8928-6d6bc11789e3","task_key":"default--v0~2e1~2e0~5fhf--7e99ece6-d30d-5f7e-8928-6d6bc11789e3","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 7e99ece6-d30d-5f7e-8928-6d6bc11789e3","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"from scipy.spatial.distance import cdist\\nfrom sklearn.datasets import make_blobs\\nimport matplotlib.pyplot as plt\\ndef task_func(n_samples=200, centers=4, plot_path=None, random_seed=None):\\n\",\"complete_prompt\":\"from scipy.spatial.distance import cdist\\nfrom sklearn.datasets import make_blobs\\nimport matplotlib.pyplot as plt\\n\\n\\ndef task_func(n_samples=200, centers=4, plot_path=None, random_seed=None):\\n    \\\"\\\"\\\"\\n    Generate a synthetic 2D dataset using make_blobs, visualize the dataset, and then calculate\\n    the Euclidean distance between individual samples of the dataset.\\n\\n    Parameters:\\n    - n_samples (int): Number of samples to generate. Default is 200.\\n    - centers (int): Number of centers to generate. Default is 4.\\n    - plot_path (str, optional): Path to save the plot. If None, the plot will be returned.\\n    - random_seed (int, optional): Seed for random number generation. Default is None.\\n\\n    Returns:\\n    - tuple:\\n        - ndarray: A 2D array with distances between each sample.\\n        - Axes or None: If plot_path is None, returns the matplotlib Axes object of the plot.\\n                        Otherwise, saves the plot to the provided path and return None.\\n                        Plot shows values of the first feature dimension on the x-axis, values\\n                        of the second feature dimension on the y-axis, and labels of the synthetic\\n                        examples as color.\\n\\n    Requirements:\\n    - scipy.spatial.distance.cdist\\n    - sklearn.datasets.make_blobs\\n    - matplotlib.pyplot\\n\\n    Example:\\n    >>> distances, plot = task_func(random_seed=42)\\n    >>> distances.shape\\n    (200, 200)\\n    >>> plot\\n    <Axes: >\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Generate a synthetic 2D dataset using make_blobs, visualize the dataset, and then calculate the Euclidean distance between individual samples of the dataset.\\nThe function should output with:\\n    tuple:\\n    ndarray: A 2D array with distances between each sample.\\n    Axes or None: If plot_path is None, returns the matplotlib Axes object of the plot.\\n    Otherwise, saves the plot to the provided path and return None.\\n    Plot shows values of the first feature dimension on the x-axis, values\\n    of the second feature dimension on the y-axis, and labels of the synthetic\\n    examples as color.\\nYou should write self-contained code starting with:\\n```\\nfrom scipy.spatial.distance import cdist\\nfrom sklearn.datasets import make_blobs\\nimport matplotlib.pyplot as plt\\ndef task_func(n_samples=200, centers=4, plot_path=None, random_seed=None):\\n```\",\"libs\":\"['matplotlib', 'scipy', 'sklearn']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}