import_str listlengths 0 1 | doc_string stringclasses 164
values | suffix stringlengths 0 837 | compare_func listlengths 0 0 | data_id stringlengths 34 37 | task_name stringclasses 1
value | solution stringlengths 6 141 | demos listlengths 0 8 | prefix stringlengths 65 1.8k | dataset_name stringclasses 1
value | entry_func stringclasses 158
values | tgt_lang stringclasses 1
value | src_lang stringclasses 1
value | test_cases listlengths 0 100 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
[] | You have been tasked to write a function that receives
a hexadecimal number as a string and counts the number of hexadecimal
digits that are primes (prime number, or a prime, is a natural number
greater than 1 that is not a product of two smaller natural numbers).
Hexadecimal digits are 0, 1, 2, 3, 4... | for i in range(0, len(num)):
if num[i] in primes:
total += 1
return total
| [] | SingleLineInfilling/HumanEval/78/L1 | code_infilling | total = 0
| [
[
"\"AB\"",
"1"
],
[
"\"1077E\"",
"2"
],
[
"\"ABED1A33\"",
"4"
],
[
"\"123456789ABCDEF0\"",
"6"
],
[
"\"2020\"",
"2"
]
] |
def hex_key(num):
"""You have been tasked to write a function that receives
a hexadecimal number as a string and counts the number of hexadecimal
digits that are primes (prime number, or a prime, is a natural number
greater than 1 that is not a product of two smaller natural numbers).
Hexadecima... | HumanEval_SingleLineInfillingLight | hex_key | python | python | [
[
"\"AB\"",
"1"
],
[
"\"1077E\"",
"2"
],
[
"\"ABED1A33\"",
"4"
],
[
"\"2020\"",
"2"
],
[
"\"123456789ABCDEF0\"",
"6"
],
[
"\"112233445566778899AABBCCDDEEFF00\"",
"12"
],
[
"[]",
"0"
]
] |
[] | You have been tasked to write a function that receives
a hexadecimal number as a string and counts the number of hexadecimal
digits that are primes (prime number, or a prime, is a natural number
greater than 1 that is not a product of two smaller natural numbers).
Hexadecimal digits are 0, 1, 2, 3, 4... | if num[i] in primes:
total += 1
return total
| [] | SingleLineInfilling/HumanEval/78/L2 | code_infilling | for i in range(0, len(num)):
| [
[
"\"AB\"",
"1"
],
[
"\"1077E\"",
"2"
],
[
"\"ABED1A33\"",
"4"
],
[
"\"123456789ABCDEF0\"",
"6"
],
[
"\"2020\"",
"2"
]
] |
def hex_key(num):
"""You have been tasked to write a function that receives
a hexadecimal number as a string and counts the number of hexadecimal
digits that are primes (prime number, or a prime, is a natural number
greater than 1 that is not a product of two smaller natural numbers).
Hexadecima... | HumanEval_SingleLineInfillingLight | hex_key | python | python | [
[
"\"AB\"",
"1"
],
[
"\"1077E\"",
"2"
],
[
"\"ABED1A33\"",
"4"
],
[
"\"2020\"",
"2"
],
[
"\"123456789ABCDEF0\"",
"6"
],
[
"\"112233445566778899AABBCCDDEEFF00\"",
"12"
],
[
"[]",
"0"
]
] |
[] | You have been tasked to write a function that receives
a hexadecimal number as a string and counts the number of hexadecimal
digits that are primes (prime number, or a prime, is a natural number
greater than 1 that is not a product of two smaller natural numbers).
Hexadecimal digits are 0, 1, 2, 3, 4... | total += 1
return total
| [] | SingleLineInfilling/HumanEval/78/L3 | code_infilling | if num[i] in primes:
| [
[
"\"AB\"",
"1"
],
[
"\"1077E\"",
"2"
],
[
"\"ABED1A33\"",
"4"
],
[
"\"123456789ABCDEF0\"",
"6"
],
[
"\"2020\"",
"2"
]
] |
def hex_key(num):
"""You have been tasked to write a function that receives
a hexadecimal number as a string and counts the number of hexadecimal
digits that are primes (prime number, or a prime, is a natural number
greater than 1 that is not a product of two smaller natural numbers).
Hexadecima... | HumanEval_SingleLineInfillingLight | hex_key | python | python | [
[
"\"AB\"",
"1"
],
[
"\"1077E\"",
"2"
],
[
"\"ABED1A33\"",
"4"
],
[
"\"2020\"",
"2"
],
[
"\"123456789ABCDEF0\"",
"6"
],
[
"\"112233445566778899AABBCCDDEEFF00\"",
"12"
],
[
"[]",
"0"
]
] |
[] | You have been tasked to write a function that receives
a hexadecimal number as a string and counts the number of hexadecimal
digits that are primes (prime number, or a prime, is a natural number
greater than 1 that is not a product of two smaller natural numbers).
Hexadecimal digits are 0, 1, 2, 3, 4... | return total
| [] | SingleLineInfilling/HumanEval/78/L4 | code_infilling | total += 1
| [
[
"\"AB\"",
"1"
],
[
"\"1077E\"",
"2"
],
[
"\"ABED1A33\"",
"4"
],
[
"\"123456789ABCDEF0\"",
"6"
],
[
"\"2020\"",
"2"
]
] |
def hex_key(num):
"""You have been tasked to write a function that receives
a hexadecimal number as a string and counts the number of hexadecimal
digits that are primes (prime number, or a prime, is a natural number
greater than 1 that is not a product of two smaller natural numbers).
Hexadecima... | HumanEval_SingleLineInfillingLight | hex_key | python | python | [
[
"\"AB\"",
"1"
],
[
"\"1077E\"",
"2"
],
[
"\"ABED1A33\"",
"4"
],
[
"\"2020\"",
"2"
],
[
"\"123456789ABCDEF0\"",
"6"
],
[
"\"112233445566778899AABBCCDDEEFF00\"",
"12"
],
[
"[]",
"0"
]
] |
[] | You have been tasked to write a function that receives
a hexadecimal number as a string and counts the number of hexadecimal
digits that are primes (prime number, or a prime, is a natural number
greater than 1 that is not a product of two smaller natural numbers).
Hexadecimal digits are 0, 1, 2, 3, 4... | [] | SingleLineInfilling/HumanEval/78/L5 | code_infilling | return total
| [
[
"\"AB\"",
"1"
],
[
"\"1077E\"",
"2"
],
[
"\"ABED1A33\"",
"4"
],
[
"\"123456789ABCDEF0\"",
"6"
],
[
"\"2020\"",
"2"
]
] |
def hex_key(num):
"""You have been tasked to write a function that receives
a hexadecimal number as a string and counts the number of hexadecimal
digits that are primes (prime number, or a prime, is a natural number
greater than 1 that is not a product of two smaller natural numbers).
Hexadecima... | HumanEval_SingleLineInfillingLight | hex_key | python | python | [
[
"\"AB\"",
"1"
],
[
"\"1077E\"",
"2"
],
[
"\"ABED1A33\"",
"4"
],
[
"\"2020\"",
"2"
],
[
"\"123456789ABCDEF0\"",
"6"
],
[
"\"112233445566778899AABBCCDDEEFF00\"",
"12"
],
[
"[]",
"0"
]
] | |
[] | You will be given a number in decimal form and your task is to convert it to
binary format. The function should return a string, with each character representing a binary
number. Each character in the string will be '0' or '1'.
There will be an extra couple of characters 'db' at the beginning and at the en... | [] | SingleLineInfilling/HumanEval/79/L0 | code_infilling | return "db" + bin(decimal)[2:] + "db"
| [
[
"15",
"\"db1111db\""
],
[
"32",
"\"db100000db\""
]
] |
def decimal_to_binary(decimal):
"""You will be given a number in decimal form and your task is to convert it to
binary format. The function should return a string, with each character representing a binary
number. Each character in the string will be '0' or '1'.
There will be an extra couple of charac... | HumanEval_SingleLineInfillingLight | decimal_to_binary | python | python | [
[
"0",
"\"db0db\""
],
[
"32",
"\"db100000db\""
],
[
"103",
"\"db1100111db\""
],
[
"15",
"\"db1111db\""
]
] | |
[] | You are given a string s.
Your task is to check if the string is happy or not.
A string is happy if its length is at least 3 and every 3 consecutive letters are distinct | return False
for i in range(len(s) - 2):
if s[i] == s[i+1] or s[i+1] == s[i+2] or s[i] == s[i+2]:
return False
return True
| [] | SingleLineInfilling/HumanEval/80/L0 | code_infilling | if len(s) < 3:
| [
[
"a",
"False"
],
[
"aa",
"False"
],
[
"abcd",
"True"
],
[
"aabb",
"False"
],
[
"adb",
"True"
],
[
"xyy",
"False"
]
] |
def is_happy(s):
"""You are given a string s.
Your task is to check if the string is happy or not.
A string is happy if its length is at least 3 and every 3 consecutive letters are distinct
"""
| HumanEval_SingleLineInfillingLight | is_happy | python | python | [
[
"\"a\"",
"False"
],
[
"\"aa\"",
"False"
],
[
"\"abcd\"",
"True"
],
[
"\"aabb\"",
"False"
],
[
"\"adb\"",
"True"
],
[
"\"xyy\"",
"False"
],
[
"\"iopaxpoi\"",
"True"
],
[
"\"iopaxioi\"",
"False"
]
] |
[] | You are given a string s.
Your task is to check if the string is happy or not.
A string is happy if its length is at least 3 and every 3 consecutive letters are distinct |
for i in range(len(s) - 2):
if s[i] == s[i+1] or s[i+1] == s[i+2] or s[i] == s[i+2]:
return False
return True
| [] | SingleLineInfilling/HumanEval/80/L1 | code_infilling | return False
| [
[
"a",
"False"
],
[
"aa",
"False"
],
[
"abcd",
"True"
],
[
"aabb",
"False"
],
[
"adb",
"True"
],
[
"xyy",
"False"
]
] |
def is_happy(s):
"""You are given a string s.
Your task is to check if the string is happy or not.
A string is happy if its length is at least 3 and every 3 consecutive letters are distinct
"""
if len(s) < 3:
| HumanEval_SingleLineInfillingLight | is_happy | python | python | [
[
"\"a\"",
"False"
],
[
"\"aa\"",
"False"
],
[
"\"abcd\"",
"True"
],
[
"\"aabb\"",
"False"
],
[
"\"adb\"",
"True"
],
[
"\"xyy\"",
"False"
],
[
"\"iopaxpoi\"",
"True"
],
[
"\"iopaxioi\"",
"False"
]
] |
[] | You are given a string s.
Your task is to check if the string is happy or not.
A string is happy if its length is at least 3 and every 3 consecutive letters are distinct |
if s[i] == s[i+1] or s[i+1] == s[i+2] or s[i] == s[i+2]:
return False
return True
| [] | SingleLineInfilling/HumanEval/80/L3 | code_infilling | for i in range(len(s) - 2):
| [
[
"a",
"False"
],
[
"aa",
"False"
],
[
"abcd",
"True"
],
[
"aabb",
"False"
],
[
"adb",
"True"
],
[
"xyy",
"False"
]
] |
def is_happy(s):
"""You are given a string s.
Your task is to check if the string is happy or not.
A string is happy if its length is at least 3 and every 3 consecutive letters are distinct
"""
if len(s) < 3:
return False
| HumanEval_SingleLineInfillingLight | is_happy | python | python | [
[
"\"a\"",
"False"
],
[
"\"aa\"",
"False"
],
[
"\"abcd\"",
"True"
],
[
"\"aabb\"",
"False"
],
[
"\"adb\"",
"True"
],
[
"\"xyy\"",
"False"
],
[
"\"iopaxpoi\"",
"True"
],
[
"\"iopaxioi\"",
"False"
]
] |
[] | You are given a string s.
Your task is to check if the string is happy or not.
A string is happy if its length is at least 3 and every 3 consecutive letters are distinct | return False
return True
| [] | SingleLineInfilling/HumanEval/80/L5 | code_infilling | if s[i] == s[i+1] or s[i+1] == s[i+2] or s[i] == s[i+2]:
| [
[
"a",
"False"
],
[
"aa",
"False"
],
[
"abcd",
"True"
],
[
"aabb",
"False"
],
[
"adb",
"True"
],
[
"xyy",
"False"
]
] |
def is_happy(s):
"""You are given a string s.
Your task is to check if the string is happy or not.
A string is happy if its length is at least 3 and every 3 consecutive letters are distinct
"""
if len(s) < 3:
return False
for i in range(len(s) - 2):
| HumanEval_SingleLineInfillingLight | is_happy | python | python | [
[
"\"a\"",
"False"
],
[
"\"aa\"",
"False"
],
[
"\"abcd\"",
"True"
],
[
"\"aabb\"",
"False"
],
[
"\"adb\"",
"True"
],
[
"\"xyy\"",
"False"
],
[
"\"iopaxpoi\"",
"True"
],
[
"\"iopaxioi\"",
"False"
]
] |
[] | You are given a string s.
Your task is to check if the string is happy or not.
A string is happy if its length is at least 3 and every 3 consecutive letters are distinct | return True
| [] | SingleLineInfilling/HumanEval/80/L6 | code_infilling | return False
| [
[
"a",
"False"
],
[
"aa",
"False"
],
[
"abcd",
"True"
],
[
"aabb",
"False"
],
[
"adb",
"True"
],
[
"xyy",
"False"
]
] |
def is_happy(s):
"""You are given a string s.
Your task is to check if the string is happy or not.
A string is happy if its length is at least 3 and every 3 consecutive letters are distinct
"""
if len(s) < 3:
return False
for i in range(len(s) - 2):
if s[i] == s[i+1] or s[i+... | HumanEval_SingleLineInfillingLight | is_happy | python | python | [
[
"\"a\"",
"False"
],
[
"\"aa\"",
"False"
],
[
"\"abcd\"",
"True"
],
[
"\"aabb\"",
"False"
],
[
"\"adb\"",
"True"
],
[
"\"xyy\"",
"False"
],
[
"\"iopaxpoi\"",
"True"
],
[
"\"iopaxioi\"",
"False"
]
] |
[] | You are given a string s.
Your task is to check if the string is happy or not.
A string is happy if its length is at least 3 and every 3 consecutive letters are distinct | [] | SingleLineInfilling/HumanEval/80/L7 | code_infilling | return True
| [
[
"a",
"False"
],
[
"aa",
"False"
],
[
"abcd",
"True"
],
[
"aabb",
"False"
],
[
"adb",
"True"
],
[
"xyy",
"False"
]
] |
def is_happy(s):
"""You are given a string s.
Your task is to check if the string is happy or not.
A string is happy if its length is at least 3 and every 3 consecutive letters are distinct
"""
if len(s) < 3:
return False
for i in range(len(s) - 2):
if s[i] == s[i+1] or s[i+... | HumanEval_SingleLineInfillingLight | is_happy | python | python | [
[
"\"a\"",
"False"
],
[
"\"aa\"",
"False"
],
[
"\"abcd\"",
"True"
],
[
"\"aabb\"",
"False"
],
[
"\"adb\"",
"True"
],
[
"\"xyy\"",
"False"
],
[
"\"iopaxpoi\"",
"True"
],
[
"\"iopaxioi\"",
"False"
]
] | |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | for gpa in grades:
if gpa == 4.0:
letter_grade.append("A+")
elif gpa > 3.7:
letter_grade.append("A")
elif gpa > 3.3:
letter_grade.append("A-")
elif gpa > 3.0:
letter_grade.append("B+")
elif gpa > 2.7:
letter_grade.ap... | [] | SingleLineInfilling/HumanEval/81/L2 | code_infilling | letter_grade = []
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | if gpa == 4.0:
letter_grade.append("A+")
elif gpa > 3.7:
letter_grade.append("A")
elif gpa > 3.3:
letter_grade.append("A-")
elif gpa > 3.0:
letter_grade.append("B+")
elif gpa > 2.7:
letter_grade.append("B")
elif ... | [] | SingleLineInfilling/HumanEval/81/L3 | code_infilling | for gpa in grades:
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | letter_grade.append("A+")
elif gpa > 3.7:
letter_grade.append("A")
elif gpa > 3.3:
letter_grade.append("A-")
elif gpa > 3.0:
letter_grade.append("B+")
elif gpa > 2.7:
letter_grade.append("B")
elif gpa > 2.3:
... | [] | SingleLineInfilling/HumanEval/81/L4 | code_infilling | if gpa == 4.0:
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | elif gpa > 3.7:
letter_grade.append("A")
elif gpa > 3.3:
letter_grade.append("A-")
elif gpa > 3.0:
letter_grade.append("B+")
elif gpa > 2.7:
letter_grade.append("B")
elif gpa > 2.3:
letter_grade.append("B-")
elif... | [] | SingleLineInfilling/HumanEval/81/L5 | code_infilling | letter_grade.append("A+")
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | letter_grade.append("A")
elif gpa > 3.3:
letter_grade.append("A-")
elif gpa > 3.0:
letter_grade.append("B+")
elif gpa > 2.7:
letter_grade.append("B")
elif gpa > 2.3:
letter_grade.append("B-")
elif gpa > 2.0:
... | [] | SingleLineInfilling/HumanEval/81/L6 | code_infilling | elif gpa > 3.7:
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | elif gpa > 3.3:
letter_grade.append("A-")
elif gpa > 3.0:
letter_grade.append("B+")
elif gpa > 2.7:
letter_grade.append("B")
elif gpa > 2.3:
letter_grade.append("B-")
elif gpa > 2.0:
letter_grade.append("C+")
eli... | [] | SingleLineInfilling/HumanEval/81/L7 | code_infilling | letter_grade.append("A")
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | letter_grade.append("A-")
elif gpa > 3.0:
letter_grade.append("B+")
elif gpa > 2.7:
letter_grade.append("B")
elif gpa > 2.3:
letter_grade.append("B-")
elif gpa > 2.0:
letter_grade.append("C+")
elif gpa > 1.7:
... | [] | SingleLineInfilling/HumanEval/81/L8 | code_infilling | elif gpa > 3.3:
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | elif gpa > 3.0:
letter_grade.append("B+")
elif gpa > 2.7:
letter_grade.append("B")
elif gpa > 2.3:
letter_grade.append("B-")
elif gpa > 2.0:
letter_grade.append("C+")
elif gpa > 1.7:
letter_grade.append("C")
elif... | [] | SingleLineInfilling/HumanEval/81/L9 | code_infilling | letter_grade.append("A-")
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | letter_grade.append("B+")
elif gpa > 2.7:
letter_grade.append("B")
elif gpa > 2.3:
letter_grade.append("B-")
elif gpa > 2.0:
letter_grade.append("C+")
elif gpa > 1.7:
letter_grade.append("C")
elif gpa > 1.3:
... | [] | SingleLineInfilling/HumanEval/81/L10 | code_infilling | elif gpa > 3.0:
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | elif gpa > 2.7:
letter_grade.append("B")
elif gpa > 2.3:
letter_grade.append("B-")
elif gpa > 2.0:
letter_grade.append("C+")
elif gpa > 1.7:
letter_grade.append("C")
elif gpa > 1.3:
letter_grade.append("C-")
elif... | [] | SingleLineInfilling/HumanEval/81/L11 | code_infilling | letter_grade.append("B+")
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | letter_grade.append("B")
elif gpa > 2.3:
letter_grade.append("B-")
elif gpa > 2.0:
letter_grade.append("C+")
elif gpa > 1.7:
letter_grade.append("C")
elif gpa > 1.3:
letter_grade.append("C-")
elif gpa > 1.0:
... | [] | SingleLineInfilling/HumanEval/81/L12 | code_infilling | elif gpa > 2.7:
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | elif gpa > 2.3:
letter_grade.append("B-")
elif gpa > 2.0:
letter_grade.append("C+")
elif gpa > 1.7:
letter_grade.append("C")
elif gpa > 1.3:
letter_grade.append("C-")
elif gpa > 1.0:
letter_grade.append("D+")
eli... | [] | SingleLineInfilling/HumanEval/81/L13 | code_infilling | letter_grade.append("B")
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | letter_grade.append("B-")
elif gpa > 2.0:
letter_grade.append("C+")
elif gpa > 1.7:
letter_grade.append("C")
elif gpa > 1.3:
letter_grade.append("C-")
elif gpa > 1.0:
letter_grade.append("D+")
elif gpa > 0.7:
... | [] | SingleLineInfilling/HumanEval/81/L14 | code_infilling | elif gpa > 2.3:
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | elif gpa > 2.0:
letter_grade.append("C+")
elif gpa > 1.7:
letter_grade.append("C")
elif gpa > 1.3:
letter_grade.append("C-")
elif gpa > 1.0:
letter_grade.append("D+")
elif gpa > 0.7:
letter_grade.append("D")
elif... | [] | SingleLineInfilling/HumanEval/81/L15 | code_infilling | letter_grade.append("B-")
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | letter_grade.append("C+")
elif gpa > 1.7:
letter_grade.append("C")
elif gpa > 1.3:
letter_grade.append("C-")
elif gpa > 1.0:
letter_grade.append("D+")
elif gpa > 0.7:
letter_grade.append("D")
elif gpa > 0.0:
... | [] | SingleLineInfilling/HumanEval/81/L16 | code_infilling | elif gpa > 2.0:
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | elif gpa > 1.7:
letter_grade.append("C")
elif gpa > 1.3:
letter_grade.append("C-")
elif gpa > 1.0:
letter_grade.append("D+")
elif gpa > 0.7:
letter_grade.append("D")
elif gpa > 0.0:
letter_grade.append("D-")
else... | [] | SingleLineInfilling/HumanEval/81/L17 | code_infilling | letter_grade.append("C+")
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | letter_grade.append("C")
elif gpa > 1.3:
letter_grade.append("C-")
elif gpa > 1.0:
letter_grade.append("D+")
elif gpa > 0.7:
letter_grade.append("D")
elif gpa > 0.0:
letter_grade.append("D-")
else:
letter_gra... | [] | SingleLineInfilling/HumanEval/81/L18 | code_infilling | elif gpa > 1.7:
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | elif gpa > 1.3:
letter_grade.append("C-")
elif gpa > 1.0:
letter_grade.append("D+")
elif gpa > 0.7:
letter_grade.append("D")
elif gpa > 0.0:
letter_grade.append("D-")
else:
letter_grade.append("E")
return letter_grad... | [] | SingleLineInfilling/HumanEval/81/L19 | code_infilling | letter_grade.append("C")
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | letter_grade.append("C-")
elif gpa > 1.0:
letter_grade.append("D+")
elif gpa > 0.7:
letter_grade.append("D")
elif gpa > 0.0:
letter_grade.append("D-")
else:
letter_grade.append("E")
return letter_grade
| [] | SingleLineInfilling/HumanEval/81/L20 | code_infilling | elif gpa > 1.3:
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | elif gpa > 1.0:
letter_grade.append("D+")
elif gpa > 0.7:
letter_grade.append("D")
elif gpa > 0.0:
letter_grade.append("D-")
else:
letter_grade.append("E")
return letter_grade
| [] | SingleLineInfilling/HumanEval/81/L21 | code_infilling | letter_grade.append("C-")
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | letter_grade.append("D+")
elif gpa > 0.7:
letter_grade.append("D")
elif gpa > 0.0:
letter_grade.append("D-")
else:
letter_grade.append("E")
return letter_grade
| [] | SingleLineInfilling/HumanEval/81/L22 | code_infilling | elif gpa > 1.0:
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | elif gpa > 0.7:
letter_grade.append("D")
elif gpa > 0.0:
letter_grade.append("D-")
else:
letter_grade.append("E")
return letter_grade
| [] | SingleLineInfilling/HumanEval/81/L23 | code_infilling | letter_grade.append("D+")
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | letter_grade.append("D")
elif gpa > 0.0:
letter_grade.append("D-")
else:
letter_grade.append("E")
return letter_grade
| [] | SingleLineInfilling/HumanEval/81/L24 | code_infilling | elif gpa > 0.7:
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | elif gpa > 0.0:
letter_grade.append("D-")
else:
letter_grade.append("E")
return letter_grade
| [] | SingleLineInfilling/HumanEval/81/L25 | code_infilling | letter_grade.append("D")
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | letter_grade.append("D-")
else:
letter_grade.append("E")
return letter_grade
| [] | SingleLineInfilling/HumanEval/81/L26 | code_infilling | elif gpa > 0.0:
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | else:
letter_grade.append("E")
return letter_grade
| [] | SingleLineInfilling/HumanEval/81/L27 | code_infilling | letter_grade.append("D-")
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | letter_grade.append("E")
return letter_grade
| [] | SingleLineInfilling/HumanEval/81/L28 | code_infilling | else:
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | return letter_grade
| [] | SingleLineInfilling/HumanEval/81/L29 | code_infilling | letter_grade.append("E")
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] |
[] | It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students and you have to write
a function that ca... | [] | SingleLineInfilling/HumanEval/81/L30 | code_infilling | return letter_grade
| [
[
"[4.0, 3, 1.7, 2, 3.5]",
"> ['A+', 'B', 'C-', 'C', 'A-']"
]
] |
def numerical_letter_grade(grades):
"""It is the last week of the semester and the teacher has to give the grades
to students. The teacher has been making her own algorithm for grading.
The only problem is, she has lost the code she used for grading.
She has given you a list of GPAs for some students a... | HumanEval_SingleLineInfillingLight | numerical_letter_grade | python | python | [
[
"[4.0, 3, 1.7, 2, 3.5]",
"['A+', 'B', 'C-', 'C', 'A-']"
],
[
"[1.2]",
"['D+']"
],
[
"[0.5]",
"['D-']"
],
[
"[0.0]",
"['E']"
],
[
"[1, 0.3, 1.5, 2.8, 3.3]",
"['D', 'D-', 'C-', 'B', 'B+']"
],
[
"[0, 0.7]",
"['E', 'D-']"
]
] | |
[] | Write a function that takes a string and returns True if the string
length is a prime number or False otherwise | if l == 0 or l == 1:
return False
for i in range(2, l):
if l % i == 0:
return False
return True
| [] | SingleLineInfilling/HumanEval/82/L0 | code_infilling | l = len(string)
| [
[
"'Hello'",
"True"
],
[
"'abcdcba'",
"True"
],
[
"'kittens'",
"True"
],
[
"'orange'",
"False"
]
] |
def prime_length(string):
"""Write a function that takes a string and returns True if the string
length is a prime number or False otherwise
"""
| HumanEval_SingleLineInfillingLight | prime_length | python | python | [
[
"'Hello'",
"True"
],
[
"'abcdcba'",
"True"
],
[
"'kittens'",
"True"
],
[
"'orange'",
"False"
],
[
"'wow'",
"True"
],
[
"'world'",
"True"
],
[
"'MadaM'",
"True"
],
[
"'Wow'",
"True"
],
[
"''",
"False"
],
[
... |
[] | Write a function that takes a string and returns True if the string
length is a prime number or False otherwise | return False
for i in range(2, l):
if l % i == 0:
return False
return True
| [] | SingleLineInfilling/HumanEval/82/L1 | code_infilling | if l == 0 or l == 1:
| [
[
"'Hello'",
"True"
],
[
"'abcdcba'",
"True"
],
[
"'kittens'",
"True"
],
[
"'orange'",
"False"
]
] |
def prime_length(string):
"""Write a function that takes a string and returns True if the string
length is a prime number or False otherwise
"""
l = len(string)
| HumanEval_SingleLineInfillingLight | prime_length | python | python | [
[
"'Hello'",
"True"
],
[
"'abcdcba'",
"True"
],
[
"'kittens'",
"True"
],
[
"'orange'",
"False"
],
[
"'wow'",
"True"
],
[
"'world'",
"True"
],
[
"'MadaM'",
"True"
],
[
"'Wow'",
"True"
],
[
"''",
"False"
],
[
... |
[] | Write a function that takes a string and returns True if the string
length is a prime number or False otherwise | for i in range(2, l):
if l % i == 0:
return False
return True
| [] | SingleLineInfilling/HumanEval/82/L2 | code_infilling | return False
| [
[
"'Hello'",
"True"
],
[
"'abcdcba'",
"True"
],
[
"'kittens'",
"True"
],
[
"'orange'",
"False"
]
] |
def prime_length(string):
"""Write a function that takes a string and returns True if the string
length is a prime number or False otherwise
"""
l = len(string)
if l == 0 or l == 1:
| HumanEval_SingleLineInfillingLight | prime_length | python | python | [
[
"'Hello'",
"True"
],
[
"'abcdcba'",
"True"
],
[
"'kittens'",
"True"
],
[
"'orange'",
"False"
],
[
"'wow'",
"True"
],
[
"'world'",
"True"
],
[
"'MadaM'",
"True"
],
[
"'Wow'",
"True"
],
[
"''",
"False"
],
[
... |
[] | Write a function that takes a string and returns True if the string
length is a prime number or False otherwise | if l % i == 0:
return False
return True
| [] | SingleLineInfilling/HumanEval/82/L3 | code_infilling | for i in range(2, l):
| [
[
"'Hello'",
"True"
],
[
"'abcdcba'",
"True"
],
[
"'kittens'",
"True"
],
[
"'orange'",
"False"
]
] |
def prime_length(string):
"""Write a function that takes a string and returns True if the string
length is a prime number or False otherwise
"""
l = len(string)
if l == 0 or l == 1:
return False
| HumanEval_SingleLineInfillingLight | prime_length | python | python | [
[
"'Hello'",
"True"
],
[
"'abcdcba'",
"True"
],
[
"'kittens'",
"True"
],
[
"'orange'",
"False"
],
[
"'wow'",
"True"
],
[
"'world'",
"True"
],
[
"'MadaM'",
"True"
],
[
"'Wow'",
"True"
],
[
"''",
"False"
],
[
... |
[] | Write a function that takes a string and returns True if the string
length is a prime number or False otherwise | return False
return True
| [] | SingleLineInfilling/HumanEval/82/L4 | code_infilling | if l % i == 0:
| [
[
"'Hello'",
"True"
],
[
"'abcdcba'",
"True"
],
[
"'kittens'",
"True"
],
[
"'orange'",
"False"
]
] |
def prime_length(string):
"""Write a function that takes a string and returns True if the string
length is a prime number or False otherwise
"""
l = len(string)
if l == 0 or l == 1:
return False
for i in range(2, l):
| HumanEval_SingleLineInfillingLight | prime_length | python | python | [
[
"'Hello'",
"True"
],
[
"'abcdcba'",
"True"
],
[
"'kittens'",
"True"
],
[
"'orange'",
"False"
],
[
"'wow'",
"True"
],
[
"'world'",
"True"
],
[
"'MadaM'",
"True"
],
[
"'Wow'",
"True"
],
[
"''",
"False"
],
[
... |
[] | Write a function that takes a string and returns True if the string
length is a prime number or False otherwise | return True
| [] | SingleLineInfilling/HumanEval/82/L5 | code_infilling | return False
| [
[
"'Hello'",
"True"
],
[
"'abcdcba'",
"True"
],
[
"'kittens'",
"True"
],
[
"'orange'",
"False"
]
] |
def prime_length(string):
"""Write a function that takes a string and returns True if the string
length is a prime number or False otherwise
"""
l = len(string)
if l == 0 or l == 1:
return False
for i in range(2, l):
if l % i == 0:
| HumanEval_SingleLineInfillingLight | prime_length | python | python | [
[
"'Hello'",
"True"
],
[
"'abcdcba'",
"True"
],
[
"'kittens'",
"True"
],
[
"'orange'",
"False"
],
[
"'wow'",
"True"
],
[
"'world'",
"True"
],
[
"'MadaM'",
"True"
],
[
"'Wow'",
"True"
],
[
"''",
"False"
],
[
... |
[] | Write a function that takes a string and returns True if the string
length is a prime number or False otherwise | [] | SingleLineInfilling/HumanEval/82/L6 | code_infilling | return True
| [
[
"'Hello'",
"True"
],
[
"'abcdcba'",
"True"
],
[
"'kittens'",
"True"
],
[
"'orange'",
"False"
]
] |
def prime_length(string):
"""Write a function that takes a string and returns True if the string
length is a prime number or False otherwise
"""
l = len(string)
if l == 0 or l == 1:
return False
for i in range(2, l):
if l % i == 0:
return False
| HumanEval_SingleLineInfillingLight | prime_length | python | python | [
[
"'Hello'",
"True"
],
[
"'abcdcba'",
"True"
],
[
"'kittens'",
"True"
],
[
"'orange'",
"False"
],
[
"'wow'",
"True"
],
[
"'world'",
"True"
],
[
"'MadaM'",
"True"
],
[
"'Wow'",
"True"
],
[
"''",
"False"
],
[
... | |
[] | Given a positive integer n, return the count of the numbers of n-digit
positive integers that start or end with 1. | return 18 * (10 ** (n - 2))
| [] | SingleLineInfilling/HumanEval/83/L0 | code_infilling | if n == 1: return 1
| [] |
def starts_one_ends(n):
"""
Given a positive integer n, return the count of the numbers of n-digit
positive integers that start or end with 1.
"""
| HumanEval_SingleLineInfillingLight | starts_one_ends | python | python | [
[
"1",
"1"
],
[
"2",
"18"
],
[
"3",
"180"
],
[
"4",
"1800"
],
[
"5",
"18000"
]
] |
[] | Given a positive integer n, return the count of the numbers of n-digit
positive integers that start or end with 1. | [] | SingleLineInfilling/HumanEval/83/L1 | code_infilling | return 18 * (10 ** (n - 2))
| [] |
def starts_one_ends(n):
"""
Given a positive integer n, return the count of the numbers of n-digit
positive integers that start or end with 1.
"""
if n == 1: return 1
| HumanEval_SingleLineInfillingLight | starts_one_ends | python | python | [
[
"1",
"1"
],
[
"2",
"18"
],
[
"3",
"180"
],
[
"4",
"1800"
],
[
"5",
"18000"
]
] | |
[] | Given a positive integer N, return the total sum of its digits in binary. | [] | SingleLineInfilling/HumanEval/84/L0 | code_infilling | return bin(sum(int(i) for i in str(N)))[2:]
| [
[
"1000",
"\"1\""
],
[
"150",
"\"110\""
],
[
"147",
"\"1100\""
]
] |
def solve(N):
"""Given a positive integer N, return the total sum of its digits in binary.
"""
| HumanEval_SingleLineInfillingLight | solve | python | python | [
[
"1000",
"\"1\""
],
[
"150",
"\"110\""
],
[
"147",
"\"1100\""
],
[
"333",
"\"1001\""
],
[
"963",
"\"10010\""
]
] | |
[] | Given a non-empty list of integers lst. add the even elements that are at odd indices.. | [] | SingleLineInfilling/HumanEval/85/L0 | code_infilling | return sum([lst[i] for i in range(1, len(lst), 2) if lst[i]%2 == 0])
| [
[
"[4, 2, 6, 7]",
"> 2"
]
] |
def add(lst):
"""Given a non-empty list of integers lst. add the even elements that are at odd indices..
"""
| HumanEval_SingleLineInfillingLight | add | python | python | [
[
"[4, 88]",
"88"
],
[
"[4, 5, 6, 7, 2, 122]",
"122"
],
[
"[4, 0, 6, 7]",
"0"
],
[
"[4, 4, 6, 8]",
"12"
]
] | |
[] | Write a function that takes a string and returns an ordered version of it.
Ordered version of string, is a string where all words (separated by space)
are replaced by a new word where all the characters arranged in
ascending order based on ascii value.
Note: You should keep the order of words and blank ... | [] | SingleLineInfilling/HumanEval/86/L0 | code_infilling | return ' '.join([''.join(sorted(list(i))) for i in s.split(' ')])
| [
[
"'Hi'",
"'Hi'"
],
[
"'hello'",
"'ehllo'"
],
[
"'Hello World!!!'",
"'Hello !!!Wdlor'"
]
] |
def anti_shuffle(s):
"""
Write a function that takes a string and returns an ordered version of it.
Ordered version of string, is a string where all words (separated by space)
are replaced by a new word where all the characters arranged in
ascending order based on ascii value.
Note: You should ... | HumanEval_SingleLineInfillingLight | anti_shuffle | python | python | [
[
"'Hi'",
"'Hi'"
],
[
"'hello'",
"'ehllo'"
],
[
"'number'",
"'bemnru'"
],
[
"'abcd'",
"'abcd'"
],
[
"'Hello World!!!'",
"'Hello !!!Wdlor'"
],
[
"''",
"''"
],
[
"'Hi. My name is Mister Robot. How are you?'",
"'.Hi My aemn is Meirst .Rboo... | |
[] | You are given a 2 dimensional data, as a nested lists,
which is similar to matrix, however, unlike matrices,
each row may contain a different number of columns.
Given lst, and integer x, find integers x in the list,
and return list of tuples, [(x1, y1), (x2, y2) ...] such that
each tuple is a coordi... | return sorted(sorted(coords, key=lambda x: x[1], reverse=True), key=lambda x: x[0])
| [] | SingleLineInfilling/HumanEval/87/L0 | code_infilling | coords = [(i, j) for i in range(len(lst)) for j in range(len(lst[i])) if lst[i][j] == x]
| [
[
"[], 1",
"[]"
],
[
"[[], [1], [1, 2, 3]], 3",
"[(2, 2)]"
]
] |
def get_row(lst, x):
"""
You are given a 2 dimensional data, as a nested lists,
which is similar to matrix, however, unlike matrices,
each row may contain a different number of columns.
Given lst, and integer x, find integers x in the list,
and return list of tuples, [(x1, y1), (x2, y2) ...] su... | HumanEval_SingleLineInfillingLight | get_row | python | python | [
[
"[\n [1,2,3,4,5,6],\n [1,2,3,4,1,6],\n [1,2,3,4,5,1]\n ], 1",
"[(0, 0), (1, 4), (1, 0), (2, 5), (2, 0)]"
],
[
"[\n [1,2,3,4,5,6],\n [1,2,3,4,5,6],\n [1,2,3,4,5,6],\n [1,2,3,4,5,6],\n [1,2,3,4,5,6],\n [1,2,3,4,5,6]\n ], 2",
"[... |
[] | You are given a 2 dimensional data, as a nested lists,
which is similar to matrix, however, unlike matrices,
each row may contain a different number of columns.
Given lst, and integer x, find integers x in the list,
and return list of tuples, [(x1, y1), (x2, y2) ...] such that
each tuple is a coordi... | [] | SingleLineInfilling/HumanEval/87/L1 | code_infilling | return sorted(sorted(coords, key=lambda x: x[1], reverse=True), key=lambda x: x[0])
| [
[
"[], 1",
"[]"
],
[
"[[], [1], [1, 2, 3]], 3",
"[(2, 2)]"
]
] |
def get_row(lst, x):
"""
You are given a 2 dimensional data, as a nested lists,
which is similar to matrix, however, unlike matrices,
each row may contain a different number of columns.
Given lst, and integer x, find integers x in the list,
and return list of tuples, [(x1, y1), (x2, y2) ...] su... | HumanEval_SingleLineInfillingLight | get_row | python | python | [
[
"[\n [1,2,3,4,5,6],\n [1,2,3,4,1,6],\n [1,2,3,4,5,1]\n ], 1",
"[(0, 0), (1, 4), (1, 0), (2, 5), (2, 0)]"
],
[
"[\n [1,2,3,4,5,6],\n [1,2,3,4,5,6],\n [1,2,3,4,5,6],\n [1,2,3,4,5,6],\n [1,2,3,4,5,6],\n [1,2,3,4,5,6]\n ], 2",
"[... | |
[] | Given an array of non-negative integers, return a copy of the given array after sorting,
you will sort the given array in ascending order if the sum( first index value, last index value) is odd,
or sort it in descending order if the sum( first index value, last index value) is even.
Note:
* don't chang... | [] | SingleLineInfilling/HumanEval/88/L0 | code_infilling | return [] if len(array) == 0 else sorted(array, reverse= (array[0]+array[-1]) % 2 == 0)
| [
[
"[]",
"[]"
],
[
"[5]",
"[5]"
],
[
"[2, 4, 3, 0, 1, 5]",
"[0, 1, 2, 3, 4, 5]"
],
[
"[2, 4, 3, 0, 1, 5, 6]",
"[6, 5, 4, 3, 2, 1, 0]"
]
] |
def sort_array(array):
"""
Given an array of non-negative integers, return a copy of the given array after sorting,
you will sort the given array in ascending order if the sum( first index value, last index value) is odd,
or sort it in descending order if the sum( first index value, last index value) i... | HumanEval_SingleLineInfillingLight | sort_array | python | python | [
[
"[]",
"[]"
],
[
"[5]",
"[5]"
],
[
"[2, 4, 3, 0, 1, 5]",
"[0, 1, 2, 3, 4, 5]"
],
[
"[2, 4, 3, 0, 1, 5, 6]",
"[6, 5, 4, 3, 2, 1, 0]"
],
[
"[2, 1]",
"[1, 2]"
],
[
"[15, 42, 87, 32 ,11, 0]",
"[0, 11, 15, 32, 42, 87]"
],
[
"[21, 14, 23, 11]",
... | |
[] | Create a function encrypt that takes a string as an argument and
returns a string encrypted with the alphabet being rotated.
The alphabet should be rotated in a manner such that the letters
shift down by two multiplied to two places. | out = ''
for c in s:
if c in d:
out += d[(d.index(c)+2*2) % 26]
else:
out += c
return out
| [] | SingleLineInfilling/HumanEval/89/L0 | code_infilling | d = 'abcdefghijklmnopqrstuvwxyz'
| [
[
"'hi'",
"'lm'"
],
[
"'asdfghjkl'",
"'ewhjklnop'"
],
[
"'gf'",
"'kj'"
],
[
"'et'",
"'ix'"
]
] |
def encrypt(s):
"""Create a function encrypt that takes a string as an argument and
returns a string encrypted with the alphabet being rotated.
The alphabet should be rotated in a manner such that the letters
shift down by two multiplied to two places.
"""
| HumanEval_SingleLineInfillingLight | encrypt | python | python | [
[
"'hi'",
"'lm'"
],
[
"'asdfghjkl'",
"'ewhjklnop'"
],
[
"'gf'",
"'kj'"
],
[
"'et'",
"'ix'"
],
[
"'faewfawefaewg'",
"'jeiajeaijeiak'"
],
[
"'hellomyfriend'",
"'lippsqcjvmirh'"
],
[
"'dxzdlmnilfuhmilufhlihufnmlimnufhlimnufhfucufh'",
"'hbd... |
[] | Create a function encrypt that takes a string as an argument and
returns a string encrypted with the alphabet being rotated.
The alphabet should be rotated in a manner such that the letters
shift down by two multiplied to two places. | for c in s:
if c in d:
out += d[(d.index(c)+2*2) % 26]
else:
out += c
return out
| [] | SingleLineInfilling/HumanEval/89/L1 | code_infilling | out = ''
| [
[
"'hi'",
"'lm'"
],
[
"'asdfghjkl'",
"'ewhjklnop'"
],
[
"'gf'",
"'kj'"
],
[
"'et'",
"'ix'"
]
] |
def encrypt(s):
"""Create a function encrypt that takes a string as an argument and
returns a string encrypted with the alphabet being rotated.
The alphabet should be rotated in a manner such that the letters
shift down by two multiplied to two places.
"""
d = 'abcdefghijklmnopqrstuvwxyz'
| HumanEval_SingleLineInfillingLight | encrypt | python | python | [
[
"'hi'",
"'lm'"
],
[
"'asdfghjkl'",
"'ewhjklnop'"
],
[
"'gf'",
"'kj'"
],
[
"'et'",
"'ix'"
],
[
"'faewfawefaewg'",
"'jeiajeaijeiak'"
],
[
"'hellomyfriend'",
"'lippsqcjvmirh'"
],
[
"'dxzdlmnilfuhmilufhlihufnmlimnufhlimnufhfucufh'",
"'hbd... |
[] | Create a function encrypt that takes a string as an argument and
returns a string encrypted with the alphabet being rotated.
The alphabet should be rotated in a manner such that the letters
shift down by two multiplied to two places. | if c in d:
out += d[(d.index(c)+2*2) % 26]
else:
out += c
return out
| [] | SingleLineInfilling/HumanEval/89/L2 | code_infilling | for c in s:
| [
[
"'hi'",
"'lm'"
],
[
"'asdfghjkl'",
"'ewhjklnop'"
],
[
"'gf'",
"'kj'"
],
[
"'et'",
"'ix'"
]
] |
def encrypt(s):
"""Create a function encrypt that takes a string as an argument and
returns a string encrypted with the alphabet being rotated.
The alphabet should be rotated in a manner such that the letters
shift down by two multiplied to two places.
"""
d = 'abcdefghijklmnopqrstuvwxyz'
... | HumanEval_SingleLineInfillingLight | encrypt | python | python | [
[
"'hi'",
"'lm'"
],
[
"'asdfghjkl'",
"'ewhjklnop'"
],
[
"'gf'",
"'kj'"
],
[
"'et'",
"'ix'"
],
[
"'faewfawefaewg'",
"'jeiajeaijeiak'"
],
[
"'hellomyfriend'",
"'lippsqcjvmirh'"
],
[
"'dxzdlmnilfuhmilufhlihufnmlimnufhlimnufhfucufh'",
"'hbd... |
[] | Create a function encrypt that takes a string as an argument and
returns a string encrypted with the alphabet being rotated.
The alphabet should be rotated in a manner such that the letters
shift down by two multiplied to two places. | out += d[(d.index(c)+2*2) % 26]
else:
out += c
return out
| [] | SingleLineInfilling/HumanEval/89/L3 | code_infilling | if c in d:
| [
[
"'hi'",
"'lm'"
],
[
"'asdfghjkl'",
"'ewhjklnop'"
],
[
"'gf'",
"'kj'"
],
[
"'et'",
"'ix'"
]
] |
def encrypt(s):
"""Create a function encrypt that takes a string as an argument and
returns a string encrypted with the alphabet being rotated.
The alphabet should be rotated in a manner such that the letters
shift down by two multiplied to two places.
"""
d = 'abcdefghijklmnopqrstuvwxyz'
... | HumanEval_SingleLineInfillingLight | encrypt | python | python | [
[
"'hi'",
"'lm'"
],
[
"'asdfghjkl'",
"'ewhjklnop'"
],
[
"'gf'",
"'kj'"
],
[
"'et'",
"'ix'"
],
[
"'faewfawefaewg'",
"'jeiajeaijeiak'"
],
[
"'hellomyfriend'",
"'lippsqcjvmirh'"
],
[
"'dxzdlmnilfuhmilufhlihufnmlimnufhlimnufhfucufh'",
"'hbd... |
[] | Create a function encrypt that takes a string as an argument and
returns a string encrypted with the alphabet being rotated.
The alphabet should be rotated in a manner such that the letters
shift down by two multiplied to two places. | else:
out += c
return out
| [] | SingleLineInfilling/HumanEval/89/L4 | code_infilling | out += d[(d.index(c)+2*2) % 26]
| [
[
"'hi'",
"'lm'"
],
[
"'asdfghjkl'",
"'ewhjklnop'"
],
[
"'gf'",
"'kj'"
],
[
"'et'",
"'ix'"
]
] |
def encrypt(s):
"""Create a function encrypt that takes a string as an argument and
returns a string encrypted with the alphabet being rotated.
The alphabet should be rotated in a manner such that the letters
shift down by two multiplied to two places.
"""
d = 'abcdefghijklmnopqrstuvwxyz'
... | HumanEval_SingleLineInfillingLight | encrypt | python | python | [
[
"'hi'",
"'lm'"
],
[
"'asdfghjkl'",
"'ewhjklnop'"
],
[
"'gf'",
"'kj'"
],
[
"'et'",
"'ix'"
],
[
"'faewfawefaewg'",
"'jeiajeaijeiak'"
],
[
"'hellomyfriend'",
"'lippsqcjvmirh'"
],
[
"'dxzdlmnilfuhmilufhlihufnmlimnufhlimnufhfucufh'",
"'hbd... |
[] | Create a function encrypt that takes a string as an argument and
returns a string encrypted with the alphabet being rotated.
The alphabet should be rotated in a manner such that the letters
shift down by two multiplied to two places. | out += c
return out
| [] | SingleLineInfilling/HumanEval/89/L5 | code_infilling | else:
| [
[
"'hi'",
"'lm'"
],
[
"'asdfghjkl'",
"'ewhjklnop'"
],
[
"'gf'",
"'kj'"
],
[
"'et'",
"'ix'"
]
] |
def encrypt(s):
"""Create a function encrypt that takes a string as an argument and
returns a string encrypted with the alphabet being rotated.
The alphabet should be rotated in a manner such that the letters
shift down by two multiplied to two places.
"""
d = 'abcdefghijklmnopqrstuvwxyz'
... | HumanEval_SingleLineInfillingLight | encrypt | python | python | [
[
"'hi'",
"'lm'"
],
[
"'asdfghjkl'",
"'ewhjklnop'"
],
[
"'gf'",
"'kj'"
],
[
"'et'",
"'ix'"
],
[
"'faewfawefaewg'",
"'jeiajeaijeiak'"
],
[
"'hellomyfriend'",
"'lippsqcjvmirh'"
],
[
"'dxzdlmnilfuhmilufhlihufnmlimnufhlimnufhfucufh'",
"'hbd... |
[] | Create a function encrypt that takes a string as an argument and
returns a string encrypted with the alphabet being rotated.
The alphabet should be rotated in a manner such that the letters
shift down by two multiplied to two places. | return out
| [] | SingleLineInfilling/HumanEval/89/L6 | code_infilling | out += c
| [
[
"'hi'",
"'lm'"
],
[
"'asdfghjkl'",
"'ewhjklnop'"
],
[
"'gf'",
"'kj'"
],
[
"'et'",
"'ix'"
]
] |
def encrypt(s):
"""Create a function encrypt that takes a string as an argument and
returns a string encrypted with the alphabet being rotated.
The alphabet should be rotated in a manner such that the letters
shift down by two multiplied to two places.
"""
d = 'abcdefghijklmnopqrstuvwxyz'
... | HumanEval_SingleLineInfillingLight | encrypt | python | python | [
[
"'hi'",
"'lm'"
],
[
"'asdfghjkl'",
"'ewhjklnop'"
],
[
"'gf'",
"'kj'"
],
[
"'et'",
"'ix'"
],
[
"'faewfawefaewg'",
"'jeiajeaijeiak'"
],
[
"'hellomyfriend'",
"'lippsqcjvmirh'"
],
[
"'dxzdlmnilfuhmilufhlihufnmlimnufhlimnufhfucufh'",
"'hbd... |
[] | Create a function encrypt that takes a string as an argument and
returns a string encrypted with the alphabet being rotated.
The alphabet should be rotated in a manner such that the letters
shift down by two multiplied to two places. | [] | SingleLineInfilling/HumanEval/89/L7 | code_infilling | return out
| [
[
"'hi'",
"'lm'"
],
[
"'asdfghjkl'",
"'ewhjklnop'"
],
[
"'gf'",
"'kj'"
],
[
"'et'",
"'ix'"
]
] |
def encrypt(s):
"""Create a function encrypt that takes a string as an argument and
returns a string encrypted with the alphabet being rotated.
The alphabet should be rotated in a manner such that the letters
shift down by two multiplied to two places.
"""
d = 'abcdefghijklmnopqrstuvwxyz'
... | HumanEval_SingleLineInfillingLight | encrypt | python | python | [
[
"'hi'",
"'lm'"
],
[
"'asdfghjkl'",
"'ewhjklnop'"
],
[
"'gf'",
"'kj'"
],
[
"'et'",
"'ix'"
],
[
"'faewfawefaewg'",
"'jeiajeaijeiak'"
],
[
"'hellomyfriend'",
"'lippsqcjvmirh'"
],
[
"'dxzdlmnilfuhmilufhlihufnmlimnufhlimnufhfucufh'",
"'hbd... | |
[] | 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. | return None if len(lst) < 2 else lst[1]
| [] | SingleLineInfilling/HumanEval/90/L0 | code_infilling | lst = sorted(set(lst))
| [
[
"[1, 2, 3, 4, 5]",
"2"
],
[
"[5, 1, 4, 3, 2]",
"2"
],
[
"[]",
"None"
],
[
"[1, 1]",
"None"
]
] |
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.
"""
| HumanEval_SingleLineInfillingLight | next_smallest | python | python | [
[
"[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"
]
] |
[] | 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. | [] | SingleLineInfilling/HumanEval/90/L1 | code_infilling | return None if len(lst) < 2 else lst[1]
| [
[
"[1, 2, 3, 4, 5]",
"2"
],
[
"[5, 1, 4, 3, 2]",
"2"
],
[
"[]",
"None"
],
[
"[1, 1]",
"None"
]
] |
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))
| HumanEval_SingleLineInfillingLight | next_smallest | python | python | [
[
"[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"
]
] | |
[] | 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 '!'. | sentences = re.split(r'[.?!]\s*', S)
return sum(sentence[0:2] == 'I ' for sentence in sentences)
| [] | SingleLineInfilling/HumanEval/91/L0 | code_infilling | import re
| [
[
"\"Hello world\"",
"0"
],
[
"\"The sky is blue. The sun is shining. I love this weather\"",
"1"
]
] |
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 '!'.
"""
| HumanEval_SingleLineInfillingLight | is_bored | python | python | [
[
"\"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"
]
] |
[] | 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 '!'. | return sum(sentence[0:2] == 'I ' for sentence in sentences)
| [] | SingleLineInfilling/HumanEval/91/L1 | code_infilling | sentences = re.split(r'[.?!]\s*', S)
| [
[
"\"Hello world\"",
"0"
],
[
"\"The sky is blue. The sun is shining. I love this weather\"",
"1"
]
] |
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
| HumanEval_SingleLineInfillingLight | is_bored | python | python | [
[
"\"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"
]
] |
[] | 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 '!'. | [] | SingleLineInfilling/HumanEval/91/L2 | code_infilling | return sum(sentence[0:2] == 'I ' for sentence in sentences)
| [
[
"\"Hello world\"",
"0"
],
[
"\"The sky is blue. The sun is shining. I love this weather\"",
"1"
]
] |
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)
| HumanEval_SingleLineInfillingLight | is_bored | python | python | [
[
"\"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"
]
] | |
[] | 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 (x+y==z) or (x+z==y) or (y+z==x):
return True
return False
return False
| [] | SingleLineInfilling/HumanEval/92/L1 | code_infilling | if isinstance(x,int) and isinstance(y,int) and isinstance(z,int):
| [
[
"5, 2, 7",
"True"
],
[
"3, 2, 2",
"False"
],
[
"3, -2, 1",
"True"
],
[
"3.6, -2.2, 2",
"False"
]
] |
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.
"""
| HumanEval_SingleLineInfillingLight | any_int | python | python | [
[
"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",
... |
[] | 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. | return True
return False
return False
| [] | SingleLineInfilling/HumanEval/92/L2 | code_infilling | if (x+y==z) or (x+z==y) or (y+z==x):
| [
[
"5, 2, 7",
"True"
],
[
"3, 2, 2",
"False"
],
[
"3, -2, 1",
"True"
],
[
"3.6, -2.2, 2",
"False"
]
] |
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):
| HumanEval_SingleLineInfillingLight | any_int | python | python | [
[
"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",
... |
[] | 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. | return False
return False
| [] | SingleLineInfilling/HumanEval/92/L3 | code_infilling | return True
| [
[
"5, 2, 7",
"True"
],
[
"3, 2, 2",
"False"
],
[
"3, -2, 1",
"True"
],
[
"3.6, -2.2, 2",
"False"
]
] |
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 (... | HumanEval_SingleLineInfillingLight | any_int | python | python | [
[
"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",
... |
[] | 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. | return False
| [] | SingleLineInfilling/HumanEval/92/L4 | code_infilling | return False
| [
[
"5, 2, 7",
"True"
],
[
"3, 2, 2",
"False"
],
[
"3, -2, 1",
"True"
],
[
"3.6, -2.2, 2",
"False"
]
] |
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 (... | HumanEval_SingleLineInfillingLight | any_int | python | python | [
[
"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",
... |
[] | 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. | [] | SingleLineInfilling/HumanEval/92/L5 | code_infilling | return False
| [
[
"5, 2, 7",
"True"
],
[
"3, 2, 2",
"False"
],
[
"3, -2, 1",
"True"
],
[
"3.6, -2.2, 2",
"False"
]
] |
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 (... | HumanEval_SingleLineInfillingLight | any_int | python | python | [
[
"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",
... | |
[] | 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_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])
| [] | SingleLineInfilling/HumanEval/93/L0 | code_infilling | vowels = "aeiouAEIOU"
| [
[
"'test'",
"'TGST'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
]
] |
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.
"""
| HumanEval_SingleLineInfillingLight | encode | python | python | [
[
"'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'"
]
] |
[] | 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. | message = message.swapcase()
return ''.join([vowels_replace[i] if i in vowels else i for i in message])
| [] | SingleLineInfilling/HumanEval/93/L1 | code_infilling | vowels_replace = dict([(i, chr(ord(i) + 2)) for i in vowels])
| [
[
"'test'",
"'TGST'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
]
] |
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 = ... | HumanEval_SingleLineInfillingLight | encode | python | python | [
[
"'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'"
]
] |
[] | 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. | return ''.join([vowels_replace[i] if i in vowels else i for i in message])
| [] | SingleLineInfilling/HumanEval/93/L2 | code_infilling | message = message.swapcase()
| [
[
"'test'",
"'TGST'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
]
] |
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 = ... | HumanEval_SingleLineInfillingLight | encode | python | python | [
[
"'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'"
]
] |
[] | 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. | [] | SingleLineInfilling/HumanEval/93/L3 | code_infilling | return ''.join([vowels_replace[i] if i in vowels else i for i in message])
| [
[
"'test'",
"'TGST'"
],
[
"'This is a message'",
"'tHKS KS C MGSSCGG'"
]
] |
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 = ... | HumanEval_SingleLineInfillingLight | encode | python | python | [
[
"'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'"
]
] | |
[] | You are given a list of integers.
You need to find the largest prime value and return the sum of its digits. | 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
| [] | SingleLineInfilling/HumanEval/94/L0 | code_infilling | 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]",
... |
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.
"""
| HumanEval_SingleLineInfillingLight | skjkasdkd | python | python | [
[
"[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]",
... |
[] | You are given a list of integers.
You need to find the largest prime value and return the sum of its digits. | 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
| [] | SingleLineInfilling/HumanEval/94/L1 | code_infilling | 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]",
... |
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):
| HumanEval_SingleLineInfillingLight | skjkasdkd | python | python | [
[
"[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]",
... |
[] | You are given a list of integers.
You need to find the largest prime value and return the sum of its digits. | 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
| [] | SingleLineInfilling/HumanEval/94/L2 | code_infilling | 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]",
... |
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):
| HumanEval_SingleLineInfillingLight | skjkasdkd | python | python | [
[
"[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]",
... |
[] | You are given a list of integers.
You need to find the largest prime value and return the sum of its digits. |
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
| [] | SingleLineInfilling/HumanEval/94/L3 | code_infilling | return False
| [
[
"[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]",
... |
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:
| HumanEval_SingleLineInfillingLight | skjkasdkd | python | python | [
[
"[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]",
... |
[] | You are given a list of integers.
You need to find the largest prime value and return the sum of its digits. | 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
| [] | SingleLineInfilling/HumanEval/94/L5 | code_infilling | return True
| [
[
"[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]",
... |
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
| HumanEval_SingleLineInfillingLight | skjkasdkd | python | python | [
[
"[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]",
... |
[] | You are given a list of integers.
You need to find the largest prime value and return the sum of its digits. | 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
| [] | SingleLineInfilling/HumanEval/94/L6 | code_infilling | maxx = 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]",
... |
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
| HumanEval_SingleLineInfillingLight | skjkasdkd | python | python | [
[
"[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]",
... |
[] | You are given a list of integers.
You need to find the largest prime value and return the sum of its digits. | 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
| [] | SingleLineInfilling/HumanEval/94/L7 | code_infilling | 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]",
... |
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
| HumanEval_SingleLineInfillingLight | skjkasdkd | python | python | [
[
"[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]",
... |
[] | You are given a list of integers.
You need to find the largest prime value and return the sum of its digits. | if(lst[i] > maxx and isPrime(lst[i])):
maxx = lst[i]
i+=1
result = sum(int(digit) for digit in str(maxx))
return result
| [] | SingleLineInfilling/HumanEval/94/L8 | code_infilling | while i < len(lst):
| [
[
"[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]",
... |
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
| HumanEval_SingleLineInfillingLight | skjkasdkd | python | python | [
[
"[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]",
... |
[] | You are given a list of integers.
You need to find the largest prime value and return the sum of its digits. | maxx = lst[i]
i+=1
result = sum(int(digit) for digit in str(maxx))
return result
| [] | SingleLineInfilling/HumanEval/94/L9 | code_infilling | 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]",
... |
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 ... | HumanEval_SingleLineInfillingLight | skjkasdkd | python | python | [
[
"[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]",
... |
[] | You are given a list of integers.
You need to find the largest prime value and return the sum of its digits. | i+=1
result = sum(int(digit) for digit in str(maxx))
return result
| [] | SingleLineInfilling/HumanEval/94/L10 | code_infilling | maxx = 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]",
... |
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 ... | HumanEval_SingleLineInfillingLight | skjkasdkd | python | python | [
[
"[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]",
... |
[] | You are given a list of integers.
You need to find the largest prime value and return the sum of its digits. | result = sum(int(digit) for digit in str(maxx))
return result
| [] | SingleLineInfilling/HumanEval/94/L11 | code_infilling | i+=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]",
... |
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 ... | HumanEval_SingleLineInfillingLight | skjkasdkd | python | python | [
[
"[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]",
... |
[] | You are given a list of integers.
You need to find the largest prime value and return the sum of its digits. | return result
| [] | SingleLineInfilling/HumanEval/94/L12 | code_infilling | result = sum(int(digit) for digit in str(maxx))
| [
[
"[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]",
... |
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 ... | HumanEval_SingleLineInfillingLight | skjkasdkd | python | python | [
[
"[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]",
... |
[] | You are given a list of integers.
You need to find the largest prime value and return the sum of its digits. | [] | SingleLineInfilling/HumanEval/94/L13 | code_infilling | return result
| [
[
"[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]",
... |
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 ... | HumanEval_SingleLineInfillingLight | skjkasdkd | python | python | [
[
"[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]",
... | |
[] | 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. | 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.islo... | [] | SingleLineInfilling/HumanEval/95/L0 | code_infilling | if len(dict.keys()) == 0:
| [
[
"{\"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"
],
[
"{\... |
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.
"""
| HumanEval_SingleLineInfillingLight | check_dict_case | python | python | [
[
"{\"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"
]... |
[] | 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. | 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():
... | [] | SingleLineInfilling/HumanEval/95/L1 | code_infilling | return False
| [
[
"{\"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"
],
[
"{\... |
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:
| HumanEval_SingleLineInfillingLight | check_dict_case | python | python | [
[
"{\"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"
]... |
[] | 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. | 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():
stat... | [] | SingleLineInfilling/HumanEval/95/L2 | code_infilling | 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"
],
[
"{\... |
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
| HumanEval_SingleLineInfillingLight | check_dict_case | python | python | [
[
"{\"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"
]... |
[] | 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. | 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"
... | [] | SingleLineInfilling/HumanEval/95/L3 | code_infilling | state = "start"
| [
[
"{\"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"
],
[
"{\... |
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:
| HumanEval_SingleLineInfillingLight | check_dict_case | python | python | [
[
"{\"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"
]... |
[] | 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 isinstance(key, str) == False:
state = "mixed"
break
if state == "start":
if key.isupper():
state = "upper"
elif key.islower():
state = "lower"
else:
br... | [] | SingleLineInfilling/HumanEval/95/L4 | code_infilling | for key in dict.keys():
| [
[
"{\"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"
],
[
"{\... |
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:
... | HumanEval_SingleLineInfillingLight | check_dict_case | python | python | [
[
"{\"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"
]... |
[] | 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. | state = "mixed"
break
if state == "start":
if key.isupper():
state = "upper"
elif key.islower():
state = "lower"
else:
break
elif (state == "upper" and not ... | [] | SingleLineInfilling/HumanEval/95/L6 | code_infilling | if isinstance(key, str) == False:
| [
[
"{\"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"
],
[
"{\... |
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:
... | HumanEval_SingleLineInfillingLight | check_dict_case | python | python | [
[
"{\"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"
]... |
[] | 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. | 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 == "low... | [] | SingleLineInfilling/HumanEval/95/L7 | code_infilling | state = "mixed"
| [
[
"{\"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"
],
[
"{\... |
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:
... | HumanEval_SingleLineInfillingLight | check_dict_case | python | python | [
[
"{\"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"
]... |
[] | 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 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.islowe... | [] | SingleLineInfilling/HumanEval/95/L8 | code_infilling | 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"
],
[
"{\... |
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:
... | HumanEval_SingleLineInfillingLight | check_dict_case | python | python | [
[
"{\"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"
]... |
[] | 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 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 =... | [] | SingleLineInfilling/HumanEval/95/L9 | code_infilling | if state == "start":
| [
[
"{\"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"
],
[
"{\... |
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:
... | HumanEval_SingleLineInfillingLight | check_dict_case | python | python | [
[
"{\"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"
]... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.