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 largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
|
if n % j == 0 and is_prime(j):
largest = max(largest, j)
return largest
|
for i in range(2, k - 1):
if k % i == 0:
return False
return True
largest = 1
for j in range(2, n + 1):
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L3_L8
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
|
largest = max(largest, j)
return largest
|
for i in range(2, k - 1):
if k % i == 0:
return False
return True
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L3_L9
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
|
return largest
|
for i in range(2, k - 1):
if k % i == 0:
return False
return True
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
largest = max(largest, j)
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L3_L10
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
|
for i in range(2, k - 1):
if k % i == 0:
return False
return True
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
largest = max(largest, j)
return largest
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L3_L11
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
|
return False
return True
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
largest = max(largest, j)
return largest
|
if k % i == 0:
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L4_L4
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
|
return True
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
largest = max(largest, j)
return largest
|
if k % i == 0:
return False
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L4_L5
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
|
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
largest = max(largest, j)
return largest
|
if k % i == 0:
return False
return True
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L4_L6
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
|
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
largest = max(largest, j)
return largest
|
if k % i == 0:
return False
return True
largest = 1
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L4_L7
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
|
if n % j == 0 and is_prime(j):
largest = max(largest, j)
return largest
|
if k % i == 0:
return False
return True
largest = 1
for j in range(2, n + 1):
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L4_L8
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
|
largest = max(largest, j)
return largest
|
if k % i == 0:
return False
return True
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L4_L9
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
|
return largest
|
if k % i == 0:
return False
return True
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
largest = max(largest, j)
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L4_L10
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
|
if k % i == 0:
return False
return True
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
largest = max(largest, j)
return largest
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L4_L11
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
|
return True
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
largest = max(largest, j)
return largest
|
return False
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L5_L5
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
|
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
largest = max(largest, j)
return largest
|
return False
return True
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L5_L6
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
|
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
largest = max(largest, j)
return largest
|
return False
return True
largest = 1
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L5_L7
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
|
if n % j == 0 and is_prime(j):
largest = max(largest, j)
return largest
|
return False
return True
largest = 1
for j in range(2, n + 1):
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L5_L8
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
|
largest = max(largest, j)
return largest
|
return False
return True
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L5_L9
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
|
return largest
|
return False
return True
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
largest = max(largest, j)
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L5_L10
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
|
return False
return True
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
largest = max(largest, j)
return largest
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L5_L11
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
return False
|
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
largest = max(largest, j)
return largest
|
return True
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L6_L6
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
return False
|
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
largest = max(largest, j)
return largest
|
return True
largest = 1
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L6_L7
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
return False
|
if n % j == 0 and is_prime(j):
largest = max(largest, j)
return largest
|
return True
largest = 1
for j in range(2, n + 1):
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L6_L8
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
return False
|
largest = max(largest, j)
return largest
|
return True
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L6_L9
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
return False
|
return largest
|
return True
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
largest = max(largest, j)
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L6_L10
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
return False
|
return True
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
largest = max(largest, j)
return largest
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L6_L11
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
return False
return True
|
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
largest = max(largest, j)
return largest
|
largest = 1
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L7_L7
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
return False
return True
|
if n % j == 0 and is_prime(j):
largest = max(largest, j)
return largest
|
largest = 1
for j in range(2, n + 1):
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L7_L8
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
return False
return True
|
largest = max(largest, j)
return largest
|
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L7_L9
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
return False
return True
|
return largest
|
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
largest = max(largest, j)
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L7_L10
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
return False
return True
|
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
largest = max(largest, j)
return largest
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L7_L11
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
return False
return True
largest = 1
|
if n % j == 0 and is_prime(j):
largest = max(largest, j)
return largest
|
for j in range(2, n + 1):
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L8_L8
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
return False
return True
largest = 1
|
largest = max(largest, j)
return largest
|
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L8_L9
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
return False
return True
largest = 1
|
return largest
|
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
largest = max(largest, j)
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L8_L10
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
return False
return True
largest = 1
|
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
largest = max(largest, j)
return largest
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L8_L11
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
return False
return True
largest = 1
for j in range(2, n + 1):
|
largest = max(largest, j)
return largest
|
if n % j == 0 and is_prime(j):
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L9_L9
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
return False
return True
largest = 1
for j in range(2, n + 1):
|
return largest
|
if n % j == 0 and is_prime(j):
largest = max(largest, j)
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L9_L10
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
return False
return True
largest = 1
for j in range(2, n + 1):
|
if n % j == 0 and is_prime(j):
largest = max(largest, j)
return largest
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L9_L11
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
return False
return True
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
|
return largest
|
largest = max(largest, j)
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L10_L10
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
return False
return True
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
|
largest = max(largest, j)
return largest
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L10_L11
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
|
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
"""
def is_prime(k):
if k < 2:
return False
for i in range(2, k - 1):
if k % i == 0:
return False
return True
largest = 1
for j in range(2, n + 1):
if n % j == 0 and is_prime(j):
largest = max(largest, j)
|
return largest
|
[
[
"15",
"5"
],
[
"27",
"3"
],
[
"63",
"7"
],
[
"330",
"11"
],
[
"13195",
"29"
]
] |
[] |
[
[
"13195",
"29"
],
[
"2048",
"2"
]
] |
largest_prime_factor
|
MultiLineInfilling/HumanEval/59/L11_L11
|
Return the largest prime factor of n. Assume n > 1 and is not a prime.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
|
def sum_to_n(n: int):
"""sum_to_n is a function that sums numbers from 1 to n.
"""
|
return sum(range(n + 1))
|
[
[
"1",
"1"
],
[
"6",
"21"
],
[
"11",
"66"
],
[
"30",
"465"
],
[
"100",
"5050"
]
] |
[] |
[
[
"30",
"465"
],
[
"100",
"5050"
],
[
"5",
"15"
],
[
"10",
"55"
],
[
"1",
"1"
]
] |
sum_to_n
|
MultiLineInfilling/HumanEval/60/L0_L0
|
sum_to_n is a function that sums numbers from 1 to n.
|
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/61/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/61/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/61/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/61/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/61/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/61/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/61/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/61/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/61/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/61/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
|
def correct_bracketing(brackets: str):
""" brackets is a string of "(" and ")".
return True if every opening bracket has a corresponding closing bracket.
"""
depth = 0
|
depth += 1
else:
depth -= 1
if depth < 0:
return False
return depth == 0
|
for b in brackets:
if b == "(":
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L1_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.
"""
depth = 0
|
else:
depth -= 1
if depth < 0:
return False
return depth == 0
|
for b in brackets:
if b == "(":
depth += 1
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L1_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 = 0
|
depth -= 1
if depth < 0:
return False
return depth == 0
|
for b in brackets:
if b == "(":
depth += 1
else:
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L1_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.
"""
depth = 0
|
if depth < 0:
return False
return depth == 0
|
for b in brackets:
if b == "(":
depth += 1
else:
depth -= 1
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L1_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.
"""
depth = 0
|
return False
return depth == 0
|
for b in brackets:
if b == "(":
depth += 1
else:
depth -= 1
if depth < 0:
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L1_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.
"""
depth = 0
|
return 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/61/L1_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/61/L1_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
for b in brackets:
|
depth += 1
else:
depth -= 1
if depth < 0:
return False
return depth == 0
|
if b == "(":
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L2_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.
"""
depth = 0
for b in brackets:
|
else:
depth -= 1
if depth < 0:
return False
return depth == 0
|
if b == "(":
depth += 1
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L2_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 = 0
for b in brackets:
|
depth -= 1
if depth < 0:
return False
return depth == 0
|
if b == "(":
depth += 1
else:
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L2_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.
"""
depth = 0
for b in brackets:
|
if depth < 0:
return False
return depth == 0
|
if b == "(":
depth += 1
else:
depth -= 1
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L2_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.
"""
depth = 0
for b in brackets:
|
return False
return depth == 0
|
if b == "(":
depth += 1
else:
depth -= 1
if depth < 0:
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L2_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.
"""
depth = 0
for b in brackets:
|
return depth == 0
|
if b == "(":
depth += 1
else:
depth -= 1
if depth < 0:
return False
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L2_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/61/L2_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
for b in brackets:
if b == "(":
|
else:
depth -= 1
if depth < 0:
return False
return depth == 0
|
depth += 1
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L3_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 = 0
for b in brackets:
if b == "(":
|
depth -= 1
if depth < 0:
return False
return depth == 0
|
depth += 1
else:
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L3_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.
"""
depth = 0
for b in brackets:
if b == "(":
|
if depth < 0:
return False
return depth == 0
|
depth += 1
else:
depth -= 1
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L3_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.
"""
depth = 0
for b in brackets:
if b == "(":
|
return False
return depth == 0
|
depth += 1
else:
depth -= 1
if depth < 0:
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L3_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.
"""
depth = 0
for b in brackets:
if b == "(":
|
return depth == 0
|
depth += 1
else:
depth -= 1
if depth < 0:
return False
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L3_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/61/L3_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
for b in brackets:
if b == "(":
depth += 1
|
depth -= 1
if depth < 0:
return False
return depth == 0
|
else:
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L4_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.
"""
depth = 0
for b in brackets:
if b == "(":
depth += 1
|
if depth < 0:
return False
return depth == 0
|
else:
depth -= 1
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L4_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.
"""
depth = 0
for b in brackets:
if b == "(":
depth += 1
|
return False
return depth == 0
|
else:
depth -= 1
if depth < 0:
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L4_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.
"""
depth = 0
for b in brackets:
if b == "(":
depth += 1
|
return depth == 0
|
else:
depth -= 1
if depth < 0:
return False
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L4_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/61/L4_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
for b in brackets:
if b == "(":
depth += 1
else:
|
if depth < 0:
return False
return depth == 0
|
depth -= 1
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L5_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.
"""
depth = 0
for b in brackets:
if b == "(":
depth += 1
else:
|
return False
return depth == 0
|
depth -= 1
if depth < 0:
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L5_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.
"""
depth = 0
for b in brackets:
if b == "(":
depth += 1
else:
|
return depth == 0
|
depth -= 1
if depth < 0:
return False
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L5_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/61/L5_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
for b in brackets:
if b == "(":
depth += 1
else:
depth -= 1
|
return False
return depth == 0
|
if depth < 0:
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L6_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.
"""
depth = 0
for b in brackets:
if b == "(":
depth += 1
else:
depth -= 1
|
return depth == 0
|
if depth < 0:
return False
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L6_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/61/L6_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
for b in brackets:
if b == "(":
depth += 1
else:
depth -= 1
if depth < 0:
|
return depth == 0
|
return False
|
[] |
[] |
[
[
"\"(\"",
"False"
],
[
"\"()\"",
"True"
],
[
"\"(()())\"",
"True"
],
[
"\")(()\"",
"False"
]
] |
correct_bracketing
|
MultiLineInfilling/HumanEval/61/L7_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/61/L7_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
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/61/L8_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 derivative(xs: list):
""" xs represent coefficients of a polynomial.
xs[0] + xs[1] * x + xs[2] * x^2 + ....
Return derivative of this polynomial in the same form.
"""
|
return [(i * x) for i, x in enumerate(xs)][1:]
|
[
[
"[3, 1, 2, 4, 5]",
"[1, 4, 12, 20]"
],
[
"[1, 2, 3]",
"[2, 6]"
],
[
"[3, 2, 1]",
"[2, 2]"
],
[
"[3, 2, 1, 0, 4]",
"[2, 2, 0, 16]"
],
[
"[1]",
"[]"
]
] |
[] |
[
[
"[3, 1, 2, 4, 5]",
"[1, 4, 12, 20]"
],
[
"[1, 2, 3]",
"[2, 6]"
]
] |
derivative
|
MultiLineInfilling/HumanEval/62/L0_L0
|
xs represent coefficients of a polynomial.
xs[0] + xs[1] * x + xs[2] * x^2 + ....
Return derivative of this polynomial in the same form.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
|
def fibfib(n: int):
"""The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
"""
|
return 0
if n == 1:
return 0
if n == 2:
return 1
return fibfib(n - 1) + fibfib(n - 2) + fibfib(n - 3)
|
if n == 0:
|
[
[
"2",
"1"
],
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
],
[
"10",
"81"
],
[
"12",
"274"
],
[
"14",
"927"
]
] |
[] |
[
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
]
] |
fibfib
|
MultiLineInfilling/HumanEval/63/L0_L0
|
The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def fibfib(n: int):
"""The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
"""
|
if n == 1:
return 0
if n == 2:
return 1
return fibfib(n - 1) + fibfib(n - 2) + fibfib(n - 3)
|
if n == 0:
return 0
|
[
[
"2",
"1"
],
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
],
[
"10",
"81"
],
[
"12",
"274"
],
[
"14",
"927"
]
] |
[] |
[
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
]
] |
fibfib
|
MultiLineInfilling/HumanEval/63/L0_L1
|
The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def fibfib(n: int):
"""The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
"""
|
return 0
if n == 2:
return 1
return fibfib(n - 1) + fibfib(n - 2) + fibfib(n - 3)
|
if n == 0:
return 0
if n == 1:
|
[
[
"2",
"1"
],
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
],
[
"10",
"81"
],
[
"12",
"274"
],
[
"14",
"927"
]
] |
[] |
[
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
]
] |
fibfib
|
MultiLineInfilling/HumanEval/63/L0_L2
|
The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def fibfib(n: int):
"""The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
"""
|
if n == 2:
return 1
return fibfib(n - 1) + fibfib(n - 2) + fibfib(n - 3)
|
if n == 0:
return 0
if n == 1:
return 0
|
[
[
"2",
"1"
],
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
],
[
"10",
"81"
],
[
"12",
"274"
],
[
"14",
"927"
]
] |
[] |
[
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
]
] |
fibfib
|
MultiLineInfilling/HumanEval/63/L0_L3
|
The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def fibfib(n: int):
"""The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
"""
|
return 1
return fibfib(n - 1) + fibfib(n - 2) + fibfib(n - 3)
|
if n == 0:
return 0
if n == 1:
return 0
if n == 2:
|
[
[
"2",
"1"
],
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
],
[
"10",
"81"
],
[
"12",
"274"
],
[
"14",
"927"
]
] |
[] |
[
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
]
] |
fibfib
|
MultiLineInfilling/HumanEval/63/L0_L4
|
The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def fibfib(n: int):
"""The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
"""
|
return fibfib(n - 1) + fibfib(n - 2) + fibfib(n - 3)
|
if n == 0:
return 0
if n == 1:
return 0
if n == 2:
return 1
|
[
[
"2",
"1"
],
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
],
[
"10",
"81"
],
[
"12",
"274"
],
[
"14",
"927"
]
] |
[] |
[
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
]
] |
fibfib
|
MultiLineInfilling/HumanEval/63/L0_L5
|
The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def fibfib(n: int):
"""The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
"""
|
if n == 0:
return 0
if n == 1:
return 0
if n == 2:
return 1
return fibfib(n - 1) + fibfib(n - 2) + fibfib(n - 3)
|
[
[
"2",
"1"
],
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
],
[
"10",
"81"
],
[
"12",
"274"
],
[
"14",
"927"
]
] |
[] |
[
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
]
] |
fibfib
|
MultiLineInfilling/HumanEval/63/L0_L6
|
The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
|
def fibfib(n: int):
"""The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
"""
if n == 0:
|
if n == 1:
return 0
if n == 2:
return 1
return fibfib(n - 1) + fibfib(n - 2) + fibfib(n - 3)
|
return 0
|
[
[
"2",
"1"
],
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
],
[
"10",
"81"
],
[
"12",
"274"
],
[
"14",
"927"
]
] |
[] |
[
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
]
] |
fibfib
|
MultiLineInfilling/HumanEval/63/L1_L1
|
The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def fibfib(n: int):
"""The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
"""
if n == 0:
|
return 0
if n == 2:
return 1
return fibfib(n - 1) + fibfib(n - 2) + fibfib(n - 3)
|
return 0
if n == 1:
|
[
[
"2",
"1"
],
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
],
[
"10",
"81"
],
[
"12",
"274"
],
[
"14",
"927"
]
] |
[] |
[
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
]
] |
fibfib
|
MultiLineInfilling/HumanEval/63/L1_L2
|
The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def fibfib(n: int):
"""The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
"""
if n == 0:
|
if n == 2:
return 1
return fibfib(n - 1) + fibfib(n - 2) + fibfib(n - 3)
|
return 0
if n == 1:
return 0
|
[
[
"2",
"1"
],
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
],
[
"10",
"81"
],
[
"12",
"274"
],
[
"14",
"927"
]
] |
[] |
[
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
]
] |
fibfib
|
MultiLineInfilling/HumanEval/63/L1_L3
|
The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def fibfib(n: int):
"""The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
"""
if n == 0:
|
return 1
return fibfib(n - 1) + fibfib(n - 2) + fibfib(n - 3)
|
return 0
if n == 1:
return 0
if n == 2:
|
[
[
"2",
"1"
],
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
],
[
"10",
"81"
],
[
"12",
"274"
],
[
"14",
"927"
]
] |
[] |
[
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
]
] |
fibfib
|
MultiLineInfilling/HumanEval/63/L1_L4
|
The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def fibfib(n: int):
"""The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
"""
if n == 0:
|
return fibfib(n - 1) + fibfib(n - 2) + fibfib(n - 3)
|
return 0
if n == 1:
return 0
if n == 2:
return 1
|
[
[
"2",
"1"
],
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
],
[
"10",
"81"
],
[
"12",
"274"
],
[
"14",
"927"
]
] |
[] |
[
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
]
] |
fibfib
|
MultiLineInfilling/HumanEval/63/L1_L5
|
The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
|
HumanEval_MultiLineInfilling
|
code_infilling
|
[] |
python
|
python
|
def fibfib(n: int):
"""The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
"""
if n == 0:
|
return 0
if n == 1:
return 0
if n == 2:
return 1
return fibfib(n - 1) + fibfib(n - 2) + fibfib(n - 3)
|
[
[
"2",
"1"
],
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
],
[
"10",
"81"
],
[
"12",
"274"
],
[
"14",
"927"
]
] |
[] |
[
[
"1",
"0"
],
[
"5",
"4"
],
[
"8",
"24"
]
] |
fibfib
|
MultiLineInfilling/HumanEval/63/L1_L6
|
The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).
Please write a function to efficiently compute the n-th element of the fibfib number sequence.
|
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.