{"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":"8f9bb0da-7df0-5bf5-8e3c-ebf891f62abe","task_key":"default--v0~2e1~2e0~5fhf--8f9bb0da-7df0-5bf5-8e3c-ebf891f62abe","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 8f9bb0da-7df0-5bf5-8e3c-ebf891f62abe","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import matplotlib.pyplot as plt\\nimport numpy as np\\nfrom sklearn.cluster import KMeans\\n# Constants for configuration\\nRANGE = 100\\nSIZE = 1000\\nCLUSTERS = 5\\ndef task_func():\\n\",\"complete_prompt\":\"import matplotlib.pyplot as plt\\nimport numpy as np\\nfrom sklearn.cluster import KMeans\\n# Constants for configuration\\nRANGE = 100\\nSIZE = 1000\\nCLUSTERS = 5\\n\\n\\ndef task_func():\\n    \\\"\\\"\\\"\\n    Generates a set of 2D random points within a specified range and size,\\n    applies KMeans clustering to these points, and plots the results with\\n    cluster centroids.\\n\\n    The function creates a scatter plot of the clustered points with each\\n    cluster displayed in a different color and the centroids of these clusters\\n    highlighted.\\n\\n    Requirements:\\n        - numpy\\n        - sklearn.cluster\\n        - matplotlib.pyplot\\n\\n    Returns:\\n        A tuple containing the numpy array of data points and the fitted KMeans model.\\n\\n    Example:\\n    >>> data, kmeans = task_func()\\n    >>> isinstance(data, np.ndarray)  # Check if data is a numpy array\\n    True\\n    >>> data.shape == (1000, 2)  # Verify the shape of the data array\\n    True\\n    >>> isinstance(kmeans, KMeans)  # Confirm kmeans is an instance of KMeans\\n    True\\n    >>> len(kmeans.cluster_centers_) == 5  # Check the number of clusters\\n    True\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Generates a set of 2D random points within a specified range and size, applies KMeans clustering to these points, and plots the results with cluster centroids. The function creates a scatter plot of the clustered points with each cluster displayed in a different color and the centroids of these clusters highlighted.\\nThe function should output with:\\n    A tuple containing the numpy array of data points and the fitted KMeans model.\\nYou should write self-contained code starting with:\\n```\\nimport matplotlib.pyplot as plt\\nimport numpy as np\\nfrom sklearn.cluster import KMeans\\n# Constants for configuration\\nRANGE = 100\\nSIZE = 1000\\nCLUSTERS = 5\\ndef task_func():\\n```\",\"libs\":\"['numpy', 'matplotlib', 'sklearn']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}