{"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":"c19fe153-c621-52aa-a788-64e1ef828bb1","task_key":"default--v0~2e1~2e0~5fhf--c19fe153-c621-52aa-a788-64e1ef828bb1","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf c19fe153-c621-52aa-a788-64e1ef828bb1","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import matplotlib.pyplot as plt\\nfrom sklearn.cluster import KMeans\\ndef task_func(myList, n_clusters):\\n\",\"complete_prompt\":\"import matplotlib.pyplot as plt\\nfrom sklearn.cluster import KMeans\\n\\n\\ndef task_func(myList, n_clusters):\\n    \\\"\\\"\\\"\\n    Cluster a list of 2D points using KMeans and visualize the clusters.\\n\\n    Note: This function raises ValueError if it encounters invalid inputs.\\n    KMeans is performed with random_state = 42 and n_init = 10. Scatterplot\\n    uses red 'x' markers for cluster centers.\\n\\n    Parameters:\\n    - myList (list): List of 2D points.\\n    - n_clusters (int): Number of clusters to form.\\n\\n    Returns:\\n    - matplotlib.axes._axes.Axes: Axes object with the plotted clusters.\\n\\n    Requirements:\\n    - matplotlib.pyplot\\n    - sklearn.cluster.KMeans\\n\\n    Example:\\n    >>> myList = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]]\\n    >>> ax = task_func(myList, 2)\\n    >>> type(ax)\\n    <class 'matplotlib.axes._axes.Axes'>\\n    >>> ax.get_xticklabels()\\n    [Text(0.0, 0, '0'), Text(1.0, 0, '1'), Text(2.0, 0, '2'), Text(3.0, 0, '3'), Text(4.0, 0, '4'), Text(5.0, 0, '5'), Text(6.0, 0, '6'), Text(7.0, 0, '7'), Text(8.0, 0, '8'), Text(9.0, 0, '9'), Text(10.0, 0, '10')]\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Cluster a list of 2D points using KMeans and visualize the clusters.\\nNote that: This function raises ValueError if it encounters invalid inputs. KMeans is performed with random_state = 42 and n_init = 10. Scatterplot uses red 'x' markers for cluster centers.\\nThe function should output with:\\n    matplotlib.axes._axes.Axes: Axes object with the plotted clusters.\\nYou should write self-contained code starting with:\\n```\\nimport matplotlib.pyplot as plt\\nfrom sklearn.cluster import KMeans\\ndef task_func(myList, n_clusters):\\n```\",\"libs\":\"['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":[]}