{"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":"f8e7796f-ace9-506d-8376-cfe3be447660","task_key":"default--v0~2e1~2e0~5fhf--f8e7796f-ace9-506d-8376-cfe3be447660","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf f8e7796f-ace9-506d-8376-cfe3be447660","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import sqlite3\\nimport random\\ndef task_func(db_path,\\n          num_entries,\\n          users=['Alice', 'Bob', 'Charlie', 'Dave', 'Eve'],\\n          countries=['USA', 'UK', 'Canada', 'Australia', 'India'],\\n          random_seed=None):\\n\",\"complete_prompt\":\"import sqlite3\\nimport random\\n\\n\\ndef task_func(db_path,\\n          num_entries,\\n          users=['Alice', 'Bob', 'Charlie', 'Dave', 'Eve'],\\n          countries=['USA', 'UK', 'Canada', 'Australia', 'India'],\\n          random_seed=None):\\n    \\\"\\\"\\\"\\n    Generate an SQLite database to a given file path with random user data.\\n\\n    The user data consists of a table named 'users' with columns:\\n        - id (integer): Used as Primary Key. numbering of entries starting at 0.\\n        - name (string): name of the user. sampled from 'users'\\n        - age (int): age of the user, where 20 <= age <= 60.\\n        - country (string): sampled from 'countries'\\n\\n    The number of entries in the database is determined by num_entries.\\n\\n    Parameters:\\n    db_path (str): The file path where the SQLite database should be created.\\n    num_entries (int): The number of entries of random data to generate.\\n    users (list of str, optional): List of user names to choose from. Defaults to ['Alice', 'Bob', 'Charlie', 'Dave', 'Eve'].\\n    countries (list of str, optional): List of countries to choose from. Defaults to ['USA', 'UK', 'Canada', 'Australia', 'India'].\\n    random_seed (int, optional): Seed used in rng. Defaults to Nonee.\\n    \\n    Returns:\\n    str: The file path of the generated SQLite database.\\n\\n    Requirements:\\n    - sqlite3\\n    - random\\n\\n    Example:\\n    >>> task_func('/tmp/users.db', 100)\\n    '/tmp/users.db'\\n\\n    >>> path = task_func('test.db', num_entries=3, random_seed=2, users=['Simon', 'Albert'])\\n    >>> conn = sqlite3.connect('test.db')\\n    >>> c = conn.cursor()\\n    >>> c.execute(\\\"SELECT * FROM users\\\")\\n    >>> c.fetchall()\\n    [(1, 'Simon', 25, 'USA'), (2, 'Viola', 30, 'Canada'), (3, 'Viola', 58, 'UK')]\\n    >>> c.execute(\\\"PRAGMA table_info(users)\\\")\\n    >>> c.fetchall()\\n    [(0, 'id', 'INTEGER', 0, None, 1),\\n    (1, 'name', 'TEXT', 0, None, 0),\\n    (2, 'age', 'INTEGER', 0, None, 0),\\n    (3, 'country', 'TEXT', 0, None, 0)]\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Generate an SQLite database to a given file path with random user data. The user data consists of a table named 'users' with columns: - id (integer): Used as Primary Key. numbering of entries starting at 0. - name (string): name of the user. sampled from 'users' - age (int): age of the user, where 20 <= age <= 60. - country (string): sampled from 'countries' The number of entries in the database is determined by num_entries. >>> path = task_func('test.db', num_entries=3, random_seed=2, users=['Simon', 'Albert']) >>> conn = sqlite3.connect('test.db') >>> c = conn.cursor() >>> c.execute(\\\"SELECT * FROM users\\\") >>> c.fetchall() [(1, 'Simon', 25, 'USA'), (2, 'Viola', 30, 'Canada'), (3, 'Viola', 58, 'UK')] >>> c.execute(\\\"PRAGMA table_info(users)\\\") >>> c.fetchall() [(0, 'id', 'INTEGER', 0, None, 1), (1, 'name', 'TEXT', 0, None, 0), (2, 'age', 'INTEGER', 0, None, 0), (3, 'country', 'TEXT', 0, None, 0)]\\nThe function should output with:\\n    str: The file path of the generated SQLite database.\\nYou should write self-contained code starting with:\\n```\\nimport sqlite3\\nimport random\\ndef task_func(db_path,\\n          num_entries,\\n          users=['Alice', 'Bob', 'Charlie', 'Dave', 'Eve'],\\n          countries=['USA', 'UK', 'Canada', 'Australia', 'India'],\\n          random_seed=None):\\n```\",\"libs\":\"['sqlite3', 'random']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}