test_cases
listlengths 0
100
| import_str
listlengths 0
1
| solution
stringlengths 0
620
| suffix
stringlengths 0
655
| tgt_lang
stringclasses 1
value | doc_string
stringclasses 164
values | compare_func
listlengths 0
0
| prefix
stringlengths 65
1.63k
| demos
listlengths 0
8
| data_id
stringlengths 33
36
| src_lang
stringclasses 1
value | task_name
stringclasses 1
value | dataset_name
stringclasses 1
value | entry_func
stringclasses 158
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
[
[
"[1, 2, 3, 4, 5]",
"2"
],
[
"[5, 1, 4, 3, 2]",
"2"
],
[
"[]",
"None"
],
[
"[1, 1]",
"None"
],
[
"[1,1,1,1,0]",
"1"
],
[
"[1, 0**0]",
"None"
],
[
"[-35, 34, 12, -45]",
"-35"
]
] |
[] |
lst = sorted(set(lst))
return No
|
ne if len(lst) < 2 else lst[1]
|
python
|
You are given a list of integers.
Write a function next_smallest() that returns the 2nd smallest element of the list.
Return None if there is no such element.
|
[] |
def next_smallest(lst):
"""
You are given a list of integers.
Write a function next_smallest() that returns the 2nd smallest element of the list.
Return None if there is no such element.
"""
|
[
[
"[1, 2, 3, 4, 5]",
"2"
],
[
"[5, 1, 4, 3, 2]",
"2"
],
[
"[]",
"None"
],
[
"[1, 1]",
"None"
]
] |
RandomSpanInfilling/HumanEval/90/1
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
next_smallest
|
[
[
"[1, 2, 3, 4, 5]",
"2"
],
[
"[5, 1, 4, 3, 2]",
"2"
],
[
"[]",
"None"
],
[
"[1, 1]",
"None"
],
[
"[1,1,1,1,0]",
"1"
],
[
"[1, 0**0]",
"None"
],
[
"[-35, 34, 12, -45]",
"-35"
]
] |
[] |
ted(set(lst))
return None if len(lst) < 2
|
else lst[1]
|
python
|
You are given a list of integers.
Write a function next_smallest() that returns the 2nd smallest element of the list.
Return None if there is no such element.
|
[] |
def next_smallest(lst):
"""
You are given a list of integers.
Write a function next_smallest() that returns the 2nd smallest element of the list.
Return None if there is no such element.
"""
lst = sor
|
[
[
"[1, 2, 3, 4, 5]",
"2"
],
[
"[5, 1, 4, 3, 2]",
"2"
],
[
"[]",
"None"
],
[
"[1, 1]",
"None"
]
] |
RandomSpanInfilling/HumanEval/90/2
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
next_smallest
|
[
[
"[1, 2, 3, 4, 5]",
"2"
],
[
"[5, 1, 4, 3, 2]",
"2"
],
[
"[]",
"None"
],
[
"[1, 1]",
"None"
],
[
"[1,1,1,1,0]",
"1"
],
[
"[1, 0**0]",
"None"
],
[
"[-35, 34, 12, -45]",
"-35"
]
] |
[] |
orted(set(lst))
return None if len(lst) < 2 else lst[1]
|
python
|
You are given a list of integers.
Write a function next_smallest() that returns the 2nd smallest element of the list.
Return None if there is no such element.
|
[] |
def next_smallest(lst):
"""
You are given a list of integers.
Write a function next_smallest() that returns the 2nd smallest element of the list.
Return None if there is no such element.
"""
lst = s
|
[
[
"[1, 2, 3, 4, 5]",
"2"
],
[
"[5, 1, 4, 3, 2]",
"2"
],
[
"[]",
"None"
],
[
"[1, 1]",
"None"
]
] |
RandomSpanInfilling/HumanEval/90/3
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
next_smallest
|
|
[
[
"[1, 2, 3, 4, 5]",
"2"
],
[
"[5, 1, 4, 3, 2]",
"2"
],
[
"[]",
"None"
],
[
"[1, 1]",
"None"
],
[
"[1,1,1,1,0]",
"1"
],
[
"[1, 0**0]",
"None"
],
[
"[-35, 34, 12, -45]",
"-35"
]
] |
[] |
rted(set(lst
|
))
return None if len(lst) < 2 else lst[1]
|
python
|
You are given a list of integers.
Write a function next_smallest() that returns the 2nd smallest element of the list.
Return None if there is no such element.
|
[] |
def next_smallest(lst):
"""
You are given a list of integers.
Write a function next_smallest() that returns the 2nd smallest element of the list.
Return None if there is no such element.
"""
lst = so
|
[
[
"[1, 2, 3, 4, 5]",
"2"
],
[
"[5, 1, 4, 3, 2]",
"2"
],
[
"[]",
"None"
],
[
"[1, 1]",
"None"
]
] |
RandomSpanInfilling/HumanEval/90/4
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
next_smallest
|
[
[
"[1, 2, 3, 4, 5]",
"2"
],
[
"[5, 1, 4, 3, 2]",
"2"
],
[
"[]",
"None"
],
[
"[1, 1]",
"None"
],
[
"[1,1,1,1,0]",
"1"
],
[
"[1, 0**0]",
"None"
],
[
"[-35, 34, 12, -45]",
"-35"
]
] |
[] |
et(lst))
return None i
|
f len(lst) < 2 else lst[1]
|
python
|
You are given a list of integers.
Write a function next_smallest() that returns the 2nd smallest element of the list.
Return None if there is no such element.
|
[] |
def next_smallest(lst):
"""
You are given a list of integers.
Write a function next_smallest() that returns the 2nd smallest element of the list.
Return None if there is no such element.
"""
lst = sorted(s
|
[
[
"[1, 2, 3, 4, 5]",
"2"
],
[
"[5, 1, 4, 3, 2]",
"2"
],
[
"[]",
"None"
],
[
"[1, 1]",
"None"
]
] |
RandomSpanInfilling/HumanEval/90/5
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
next_smallest
|
[
[
"[1, 2, 3, 4, 5]",
"2"
],
[
"[5, 1, 4, 3, 2]",
"2"
],
[
"[]",
"None"
],
[
"[1, 1]",
"None"
],
[
"[1,1,1,1,0]",
"1"
],
[
"[1, 0**0]",
"None"
],
[
"[-35, 34, 12, -45]",
"-35"
]
] |
[] |
f len(lst)
|
< 2 else lst[1]
|
python
|
You are given a list of integers.
Write a function next_smallest() that returns the 2nd smallest element of the list.
Return None if there is no such element.
|
[] |
def next_smallest(lst):
"""
You are given a list of integers.
Write a function next_smallest() that returns the 2nd smallest element of the list.
Return None if there is no such element.
"""
lst = sorted(set(lst))
return None i
|
[
[
"[1, 2, 3, 4, 5]",
"2"
],
[
"[5, 1, 4, 3, 2]",
"2"
],
[
"[]",
"None"
],
[
"[1, 1]",
"None"
]
] |
RandomSpanInfilling/HumanEval/90/6
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
next_smallest
|
[
[
"[1, 2, 3, 4, 5]",
"2"
],
[
"[5, 1, 4, 3, 2]",
"2"
],
[
"[]",
"None"
],
[
"[1, 1]",
"None"
],
[
"[1,1,1,1,0]",
"1"
],
[
"[1, 0**0]",
"None"
],
[
"[-35, 34, 12, -45]",
"-35"
]
] |
[] |
= sorted(set(lst))
return None if len(ls
|
t) < 2 else lst[1]
|
python
|
You are given a list of integers.
Write a function next_smallest() that returns the 2nd smallest element of the list.
Return None if there is no such element.
|
[] |
def next_smallest(lst):
"""
You are given a list of integers.
Write a function next_smallest() that returns the 2nd smallest element of the list.
Return None if there is no such element.
"""
lst
|
[
[
"[1, 2, 3, 4, 5]",
"2"
],
[
"[5, 1, 4, 3, 2]",
"2"
],
[
"[]",
"None"
],
[
"[1, 1]",
"None"
]
] |
RandomSpanInfilling/HumanEval/90/7
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
next_smallest
|
[
[
"[1, 2, 3, 4, 5]",
"2"
],
[
"[5, 1, 4, 3, 2]",
"2"
],
[
"[]",
"None"
],
[
"[1, 1]",
"None"
],
[
"[1,1,1,1,0]",
"1"
],
[
"[1, 0**0]",
"None"
],
[
"[-35, 34, 12, -45]",
"-35"
]
] |
[] |
return None if len(lst)
|
< 2 else lst[1]
|
python
|
You are given a list of integers.
Write a function next_smallest() that returns the 2nd smallest element of the list.
Return None if there is no such element.
|
[] |
def next_smallest(lst):
"""
You are given a list of integers.
Write a function next_smallest() that returns the 2nd smallest element of the list.
Return None if there is no such element.
"""
lst = sorted(set(lst))
|
[
[
"[1, 2, 3, 4, 5]",
"2"
],
[
"[5, 1, 4, 3, 2]",
"2"
],
[
"[]",
"None"
],
[
"[1, 1]",
"None"
]
] |
RandomSpanInfilling/HumanEval/90/8
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
next_smallest
|
[
[
"[1, 2, 3, 4, 5]",
"2"
],
[
"[5, 1, 4, 3, 2]",
"2"
],
[
"[]",
"None"
],
[
"[1, 1]",
"None"
],
[
"[1,1,1,1,0]",
"1"
],
[
"[1, 0**0]",
"None"
],
[
"[-35, 34, 12, -45]",
"-35"
]
] |
[] |
if len(
|
lst) < 2 else lst[1]
|
python
|
You are given a list of integers.
Write a function next_smallest() that returns the 2nd smallest element of the list.
Return None if there is no such element.
|
[] |
def next_smallest(lst):
"""
You are given a list of integers.
Write a function next_smallest() that returns the 2nd smallest element of the list.
Return None if there is no such element.
"""
lst = sorted(set(lst))
return None
|
[
[
"[1, 2, 3, 4, 5]",
"2"
],
[
"[5, 1, 4, 3, 2]",
"2"
],
[
"[]",
"None"
],
[
"[1, 1]",
"None"
]
] |
RandomSpanInfilling/HumanEval/90/9
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
next_smallest
|
[
[
"[1, 2, 3, 4, 5]",
"2"
],
[
"[5, 1, 4, 3, 2]",
"2"
],
[
"[]",
"None"
],
[
"[1, 1]",
"None"
],
[
"[1,1,1,1,0]",
"1"
],
[
"[1, 0**0]",
"None"
],
[
"[-35, 34, 12, -45]",
"-35"
]
] |
[] |
set(lst))
return None if len(lst) < 2 else lst[1
|
]
|
python
|
You are given a list of integers.
Write a function next_smallest() that returns the 2nd smallest element of the list.
Return None if there is no such element.
|
[] |
def next_smallest(lst):
"""
You are given a list of integers.
Write a function next_smallest() that returns the 2nd smallest element of the list.
Return None if there is no such element.
"""
lst = sorted(
|
[
[
"[1, 2, 3, 4, 5]",
"2"
],
[
"[5, 1, 4, 3, 2]",
"2"
],
[
"[]",
"None"
],
[
"[1, 1]",
"None"
]
] |
RandomSpanInfilling/HumanEval/90/10
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
next_smallest
|
[
[
"\"Hello world\"",
"0"
],
[
"\"Is the sky blue?\"",
"0"
],
[
"\"I love It !\"",
"1"
],
[
"\"bIt\"",
"0"
],
[
"\"I feel good today. I will be productive. will kill It\"",
"2"
],
[
"\"You and I are going for a walk\"",
"0"
]
] |
[] |
tences = re.split(r'[.?!]\s*', S)
return sum(sentence[0:2
|
] == 'I ' for sentence in sentences)
|
python
|
You'll be given a string of words, and your task is to count the number
of boredoms. A boredom is a sentence that starts with the word "I".
Sentences are delimited by '.', '?' or '!'.
|
[] |
def is_bored(S):
"""
You'll be given a string of words, and your task is to count the number
of boredoms. A boredom is a sentence that starts with the word "I".
Sentences are delimited by '.', '?' or '!'.
"""
import re
sen
|
[
[
"\"Hello world\"",
"0"
],
[
"\"The sky is blue. The sun is shining. I love this weather\"",
"1"
]
] |
RandomSpanInfilling/HumanEval/91/1
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
is_bored
|
[
[
"\"Hello world\"",
"0"
],
[
"\"Is the sky blue?\"",
"0"
],
[
"\"I love It !\"",
"1"
],
[
"\"bIt\"",
"0"
],
[
"\"I feel good today. I will be productive. will kill It\"",
"2"
],
[
"\"You and I are going for a walk\"",
"0"
]
] |
[] |
it(r'[.?!]\s*', S)
return sum(sentence[0:2] == 'I ' for
|
sentence in sentences)
|
python
|
You'll be given a string of words, and your task is to count the number
of boredoms. A boredom is a sentence that starts with the word "I".
Sentences are delimited by '.', '?' or '!'.
|
[] |
def is_bored(S):
"""
You'll be given a string of words, and your task is to count the number
of boredoms. A boredom is a sentence that starts with the word "I".
Sentences are delimited by '.', '?' or '!'.
"""
import re
sentences = re.spl
|
[
[
"\"Hello world\"",
"0"
],
[
"\"The sky is blue. The sun is shining. I love this weather\"",
"1"
]
] |
RandomSpanInfilling/HumanEval/91/2
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
is_bored
|
[
[
"\"Hello world\"",
"0"
],
[
"\"Is the sky blue?\"",
"0"
],
[
"\"I love It !\"",
"1"
],
[
"\"bIt\"",
"0"
],
[
"\"I feel good today. I will be productive. will kill It\"",
"2"
],
[
"\"You and I are going for a walk\"",
"0"
]
] |
[] |
return sum(sentence[0:2] == 'I ' for sentence
|
in sentences)
|
python
|
You'll be given a string of words, and your task is to count the number
of boredoms. A boredom is a sentence that starts with the word "I".
Sentences are delimited by '.', '?' or '!'.
|
[] |
def is_bored(S):
"""
You'll be given a string of words, and your task is to count the number
of boredoms. A boredom is a sentence that starts with the word "I".
Sentences are delimited by '.', '?' or '!'.
"""
import re
sentences = re.split(r'[.?!]\s*', S)
|
[
[
"\"Hello world\"",
"0"
],
[
"\"The sky is blue. The sun is shining. I love this weather\"",
"1"
]
] |
RandomSpanInfilling/HumanEval/91/3
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
is_bored
|
[
[
"\"Hello world\"",
"0"
],
[
"\"Is the sky blue?\"",
"0"
],
[
"\"I love It !\"",
"1"
],
[
"\"bIt\"",
"0"
],
[
"\"I feel good today. I will be productive. will kill It\"",
"2"
],
[
"\"You and I are going for a walk\"",
"0"
]
] |
[] |
import re
sentences = re.split(r'[.?!]\s*', S)
|
return sum(sentence[0:2] == 'I ' for sentence in sentences)
|
python
|
You'll be given a string of words, and your task is to count the number
of boredoms. A boredom is a sentence that starts with the word "I".
Sentences are delimited by '.', '?' or '!'.
|
[] |
def is_bored(S):
"""
You'll be given a string of words, and your task is to count the number
of boredoms. A boredom is a sentence that starts with the word "I".
Sentences are delimited by '.', '?' or '!'.
"""
|
[
[
"\"Hello world\"",
"0"
],
[
"\"The sky is blue. The sun is shining. I love this weather\"",
"1"
]
] |
RandomSpanInfilling/HumanEval/91/4
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
is_bored
|
[
[
"\"Hello world\"",
"0"
],
[
"\"Is the sky blue?\"",
"0"
],
[
"\"I love It !\"",
"1"
],
[
"\"bIt\"",
"0"
],
[
"\"I feel good today. I will be productive. will kill It\"",
"2"
],
[
"\"You and I are going for a walk\"",
"0"
]
] |
[] |
= re.split(r'[.?!]\s*', S)
return sum(sen
|
tence[0:2] == 'I ' for sentence in sentences)
|
python
|
You'll be given a string of words, and your task is to count the number
of boredoms. A boredom is a sentence that starts with the word "I".
Sentences are delimited by '.', '?' or '!'.
|
[] |
def is_bored(S):
"""
You'll be given a string of words, and your task is to count the number
of boredoms. A boredom is a sentence that starts with the word "I".
Sentences are delimited by '.', '?' or '!'.
"""
import re
sentences
|
[
[
"\"Hello world\"",
"0"
],
[
"\"The sky is blue. The sun is shining. I love this weather\"",
"1"
]
] |
RandomSpanInfilling/HumanEval/91/5
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
is_bored
|
[
[
"\"Hello world\"",
"0"
],
[
"\"Is the sky blue?\"",
"0"
],
[
"\"I love It !\"",
"1"
],
[
"\"bIt\"",
"0"
],
[
"\"I feel good today. I will be productive. will kill It\"",
"2"
],
[
"\"You and I are going for a walk\"",
"0"
]
] |
[] |
plit(r'[.?!]\s*', S)
return sum(sentence[0:2] == 'I ' for sentence in senten
|
ces)
|
python
|
You'll be given a string of words, and your task is to count the number
of boredoms. A boredom is a sentence that starts with the word "I".
Sentences are delimited by '.', '?' or '!'.
|
[] |
def is_bored(S):
"""
You'll be given a string of words, and your task is to count the number
of boredoms. A boredom is a sentence that starts with the word "I".
Sentences are delimited by '.', '?' or '!'.
"""
import re
sentences = re.s
|
[
[
"\"Hello world\"",
"0"
],
[
"\"The sky is blue. The sun is shining. I love this weather\"",
"1"
]
] |
RandomSpanInfilling/HumanEval/91/6
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
is_bored
|
[
[
"\"Hello world\"",
"0"
],
[
"\"Is the sky blue?\"",
"0"
],
[
"\"I love It !\"",
"1"
],
[
"\"bIt\"",
"0"
],
[
"\"I feel good today. I will be productive. will kill It\"",
"2"
],
[
"\"You and I are going for a walk\"",
"0"
]
] |
[] |
eturn sum(sentence[0:2] == 'I '
|
for sentence in sentences)
|
python
|
You'll be given a string of words, and your task is to count the number
of boredoms. A boredom is a sentence that starts with the word "I".
Sentences are delimited by '.', '?' or '!'.
|
[] |
def is_bored(S):
"""
You'll be given a string of words, and your task is to count the number
of boredoms. A boredom is a sentence that starts with the word "I".
Sentences are delimited by '.', '?' or '!'.
"""
import re
sentences = re.split(r'[.?!]\s*', S)
r
|
[
[
"\"Hello world\"",
"0"
],
[
"\"The sky is blue. The sun is shining. I love this weather\"",
"1"
]
] |
RandomSpanInfilling/HumanEval/91/7
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
is_bored
|
[
[
"\"Hello world\"",
"0"
],
[
"\"Is the sky blue?\"",
"0"
],
[
"\"I love It !\"",
"1"
],
[
"\"bIt\"",
"0"
],
[
"\"I feel good today. I will be productive. will kill It\"",
"2"
],
[
"\"You and I are going for a walk\"",
"0"
]
] |
[] |
)
ret
|
urn sum(sentence[0:2] == 'I ' for sentence in sentences)
|
python
|
You'll be given a string of words, and your task is to count the number
of boredoms. A boredom is a sentence that starts with the word "I".
Sentences are delimited by '.', '?' or '!'.
|
[] |
def is_bored(S):
"""
You'll be given a string of words, and your task is to count the number
of boredoms. A boredom is a sentence that starts with the word "I".
Sentences are delimited by '.', '?' or '!'.
"""
import re
sentences = re.split(r'[.?!]\s*', S
|
[
[
"\"Hello world\"",
"0"
],
[
"\"The sky is blue. The sun is shining. I love this weather\"",
"1"
]
] |
RandomSpanInfilling/HumanEval/91/8
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
is_bored
|
[
[
"\"Hello world\"",
"0"
],
[
"\"Is the sky blue?\"",
"0"
],
[
"\"I love It !\"",
"1"
],
[
"\"bIt\"",
"0"
],
[
"\"I feel good today. I will be productive. will kill It\"",
"2"
],
[
"\"You and I are going for a walk\"",
"0"
]
] |
[] |
[0:2] == 'I ' for
|
sentence in sentences)
|
python
|
You'll be given a string of words, and your task is to count the number
of boredoms. A boredom is a sentence that starts with the word "I".
Sentences are delimited by '.', '?' or '!'.
|
[] |
def is_bored(S):
"""
You'll be given a string of words, and your task is to count the number
of boredoms. A boredom is a sentence that starts with the word "I".
Sentences are delimited by '.', '?' or '!'.
"""
import re
sentences = re.split(r'[.?!]\s*', S)
return sum(sentence
|
[
[
"\"Hello world\"",
"0"
],
[
"\"The sky is blue. The sun is shining. I love this weather\"",
"1"
]
] |
RandomSpanInfilling/HumanEval/91/9
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
is_bored
|
[
[
"\"Hello world\"",
"0"
],
[
"\"Is the sky blue?\"",
"0"
],
[
"\"I love It !\"",
"1"
],
[
"\"bIt\"",
"0"
],
[
"\"I feel good today. I will be productive. will kill It\"",
"2"
],
[
"\"You and I are going for a walk\"",
"0"
]
] |
[] |
port re
sentences = re.split(r'[.?!]\s*', S)
return sum(sente
|
nce[0:2] == 'I ' for sentence in sentences)
|
python
|
You'll be given a string of words, and your task is to count the number
of boredoms. A boredom is a sentence that starts with the word "I".
Sentences are delimited by '.', '?' or '!'.
|
[] |
def is_bored(S):
"""
You'll be given a string of words, and your task is to count the number
of boredoms. A boredom is a sentence that starts with the word "I".
Sentences are delimited by '.', '?' or '!'.
"""
im
|
[
[
"\"Hello world\"",
"0"
],
[
"\"The sky is blue. The sun is shining. I love this weather\"",
"1"
]
] |
RandomSpanInfilling/HumanEval/91/10
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
is_bored
|
[
[
"2, 3, 1",
"True"
],
[
"2.5, 2, 3",
"False"
],
[
"1.5, 5, 3.5",
"False"
],
[
"2, 6, 2",
"False"
],
[
"4, 2, 2",
"True"
],
[
"2.2, 2.2, 2.2",
"False"
],
[
"-4, 6, 2",
"True"
],
[
"2, 1, 1",
"True"
],
[
"3, 4, 7",
"True"
],
[
"3.0, 4, 7",
"False"
]
] |
[] |
nt) and isinstance(z,int):
if (x+y==z
|
) or (x+z==y) or (y+z==x):
return True
return False
return False
|
python
|
Create a function that takes 3 numbers.
Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.
Returns false in any other cases.
|
[] |
def any_int(x, y, z):
"""
Create a function that takes 3 numbers.
Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.
Returns false in any other cases.
"""
if isinstance(x,int) and isinstance(y,i
|
[
[
"5, 2, 7",
"True"
],
[
"3, 2, 2",
"False"
],
[
"3, -2, 1",
"True"
],
[
"3.6, -2.2, 2",
"False"
]
] |
RandomSpanInfilling/HumanEval/92/1
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
any_int
|
[
[
"2, 3, 1",
"True"
],
[
"2.5, 2, 3",
"False"
],
[
"1.5, 5, 3.5",
"False"
],
[
"2, 6, 2",
"False"
],
[
"4, 2, 2",
"True"
],
[
"2.2, 2.2, 2.2",
"False"
],
[
"-4, 6, 2",
"True"
],
[
"2, 1, 1",
"True"
],
[
"3, 4, 7",
"True"
],
[
"3.0, 4, 7",
"False"
]
] |
[] |
x,int) and isinstance(y,int) and isinstance(z,int):
if (x+y==z) or (x+z==y) or (y+z==x):
return True
return
|
False
return False
|
python
|
Create a function that takes 3 numbers.
Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.
Returns false in any other cases.
|
[] |
def any_int(x, y, z):
"""
Create a function that takes 3 numbers.
Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.
Returns false in any other cases.
"""
if isinstance(
|
[
[
"5, 2, 7",
"True"
],
[
"3, 2, 2",
"False"
],
[
"3, -2, 1",
"True"
],
[
"3.6, -2.2, 2",
"False"
]
] |
RandomSpanInfilling/HumanEval/92/2
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
any_int
|
[
[
"2, 3, 1",
"True"
],
[
"2.5, 2, 3",
"False"
],
[
"1.5, 5, 3.5",
"False"
],
[
"2, 6, 2",
"False"
],
[
"4, 2, 2",
"True"
],
[
"2.2, 2.2, 2.2",
"False"
],
[
"-4, 6, 2",
"True"
],
[
"2, 1, 1",
"True"
],
[
"3, 4, 7",
"True"
],
[
"3.0, 4, 7",
"False"
]
] |
[] |
instance(y,int) and isinstance(z,int):
if (x+y==z) or (x+z==y) or (y+z==x):
return True
|
return False
return False
|
python
|
Create a function that takes 3 numbers.
Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.
Returns false in any other cases.
|
[] |
def any_int(x, y, z):
"""
Create a function that takes 3 numbers.
Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.
Returns false in any other cases.
"""
if isinstance(x,int) and is
|
[
[
"5, 2, 7",
"True"
],
[
"3, 2, 2",
"False"
],
[
"3, -2, 1",
"True"
],
[
"3.6, -2.2, 2",
"False"
]
] |
RandomSpanInfilling/HumanEval/92/3
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
any_int
|
[
[
"2, 3, 1",
"True"
],
[
"2.5, 2, 3",
"False"
],
[
"1.5, 5, 3.5",
"False"
],
[
"2, 6, 2",
"False"
],
[
"4, 2, 2",
"True"
],
[
"2.2, 2.2, 2.2",
"False"
],
[
"-4, 6, 2",
"True"
],
[
"2, 1, 1",
"True"
],
[
"3, 4, 7",
"True"
],
[
"3.0, 4, 7",
"False"
]
] |
[] |
if isinstance(x,int) and isinstance(y,int) and isinstance(z,int):
if (x+y==z) or (x+z==y)
|
or (y+z==x):
return True
return False
return False
|
python
|
Create a function that takes 3 numbers.
Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.
Returns false in any other cases.
|
[] |
def any_int(x, y, z):
"""
Create a function that takes 3 numbers.
Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.
Returns false in any other cases.
"""
|
[
[
"5, 2, 7",
"True"
],
[
"3, 2, 2",
"False"
],
[
"3, -2, 1",
"True"
],
[
"3.6, -2.2, 2",
"False"
]
] |
RandomSpanInfilling/HumanEval/92/4
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
any_int
|
[
[
"2, 3, 1",
"True"
],
[
"2.5, 2, 3",
"False"
],
[
"1.5, 5, 3.5",
"False"
],
[
"2, 6, 2",
"False"
],
[
"4, 2, 2",
"True"
],
[
"2.2, 2.2, 2.2",
"False"
],
[
"-4, 6, 2",
"True"
],
[
"2, 1, 1",
"True"
],
[
"3, 4, 7",
"True"
],
[
"3.0, 4, 7",
"False"
]
] |
[] |
nce(x,int) and isinstance(y,int) and isinstance(z,int):
if (x+y==z) or (x+z==y) or (y+z==x):
|
return True
return False
return False
|
python
|
Create a function that takes 3 numbers.
Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.
Returns false in any other cases.
|
[] |
def any_int(x, y, z):
"""
Create a function that takes 3 numbers.
Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.
Returns false in any other cases.
"""
if isinsta
|
[
[
"5, 2, 7",
"True"
],
[
"3, 2, 2",
"False"
],
[
"3, -2, 1",
"True"
],
[
"3.6, -2.2, 2",
"False"
]
] |
RandomSpanInfilling/HumanEval/92/5
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
any_int
|
[
[
"2, 3, 1",
"True"
],
[
"2.5, 2, 3",
"False"
],
[
"1.5, 5, 3.5",
"False"
],
[
"2, 6, 2",
"False"
],
[
"4, 2, 2",
"True"
],
[
"2.2, 2.2, 2.2",
"False"
],
[
"-4, 6, 2",
"True"
],
[
"2, 1, 1",
"True"
],
[
"3, 4, 7",
"True"
],
[
"3.0, 4, 7",
"False"
]
] |
[] |
t) and isinstance(z,int):
if (x+y==z) or (x+z==y) or (y+z==x):
return True
|
return False
return False
|
python
|
Create a function that takes 3 numbers.
Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.
Returns false in any other cases.
|
[] |
def any_int(x, y, z):
"""
Create a function that takes 3 numbers.
Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.
Returns false in any other cases.
"""
if isinstance(x,int) and isinstance(y,in
|
[
[
"5, 2, 7",
"True"
],
[
"3, 2, 2",
"False"
],
[
"3, -2, 1",
"True"
],
[
"3.6, -2.2, 2",
"False"
]
] |
RandomSpanInfilling/HumanEval/92/6
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
any_int
|
[
[
"2, 3, 1",
"True"
],
[
"2.5, 2, 3",
"False"
],
[
"1.5, 5, 3.5",
"False"
],
[
"2, 6, 2",
"False"
],
[
"4, 2, 2",
"True"
],
[
"2.2, 2.2, 2.2",
"False"
],
[
"-4, 6, 2",
"True"
],
[
"2, 1, 1",
"True"
],
[
"3, 4, 7",
"True"
],
[
"3.0, 4, 7",
"False"
]
] |
[] |
Fa
|
lse
|
python
|
Create a function that takes 3 numbers.
Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.
Returns false in any other cases.
|
[] |
def any_int(x, y, z):
"""
Create a function that takes 3 numbers.
Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.
Returns false in any other cases.
"""
if isinstance(x,int) and isinstance(y,int) and isinstance(z,int):
if (x+y==z) or (x+z==y) or (y+z==x):
return True
return False
return
|
[
[
"5, 2, 7",
"True"
],
[
"3, 2, 2",
"False"
],
[
"3, -2, 1",
"True"
],
[
"3.6, -2.2, 2",
"False"
]
] |
RandomSpanInfilling/HumanEval/92/7
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
any_int
|
[
[
"2, 3, 1",
"True"
],
[
"2.5, 2, 3",
"False"
],
[
"1.5, 5, 3.5",
"False"
],
[
"2, 6, 2",
"False"
],
[
"4, 2, 2",
"True"
],
[
"2.2, 2.2, 2.2",
"False"
],
[
"-4, 6, 2",
"True"
],
[
"2, 1, 1",
"True"
],
[
"3, 4, 7",
"True"
],
[
"3.0, 4, 7",
"False"
]
] |
[] |
or (x+z==
|
y) or (y+z==x):
return True
return False
return False
|
python
|
Create a function that takes 3 numbers.
Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.
Returns false in any other cases.
|
[] |
def any_int(x, y, z):
"""
Create a function that takes 3 numbers.
Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.
Returns false in any other cases.
"""
if isinstance(x,int) and isinstance(y,int) and isinstance(z,int):
if (x+y==z)
|
[
[
"5, 2, 7",
"True"
],
[
"3, 2, 2",
"False"
],
[
"3, -2, 1",
"True"
],
[
"3.6, -2.2, 2",
"False"
]
] |
RandomSpanInfilling/HumanEval/92/8
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
any_int
|
[
[
"2, 3, 1",
"True"
],
[
"2.5, 2, 3",
"False"
],
[
"1.5, 5, 3.5",
"False"
],
[
"2, 6, 2",
"False"
],
[
"4, 2, 2",
"True"
],
[
"2.2, 2.2, 2.2",
"False"
],
[
"-4, 6, 2",
"True"
],
[
"2, 1, 1",
"True"
],
[
"3, 4, 7",
"True"
],
[
"3.0, 4, 7",
"False"
]
] |
[] |
x):
return True
return Fals
|
e
return False
|
python
|
Create a function that takes 3 numbers.
Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.
Returns false in any other cases.
|
[] |
def any_int(x, y, z):
"""
Create a function that takes 3 numbers.
Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.
Returns false in any other cases.
"""
if isinstance(x,int) and isinstance(y,int) and isinstance(z,int):
if (x+y==z) or (x+z==y) or (y+z==
|
[
[
"5, 2, 7",
"True"
],
[
"3, 2, 2",
"False"
],
[
"3, -2, 1",
"True"
],
[
"3.6, -2.2, 2",
"False"
]
] |
RandomSpanInfilling/HumanEval/92/9
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
any_int
|
[
[
"2, 3, 1",
"True"
],
[
"2.5, 2, 3",
"False"
],
[
"1.5, 5, 3.5",
"False"
],
[
"2, 6, 2",
"False"
],
[
"4, 2, 2",
"True"
],
[
"2.2, 2.2, 2.2",
"False"
],
[
"-4, 6, 2",
"True"
],
[
"2, 1, 1",
"True"
],
[
"3, 4, 7",
"True"
],
[
"3.0, 4, 7",
"False"
]
] |
[] |
e(z,int):
if (x+y==z) or
|
(x+z==y) or (y+z==x):
return True
return False
return False
|
python
|
Create a function that takes 3 numbers.
Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.
Returns false in any other cases.
|
[] |
def any_int(x, y, z):
"""
Create a function that takes 3 numbers.
Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.
Returns false in any other cases.
"""
if isinstance(x,int) and isinstance(y,int) and isinstanc
|
[
[
"5, 2, 7",
"True"
],
[
"3, 2, 2",
"False"
],
[
"3, -2, 1",
"True"
],
[
"3.6, -2.2, 2",
"False"
]
] |
RandomSpanInfilling/HumanEval/92/10
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
any_int
|
[
[
"'TEST'",
"'tgst'"
],
[
"'Mudasir'",
"'mWDCSKR'"
],
[
"'YES'",
"'ygs'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
],
[
"\"I DoNt KnOw WhAt tO WrItE\"",
"'k dQnT kNqW wHcT Tq wRkTg'"
]
] |
[] |
i in vowels])
message = message.swapcase()
return ''.join([vowels_replace[i
|
] if i in vowels else i for i in message])
|
python
|
Write a function that takes a message, and encodes in such a
way that it swaps case of all letters, replaces all vowels in
the message with the letter that appears 2 places ahead of that
vowel in the english alphabet.
Assume only letters.
|
[] |
def encode(message):
"""
Write a function that takes a message, and encodes in such a
way that it swaps case of all letters, replaces all vowels in
the message with the letter that appears 2 places ahead of that
vowel in the english alphabet.
Assume only letters.
"""
vowels = "aeiouAEIOU"
vowels_replace = dict([(i, chr(ord(i) + 2)) for
|
[
[
"'test'",
"'TGST'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
]
] |
RandomSpanInfilling/HumanEval/93/1
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
encode
|
[
[
"'TEST'",
"'tgst'"
],
[
"'Mudasir'",
"'mWDCSKR'"
],
[
"'YES'",
"'ygs'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
],
[
"\"I DoNt KnOw WhAt tO WrItE\"",
"'k dQnT kNqW wHcT Tq wRkTg'"
]
] |
[] |
owels = "aeiouAEIOU"
vowels_replace = dict([(i, chr(ord(i) + 2)) for i in vowels])
message = message.swapcase()
return ''.join([vowels_replace[i]
|
if i in vowels else i for i in message])
|
python
|
Write a function that takes a message, and encodes in such a
way that it swaps case of all letters, replaces all vowels in
the message with the letter that appears 2 places ahead of that
vowel in the english alphabet.
Assume only letters.
|
[] |
def encode(message):
"""
Write a function that takes a message, and encodes in such a
way that it swaps case of all letters, replaces all vowels in
the message with the letter that appears 2 places ahead of that
vowel in the english alphabet.
Assume only letters.
"""
v
|
[
[
"'test'",
"'TGST'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
]
] |
RandomSpanInfilling/HumanEval/93/2
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
encode
|
[
[
"'TEST'",
"'tgst'"
],
[
"'Mudasir'",
"'mWDCSKR'"
],
[
"'YES'",
"'ygs'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
],
[
"\"I DoNt KnOw WhAt tO WrItE\"",
"'k dQnT kNqW wHcT Tq wRkTg'"
]
] |
[] |
eplace = dict([(i, chr(ord(i) + 2)) for i in vowels])
message = message.swapcase()
return ''.join([vowels_replace[i] if i i
|
n vowels else i for i in message])
|
python
|
Write a function that takes a message, and encodes in such a
way that it swaps case of all letters, replaces all vowels in
the message with the letter that appears 2 places ahead of that
vowel in the english alphabet.
Assume only letters.
|
[] |
def encode(message):
"""
Write a function that takes a message, and encodes in such a
way that it swaps case of all letters, replaces all vowels in
the message with the letter that appears 2 places ahead of that
vowel in the english alphabet.
Assume only letters.
"""
vowels = "aeiouAEIOU"
vowels_r
|
[
[
"'test'",
"'TGST'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
]
] |
RandomSpanInfilling/HumanEval/93/3
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
encode
|
[
[
"'TEST'",
"'tgst'"
],
[
"'Mudasir'",
"'mWDCSKR'"
],
[
"'YES'",
"'ygs'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
],
[
"\"I DoNt KnOw WhAt tO WrItE\"",
"'k dQnT kNqW wHcT Tq wRkTg'"
]
] |
[] |
swapcase()
return ''.join([vowels_replace[i] if i in vowels else i
|
for i in message])
|
python
|
Write a function that takes a message, and encodes in such a
way that it swaps case of all letters, replaces all vowels in
the message with the letter that appears 2 places ahead of that
vowel in the english alphabet.
Assume only letters.
|
[] |
def encode(message):
"""
Write a function that takes a message, and encodes in such a
way that it swaps case of all letters, replaces all vowels in
the message with the letter that appears 2 places ahead of that
vowel in the english alphabet.
Assume only letters.
"""
vowels = "aeiouAEIOU"
vowels_replace = dict([(i, chr(ord(i) + 2)) for i in vowels])
message = message.
|
[
[
"'test'",
"'TGST'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
]
] |
RandomSpanInfilling/HumanEval/93/4
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
encode
|
[
[
"'TEST'",
"'tgst'"
],
[
"'Mudasir'",
"'mWDCSKR'"
],
[
"'YES'",
"'ygs'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
],
[
"\"I DoNt KnOw WhAt tO WrItE\"",
"'k dQnT kNqW wHcT Tq wRkTg'"
]
] |
[] |
= "aeiouAEIOU"
vowels_replace = dict([(i, chr(ord(i) + 2)) for i in vowels])
message = message.swapcase()
|
return ''.join([vowels_replace[i] if i in vowels else i for i in message])
|
python
|
Write a function that takes a message, and encodes in such a
way that it swaps case of all letters, replaces all vowels in
the message with the letter that appears 2 places ahead of that
vowel in the english alphabet.
Assume only letters.
|
[] |
def encode(message):
"""
Write a function that takes a message, and encodes in such a
way that it swaps case of all letters, replaces all vowels in
the message with the letter that appears 2 places ahead of that
vowel in the english alphabet.
Assume only letters.
"""
vowels
|
[
[
"'test'",
"'TGST'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
]
] |
RandomSpanInfilling/HumanEval/93/5
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
encode
|
[
[
"'TEST'",
"'tgst'"
],
[
"'Mudasir'",
"'mWDCSKR'"
],
[
"'YES'",
"'ygs'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
],
[
"\"I DoNt KnOw WhAt tO WrItE\"",
"'k dQnT kNqW wHcT Tq wRkTg'"
]
] |
[] |
ouAEIOU"
vowels_replace = dict([(i, chr(ord(i) + 2)) for i in vowels])
message = message.swapcase()
r
|
eturn ''.join([vowels_replace[i] if i in vowels else i for i in message])
|
python
|
Write a function that takes a message, and encodes in such a
way that it swaps case of all letters, replaces all vowels in
the message with the letter that appears 2 places ahead of that
vowel in the english alphabet.
Assume only letters.
|
[] |
def encode(message):
"""
Write a function that takes a message, and encodes in such a
way that it swaps case of all letters, replaces all vowels in
the message with the letter that appears 2 places ahead of that
vowel in the english alphabet.
Assume only letters.
"""
vowels = "aei
|
[
[
"'test'",
"'TGST'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
]
] |
RandomSpanInfilling/HumanEval/93/6
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
encode
|
[
[
"'TEST'",
"'tgst'"
],
[
"'Mudasir'",
"'mWDCSKR'"
],
[
"'YES'",
"'ygs'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
],
[
"\"I DoNt KnOw WhAt tO WrItE\"",
"'k dQnT kNqW wHcT Tq wRkTg'"
]
] |
[] |
EIOU"
vowels_re
|
place = dict([(i, chr(ord(i) + 2)) for i in vowels])
message = message.swapcase()
return ''.join([vowels_replace[i] if i in vowels else i for i in message])
|
python
|
Write a function that takes a message, and encodes in such a
way that it swaps case of all letters, replaces all vowels in
the message with the letter that appears 2 places ahead of that
vowel in the english alphabet.
Assume only letters.
|
[] |
def encode(message):
"""
Write a function that takes a message, and encodes in such a
way that it swaps case of all letters, replaces all vowels in
the message with the letter that appears 2 places ahead of that
vowel in the english alphabet.
Assume only letters.
"""
vowels = "aeiouA
|
[
[
"'test'",
"'TGST'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
]
] |
RandomSpanInfilling/HumanEval/93/7
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
encode
|
[
[
"'TEST'",
"'tgst'"
],
[
"'Mudasir'",
"'mWDCSKR'"
],
[
"'YES'",
"'ygs'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
],
[
"\"I DoNt KnOw WhAt tO WrItE\"",
"'k dQnT kNqW wHcT Tq wRkTg'"
]
] |
[] |
ssage = message.swapcase()
return ''.joi
|
n([vowels_replace[i] if i in vowels else i for i in message])
|
python
|
Write a function that takes a message, and encodes in such a
way that it swaps case of all letters, replaces all vowels in
the message with the letter that appears 2 places ahead of that
vowel in the english alphabet.
Assume only letters.
|
[] |
def encode(message):
"""
Write a function that takes a message, and encodes in such a
way that it swaps case of all letters, replaces all vowels in
the message with the letter that appears 2 places ahead of that
vowel in the english alphabet.
Assume only letters.
"""
vowels = "aeiouAEIOU"
vowels_replace = dict([(i, chr(ord(i) + 2)) for i in vowels])
me
|
[
[
"'test'",
"'TGST'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
]
] |
RandomSpanInfilling/HumanEval/93/8
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
encode
|
[
[
"'TEST'",
"'tgst'"
],
[
"'Mudasir'",
"'mWDCSKR'"
],
[
"'YES'",
"'ygs'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
],
[
"\"I DoNt KnOw WhAt tO WrItE\"",
"'k dQnT kNqW wHcT Tq wRkTg'"
]
] |
[] |
els = "aeiouAEIOU"
|
vowels_replace = dict([(i, chr(ord(i) + 2)) for i in vowels])
message = message.swapcase()
return ''.join([vowels_replace[i] if i in vowels else i for i in message])
|
python
|
Write a function that takes a message, and encodes in such a
way that it swaps case of all letters, replaces all vowels in
the message with the letter that appears 2 places ahead of that
vowel in the english alphabet.
Assume only letters.
|
[] |
def encode(message):
"""
Write a function that takes a message, and encodes in such a
way that it swaps case of all letters, replaces all vowels in
the message with the letter that appears 2 places ahead of that
vowel in the english alphabet.
Assume only letters.
"""
vow
|
[
[
"'test'",
"'TGST'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
]
] |
RandomSpanInfilling/HumanEval/93/9
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
encode
|
[
[
"'TEST'",
"'tgst'"
],
[
"'Mudasir'",
"'mWDCSKR'"
],
[
"'YES'",
"'ygs'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
],
[
"\"I DoNt KnOw WhAt tO WrItE\"",
"'k dQnT kNqW wHcT Tq wRkTg'"
]
] |
[] |
els])
mes
|
sage = message.swapcase()
return ''.join([vowels_replace[i] if i in vowels else i for i in message])
|
python
|
Write a function that takes a message, and encodes in such a
way that it swaps case of all letters, replaces all vowels in
the message with the letter that appears 2 places ahead of that
vowel in the english alphabet.
Assume only letters.
|
[] |
def encode(message):
"""
Write a function that takes a message, and encodes in such a
way that it swaps case of all letters, replaces all vowels in
the message with the letter that appears 2 places ahead of that
vowel in the english alphabet.
Assume only letters.
"""
vowels = "aeiouAEIOU"
vowels_replace = dict([(i, chr(ord(i) + 2)) for i in vow
|
[
[
"'test'",
"'TGST'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
]
] |
RandomSpanInfilling/HumanEval/93/10
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
encode
|
[
[
"[0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3]",
"10"
],
[
"[1,0,1,8,2,4597,2,1,3,40,1,2,1,2,4,2,5,1]",
"25"
],
[
"[1,3,1,32,5107,34,83278,109,163,23,2323,32,30,1,9,3]",
"13"
],
[
"[0,724,32,71,99,32,6,0,5,91,83,0,5,6]",
"11"
],
[
"[0,81,12,3,1,21]",
"3"
],
[
"[0,8,1,2,1,7]",
"7"
],
[
"[8191]",
"19"
],
[
"[8191, 123456, 127, 7]",
"19"
],
[
"[127, 97, 8192]",
"10"
]
] |
[] |
me(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
maxx = 0
i = 0
while i < len(lst):
if(lst[i] > maxx and isPrime(lst[i])):
maxx = lst[i]
i+=1
result = sum(int(digit) fo
|
r digit in str(maxx))
return result
|
python
|
You are given a list of integers.
You need to find the largest prime value and return the sum of its digits.
|
[] |
def skjkasdkd(lst):
"""You are given a list of integers.
You need to find the largest prime value and return the sum of its digits.
"""
def isPri
|
[
[
"[0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3]",
"10"
],
[
"[1,0,1,8,2,4597,2,1,3,40,1,2,1,2,4,2,5,1]",
"25"
],
[
"[1,3,1,32,5107,34,83278,109,163,23,2323,32,30,1,9,3]",
"13"
],
[
"[0,724,32,71,99,32,6,0,5,91,83,0,5,6]",
"11"
],
[
"[0,81,12,3,1,21]",
"3"
],
[
"[0,8,1,2,1,7]",
"7"
]
] |
RandomSpanInfilling/HumanEval/94/1
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
skjkasdkd
|
[
[
"[0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3]",
"10"
],
[
"[1,0,1,8,2,4597,2,1,3,40,1,2,1,2,4,2,5,1]",
"25"
],
[
"[1,3,1,32,5107,34,83278,109,163,23,2323,32,30,1,9,3]",
"13"
],
[
"[0,724,32,71,99,32,6,0,5,91,83,0,5,6]",
"11"
],
[
"[0,81,12,3,1,21]",
"3"
],
[
"[0,8,1,2,1,7]",
"7"
],
[
"[8191]",
"19"
],
[
"[8191, 123456, 127, 7]",
"19"
],
[
"[127, 97, 8192]",
"10"
]
] |
[] |
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
maxx = 0
i = 0
while i < len(lst):
if(lst[i] > maxx and isPrime(lst[i])):
maxx = lst[i]
i+=1
result = sum(int(digit) for digit in str(maxx))
return res
|
ult
|
python
|
You are given a list of integers.
You need to find the largest prime value and return the sum of its digits.
|
[] |
def skjkasdkd(lst):
"""You are given a list of integers.
You need to find the largest prime value and return the sum of its digits.
"""
|
[
[
"[0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3]",
"10"
],
[
"[1,0,1,8,2,4597,2,1,3,40,1,2,1,2,4,2,5,1]",
"25"
],
[
"[1,3,1,32,5107,34,83278,109,163,23,2323,32,30,1,9,3]",
"13"
],
[
"[0,724,32,71,99,32,6,0,5,91,83,0,5,6]",
"11"
],
[
"[0,81,12,3,1,21]",
"3"
],
[
"[0,8,1,2,1,7]",
"7"
]
] |
RandomSpanInfilling/HumanEval/94/2
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
skjkasdkd
|
[
[
"[0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3]",
"10"
],
[
"[1,0,1,8,2,4597,2,1,3,40,1,2,1,2,4,2,5,1]",
"25"
],
[
"[1,3,1,32,5107,34,83278,109,163,23,2323,32,30,1,9,3]",
"13"
],
[
"[0,724,32,71,99,32,6,0,5,91,83,0,5,6]",
"11"
],
[
"[0,81,12,3,1,21]",
"3"
],
[
"[0,8,1,2,1,7]",
"7"
],
[
"[8191]",
"19"
],
[
"[8191, 123456, 127, 7]",
"19"
],
[
"[127, 97, 8192]",
"10"
]
] |
[] |
t) for digit in str(maxx))
r
|
eturn result
|
python
|
You are given a list of integers.
You need to find the largest prime value and return the sum of its digits.
|
[] |
def skjkasdkd(lst):
"""You are given a list of integers.
You need to find the largest prime value and return the sum of its digits.
"""
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
maxx = 0
i = 0
while i < len(lst):
if(lst[i] > maxx and isPrime(lst[i])):
maxx = lst[i]
i+=1
result = sum(int(digi
|
[
[
"[0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3]",
"10"
],
[
"[1,0,1,8,2,4597,2,1,3,40,1,2,1,2,4,2,5,1]",
"25"
],
[
"[1,3,1,32,5107,34,83278,109,163,23,2323,32,30,1,9,3]",
"13"
],
[
"[0,724,32,71,99,32,6,0,5,91,83,0,5,6]",
"11"
],
[
"[0,81,12,3,1,21]",
"3"
],
[
"[0,8,1,2,1,7]",
"7"
]
] |
RandomSpanInfilling/HumanEval/94/3
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
skjkasdkd
|
[
[
"[0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3]",
"10"
],
[
"[1,0,1,8,2,4597,2,1,3,40,1,2,1,2,4,2,5,1]",
"25"
],
[
"[1,3,1,32,5107,34,83278,109,163,23,2323,32,30,1,9,3]",
"13"
],
[
"[0,724,32,71,99,32,6,0,5,91,83,0,5,6]",
"11"
],
[
"[0,81,12,3,1,21]",
"3"
],
[
"[0,8,1,2,1,7]",
"7"
],
[
"[8191]",
"19"
],
[
"[8191, 123456, 127, 7]",
"19"
],
[
"[127, 97, 8192]",
"10"
]
] |
[] |
ge(2,int(n**0.5)+1):
if n%i==0:
return False
return True
maxx = 0
i = 0
while i < len(lst):
if(lst[i] > maxx and isPrime(lst[i])):
maxx = lst[i]
i+=1
result = sum(int(digit) for digit in str(maxx)
|
)
return result
|
python
|
You are given a list of integers.
You need to find the largest prime value and return the sum of its digits.
|
[] |
def skjkasdkd(lst):
"""You are given a list of integers.
You need to find the largest prime value and return the sum of its digits.
"""
def isPrime(n):
for i in ran
|
[
[
"[0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3]",
"10"
],
[
"[1,0,1,8,2,4597,2,1,3,40,1,2,1,2,4,2,5,1]",
"25"
],
[
"[1,3,1,32,5107,34,83278,109,163,23,2323,32,30,1,9,3]",
"13"
],
[
"[0,724,32,71,99,32,6,0,5,91,83,0,5,6]",
"11"
],
[
"[0,81,12,3,1,21]",
"3"
],
[
"[0,8,1,2,1,7]",
"7"
]
] |
RandomSpanInfilling/HumanEval/94/4
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
skjkasdkd
|
[
[
"[0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3]",
"10"
],
[
"[1,0,1,8,2,4597,2,1,3,40,1,2,1,2,4,2,5,1]",
"25"
],
[
"[1,3,1,32,5107,34,83278,109,163,23,2323,32,30,1,9,3]",
"13"
],
[
"[0,724,32,71,99,32,6,0,5,91,83,0,5,6]",
"11"
],
[
"[0,81,12,3,1,21]",
"3"
],
[
"[0,8,1,2,1,7]",
"7"
],
[
"[8191]",
"19"
],
[
"[8191, 123456, 127, 7]",
"19"
],
[
"[127, 97, 8192]",
"10"
]
] |
[] |
se
return True
maxx = 0
i = 0
while i < len(lst):
if(lst[i] > maxx and isPrime(lst[i])):
maxx = lst[i]
i+=1
result = sum(int(digit) for digit in str(max
|
x))
return result
|
python
|
You are given a list of integers.
You need to find the largest prime value and return the sum of its digits.
|
[] |
def skjkasdkd(lst):
"""You are given a list of integers.
You need to find the largest prime value and return the sum of its digits.
"""
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return Fal
|
[
[
"[0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3]",
"10"
],
[
"[1,0,1,8,2,4597,2,1,3,40,1,2,1,2,4,2,5,1]",
"25"
],
[
"[1,3,1,32,5107,34,83278,109,163,23,2323,32,30,1,9,3]",
"13"
],
[
"[0,724,32,71,99,32,6,0,5,91,83,0,5,6]",
"11"
],
[
"[0,81,12,3,1,21]",
"3"
],
[
"[0,8,1,2,1,7]",
"7"
]
] |
RandomSpanInfilling/HumanEval/94/5
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
skjkasdkd
|
[
[
"[0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3]",
"10"
],
[
"[1,0,1,8,2,4597,2,1,3,40,1,2,1,2,4,2,5,1]",
"25"
],
[
"[1,3,1,32,5107,34,83278,109,163,23,2323,32,30,1,9,3]",
"13"
],
[
"[0,724,32,71,99,32,6,0,5,91,83,0,5,6]",
"11"
],
[
"[0,81,12,3,1,21]",
"3"
],
[
"[0,8,1,2,1,7]",
"7"
],
[
"[8191]",
"19"
],
[
"[8191, 123456, 127, 7]",
"19"
],
[
"[127, 97, 8192]",
"10"
]
] |
[] |
me(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
maxx = 0
i = 0
while i < len(lst):
if(lst[i] > maxx and isPrime(lst[i])):
|
maxx = lst[i]
i+=1
result = sum(int(digit) for digit in str(maxx))
return result
|
python
|
You are given a list of integers.
You need to find the largest prime value and return the sum of its digits.
|
[] |
def skjkasdkd(lst):
"""You are given a list of integers.
You need to find the largest prime value and return the sum of its digits.
"""
def isPri
|
[
[
"[0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3]",
"10"
],
[
"[1,0,1,8,2,4597,2,1,3,40,1,2,1,2,4,2,5,1]",
"25"
],
[
"[1,3,1,32,5107,34,83278,109,163,23,2323,32,30,1,9,3]",
"13"
],
[
"[0,724,32,71,99,32,6,0,5,91,83,0,5,6]",
"11"
],
[
"[0,81,12,3,1,21]",
"3"
],
[
"[0,8,1,2,1,7]",
"7"
]
] |
RandomSpanInfilling/HumanEval/94/6
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
skjkasdkd
|
[
[
"[0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3]",
"10"
],
[
"[1,0,1,8,2,4597,2,1,3,40,1,2,1,2,4,2,5,1]",
"25"
],
[
"[1,3,1,32,5107,34,83278,109,163,23,2323,32,30,1,9,3]",
"13"
],
[
"[0,724,32,71,99,32,6,0,5,91,83,0,5,6]",
"11"
],
[
"[0,81,12,3,1,21]",
"3"
],
[
"[0,8,1,2,1,7]",
"7"
],
[
"[8191]",
"19"
],
[
"[8191, 123456, 127, 7]",
"19"
],
[
"[127, 97, 8192]",
"10"
]
] |
[] |
return False
return
|
True
maxx = 0
i = 0
while i < len(lst):
if(lst[i] > maxx and isPrime(lst[i])):
maxx = lst[i]
i+=1
result = sum(int(digit) for digit in str(maxx))
return result
|
python
|
You are given a list of integers.
You need to find the largest prime value and return the sum of its digits.
|
[] |
def skjkasdkd(lst):
"""You are given a list of integers.
You need to find the largest prime value and return the sum of its digits.
"""
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
|
[
[
"[0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3]",
"10"
],
[
"[1,0,1,8,2,4597,2,1,3,40,1,2,1,2,4,2,5,1]",
"25"
],
[
"[1,3,1,32,5107,34,83278,109,163,23,2323,32,30,1,9,3]",
"13"
],
[
"[0,724,32,71,99,32,6,0,5,91,83,0,5,6]",
"11"
],
[
"[0,81,12,3,1,21]",
"3"
],
[
"[0,8,1,2,1,7]",
"7"
]
] |
RandomSpanInfilling/HumanEval/94/7
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
skjkasdkd
|
[
[
"[0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3]",
"10"
],
[
"[1,0,1,8,2,4597,2,1,3,40,1,2,1,2,4,2,5,1]",
"25"
],
[
"[1,3,1,32,5107,34,83278,109,163,23,2323,32,30,1,9,3]",
"13"
],
[
"[0,724,32,71,99,32,6,0,5,91,83,0,5,6]",
"11"
],
[
"[0,81,12,3,1,21]",
"3"
],
[
"[0,8,1,2,1,7]",
"7"
],
[
"[8191]",
"19"
],
[
"[8191, 123456, 127, 7]",
"19"
],
[
"[127, 97, 8192]",
"10"
]
] |
[] |
maxx = lst[i]
i+=1
result = sum(int(digit) for digit in str(maxx))
re
|
turn result
|
python
|
You are given a list of integers.
You need to find the largest prime value and return the sum of its digits.
|
[] |
def skjkasdkd(lst):
"""You are given a list of integers.
You need to find the largest prime value and return the sum of its digits.
"""
def isPrime(n):
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
maxx = 0
i = 0
while i < len(lst):
if(lst[i] > maxx and isPrime(lst[i])):
|
[
[
"[0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3]",
"10"
],
[
"[1,0,1,8,2,4597,2,1,3,40,1,2,1,2,4,2,5,1]",
"25"
],
[
"[1,3,1,32,5107,34,83278,109,163,23,2323,32,30,1,9,3]",
"13"
],
[
"[0,724,32,71,99,32,6,0,5,91,83,0,5,6]",
"11"
],
[
"[0,81,12,3,1,21]",
"3"
],
[
"[0,8,1,2,1,7]",
"7"
]
] |
RandomSpanInfilling/HumanEval/94/8
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
skjkasdkd
|
[
[
"[0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3]",
"10"
],
[
"[1,0,1,8,2,4597,2,1,3,40,1,2,1,2,4,2,5,1]",
"25"
],
[
"[1,3,1,32,5107,34,83278,109,163,23,2323,32,30,1,9,3]",
"13"
],
[
"[0,724,32,71,99,32,6,0,5,91,83,0,5,6]",
"11"
],
[
"[0,81,12,3,1,21]",
"3"
],
[
"[0,8,1,2,1,7]",
"7"
],
[
"[8191]",
"19"
],
[
"[8191, 123456, 127, 7]",
"19"
],
[
"[127, 97, 8192]",
"10"
]
] |
[] |
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
maxx =
|
0
i = 0
while i < len(lst):
if(lst[i] > maxx and isPrime(lst[i])):
maxx = lst[i]
i+=1
result = sum(int(digit) for digit in str(maxx))
return result
|
python
|
You are given a list of integers.
You need to find the largest prime value and return the sum of its digits.
|
[] |
def skjkasdkd(lst):
"""You are given a list of integers.
You need to find the largest prime value and return the sum of its digits.
"""
def isPrime(n):
|
[
[
"[0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3]",
"10"
],
[
"[1,0,1,8,2,4597,2,1,3,40,1,2,1,2,4,2,5,1]",
"25"
],
[
"[1,3,1,32,5107,34,83278,109,163,23,2323,32,30,1,9,3]",
"13"
],
[
"[0,724,32,71,99,32,6,0,5,91,83,0,5,6]",
"11"
],
[
"[0,81,12,3,1,21]",
"3"
],
[
"[0,8,1,2,1,7]",
"7"
]
] |
RandomSpanInfilling/HumanEval/94/9
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
skjkasdkd
|
[
[
"[0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3]",
"10"
],
[
"[1,0,1,8,2,4597,2,1,3,40,1,2,1,2,4,2,5,1]",
"25"
],
[
"[1,3,1,32,5107,34,83278,109,163,23,2323,32,30,1,9,3]",
"13"
],
[
"[0,724,32,71,99,32,6,0,5,91,83,0,5,6]",
"11"
],
[
"[0,81,12,3,1,21]",
"3"
],
[
"[0,8,1,2,1,7]",
"7"
],
[
"[8191]",
"19"
],
[
"[8191, 123456, 127, 7]",
"19"
],
[
"[127, 97, 8192]",
"10"
]
] |
[] |
if n%i==0:
return False
return True
maxx = 0
i = 0
w
|
hile i < len(lst):
if(lst[i] > maxx and isPrime(lst[i])):
maxx = lst[i]
i+=1
result = sum(int(digit) for digit in str(maxx))
return result
|
python
|
You are given a list of integers.
You need to find the largest prime value and return the sum of its digits.
|
[] |
def skjkasdkd(lst):
"""You are given a list of integers.
You need to find the largest prime value and return the sum of its digits.
"""
def isPrime(n):
for i in range(2,int(n**0.5)+1):
|
[
[
"[0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3]",
"10"
],
[
"[1,0,1,8,2,4597,2,1,3,40,1,2,1,2,4,2,5,1]",
"25"
],
[
"[1,3,1,32,5107,34,83278,109,163,23,2323,32,30,1,9,3]",
"13"
],
[
"[0,724,32,71,99,32,6,0,5,91,83,0,5,6]",
"11"
],
[
"[0,81,12,3,1,21]",
"3"
],
[
"[0,8,1,2,1,7]",
"7"
]
] |
RandomSpanInfilling/HumanEval/94/10
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
skjkasdkd
|
[
[
"{\"p\":\"pineapple\", \"b\":\"banana\"}",
"True"
],
[
"{\"p\":\"pineapple\", \"A\":\"banana\", \"B\":\"banana\"}",
"False"
],
[
"{\"p\":\"pineapple\", 5:\"banana\", \"a\":\"apple\"}",
"False"
],
[
"{\"Name\":\"John\", \"Age\":\"36\", \"City\":\"Houston\"}",
"False"
],
[
"{\"STATE\":\"NC\", \"ZIP\":\"12345\" }",
"True"
],
[
"{\"fruit\":\"Orange\", \"taste\":\"Sweet\" }",
"True"
],
[
"{}",
"False"
]
] |
[] |
if state == "start":
|
if key.isupper():
state = "upper"
elif key.islower():
state = "lower"
else:
break
elif (state == "upper" and not key.isupper()) or (state == "lower" and not key.islower()):
state = "mixed"
break
else:
break
return state == "upper" or state == "lower"
|
python
|
Given a dictionary, return True if all keys are strings in lower
case or all keys are strings in upper case, else return False.
The function should return False is the given dictionary is empty.
|
[] |
def check_dict_case(dict):
"""
Given a dictionary, return True if all keys are strings in lower
case or all keys are strings in upper case, else return False.
The function should return False is the given dictionary is empty.
"""
if len(dict.keys()) == 0:
return False
else:
state = "start"
for key in dict.keys():
if isinstance(key, str) == False:
state = "mixed"
break
|
[
[
"{\"a\":\"apple\", \"b\":\"banana\"}",
"True"
],
[
"{\"a\":\"apple\", \"A\":\"banana\", \"B\":\"banana\"}",
"True"
],
[
"{\"a\":\"apple\", 8:\"banana\", \"a\":\"apple\"}",
"False"
],
[
"{\"Name\":\"John\", \"Age\":\"36\", \"City\":\"Houston\"}",
"False"
],
[
"{\"STATE\":\"NC\", \"ZIP\":\"12345\" }",
"True"
]
] |
RandomSpanInfilling/HumanEval/95/1
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
check_dict_case
|
[
[
"{\"p\":\"pineapple\", \"b\":\"banana\"}",
"True"
],
[
"{\"p\":\"pineapple\", \"A\":\"banana\", \"B\":\"banana\"}",
"False"
],
[
"{\"p\":\"pineapple\", 5:\"banana\", \"a\":\"apple\"}",
"False"
],
[
"{\"Name\":\"John\", \"Age\":\"36\", \"City\":\"Houston\"}",
"False"
],
[
"{\"STATE\":\"NC\", \"ZIP\":\"12345\" }",
"True"
],
[
"{\"fruit\":\"Orange\", \"taste\":\"Sweet\" }",
"True"
],
[
"{}",
"False"
]
] |
[] |
break
|
elif (state == "upper" and not key.isupper()) or (state == "lower" and not key.islower()):
state = "mixed"
break
else:
break
return state == "upper" or state == "lower"
|
python
|
Given a dictionary, return True if all keys are strings in lower
case or all keys are strings in upper case, else return False.
The function should return False is the given dictionary is empty.
|
[] |
def check_dict_case(dict):
"""
Given a dictionary, return True if all keys are strings in lower
case or all keys are strings in upper case, else return False.
The function should return False is the given dictionary is empty.
"""
if len(dict.keys()) == 0:
return False
else:
state = "start"
for key in dict.keys():
if isinstance(key, str) == False:
state = "mixed"
break
if state == "start":
if key.isupper():
state = "upper"
elif key.islower():
state = "lower"
else:
|
[
[
"{\"a\":\"apple\", \"b\":\"banana\"}",
"True"
],
[
"{\"a\":\"apple\", \"A\":\"banana\", \"B\":\"banana\"}",
"True"
],
[
"{\"a\":\"apple\", 8:\"banana\", \"a\":\"apple\"}",
"False"
],
[
"{\"Name\":\"John\", \"Age\":\"36\", \"City\":\"Houston\"}",
"False"
],
[
"{\"STATE\":\"NC\", \"ZIP\":\"12345\" }",
"True"
]
] |
RandomSpanInfilling/HumanEval/95/2
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
check_dict_case
|
[
[
"{\"p\":\"pineapple\", \"b\":\"banana\"}",
"True"
],
[
"{\"p\":\"pineapple\", \"A\":\"banana\", \"B\":\"banana\"}",
"False"
],
[
"{\"p\":\"pineapple\", 5:\"banana\", \"a\":\"apple\"}",
"False"
],
[
"{\"Name\":\"John\", \"Age\":\"36\", \"City\":\"Houston\"}",
"False"
],
[
"{\"STATE\":\"NC\", \"ZIP\":\"12345\" }",
"True"
],
[
"{\"fruit\":\"Orange\", \"taste\":\"Sweet\" }",
"True"
],
[
"{}",
"False"
]
] |
[] |
state == "upper" and not key.isupper()) or (state == "lower" and not key.islower()):
state = "mixed"
break
else:
break
return state == "uppe
|
r" or state == "lower"
|
python
|
Given a dictionary, return True if all keys are strings in lower
case or all keys are strings in upper case, else return False.
The function should return False is the given dictionary is empty.
|
[] |
def check_dict_case(dict):
"""
Given a dictionary, return True if all keys are strings in lower
case or all keys are strings in upper case, else return False.
The function should return False is the given dictionary is empty.
"""
if len(dict.keys()) == 0:
return False
else:
state = "start"
for key in dict.keys():
if isinstance(key, str) == False:
state = "mixed"
break
if state == "start":
if key.isupper():
state = "upper"
elif key.islower():
state = "lower"
else:
break
elif (
|
[
[
"{\"a\":\"apple\", \"b\":\"banana\"}",
"True"
],
[
"{\"a\":\"apple\", \"A\":\"banana\", \"B\":\"banana\"}",
"True"
],
[
"{\"a\":\"apple\", 8:\"banana\", \"a\":\"apple\"}",
"False"
],
[
"{\"Name\":\"John\", \"Age\":\"36\", \"City\":\"Houston\"}",
"False"
],
[
"{\"STATE\":\"NC\", \"ZIP\":\"12345\" }",
"True"
]
] |
RandomSpanInfilling/HumanEval/95/3
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
check_dict_case
|
[
[
"{\"p\":\"pineapple\", \"b\":\"banana\"}",
"True"
],
[
"{\"p\":\"pineapple\", \"A\":\"banana\", \"B\":\"banana\"}",
"False"
],
[
"{\"p\":\"pineapple\", 5:\"banana\", \"a\":\"apple\"}",
"False"
],
[
"{\"Name\":\"John\", \"Age\":\"36\", \"City\":\"Houston\"}",
"False"
],
[
"{\"STATE\":\"NC\", \"ZIP\":\"12345\" }",
"True"
],
[
"{\"fruit\":\"Orange\", \"taste\":\"Sweet\" }",
"True"
],
[
"{}",
"False"
]
] |
[] |
state = "upper"
elif key.islower():
state = "lower"
else:
break
elif (state == "upper" and not key.isupper()) or (state == "lower" and not key.islower()):
state = "mixed"
break
else:
break
return state == "upper" or state == "lower"
|
python
|
Given a dictionary, return True if all keys are strings in lower
case or all keys are strings in upper case, else return False.
The function should return False is the given dictionary is empty.
|
[] |
def check_dict_case(dict):
"""
Given a dictionary, return True if all keys are strings in lower
case or all keys are strings in upper case, else return False.
The function should return False is the given dictionary is empty.
"""
if len(dict.keys()) == 0:
return False
else:
state = "start"
for key in dict.keys():
if isinstance(key, str) == False:
state = "mixed"
break
if state == "start":
if key.isupper():
|
[
[
"{\"a\":\"apple\", \"b\":\"banana\"}",
"True"
],
[
"{\"a\":\"apple\", \"A\":\"banana\", \"B\":\"banana\"}",
"True"
],
[
"{\"a\":\"apple\", 8:\"banana\", \"a\":\"apple\"}",
"False"
],
[
"{\"Name\":\"John\", \"Age\":\"36\", \"City\":\"Houston\"}",
"False"
],
[
"{\"STATE\":\"NC\", \"ZIP\":\"12345\" }",
"True"
]
] |
RandomSpanInfilling/HumanEval/95/4
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
check_dict_case
|
|
[
[
"{\"p\":\"pineapple\", \"b\":\"banana\"}",
"True"
],
[
"{\"p\":\"pineapple\", \"A\":\"banana\", \"B\":\"banana\"}",
"False"
],
[
"{\"p\":\"pineapple\", 5:\"banana\", \"a\":\"apple\"}",
"False"
],
[
"{\"Name\":\"John\", \"Age\":\"36\", \"City\":\"Houston\"}",
"False"
],
[
"{\"STATE\":\"NC\", \"ZIP\":\"12345\" }",
"True"
],
[
"{\"fruit\":\"Orange\", \"taste\":\"Sweet\" }",
"True"
],
[
"{}",
"False"
]
] |
[] |
state = "upper"
elif key.islower():
state = "lower"
|
else:
break
elif (state == "upper" and not key.isupper()) or (state == "lower" and not key.islower()):
state = "mixed"
break
else:
break
return state == "upper" or state == "lower"
|
python
|
Given a dictionary, return True if all keys are strings in lower
case or all keys are strings in upper case, else return False.
The function should return False is the given dictionary is empty.
|
[] |
def check_dict_case(dict):
"""
Given a dictionary, return True if all keys are strings in lower
case or all keys are strings in upper case, else return False.
The function should return False is the given dictionary is empty.
"""
if len(dict.keys()) == 0:
return False
else:
state = "start"
for key in dict.keys():
if isinstance(key, str) == False:
state = "mixed"
break
if state == "start":
if key.isupper():
|
[
[
"{\"a\":\"apple\", \"b\":\"banana\"}",
"True"
],
[
"{\"a\":\"apple\", \"A\":\"banana\", \"B\":\"banana\"}",
"True"
],
[
"{\"a\":\"apple\", 8:\"banana\", \"a\":\"apple\"}",
"False"
],
[
"{\"Name\":\"John\", \"Age\":\"36\", \"City\":\"Houston\"}",
"False"
],
[
"{\"STATE\":\"NC\", \"ZIP\":\"12345\" }",
"True"
]
] |
RandomSpanInfilling/HumanEval/95/5
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
check_dict_case
|
[
[
"{\"p\":\"pineapple\", \"b\":\"banana\"}",
"True"
],
[
"{\"p\":\"pineapple\", \"A\":\"banana\", \"B\":\"banana\"}",
"False"
],
[
"{\"p\":\"pineapple\", 5:\"banana\", \"a\":\"apple\"}",
"False"
],
[
"{\"Name\":\"John\", \"Age\":\"36\", \"City\":\"Houston\"}",
"False"
],
[
"{\"STATE\":\"NC\", \"ZIP\":\"12345\" }",
"True"
],
[
"{\"fruit\":\"Orange\", \"taste\":\"Sweet\" }",
"True"
],
[
"{}",
"False"
]
] |
[] |
n(dict.keys()) == 0:
return False
else:
state = "start"
for key in dict.keys():
if isinstance(key, str) == False:
state = "mixed"
break
if state == "start":
if key.isupper():
state = "upper"
elif key.islower():
state = "lower"
else:
break
elif (state == "upper" and not key.isupper()) or (state == "lower" and not key.islower()):
state = "mixed"
break
else:
|
break
return state == "upper" or state == "lower"
|
python
|
Given a dictionary, return True if all keys are strings in lower
case or all keys are strings in upper case, else return False.
The function should return False is the given dictionary is empty.
|
[] |
def check_dict_case(dict):
"""
Given a dictionary, return True if all keys are strings in lower
case or all keys are strings in upper case, else return False.
The function should return False is the given dictionary is empty.
"""
if le
|
[
[
"{\"a\":\"apple\", \"b\":\"banana\"}",
"True"
],
[
"{\"a\":\"apple\", \"A\":\"banana\", \"B\":\"banana\"}",
"True"
],
[
"{\"a\":\"apple\", 8:\"banana\", \"a\":\"apple\"}",
"False"
],
[
"{\"Name\":\"John\", \"Age\":\"36\", \"City\":\"Houston\"}",
"False"
],
[
"{\"STATE\":\"NC\", \"ZIP\":\"12345\" }",
"True"
]
] |
RandomSpanInfilling/HumanEval/95/6
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
check_dict_case
|
[
[
"{\"p\":\"pineapple\", \"b\":\"banana\"}",
"True"
],
[
"{\"p\":\"pineapple\", \"A\":\"banana\", \"B\":\"banana\"}",
"False"
],
[
"{\"p\":\"pineapple\", 5:\"banana\", \"a\":\"apple\"}",
"False"
],
[
"{\"Name\":\"John\", \"Age\":\"36\", \"City\":\"Houston\"}",
"False"
],
[
"{\"STATE\":\"NC\", \"ZIP\":\"12345\" }",
"True"
],
[
"{\"fruit\":\"Orange\", \"taste\":\"Sweet\" }",
"True"
],
[
"{}",
"False"
]
] |
[] |
key.isupper():
state = "upper"
elif key.islower():
state = "lower"
else:
break
elif (state == "upper" and not key.isupper()) or (state == "lower" and not key.islower()):
state = "mixed"
|
break
else:
break
return state == "upper" or state == "lower"
|
python
|
Given a dictionary, return True if all keys are strings in lower
case or all keys are strings in upper case, else return False.
The function should return False is the given dictionary is empty.
|
[] |
def check_dict_case(dict):
"""
Given a dictionary, return True if all keys are strings in lower
case or all keys are strings in upper case, else return False.
The function should return False is the given dictionary is empty.
"""
if len(dict.keys()) == 0:
return False
else:
state = "start"
for key in dict.keys():
if isinstance(key, str) == False:
state = "mixed"
break
if state == "start":
if
|
[
[
"{\"a\":\"apple\", \"b\":\"banana\"}",
"True"
],
[
"{\"a\":\"apple\", \"A\":\"banana\", \"B\":\"banana\"}",
"True"
],
[
"{\"a\":\"apple\", 8:\"banana\", \"a\":\"apple\"}",
"False"
],
[
"{\"Name\":\"John\", \"Age\":\"36\", \"City\":\"Houston\"}",
"False"
],
[
"{\"STATE\":\"NC\", \"ZIP\":\"12345\" }",
"True"
]
] |
RandomSpanInfilling/HumanEval/95/7
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
check_dict_case
|
[
[
"{\"p\":\"pineapple\", \"b\":\"banana\"}",
"True"
],
[
"{\"p\":\"pineapple\", \"A\":\"banana\", \"B\":\"banana\"}",
"False"
],
[
"{\"p\":\"pineapple\", 5:\"banana\", \"a\":\"apple\"}",
"False"
],
[
"{\"Name\":\"John\", \"Age\":\"36\", \"City\":\"Houston\"}",
"False"
],
[
"{\"STATE\":\"NC\", \"ZIP\":\"12345\" }",
"True"
],
[
"{\"fruit\":\"Orange\", \"taste\":\"Sweet\" }",
"True"
],
[
"{}",
"False"
]
] |
[] |
state = "lower"
else:
break
elif (state == "upper" and not key.isupper()) or (state == "lower" and not key.islower()):
state = "mixed"
brea
|
k
else:
break
return state == "upper" or state == "lower"
|
python
|
Given a dictionary, return True if all keys are strings in lower
case or all keys are strings in upper case, else return False.
The function should return False is the given dictionary is empty.
|
[] |
def check_dict_case(dict):
"""
Given a dictionary, return True if all keys are strings in lower
case or all keys are strings in upper case, else return False.
The function should return False is the given dictionary is empty.
"""
if len(dict.keys()) == 0:
return False
else:
state = "start"
for key in dict.keys():
if isinstance(key, str) == False:
state = "mixed"
break
if state == "start":
if key.isupper():
state = "upper"
elif key.islower():
|
[
[
"{\"a\":\"apple\", \"b\":\"banana\"}",
"True"
],
[
"{\"a\":\"apple\", \"A\":\"banana\", \"B\":\"banana\"}",
"True"
],
[
"{\"a\":\"apple\", 8:\"banana\", \"a\":\"apple\"}",
"False"
],
[
"{\"Name\":\"John\", \"Age\":\"36\", \"City\":\"Houston\"}",
"False"
],
[
"{\"STATE\":\"NC\", \"ZIP\":\"12345\" }",
"True"
]
] |
RandomSpanInfilling/HumanEval/95/8
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
check_dict_case
|
[
[
"{\"p\":\"pineapple\", \"b\":\"banana\"}",
"True"
],
[
"{\"p\":\"pineapple\", \"A\":\"banana\", \"B\":\"banana\"}",
"False"
],
[
"{\"p\":\"pineapple\", 5:\"banana\", \"a\":\"apple\"}",
"False"
],
[
"{\"Name\":\"John\", \"Age\":\"36\", \"City\":\"Houston\"}",
"False"
],
[
"{\"STATE\":\"NC\", \"ZIP\":\"12345\" }",
"True"
],
[
"{\"fruit\":\"Orange\", \"taste\":\"Sweet\" }",
"True"
],
[
"{}",
"False"
]
] |
[] |
isinstance(key, str) == False:
state = "mixed"
break
if state == "start":
|
if key.isupper():
state = "upper"
elif key.islower():
state = "lower"
else:
break
elif (state == "upper" and not key.isupper()) or (state == "lower" and not key.islower()):
state = "mixed"
break
else:
break
return state == "upper" or state == "lower"
|
python
|
Given a dictionary, return True if all keys are strings in lower
case or all keys are strings in upper case, else return False.
The function should return False is the given dictionary is empty.
|
[] |
def check_dict_case(dict):
"""
Given a dictionary, return True if all keys are strings in lower
case or all keys are strings in upper case, else return False.
The function should return False is the given dictionary is empty.
"""
if len(dict.keys()) == 0:
return False
else:
state = "start"
for key in dict.keys():
if
|
[
[
"{\"a\":\"apple\", \"b\":\"banana\"}",
"True"
],
[
"{\"a\":\"apple\", \"A\":\"banana\", \"B\":\"banana\"}",
"True"
],
[
"{\"a\":\"apple\", 8:\"banana\", \"a\":\"apple\"}",
"False"
],
[
"{\"Name\":\"John\", \"Age\":\"36\", \"City\":\"Houston\"}",
"False"
],
[
"{\"STATE\":\"NC\", \"ZIP\":\"12345\" }",
"True"
]
] |
RandomSpanInfilling/HumanEval/95/9
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
check_dict_case
|
[
[
"{\"p\":\"pineapple\", \"b\":\"banana\"}",
"True"
],
[
"{\"p\":\"pineapple\", \"A\":\"banana\", \"B\":\"banana\"}",
"False"
],
[
"{\"p\":\"pineapple\", 5:\"banana\", \"a\":\"apple\"}",
"False"
],
[
"{\"Name\":\"John\", \"Age\":\"36\", \"City\":\"Houston\"}",
"False"
],
[
"{\"STATE\":\"NC\", \"ZIP\":\"12345\" }",
"True"
],
[
"{\"fruit\":\"Orange\", \"taste\":\"Sweet\" }",
"True"
],
[
"{}",
"False"
]
] |
[] |
supper():
state = "upper"
elif key.islower():
state = "lower"
else:
break
elif (state == "upper" and not key.isupper()) or (state == "lower" and not key.islower()):
state = "mixed"
break
else:
break
return state == "upper" or s
|
tate == "lower"
|
python
|
Given a dictionary, return True if all keys are strings in lower
case or all keys are strings in upper case, else return False.
The function should return False is the given dictionary is empty.
|
[] |
def check_dict_case(dict):
"""
Given a dictionary, return True if all keys are strings in lower
case or all keys are strings in upper case, else return False.
The function should return False is the given dictionary is empty.
"""
if len(dict.keys()) == 0:
return False
else:
state = "start"
for key in dict.keys():
if isinstance(key, str) == False:
state = "mixed"
break
if state == "start":
if key.i
|
[
[
"{\"a\":\"apple\", \"b\":\"banana\"}",
"True"
],
[
"{\"a\":\"apple\", \"A\":\"banana\", \"B\":\"banana\"}",
"True"
],
[
"{\"a\":\"apple\", 8:\"banana\", \"a\":\"apple\"}",
"False"
],
[
"{\"Name\":\"John\", \"Age\":\"36\", \"City\":\"Houston\"}",
"False"
],
[
"{\"STATE\":\"NC\", \"ZIP\":\"12345\" }",
"True"
]
] |
RandomSpanInfilling/HumanEval/95/10
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
check_dict_case
|
[
[
"5",
"[2,3]"
],
[
"6",
"[2,3,5]"
],
[
"7",
"[2,3,5]"
],
[
"10",
"[2,3,5,7]"
],
[
"0",
"[]"
],
[
"22",
"[2,3,5,7,11,13,17,19]"
],
[
"1",
"[]"
],
[
"18",
"[2,3,5,7,11,13,17]"
],
[
"47",
"[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43]"
],
[
"101",
"[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]"
]
] |
[] |
primes = []
for i in range(2, n):
is_prime = True
for j in range(2, i):
if i % j == 0:
is_prime = False
break
if is_prime:
|
primes.append(i)
return primes
|
python
|
Implement a function that takes an non-negative integer and returns an array of the first n
integers that are prime numbers and less than n.
|
[] |
def count_up_to(n):
"""Implement a function that takes an non-negative integer and returns an array of the first n
integers that are prime numbers and less than n.
"""
|
[
[
"5",
"[2,3]"
],
[
"11",
"[2,3,5,7]"
],
[
"0",
"[]"
],
[
"20",
"[2,3,5,7,11,13,17,19]"
],
[
"1",
"[]"
],
[
"18",
"[2,3,5,7,11,13,17]"
]
] |
RandomSpanInfilling/HumanEval/96/1
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
count_up_to
|
[
[
"5",
"[2,3]"
],
[
"6",
"[2,3,5]"
],
[
"7",
"[2,3,5]"
],
[
"10",
"[2,3,5,7]"
],
[
"0",
"[]"
],
[
"22",
"[2,3,5,7,11,13,17,19]"
],
[
"1",
"[]"
],
[
"18",
"[2,3,5,7,11,13,17]"
],
[
"47",
"[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43]"
],
[
"101",
"[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]"
]
] |
[] |
me = Tr
|
ue
for j in range(2, i):
if i % j == 0:
is_prime = False
break
if is_prime:
primes.append(i)
return primes
|
python
|
Implement a function that takes an non-negative integer and returns an array of the first n
integers that are prime numbers and less than n.
|
[] |
def count_up_to(n):
"""Implement a function that takes an non-negative integer and returns an array of the first n
integers that are prime numbers and less than n.
"""
primes = []
for i in range(2, n):
is_pri
|
[
[
"5",
"[2,3]"
],
[
"11",
"[2,3,5,7]"
],
[
"0",
"[]"
],
[
"20",
"[2,3,5,7,11,13,17,19]"
],
[
"1",
"[]"
],
[
"18",
"[2,3,5,7,11,13,17]"
]
] |
RandomSpanInfilling/HumanEval/96/2
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
count_up_to
|
[
[
"5",
"[2,3]"
],
[
"6",
"[2,3,5]"
],
[
"7",
"[2,3,5]"
],
[
"10",
"[2,3,5,7]"
],
[
"0",
"[]"
],
[
"22",
"[2,3,5,7,11,13,17,19]"
],
[
"1",
"[]"
],
[
"18",
"[2,3,5,7,11,13,17]"
],
[
"47",
"[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43]"
],
[
"101",
"[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]"
]
] |
[] |
== 0:
is_prime = False
break
if is_prime:
|
primes.append(i)
return primes
|
python
|
Implement a function that takes an non-negative integer and returns an array of the first n
integers that are prime numbers and less than n.
|
[] |
def count_up_to(n):
"""Implement a function that takes an non-negative integer and returns an array of the first n
integers that are prime numbers and less than n.
"""
primes = []
for i in range(2, n):
is_prime = True
for j in range(2, i):
if i % j
|
[
[
"5",
"[2,3]"
],
[
"11",
"[2,3,5,7]"
],
[
"0",
"[]"
],
[
"20",
"[2,3,5,7,11,13,17,19]"
],
[
"1",
"[]"
],
[
"18",
"[2,3,5,7,11,13,17]"
]
] |
RandomSpanInfilling/HumanEval/96/3
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
count_up_to
|
[
[
"5",
"[2,3]"
],
[
"6",
"[2,3,5]"
],
[
"7",
"[2,3,5]"
],
[
"10",
"[2,3,5,7]"
],
[
"0",
"[]"
],
[
"22",
"[2,3,5,7,11,13,17,19]"
],
[
"1",
"[]"
],
[
"18",
"[2,3,5,7,11,13,17]"
],
[
"47",
"[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43]"
],
[
"101",
"[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]"
]
] |
[] |
n range(2, n):
is_prime = True
for j in range(2, i):
if i % j ==
|
0:
is_prime = False
break
if is_prime:
primes.append(i)
return primes
|
python
|
Implement a function that takes an non-negative integer and returns an array of the first n
integers that are prime numbers and less than n.
|
[] |
def count_up_to(n):
"""Implement a function that takes an non-negative integer and returns an array of the first n
integers that are prime numbers and less than n.
"""
primes = []
for i i
|
[
[
"5",
"[2,3]"
],
[
"11",
"[2,3,5,7]"
],
[
"0",
"[]"
],
[
"20",
"[2,3,5,7,11,13,17,19]"
],
[
"1",
"[]"
],
[
"18",
"[2,3,5,7,11,13,17]"
]
] |
RandomSpanInfilling/HumanEval/96/4
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
count_up_to
|
[
[
"5",
"[2,3]"
],
[
"6",
"[2,3,5]"
],
[
"7",
"[2,3,5]"
],
[
"10",
"[2,3,5,7]"
],
[
"0",
"[]"
],
[
"22",
"[2,3,5,7,11,13,17,19]"
],
[
"1",
"[]"
],
[
"18",
"[2,3,5,7,11,13,17]"
],
[
"47",
"[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43]"
],
[
"101",
"[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]"
]
] |
[] |
if i % j == 0:
is_prime = False
|
break
if is_prime:
primes.append(i)
return primes
|
python
|
Implement a function that takes an non-negative integer and returns an array of the first n
integers that are prime numbers and less than n.
|
[] |
def count_up_to(n):
"""Implement a function that takes an non-negative integer and returns an array of the first n
integers that are prime numbers and less than n.
"""
primes = []
for i in range(2, n):
is_prime = True
for j in range(2, i):
|
[
[
"5",
"[2,3]"
],
[
"11",
"[2,3,5,7]"
],
[
"0",
"[]"
],
[
"20",
"[2,3,5,7,11,13,17,19]"
],
[
"1",
"[]"
],
[
"18",
"[2,3,5,7,11,13,17]"
]
] |
RandomSpanInfilling/HumanEval/96/5
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
count_up_to
|
[
[
"5",
"[2,3]"
],
[
"6",
"[2,3,5]"
],
[
"7",
"[2,3,5]"
],
[
"10",
"[2,3,5,7]"
],
[
"0",
"[]"
],
[
"22",
"[2,3,5,7,11,13,17,19]"
],
[
"1",
"[]"
],
[
"18",
"[2,3,5,7,11,13,17]"
],
[
"47",
"[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43]"
],
[
"101",
"[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]"
]
] |
[] |
eak
if is_prime:
primes.append(i)
|
return primes
|
python
|
Implement a function that takes an non-negative integer and returns an array of the first n
integers that are prime numbers and less than n.
|
[] |
def count_up_to(n):
"""Implement a function that takes an non-negative integer and returns an array of the first n
integers that are prime numbers and less than n.
"""
primes = []
for i in range(2, n):
is_prime = True
for j in range(2, i):
if i % j == 0:
is_prime = False
br
|
[
[
"5",
"[2,3]"
],
[
"11",
"[2,3,5,7]"
],
[
"0",
"[]"
],
[
"20",
"[2,3,5,7,11,13,17,19]"
],
[
"1",
"[]"
],
[
"18",
"[2,3,5,7,11,13,17]"
]
] |
RandomSpanInfilling/HumanEval/96/6
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
count_up_to
|
[
[
"5",
"[2,3]"
],
[
"6",
"[2,3,5]"
],
[
"7",
"[2,3,5]"
],
[
"10",
"[2,3,5,7]"
],
[
"0",
"[]"
],
[
"22",
"[2,3,5,7,11,13,17,19]"
],
[
"1",
"[]"
],
[
"18",
"[2,3,5,7,11,13,17]"
],
[
"47",
"[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43]"
],
[
"101",
"[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]"
]
] |
[] |
break
if is_prime:
|
primes.append(i)
return primes
|
python
|
Implement a function that takes an non-negative integer and returns an array of the first n
integers that are prime numbers and less than n.
|
[] |
def count_up_to(n):
"""Implement a function that takes an non-negative integer and returns an array of the first n
integers that are prime numbers and less than n.
"""
primes = []
for i in range(2, n):
is_prime = True
for j in range(2, i):
if i % j == 0:
is_prime = False
|
[
[
"5",
"[2,3]"
],
[
"11",
"[2,3,5,7]"
],
[
"0",
"[]"
],
[
"20",
"[2,3,5,7,11,13,17,19]"
],
[
"1",
"[]"
],
[
"18",
"[2,3,5,7,11,13,17]"
]
] |
RandomSpanInfilling/HumanEval/96/7
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
count_up_to
|
[
[
"5",
"[2,3]"
],
[
"6",
"[2,3,5]"
],
[
"7",
"[2,3,5]"
],
[
"10",
"[2,3,5,7]"
],
[
"0",
"[]"
],
[
"22",
"[2,3,5,7,11,13,17,19]"
],
[
"1",
"[]"
],
[
"18",
"[2,3,5,7,11,13,17]"
],
[
"47",
"[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43]"
],
[
"101",
"[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]"
]
] |
[] |
is_prime = True
for j in range(2, i):
if i % j == 0:
is_prime = False
break
if is_prime:
primes.append(i)
return p
|
rimes
|
python
|
Implement a function that takes an non-negative integer and returns an array of the first n
integers that are prime numbers and less than n.
|
[] |
def count_up_to(n):
"""Implement a function that takes an non-negative integer and returns an array of the first n
integers that are prime numbers and less than n.
"""
primes = []
for i in range(2, n):
|
[
[
"5",
"[2,3]"
],
[
"11",
"[2,3,5,7]"
],
[
"0",
"[]"
],
[
"20",
"[2,3,5,7,11,13,17,19]"
],
[
"1",
"[]"
],
[
"18",
"[2,3,5,7,11,13,17]"
]
] |
RandomSpanInfilling/HumanEval/96/8
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
count_up_to
|
[
[
"5",
"[2,3]"
],
[
"6",
"[2,3,5]"
],
[
"7",
"[2,3,5]"
],
[
"10",
"[2,3,5,7]"
],
[
"0",
"[]"
],
[
"22",
"[2,3,5,7,11,13,17,19]"
],
[
"1",
"[]"
],
[
"18",
"[2,3,5,7,11,13,17]"
],
[
"47",
"[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43]"
],
[
"101",
"[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]"
]
] |
[] |
is_prime = True
for j in range(2, i):
if i % j ==
|
0:
is_prime = False
break
if is_prime:
primes.append(i)
return primes
|
python
|
Implement a function that takes an non-negative integer and returns an array of the first n
integers that are prime numbers and less than n.
|
[] |
def count_up_to(n):
"""Implement a function that takes an non-negative integer and returns an array of the first n
integers that are prime numbers and less than n.
"""
primes = []
for i in range(2, n):
|
[
[
"5",
"[2,3]"
],
[
"11",
"[2,3,5,7]"
],
[
"0",
"[]"
],
[
"20",
"[2,3,5,7,11,13,17,19]"
],
[
"1",
"[]"
],
[
"18",
"[2,3,5,7,11,13,17]"
]
] |
RandomSpanInfilling/HumanEval/96/9
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
count_up_to
|
[
[
"5",
"[2,3]"
],
[
"6",
"[2,3,5]"
],
[
"7",
"[2,3,5]"
],
[
"10",
"[2,3,5,7]"
],
[
"0",
"[]"
],
[
"22",
"[2,3,5,7,11,13,17,19]"
],
[
"1",
"[]"
],
[
"18",
"[2,3,5,7,11,13,17]"
],
[
"47",
"[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43]"
],
[
"101",
"[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]"
]
] |
[] |
ime = True
for j in range(2, i):
if i % j == 0:
is_prime = False
|
break
if is_prime:
primes.append(i)
return primes
|
python
|
Implement a function that takes an non-negative integer and returns an array of the first n
integers that are prime numbers and less than n.
|
[] |
def count_up_to(n):
"""Implement a function that takes an non-negative integer and returns an array of the first n
integers that are prime numbers and less than n.
"""
primes = []
for i in range(2, n):
is_pr
|
[
[
"5",
"[2,3]"
],
[
"11",
"[2,3,5,7]"
],
[
"0",
"[]"
],
[
"20",
"[2,3,5,7,11,13,17,19]"
],
[
"1",
"[]"
],
[
"18",
"[2,3,5,7,11,13,17]"
]
] |
RandomSpanInfilling/HumanEval/96/10
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
count_up_to
|
[
[
"148, 412",
"16"
],
[
"19, 28",
"72"
],
[
"2020, 1851",
"0"
],
[
"14, -15",
"20"
],
[
"76, 67",
"42"
],
[
"17, 27",
"49"
],
[
"0, 1",
"0"
],
[
"0, 0",
"0"
]
] |
[] |
eturn abs
|
(a % 10) * abs(b % 10)
|
python
|
Complete the function that takes two integers and returns
the product of their unit digits.
Assume the input is always valid.
|
[] |
def multiply(a, b):
"""Complete the function that takes two integers and returns
the product of their unit digits.
Assume the input is always valid.
"""
r
|
[
[
"148, 412",
"16"
],
[
"19, 28",
"72"
],
[
"2020, 1851",
"0"
],
[
"14, -15",
"20"
]
] |
RandomSpanInfilling/HumanEval/97/1
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
multiply
|
[
[
"148, 412",
"16"
],
[
"19, 28",
"72"
],
[
"2020, 1851",
"0"
],
[
"14, -15",
"20"
],
[
"76, 67",
"42"
],
[
"17, 27",
"49"
],
[
"0, 1",
"0"
],
[
"0, 0",
"0"
]
] |
[] |
s(a %
|
10) * abs(b % 10)
|
python
|
Complete the function that takes two integers and returns
the product of their unit digits.
Assume the input is always valid.
|
[] |
def multiply(a, b):
"""Complete the function that takes two integers and returns
the product of their unit digits.
Assume the input is always valid.
"""
return ab
|
[
[
"148, 412",
"16"
],
[
"19, 28",
"72"
],
[
"2020, 1851",
"0"
],
[
"14, -15",
"20"
]
] |
RandomSpanInfilling/HumanEval/97/2
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
multiply
|
[
[
"148, 412",
"16"
],
[
"19, 28",
"72"
],
[
"2020, 1851",
"0"
],
[
"14, -15",
"20"
],
[
"76, 67",
"42"
],
[
"17, 27",
"49"
],
[
"0, 1",
"0"
],
[
"0, 0",
"0"
]
] |
[] |
retu
|
rn abs(a % 10) * abs(b % 10)
|
python
|
Complete the function that takes two integers and returns
the product of their unit digits.
Assume the input is always valid.
|
[] |
def multiply(a, b):
"""Complete the function that takes two integers and returns
the product of their unit digits.
Assume the input is always valid.
"""
|
[
[
"148, 412",
"16"
],
[
"19, 28",
"72"
],
[
"2020, 1851",
"0"
],
[
"14, -15",
"20"
]
] |
RandomSpanInfilling/HumanEval/97/3
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
multiply
|
[
[
"148, 412",
"16"
],
[
"19, 28",
"72"
],
[
"2020, 1851",
"0"
],
[
"14, -15",
"20"
],
[
"76, 67",
"42"
],
[
"17, 27",
"49"
],
[
"0, 1",
"0"
],
[
"0, 0",
"0"
]
] |
[] |
10) * abs(b % 10)
|
python
|
Complete the function that takes two integers and returns
the product of their unit digits.
Assume the input is always valid.
|
[] |
def multiply(a, b):
"""Complete the function that takes two integers and returns
the product of their unit digits.
Assume the input is always valid.
"""
return abs(a %
|
[
[
"148, 412",
"16"
],
[
"19, 28",
"72"
],
[
"2020, 1851",
"0"
],
[
"14, -15",
"20"
]
] |
RandomSpanInfilling/HumanEval/97/4
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
multiply
|
|
[
[
"148, 412",
"16"
],
[
"19, 28",
"72"
],
[
"2020, 1851",
"0"
],
[
"14, -15",
"20"
],
[
"76, 67",
"42"
],
[
"17, 27",
"49"
],
[
"0, 1",
"0"
],
[
"0, 0",
"0"
]
] |
[] |
abs
|
(b % 10)
|
python
|
Complete the function that takes two integers and returns
the product of their unit digits.
Assume the input is always valid.
|
[] |
def multiply(a, b):
"""Complete the function that takes two integers and returns
the product of their unit digits.
Assume the input is always valid.
"""
return abs(a % 10) *
|
[
[
"148, 412",
"16"
],
[
"19, 28",
"72"
],
[
"2020, 1851",
"0"
],
[
"14, -15",
"20"
]
] |
RandomSpanInfilling/HumanEval/97/5
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
multiply
|
[
[
"148, 412",
"16"
],
[
"19, 28",
"72"
],
[
"2020, 1851",
"0"
],
[
"14, -15",
"20"
],
[
"76, 67",
"42"
],
[
"17, 27",
"49"
],
[
"0, 1",
"0"
],
[
"0, 0",
"0"
]
] |
[] |
return abs(a % 10) * abs(b % 1
|
0)
|
python
|
Complete the function that takes two integers and returns
the product of their unit digits.
Assume the input is always valid.
|
[] |
def multiply(a, b):
"""Complete the function that takes two integers and returns
the product of their unit digits.
Assume the input is always valid.
"""
|
[
[
"148, 412",
"16"
],
[
"19, 28",
"72"
],
[
"2020, 1851",
"0"
],
[
"14, -15",
"20"
]
] |
RandomSpanInfilling/HumanEval/97/6
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
multiply
|
[
[
"148, 412",
"16"
],
[
"19, 28",
"72"
],
[
"2020, 1851",
"0"
],
[
"14, -15",
"20"
],
[
"76, 67",
"42"
],
[
"17, 27",
"49"
],
[
"0, 1",
"0"
],
[
"0, 0",
"0"
]
] |
[] |
eturn abs(a % 10) * abs(b % 10)
|
python
|
Complete the function that takes two integers and returns
the product of their unit digits.
Assume the input is always valid.
|
[] |
def multiply(a, b):
"""Complete the function that takes two integers and returns
the product of their unit digits.
Assume the input is always valid.
"""
r
|
[
[
"148, 412",
"16"
],
[
"19, 28",
"72"
],
[
"2020, 1851",
"0"
],
[
"14, -15",
"20"
]
] |
RandomSpanInfilling/HumanEval/97/7
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
multiply
|
|
[
[
"148, 412",
"16"
],
[
"19, 28",
"72"
],
[
"2020, 1851",
"0"
],
[
"14, -15",
"20"
],
[
"76, 67",
"42"
],
[
"17, 27",
"49"
],
[
"0, 1",
"0"
],
[
"0, 0",
"0"
]
] |
[] |
return abs(a % 10) * abs(b %
|
10)
|
python
|
Complete the function that takes two integers and returns
the product of their unit digits.
Assume the input is always valid.
|
[] |
def multiply(a, b):
"""Complete the function that takes two integers and returns
the product of their unit digits.
Assume the input is always valid.
"""
|
[
[
"148, 412",
"16"
],
[
"19, 28",
"72"
],
[
"2020, 1851",
"0"
],
[
"14, -15",
"20"
]
] |
RandomSpanInfilling/HumanEval/97/8
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
multiply
|
[
[
"148, 412",
"16"
],
[
"19, 28",
"72"
],
[
"2020, 1851",
"0"
],
[
"14, -15",
"20"
],
[
"76, 67",
"42"
],
[
"17, 27",
"49"
],
[
"0, 1",
"0"
],
[
"0, 0",
"0"
]
] |
[] |
ab
|
s(a % 10) * abs(b % 10)
|
python
|
Complete the function that takes two integers and returns
the product of their unit digits.
Assume the input is always valid.
|
[] |
def multiply(a, b):
"""Complete the function that takes two integers and returns
the product of their unit digits.
Assume the input is always valid.
"""
return
|
[
[
"148, 412",
"16"
],
[
"19, 28",
"72"
],
[
"2020, 1851",
"0"
],
[
"14, -15",
"20"
]
] |
RandomSpanInfilling/HumanEval/97/9
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
multiply
|
[
[
"148, 412",
"16"
],
[
"19, 28",
"72"
],
[
"2020, 1851",
"0"
],
[
"14, -15",
"20"
],
[
"76, 67",
"42"
],
[
"17, 27",
"49"
],
[
"0, 1",
"0"
],
[
"0, 0",
"0"
]
] |
[] |
10)
|
* abs(b % 10)
|
python
|
Complete the function that takes two integers and returns
the product of their unit digits.
Assume the input is always valid.
|
[] |
def multiply(a, b):
"""Complete the function that takes two integers and returns
the product of their unit digits.
Assume the input is always valid.
"""
return abs(a %
|
[
[
"148, 412",
"16"
],
[
"19, 28",
"72"
],
[
"2020, 1851",
"0"
],
[
"14, -15",
"20"
]
] |
RandomSpanInfilling/HumanEval/97/10
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
multiply
|
[
[
"'aBCdEf'",
"1"
],
[
"'abcdefg'",
"0"
],
[
"'dBBE'",
"0"
],
[
"'B'",
"0"
],
[
"'U'",
"1"
],
[
"''",
"0"
],
[
"'EEEE'",
"2"
]
] |
[] |
2):
if s[i] in "AEIOU":
count += 1
|
return count
|
python
|
Given a string s, count the number of uppercase vowels in even indices.
|
[] |
def count_upper(s):
"""
Given a string s, count the number of uppercase vowels in even indices.
"""
count = 0
for i in range(0,len(s),
|
[
[
"'aBCdEf'",
"1"
],
[
"'abcdefg'",
"0"
],
[
"'dBBE'",
"0"
]
] |
RandomSpanInfilling/HumanEval/98/1
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
count_upper
|
[
[
"'aBCdEf'",
"1"
],
[
"'abcdefg'",
"0"
],
[
"'dBBE'",
"0"
],
[
"'B'",
"0"
],
[
"'U'",
"1"
],
[
"''",
"0"
],
[
"'EEEE'",
"2"
]
] |
[] |
if s[i] in "AEIOU":
co
|
unt += 1
return count
|
python
|
Given a string s, count the number of uppercase vowels in even indices.
|
[] |
def count_upper(s):
"""
Given a string s, count the number of uppercase vowels in even indices.
"""
count = 0
for i in range(0,len(s),2):
|
[
[
"'aBCdEf'",
"1"
],
[
"'abcdefg'",
"0"
],
[
"'dBBE'",
"0"
]
] |
RandomSpanInfilling/HumanEval/98/2
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
count_upper
|
[
[
"'aBCdEf'",
"1"
],
[
"'abcdefg'",
"0"
],
[
"'dBBE'",
"0"
],
[
"'B'",
"0"
],
[
"'U'",
"1"
],
[
"''",
"0"
],
[
"'EEEE'",
"2"
]
] |
[] |
ange(0,len(s),2):
if
|
s[i] in "AEIOU":
count += 1
return count
|
python
|
Given a string s, count the number of uppercase vowels in even indices.
|
[] |
def count_upper(s):
"""
Given a string s, count the number of uppercase vowels in even indices.
"""
count = 0
for i in r
|
[
[
"'aBCdEf'",
"1"
],
[
"'abcdefg'",
"0"
],
[
"'dBBE'",
"0"
]
] |
RandomSpanInfilling/HumanEval/98/3
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
count_upper
|
[
[
"'aBCdEf'",
"1"
],
[
"'abcdefg'",
"0"
],
[
"'dBBE'",
"0"
],
[
"'B'",
"0"
],
[
"'U'",
"1"
],
[
"''",
"0"
],
[
"'EEEE'",
"2"
]
] |
[] |
(s),2):
if s[i] in "AEIOU":
count +=
|
1
return count
|
python
|
Given a string s, count the number of uppercase vowels in even indices.
|
[] |
def count_upper(s):
"""
Given a string s, count the number of uppercase vowels in even indices.
"""
count = 0
for i in range(0,len
|
[
[
"'aBCdEf'",
"1"
],
[
"'abcdefg'",
"0"
],
[
"'dBBE'",
"0"
]
] |
RandomSpanInfilling/HumanEval/98/4
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
count_upper
|
[
[
"'aBCdEf'",
"1"
],
[
"'abcdefg'",
"0"
],
[
"'dBBE'",
"0"
],
[
"'B'",
"0"
],
[
"'U'",
"1"
],
[
"''",
"0"
],
[
"'EEEE'",
"2"
]
] |
[] |
f s[i] in "AEIOU":
count += 1
return co
|
unt
|
python
|
Given a string s, count the number of uppercase vowels in even indices.
|
[] |
def count_upper(s):
"""
Given a string s, count the number of uppercase vowels in even indices.
"""
count = 0
for i in range(0,len(s),2):
i
|
[
[
"'aBCdEf'",
"1"
],
[
"'abcdefg'",
"0"
],
[
"'dBBE'",
"0"
]
] |
RandomSpanInfilling/HumanEval/98/5
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
count_upper
|
[
[
"'aBCdEf'",
"1"
],
[
"'abcdefg'",
"0"
],
[
"'dBBE'",
"0"
],
[
"'B'",
"0"
],
[
"'U'",
"1"
],
[
"''",
"0"
],
[
"'EEEE'",
"2"
]
] |
[] |
2):
|
if s[i] in "AEIOU":
count += 1
return count
|
python
|
Given a string s, count the number of uppercase vowels in even indices.
|
[] |
def count_upper(s):
"""
Given a string s, count the number of uppercase vowels in even indices.
"""
count = 0
for i in range(0,len(s),
|
[
[
"'aBCdEf'",
"1"
],
[
"'abcdefg'",
"0"
],
[
"'dBBE'",
"0"
]
] |
RandomSpanInfilling/HumanEval/98/6
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
count_upper
|
[
[
"'aBCdEf'",
"1"
],
[
"'abcdefg'",
"0"
],
[
"'dBBE'",
"0"
],
[
"'B'",
"0"
],
[
"'U'",
"1"
],
[
"''",
"0"
],
[
"'EEEE'",
"2"
]
] |
[] |
i in range(0,len(s),2
|
):
if s[i] in "AEIOU":
count += 1
return count
|
python
|
Given a string s, count the number of uppercase vowels in even indices.
|
[] |
def count_upper(s):
"""
Given a string s, count the number of uppercase vowels in even indices.
"""
count = 0
for
|
[
[
"'aBCdEf'",
"1"
],
[
"'abcdefg'",
"0"
],
[
"'dBBE'",
"0"
]
] |
RandomSpanInfilling/HumanEval/98/7
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
count_upper
|
[
[
"'aBCdEf'",
"1"
],
[
"'abcdefg'",
"0"
],
[
"'dBBE'",
"0"
],
[
"'B'",
"0"
],
[
"'U'",
"1"
],
[
"''",
"0"
],
[
"'EEEE'",
"2"
]
] |
[] |
n(s),2):
if s[i] in "AEIOU":
|
count += 1
return count
|
python
|
Given a string s, count the number of uppercase vowels in even indices.
|
[] |
def count_upper(s):
"""
Given a string s, count the number of uppercase vowels in even indices.
"""
count = 0
for i in range(0,le
|
[
[
"'aBCdEf'",
"1"
],
[
"'abcdefg'",
"0"
],
[
"'dBBE'",
"0"
]
] |
RandomSpanInfilling/HumanEval/98/8
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
count_upper
|
[
[
"'aBCdEf'",
"1"
],
[
"'abcdefg'",
"0"
],
[
"'dBBE'",
"0"
],
[
"'B'",
"0"
],
[
"'U'",
"1"
],
[
"''",
"0"
],
[
"'EEEE'",
"2"
]
] |
[] |
i in range(0,len(s),2)
|
:
if s[i] in "AEIOU":
count += 1
return count
|
python
|
Given a string s, count the number of uppercase vowels in even indices.
|
[] |
def count_upper(s):
"""
Given a string s, count the number of uppercase vowels in even indices.
"""
count = 0
for
|
[
[
"'aBCdEf'",
"1"
],
[
"'abcdefg'",
"0"
],
[
"'dBBE'",
"0"
]
] |
RandomSpanInfilling/HumanEval/98/9
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
count_upper
|
[
[
"'aBCdEf'",
"1"
],
[
"'abcdefg'",
"0"
],
[
"'dBBE'",
"0"
],
[
"'B'",
"0"
],
[
"'U'",
"1"
],
[
"''",
"0"
],
[
"'EEEE'",
"2"
]
] |
[] |
if s[i] in "AEIOU":
|
count += 1
return count
|
python
|
Given a string s, count the number of uppercase vowels in even indices.
|
[] |
def count_upper(s):
"""
Given a string s, count the number of uppercase vowels in even indices.
"""
count = 0
for i in range(0,len(s),2):
|
[
[
"'aBCdEf'",
"1"
],
[
"'abcdefg'",
"0"
],
[
"'dBBE'",
"0"
]
] |
RandomSpanInfilling/HumanEval/98/10
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
count_upper
|
[
[
"\"10\"",
"10"
],
[
"\"14.5\"",
"15"
],
[
"\"-15.5\"",
"-16"
],
[
"\"15.3\"",
"15"
],
[
"\"0\"",
"0"
]
] |
[] |
res = ceil(num)
else:
res = floor(num)
elif len(value) > 0:
res = int(round(num))
else:
res
|
= 0
return res
|
python
|
Create a function that takes a value (string) representing a number
and returns the closest integer to it. If the number is equidistant
from two integers, round it away from zero.
|
[] |
def closest_integer(value):
"""
Create a function that takes a value (string) representing a number
and returns the closest integer to it. If the number is equidistant
from two integers, round it away from zero.
"""
from math import floor, ceil
if value.count('.') == 1:
# remove trailing zeros
while (value[-1] == '0'):
value = value[:-1]
num = float(value)
if value[-2:] == '.5':
if num > 0:
|
[
[
"\"10\"",
"10"
],
[
"\"15.3\"",
"15"
]
] |
RandomSpanInfilling/HumanEval/99/1
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
closest_integer
|
[
[
"\"10\"",
"10"
],
[
"\"14.5\"",
"15"
],
[
"\"-15.5\"",
"-16"
],
[
"\"15.3\"",
"15"
],
[
"\"0\"",
"0"
]
] |
[] |
m math import floor, ceil
if value.count('.') == 1:
# remove trailing zeros
while (value[-1] == '0'):
value = value[:-1]
num = float(value)
if value[-2:] == '.5':
if num > 0:
res = ceil(num)
else:
res = floor(num)
elif len(value) > 0:
res = int(round(num))
else:
|
res = 0
return res
|
python
|
Create a function that takes a value (string) representing a number
and returns the closest integer to it. If the number is equidistant
from two integers, round it away from zero.
|
[] |
def closest_integer(value):
"""
Create a function that takes a value (string) representing a number
and returns the closest integer to it. If the number is equidistant
from two integers, round it away from zero.
"""
fro
|
[
[
"\"10\"",
"10"
],
[
"\"15.3\"",
"15"
]
] |
RandomSpanInfilling/HumanEval/99/2
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
closest_integer
|
[
[
"\"10\"",
"10"
],
[
"\"14.5\"",
"15"
],
[
"\"-15.5\"",
"-16"
],
[
"\"15.3\"",
"15"
],
[
"\"0\"",
"0"
]
] |
[] |
:
value = value[:-1]
num = float(value)
if value[-2:] == '.5':
if num > 0:
res = ceil(num)
else:
res = floor(num)
elif len(value) > 0:
res
|
= int(round(num))
else:
res = 0
return res
|
python
|
Create a function that takes a value (string) representing a number
and returns the closest integer to it. If the number is equidistant
from two integers, round it away from zero.
|
[] |
def closest_integer(value):
"""
Create a function that takes a value (string) representing a number
and returns the closest integer to it. If the number is equidistant
from two integers, round it away from zero.
"""
from math import floor, ceil
if value.count('.') == 1:
# remove trailing zeros
while (value[-1] == '0')
|
[
[
"\"10\"",
"10"
],
[
"\"15.3\"",
"15"
]
] |
RandomSpanInfilling/HumanEval/99/3
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
closest_integer
|
[
[
"\"10\"",
"10"
],
[
"\"14.5\"",
"15"
],
[
"\"-15.5\"",
"-16"
],
[
"\"15.3\"",
"15"
],
[
"\"0\"",
"0"
]
] |
[] |
:-1]
num = float(value)
if value[-2:] == '.5':
if num > 0:
res = ceil(num)
|
else:
res = floor(num)
elif len(value) > 0:
res = int(round(num))
else:
res = 0
return res
|
python
|
Create a function that takes a value (string) representing a number
and returns the closest integer to it. If the number is equidistant
from two integers, round it away from zero.
|
[] |
def closest_integer(value):
"""
Create a function that takes a value (string) representing a number
and returns the closest integer to it. If the number is equidistant
from two integers, round it away from zero.
"""
from math import floor, ceil
if value.count('.') == 1:
# remove trailing zeros
while (value[-1] == '0'):
value = value[
|
[
[
"\"10\"",
"10"
],
[
"\"15.3\"",
"15"
]
] |
RandomSpanInfilling/HumanEval/99/4
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
closest_integer
|
[
[
"\"10\"",
"10"
],
[
"\"14.5\"",
"15"
],
[
"\"-15.5\"",
"-16"
],
[
"\"15.3\"",
"15"
],
[
"\"0\"",
"0"
]
] |
[] |
(num))
|
else:
res = 0
return res
|
python
|
Create a function that takes a value (string) representing a number
and returns the closest integer to it. If the number is equidistant
from two integers, round it away from zero.
|
[] |
def closest_integer(value):
"""
Create a function that takes a value (string) representing a number
and returns the closest integer to it. If the number is equidistant
from two integers, round it away from zero.
"""
from math import floor, ceil
if value.count('.') == 1:
# remove trailing zeros
while (value[-1] == '0'):
value = value[:-1]
num = float(value)
if value[-2:] == '.5':
if num > 0:
res = ceil(num)
else:
res = floor(num)
elif len(value) > 0:
res = int(round
|
[
[
"\"10\"",
"10"
],
[
"\"15.3\"",
"15"
]
] |
RandomSpanInfilling/HumanEval/99/5
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
closest_integer
|
[
[
"\"10\"",
"10"
],
[
"\"14.5\"",
"15"
],
[
"\"-15.5\"",
"-16"
],
[
"\"15.3\"",
"15"
],
[
"\"0\"",
"0"
]
] |
[] |
from math import floor, ceil
if value.count('.') == 1:
# remove trai
|
ling zeros
while (value[-1] == '0'):
value = value[:-1]
num = float(value)
if value[-2:] == '.5':
if num > 0:
res = ceil(num)
else:
res = floor(num)
elif len(value) > 0:
res = int(round(num))
else:
res = 0
return res
|
python
|
Create a function that takes a value (string) representing a number
and returns the closest integer to it. If the number is equidistant
from two integers, round it away from zero.
|
[] |
def closest_integer(value):
"""
Create a function that takes a value (string) representing a number
and returns the closest integer to it. If the number is equidistant
from two integers, round it away from zero.
"""
|
[
[
"\"10\"",
"10"
],
[
"\"15.3\"",
"15"
]
] |
RandomSpanInfilling/HumanEval/99/6
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
closest_integer
|
[
[
"\"10\"",
"10"
],
[
"\"14.5\"",
"15"
],
[
"\"-15.5\"",
"-16"
],
[
"\"15.3\"",
"15"
],
[
"\"0\"",
"0"
]
] |
[] |
oat(value)
if value[-2:] == '.5':
if num > 0:
res = ceil(num)
else:
res
|
= floor(num)
elif len(value) > 0:
res = int(round(num))
else:
res = 0
return res
|
python
|
Create a function that takes a value (string) representing a number
and returns the closest integer to it. If the number is equidistant
from two integers, round it away from zero.
|
[] |
def closest_integer(value):
"""
Create a function that takes a value (string) representing a number
and returns the closest integer to it. If the number is equidistant
from two integers, round it away from zero.
"""
from math import floor, ceil
if value.count('.') == 1:
# remove trailing zeros
while (value[-1] == '0'):
value = value[:-1]
num = fl
|
[
[
"\"10\"",
"10"
],
[
"\"15.3\"",
"15"
]
] |
RandomSpanInfilling/HumanEval/99/7
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
closest_integer
|
[
[
"\"10\"",
"10"
],
[
"\"14.5\"",
"15"
],
[
"\"-15.5\"",
"-16"
],
[
"\"15.3\"",
"15"
],
[
"\"0\"",
"0"
]
] |
[] |
value[-2:] == '.5':
if num > 0:
res = ceil(num)
else:
res = floor(num)
eli
|
f len(value) > 0:
res = int(round(num))
else:
res = 0
return res
|
python
|
Create a function that takes a value (string) representing a number
and returns the closest integer to it. If the number is equidistant
from two integers, round it away from zero.
|
[] |
def closest_integer(value):
"""
Create a function that takes a value (string) representing a number
and returns the closest integer to it. If the number is equidistant
from two integers, round it away from zero.
"""
from math import floor, ceil
if value.count('.') == 1:
# remove trailing zeros
while (value[-1] == '0'):
value = value[:-1]
num = float(value)
if
|
[
[
"\"10\"",
"10"
],
[
"\"15.3\"",
"15"
]
] |
RandomSpanInfilling/HumanEval/99/8
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
closest_integer
|
[
[
"\"10\"",
"10"
],
[
"\"14.5\"",
"15"
],
[
"\"-15.5\"",
"-16"
],
[
"\"15.3\"",
"15"
],
[
"\"0\"",
"0"
]
] |
[] |
1] == '0'):
value = value[:-1]
num = float(value)
if value[-2:] == '.5':
|
if num > 0:
res = ceil(num)
else:
res = floor(num)
elif len(value) > 0:
res = int(round(num))
else:
res = 0
return res
|
python
|
Create a function that takes a value (string) representing a number
and returns the closest integer to it. If the number is equidistant
from two integers, round it away from zero.
|
[] |
def closest_integer(value):
"""
Create a function that takes a value (string) representing a number
and returns the closest integer to it. If the number is equidistant
from two integers, round it away from zero.
"""
from math import floor, ceil
if value.count('.') == 1:
# remove trailing zeros
while (value[-
|
[
[
"\"10\"",
"10"
],
[
"\"15.3\"",
"15"
]
] |
RandomSpanInfilling/HumanEval/99/9
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
closest_integer
|
[
[
"\"10\"",
"10"
],
[
"\"14.5\"",
"15"
],
[
"\"-15.5\"",
"-16"
],
[
"\"15.3\"",
"15"
],
[
"\"0\"",
"0"
]
] |
[] |
lue[-1] == '0'):
va
|
lue = value[:-1]
num = float(value)
if value[-2:] == '.5':
if num > 0:
res = ceil(num)
else:
res = floor(num)
elif len(value) > 0:
res = int(round(num))
else:
res = 0
return res
|
python
|
Create a function that takes a value (string) representing a number
and returns the closest integer to it. If the number is equidistant
from two integers, round it away from zero.
|
[] |
def closest_integer(value):
"""
Create a function that takes a value (string) representing a number
and returns the closest integer to it. If the number is equidistant
from two integers, round it away from zero.
"""
from math import floor, ceil
if value.count('.') == 1:
# remove trailing zeros
while (va
|
[
[
"\"10\"",
"10"
],
[
"\"15.3\"",
"15"
]
] |
RandomSpanInfilling/HumanEval/99/10
|
python
|
code_infilling
|
HumanEval_RandomSpanInfilling
|
closest_integer
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.