Dataset Viewer
Auto-converted to Parquet Duplicate
kind
stringclasses
1 value
task_id
stringlengths
11
13
prompt
stringlengths
115
1.36k
entry_point
stringlengths
1
30
test
stringlengths
910
502k
example
stringclasses
1 value
canonical_solution
stringlengths
134
1.76k
humaneval
HumanEval/0
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, ...
has_close_elements
import numpy as np def is_floats(x) -> bool: # check if it is float; List[float]; Tuple[float] if isinstance(x, float): return True if isinstance(x, (list, tuple)): return all(isinstance(i, float) for i in x) if isinstance(x, np.ndarray): return x.dtype == np.float64 or x.dtyp...
from typing import List def has_close_elements(numbers: List[float], threshold: float) -> bool: """ Check if in given list of numbers, are any two numbers closer to each other than given threshold. >>> has_close_elements([1.0, 2.0, 3.0], 0.5) False >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, ...
humaneval
HumanEval/1
from typing import List def separate_paren_groups(paren_string: str) -> List[str]: """ Input to this function is a string containing multiple groups of nested parentheses. Your goal is to separate those group into separate strings and return the list of those. Separate groups are balanced (each open brace...
separate_paren_groups
import numpy as np def is_floats(x) -> bool: # check if it is float; List[float]; Tuple[float] if isinstance(x, float): return True if isinstance(x, (list, tuple)): return all(isinstance(i, float) for i in x) if isinstance(x, np.ndarray): return x.dtype == np.float64 or x.dtyp...
from typing import List def separate_paren_groups(paren_string: str) -> List[str]: """ Input to this function is a string containing multiple groups of nested parentheses. Your goal is to separate those group into separate strings and return the list of those. Separate groups are balanced (each open brace...
humaneval
HumanEval/2
def truncate_number(number: float) -> float: """ Given a positive floating point number, it can be decomposed into and integer part (largest integer smaller than given number) and decimals (leftover part always smaller than 1). Return the decimal part of the number. >>> truncate_number(3.5) 0...
truncate_number
import numpy as np def is_floats(x) -> bool: # check if it is float; List[float]; Tuple[float] if isinstance(x, float): return True if isinstance(x, (list, tuple)): return all(isinstance(i, float) for i in x) if isinstance(x, np.ndarray): return x.dtype == np.float64 or x.dtyp...
def truncate_number(number: float) -> float: """ Given a positive floating point number, it can be decomposed into and integer part (largest integer smaller than given number) and decimals (leftover part always smaller than 1). Return the decimal part of the number. >>> truncate_number(3.5) 0...
humaneval
HumanEval/3
"from typing import List\n\n\ndef below_zero(operations: List[int]) -> bool:\n \"\"\" You're give(...TRUNCATED)
below_zero
"\n\nimport numpy as np\n\ndef is_floats(x) -> bool:\n # check if it is float; List[float]; Tuple(...TRUNCATED)
"from typing import List\n\n\ndef below_zero(operations: List[int]) -> bool:\n \"\"\" You're give(...TRUNCATED)
humaneval
HumanEval/4
"from typing import List\n\n\ndef mean_absolute_deviation(numbers: List[float]) -> float:\n \"\"\(...TRUNCATED)
mean_absolute_deviation
"\n\nimport numpy as np\n\ndef is_floats(x) -> bool:\n # check if it is float; List[float]; Tuple(...TRUNCATED)
"from typing import List\n\n\ndef mean_absolute_deviation(numbers: List[float]) -> float:\n \"\"\(...TRUNCATED)
humaneval
HumanEval/5
"from typing import List\n\n\ndef intersperse(numbers: List[int], delimeter: int) -> List[int]:\n (...TRUNCATED)
intersperse
"\n\nimport numpy as np\n\ndef is_floats(x) -> bool:\n # check if it is float; List[float]; Tuple(...TRUNCATED)
"from typing import List\n\n\ndef intersperse(numbers: List[int], delimeter: int) -> List[int]:\n (...TRUNCATED)
humaneval
HumanEval/6
"from typing import List\n\n\ndef parse_nested_parens(paren_string: str) -> List[int]:\n \"\"\" I(...TRUNCATED)
parse_nested_parens
"\n\nimport numpy as np\n\ndef is_floats(x) -> bool:\n # check if it is float; List[float]; Tuple(...TRUNCATED)
"from typing import List\n\n\ndef parse_nested_parens(paren_string: str) -> List[int]:\n \"\"\" I(...TRUNCATED)
humaneval
HumanEval/7
"from typing import List\n\n\ndef filter_by_substring(strings: List[str], substring: str) -> List[st(...TRUNCATED)
filter_by_substring
"\n\nimport numpy as np\n\ndef is_floats(x) -> bool:\n # check if it is float; List[float]; Tuple(...TRUNCATED)
"from typing import List\n\n\ndef filter_by_substring(strings: List[str], substring: str) -> List[st(...TRUNCATED)
humaneval
HumanEval/8
"from typing import List, Tuple\n\n\ndef sum_product(numbers: List[int]) -> Tuple[int, int]:\n \"(...TRUNCATED)
sum_product
"\n\nimport numpy as np\n\ndef is_floats(x) -> bool:\n # check if it is float; List[float]; Tuple(...TRUNCATED)
"from typing import List, Tuple\n\n\ndef sum_product(numbers: List[int]) -> Tuple[int, int]:\n \"(...TRUNCATED)
humaneval
HumanEval/9
"from typing import List, Tuple\n\n\ndef rolling_max(numbers: List[int]) -> List[int]:\n \"\"\" F(...TRUNCATED)
rolling_max
"\n\nimport numpy as np\n\ndef is_floats(x) -> bool:\n # check if it is float; List[float]; Tuple(...TRUNCATED)
"from typing import List, Tuple\n\n\ndef rolling_max(numbers: List[int]) -> List[int]:\n \"\"\" F(...TRUNCATED)
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
61