{"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":"9163421e-11d8-5de7-ae36-1921762cbd25","task_key":"default--v0~2e1~2e0~5fhf--9163421e-11d8-5de7-ae36-1921762cbd25","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 9163421e-11d8-5de7-ae36-1921762cbd25","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import hashlib\\nimport binascii\\ndef task_func(salt, cursor):\\n\",\"complete_prompt\":\"import hashlib\\nimport binascii\\n\\ndef task_func(salt, cursor):\\n    \\\"\\\"\\\"\\n    Updates the passwords in a user table of an SQLite database by hashing them with SHA256, \\n    using a provided salt. The function directly modifies the database via the given cursor.\\n\\n    Parameters:\\n    - salt (str): The salt value to be appended to each password before hashing.\\n    - cursor (sqlite3.Cursor): A cursor object through which SQL commands are executed.\\n\\n    Returns:\\n    - int: The number of users whose passwords were successfully updated.\\n\\n    Requirements:\\n    - hashlib\\n    - binascii\\n\\n    Raises:\\n    TypeError if the salt is not a string\\n    \\n    Example:\\n    >>> conn = sqlite3.connect('sample.db')\\n    >>> cursor = conn.cursor()\\n    >>> num_updated = task_func('mysalt', cursor)\\n    >>> print(num_updated)\\n    5\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Updates the passwords in a user table of an SQLite database by hashing them with SHA256, using a provided salt. The function directly modifies the database via the given cursor.\\nThe function should raise the exception for: TypeError if the salt is not a string\\nThe function should output with:\\n    int: The number of users whose passwords were successfully updated.\\nYou should write self-contained code starting with:\\n```\\nimport hashlib\\nimport binascii\\ndef task_func(salt, cursor):\\n```\",\"libs\":\"['hashlib', 'binascii']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}