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 minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
| for num in nums:
s += -num
if (s < 0):
s = 0
max_sum = max(s, max_sum)
if max_sum == 0:
max_sum = max(-i for i in nums)
min_sum = -max_sum
return min_sum
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L2_L10 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
| if (s < 0):
s = 0
max_sum = max(s, max_sum)
if max_sum == 0:
max_sum = max(-i for i in nums)
min_sum = -max_sum
return min_sum
| s += -num
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L3_L3 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
| s = 0
max_sum = max(s, max_sum)
if max_sum == 0:
max_sum = max(-i for i in nums)
min_sum = -max_sum
return min_sum
| s += -num
if (s < 0):
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L3_L4 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
| max_sum = max(s, max_sum)
if max_sum == 0:
max_sum = max(-i for i in nums)
min_sum = -max_sum
return min_sum
| s += -num
if (s < 0):
s = 0
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L3_L5 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
| if max_sum == 0:
max_sum = max(-i for i in nums)
min_sum = -max_sum
return min_sum
| s += -num
if (s < 0):
s = 0
max_sum = max(s, max_sum)
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L3_L6 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
| max_sum = max(-i for i in nums)
min_sum = -max_sum
return min_sum
| s += -num
if (s < 0):
s = 0
max_sum = max(s, max_sum)
if max_sum == 0:
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L3_L7 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
| min_sum = -max_sum
return min_sum
| s += -num
if (s < 0):
s = 0
max_sum = max(s, max_sum)
if max_sum == 0:
max_sum = max(-i for i in nums)
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L3_L8 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
| return min_sum
| s += -num
if (s < 0):
s = 0
max_sum = max(s, max_sum)
if max_sum == 0:
max_sum = max(-i for i in nums)
min_sum = -max_sum
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L3_L9 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
| s += -num
if (s < 0):
s = 0
max_sum = max(s, max_sum)
if max_sum == 0:
max_sum = max(-i for i in nums)
min_sum = -max_sum
return min_sum
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L3_L10 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
| s = 0
max_sum = max(s, max_sum)
if max_sum == 0:
max_sum = max(-i for i in nums)
min_sum = -max_sum
return min_sum
| if (s < 0):
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L4_L4 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
| max_sum = max(s, max_sum)
if max_sum == 0:
max_sum = max(-i for i in nums)
min_sum = -max_sum
return min_sum
| if (s < 0):
s = 0
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L4_L5 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
| if max_sum == 0:
max_sum = max(-i for i in nums)
min_sum = -max_sum
return min_sum
| if (s < 0):
s = 0
max_sum = max(s, max_sum)
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L4_L6 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
| max_sum = max(-i for i in nums)
min_sum = -max_sum
return min_sum
| if (s < 0):
s = 0
max_sum = max(s, max_sum)
if max_sum == 0:
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L4_L7 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
| min_sum = -max_sum
return min_sum
| if (s < 0):
s = 0
max_sum = max(s, max_sum)
if max_sum == 0:
max_sum = max(-i for i in nums)
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L4_L8 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
| return min_sum
| if (s < 0):
s = 0
max_sum = max(s, max_sum)
if max_sum == 0:
max_sum = max(-i for i in nums)
min_sum = -max_sum
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L4_L9 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
| if (s < 0):
s = 0
max_sum = max(s, max_sum)
if max_sum == 0:
max_sum = max(-i for i in nums)
min_sum = -max_sum
return min_sum
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L4_L10 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
if (s < 0):
| max_sum = max(s, max_sum)
if max_sum == 0:
max_sum = max(-i for i in nums)
min_sum = -max_sum
return min_sum
| s = 0
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L5_L5 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
if (s < 0):
| if max_sum == 0:
max_sum = max(-i for i in nums)
min_sum = -max_sum
return min_sum
| s = 0
max_sum = max(s, max_sum)
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L5_L6 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
if (s < 0):
| max_sum = max(-i for i in nums)
min_sum = -max_sum
return min_sum
| s = 0
max_sum = max(s, max_sum)
if max_sum == 0:
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L5_L7 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
if (s < 0):
| min_sum = -max_sum
return min_sum
| s = 0
max_sum = max(s, max_sum)
if max_sum == 0:
max_sum = max(-i for i in nums)
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L5_L8 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
if (s < 0):
| return min_sum
| s = 0
max_sum = max(s, max_sum)
if max_sum == 0:
max_sum = max(-i for i in nums)
min_sum = -max_sum
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L5_L9 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
if (s < 0):
| s = 0
max_sum = max(s, max_sum)
if max_sum == 0:
max_sum = max(-i for i in nums)
min_sum = -max_sum
return min_sum
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L5_L10 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
if (s < 0):
s = 0
| if max_sum == 0:
max_sum = max(-i for i in nums)
min_sum = -max_sum
return min_sum
| max_sum = max(s, max_sum)
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L6_L6 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
if (s < 0):
s = 0
| max_sum = max(-i for i in nums)
min_sum = -max_sum
return min_sum
| max_sum = max(s, max_sum)
if max_sum == 0:
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L6_L7 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
if (s < 0):
s = 0
| min_sum = -max_sum
return min_sum
| max_sum = max(s, max_sum)
if max_sum == 0:
max_sum = max(-i for i in nums)
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L6_L8 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
if (s < 0):
s = 0
| return min_sum
| max_sum = max(s, max_sum)
if max_sum == 0:
max_sum = max(-i for i in nums)
min_sum = -max_sum
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L6_L9 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
if (s < 0):
s = 0
| max_sum = max(s, max_sum)
if max_sum == 0:
max_sum = max(-i for i in nums)
min_sum = -max_sum
return min_sum
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L6_L10 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
if (s < 0):
s = 0
max_sum = max(s, max_sum)
| max_sum = max(-i for i in nums)
min_sum = -max_sum
return min_sum
| if max_sum == 0:
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L7_L7 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
if (s < 0):
s = 0
max_sum = max(s, max_sum)
| min_sum = -max_sum
return min_sum
| if max_sum == 0:
max_sum = max(-i for i in nums)
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L7_L8 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
if (s < 0):
s = 0
max_sum = max(s, max_sum)
| return min_sum
| if max_sum == 0:
max_sum = max(-i for i in nums)
min_sum = -max_sum
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L7_L9 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
if (s < 0):
s = 0
max_sum = max(s, max_sum)
| if max_sum == 0:
max_sum = max(-i for i in nums)
min_sum = -max_sum
return min_sum
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L7_L10 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
if (s < 0):
s = 0
max_sum = max(s, max_sum)
if max_sum == 0:
| min_sum = -max_sum
return min_sum
| max_sum = max(-i for i in nums)
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L8_L8 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
if (s < 0):
s = 0
max_sum = max(s, max_sum)
if max_sum == 0:
| return min_sum
| max_sum = max(-i for i in nums)
min_sum = -max_sum
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L8_L9 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
if (s < 0):
s = 0
max_sum = max(s, max_sum)
if max_sum == 0:
| max_sum = max(-i for i in nums)
min_sum = -max_sum
return min_sum
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L8_L10 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
if (s < 0):
s = 0
max_sum = max(s, max_sum)
if max_sum == 0:
max_sum = max... | return min_sum
| min_sum = -max_sum
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L9_L9 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
if (s < 0):
s = 0
max_sum = max(s, max_sum)
if max_sum == 0:
max_sum = max... | min_sum = -max_sum
return min_sum
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L9_L10 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def minSubArraySum(nums):
"""
Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums.
"""
max_sum = 0
s = 0
for num in nums:
s += -num
if (s < 0):
s = 0
max_sum = max(s, max_sum)
if max_sum == 0:
max_sum = max... | return min_sum
| [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
],
[
"[-1, -2, -3, 2, -10]",
"-14"
],
[
"[-9999999999999999]",
"-9999999999999999"
],
[
"[0, 10, 20, 1000000]",
"0"
],
[
"[-1, -2, -3, 10, -5]",
"-6"
],
[
"[100, -1, -2, -3, 10, -5]",
... | [] | [
[
"[2, 3, 4, 1, 2, 4]",
"1"
],
[
"[-1, -2, -3]",
"-6"
]
] | minSubArraySum | MultiLineInfilling/HumanEval/114/L10_L10 | Given an array of integers nums, find the minimum sum of any non-empty sub-array
of nums. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def max_fill(grid, capacity):
import math
"""
You are given a rectangular grid of wells. Each row represents a single well,
and each 1 in a row represents a single unit of water.
Each well has a corresponding bucket that can be used to extract water from it,
and all buckets have the same capac... | return sum([math.ceil(sum(arr)/capacity) for arr in grid])
| [
[
"[[0,0,1,0], [0,1,0,0], [1,1,1,1]], 1",
"6"
],
[
"[[0,0,1,1], [0,0,0,0], [1,1,1,1], [0,1,1,1]], 2",
"5"
],
[
"[[0,0,0], [0,0,0]], 5",
"0"
],
[
"[[1,1,1,1], [1,1,1,1]], 2",
"4"
],
[
"[[1,1,1,1], [1,1,1,1]], 9",
"2"
]
] | [
"import math"
] | [
[
"[[0,0,1,0], [0,1,0,0], [1,1,1,1]], 1",
"6"
],
[
"[[0,0,1,1], [0,0,0,0], [1,1,1,1], [0,1,1,1]], 2",
"5"
],
[
"[[0,0,0], [0,0,0]], 5",
"0"
]
] | max_fill | MultiLineInfilling/HumanEval/115/L0_L0 | You are given a rectangular grid of wells. Each row represents a single well,
and each 1 in a row represents a single unit of water.
Each well has a corresponding bucket that can be used to extract water from it,
and all buckets have the same capacity.
Your task is to use the buckets to empty the wells... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def sort_array(arr):
"""
In this Kata, you have to sort an array of non-negative integers according to
number of ones in their binary representation in ascending order.
For similar number of ones, sort based on decimal value.
"""
| return sorted(sorted(arr), key=lambda x: bin(x)[2:].count('1'))
| [
[
"[1,5,2,3,4]",
"[1, 2, 4, 3, 5]"
],
[
"[-2,-3,-4,-5,-6]",
"[-4, -2, -6, -5, -3]"
],
[
"[1,0,2,3,4]",
"[0, 1, 2, 4, 3]"
],
[
"[]",
"[]"
],
[
"[2,5,77,4,5,3,5,7,2,3,4]",
"[2, 2, 4, 4, 3, 3, 5, 5, 5, 7, 77]"
],
[
"[3,6,44,12,32,5]",
"[32, 3, 5, 6, 1... | [] | [
[
"[1, 5, 2, 3, 4]",
"[1, 2, 3, 4, 5]"
],
[
"[-2, -3, -4, -5, -6]",
"[-6, -5, -4, -3, -2]"
]
] | sort_array | MultiLineInfilling/HumanEval/116/L0_L0 | In this Kata, you have to sort an array of non-negative integers according to
number of ones in their binary representation in ascending order.
For similar number of ones, sort based on decimal value. | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | for word in s.split():
n_consonants = 0
for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
result.append(word)
return result
| result = []
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L0_L0 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | n_consonants = 0
for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
result.append(word)
return result
| result = []
for word in s.split():
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L0_L1 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
result.append(word)
return result
| result = []
for word in s.split():
n_consonants = 0
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L0_L2 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
result.append(word)
return result
| result = []
for word in s.split():
n_consonants = 0
for i in range(0, len(word)):
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L0_L3 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | n_consonants += 1
if n_consonants == n:
result.append(word)
return result
| result = []
for word in s.split():
n_consonants = 0
for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L0_L4 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | if n_consonants == n:
result.append(word)
return result
| result = []
for word in s.split():
n_consonants = 0
for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L0_L5 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | result.append(word)
return result
| result = []
for word in s.split():
n_consonants = 0
for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L0_L6 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | return result
| result = []
for word in s.split():
n_consonants = 0
for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
result.append(word)
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L0_L7 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | result = []
for word in s.split():
n_consonants = 0
for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
result.append(word)
return result
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L0_L8 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | n_consonants = 0
for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
result.append(word)
return result
| for word in s.split():
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L1_L1 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
result.append(word)
return result
| for word in s.split():
n_consonants = 0
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L1_L2 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
result.append(word)
return result
| for word in s.split():
n_consonants = 0
for i in range(0, len(word)):
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L1_L3 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | n_consonants += 1
if n_consonants == n:
result.append(word)
return result
| for word in s.split():
n_consonants = 0
for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L1_L4 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | if n_consonants == n:
result.append(word)
return result
| for word in s.split():
n_consonants = 0
for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L1_L5 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | result.append(word)
return result
| for word in s.split():
n_consonants = 0
for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L1_L6 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | return result
| for word in s.split():
n_consonants = 0
for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
result.append(word)
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L1_L7 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | for word in s.split():
n_consonants = 0
for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
result.append(word)
return result
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L1_L8 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
result.append(word)
return result
| n_consonants = 0
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L2_L2 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
result.append(word)
return result
| n_consonants = 0
for i in range(0, len(word)):
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L2_L3 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | n_consonants += 1
if n_consonants == n:
result.append(word)
return result
| n_consonants = 0
for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L2_L4 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | if n_consonants == n:
result.append(word)
return result
| n_consonants = 0
for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L2_L5 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | result.append(word)
return result
| n_consonants = 0
for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L2_L6 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | return result
| n_consonants = 0
for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
result.append(word)
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L2_L7 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | n_consonants = 0
for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
result.append(word)
return result
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L2_L8 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
result.append(word)
return result
| for i in range(0, len(word)):
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L3_L3 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | n_consonants += 1
if n_consonants == n:
result.append(word)
return result
| for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L3_L4 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | if n_consonants == n:
result.append(word)
return result
| for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L3_L5 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | result.append(word)
return result
| for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L3_L6 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | return result
| for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
result.append(word)
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L3_L7 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | for i in range(0, len(word)):
if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
result.append(word)
return result
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L3_L8 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | n_consonants += 1
if n_consonants == n:
result.append(word)
return result
| if word[i].lower() not in ["a","e","i","o","u"]:
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L4_L4 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | if n_consonants == n:
result.append(word)
return result
| if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L4_L5 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | result.append(word)
return result
| if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L4_L6 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | return result
| if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
result.append(word)
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L4_L7 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | if word[i].lower() not in ["a","e","i","o","u"]:
n_consonants += 1
if n_consonants == n:
result.append(word)
return result
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L4_L8 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | if n_consonants == n:
result.append(word)
return result
| n_consonants += 1
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L5_L5 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | result.append(word)
return result
| n_consonants += 1
if n_consonants == n:
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L5_L6 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | return result
| n_consonants += 1
if n_consonants == n:
result.append(word)
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L5_L7 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | n_consonants += 1
if n_consonants == n:
result.append(word)
return result
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L5_L8 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | result.append(word)
return result
| if n_consonants == n:
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L6_L6 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | return result
| if n_consonants == n:
result.append(word)
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L6_L7 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | if n_consonants == n:
result.append(word)
return result
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L6_L8 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | return result
| result.append(word)
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L7_L7 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | result.append(word)
return result
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L7_L8 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def select_words(s, n):
"""Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an e... | return result
| [
[
"\"Mary had a little lamb\", 4",
"[\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"[\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"[]"
],
[
"\"Hello world\", 4",
"[\"world\"]"
],
[
"\"Uncle sam\", 3",
"[\"Uncle\"]"
],
[
"\"\", 4",
"[... | [] | [
[
"\"Mary had a little lamb\", 4",
"> [\"little\"]"
],
[
"\"Mary had a little lamb\", 3",
"> [\"Mary\", \"lamb\"]"
],
[
"\"simple white space\", 2",
"> []"
],
[
"\"Hello world\", 4",
"> [\"world\"]"
],
[
"\"Uncle sam\", 3",
"> [\"Uncle\"]"
]
] | select_words | MultiLineInfilling/HumanEval/117/L8_L8 | Given a string s and a natural number n, you have been tasked to implement
a function that returns a list of all words from string s that contain exactly
n consonants, in order these words appear in the string s.
If the string s is empty then the function should return an empty list.
Note: you may ass... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def get_closest_vowel(word):
"""You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condit... | return ""
vowels = {"a", "e", "i", "o", "u", "A", "E", 'O', 'U', 'I'}
for i in range(len(word)-2, 0, -1):
if word[i] in vowels:
if (word[i+1] not in vowels) and (word[i-1] not in vowels):
return word[i]
return ""
| if len(word) < 3:
| [
[
"\"yogurt\"",
"\"u\""
],
[
"\"full\"",
"\"u\""
],
[
"\"easy\"",
"\"\""
],
[
"\"eAsy\"",
"\"\""
],
[
"\"ali\"",
"\"\""
],
[
"\"bad\"",
"\"a\""
],
[
"\"most\"",
"\"o\""
],
[
"\"ab\"",
"\"\""
],
[
"\"ba\"",
"\"\""... | [] | [
[
"\"yogurt\"",
"> \"u\""
],
[
"\"FULL\"",
"> \"U\""
],
[
"\"quick\"",
"> \"\""
],
[
"\"ab\"",
"> \"\""
]
] | get_closest_vowel | MultiLineInfilling/HumanEval/118/L0_L0 | You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condition.
You may assume that the gi... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def get_closest_vowel(word):
"""You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condit... |
vowels = {"a", "e", "i", "o", "u", "A", "E", 'O', 'U', 'I'}
for i in range(len(word)-2, 0, -1):
if word[i] in vowels:
if (word[i+1] not in vowels) and (word[i-1] not in vowels):
return word[i]
return ""
| if len(word) < 3:
return ""
| [
[
"\"yogurt\"",
"\"u\""
],
[
"\"full\"",
"\"u\""
],
[
"\"easy\"",
"\"\""
],
[
"\"eAsy\"",
"\"\""
],
[
"\"ali\"",
"\"\""
],
[
"\"bad\"",
"\"a\""
],
[
"\"most\"",
"\"o\""
],
[
"\"ab\"",
"\"\""
],
[
"\"ba\"",
"\"\""... | [] | [
[
"\"yogurt\"",
"> \"u\""
],
[
"\"FULL\"",
"> \"U\""
],
[
"\"quick\"",
"> \"\""
],
[
"\"ab\"",
"> \"\""
]
] | get_closest_vowel | MultiLineInfilling/HumanEval/118/L0_L1 | You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condition.
You may assume that the gi... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def get_closest_vowel(word):
"""You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condit... | for i in range(len(word)-2, 0, -1):
if word[i] in vowels:
if (word[i+1] not in vowels) and (word[i-1] not in vowels):
return word[i]
return ""
| if len(word) < 3:
return ""
vowels = {"a", "e", "i", "o", "u", "A", "E", 'O', 'U', 'I'}
| [
[
"\"yogurt\"",
"\"u\""
],
[
"\"full\"",
"\"u\""
],
[
"\"easy\"",
"\"\""
],
[
"\"eAsy\"",
"\"\""
],
[
"\"ali\"",
"\"\""
],
[
"\"bad\"",
"\"a\""
],
[
"\"most\"",
"\"o\""
],
[
"\"ab\"",
"\"\""
],
[
"\"ba\"",
"\"\""... | [] | [
[
"\"yogurt\"",
"> \"u\""
],
[
"\"FULL\"",
"> \"U\""
],
[
"\"quick\"",
"> \"\""
],
[
"\"ab\"",
"> \"\""
]
] | get_closest_vowel | MultiLineInfilling/HumanEval/118/L0_L3 | You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condition.
You may assume that the gi... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def get_closest_vowel(word):
"""You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condit... | if word[i] in vowels:
if (word[i+1] not in vowels) and (word[i-1] not in vowels):
return word[i]
return ""
| if len(word) < 3:
return ""
vowels = {"a", "e", "i", "o", "u", "A", "E", 'O', 'U', 'I'}
for i in range(len(word)-2, 0, -1):
| [
[
"\"yogurt\"",
"\"u\""
],
[
"\"full\"",
"\"u\""
],
[
"\"easy\"",
"\"\""
],
[
"\"eAsy\"",
"\"\""
],
[
"\"ali\"",
"\"\""
],
[
"\"bad\"",
"\"a\""
],
[
"\"most\"",
"\"o\""
],
[
"\"ab\"",
"\"\""
],
[
"\"ba\"",
"\"\""... | [] | [
[
"\"yogurt\"",
"> \"u\""
],
[
"\"FULL\"",
"> \"U\""
],
[
"\"quick\"",
"> \"\""
],
[
"\"ab\"",
"> \"\""
]
] | get_closest_vowel | MultiLineInfilling/HumanEval/118/L0_L4 | You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condition.
You may assume that the gi... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def get_closest_vowel(word):
"""You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condit... | if (word[i+1] not in vowels) and (word[i-1] not in vowels):
return word[i]
return ""
| if len(word) < 3:
return ""
vowels = {"a", "e", "i", "o", "u", "A", "E", 'O', 'U', 'I'}
for i in range(len(word)-2, 0, -1):
if word[i] in vowels:
| [
[
"\"yogurt\"",
"\"u\""
],
[
"\"full\"",
"\"u\""
],
[
"\"easy\"",
"\"\""
],
[
"\"eAsy\"",
"\"\""
],
[
"\"ali\"",
"\"\""
],
[
"\"bad\"",
"\"a\""
],
[
"\"most\"",
"\"o\""
],
[
"\"ab\"",
"\"\""
],
[
"\"ba\"",
"\"\""... | [] | [
[
"\"yogurt\"",
"> \"u\""
],
[
"\"FULL\"",
"> \"U\""
],
[
"\"quick\"",
"> \"\""
],
[
"\"ab\"",
"> \"\""
]
] | get_closest_vowel | MultiLineInfilling/HumanEval/118/L0_L5 | You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condition.
You may assume that the gi... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def get_closest_vowel(word):
"""You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condit... | return word[i]
return ""
| if len(word) < 3:
return ""
vowels = {"a", "e", "i", "o", "u", "A", "E", 'O', 'U', 'I'}
for i in range(len(word)-2, 0, -1):
if word[i] in vowels:
if (word[i+1] not in vowels) and (word[i-1] not in vowels):
| [
[
"\"yogurt\"",
"\"u\""
],
[
"\"full\"",
"\"u\""
],
[
"\"easy\"",
"\"\""
],
[
"\"eAsy\"",
"\"\""
],
[
"\"ali\"",
"\"\""
],
[
"\"bad\"",
"\"a\""
],
[
"\"most\"",
"\"o\""
],
[
"\"ab\"",
"\"\""
],
[
"\"ba\"",
"\"\""... | [] | [
[
"\"yogurt\"",
"> \"u\""
],
[
"\"FULL\"",
"> \"U\""
],
[
"\"quick\"",
"> \"\""
],
[
"\"ab\"",
"> \"\""
]
] | get_closest_vowel | MultiLineInfilling/HumanEval/118/L0_L6 | You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condition.
You may assume that the gi... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def get_closest_vowel(word):
"""You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condit... | return ""
| if len(word) < 3:
return ""
vowels = {"a", "e", "i", "o", "u", "A", "E", 'O', 'U', 'I'}
for i in range(len(word)-2, 0, -1):
if word[i] in vowels:
if (word[i+1] not in vowels) and (word[i-1] not in vowels):
return word[i]
| [
[
"\"yogurt\"",
"\"u\""
],
[
"\"full\"",
"\"u\""
],
[
"\"easy\"",
"\"\""
],
[
"\"eAsy\"",
"\"\""
],
[
"\"ali\"",
"\"\""
],
[
"\"bad\"",
"\"a\""
],
[
"\"most\"",
"\"o\""
],
[
"\"ab\"",
"\"\""
],
[
"\"ba\"",
"\"\""... | [] | [
[
"\"yogurt\"",
"> \"u\""
],
[
"\"FULL\"",
"> \"U\""
],
[
"\"quick\"",
"> \"\""
],
[
"\"ab\"",
"> \"\""
]
] | get_closest_vowel | MultiLineInfilling/HumanEval/118/L0_L7 | You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condition.
You may assume that the gi... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def get_closest_vowel(word):
"""You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condit... | if len(word) < 3:
return ""
vowels = {"a", "e", "i", "o", "u", "A", "E", 'O', 'U', 'I'}
for i in range(len(word)-2, 0, -1):
if word[i] in vowels:
if (word[i+1] not in vowels) and (word[i-1] not in vowels):
return word[i]
return ""
| [
[
"\"yogurt\"",
"\"u\""
],
[
"\"full\"",
"\"u\""
],
[
"\"easy\"",
"\"\""
],
[
"\"eAsy\"",
"\"\""
],
[
"\"ali\"",
"\"\""
],
[
"\"bad\"",
"\"a\""
],
[
"\"most\"",
"\"o\""
],
[
"\"ab\"",
"\"\""
],
[
"\"ba\"",
"\"\""... | [] | [
[
"\"yogurt\"",
"> \"u\""
],
[
"\"FULL\"",
"> \"U\""
],
[
"\"quick\"",
"> \"\""
],
[
"\"ab\"",
"> \"\""
]
] | get_closest_vowel | MultiLineInfilling/HumanEval/118/L0_L8 | You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condition.
You may assume that the gi... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def get_closest_vowel(word):
"""You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condit... |
vowels = {"a", "e", "i", "o", "u", "A", "E", 'O', 'U', 'I'}
for i in range(len(word)-2, 0, -1):
if word[i] in vowels:
if (word[i+1] not in vowels) and (word[i-1] not in vowels):
return word[i]
return ""
| return ""
| [
[
"\"yogurt\"",
"\"u\""
],
[
"\"full\"",
"\"u\""
],
[
"\"easy\"",
"\"\""
],
[
"\"eAsy\"",
"\"\""
],
[
"\"ali\"",
"\"\""
],
[
"\"bad\"",
"\"a\""
],
[
"\"most\"",
"\"o\""
],
[
"\"ab\"",
"\"\""
],
[
"\"ba\"",
"\"\""... | [] | [
[
"\"yogurt\"",
"> \"u\""
],
[
"\"FULL\"",
"> \"U\""
],
[
"\"quick\"",
"> \"\""
],
[
"\"ab\"",
"> \"\""
]
] | get_closest_vowel | MultiLineInfilling/HumanEval/118/L1_L1 | You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condition.
You may assume that the gi... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def get_closest_vowel(word):
"""You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condit... | for i in range(len(word)-2, 0, -1):
if word[i] in vowels:
if (word[i+1] not in vowels) and (word[i-1] not in vowels):
return word[i]
return ""
| return ""
vowels = {"a", "e", "i", "o", "u", "A", "E", 'O', 'U', 'I'}
| [
[
"\"yogurt\"",
"\"u\""
],
[
"\"full\"",
"\"u\""
],
[
"\"easy\"",
"\"\""
],
[
"\"eAsy\"",
"\"\""
],
[
"\"ali\"",
"\"\""
],
[
"\"bad\"",
"\"a\""
],
[
"\"most\"",
"\"o\""
],
[
"\"ab\"",
"\"\""
],
[
"\"ba\"",
"\"\""... | [] | [
[
"\"yogurt\"",
"> \"u\""
],
[
"\"FULL\"",
"> \"U\""
],
[
"\"quick\"",
"> \"\""
],
[
"\"ab\"",
"> \"\""
]
] | get_closest_vowel | MultiLineInfilling/HumanEval/118/L1_L3 | You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condition.
You may assume that the gi... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def get_closest_vowel(word):
"""You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condit... | if word[i] in vowels:
if (word[i+1] not in vowels) and (word[i-1] not in vowels):
return word[i]
return ""
| return ""
vowels = {"a", "e", "i", "o", "u", "A", "E", 'O', 'U', 'I'}
for i in range(len(word)-2, 0, -1):
| [
[
"\"yogurt\"",
"\"u\""
],
[
"\"full\"",
"\"u\""
],
[
"\"easy\"",
"\"\""
],
[
"\"eAsy\"",
"\"\""
],
[
"\"ali\"",
"\"\""
],
[
"\"bad\"",
"\"a\""
],
[
"\"most\"",
"\"o\""
],
[
"\"ab\"",
"\"\""
],
[
"\"ba\"",
"\"\""... | [] | [
[
"\"yogurt\"",
"> \"u\""
],
[
"\"FULL\"",
"> \"U\""
],
[
"\"quick\"",
"> \"\""
],
[
"\"ab\"",
"> \"\""
]
] | get_closest_vowel | MultiLineInfilling/HumanEval/118/L1_L4 | You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condition.
You may assume that the gi... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def get_closest_vowel(word):
"""You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condit... | if (word[i+1] not in vowels) and (word[i-1] not in vowels):
return word[i]
return ""
| return ""
vowels = {"a", "e", "i", "o", "u", "A", "E", 'O', 'U', 'I'}
for i in range(len(word)-2, 0, -1):
if word[i] in vowels:
| [
[
"\"yogurt\"",
"\"u\""
],
[
"\"full\"",
"\"u\""
],
[
"\"easy\"",
"\"\""
],
[
"\"eAsy\"",
"\"\""
],
[
"\"ali\"",
"\"\""
],
[
"\"bad\"",
"\"a\""
],
[
"\"most\"",
"\"o\""
],
[
"\"ab\"",
"\"\""
],
[
"\"ba\"",
"\"\""... | [] | [
[
"\"yogurt\"",
"> \"u\""
],
[
"\"FULL\"",
"> \"U\""
],
[
"\"quick\"",
"> \"\""
],
[
"\"ab\"",
"> \"\""
]
] | get_closest_vowel | MultiLineInfilling/HumanEval/118/L1_L5 | You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condition.
You may assume that the gi... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def get_closest_vowel(word):
"""You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condit... | return word[i]
return ""
| return ""
vowels = {"a", "e", "i", "o", "u", "A", "E", 'O', 'U', 'I'}
for i in range(len(word)-2, 0, -1):
if word[i] in vowels:
if (word[i+1] not in vowels) and (word[i-1] not in vowels):
| [
[
"\"yogurt\"",
"\"u\""
],
[
"\"full\"",
"\"u\""
],
[
"\"easy\"",
"\"\""
],
[
"\"eAsy\"",
"\"\""
],
[
"\"ali\"",
"\"\""
],
[
"\"bad\"",
"\"a\""
],
[
"\"most\"",
"\"o\""
],
[
"\"ab\"",
"\"\""
],
[
"\"ba\"",
"\"\""... | [] | [
[
"\"yogurt\"",
"> \"u\""
],
[
"\"FULL\"",
"> \"U\""
],
[
"\"quick\"",
"> \"\""
],
[
"\"ab\"",
"> \"\""
]
] | get_closest_vowel | MultiLineInfilling/HumanEval/118/L1_L6 | You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condition.
You may assume that the gi... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def get_closest_vowel(word):
"""You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condit... | return ""
| return ""
vowels = {"a", "e", "i", "o", "u", "A", "E", 'O', 'U', 'I'}
for i in range(len(word)-2, 0, -1):
if word[i] in vowels:
if (word[i+1] not in vowels) and (word[i-1] not in vowels):
return word[i]
| [
[
"\"yogurt\"",
"\"u\""
],
[
"\"full\"",
"\"u\""
],
[
"\"easy\"",
"\"\""
],
[
"\"eAsy\"",
"\"\""
],
[
"\"ali\"",
"\"\""
],
[
"\"bad\"",
"\"a\""
],
[
"\"most\"",
"\"o\""
],
[
"\"ab\"",
"\"\""
],
[
"\"ba\"",
"\"\""... | [] | [
[
"\"yogurt\"",
"> \"u\""
],
[
"\"FULL\"",
"> \"U\""
],
[
"\"quick\"",
"> \"\""
],
[
"\"ab\"",
"> \"\""
]
] | get_closest_vowel | MultiLineInfilling/HumanEval/118/L1_L7 | You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condition.
You may assume that the gi... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python |
def get_closest_vowel(word):
"""You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condit... | return ""
vowels = {"a", "e", "i", "o", "u", "A", "E", 'O', 'U', 'I'}
for i in range(len(word)-2, 0, -1):
if word[i] in vowels:
if (word[i+1] not in vowels) and (word[i-1] not in vowels):
return word[i]
return ""
| [
[
"\"yogurt\"",
"\"u\""
],
[
"\"full\"",
"\"u\""
],
[
"\"easy\"",
"\"\""
],
[
"\"eAsy\"",
"\"\""
],
[
"\"ali\"",
"\"\""
],
[
"\"bad\"",
"\"a\""
],
[
"\"most\"",
"\"o\""
],
[
"\"ab\"",
"\"\""
],
[
"\"ba\"",
"\"\""... | [] | [
[
"\"yogurt\"",
"> \"u\""
],
[
"\"FULL\"",
"> \"U\""
],
[
"\"quick\"",
"> \"\""
],
[
"\"ab\"",
"> \"\""
]
] | get_closest_vowel | MultiLineInfilling/HumanEval/118/L1_L8 | You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condition.
You may assume that the gi... | HumanEval_MultiLineInfilling | code_infilling | [] | python | python | |
def get_closest_vowel(word):
"""You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condit... | for i in range(len(word)-2, 0, -1):
if word[i] in vowels:
if (word[i+1] not in vowels) and (word[i-1] not in vowels):
return word[i]
return ""
| vowels = {"a", "e", "i", "o", "u", "A", "E", 'O', 'U', 'I'}
| [
[
"\"yogurt\"",
"\"u\""
],
[
"\"full\"",
"\"u\""
],
[
"\"easy\"",
"\"\""
],
[
"\"eAsy\"",
"\"\""
],
[
"\"ali\"",
"\"\""
],
[
"\"bad\"",
"\"a\""
],
[
"\"most\"",
"\"o\""
],
[
"\"ab\"",
"\"\""
],
[
"\"ba\"",
"\"\""... | [] | [
[
"\"yogurt\"",
"> \"u\""
],
[
"\"FULL\"",
"> \"U\""
],
[
"\"quick\"",
"> \"\""
],
[
"\"ab\"",
"> \"\""
]
] | get_closest_vowel | MultiLineInfilling/HumanEval/118/L3_L3 | You are given a word. Your task is to find the closest vowel that stands between
two consonants from the right side of the word (case sensitive).
Vowels in the beginning and ending doesn't count. Return empty string if you didn't
find any vowel met the above condition.
You may assume that the gi... | 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.