Datasets:
task_id string | prompt string | test string |
|---|---|---|
HumanEval/0 | ```burmese
from typing import List
def has_close_elements(numbers: List[float], threshold: float) -> bool:
""" ပေးထားသော ဂဏန်းများစာရင်း (list) ထဲတွင် မည်သည့် ဂဏန်းနှစ်ခုမဆို အချင်းချင်း အကွာအဝေးသည် သတ်မှတ်ထားသော threshold ထက် နည်းပါသလားဆိုတာ စစ်ဆေးပါ။
>>> has_close_elements([1.0, 2.0, 3.0], 0.5)
False
... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate([1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3) == True
assert candidate([1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.05) == False
assert candidate([1.0, 2.0, 5.9, 4.0, 5.0], 0.95) == True
assert candidate([1.0, 2.0, 5.9, 4.0,... |
HumanEval/1 | ```burmese
from typing import List
def separate_paren_groups(paren_string: str) -> List[str]:
""" ဤ function ၏ input သည် nested parentheses အုပ်စုများစွာပါဝင်သော string တစ်ခုဖြစ်သည်။ သင်၏ ရည်ရွယ်ချက်မှာ ထိုအုပ်စုများကို သီးခြား string များအဖြစ် ခွဲထုတ်ပြီး ထို string များ၏ list အဖြစ်ပြန်လည်ပေးပို့ရန်ဖြစ်သည်။
သ... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate('(()()) ((())) () ((())()())') == [
'(()())', '((()))', '()', '((())()())'
]
assert candidate('() (()) ((())) (((())))') == [
'()', '(())', '((()))', '(((())))'
]
assert candidate('(()... |
HumanEval/2 | ```burmese
def truncate_number(number: float) -> float:
""" ပေးထားသော positive floating point number တစ်ခုအား integer အပိုင်း (ပေးထားသော ဂဏန်းထက်ငယ်သော အကြီးဆုံး integer) နှင့် decimal အပိုင်း (အမြဲတမ်း 1 ထက်ငယ်သော ကျန်ရှိသောအပိုင်း) ဟူ၍ ခွဲခြမ်းစိတ်ဖြာနိုင်သည်။
ထိုဂဏန်း၏ decimal အပိုင်းကို ပြန်လည်ထုတ်ပေးပါ။
... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate(3.5) == 0.5
assert abs(candidate(1.33) - 0.33) < 1e-6
assert abs(candidate(123.456) - 0.456) < 1e-6
|
HumanEval/3 | ```burmese
from typing import List
def below_zero(operations: List[int]) -> bool:
""" သုည (zero) balance ဖြင့် စတင်သော ဘဏ်အကောင့်တစ်ခုတွင် အပ်ငွေနှင့် ထုတ်ငွေ (deposit and withdrawal) လည်ပတ်မှုများ (operations) ၏ list တစ်ခုကို ပေးထားပါသည်။ သင်၏တာဝန်မှာ အကောင့်၏ balance သည် မည်သည့်အချိန်တွင်မဆို သုညအောက်သို့ ကျဆင်း... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate([]) == False
assert candidate([1, 2, -3, 1, 2, -3]) == False
assert candidate([1, 2, -4, 5, 6]) == True
assert candidate([1, -1, 2, -2, 5, -5, 4, -4]) == False
assert candidate([1, -1, 2, -2, 5, -5, 4... |
HumanEval/4 | ```burmese
from typing import List
def mean_absolute_deviation(numbers: List[float]) -> float:
""" ပေးထားသော numbers list အတွက်၊ ဤ dataset ၏ ပျမ်းမျှတန်ဖိုး (mean) ဝန်းကျင်ရှိ Mean Absolute Deviation ကို တွက်ချက်ပါ။
Mean Absolute Deviation ဆိုသည်မှာ တစ်ခုချင်းစီ၏ element နှင့် centerpoint (ဤကိစ္စတွင် mean) တို... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert abs(candidate([1.0, 2.0, 3.0]) - 2.0/3.0) < 1e-6
assert abs(candidate([1.0, 2.0, 3.0, 4.0]) - 1.0) < 1e-6
assert abs(candidate([1.0, 2.0, 3.0, 4.0, 5.0]) - 6.0/5.0) < 1e-6
|
HumanEval/5 | ```burmese
from typing import List
def intersperse(numbers: List[int], delimeter: int) -> List[int]:
""" ပေးထားသော numbers list ၏ အဆက် (consecutive elements) နှစ်ခုကြားတွင် 'delimeter' ဂဏန်းကို ထည့်သွင်းပေးမည့် function တစ်ခုကို ရေးသားပါ။
>>> intersperse([], 4)
[]
>>> intersperse([1, 2, 3], 4)
[1, ... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate([], 7) == []
assert candidate([5, 6, 3, 2], 8) == [5, 8, 6, 8, 3, 8, 2]
assert candidate([2, 2, 2], 2) == [2, 2, 2, 2, 2]
|
HumanEval/6 | ```burmese
from typing import List
def parse_nested_parens(paren_string: str) -> List[int]:
""" ဤ function ၏ input သည် space ဖြင့် ခြားထားသော nested parentheses group အများအပြားပါဝင်သည့် string ဖြစ်သည်။
ထို group တစ်ခုချင်းစီအတွက် parentheses ၏ အနက်ရှိုင်းဆုံး အဆင့်ကို (level) ကို output ပေးရမည်။
ဥပမာအားဖြ... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate('(()()) ((())) () ((())()())') == [2, 3, 1, 3]
assert candidate('() (()) ((())) (((())))') == [1, 2, 3, 4]
assert candidate('(()(())((())))') == [4]
|
HumanEval/7 | ```burmese
from typing import List
def filter_by_substring(strings: List[str], substring: str) -> List[str]:
""" ပေးထားသော string များစာရင်း (list of strings) ထဲမှ substring ပါ၀င်သော string များကိုသာ စစ်ထုတ်ပေးမည့် function တစ်ခုကို ရေးသားပါ။
>>> filter_by_substring([], 'a')
[]
>>> filter_by_substring(... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate([], 'john') == []
assert candidate(['xxx', 'asd', 'xxy', 'john doe', 'xxxAAA', 'xxx'], 'xxx') == ['xxx', 'xxxAAA', 'xxx']
assert candidate(['xxx', 'asd', 'aaaxxy', 'john doe', 'xxxAAA', 'xxx'], 'xx') == ['xxx... |
HumanEval/8 | ```burmese
typing မှ List, Tuple များကို import ပြုလုပ်ပါ။
ပေးထားသော integer numbers များပါဝင်သည့် list တစ်ခုအတွက်၊ ထို list ရှိ ဂဏန်းများအားလုံး၏ ပေါင်းလဒ် (sum) နှင့် မြှောက်လဒ် (product) တို့ပါဝင်သော tuple တစ်ခုကို ပြန်ပေးမည့် function တစ်ခု ရေးသားပါ။ List ထဲတွင် ဂဏန်းများမရှိပါက (empty list) ပေါင်းလဒ် (sum) သည် 0 ... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate([]) == (0, 1)
assert candidate([1, 1, 1]) == (3, 1)
assert candidate([100, 0]) == (100, 0)
assert candidate([3, 5, 7]) == (3 + 5 + 7, 3 * 5 * 7)
assert candidate([10]) == (10, 10)
|
HumanEval/9 | ```burmese
from typing import List, Tuple
def rolling_max(numbers: List[int]) -> List[int]:
""" ပေးထားသော integer list တစ်ခုမှ စတင်ပြီး၊ ထိုစဉ်အထိ တွေ့ရှိသမျှ element များ၏ အကြီးဆုံးတန်ဖိုး (rolling maximum) ပါဝင်သော list အသစ်တစ်ခုကို ထုတ်ပေးပါ။
>>> rolling_max([1, 2, 3, 2, 3, 4, 2])
[1, 2, 3, 3, 3, 4, 4]
... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate([]) == []
assert candidate([1, 2, 3, 4]) == [1, 2, 3, 4]
assert candidate([4, 3, 2, 1]) == [4, 4, 4, 4]
assert candidate([3, 2, 3, 100, 3]) == [3, 3, 3, 100, 100]
|
HumanEval/10 | ```burmese
def is_palindrome(string: str) -> bool:
""" ပေးထားသော string သည် palindrome စာလုံး (ရှေ့နောက်အတူတူ) ဟုတ်/မဟုတ် စစ်ဆေးပါ။ """
return string == string[::-1]
def make_palindrome(string: str) -> str:
""" ပေးထားသော string ဖြင့် စတင်သည့် အတိုဆုံး palindrome စာလုံးကို ရှာပါ။
Algorithm ၏ idea မှာ အ... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate('') == ''
assert candidate('x') == 'x'
assert candidate('xyz') == 'xyzyx'
assert candidate('xyx') == 'xyx'
assert candidate('jerry') == 'jerryrrej'
|
HumanEval/11 | ```burmese
from typing import List
def string_xor(a: str, b: str) -> str:
""" 1s နှင့် 0s များသာပါဝင်သော strings နှစ်ခု a နှင့် b ကို input အဖြစ်ရယူပါ။
ထို inputs များပေါ်တွင် binary XOR ကိုလုပ်ဆောင်ပြီး ရလဒ်ကို string အဖြစ်ပြန်ပေးပါ။
>>> string_xor('010', '110')
'100'
"""
XOR opera... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate('111000', '101010') == '010010'
assert candidate('1', '1') == '0'
assert candidate('0101', '0000') == '0101'
|
HumanEval/12 | ```burmese
from typing import List, Optional
def longest(strings: List[str]) -> Optional[str]:
""" စာသား (string) စာရင်း (list) ထဲမှ အရှည်ဆုံး စာသားကို ပြန်ပေးပါ။ တူညီတဲ့အရှည်ရှိတဲ့ စာသားတွေ အများကြီးရှိခဲ့ရင် ရှေ့ဆုံးတစ်ခုကို ပြန်ပေးပါ။ အကယ်၍ input list က empty ဖြစ်ခဲ့လျှင် None ကိုပြန်ပေးပါ။
>>> longest([])
... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate([]) == None
assert candidate(['x', 'y', 'z']) == 'x'
assert candidate(['x', 'yyy', 'zzzz', 'www', 'kkkk', 'abc']) == 'zzzz'
|
HumanEval/13 | ```burmese
def greatest_common_divisor(a: int, b: int) -> int:
""" Return a greatest common divisor of two integers a and b
>>> greatest_common_divisor(3, 5)
1
>>> greatest_common_divisor(25, 15)
5
"""
Burmese: Integer နှစ်ခု (a နှင့် b) ၏ အကြီးဆုံး ဘုံစား (greatest common divisor) ကို ပြန်လည်... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate(3, 7) == 1
assert candidate(10, 15) == 5
assert candidate(49, 14) == 7
assert candidate(144, 60) == 12
|
HumanEval/14 | ```burmese
from typing import List
def all_prefixes(string: str) -> List[str]:
""" ပေးထားသော string မှ အတိုဆုံးမှ အရှည်ဆုံး prefixes များအားလုံးကို list အဖြစ်ပြန်ပေးပါ
>>> all_prefixes('abc')
['a', 'ab', 'abc']
"""
ပေးထားသော string မှ အစမှစ၍ အဆုံးထိ ဖြတ်ယူထားသော prefixes (prefix) အားလုံးကို အတိုဆုံ... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate('') == []
assert candidate('asdfgh') == ['a', 'as', 'asd', 'asdf', 'asdfg', 'asdfgh']
assert candidate('WWW') == ['W', 'WW', 'WWW']
|
HumanEval/15 | ```burmese
def string_sequence(n: int) -> str:
""" 0 မှစပြီး n အထိ (inclusive) ဂဏန်းများကို space ဖြင့် ခြား၍ string တစ်ခုအဖြစ် ပြန်ပေးမည့် function တစ်ခု ရေးပါ။
>>> string_sequence(0)
'0'
>>> string_sequence(5)
'0 1 2 3 4 5'
"""
function ကိုရေးသားပါ။
``` |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate(0) == '0'
assert candidate(3) == '0 1 2 3'
assert candidate(10) == '0 1 2 3 4 5 6 7 8 9 10'
|
HumanEval/16 | string တစ်ခုတွင် ပါဝင်သော ထူးခြားသည့် ဇာတ်ကောင် (character) အရေအတွက်ကို ရှာဖွေပေးမည့် function တစ်ခုကို ရေးသားပါ။ (case မခွဲခြားပါ)။
ဥပမာ-
`count_distinct_characters('xyzXYZ')` သည် 3 ကို ပြန်လည်ပေးရပါမည်။
`count_distinct_characters('Jerry')` သည် 4 ကို ပြန်လည်ပေးရပါမည်။ |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate('') == 0
assert candidate('abcde') == 5
assert candidate('abcde' + 'cade' + 'CADE') == 5
assert candidate('aaaaAAAAaaaa') == 1
assert candidate('Jerry jERRY JeRRRY') == 5
|
HumanEval/17 | ```burmese
from typing import List
def parse_music(music_string: str) -> List[int]:
""" ဤ function သို့ input အနေဖြင့် အထူး ASCII format ဖြင့် ဖော်ပြထားသော တေးဂီတမှတ်စုများပါဝင်သည့် string တစ်ခုဖြစ်သည်။ သင်၏တာဝန်မှာ ဤ string ကို parse လုပ်ပြီး မှတ်စုတစ်ခုစီ၏ အချိန်ကိုက်သံ (beats) အရေအတွက်နှင့် ကိုက်ညီသော integer l... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate('') == []
assert candidate('o o o o') == [4, 4, 4, 4]
assert candidate('.| .| .| .|') == [1, 1, 1, 1]
assert candidate('o| o| .| .| o o o o') == [2, 2, 1, 1, 4, 4, 4, 4]
assert candidate('o| .| o| .| ... |
HumanEval/18 | ```burmese
def how_many_times(string: str, substring: str) -> int:
""" ပေးထားသော string ထဲတွင် ပေးထားသော substring သည် မည်နှစ်ကြိမ် ပေါ်လာသည်ကို ရှာဖွေပါ။ Overlapping cases များကို ထည့်သွင်းရေတွက်ပါ။
>>> how_many_times('', 'a')
0
>>> how_many_times('aaa', 'a')
3
>>> how_many_times('aaaa', 'aa')
... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate('', 'x') == 0
assert candidate('xyxyxyx', 'x') == 4
assert candidate('cacacacac', 'cac') == 4
assert candidate('john doe', 'john') == 1
|
HumanEval/19 | ```burmese
from typing import List
def sort_numbers(numbers: str) -> str:
""" Input သည် 'zero' မှ 'nine' အထိ ဂဏန်းများကို space ဖြင့် ခြားထားသော string တစ်ခုဖြစ်သည်။
'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight' နှင့် 'nine' တို့သည် တရားဝင်ရွေးချယ်မှုများဖြစ်သည်။
ဂဏန်းများကို အငယ်ဆ... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate('') == ''
assert candidate('three') == 'three'
assert candidate('three five nine') == 'three five nine'
assert candidate('five zero four seven nine eight') == 'zero four five seven eight nine'
assert ... |
HumanEval/20 | ```burmese
from typing import List, Tuple
ပေးထားသော ဂဏန်းများစာရင်း (List) မှ အနီးဆုံး ဂဏန်းနှစ်ခုကို ရွေးချယ်ပြီး အစဉ်အတိုင်း (ငယ်စဉ်ကြီးလိုက်) ပြန်ပေးမည့် function တစ်ခုကို ရေးသားပါ။ function သည် input အနေဖြင့် float type ဂဏန်းများပါဝင်သော list တစ်ခု (အနည်းဆုံး element နှစ်ခုပါဝင်ရပါမည်) ကို ယူပြီး output အနေဖြင့် t... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate([1.0, 2.0, 3.9, 4.0, 5.0, 2.2]) == (3.9, 4.0)
assert candidate([1.0, 2.0, 5.9, 4.0, 5.0]) == (5.0, 5.9)
assert candidate([1.0, 2.0, 3.0, 4.0, 5.0, 2.2]) == (2.0, 2.2)
assert candidate([1.0, 2.0, 3.0, 4.0,... |
HumanEval/21 | ```burmese
from typing import List
def rescale_to_unit(numbers: List[float]) -> List[float]:
""" အနည်းဆုံး ဒြပ်စင် (element) နှစ်ခုရှိသော ဂဏန်းများ၏ list တစ်ခုအား ပေးထားပါက၊ ထို list ပေါ်တွင် linear transform တစ်ခု အသုံးပြုပါ။ ထိုသို့ပြုလုပ်ရာတွင် အသေးငယ်ဆုံး ဂဏန်းသည် 0 ဖြစ်လာပြီး အကြီးဆုံး ဂဏန်းသည် 1 ဖြစ်လာပါစေ။
... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate([2.0, 49.9]) == [0.0, 1.0]
assert candidate([100.0, 49.9]) == [1.0, 0.0]
assert candidate([1.0, 2.0, 3.0, 4.0, 5.0]) == [0.0, 0.25, 0.5, 0.75, 1.0]
assert candidate([2.0, 1.0, 5.0, 3.0, 4.0]) == [0.25, 0.... |
HumanEval/22 | ```burmese
from typing import List, Any
def filter_integers(values: List[Any]) -> List[int]:
""" ပေးထားသော Python တန်ဖိုးများ (values) ပါဝင်သည့် list မှ integer အမျိုးအစား (type) များကိုသာ စစ်ထုတ်ပေးပါ။
>>> filter_integers(['a', 3.14, 5])
[5]
>>> filter_integers([1, 2, 3, 'abc', {}, []])
[1, 2, 3]
... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate([]) == []
assert candidate([4, {}, [], 23.2, 9, 'adasd']) == [4, 9]
assert candidate([3, 'c', 3, 3, 'a', 'b']) == [3, 3, 3]
|
HumanEval/23 | ```burmese
def strlen(string: str) -> int:
""" ပေးထားသော string ၏ length ကို ပြန်လည်ပေးပို့ပါ (return)
>>> strlen('')
0
>>> strlen('abc')
3
"""
ပေးထားသော string ၏ length ကို ပြန်လည်ပေးပို့မည့် function တစ်ခုကို ရေးသားပါ။
``` |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate('') == 0
assert candidate('x') == 1
assert candidate('asdasnakj') == 9
|
HumanEval/24 | ပေးထားသော ကိန်းဂဏန်း n အတွက် n ကို အကြွင်းမဲ့ ပိုင်းစားနိုင်ပြီး n ထက်ငယ်သော အကြီးဆုံး ကိန်းကို ရှာဖွေပေးမည့် function တစ်ခုကို ရေးသားပါ။ (Python function) |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate(3) == 1
assert candidate(7) == 1
assert candidate(10) == 5
assert candidate(100) == 50
assert candidate(49) == 7
|
HumanEval/25 | ```burmese
from typing import List
def factorize(n: int) -> List[int]:
""" ပေးထားသော integer ၏ prime factor များ၏ list ကို အငယ်ဆုံးမှ အကြီးဆုံးသို့ စီပြီးပြန်ပေးပါ။
Factor တစ်ခုစီတိုင်းသည် factorization တွင် မည်မျှအကြိမ် ပေါ်လာသည်ကို လိုက်၍ အရေအတွက် အကြိမ်ရေအတိုင်း စာရင်းပြုစုရပါမည်။
ထည့်သွင်းသည့် ဂဏန်းသည်... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate(2) == [2]
assert candidate(4) == [2, 2]
assert candidate(8) == [2, 2, 2]
assert candidate(3 * 19) == [3, 19]
assert candidate(3 * 19 * 3 * 19) == [3, 3, 19, 19]
assert candidate(3 * 19 * 3 * 19 * ... |
HumanEval/26 | ```burmese
from typing import List
def remove_duplicates(numbers: List[int]) -> List[int]:
""" Integer numbers list တစ်ခုမှ နှစ်ကြိမ်ထက်ပို၍ပါဝင်သော ဂဏန်းများကို ဖယ်ရှားပါ။
ထွက်လာသော list ၏ element များ၏ order သည် input list တွင်ပါသည့်အတိုင်း ရှိရပါမည်။
>>> remove_duplicates([1, 2, 3, 2, 4])
[1, 3, 4]
... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate([]) == []
assert candidate([1, 2, 3, 4]) == [1, 2, 3, 4]
assert candidate([1, 2, 3, 2, 4, 3, 5]) == [1, 4, 5]
|
HumanEval/27 | ပေးထားသော string တစ်ခု၏ lowercase အက္ခရာများကို uppercase သို့လည်းကောင်း၊ uppercase အက္ခရာများကို lowercase သို့လည်းကောင်း ပြောင်းလဲပေးမည့် function တစ်ခုကို ရေးသားပါ။ (function သည် Python တွင်ရှိသော string methods များကို အသုံးပြု၍ရေးသားပါ။) |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate('') == ''
assert candidate('Hello!') == 'hELLO!'
assert candidate('These violent delights have violent ends') == 'tHESE VIOLENT DELIGHTS HAVE VIOLENT ENDS'
|
HumanEval/28 | ```burmese
from typing import List
def concatenate(strings: List[str]) -> str:
""" List of strings များကို string တစ်ခုတည်းအဖြစ် ပေါင်းစပ်ပေးမည့် function တစ်ခုကို ရေးသားပါ။
>>> concatenate([])
''
>>> concatenate(['a', 'b', 'c'])
'abc'
"""
``` |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate([]) == ''
assert candidate(['x', 'y', 'z']) == 'xyz'
assert candidate(['x', 'y', 'z', 'w', 'k']) == 'xyzwk'
|
HumanEval/29 | ```burmese
from typing import List
def filter_by_prefix(strings: List[str], prefix: str) -> List[str]:
""" ပေးထားသော string များစာရင်း (List) မှ prefix တစ်ခုဖြင့် စတင်သော string များကိုသာ စစ်ထုတ်ပေးမည့် function တစ်ခုကို ရေးသားပါ။
>>> filter_by_prefix([], 'a')
[]
>>> filter_by_prefix(['abc', 'bcd', 'cd... |
METADATA = {
'author': 'jt',
'dataset': 'test'
}
def check(candidate):
assert candidate([], 'john') == []
assert candidate(['xxx', 'asd', 'xxy', 'john doe', 'xxxAAA', 'xxx'], 'xxx') == ['xxx', 'xxxAAA', 'xxx']
|
HumanEval/30 | ပေးထားသော list ထဲမှ positive numbers များသာ ပြန်လည်ထုတ်ပေးမည့် function တစ်ခုကို ရေးသားပါ။
```python
def get_positive(l: list):
"""Return only positive numbers in the list.
>>> get_positive([-1, 2, -4, 5, 6])
[2, 5, 6]
>>> get_positive([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])
[5, 3, 2, 3, 9, 123, 1]... |
METADATA = {}
def check(candidate):
assert candidate([-1, -2, 4, 5, 6]) == [4, 5, 6]
assert candidate([5, 3, -5, 2, 3, 3, 9, 0, 123, 1, -10]) == [5, 3, 2, 3, 3, 9, 123, 1]
assert candidate([-1, -2]) == []
assert candidate([]) == []
|
HumanEval/31 | ပေးထားသော ကိန်းဂဏန်း (integer) တစ်ခုသည် prime number ဟုတ်/မဟုတ် စစ်ဆေးပေးမည့် Python function တစ်ခုကို ရေးသားပါ။ function သည် prime number ဖြစ်ပါက True ကိုပြန်ပေးရမည်ဖြစ်ပြီး၊ မဟုတ်ပါက False ကို ပြန်ပေးရပါမည်။
```python
def is_prime(n):
"""Return true if a given number is prime, and false otherwise.
>>> is_pri... |
METADATA = {}
def check(candidate):
assert candidate(6) == False
assert candidate(101) == True
assert candidate(11) == True
assert candidate(13441) == True
assert candidate(61) == True
assert candidate(4) == False
assert candidate(1) == False
assert candidate(5) == True
assert ca... |
HumanEval/32 | ```burmese
import math
def poly(xs: list, x: float):
"""
Polynomial ၏ coefficients xs များကို x နေရာတွင် တွက်ချက်ခြင်း။
return xs[0] + xs[1] * x + xs[1] * x^2 + .... xs[n] * x^n
"""
return sum([coeff * math.pow(x, i) for i, coeff in enumerate(xs)])
def find_zero(xs: list):
""" xs သည် polynomia... |
METADATA = {}
def check(candidate):
import math
import random
rng = random.Random(42)
import copy
for _ in range(100):
ncoeff = 2 * rng.randint(1, 4)
coeffs = []
for _ in range(ncoeff):
coeff = rng.randint(-10, 10)
if coeff == 0:
co... |
HumanEval/33 | ```burmese
def sort_third(l: list): ဟူသော function သည် list 'l' ကို ယူ၍ l' list ကို ပြန်ပေးပါမည်။ ထို l' သည် l ၏ နေရာ (index) အရေအတွက် (3) ဖြင့် ပိုင်းပိုင်းခြား၍ မရသော နေရာများတွင် l နှင့် တူညီပြီး၊ (3) ဖြင့် ပိုင်းပိုင်းခြား၍ ရသော နေရာများ၏ တန်ဖိုးများသည် l ၏ သက်ဆိုင်ရာ နေရာများ၏ တန်ဖိုးများနှင့် တူညီသော်လည်း စီထားပြ... |
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple(sort_third([1, 2, 3]))
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple(sort_third([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10]))
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple(so... |
HumanEval/34 | ```burmese
l: list ပေးထားတဲ့ list ထဲကနေ ထပ်တူ (duplicate) မရှိတဲ့ ဂဏန်းတွေကို စီပြီး ပြန်ပေးမယ့် function တစ်ခု (Python function) ကို ရေးသားပါ။ function ရဲ့ output ကတော့ ငယ်စဉ်ကြီးလိုက် (ascending order) စီထားတဲ့ list တစ်ခု ဖြစ်ရပါမယ်။ ဥပမာ- [5, 3, 5, 2, 3, 3, 9, 0, 123] ဆိုရင် [0, 2, 3, 5, 9, 123] ကို ပြန်ပေးရပါမယ်။
`... |
METADATA = {}
def check(candidate):
assert candidate([5, 3, 5, 2, 3, 3, 9, 0, 123]) == [0, 2, 3, 5, 9, 123]
|
HumanEval/35 | ```burmese
def max_element(l: list):
"""List ထဲရှိ အကြီးဆုံး element ကို ပြန်လည်ပေးပို့ပါ။
>>> max_element([1, 2, 3])
3
>>> max_element([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])
123
"""
List ထဲရှိ အကြီးဆုံး element ကို ပြန်လည်ပေးပို့မည့် function တစ်ခုကို ရေးသားပါ။
``` |
METADATA = {}
def check(candidate):
assert candidate([1, 2, 3]) == 3
assert candidate([5, 3, -5, 2, -3, 3, 9, 0, 124, 1, -10]) == 124
|
HumanEval/36 | ပေးထားသော integer n ထက်ငယ်ပြီး ၁၁ (11) (သို့) ၁၃ (13) ဖြင့် ပိုင်းပိုင်းနိုင်သော ကိန်းဂဏန်းများတွင် ၇ (7) ဂဏန်းမည်မျှပါဝင်သည်ကို ပြန်လည်ပေးပို့မည့် (return) Python function တစ်ခုကို ရေးသားပါ။ function name သည် "fizz_buzz" ဖြစ်ရပါမည်။ |
METADATA = {}
def check(candidate):
assert candidate(50) == 0
assert candidate(78) == 2
assert candidate(79) == 3
assert candidate(100) == 3
assert candidate(200) == 6
assert candidate(4000) == 192
assert candidate(10000) == 639
assert candidate(100000) == 8026
|
HumanEval/37 | ```burmese
def sort_even(l: list):
"""ဤ function သည် list l ကို ယူ၍ list l' ကို ပြန်ပေးပါမည်။
ထို list l' တွင် odd indicies များ၌ l နှင့် တူညီပြီး၊ even indicies တွင် l ၏ even indicies များကို စီထားသော တန်ဖိုးများ (sorted values) ဖြစ်ပါမည်။
>>> sort_even([1, 2, 3])
[1, 2, 3]
>>> sort_even([5, 6, 3, ... |
METADATA = {}
def check(candidate):
assert tuple(candidate([1, 2, 3])) == tuple([1, 2, 3])
assert tuple(candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])) == tuple([-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123])
assert tuple(candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])) == tuple([-12, 8, 3, 4, 5, 2, 12, 1... |
HumanEval/38 | ```burmese
def encode_cyclic(s: str) (function):
"""
အုပ်စုသုံးလုံးစီလှည့်၍ စာသားကို ကုဒ်သွင်းပေးသည်။
"""
# စာသားကို အုပ်စုများခွဲပါ။ တစ်ခုစီ၏အလျားသည် ၃ ဖြစ်သည်။
groups = [s[(3 * i):min((3 * i + 3), len(s))] for i in range((len(s) + 2) // 3)]
# အုပ်စုတစ်ခုစီရှိ စာလုံးများကို လှည့်ပါ။ အုပ်စုတွင် ... |
METADATA = {}
def check(candidate):
from random import randint, choice
import string
letters = string.ascii_lowercase
for _ in range(100):
str = ''.join(choice(letters) for i in range(randint(10, 20)))
encoded_str = encode_cyclic(str)
assert candidate(encoded_str) == str
|
HumanEval/39 | ```burmese
def prime_fib(n: int) ၏ လုပ်ဆောင်ချက် (function) ကို ရေးသားပေးပါ။ ဤ function သည် Fibonacci ဂဏန်းဖြစ်ပြီး prime ဂဏန်းလည်းဖြစ်သော n-th ဂဏန်းကို ပြန်လည်ပေးပို့ပါမည်။
>>> prime_fib(1)
2
>>> prime_fib(2)
3
>>> prime_fib(3)
5
>>> prime_fib(4)
13
>>> prime_fib(5)
89
``` |
METADATA = {}
def check(candidate):
assert candidate(1) == 2
assert candidate(2) == 3
assert candidate(3) == 5
assert candidate(4) == 13
assert candidate(5) == 89
assert candidate(6) == 233
assert candidate(7) == 1597
assert candidate(8) == 28657
assert candidate(9) == 514229
... |
HumanEval/40 | ပေးထားသော integer list တစ်ခုတွင် သုံးခုသော ကွဲပြားသည့် ဂဏန်းများ၏ ပေါင်းလဒ်သည် သုည (zero) ဖြစ်ပေါ်လာပါက True ကိုပြန်ပေးပြီး၊ မဟုတ်ပါက False ကိုပြန်ပေးမည့် function တစ်ခု (Python function) ကို ရေးသားပါ။ |
METADATA = {}
def check(candidate):
assert candidate([1, 3, 5, 0]) == False
assert candidate([1, 3, 5, -1]) == False
assert candidate([1, 3, -2, 1]) == True
assert candidate([1, 2, 3, 7]) == False
assert candidate([1, 2, 5, 7]) == False
assert candidate([2, 4, -5, 3, 9, 7]) == True
asser... |
HumanEval/41 | ```burmese
def car_race_collision(n: int):
"""
စံပြအနေနဲ့ တွေးကြည့်ရအောင်၊ အဆုံးမရှိ ဖြောင့်တန်းတဲ့ လမ်းကြောင်းတစ်ခုပေါ်မှာ ကားတွေ ပြေးနေတယ်လို့ ယူဆရအောင်။
n စီးသော ကားများသည် ဘယ်မှ ညာသို့ မောင်းနှင်နေကြပြီး၊ n စီးသော အခြားကားများသည် ညာမှ ဘယ်သို့ တစ်ပြိုင်နက်တည်း မောင်းနှင်နေကြသည်။
ကားနှစ်စင်းသည် တစ်စီး... |
METADATA = {}
def check(candidate):
assert candidate(2) == 4
assert candidate(3) == 9
assert candidate(4) == 16
assert candidate(8) == 64
assert candidate(10) == 100
|
HumanEval/42 | ```burmese
def incr_list(l: list):
"""List ၏ elements များကို 1 ဖြင့် တိုးမြှင့်ပေးသော list အသစ်ကို ပြန်ပေးပါ။
>>> incr_list([1, 2, 3])
[2, 3, 4]
>>> incr_list([5, 3, 5, 2, 3, 3, 9, 0, 123])
[6, 4, 6, 3, 4, 4, 10, 1, 124]
"""
List (l) ထဲရှိ element တစ်ခုချင်းစီကို 1 ဖြင့် ပေါင်းပြီး list အသစ... |
METADATA = {}
def check(candidate):
assert candidate([]) == []
assert candidate([3, 2, 1]) == [4, 3, 2]
assert candidate([5, 2, 5, 2, 3, 3, 9, 0, 123]) == [6, 3, 6, 3, 4, 4, 10, 1, 124]
|
HumanEval/43 | ```burmese
def pairs_sum_to_zero(l):
"""
pairs_sum_to_zero သည် integer များပါဝင်သော list တစ်ခုကို input အဖြစ် ယူသည်။
ထို list ထဲတွင် ပေါင်းလဒ် သုည (zero) ရရှိသော သီးခြား elements နှစ်ခုရှိပါက True ကိုပြန်ပေးပြီး၊ မရှိပါက False ကိုပြန်ပေးသည်။
>>> pairs_sum_to_zero([1, 3, 5, 0])
False
>>> pairs_su... |
METADATA = {}
def check(candidate):
assert candidate([1, 3, 5, 0]) == False
assert candidate([1, 3, -2, 1]) == False
assert candidate([1, 2, 3, 7]) == False
assert candidate([2, 4, -5, 3, 5, 7]) == True
assert candidate([1]) == False
assert candidate([-3, 9, -1, 3, 2, 30]) == True
asser... |
HumanEval/44 | ပေးထားသော ကိန်းဂဏန်း x ကို base အဖြစ်သို့ ပြောင်းလဲပေးမည့် function တစ်ခုကို ရေးသားပါ။ ထို့နောက် ပြောင်းလဲပြီးရရှိလာသော string ကိုပြန်လည်ပေးပို့ပါ။ base တန်ဖိုးများသည် ၁၀ ထက်နည်းရပါမည်။ ဥပမာ -
```
>>> change_base(8, 3)
'22'
>>> change_base(8, 2)
'1000'
>>> change_base(7, 2)
'111'
``` |
METADATA = {}
def check(candidate):
assert candidate(8, 3) == "22"
assert candidate(9, 3) == "100"
assert candidate(234, 2) == "11101010"
assert candidate(16, 2) == "10000"
assert candidate(8, 2) == "1000"
assert candidate(7, 2) == "111"
for x in range(2, 8):
assert candidate(x, ... |
HumanEval/45 | တြိဂံ၏ အနံ (a) နှင့် အမြင့် (h) တို့ကိုပေး၍ ဧရိယာ (area) ကို ပြန်လည်ပေးပို့မည့် function တစ်ခုကို ရေးသားပါ။
Python (function) ၏ signature မှာ `def triangle_area(a, h):` ဖြစ်ရပါမည်။
(Docstring) တွင် ပါဝင်သည့် ဥပမာ -
```python
>>> triangle_area(5, 3)
7.5
```
ဤအတိုင်း (area) ကို တွက်ချက်ပေးပါ။ |
METADATA = {}
def check(candidate):
assert candidate(5, 3) == 7.5
assert candidate(2, 2) == 2.0
assert candidate(10, 8) == 40.0
|
HumanEval/46 | def fib4(n: int) ၏ sequence ကို တွက်ချက်ပေးမည့် function တစ်ခုရေးသားပါ။ Fib4 sequence ဆိုသည်မှာ Fibbonacci sequence နှင့် ဆင်တူပြီး အောက်ပါအတိုင်း သတ်မှတ်သည်-
fib4(0) -> 0
fib4(1) -> 0
fib4(2) -> 2
fib4(3) -> 0
fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4)
Recursion ကို အသုံးမပြုဘဲ ထိရောက်စွာ တွက်ချက်နိုင်အေ... |
METADATA = {}
def check(candidate):
assert candidate(5) == 4
assert candidate(8) == 28
assert candidate(10) == 104
assert candidate(12) == 386
|
HumanEval/47 | List `l` ထဲရှိ ဒြပ်စင်များ၏ median ကို ပြန်လည်ပေးပို့မည့် (return) Python function တစ်ခုကို ရေးသားပါ။ |
METADATA = {}
def check(candidate):
assert candidate([3, 1, 2, 4, 5]) == 3
assert candidate([-10, 4, 6, 1000, 10, 20]) == 8.0
assert candidate([5]) == 5
assert candidate([6, 5]) == 5.5
assert candidate([8, 1, 3, 9, 9, 2, 7]) == 7
|
HumanEval/48 | ပေးထားသော စာသား (text) သည် palindrome ဖြစ်/မဖြစ် စစ်ဆေးပေးမည့် Python function တစ်ခုကို ရေးသားပါ။ function name သည် `is_palindrome` ဖြစ်ရပါမည်။ Function documentation (docstring) တွင် ဥပမာများ ထည့်သွင်းပေးရပါမည်။ |
METADATA = {}
def check(candidate):
assert candidate('') == True
assert candidate('aba') == True
assert candidate('aaaaa') == True
assert candidate('zbcd') == False
assert candidate('xywyx') == True
assert candidate('xywyz') == False
assert candidate('xywzx') == False
|
HumanEval/49 | ```burmese
def modp(n: int, p: int):
"""2^n modulo p ကို ပြန်လည်ထုတ်ပေးပါ။ (ဂဏန်းများကို သတိထားပါ။)
>>> modp(3, 5)
3
>>> modp(1101, 101)
2
>>> modp(0, 101)
1
>>> modp(3, 11)
8
>>> modp(100, 101)
1
"""
Python function တစ်ခုအနေဖြင့် 2^n ကို p ဖြင့် modulo တွက်ချက်ပြီး တ... |
METADATA = {}
def check(candidate):
assert candidate(3, 5) == 3
assert candidate(1101, 101) == 2
assert candidate(0, 101) == 1
assert candidate(3, 11) == 8
assert candidate(100, 101) == 1
assert candidate(30, 5) == 4
assert candidate(31, 5) == 3
|
HumanEval/50 | ```burmese
def encode_shift(s: str) function သည် စာလုံးတိုင်းအား alphabet ၏ ၅ နေရာရွှေ့ကာ encoded လုပ်ထားသော string ကို ပြန်ပေးပါသည် (return)။
def decode_shift(s: str) function သည် encode_shift function ဖြင့် encoded လုပ်ထားသော string ကို input အဖြစ် ယူပြီး decoded string ကို ပြန်ပေးပါသည် (return)။
``` |
METADATA = {}
def check(candidate):
from random import randint, choice
import copy
import string
letters = string.ascii_lowercase
for _ in range(100):
str = ''.join(choice(letters) for i in range(randint(10, 20)))
encoded_str = encode_shift(str)
assert candidate(copy.dee... |
HumanEval/51 | ```burmese
def remove_vowels(text):
"""
remove_vowels သည် string တစ်ခုကို လက်ခံပြီး သရ (vowels) မပါဝင်သော string ကိုပြန်ပေးသည့် function ဖြစ်ပါသည်။
>>> remove_vowels('')
''
>>> remove_vowels("abcdef\nghijklm")
'bcdf\nghjklm'
>>> remove_vowels('abcdef')
'bcdf'
>>> remove_vowels('aaaaa... |
METADATA = {}
def check(candidate):
assert candidate('') == ''
assert candidate("abcdef\nghijklm") == 'bcdf\nghjklm'
assert candidate('fedcba') == 'fdcb'
assert candidate('eeeee') == ''
assert candidate('acBAA') == 'cB'
assert candidate('EcBOO') == 'cB'
assert candidate('ybcd') == 'ybcd'... |
HumanEval/52 | List 'l' ထဲရှိ ကိန်းဂဏန်းအားလုံးသည် threshold 't' ထက်ငယ်ပါက True ပြန်ပေးပြီး၊ မဟုတ်ပါက False ပြန်ပေးမည့် function တစ်ခုကို ရေးသားပါ။ function ကိုရေးသားရာတွင် List comprehension (သို့) for loop ကို အသုံးပြုပါ။ |
METADATA = {}
def check(candidate):
assert candidate([1, 2, 4, 10], 100)
assert not candidate([1, 20, 4, 10], 5)
assert candidate([1, 20, 4, 10], 21)
assert candidate([1, 20, 4, 10], 22)
assert candidate([1, 8, 4, 10], 11)
assert not candidate([1, 8, 4, 10], 10)
|
HumanEval/53 | ```burmese
def add(x: int, y: int):
"""ဂဏန်း နှစ်ခု x နှင့် y ကို ပေါင်းပေးပါ။
>>> add(2, 3)
5
>>> add(5, 7)
12
"""
ဂဏန်း နှစ်ခု x နှင့် y ကို ပေါင်းလဒ်ပြန်ပေးမည့် (return) function တစ်ခု ရေးသားပါ။
``` |
METADATA = {}
def check(candidate):
import random
assert candidate(0, 1) == 1
assert candidate(1, 0) == 1
assert candidate(2, 3) == 5
assert candidate(5, 7) == 12
assert candidate(7, 5) == 12
for i in range(100):
x, y = random.randint(0, 1000), random.randint(0, 1000)
a... |
HumanEval/54 | ```burmese
def same_chars(s0: str, s1: str):
"""
စကားလုံးနှစ်ခုမှာ တူညီတဲ့ ဇာတ်ကောင် (characters) တွေ ရှိသလားဆိုတာ စစ်ဆေးပါ။
>>> same_chars('eabcdzzzz', 'dddzzzzzzzddeddabc')
True
>>> same_chars('abcd', 'dddddddabc')
True
>>> same_chars('dddddddabc', 'abcd')
True
>>> same_chars('eabc... |
METADATA = {}
def check(candidate):
assert candidate('eabcdzzzz', 'dddzzzzzzzddeddabc') == True
assert candidate('abcd', 'dddddddabc') == True
assert candidate('dddddddabc', 'abcd') == True
assert candidate('eabcd', 'dddddddabc') == False
assert candidate('abcd', 'dddddddabcf') == False
asse... |
HumanEval/55 | ```burmese
def fib(n: int):
"""n-th Fibonacci ဂဏန်းကို ပြန်ပေးမည်။
>>> fib(10)
55
>>> fib(1)
1
>>> fib(8)
21
"""
``` |
METADATA = {}
def check(candidate):
assert candidate(10) == 55
assert candidate(1) == 1
assert candidate(8) == 21
assert candidate(11) == 89
assert candidate(12) == 144
|
HumanEval/56 | ```burmese
def correct_bracketing(brackets: str) အတွက် - "<" နှင့် ">" ဇာတ်ကောင်များပါဝင်သော string တစ်ခုဖြစ်သည်။ ဖွင့်လှစ်ထားသော bracket တစ်ခုစီတိုင်းတွင် ပိတ်သိမ်း bracket တစ်ခုစီရှိပါက True ပြန်ပေးပါ။
>>> correct_bracketing("<")
False
>>> correct_bracketing("<>")
True
>>> correct_bracketing("<<><>>")
True
>>> co... |
METADATA = {}
def check(candidate):
assert candidate("<>")
assert candidate("<<><>>")
assert candidate("<><><<><>><>")
assert candidate("<><><<<><><>><>><<><><<>>>")
assert not candidate("<<<><>>>>")
assert not candidate("><<>")
assert not candidate("<")
assert not candidate("<<<<")
... |
HumanEval/57 | ```burmese
def monotonic(l: list):
"""List ၏ elements များသည် တဖြည်းဖြည်း တက်လာခြင်း (monotonically increasing) သို့မဟုတ် ကျဆင်းလာခြင်း (monotonically decreasing) ရှိပါက True ပြန်ပေးသော function တစ်ခု ရေးသားပါ။
>>> monotonic([1, 2, 4, 20])
True
>>> monotonic([1, 20, 4, 10])
False
>>> monotonic([... |
METADATA = {}
def check(candidate):
assert candidate([1, 2, 4, 10]) == True
assert candidate([1, 2, 4, 20]) == True
assert candidate([1, 20, 4, 10]) == False
assert candidate([4, 1, 0, -10]) == True
assert candidate([4, 1, 1, 0]) == True
assert candidate([1, 2, 3, 2, 5, 60]) == False
ass... |
HumanEval/58 | ```burmese
def common(l1: list, l2: list):
"""List နှစ်ခု (list) စလုံးမှာ ပါဝင်တဲ့ တူညီတဲ့ element တွေကို စီပြီး (sorted) unique ဖြစ်အောင်ပြန်ပေးမယ့် function တစ်ခုရေးပါ။
>>> common([1, 4, 3, 34, 653, 2, 5], [5, 7, 1, 5, 9, 653, 121])
[1, 5, 653]
>>> common([5, 3, 2, 8], [3, 2])
[2, 3]
"""
``` |
METADATA = {}
def check(candidate):
assert candidate([1, 4, 3, 34, 653, 2, 5], [5, 7, 1, 5, 9, 653, 121]) == [1, 5, 653]
assert candidate([5, 3, 2, 8], [3, 2]) == [2, 3]
assert candidate([4, 3, 2, 8], [3, 2, 4]) == [2, 3, 4]
assert candidate([4, 3, 2, 8], []) == []
|
HumanEval/59 | ```burmese
def largest_prime_factor(n: int):
"""n ၏ အကြီးဆုံး ပရိုင်းဖက်တာ (prime factor) ကို ပြန်ပေးမည်။ n သည် 1 ထက်ကြီးပြီး prime number မဟုတ်ဟု ယူဆပါ။
>>> largest_prime_factor(13195)
29
>>> largest_prime_factor(2048)
2
"""
n ၏ အကြီးဆုံး ပရိုင်းဖက်တာ (largest prime factor) ကို ရှာဖွေပေးမည... |
METADATA = {}
def check(candidate):
assert candidate(15) == 5
assert candidate(27) == 3
assert candidate(63) == 7
assert candidate(330) == 11
assert candidate(13195) == 29
|
HumanEval/60 | ```burmese
def sum_to_n(n: int): ဟူသော function သည် 1 မှ n အထိရှိသော ဂဏန်းများကို ပေါင်းလဒ်တွက်ပေးပါသည်။
``` |
METADATA = {}
def check(candidate):
assert candidate(1) == 1
assert candidate(6) == 21
assert candidate(11) == 66
assert candidate(30) == 465
assert candidate(100) == 5050
|
HumanEval/61 | ```burmese
def correct_bracketing(brackets: str):
""" brackets သည် "(" နှင့် ")" ဇာတ်ကောင်များပါဝင်သော string တစ်ခုဖြစ်သည်။
ဖွင့်လှစ်ထားသော bracket တစ်ခုစီတိုင်းတွင် ၎င်းနှင့်သက်ဆိုင်သောပိတ် bracket ရှိပါက True ပြန်ပေးပါ။
>>> correct_bracketing("(")
False
>>> correct_bracketing("()")
True
>... |
METADATA = {}
def check(candidate):
assert candidate("()")
assert candidate("(()())")
assert candidate("()()(()())()")
assert candidate("()()((()()())())(()()(()))")
assert not candidate("((()())))")
assert not candidate(")(()")
assert not candidate("(")
assert not candidate("((((")
... |
HumanEval/62 | ```burmese
def derivative(xs: list) အတွက် function တစ်ခုရေးပါ။ ၎င်းသည် polynomial တစ်ခု၏ coefficients များကို ကိုယ်စားပြုသည်။ xs[0] + xs[1] * x + xs[2] * x^2 + .... ပုံစံမျိုးပါ။ ဤ polynomial ၏ derivative ကို တူညီသောပုံစံဖြင့် ပြန်ပေးပါ။
``` |
METADATA = {}
def check(candidate):
assert candidate([3, 1, 2, 4, 5]) == [1, 4, 12, 20]
assert candidate([1, 2, 3]) == [2, 6]
assert candidate([3, 2, 1]) == [2, 2]
assert candidate([3, 2, 1, 0, 4]) == [2, 2, 0, 16]
assert candidate([1]) == []
|
HumanEval/63 | ```burmese
def fibfib(n: int) အတွက်၊ အောက်ပါအတိုင်း သတ်မှတ်ထားသော FibFib ဂဏန်းစဉ် (number sequence) အတွက် n-th element ကို တွက်ချက်ပေးမယ့် function တစ်ခု ရေးသားပေးပါ။
fibfib(0) == 0
fibfib(1) == 0
fibfib(2) == 1
fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3)
ထိရောက်စွာ တွက်ချက်နိုင်အောင် ရေးသားပေးပါ။
>>> fibfib(1... |
METADATA = {}
def check(candidate):
assert candidate(2) == 1
assert candidate(1) == 0
assert candidate(5) == 4
assert candidate(8) == 24
assert candidate(10) == 81
assert candidate(12) == 274
assert candidate(14) == 927
|
HumanEval/64 | ```burmese
FIX = """
စမ်းသပ်မှု (test case) များကို ထပ်မံထည့်သွင်းပါ။
"""
def vowels_count(s):
""" စကားလုံး (word) တစ်ခုကို input အဖြစ် ယူပြီး၊ ထိုစကားလုံးထဲရှိ သရ (vowels) အရေအတွက်ကို ပြန်လည်ပေးပို့မည့် vowels_count function တစ်ခုကို ရေးသားပါ။ သရများ (vowels) ဆိုသည်မှာ 'a', 'e', 'i', 'o', 'u' တို့ဖြစ်သည်။ ဤနေရာတွ... | def check(candidate):
# Check some simple cases
assert candidate("abcde") == 2, "Test 1"
assert candidate("Alone") == 3, "Test 2"
assert candidate("key") == 2, "Test 3"
assert candidate("bye") == 1, "Test 4"
assert candidate("keY") == 2, "Test 5"
assert candidate("bYe") == 1, "Test 6"
a... |
HumanEval/65 | ```burmese
def circular_shift(x, shift): ၏ လုပ်ဆောင်ချက် (function) ကို ရေးသားပါ။ ၎င်းသည် ကိန်းပြည့် x ၏ ဂဏန်းများကို circular shift လုပ်ပေးပါမည်။ shift တန်ဖိုးအရ ညာဘက်သို့ ဂဏန်းများကို ရွှေ့ပြောင်းပေးပြီး ရလဒ်ကို string အဖြစ် ပြန်လည်ပေးပို့ပါမည်။ shift တန်ဖိုးသည် ဂဏန်းအရေအတွက်ထက်ကြီးပါက ဂဏန်းများကို ပြောင်းပြန်လှန်ပြီ... | def check(candidate):
# Check some simple cases
assert candidate(100, 2) == "001"
assert candidate(12, 2) == "12"
assert candidate(97, 8) == "79"
assert candidate(12, 1) == "21", "This prints if this assert fails 1 (good for debugging!)"
# Check some edge cases that are easy to work out by han... |
HumanEval/66 | ```burmese
def digitSum(s):
"""Task
String တစ်ခုကို input အဖြစ် ယူပြီး uppercase character များ၏ ASCII code ပေါင်းလဒ်ကို ပြန်ပေးမည့် function တစ်ခုကို ရေးသားပါ။
ဥပမာများ:
digitSum("") => 0
digitSum("abAB") => 131
digitSum("abcCd") => 67
digitSum("helloE") => 69
digit... | def check(candidate):
# Check some simple cases
assert True, "This prints if this assert fails 1 (good for debugging!)"
assert candidate("") == 0, "Error"
assert candidate("abAB") == 131, "Error"
assert candidate("abcCd") == 67, "Error"
assert candidate("helloE") == 69, "Error"
assert candi... |
HumanEval/67 | ```burmese
def fruit_distribution(s, n):
"""
ဤ Task တွင် သစ်သီးခြင်းတောင်းတစ်ခုအတွင်း ဖြန့်ဝေထားသော ပန်းသီးနှင့် လိမ္မော်သီးအရေအတွက်ကို ကိုယ်စားပြုသော string တစ်ခုကို ပေးပါမည်။ ဤခြင်းတောင်းတွင် ပန်းသီး၊ လိမ္မော်သီးနှင့် သရက်သီးများ ပါဝင်ပါသည်။ လိမ္မော်သီးနှင့် ပန်းသီးအရေအတွက် စုစုပေါင်းကို ကိုယ်စားပြုသော string... | def check(candidate):
# Check some simple cases
assert candidate("5 apples and 6 oranges",19) == 8
assert candidate("5 apples and 6 oranges",21) == 10
assert candidate("0 apples and 1 oranges",3) == 2
assert candidate("1 apples and 0 oranges",3) == 2
assert candidate("2 apples and 3 oranges",10... |
HumanEval/68 | ```burmese
def pluck(arr): ၏ လုပ်ဆောင်ချက် (function) အတွက် -
"ပေးထားသော array သည် non-negative integer nodes များပါဝင်သော သစ်ပင် (tree) တစ်ခု၏ အကိုင်းအခက်ကို ကိုယ်စားပြုသည်ဟု ယူဆပါ။ သင်၏တာဝန်မှာ nodes များထဲမှ တစ်ခုကို ရွေးထုတ်ပြီး ပြန်လည်ပေးပို့ရန် ဖြစ်သည်။ ရွေးထုတ်လိုက်သော node သည် အငယ်ဆုံး even တန်ဖိုး (value) ရှိသ... | def check(candidate):
# Check some simple cases
assert True, "This prints if this assert fails 1 (good for debugging!)"
assert candidate([4,2,3]) == [2, 1], "Error"
assert candidate([1,2,3]) == [2, 1], "Error"
assert candidate([]) == [], "Error"
assert candidate([5, 0, 3, 0, 4, 2]) == [0, 1], "... |
HumanEval/69 | ```burmese
def search(lst):
'''
ပေးထားသော positive integers များ၏ non-empty list တစ်ခုရှိပါသည်။ ထို list ထဲတွင် သုညထက်ကြီးသော integer တစ်ခုကို ရှာပါ။ ထို integer ၏ frequency (အရေအတွက်) သည် ထို integer တန်ဖိုးထက် ကြီးရမည် (သို့) ညီမျှရပါမည်။
Integer ၏ frequency ဆိုသည်မှာ ထို integer သည် list တွင် မည်မျှအကြိမ... | def check(candidate):
# manually generated tests
assert candidate([5, 5, 5, 5, 1]) == 1
assert candidate([4, 1, 4, 1, 4, 4]) == 4
assert candidate([3, 3]) == -1
assert candidate([8, 8, 8, 8, 8, 8, 8, 8]) == 8
assert candidate([2, 3, 3, 2, 2]) == 2
# automatically generated tests
assert... |
HumanEval/70 | ```burmese
def strange_sort_list(lst):
'''
ပေးထားသော integer list တစ်ခုအား ထူးဆန်းသောပုံစံဖြင့် စီပေးပါ။
ထူးဆန်းသော စီခြင်းဆိုသည်မှာ အသေးငယ်ဆုံးတန်ဖိုးဖြင့် စတင်၍ ကျန်ရှိသော integer များထဲမှ အကြီးဆုံးတန်ဖိုး၊ ထို့နောက် အသေးငယ်ဆုံး စသဖြင့် ဆက်လက်စီသွားခြင်း ဖြစ်သည်။
ဥပမာများ:
strange_sort_list([1, 2... | def check(candidate):
# Check some simple cases
assert candidate([1, 2, 3, 4]) == [1, 4, 2, 3]
assert candidate([5, 6, 7, 8, 9]) == [5, 9, 6, 8, 7]
assert candidate([1, 2, 3, 4, 5]) == [1, 5, 2, 4, 3]
assert candidate([5, 6, 7, 8, 9, 1]) == [1, 9, 5, 8, 6, 7]
assert candidate([5, 5, 5, 5]) == [... |
HumanEval/71 | def triangle_area(a, b, c):
'''
Given the lengths of the three sides of a triangle. Return the area of
the triangle rounded to 2 decimal points if the three sides form a valid triangle.
Otherwise return -1
Three sides make a valid triangle when the sum of any two sides is greater
than the thir... | def check(candidate):
# Check some simple cases
assert candidate(3, 4, 5) == 6.00, "This prints if this assert fails 1 (good for debugging!)"
assert candidate(1, 2, 10) == -1
assert candidate(4, 8, 5) == 8.18
assert candidate(2, 2, 2) == 1.73
assert candidate(1, 2, 3) == -1
assert candidate... |
HumanEval/72 | ```burmese
def will_it_fly(q,w): ၏ လုပ်ဆောင်ချက် (function) တစ်ခုကို ရေးသားပါ။ ဤ function သည် object q ပျံသန်းနိုင်ပါက True ကိုပြန်ပေးပြီး၊ မပျံသန်းနိုင်ပါက False ကိုပြန်ပေးရပါမည်။ object q သည် ၎င်း၏ ဂဏန်းများ (elements) ပေါင်းလဒ်သည် အများဆုံးခွင့်ပြုနိုင်သောအလေးချိန် w ထက်နည်းပါက (သို့မဟုတ်) ညီမျှပြီး မျှခြေညီသော (pal... | def check(candidate):
# Check some simple cases
assert candidate([3, 2, 3], 9) is True
assert candidate([1, 2], 5) is False
assert candidate([3], 5) is True
assert candidate([3, 2, 3], 1) is False
# Check some edge cases that are easy to work out by hand.
assert candidate([1, 2, 3], 6) is... |
HumanEval/73 | ```burmese
def smallest_change(arr):
"""
ပေးထားသော integer များ၏ array arr တစ်ခုအား palindromic array ဖြစ်စေရန် ပြောင်းလဲရန် လိုအပ်သော အနည်းဆုံး element အရေအတွက်ကို ရှာဖွေပါ။ Palindromic array ဆိုသည်မှာ ရှေ့မှ ဖတ်သည်ဖြစ်စေ၊ နောက်မှ ဖတ်သည်ဖြစ်စေ တူညီသော array ဖြစ်သည်။ ပြောင်းလဲမှုတစ်ခုတွင် element တစ်ခုအား အခြား... | def check(candidate):
# Check some simple cases
assert candidate([1,2,3,5,4,7,9,6]) == 4
assert candidate([1, 2, 3, 4, 3, 2, 2]) == 1
assert candidate([1, 4, 2]) == 1
assert candidate([1, 4, 4, 2]) == 1
# Check some edge cases that are easy to work out by hand.
assert candidate([1, 2, 3, 2... |
HumanEval/74 | ```burmese
def total_match(lst1, lst2):
'''
string list နှစ်ခုကို လက်ခံပြီး list တစ်ခုလုံးရှိ string များ၏ စုစုပေါင်း ဇာတ်ကောင် (characters) အရေအတွက်သည် အခြား list ထက်နည်းပါက ထို list ကို ပြန်ပေးသည့် function တစ်ခုကို ရေးသားပါ။
list နှစ်ခုလုံး၏ စုစုပေါင်း ဇာတ်ကောင်အရေအတွက် တူညီနေပါက ပထမ list ကို ပြန်ပေးပါ။... | def check(candidate):
# Check some simple cases
assert True, "This prints if this assert fails 1 (good for debugging!)"
assert candidate([], []) == []
assert candidate(['hi', 'admin'], ['hi', 'hi']) == ['hi', 'hi']
assert candidate(['hi', 'admin'], ['hi', 'hi', 'admin', 'project']) == ['hi', 'admin... |
HumanEval/75 | def is_multiply_prime(a):
"""ပေးထားသော ကိန်းဂဏန်းသည် (prime number) ၃ လုံး၏ မြှောက်လဒ်ဖြစ်ပါက True ကိုပြန်ပေးပြီး၊ မဟုတ်ပါက False ကိုပြန်ပေးမည့် function တစ်ခုကို ရေးသားပါ။ (a) သည် ၁၀၀ ထက်ငယ်သည်ဟု ယူဆပါ။
ဥပမာ-
is_multiply_prime(30) == True
30 = 2 * 3 * 5
""" | def check(candidate):
assert candidate(5) == False
assert candidate(30) == True
assert candidate(8) == True
assert candidate(10) == False
assert candidate(125) == True
assert candidate(3 * 5 * 7) == True
assert candidate(3 * 6 * 7) == False
assert candidate(9 * 9 * 9) == False
asser... |
HumanEval/76 | ```burmese
def is_simple_power(x, n):
"""သင့်အနေဖြင့် x ဟူသော ဂဏန်းသည် n ၏ power တစ်ခု ဟုတ်/မဟုတ် ကို စစ်ဆေးပေးမည့် function တစ်ခု ရေးသားရပါမည်။
x သည် n ၏ power တစ်ခုဖြစ်သည်ဆိုသည်မှာ n**int=x ဖြစ်ခြင်းကို ဆိုလိုပါသည်။
ဥပမာအားဖြင့်-
is_simple_power(1, 4) => true
is_simple_power(2, 2) => true
is... | def check(candidate):
# Check some simple cases
assert candidate(16, 2)== True, "This prints if this assert fails 1 (good for debugging!)"
assert candidate(143214, 16)== False, "This prints if this assert fails 1 (good for debugging!)"
assert candidate(4, 2)==True, "This prints if this assert fails 1 (... |
HumanEval/77 | ```burmese
def iscube(a):
'''
Integer တစ်ခုဖြစ်သော a ကို input အဖြစ် ယူပြီး၊ ယင်း integer သည် အခြား integer တစ်ခု၏ cube ဖြစ်ပါက True, မဟုတ်ပါက False ကိုပြန်ပေးမည့် function တစ်ခုကို ရေးသားပါ။
မှတ်ချက်- input သည် အမြဲတမ်း မှန်ကန်သည်ဟု ယူဆပါ။
ဥပမာများ-
iscube(1) ==> True
iscube(2) ==> False
is... | def check(candidate):
# Check some simple cases
assert candidate(1) == True, "First test error: " + str(candidate(1))
assert candidate(2) == False, "Second test error: " + str(candidate(2))
assert candidate(-1) == True, "Third test error: " + str(candidate(-1))
assert candidate(64) == True, "Fourth... |
HumanEval/78 | Hexadecimal နံပါတ် (string) တစ်ခုကို လက်ခံပြီး prime ဂဏန်း (prime number) အရေအတွက်ကို ရေတွက်ပေးမည့် function တစ်ခုကို ရေးသားပါ။ Hexadecimal ဂဏန်းများမှာ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F ဖြစ်ပြီး၊ prime ဂဏန်းများမှာ 2, 3, 5, 7, B (decimal 11), D (decimal 13) တို့ဖြစ်သည်။ Function သည် ဤဂဏန်းများ၏ အရေအတွက်ကိ... | def check(candidate):
# Check some simple cases
assert candidate("AB") == 1, "First test error: " + str(candidate("AB"))
assert candidate("1077E") == 2, "Second test error: " + str(candidate("1077E"))
assert candidate("ABED1A33") == 4, "Third test error: " + str(candidate("ABED1A33"))
... |
HumanEval/79 | decimal တန်ဖိုးတစ်ခုကို လက်ခံရယူပြီး binary format အဖြစ်သို့ ပြောင်းပေးမည့် function တစ်ခု ရေးသားပါ။ Function သည် binary ဂဏန်းတစ်ခုစီကို ကိုယ်စားပြုသော စာလုံးများပါဝင်သည့် string တစ်ခုကို ပြန်လည်ပေးပို့ရပါမည်။ ထို string ရှိ စာလုံးတစ်ခုစီသည် '0' သို့မဟုတ် '1' ဖြစ်ရပါမည်။
String ၏ ရှေ့နှင့်နောက်တွင် 'db' ဟူသော စာလုံးအန... | def check(candidate):
# Check some simple cases
assert candidate(0) == "db0db"
assert candidate(32) == "db100000db"
assert candidate(103) == "db1100111db"
assert candidate(15) == "db1111db", "This prints if this assert fails 1 (good for debugging!)"
# Check some edge cases that are easy to wor... |
HumanEval/80 | ```burmese
def is_happy(s): (Python function)
ပေးထားတဲ့ string s ဟာ "happy" string ဟုတ်မဟုတ် စစ်ဆေးပေးပါ။ string တစ်ခုဟာ အနည်းဆုံး ဇာတ်ကောင် (character) ၃ လုံးရှိပြီး ၃ လုံးဆက်တိုက်ပါဝင်တဲ့ ဇာတ်ကောင်တွေကွဲပြားနေမှသာ "happy" string ဖြစ်ပါမယ်။ ဥပမာအားဖြင့် -
is_happy("a") => False
is_happy("aa") => False
is_happy("abcd")... | def check(candidate):
# Check some simple cases
assert candidate("a") == False , "a"
assert candidate("aa") == False , "aa"
assert candidate("abcd") == True , "abcd"
assert candidate("aabb") == False , "aabb"
assert candidate("adb") == True , "adb"
assert candidate("xyy") == False , "xyy"
... |
HumanEval/81 | Semester ၏ နောက်ဆုံးပတ်တွင် ဆရာမသည် ကျောင်းသားများ၏ အမှတ်များကို ပေးရပါမည်။ ဆရာမသည် သူမ၏ အမှတ်ပေးစနစ်အတွက် algorithm ကို အသုံးပြုခဲ့ပါသည်။ ပြဿနာမှာ အမှတ်ပေးစနစ်အတွက် code ပျောက်ဆုံးသွားခြင်းပင်ဖြစ်သည်။ သင်သည် ကျောင်းသားအချို့၏ GPA စာရင်းကို ရရှိထားပြီး အောက်ပါဇယားကို အသုံးပြု၍ letter grade စာရင်းကို ထုတ်ပေးမည့် functio... | def check(candidate):
# Check some simple cases
assert candidate([4.0, 3, 1.7, 2, 3.5]) == ['A+', 'B', 'C-', 'C', 'A-']
assert candidate([1.2]) == ['D+']
assert candidate([0.5]) == ['D-']
assert candidate([0.0]) == ['E']
assert candidate([1, 0.3, 1.5, 2.8, 3.3]) == ['D', 'D-', 'C-', 'B', 'B+']
... |
HumanEval/82 | ```burmese
def prime_length(string):
"""String တစ်ခုကို ယူပြီး ထို string ၏ length သည် prime number ဖြစ်ပါက True, မဟုတ်ပါက False ပြန်ပေးမည့် function တစ်ခုကို ရေးသားပါ။
ဥပမာများ
prime_length('Hello') == True
prime_length('abcdcba') == True
prime_length('kittens') == True
prime_length('orange') =... | def check(candidate):
# Check some simple cases
assert candidate('Hello') == True
assert candidate('abcdcba') == True
assert candidate('kittens') == True
assert candidate('orange') == False
assert candidate('wow') == True
assert candidate('world') == True
assert candidate('MadaM') == Tr... |
HumanEval/83 | ```burmese
def starts_one_ends(n):
"""
ပေးထားသော positive integer n အတွက်၊ ၁ ဖြင့် စတင်သော သို့မဟုတ် ၁ ဖြင့် အဆုံးသတ်သော n-ဂဏန်း positive integers အရေအတွက်ကို ပြန်လည်ပေးပါ။
"""
``` | def check(candidate):
# Check some simple cases
assert True, "This prints if this assert fails 1 (good for debugging!)"
assert candidate(1) == 1
assert candidate(2) == 18
assert candidate(3) == 180
assert candidate(4) == 1800
assert candidate(5) == 18000
# Check some edge cases that ar... |
HumanEval/84 | ```burmese
def solve(N):
"""ပေးထားသော အပေါင်းကိန်းပြည့် N တစ်ခုအတွက် ၎င်း၏ binary ဂဏန်းများ၏ စုစုပေါင်းကို ပြန်လည်ပေးပါ။
ဥပမာ
N = 1000 ဆိုပါက ဂဏန်းများ၏ ပေါင်းလဒ်သည် 1 ဖြစ်ပြီး output သည် "1" ဖြစ်ရပါမည်။
N = 150 ဆိုပါက ဂဏန်းများ၏ ပေါင်းလဒ်သည် 6 ဖြစ်ပြီး output သည် "110" ဖြစ်ရပါမည်။
N = ... | def check(candidate):
# Check some simple cases
assert True, "This prints if this assert fails 1 (good for debugging!)"
assert candidate(1000) == "1", "Error"
assert candidate(150) == "110", "Error"
assert candidate(147) == "1100", "Error"
# Check some edge cases that are easy to work out by h... |
HumanEval/85 | ```burmese
ပေးထားသော integer numbers များပါဝင်သည့် list (lst) တစ်ခုအား လက်ခံယူပြီး၊ odd indices များတွင်ရှိသော even numbers များကို ပေါင်းလဒ်တွက်ချက်ပေးမည့် function တစ်ခုကို ရေးသားပါ။ ဥပမာအားဖြင့် [4, 2, 6, 7] ဆိုပါက ရလဒ်အနေဖြင့် 2 ကို ပြန်လည်ပေးရပါမည်။
``` | def check(candidate):
# Check some simple cases
assert candidate([4, 88]) == 88
assert candidate([4, 5, 6, 7, 2, 122]) == 122
assert candidate([4, 0, 6, 7]) == 0
assert candidate([4, 4, 6, 8]) == 12
# Check some edge cases that are easy to work out by hand.
|
HumanEval/86 | ```burmese
def anti_shuffle(s):
"""
string တစ်ခုကို လက်ခံပြီး ၎င်း၏ စီထားသော (ordered) version ကို ပြန်လည်ပေးပို့မည့် function တစ်ခုကို ရေးသားပါ။
String ၏ စီထားသော version ဆိုသည်မှာ space ဖြင့် ခြားထားသော စကားလုံးအားလုံးကို ASCII တန်ဖိုးအလိုက် စီထားသော ဇာတ်ကောင်များဖြင့် အစားထိုးထားသော string တစ်ခုဖြစ်သည်။
... | def check(candidate):
# Check some simple cases
assert candidate('Hi') == 'Hi'
assert candidate('hello') == 'ehllo'
assert candidate('number') == 'bemnru'
assert candidate('abcd') == 'abcd'
assert candidate('Hello World!!!') == 'Hello !!!Wdlor'
assert candidate('') == ''
assert candidat... |
HumanEval/87 | ```burmese
def get_row(lst, x):
"""
Nested list များဖြင့် ဖွဲ့စည်းထားသော 2-dimensional data (matrix နှင့်ဆင်တူသော်လည်း row တိုင်းတွင် column အရေအတွက် မတူညီနိုင်ပါသည်) ကို လက်ခံရယူပါမည်။
lst နှင့် integer x တို့ကို လက်ခံရယူပြီး lst ထဲရှိ integer x ၏ နေရာများကိုရှာဖွေကာ tuple list တစ်ခုအဖြစ်ပြန်ပေးရပါမည်။ ထို... | def check(candidate):
# Check some simple cases
assert candidate([
[1,2,3,4,5,6],
[1,2,3,4,1,6],
[1,2,3,4,5,1]
], 1) == [(0, 0), (1, 4), (1, 0), (2, 5), (2, 0)]
assert candidate([
[1,2,3,4,5,6],
[1,2,3,4,5,6],
[1,2,3,4,5,6],
[1,2,3,4,5,6],
... |
HumanEval/88 | ```burmese
def sort_array(array):
"""
ပေးထားသော non-negative integers array တစ်ခုကို လက်ခံပြီး၊ ထို array ကို sort လုပ်ပြီး ပြန်ပေးပါ။
ပထမဆုံး index တန်ဖိုးနှင့် နောက်ဆုံး index တန်ဖိုးတို့၏ ပေါင်းလဒ်သည် l (odd) ဖြစ်ပါက ငယ်စဉ်ကြီးလိုက် (ascending order) ဖြင့် sort လုပ်ပါ။
ပေါင်းလဒ်သည် even ဖြစ်ပါက ကြီးစ... | def check(candidate):
# Check some simple cases
assert True, "This prints if this assert fails 1 (good for debugging!)"
assert candidate([]) == [], "Error"
assert candidate([5]) == [5], "Error"
assert candidate([2, 4, 3, 0, 1, 5]) == [0, 1, 2, 3, 4, 5], "Error"
assert candidate([2, 4, 3, 0, 1, ... |
HumanEval/89 | ```burmese
def encrypt(s):
"""String တစ်ခုအား argument အဖြစ်လက်ခံပြီး alphabet များကို လှည့်၍ encrypted ဖြစ်သော string တစ်ခုကို ပြန်ပေးမည့် function တစ်ခုကို ဖန်တီးပါ။
Alphabet များကို ၂ နေရာ မြှောက်၍ လျှော့ချပေးရပါမည်။
ဥပမာ-
encrypt('hi') သည် 'lm' ကို ပြန်ပေးပါမည်။
encrypt('asdfghjkl') သည် 'ewhjkln... | def check(candidate):
# Check some simple cases
assert candidate('hi') == 'lm', "This prints if this assert fails 1 (good for debugging!)"
assert candidate('asdfghjkl') == 'ewhjklnop', "This prints if this assert fails 1 (good for debugging!)"
assert candidate('gf') == 'kj', "This prints if this assert... |
HumanEval/90 | ```burmese
def next_smallest(lst):
"""
ပေးထားသော integer list တစ်ခုရှိပါသည်။
ထို list ထဲမှ ဒုတိယ အသေးငယ်ဆုံး element ကို ပြန်လည်ထုတ်ပေးမည့် next_smallest() function တစ်ခုကို ရေးသားပါ။
ထိုသို့သော element မရှိပါက None ကို ပြန်ပေးပါ။
ဥပမာ:
next_smallest([1, 2, 3, 4, 5]) == 2
next_smallest([5, ... | def check(candidate):
# Check some simple cases
assert candidate([1, 2, 3, 4, 5]) == 2
assert candidate([5, 1, 4, 3, 2]) == 2
assert candidate([]) == None
assert candidate([1, 1]) == None
assert candidate([1,1,1,1,0]) == 1
assert candidate([1, 0**0]) == None
assert candidate([-35, 34, 1... |
HumanEval/91 | ```burmese
def is_bored(S):
"""
စကားလုံးများပါဝင်သော string တစ်ခုကိုပေးပါမည်။ သင်၏တာဝန်မှာ "I" ဟူသောစကားလုံးဖြင့် စတင်သော စာကြောင်းအရေအတွက်ကို ရေတွက်ရန်ဖြစ်သည်။ စာကြောင်းများကို '.' ၊ '?' သို့မဟုတ် '!' တို့ဖြင့် ခြားထားသည်။
ဥပမာ-
>>> is_bored("Hello world")
0
>>> is_bored("The sky is blue. The ... | def check(candidate):
# Check some simple cases
assert candidate("Hello world") == 0, "Test 1"
assert candidate("Is the sky blue?") == 0, "Test 2"
assert candidate("I love It !") == 1, "Test 3"
assert candidate("bIt") == 0, "Test 4"
assert candidate("I feel good today. I will be productive. wil... |
HumanEval/92 | ```burmese
def any_int(x, y, z):
'''
ဂဏန်း (၃) လုံးကို ယူပြီး function တစ်ခု ဖန်တီးပါ။
ဂဏန်းတစ်ခုသည် အခြားဂဏန်းနှစ်ခု၏ ပေါင်းလဒ်နှင့် ညီမျှပြီး ဂဏန်းအားလုံးသည် integer များဖြစ်ပါက true ကို ပြန်ပေးပါ။
အခြားမည်သည့်အခြေအနေမျိုးတွင်မဆို false ကို ပြန်ပေးပါ။
ဥပမာများ
any_int(5, 2, 7) True
any_... | def check(candidate):
# Check some simple cases
assert candidate(2, 3, 1)==True, "This prints if this assert fails 1 (good for debugging!)"
assert candidate(2.5, 2, 3)==False, "This prints if this assert fails 2 (good for debugging!)"
assert candidate(1.5, 5, 3.5)==False, "This prints if this assert fa... |
HumanEval/93 | ```burmese
def encode(message):
"""
ပေးထားသောစာသား (message) ကို ယူပြီး စာလုံးအားလုံး၏ case (အကြီး/အသေး) ကို ပြောင်းလဲပေးကာ၊ vowel (သရ) အားလုံးကို အင်္ဂလိပ်အက္ခရာစဉ်တွင် ၎င်းသရ၏ ၂ နေရာအကွာရှိ စာလုံးဖြင့် အစားထိုးပေးမည့် function တစ်ခုကို ရေးသားပါ။
(ဥပမာ - a ကို c ဖြင့် အစားထိုးပါ)။
စာလုံးများသာပါဝင်သည်ဟ... | def check(candidate):
# Check some simple cases
assert candidate('TEST') == 'tgst', "This prints if this assert fails 1 (good for debugging!)"
assert candidate('Mudasir') == 'mWDCSKR', "This prints if this assert fails 2 (good for debugging!)"
assert candidate('YES') == 'ygs', "This prints if this asse... |
HumanEval/94 | ```burmese
def skjkasdkd(lst): ၏ လုပ်ဆောင်ချက် (function) အတွက် - သင်သည် integer များပါဝင်သော list တစ်ခုကို ရရှိထားပါသည်။ သင်သည် အကြီးဆုံး prime ဂဏန်းတန်ဖိုးကို ရှာဖွေပြီး ၎င်း၏ ဂဏန်းများ၏ ပေါင်းလဒ်ကို ပြန်လည်ပေးရပါမည်။
ဥပမာအားဖြင့် -
lst = [0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3] ဖြစ်ပါက output သည် 10 ဖြစ... | def check(candidate):
# Check some simple cases
assert candidate([0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3]) == 10, "This prints if this assert fails 1 (good for debugging!)"
# Check some edge cases that are easy to work out by hand.
assert candidate([1,0,1,8,2,4597,2,1,3,40,1,2,1,2,4,2,5,1]... |
HumanEval/95 | Dictionary တစ်ခုကို လက်ခံယူပြီး key အားလုံးသည် အသေးလုံး (lower case) ဖြင့်ရေးသားထားသော string များ (သို့) အကြီးလုံး (upper case) ဖြင့်ရေးသားထားသော string များ ဖြစ်ပါက True ကိုပြန်ပေးပါ။ မဟုတ်ပါက False ကိုပြန်ပေးပါ။ Dictionary ထဲတွင် key မရှိပါကလည်း False ကိုပြန်ပေးရပါမည်။ ဥပမာအားဖြင့် {"a":"apple", "b":"banana"} သည် Tr... | def check(candidate):
# Check some simple cases
assert candidate({"p":"pineapple", "b":"banana"}) == True, "First test error: " + str(candidate({"p":"pineapple", "b":"banana"}))
assert candidate({"p":"pineapple", "A":"banana", "B":"banana"}) == False, "Second test error: " + str(candidate({"p":"pineapple",... |
HumanEval/96 | ```burmese
def count_up_to(n):
""" ပေးထားသော integer မဟုတ်သောဂဏန်းတစ်ခု (non-negative integer) ကို ယူ၍ n ထက်ငယ်ပြီး ပထမဆုံးသော prime number များ၏ array ကိုပြန်ပေးမည့် function တစ်ခုကို ရေးသားပါ။
ဥပမာ-
count_up_to(5) => [2,3]
count_up_to(11) => [2,3,5,7]
count_up_to(0) => []
count_up_to(20) => [2... | def check(candidate):
assert candidate(5) == [2,3]
assert candidate(6) == [2,3,5]
assert candidate(7) == [2,3,5]
assert candidate(10) == [2,3,5,7]
assert candidate(0) == []
assert candidate(22) == [2,3,5,7,11,13,17,19]
assert candidate(1) == []
assert candidate(18) == [2,3,5,7,11,13,17]... |
HumanEval/97 | def multiply(a, b):
"""Complete the function that takes two integers and returns
the product of their unit digits.
Assume the input is always valid.
Examples:
multiply(148, 412) should return 16.
multiply(19, 28) should return 72.
multiply(2020, 1851) should return 0.
multiply(14,-15) s... | def check(candidate):
# Check some simple cases
assert candidate(148, 412) == 16, "First test error: " + str(candidate(148, 412))
assert candidate(19, 28) == 72, "Second test error: " + str(candidate(19, 28))
assert candidate(2020, 1851) == 0, "Third test error: " + str(c... |
HumanEval/98 | ```burmese
def count_upper(s):
"""
ပေးထားသော string s မှ စုံကိန်း (even index) တွင်ရှိသော အပေါ်ပိုင်းအက္ခရာ (uppercase vowel) အရေအတွက်ကို ရေတွက်ပါ။
ဥပမာ-
count_upper('aBCdEf') သည် 1 ကို ပြန်ပေးသည်။
count_upper('abcdefg') သည် 0 ကို ပြန်ပေးသည်။
count_upper('dBBE') သည် 0 ကို ပြန်ပေးသည်။
"""
... | def check(candidate):
# Check some simple cases
assert candidate('aBCdEf') == 1
assert candidate('abcdefg') == 0
assert candidate('dBBE') == 0
assert candidate('B') == 0
assert candidate('U') == 1
assert candidate('') == 0
assert candidate('EEEE') == 2
# Check some edge cases th... |
HumanEval/99 | ```burmese
def closest_integer(value):
'''
ဂဏန်းတစ်ခုကို ကိုယ်စားပြုသော (string) တန်ဖိုး (value) တစ်ခု ယူပြီး အနီးဆုံး integer ကို ပြန်ပေးသည့် function တစ်ခု ဖန်တီးပါ။ ဂဏန်းသည် integers နှစ်ခုနှင့် အကွာအဝေးတူနေပါက သုညမှ အဝေးသို့ (round away from zero) ဖြတ်ပါ။
ဥပမာများ
>>> closest_integer("10")
10
... | def check(candidate):
# Check some simple cases
assert candidate("10") == 10, "Test 1"
assert candidate("14.5") == 15, "Test 2"
assert candidate("-15.5") == -16, "Test 3"
assert candidate("15.3") == 15, "Test 3"
# Check some edge cases that are easy to work out by hand.
assert candidate("0... |
Burmese HumanEval: A Benchmark for Evaluating Burmese Coding Assistants
Dataset Summary
The Burmese HumanEval dataset is an expansion and translation of the original OpenAI HumanEval benchmark, tailored specifically for evaluating the coding abilities of Large Language Models (LLMs) in the Burmese language. It consists of 100 programming problems designed to test functional correctness, language understanding, and problem-solving skills in Burmese contexts.
This dataset pairs with the Burmese Coding Evaluation Suite, a novel 4-track evaluation methodology (Functional, Rubric-based, Linguistic, and Statistical) developed to robustly score Burmese programming assistants.
Supported Tasks and Leaderboards
text-generation: This dataset is designed to evaluate code generation capabilities given a Burmese natural language instruction or docstring. Models are typically evaluated using the pass@k metric (functional correctness) alongside qualitative LLM-as-a-judge scoring.
Languages
The natural language instructions and docstrings are in Burmese (my), while the programming language for the code is Python (en/python).
Dataset Structure
Data Instances
Each instance in the dataset represents a programming task. An example instance looks like this:
{
"task_id": "HumanEval/0",
"prompt": "```burmese\nfrom typing import List\n\ndef has_close_elements(numbers: List[float], threshold: float) -> bool:\n \"\"\" ပေးထားသော ဂဏန်းများစာရင်း (list) ထဲတွင် မည်သည့် ဂဏန်းနှစ်ခုမဆို အချင်းချင်း အကွာအဝေးသည် သတ်မှတ်ထားသော threshold ထက် နည်းပါသလားဆိုတာ စစ်ဆေးပါ။ ...",
"test": "\n\nMETADATA = {\n 'author': 'jt',\n 'dataset': 'test'\n}\n\n\ndef check(candidate):\n assert candidate([1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3) == True\n..."
}
Data Fields
task_id: A string indicating the task identifier, mapping to the original HumanEval ID.prompt: A string containing the function signature and a well-defined docstring describing the task in Burmese.test: A string containing the test cases (checkfunction) to functionally evaluate the generated code.
Dataset Creation
Curation Rationale
There is a significant lack of standardized coding evaluation benchmarks for the Burmese language. To address this, we standardized the dataset creation process by translating and expanding the canonical OpenAI HumanEval benchmark, allowing for standardized functional testing of Burmese coding models.
Source Data
Initial Data Collection and Normalization
The originating English instructions from the OpenAI HumanEval dataset were translated, localized, and technically normalized into formal Burmese by domain experts.
Who are the source language producers?
The original dataset instances were authored by the OpenAI Codex team. The Burmese translations and adaptations were produced by Dr. Wai Yan Nyein Naing and contributors to the burmese-coding-eval repository.
Considerations for Using the Data
Social Impact of Dataset
This dataset aims to democratize access to AI coding tools for Burmese speakers, encouraging the development of robust, multilingual code generation models that can reliably serve developers in Myanmar and beyond.
Additional Information
Dataset Curators
Dr. Wai Yan Nyein Naing (waiyan.nn18@gmail.com)
Licensing Information
This dataset is released under the MIT License, following the licensing of the original OpenAI HumanEval dataset.
Citation Information
If you use this benchmark dataset or the associated evaluation methodology, please cite both this repository and the original OpenAI HumanEval paper:
@misc{burmese_coding_eval_2026,
author = {Dr. Wai Yan Nyein Naing},
title = {Burmese Coding Evaluation Benchmark},
year = {2026},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\\url{https://github.com/WaiYanNyeinNaing/burmese-coding-eval}}
}
@article{chen2021codex,
title={Evaluating Large Language Models Trained on Code},
author={Mark Chen and Jerry Tworek and Heewoo Jun and Qiming Yuan and Henrique Ponde de Oliveira Pinto and Jared Kaplan and Harri Edwards and Yuri Burda and Nicholas Joseph and Greg Brockman and Alex Ray and Raul Puri and Gretchen Krueger and Michael Petrov and Heidy Khlaaf and Girish Sastry and Pamela Mishkin and Brooke Chan and Scott Gray and Nick Ryder and Mikhail Pavlov and Alethea Power and Lukasz Kaiser and Mohammad Bavarian and Clemens Winter and Philippe Tillet and Felipe Petroski Such and Dave Cummings and Matthias Plappert and Fotis Chantzis and Elizabeth Barnes and Ariel Herbert-Voss and William Guss and Alex Nichol and Alex Paino and Nikolas Tezak and Jie Tang and Igor Babuschkin and Suchir Balaji and Shantanu Jain and William Saunders and Christopher Hesse and Andrew N. Carr and Jan Leike and Josh Achiam and Vedant Misra and Evan Morikawa and Alec Radford and Matthew Knight and Miles Brundage and Mira Murati and Katie Mayer and Peter Welinder and Bob McGrew and Dario Amodei and Sam McCandlish and Ilya Sutskever and Wojciech Zaremba},
year={2021},
eprint={2107.03374},
archivePrefix={arXiv},
primaryClass={cs.LG}
}
- Downloads last month
- 53