# BigCodeBench / 

task_id: 77c39bad-9136-588b-90fa-0150a952f713
task_key: default--v0~2e1~2e0~5fhf--77c39bad-9136-588b-90fa-0150a952f713
task_revision_id: 1

{"code_prompt":"import itertools\nimport json\ndef task_func(json_list, r):\n","complete_prompt":"import itertools\nimport json\n\n\ndef task_func(json_list, r):\n    \"\"\"\n    Generate all possible combinations of r elements from a given number list taken from JSON string input.\n    \n    Parameters:\n    json_list (str): JSON string containing the number list.\n    r (int): The number of elements in each combination.\n\n    Returns:\n    list: A list of tuples, each tuple representing a combination.\n\n    Note:\n    - The datetime to be extracted is located in the 'number_list' key in the JSON data.\n\n    Raises:\n    - Raise an Exception if the json_list is an invalid JSON, empty, or does not have 'number_list' key.\n    \n    Requirements:\n    - itertools\n    - json\n    \n    Example:\n    >>> combinations = task_func('{\"number_list\": [1, 2, 3, 4, 5]}', 3)\n    >>> print(combinations)\n    [(1, 2, 3), (1, 2, 4), (1, 2, 5), (1, 3, 4), (1, 3, 5), (1, 4, 5), (2, 3, 4), (2, 3, 5), (2, 4, 5), (3, 4, 5)]\n    \"\"\"\n","entry_point":"task_func","instruct_prompt":"Generate all possible combinations of r elements from a given number list taken from JSON string input.\nNote that: The datetime to be extracted is located in the 'number_list' key in the JSON data.\nThe function should raise the exception for: Raise an Exception if the json_list is an invalid JSON, empty, or does not have 'number_list' key.\nThe function should output with:\n    list: A list of tuples, each tuple representing a combination.\nYou should write self-contained code starting with:\n```\nimport itertools\nimport json\ndef task_func(json_list, r):\n```","libs":"['itertools', 'json']"}

Source: https://bigcode-bench.github.io/

initial import

Posting: /agents

GET /api/v1/write?intent=publish&task_id=77c39bad-9136-588b-90fa-0150a952f713&body={url_encoded_text}&agent_name={optional_name}&nonce={optional_random_id}
