prefix stringlengths 65 1.8k | suffix stringclasses 839
values | solution stringlengths 6 859 | test_cases listlengths 0 100 | import_str listlengths 0 1 | demos listlengths 0 8 | entry_func stringclasses 158
values | data_id stringlengths 36 40 | doc_string stringclasses 164
values | dataset_name stringclasses 1
value | task_name stringclasses 1
value | compare_func listlengths 0 0 | src_lang stringclasses 1
value | tgt_lang stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... |
for _ in range(4, n + 1):
results.append(results[-1] + results[-2] + results[-3] + results[-4])
results.pop(0)
return results[-1]
| results = [0, 0, 2, 0]
if n < 4:
return results[n]
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L0_L2 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... | results.append(results[-1] + results[-2] + results[-3] + results[-4])
results.pop(0)
return results[-1]
| results = [0, 0, 2, 0]
if n < 4:
return results[n]
for _ in range(4, n + 1):
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L0_L4 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... | results.pop(0)
return results[-1]
| results = [0, 0, 2, 0]
if n < 4:
return results[n]
for _ in range(4, n + 1):
results.append(results[-1] + results[-2] + results[-3] + results[-4])
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L0_L5 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... |
return results[-1]
| results = [0, 0, 2, 0]
if n < 4:
return results[n]
for _ in range(4, n + 1):
results.append(results[-1] + results[-2] + results[-3] + results[-4])
results.pop(0)
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L0_L6 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... | results = [0, 0, 2, 0]
if n < 4:
return results[n]
for _ in range(4, n + 1):
results.append(results[-1] + results[-2] + results[-3] + results[-4])
results.pop(0)
return results[-1]
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L0_L8 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... | return results[n]
for _ in range(4, n + 1):
results.append(results[-1] + results[-2] + results[-3] + results[-4])
results.pop(0)
return results[-1]
| if n < 4:
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L1_L1 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... |
for _ in range(4, n + 1):
results.append(results[-1] + results[-2] + results[-3] + results[-4])
results.pop(0)
return results[-1]
| if n < 4:
return results[n]
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L1_L2 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... | results.append(results[-1] + results[-2] + results[-3] + results[-4])
results.pop(0)
return results[-1]
| if n < 4:
return results[n]
for _ in range(4, n + 1):
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L1_L4 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... | results.pop(0)
return results[-1]
| if n < 4:
return results[n]
for _ in range(4, n + 1):
results.append(results[-1] + results[-2] + results[-3] + results[-4])
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L1_L5 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... |
return results[-1]
| if n < 4:
return results[n]
for _ in range(4, n + 1):
results.append(results[-1] + results[-2] + results[-3] + results[-4])
results.pop(0)
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L1_L6 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... | if n < 4:
return results[n]
for _ in range(4, n + 1):
results.append(results[-1] + results[-2] + results[-3] + results[-4])
results.pop(0)
return results[-1]
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L1_L8 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... |
for _ in range(4, n + 1):
results.append(results[-1] + results[-2] + results[-3] + results[-4])
results.pop(0)
return results[-1]
| return results[n]
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L2_L2 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... | results.append(results[-1] + results[-2] + results[-3] + results[-4])
results.pop(0)
return results[-1]
| return results[n]
for _ in range(4, n + 1):
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L2_L4 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... | results.pop(0)
return results[-1]
| return results[n]
for _ in range(4, n + 1):
results.append(results[-1] + results[-2] + results[-3] + results[-4])
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L2_L5 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... |
return results[-1]
| return results[n]
for _ in range(4, n + 1):
results.append(results[-1] + results[-2] + results[-3] + results[-4])
results.pop(0)
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L2_L6 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... | return results[n]
for _ in range(4, n + 1):
results.append(results[-1] + results[-2] + results[-3] + results[-4])
results.pop(0)
return results[-1]
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L2_L8 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... | results.append(results[-1] + results[-2] + results[-3] + results[-4])
results.pop(0)
return results[-1]
| for _ in range(4, n + 1):
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L4_L4 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... | results.pop(0)
return results[-1]
| for _ in range(4, n + 1):
results.append(results[-1] + results[-2] + results[-3] + results[-4])
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L4_L5 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... |
return results[-1]
| for _ in range(4, n + 1):
results.append(results[-1] + results[-2] + results[-3] + results[-4])
results.pop(0)
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L4_L6 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... | for _ in range(4, n + 1):
results.append(results[-1] + results[-2] + results[-3] + results[-4])
results.pop(0)
return results[-1]
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L4_L8 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... | results.pop(0)
return results[-1]
| results.append(results[-1] + results[-2] + results[-3] + results[-4])
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L5_L5 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... |
return results[-1]
| results.append(results[-1] + results[-2] + results[-3] + results[-4])
results.pop(0)
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L5_L6 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... | results.append(results[-1] + results[-2] + results[-3] + results[-4])
results.pop(0)
return results[-1]
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L5_L8 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... |
return results[-1]
| results.pop(0)
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L6_L6 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... | results.pop(0)
return results[-1]
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L6_L8 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def fib4(n: int):
"""The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th el... | return results[-1]
| [
[
"5",
"4"
],
[
"8",
"28"
],
[
"10",
"104"
],
[
"12",
"386"
]
] | [] | [
[
"5",
"4"
],
[
"6",
"8"
],
[
"7",
"14"
]
] | fib4 | MultiLineInfilling/HumanEval/46/L8_L8 | The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
Please write a function to efficiently compute the n-th element of the fib4 number se... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def median(l: list):
"""Return median of elements in the list l.
"""
| if len(l) % 2 == 1:
return l[len(l) // 2]
else:
return (l[len(l) // 2 - 1] + l[len(l) // 2]) / 2.0
| l = sorted(l)
| [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"8.0"
],
[
"[5]",
"5"
],
[
"[6, 5]",
"5.5"
],
[
"[8, 1, 3, 9, 9, 2, 7]",
"7"
]
] | [] | [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"15.0"
]
] | median | MultiLineInfilling/HumanEval/47/L0_L0 | Return median of elements in the list l. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def median(l: list):
"""Return median of elements in the list l.
"""
| return l[len(l) // 2]
else:
return (l[len(l) // 2 - 1] + l[len(l) // 2]) / 2.0
| l = sorted(l)
if len(l) % 2 == 1:
| [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"8.0"
],
[
"[5]",
"5"
],
[
"[6, 5]",
"5.5"
],
[
"[8, 1, 3, 9, 9, 2, 7]",
"7"
]
] | [] | [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"15.0"
]
] | median | MultiLineInfilling/HumanEval/47/L0_L1 | Return median of elements in the list l. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def median(l: list):
"""Return median of elements in the list l.
"""
| else:
return (l[len(l) // 2 - 1] + l[len(l) // 2]) / 2.0
| l = sorted(l)
if len(l) % 2 == 1:
return l[len(l) // 2]
| [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"8.0"
],
[
"[5]",
"5"
],
[
"[6, 5]",
"5.5"
],
[
"[8, 1, 3, 9, 9, 2, 7]",
"7"
]
] | [] | [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"15.0"
]
] | median | MultiLineInfilling/HumanEval/47/L0_L2 | Return median of elements in the list l. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def median(l: list):
"""Return median of elements in the list l.
"""
| return (l[len(l) // 2 - 1] + l[len(l) // 2]) / 2.0
| l = sorted(l)
if len(l) % 2 == 1:
return l[len(l) // 2]
else:
| [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"8.0"
],
[
"[5]",
"5"
],
[
"[6, 5]",
"5.5"
],
[
"[8, 1, 3, 9, 9, 2, 7]",
"7"
]
] | [] | [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"15.0"
]
] | median | MultiLineInfilling/HumanEval/47/L0_L3 | Return median of elements in the list l. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def median(l: list):
"""Return median of elements in the list l.
"""
| l = sorted(l)
if len(l) % 2 == 1:
return l[len(l) // 2]
else:
return (l[len(l) // 2 - 1] + l[len(l) // 2]) / 2.0
| [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"8.0"
],
[
"[5]",
"5"
],
[
"[6, 5]",
"5.5"
],
[
"[8, 1, 3, 9, 9, 2, 7]",
"7"
]
] | [] | [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"15.0"
]
] | median | MultiLineInfilling/HumanEval/47/L0_L4 | Return median of elements in the list l. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def median(l: list):
"""Return median of elements in the list l.
"""
l = sorted(l)
| return l[len(l) // 2]
else:
return (l[len(l) // 2 - 1] + l[len(l) // 2]) / 2.0
| if len(l) % 2 == 1:
| [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"8.0"
],
[
"[5]",
"5"
],
[
"[6, 5]",
"5.5"
],
[
"[8, 1, 3, 9, 9, 2, 7]",
"7"
]
] | [] | [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"15.0"
]
] | median | MultiLineInfilling/HumanEval/47/L1_L1 | Return median of elements in the list l. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def median(l: list):
"""Return median of elements in the list l.
"""
l = sorted(l)
| else:
return (l[len(l) // 2 - 1] + l[len(l) // 2]) / 2.0
| if len(l) % 2 == 1:
return l[len(l) // 2]
| [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"8.0"
],
[
"[5]",
"5"
],
[
"[6, 5]",
"5.5"
],
[
"[8, 1, 3, 9, 9, 2, 7]",
"7"
]
] | [] | [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"15.0"
]
] | median | MultiLineInfilling/HumanEval/47/L1_L2 | Return median of elements in the list l. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def median(l: list):
"""Return median of elements in the list l.
"""
l = sorted(l)
| return (l[len(l) // 2 - 1] + l[len(l) // 2]) / 2.0
| if len(l) % 2 == 1:
return l[len(l) // 2]
else:
| [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"8.0"
],
[
"[5]",
"5"
],
[
"[6, 5]",
"5.5"
],
[
"[8, 1, 3, 9, 9, 2, 7]",
"7"
]
] | [] | [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"15.0"
]
] | median | MultiLineInfilling/HumanEval/47/L1_L3 | Return median of elements in the list l. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def median(l: list):
"""Return median of elements in the list l.
"""
l = sorted(l)
| if len(l) % 2 == 1:
return l[len(l) // 2]
else:
return (l[len(l) // 2 - 1] + l[len(l) // 2]) / 2.0
| [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"8.0"
],
[
"[5]",
"5"
],
[
"[6, 5]",
"5.5"
],
[
"[8, 1, 3, 9, 9, 2, 7]",
"7"
]
] | [] | [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"15.0"
]
] | median | MultiLineInfilling/HumanEval/47/L1_L4 | Return median of elements in the list l. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def median(l: list):
"""Return median of elements in the list l.
"""
l = sorted(l)
if len(l) % 2 == 1:
| else:
return (l[len(l) // 2 - 1] + l[len(l) // 2]) / 2.0
| return l[len(l) // 2]
| [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"8.0"
],
[
"[5]",
"5"
],
[
"[6, 5]",
"5.5"
],
[
"[8, 1, 3, 9, 9, 2, 7]",
"7"
]
] | [] | [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"15.0"
]
] | median | MultiLineInfilling/HumanEval/47/L2_L2 | Return median of elements in the list l. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def median(l: list):
"""Return median of elements in the list l.
"""
l = sorted(l)
if len(l) % 2 == 1:
| return (l[len(l) // 2 - 1] + l[len(l) // 2]) / 2.0
| return l[len(l) // 2]
else:
| [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"8.0"
],
[
"[5]",
"5"
],
[
"[6, 5]",
"5.5"
],
[
"[8, 1, 3, 9, 9, 2, 7]",
"7"
]
] | [] | [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"15.0"
]
] | median | MultiLineInfilling/HumanEval/47/L2_L3 | Return median of elements in the list l. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def median(l: list):
"""Return median of elements in the list l.
"""
l = sorted(l)
if len(l) % 2 == 1:
| return l[len(l) // 2]
else:
return (l[len(l) // 2 - 1] + l[len(l) // 2]) / 2.0
| [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"8.0"
],
[
"[5]",
"5"
],
[
"[6, 5]",
"5.5"
],
[
"[8, 1, 3, 9, 9, 2, 7]",
"7"
]
] | [] | [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"15.0"
]
] | median | MultiLineInfilling/HumanEval/47/L2_L4 | Return median of elements in the list l. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def median(l: list):
"""Return median of elements in the list l.
"""
l = sorted(l)
if len(l) % 2 == 1:
return l[len(l) // 2]
| return (l[len(l) // 2 - 1] + l[len(l) // 2]) / 2.0
| else:
| [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"8.0"
],
[
"[5]",
"5"
],
[
"[6, 5]",
"5.5"
],
[
"[8, 1, 3, 9, 9, 2, 7]",
"7"
]
] | [] | [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"15.0"
]
] | median | MultiLineInfilling/HumanEval/47/L3_L3 | Return median of elements in the list l. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def median(l: list):
"""Return median of elements in the list l.
"""
l = sorted(l)
if len(l) % 2 == 1:
return l[len(l) // 2]
| else:
return (l[len(l) // 2 - 1] + l[len(l) // 2]) / 2.0
| [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"8.0"
],
[
"[5]",
"5"
],
[
"[6, 5]",
"5.5"
],
[
"[8, 1, 3, 9, 9, 2, 7]",
"7"
]
] | [] | [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"15.0"
]
] | median | MultiLineInfilling/HumanEval/47/L3_L4 | Return median of elements in the list l. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def median(l: list):
"""Return median of elements in the list l.
"""
l = sorted(l)
if len(l) % 2 == 1:
return l[len(l) // 2]
else:
| return (l[len(l) // 2 - 1] + l[len(l) // 2]) / 2.0
| [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"8.0"
],
[
"[5]",
"5"
],
[
"[6, 5]",
"5.5"
],
[
"[8, 1, 3, 9, 9, 2, 7]",
"7"
]
] | [] | [
[
"[3, 1, 2, 4, 5]",
"3"
],
[
"[-10, 4, 6, 1000, 10, 20]",
"15.0"
]
] | median | MultiLineInfilling/HumanEval/47/L4_L4 | Return median of elements in the list l. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def is_palindrome(text: str):
"""
Checks if given string is a palindrome
"""
| if text[i] != text[len(text) - 1 - i]:
return False
return True
| for i in range(len(text)):
| [
[
"''",
"True"
],
[
"'aba'",
"True"
],
[
"'aaaaa'",
"True"
],
[
"'zbcd'",
"False"
],
[
"'xywyx'",
"True"
],
[
"'xywyz'",
"False"
],
[
"'xywzx'",
"False"
]
] | [] | [
[
"''",
"True"
],
[
"'aba'",
"True"
],
[
"'aaaaa'",
"True"
],
[
"'zbcd'",
"False"
]
] | is_palindrome | MultiLineInfilling/HumanEval/48/L0_L0 | Checks if given string is a palindrome | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def is_palindrome(text: str):
"""
Checks if given string is a palindrome
"""
| return False
return True
| for i in range(len(text)):
if text[i] != text[len(text) - 1 - i]:
| [
[
"''",
"True"
],
[
"'aba'",
"True"
],
[
"'aaaaa'",
"True"
],
[
"'zbcd'",
"False"
],
[
"'xywyx'",
"True"
],
[
"'xywyz'",
"False"
],
[
"'xywzx'",
"False"
]
] | [] | [
[
"''",
"True"
],
[
"'aba'",
"True"
],
[
"'aaaaa'",
"True"
],
[
"'zbcd'",
"False"
]
] | is_palindrome | MultiLineInfilling/HumanEval/48/L0_L1 | Checks if given string is a palindrome | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def is_palindrome(text: str):
"""
Checks if given string is a palindrome
"""
| return True
| for i in range(len(text)):
if text[i] != text[len(text) - 1 - i]:
return False
| [
[
"''",
"True"
],
[
"'aba'",
"True"
],
[
"'aaaaa'",
"True"
],
[
"'zbcd'",
"False"
],
[
"'xywyx'",
"True"
],
[
"'xywyz'",
"False"
],
[
"'xywzx'",
"False"
]
] | [] | [
[
"''",
"True"
],
[
"'aba'",
"True"
],
[
"'aaaaa'",
"True"
],
[
"'zbcd'",
"False"
]
] | is_palindrome | MultiLineInfilling/HumanEval/48/L0_L2 | Checks if given string is a palindrome | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def is_palindrome(text: str):
"""
Checks if given string is a palindrome
"""
| for i in range(len(text)):
if text[i] != text[len(text) - 1 - i]:
return False
return True
| [
[
"''",
"True"
],
[
"'aba'",
"True"
],
[
"'aaaaa'",
"True"
],
[
"'zbcd'",
"False"
],
[
"'xywyx'",
"True"
],
[
"'xywyz'",
"False"
],
[
"'xywzx'",
"False"
]
] | [] | [
[
"''",
"True"
],
[
"'aba'",
"True"
],
[
"'aaaaa'",
"True"
],
[
"'zbcd'",
"False"
]
] | is_palindrome | MultiLineInfilling/HumanEval/48/L0_L3 | Checks if given string is a palindrome | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def is_palindrome(text: str):
"""
Checks if given string is a palindrome
"""
for i in range(len(text)):
| return False
return True
| if text[i] != text[len(text) - 1 - i]:
| [
[
"''",
"True"
],
[
"'aba'",
"True"
],
[
"'aaaaa'",
"True"
],
[
"'zbcd'",
"False"
],
[
"'xywyx'",
"True"
],
[
"'xywyz'",
"False"
],
[
"'xywzx'",
"False"
]
] | [] | [
[
"''",
"True"
],
[
"'aba'",
"True"
],
[
"'aaaaa'",
"True"
],
[
"'zbcd'",
"False"
]
] | is_palindrome | MultiLineInfilling/HumanEval/48/L1_L1 | Checks if given string is a palindrome | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def is_palindrome(text: str):
"""
Checks if given string is a palindrome
"""
for i in range(len(text)):
| return True
| if text[i] != text[len(text) - 1 - i]:
return False
| [
[
"''",
"True"
],
[
"'aba'",
"True"
],
[
"'aaaaa'",
"True"
],
[
"'zbcd'",
"False"
],
[
"'xywyx'",
"True"
],
[
"'xywyz'",
"False"
],
[
"'xywzx'",
"False"
]
] | [] | [
[
"''",
"True"
],
[
"'aba'",
"True"
],
[
"'aaaaa'",
"True"
],
[
"'zbcd'",
"False"
]
] | is_palindrome | MultiLineInfilling/HumanEval/48/L1_L2 | Checks if given string is a palindrome | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def is_palindrome(text: str):
"""
Checks if given string is a palindrome
"""
for i in range(len(text)):
| if text[i] != text[len(text) - 1 - i]:
return False
return True
| [
[
"''",
"True"
],
[
"'aba'",
"True"
],
[
"'aaaaa'",
"True"
],
[
"'zbcd'",
"False"
],
[
"'xywyx'",
"True"
],
[
"'xywyz'",
"False"
],
[
"'xywzx'",
"False"
]
] | [] | [
[
"''",
"True"
],
[
"'aba'",
"True"
],
[
"'aaaaa'",
"True"
],
[
"'zbcd'",
"False"
]
] | is_palindrome | MultiLineInfilling/HumanEval/48/L1_L3 | Checks if given string is a palindrome | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def is_palindrome(text: str):
"""
Checks if given string is a palindrome
"""
for i in range(len(text)):
if text[i] != text[len(text) - 1 - i]:
| return True
| return False
| [
[
"''",
"True"
],
[
"'aba'",
"True"
],
[
"'aaaaa'",
"True"
],
[
"'zbcd'",
"False"
],
[
"'xywyx'",
"True"
],
[
"'xywyz'",
"False"
],
[
"'xywzx'",
"False"
]
] | [] | [
[
"''",
"True"
],
[
"'aba'",
"True"
],
[
"'aaaaa'",
"True"
],
[
"'zbcd'",
"False"
]
] | is_palindrome | MultiLineInfilling/HumanEval/48/L2_L2 | Checks if given string is a palindrome | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def is_palindrome(text: str):
"""
Checks if given string is a palindrome
"""
for i in range(len(text)):
if text[i] != text[len(text) - 1 - i]:
| return False
return True
| [
[
"''",
"True"
],
[
"'aba'",
"True"
],
[
"'aaaaa'",
"True"
],
[
"'zbcd'",
"False"
],
[
"'xywyx'",
"True"
],
[
"'xywyz'",
"False"
],
[
"'xywzx'",
"False"
]
] | [] | [
[
"''",
"True"
],
[
"'aba'",
"True"
],
[
"'aaaaa'",
"True"
],
[
"'zbcd'",
"False"
]
] | is_palindrome | MultiLineInfilling/HumanEval/48/L2_L3 | Checks if given string is a palindrome | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def is_palindrome(text: str):
"""
Checks if given string is a palindrome
"""
for i in range(len(text)):
if text[i] != text[len(text) - 1 - i]:
return False
| return True
| [
[
"''",
"True"
],
[
"'aba'",
"True"
],
[
"'aaaaa'",
"True"
],
[
"'zbcd'",
"False"
],
[
"'xywyx'",
"True"
],
[
"'xywyz'",
"False"
],
[
"'xywzx'",
"False"
]
] | [] | [
[
"''",
"True"
],
[
"'aba'",
"True"
],
[
"'aaaaa'",
"True"
],
[
"'zbcd'",
"False"
]
] | is_palindrome | MultiLineInfilling/HumanEval/48/L3_L3 | Checks if given string is a palindrome | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def modp(n: int, p: int):
"""Return 2^n modulo p (be aware of numerics).
"""
| for i in range(n):
ret = (2 * ret) % p
return ret
| ret = 1
| [
[
"3, 5",
"3"
],
[
"1101, 101",
"2"
],
[
"0, 101",
"1"
],
[
"3, 11",
"8"
],
[
"100, 101",
"1"
],
[
"30, 5",
"4"
],
[
"31, 5",
"3"
]
] | [] | [
[
"3, 5",
"3"
],
[
"1101, 101",
"2"
],
[
"0, 101",
"1"
],
[
"3, 11",
"8"
],
[
"100, 101",
"1"
]
] | modp | MultiLineInfilling/HumanEval/49/L0_L0 | Return 2^n modulo p (be aware of numerics). | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def modp(n: int, p: int):
"""Return 2^n modulo p (be aware of numerics).
"""
| ret = (2 * ret) % p
return ret
| ret = 1
for i in range(n):
| [
[
"3, 5",
"3"
],
[
"1101, 101",
"2"
],
[
"0, 101",
"1"
],
[
"3, 11",
"8"
],
[
"100, 101",
"1"
],
[
"30, 5",
"4"
],
[
"31, 5",
"3"
]
] | [] | [
[
"3, 5",
"3"
],
[
"1101, 101",
"2"
],
[
"0, 101",
"1"
],
[
"3, 11",
"8"
],
[
"100, 101",
"1"
]
] | modp | MultiLineInfilling/HumanEval/49/L0_L1 | Return 2^n modulo p (be aware of numerics). | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def modp(n: int, p: int):
"""Return 2^n modulo p (be aware of numerics).
"""
| return ret
| ret = 1
for i in range(n):
ret = (2 * ret) % p
| [
[
"3, 5",
"3"
],
[
"1101, 101",
"2"
],
[
"0, 101",
"1"
],
[
"3, 11",
"8"
],
[
"100, 101",
"1"
],
[
"30, 5",
"4"
],
[
"31, 5",
"3"
]
] | [] | [
[
"3, 5",
"3"
],
[
"1101, 101",
"2"
],
[
"0, 101",
"1"
],
[
"3, 11",
"8"
],
[
"100, 101",
"1"
]
] | modp | MultiLineInfilling/HumanEval/49/L0_L2 | Return 2^n modulo p (be aware of numerics). | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def modp(n: int, p: int):
"""Return 2^n modulo p (be aware of numerics).
"""
| ret = 1
for i in range(n):
ret = (2 * ret) % p
return ret
| [
[
"3, 5",
"3"
],
[
"1101, 101",
"2"
],
[
"0, 101",
"1"
],
[
"3, 11",
"8"
],
[
"100, 101",
"1"
],
[
"30, 5",
"4"
],
[
"31, 5",
"3"
]
] | [] | [
[
"3, 5",
"3"
],
[
"1101, 101",
"2"
],
[
"0, 101",
"1"
],
[
"3, 11",
"8"
],
[
"100, 101",
"1"
]
] | modp | MultiLineInfilling/HumanEval/49/L0_L3 | Return 2^n modulo p (be aware of numerics). | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def modp(n: int, p: int):
"""Return 2^n modulo p (be aware of numerics).
"""
ret = 1
| ret = (2 * ret) % p
return ret
| for i in range(n):
| [
[
"3, 5",
"3"
],
[
"1101, 101",
"2"
],
[
"0, 101",
"1"
],
[
"3, 11",
"8"
],
[
"100, 101",
"1"
],
[
"30, 5",
"4"
],
[
"31, 5",
"3"
]
] | [] | [
[
"3, 5",
"3"
],
[
"1101, 101",
"2"
],
[
"0, 101",
"1"
],
[
"3, 11",
"8"
],
[
"100, 101",
"1"
]
] | modp | MultiLineInfilling/HumanEval/49/L1_L1 | Return 2^n modulo p (be aware of numerics). | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def modp(n: int, p: int):
"""Return 2^n modulo p (be aware of numerics).
"""
ret = 1
| return ret
| for i in range(n):
ret = (2 * ret) % p
| [
[
"3, 5",
"3"
],
[
"1101, 101",
"2"
],
[
"0, 101",
"1"
],
[
"3, 11",
"8"
],
[
"100, 101",
"1"
],
[
"30, 5",
"4"
],
[
"31, 5",
"3"
]
] | [] | [
[
"3, 5",
"3"
],
[
"1101, 101",
"2"
],
[
"0, 101",
"1"
],
[
"3, 11",
"8"
],
[
"100, 101",
"1"
]
] | modp | MultiLineInfilling/HumanEval/49/L1_L2 | Return 2^n modulo p (be aware of numerics). | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def modp(n: int, p: int):
"""Return 2^n modulo p (be aware of numerics).
"""
ret = 1
| for i in range(n):
ret = (2 * ret) % p
return ret
| [
[
"3, 5",
"3"
],
[
"1101, 101",
"2"
],
[
"0, 101",
"1"
],
[
"3, 11",
"8"
],
[
"100, 101",
"1"
],
[
"30, 5",
"4"
],
[
"31, 5",
"3"
]
] | [] | [
[
"3, 5",
"3"
],
[
"1101, 101",
"2"
],
[
"0, 101",
"1"
],
[
"3, 11",
"8"
],
[
"100, 101",
"1"
]
] | modp | MultiLineInfilling/HumanEval/49/L1_L3 | Return 2^n modulo p (be aware of numerics). | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def modp(n: int, p: int):
"""Return 2^n modulo p (be aware of numerics).
"""
ret = 1
for i in range(n):
| return ret
| ret = (2 * ret) % p
| [
[
"3, 5",
"3"
],
[
"1101, 101",
"2"
],
[
"0, 101",
"1"
],
[
"3, 11",
"8"
],
[
"100, 101",
"1"
],
[
"30, 5",
"4"
],
[
"31, 5",
"3"
]
] | [] | [
[
"3, 5",
"3"
],
[
"1101, 101",
"2"
],
[
"0, 101",
"1"
],
[
"3, 11",
"8"
],
[
"100, 101",
"1"
]
] | modp | MultiLineInfilling/HumanEval/49/L2_L2 | Return 2^n modulo p (be aware of numerics). | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def modp(n: int, p: int):
"""Return 2^n modulo p (be aware of numerics).
"""
ret = 1
for i in range(n):
| ret = (2 * ret) % p
return ret
| [
[
"3, 5",
"3"
],
[
"1101, 101",
"2"
],
[
"0, 101",
"1"
],
[
"3, 11",
"8"
],
[
"100, 101",
"1"
],
[
"30, 5",
"4"
],
[
"31, 5",
"3"
]
] | [] | [
[
"3, 5",
"3"
],
[
"1101, 101",
"2"
],
[
"0, 101",
"1"
],
[
"3, 11",
"8"
],
[
"100, 101",
"1"
]
] | modp | MultiLineInfilling/HumanEval/49/L2_L3 | Return 2^n modulo p (be aware of numerics). | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def modp(n: int, p: int):
"""Return 2^n modulo p (be aware of numerics).
"""
ret = 1
for i in range(n):
ret = (2 * ret) % p
| return ret
| [
[
"3, 5",
"3"
],
[
"1101, 101",
"2"
],
[
"0, 101",
"1"
],
[
"3, 11",
"8"
],
[
"100, 101",
"1"
],
[
"30, 5",
"4"
],
[
"31, 5",
"3"
]
] | [] | [
[
"3, 5",
"3"
],
[
"1101, 101",
"2"
],
[
"0, 101",
"1"
],
[
"3, 11",
"8"
],
[
"100, 101",
"1"
]
] | modp | MultiLineInfilling/HumanEval/49/L3_L3 | Return 2^n modulo p (be aware of numerics). | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def encode_shift(s: str):
"""
returns encoded string by shifting every character by 5 in the alphabet.
"""
return "".join([chr(((ord(ch) + 5 - ord("a")) % 26) + ord("a")) for ch in s])
def decode_shift(s: str):
"""
takes as input string encoded with encode_shift function. Returns decoded str... | return "".join([chr(((ord(ch) - 5 - ord("a")) % 26) + ord("a")) for ch in s])
| [
[
"\"nppetuavkhytds\"",
"\"ikkzopvqfctoyn\""
],
[
"\"jkwevzwwetoiui\"",
"\"efrzqurrzojdpd\""
],
[
"\"deqhgbmrgyvolvllvgu\"",
"\"yzlcbwhmbtqjgqggqbp\""
],
[
"\"adwtpwmzzsba\"",
"\"vyrokrhuunwv\""
],
[
"\"kviyfxcqqk\"",
"\"fqdtasxllf\""
],
[
"\"owuxsmtkq... | [] | [] | decode_shift | MultiLineInfilling/HumanEval/50/L0_L0 | returns encoded string by shifting every character by 5 in the alphabet. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def remove_vowels(text):
"""
remove_vowels is a function that takes string and returns string without vowels.
"""
| return "".join([s for s in text if s.lower() not in ["a", "e", "i", "o", "u"]])
| [
[
"''",
"''"
],
[
"\"abcdef\\nghijklm\"",
"'bcdf\\nghjklm'"
],
[
"'fedcba'",
"'fdcb'"
],
[
"'eeeee'",
"''"
],
[
"'acBAA'",
"'cB'"
],
[
"'EcBOO'",
"'cB'"
],
[
"'ybcd'",
"'ybcd'"
]
] | [] | [
[
"''",
"''"
],
[
"\"abcdef\\nghijklm\"",
"'bcdf\\nghjklm'"
],
[
"'abcdef'",
"'bcdf'"
],
[
"'aaaaa'",
"''"
],
[
"'aaBAA'",
"'B'"
],
[
"'zbcd'",
"'zbcd'"
]
] | remove_vowels | MultiLineInfilling/HumanEval/51/L0_L0 | remove_vowels is a function that takes string and returns string without vowels. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def below_threshold(l: list, t: int):
"""Return True if all numbers in the list l are below threshold t.
"""
| if e >= t:
return False
return True
| for e in l:
| [] | [] | [
[
"[1, 2, 4, 10], 100",
"True"
],
[
"[1, 20, 4, 10], 5",
"False"
]
] | below_threshold | MultiLineInfilling/HumanEval/52/L0_L0 | Return True if all numbers in the list l are below threshold t. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def below_threshold(l: list, t: int):
"""Return True if all numbers in the list l are below threshold t.
"""
| return False
return True
| for e in l:
if e >= t:
| [] | [] | [
[
"[1, 2, 4, 10], 100",
"True"
],
[
"[1, 20, 4, 10], 5",
"False"
]
] | below_threshold | MultiLineInfilling/HumanEval/52/L0_L1 | Return True if all numbers in the list l are below threshold t. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def below_threshold(l: list, t: int):
"""Return True if all numbers in the list l are below threshold t.
"""
| return True
| for e in l:
if e >= t:
return False
| [] | [] | [
[
"[1, 2, 4, 10], 100",
"True"
],
[
"[1, 20, 4, 10], 5",
"False"
]
] | below_threshold | MultiLineInfilling/HumanEval/52/L0_L2 | Return True if all numbers in the list l are below threshold t. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def below_threshold(l: list, t: int):
"""Return True if all numbers in the list l are below threshold t.
"""
| for e in l:
if e >= t:
return False
return True
| [] | [] | [
[
"[1, 2, 4, 10], 100",
"True"
],
[
"[1, 20, 4, 10], 5",
"False"
]
] | below_threshold | MultiLineInfilling/HumanEval/52/L0_L3 | Return True if all numbers in the list l are below threshold t. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def below_threshold(l: list, t: int):
"""Return True if all numbers in the list l are below threshold t.
"""
for e in l:
| return False
return True
| if e >= t:
| [] | [] | [
[
"[1, 2, 4, 10], 100",
"True"
],
[
"[1, 20, 4, 10], 5",
"False"
]
] | below_threshold | MultiLineInfilling/HumanEval/52/L1_L1 | Return True if all numbers in the list l are below threshold t. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def below_threshold(l: list, t: int):
"""Return True if all numbers in the list l are below threshold t.
"""
for e in l:
| return True
| if e >= t:
return False
| [] | [] | [
[
"[1, 2, 4, 10], 100",
"True"
],
[
"[1, 20, 4, 10], 5",
"False"
]
] | below_threshold | MultiLineInfilling/HumanEval/52/L1_L2 | Return True if all numbers in the list l are below threshold t. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def below_threshold(l: list, t: int):
"""Return True if all numbers in the list l are below threshold t.
"""
for e in l:
| if e >= t:
return False
return True
| [] | [] | [
[
"[1, 2, 4, 10], 100",
"True"
],
[
"[1, 20, 4, 10], 5",
"False"
]
] | below_threshold | MultiLineInfilling/HumanEval/52/L1_L3 | Return True if all numbers in the list l are below threshold t. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def below_threshold(l: list, t: int):
"""Return True if all numbers in the list l are below threshold t.
"""
for e in l:
if e >= t:
| return True
| return False
| [] | [] | [
[
"[1, 2, 4, 10], 100",
"True"
],
[
"[1, 20, 4, 10], 5",
"False"
]
] | below_threshold | MultiLineInfilling/HumanEval/52/L2_L2 | Return True if all numbers in the list l are below threshold t. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def below_threshold(l: list, t: int):
"""Return True if all numbers in the list l are below threshold t.
"""
for e in l:
if e >= t:
| return False
return True
| [] | [] | [
[
"[1, 2, 4, 10], 100",
"True"
],
[
"[1, 20, 4, 10], 5",
"False"
]
] | below_threshold | MultiLineInfilling/HumanEval/52/L2_L3 | Return True if all numbers in the list l are below threshold t. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def below_threshold(l: list, t: int):
"""Return True if all numbers in the list l are below threshold t.
"""
for e in l:
if e >= t:
return False
| return True
| [] | [] | [
[
"[1, 2, 4, 10], 100",
"True"
],
[
"[1, 20, 4, 10], 5",
"False"
]
] | below_threshold | MultiLineInfilling/HumanEval/52/L3_L3 | Return True if all numbers in the list l are below threshold t. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def add(x: int, y: int):
"""Add two numbers x and y
"""
| return x + y
| [
[
"0, 1",
"1"
],
[
"1, 0",
"1"
],
[
"2, 3",
"5"
],
[
"5, 7",
"12"
],
[
"7, 5",
"12"
]
] | [] | [
[
"2, 3",
"5"
],
[
"5, 7",
"12"
]
] | add | MultiLineInfilling/HumanEval/53/L0_L0 | Add two numbers x and y | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def same_chars(s0: str, s1: str):
"""
Check if two words have the same characters.
"""
| return set(s0) == set(s1)
| [
[
"'eabcdzzzz', 'dddzzzzzzzddeddabc'",
"True"
],
[
"'abcd', 'dddddddabc'",
"True"
],
[
"'dddddddabc', 'abcd'",
"True"
],
[
"'eabcd', 'dddddddabc'",
"False"
],
[
"'abcd', 'dddddddabcf'",
"False"
],
[
"'eabcdzzzz', 'dddzzzzzzzddddabc'",
"False"
],
... | [] | [
[
"'eabcdzzzz', 'dddzzzzzzzddeddabc'",
"True"
],
[
"'abcd', 'dddddddabc'",
"True"
],
[
"'dddddddabc', 'abcd'",
"True"
],
[
"'eabcd', 'dddddddabc'",
"False"
],
[
"'abcd', 'dddddddabce'",
"False"
],
[
"'eabcdzzzz', 'dddzzzzzzzddddabc'",
"False"
]
] | same_chars | MultiLineInfilling/HumanEval/54/L0_L0 | Check if two words have the same characters. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def fib(n: int):
"""Return n-th Fibonacci number.
"""
| return 0
if n == 1:
return 1
return fib(n - 1) + fib(n - 2)
| if n == 0:
| [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
],
[
"11",
"89"
],
[
"12",
"144"
]
] | [] | [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
]
] | fib | MultiLineInfilling/HumanEval/55/L0_L0 | Return n-th Fibonacci number. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib(n: int):
"""Return n-th Fibonacci number.
"""
| if n == 1:
return 1
return fib(n - 1) + fib(n - 2)
| if n == 0:
return 0
| [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
],
[
"11",
"89"
],
[
"12",
"144"
]
] | [] | [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
]
] | fib | MultiLineInfilling/HumanEval/55/L0_L1 | Return n-th Fibonacci number. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib(n: int):
"""Return n-th Fibonacci number.
"""
| return 1
return fib(n - 1) + fib(n - 2)
| if n == 0:
return 0
if n == 1:
| [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
],
[
"11",
"89"
],
[
"12",
"144"
]
] | [] | [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
]
] | fib | MultiLineInfilling/HumanEval/55/L0_L2 | Return n-th Fibonacci number. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib(n: int):
"""Return n-th Fibonacci number.
"""
| return fib(n - 1) + fib(n - 2)
| if n == 0:
return 0
if n == 1:
return 1
| [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
],
[
"11",
"89"
],
[
"12",
"144"
]
] | [] | [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
]
] | fib | MultiLineInfilling/HumanEval/55/L0_L3 | Return n-th Fibonacci number. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib(n: int):
"""Return n-th Fibonacci number.
"""
| if n == 0:
return 0
if n == 1:
return 1
return fib(n - 1) + fib(n - 2)
| [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
],
[
"11",
"89"
],
[
"12",
"144"
]
] | [] | [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
]
] | fib | MultiLineInfilling/HumanEval/55/L0_L4 | Return n-th Fibonacci number. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def fib(n: int):
"""Return n-th Fibonacci number.
"""
if n == 0:
| if n == 1:
return 1
return fib(n - 1) + fib(n - 2)
| return 0
| [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
],
[
"11",
"89"
],
[
"12",
"144"
]
] | [] | [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
]
] | fib | MultiLineInfilling/HumanEval/55/L1_L1 | Return n-th Fibonacci number. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib(n: int):
"""Return n-th Fibonacci number.
"""
if n == 0:
| return 1
return fib(n - 1) + fib(n - 2)
| return 0
if n == 1:
| [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
],
[
"11",
"89"
],
[
"12",
"144"
]
] | [] | [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
]
] | fib | MultiLineInfilling/HumanEval/55/L1_L2 | Return n-th Fibonacci number. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib(n: int):
"""Return n-th Fibonacci number.
"""
if n == 0:
| return fib(n - 1) + fib(n - 2)
| return 0
if n == 1:
return 1
| [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
],
[
"11",
"89"
],
[
"12",
"144"
]
] | [] | [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
]
] | fib | MultiLineInfilling/HumanEval/55/L1_L3 | Return n-th Fibonacci number. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib(n: int):
"""Return n-th Fibonacci number.
"""
if n == 0:
| return 0
if n == 1:
return 1
return fib(n - 1) + fib(n - 2)
| [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
],
[
"11",
"89"
],
[
"12",
"144"
]
] | [] | [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
]
] | fib | MultiLineInfilling/HumanEval/55/L1_L4 | Return n-th Fibonacci number. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def fib(n: int):
"""Return n-th Fibonacci number.
"""
if n == 0:
return 0
| return 1
return fib(n - 1) + fib(n - 2)
| if n == 1:
| [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
],
[
"11",
"89"
],
[
"12",
"144"
]
] | [] | [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
]
] | fib | MultiLineInfilling/HumanEval/55/L2_L2 | Return n-th Fibonacci number. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib(n: int):
"""Return n-th Fibonacci number.
"""
if n == 0:
return 0
| return fib(n - 1) + fib(n - 2)
| if n == 1:
return 1
| [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
],
[
"11",
"89"
],
[
"12",
"144"
]
] | [] | [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
]
] | fib | MultiLineInfilling/HumanEval/55/L2_L3 | Return n-th Fibonacci number. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib(n: int):
"""Return n-th Fibonacci number.
"""
if n == 0:
return 0
| if n == 1:
return 1
return fib(n - 1) + fib(n - 2)
| [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
],
[
"11",
"89"
],
[
"12",
"144"
]
] | [] | [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
]
] | fib | MultiLineInfilling/HumanEval/55/L2_L4 | Return n-th Fibonacci number. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def fib(n: int):
"""Return n-th Fibonacci number.
"""
if n == 0:
return 0
if n == 1:
| return fib(n - 1) + fib(n - 2)
| return 1
| [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
],
[
"11",
"89"
],
[
"12",
"144"
]
] | [] | [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
]
] | fib | MultiLineInfilling/HumanEval/55/L3_L3 | Return n-th Fibonacci number. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def fib(n: int):
"""Return n-th Fibonacci number.
"""
if n == 0:
return 0
if n == 1:
| return 1
return fib(n - 1) + fib(n - 2)
| [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
],
[
"11",
"89"
],
[
"12",
"144"
]
] | [] | [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
]
] | fib | MultiLineInfilling/HumanEval/55/L3_L4 | Return n-th Fibonacci number. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def fib(n: int):
"""Return n-th Fibonacci number.
"""
if n == 0:
return 0
if n == 1:
return 1
| return fib(n - 1) + fib(n - 2)
| [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
],
[
"11",
"89"
],
[
"12",
"144"
]
] | [] | [
[
"10",
"55"
],
[
"1",
"1"
],
[
"8",
"21"
]
] | fib | MultiLineInfilling/HumanEval/55/L4_L4 | Return n-th Fibonacci number. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def correct_bracketing(brackets: str):
""" brackets is a string of "<" and ">".
return True if every opening bracket has a corresponding closing bracket.
"""
| for b in brackets:
if b == "<":
depth += 1
else:
depth -= 1
if depth < 0:
return False
return depth == 0
| depth = 0
| [] | [] | [
[
"\"<\"",
"False"
],
[
"\"<>\"",
"True"
],
[
"\"<<><>>\"",
"True"
],
[
"\"><<>\"",
"False"
]
] | correct_bracketing | MultiLineInfilling/HumanEval/56/L0_L0 | brackets is a string of "<" and ">".
return True if every opening bracket has a corresponding closing bracket. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def correct_bracketing(brackets: str):
""" brackets is a string of "<" and ">".
return True if every opening bracket has a corresponding closing bracket.
"""
| if b == "<":
depth += 1
else:
depth -= 1
if depth < 0:
return False
return depth == 0
| depth = 0
for b in brackets:
| [] | [] | [
[
"\"<\"",
"False"
],
[
"\"<>\"",
"True"
],
[
"\"<<><>>\"",
"True"
],
[
"\"><<>\"",
"False"
]
] | correct_bracketing | MultiLineInfilling/HumanEval/56/L0_L1 | brackets is a string of "<" and ">".
return True if every opening bracket has a corresponding closing bracket. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def correct_bracketing(brackets: str):
""" brackets is a string of "<" and ">".
return True if every opening bracket has a corresponding closing bracket.
"""
| depth += 1
else:
depth -= 1
if depth < 0:
return False
return depth == 0
| depth = 0
for b in brackets:
if b == "<":
| [] | [] | [
[
"\"<\"",
"False"
],
[
"\"<>\"",
"True"
],
[
"\"<<><>>\"",
"True"
],
[
"\"><<>\"",
"False"
]
] | correct_bracketing | MultiLineInfilling/HumanEval/56/L0_L2 | brackets is a string of "<" and ">".
return True if every opening bracket has a corresponding closing bracket. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def correct_bracketing(brackets: str):
""" brackets is a string of "<" and ">".
return True if every opening bracket has a corresponding closing bracket.
"""
| else:
depth -= 1
if depth < 0:
return False
return depth == 0
| depth = 0
for b in brackets:
if b == "<":
depth += 1
| [] | [] | [
[
"\"<\"",
"False"
],
[
"\"<>\"",
"True"
],
[
"\"<<><>>\"",
"True"
],
[
"\"><<>\"",
"False"
]
] | correct_bracketing | MultiLineInfilling/HumanEval/56/L0_L3 | brackets is a string of "<" and ">".
return True if every opening bracket has a corresponding closing bracket. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def correct_bracketing(brackets: str):
""" brackets is a string of "<" and ">".
return True if every opening bracket has a corresponding closing bracket.
"""
| depth -= 1
if depth < 0:
return False
return depth == 0
| depth = 0
for b in brackets:
if b == "<":
depth += 1
else:
| [] | [] | [
[
"\"<\"",
"False"
],
[
"\"<>\"",
"True"
],
[
"\"<<><>>\"",
"True"
],
[
"\"><<>\"",
"False"
]
] | correct_bracketing | MultiLineInfilling/HumanEval/56/L0_L4 | brackets is a string of "<" and ">".
return True if every opening bracket has a corresponding closing bracket. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def correct_bracketing(brackets: str):
""" brackets is a string of "<" and ">".
return True if every opening bracket has a corresponding closing bracket.
"""
| if depth < 0:
return False
return depth == 0
| depth = 0
for b in brackets:
if b == "<":
depth += 1
else:
depth -= 1
| [] | [] | [
[
"\"<\"",
"False"
],
[
"\"<>\"",
"True"
],
[
"\"<<><>>\"",
"True"
],
[
"\"><<>\"",
"False"
]
] | correct_bracketing | MultiLineInfilling/HumanEval/56/L0_L5 | brackets is a string of "<" and ">".
return True if every opening bracket has a corresponding closing bracket. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def correct_bracketing(brackets: str):
""" brackets is a string of "<" and ">".
return True if every opening bracket has a corresponding closing bracket.
"""
| return False
return depth == 0
| depth = 0
for b in brackets:
if b == "<":
depth += 1
else:
depth -= 1
if depth < 0:
| [] | [] | [
[
"\"<\"",
"False"
],
[
"\"<>\"",
"True"
],
[
"\"<<><>>\"",
"True"
],
[
"\"><<>\"",
"False"
]
] | correct_bracketing | MultiLineInfilling/HumanEval/56/L0_L6 | brackets is a string of "<" and ">".
return True if every opening bracket has a corresponding closing bracket. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def correct_bracketing(brackets: str):
""" brackets is a string of "<" and ">".
return True if every opening bracket has a corresponding closing bracket.
"""
| return depth == 0
| depth = 0
for b in brackets:
if b == "<":
depth += 1
else:
depth -= 1
if depth < 0:
return False
| [] | [] | [
[
"\"<\"",
"False"
],
[
"\"<>\"",
"True"
],
[
"\"<<><>>\"",
"True"
],
[
"\"><<>\"",
"False"
]
] | correct_bracketing | MultiLineInfilling/HumanEval/56/L0_L7 | brackets is a string of "<" and ">".
return True if every opening bracket has a corresponding closing bracket. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def correct_bracketing(brackets: str):
""" brackets is a string of "<" and ">".
return True if every opening bracket has a corresponding closing bracket.
"""
| depth = 0
for b in brackets:
if b == "<":
depth += 1
else:
depth -= 1
if depth < 0:
return False
return depth == 0
| [] | [] | [
[
"\"<\"",
"False"
],
[
"\"<>\"",
"True"
],
[
"\"<<><>>\"",
"True"
],
[
"\"><<>\"",
"False"
]
] | correct_bracketing | MultiLineInfilling/HumanEval/56/L0_L8 | brackets is a string of "<" and ">".
return True if every opening bracket has a corresponding closing bracket. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def correct_bracketing(brackets: str):
""" brackets is a string of "<" and ">".
return True if every opening bracket has a corresponding closing bracket.
"""
depth = 0
| if b == "<":
depth += 1
else:
depth -= 1
if depth < 0:
return False
return depth == 0
| for b in brackets:
| [] | [] | [
[
"\"<\"",
"False"
],
[
"\"<>\"",
"True"
],
[
"\"<<><>>\"",
"True"
],
[
"\"><<>\"",
"False"
]
] | correct_bracketing | MultiLineInfilling/HumanEval/56/L1_L1 | brackets is a string of "<" and ">".
return True if every opening bracket has a corresponding closing bracket. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.