CoolFace
Apppublic

reshinthadith/CodeGen-Diversity

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
0likes
collated_data.csv68130 linesDownload Raw Back to root
1,PC1,PC2,labels,values,prompts,prob_index20,3.5042703,0.005008956,embd_sc-3b-release_humaneval,"for i in range(len(numbers)):3        for j in range(i + 1, len(numbers)):4            if abs(numbers[i] - numbers[j]) < threshold:5                return True6    return False","from typing import List7 8 9def has_close_elements(numbers: List[float], threshold: float) -> bool:10    """""" Check if in given list of numbers, are any two numbers closer to each other than11    given threshold.12    >>> has_close_elements([1.0, 2.0, 3.0], 0.5)13    False14    >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)15    True16    """"""17",0181,3.6125972,-0.12634973,embd_sc-3b-release_humaneval,"for i in range(len(numbers) - 1):19        for j in range(i + 1, len(numbers)):20            if abs(numbers[i] - numbers[j]) < threshold:21                return True22    return False","from typing import List23 24 25def has_close_elements(numbers: List[float], threshold: float) -> bool:26    """""" Check if in given list of numbers, are any two numbers closer to each other than27    given threshold.28    >>> has_close_elements([1.0, 2.0, 3.0], 0.5)29    False30    >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)31    True32    """"""33",0342,-2.259092,-0.26904663,embd_ds-6.7b-release_humaneval,"numbers.sort()35    for i in range(len(numbers) - 1):36        if numbers[i+1] - numbers[i] < threshold:37            return True38    return False","from typing import List39 40 41def separate_paren_groups(paren_string: str) -> List[str]:42    """""" Input to this function is a string containing multiple groups of nested parentheses. Your goal is to43    separate those group into separate strings and return the list of those.44    Separate groups are balanced (each open brace is properly closed) and not nested within each other45    Ignore any spaces in the input string.46    >>> separate_paren_groups('( ) (( )) (( )( ))')47    ['()', '(())', '(()())']48    """"""49",0503,-2.1540294,-0.93258446,embd_ds-6.7b-release_humaneval,"numbers.sort()51    for i in range(len(numbers) - 1):52        if numbers[i+1] - numbers[i] < threshold:53            return True54    return False","from typing import List55 56 57def separate_paren_groups(paren_string: str) -> List[str]:58    """""" Input to this function is a string containing multiple groups of nested parentheses. Your goal is to59    separate those group into separate strings and return the list of those.60    Separate groups are balanced (each open brace is properly closed) and not nested within each other61    Ignore any spaces in the input string.62    >>> separate_paren_groups('( ) (( )) (( )( ))')63    ['()', '(())', '(()())']64    """"""65",0664,-2.1540294,-0.9325852,embd_ds-6.7b-release_humaneval,"numbers.sort()67    for i in range(1, len(numbers)):68        if numbers[i] - numbers[i - 1] < threshold:69            return True70    return False","from typing import List71 72 73def separate_paren_groups(paren_string: str) -> List[str]:74    """""" Input to this function is a string containing multiple groups of nested parentheses. Your goal is to75    separate those group into separate strings and return the list of those.76    Separate groups are balanced (each open brace is properly closed) and not nested within each other77    Ignore any spaces in the input string.78    >>> separate_paren_groups('( ) (( )) (( )( ))')79    ['()', '(())', '(()())']80    """"""81",0825,-1.282084,1.5457939,embd_ds-1.3b-inst-release_humaneval,"numbers.sort()83    for i in range(1, len(numbers)):84        if abs(numbers[i] - numbers[i-1]) < threshold:85            return True86    return False","87 88def truncate_number(number: float) -> float:89    """""" Given a positive floating point number, it can be decomposed into90    and integer part (largest integer smaller than given number) and decimals91    (leftover part always smaller than 1).92 93    Return the decimal part of the number.94    >>> truncate_number(3.5)95    0.596    """"""97",0986,3.6125968,-0.12634969,embd_ds-1.3b-inst-release_humaneval,"numbers.sort()99    for i in range(1, len(numbers)):100        if numbers[i] - numbers[i-1] < threshold:101            return True102    return False","103 104def truncate_number(number: float) -> float:105    """""" Given a positive floating point number, it can be decomposed into106    and integer part (largest integer smaller than given number) and decimals107    (leftover part always smaller than 1).108 109    Return the decimal part of the number.110    >>> truncate_number(3.5)111    0.5112    """"""113",01147,-1.7430475,1.5618639,embd_ds-1.3b-inst-release_humaneval,"for i in range(len(numbers)):115        for j in range(i + 1, len(numbers)):116            if abs(numbers[i] - numbers[j]) < threshold:117                return True118    return False","119 120def truncate_number(number: float) -> float:121    """""" Given a positive floating point number, it can be decomposed into122    and integer part (largest integer smaller than given number) and decimals123    (leftover part always smaller than 1).124 125    Return the decimal part of the number.126    >>> truncate_number(3.5)127    0.5128    """"""129",01308,-2.2590923,-0.26904663,embd_ds-1.3b-inst-release_humaneval,"numbers.sort()131    for i in range(len(numbers) - 1):132        if abs(numbers[i] - numbers[i + 1]) < threshold:133            return True134    return False","135 136def truncate_number(number: float) -> float:137    """""" Given a positive floating point number, it can be decomposed into138    and integer part (largest integer smaller than given number) and decimals139    (leftover part always smaller than 1).140 141    Return the decimal part of the number.142    >>> truncate_number(3.5)143    0.5144    """"""145",01469,-2.4906874,-0.33035377,embd_ds-1.3b-inst-release_humaneval,"numbers.sort()147    for i in range(1, len(numbers)):148        if numbers[i] - numbers[i - 1] < threshold:149            return True150    return False","151 152def truncate_number(number: float) -> float:153    """""" Given a positive floating point number, it can be decomposed into154    and integer part (largest integer smaller than given number) and decimals155    (leftover part always smaller than 1).156 157    Return the decimal part of the number.158    >>> truncate_number(3.5)159    0.5160    """"""161",016210,3.6125972,-0.12634969,embd_ds-33b-humaneval,"for i in range(len(numbers)):163        for j in range(i + 1, len(numbers)):164            if abs(numbers[i] - numbers[j]) < threshold:165                return True166    return False","from typing import List167 168 169def below_zero(operations: List[int]) -> bool:170    """""" You're given a list of deposit and withdrawal operations on a bank account that starts with171    zero balance. Your task is to detect if at any point the balance of account fallls below zero, and172    at that point function should return True. Otherwise it should return False.173    >>> below_zero([1, 2, 3])174    False175    >>> below_zero([1, 2, -4, 5])176    True177    """"""178",01790,1.0781486,-2.3467503,embd_sc-3b-release_humaneval,"paren_groups = []180    paren_stack = []181    for paren in paren_string:182        if paren == '(':183            paren_stack.append(paren)184        elif paren == ')':185            if len(paren_stack) == 0:186                raise ValueError('Unbalanced parentheses')187            paren_stack.pop()188        if len(paren_stack) == 0:189            paren_groups.append(paren_string[paren_string.index(paren) + 1 : paren_string.index(paren) + 1 + len(paren_stack) * 2])190    return paren_groups","from typing import List191 192 193def has_close_elements(numbers: List[float], threshold: float) -> bool:194    """""" Check if in given list of numbers, are any two numbers closer to each other than195    given threshold.196    >>> has_close_elements([1.0, 2.0, 3.0], 0.5)197    False198    >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)199    True200    """"""201",12021,1.0983976,-2.2828574,embd_sc-3b-release_humaneval,"paren_string = paren_string.strip()203    paren_list = []204    paren_stack = []205    for paren in paren_string:206        if paren == '(':207            paren_stack.append(paren)208        elif paren == ')':209            if len(paren_stack) == 0:210                raise ValueError(""Unbalanced parentheses"")211            paren_stack.pop()212            if len(paren_stack) == 0:213                paren_list.append(paren_string[len(paren_list):paren_string.index(paren)])214    if len(paren_stack) != 0:215        raise ValueError(""Unbalanced parentheses"")216    return paren_list","from typing import List217 218 219def has_close_elements(numbers: List[float], threshold: float) -> bool:220    """""" Check if in given list of numbers, are any two numbers closer to each other than221    given threshold.222    >>> has_close_elements([1.0, 2.0, 3.0], 0.5)223    False224    >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)225    True226    """"""227",12282,-1.6682487,0.7224472,embd_sc-3b-release_humaneval,"paren_groups = []229    paren_stack = []230    for paren in paren_string:231        if paren == '(':232            paren_stack.append(paren)233        elif paren == ')':234            if not paren_stack:235                raise ValueError('Unbalanced parentheses')236            paren_stack.pop()237            if not paren_stack:238                paren_groups.append(''.join(paren_stack))239    if paren_stack:240        raise ValueError('Unbalanced parentheses')241    return paren_groups","from typing import List242 243 244def has_close_elements(numbers: List[float], threshold: float) -> bool:245    """""" Check if in given list of numbers, are any two numbers closer to each other than246    given threshold.247    >>> has_close_elements([1.0, 2.0, 3.0], 0.5)248    False249    >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)250    True251    """"""252",12533,-1.579033,0.3728004,embd_sc-3b-release_humaneval,"paren_groups = []254    paren_stack = []255    for paren in paren_string:256        if paren == '(':257            paren_stack.append(paren)258        elif paren == ')':259            if not paren_stack:260                raise ValueError(""Unbalanced parentheses"")261            if paren_stack[-1] == '(':262                paren_stack.pop()263            else:264                raise ValueError(""Unbalanced parentheses"")265        else:266            raise ValueError(""Invalid character"")267    if paren_stack:268        raise ValueError(""Unbalanced parentheses"")269    paren_groups = [paren_string[i:j + 1] for i, j in zip(range(len(paren_string)),270                                                          range(len(paren_string), 0, -1)) if paren_string[i] == '(']271    return paren_groups","from typing import List272 273 274def has_close_elements(numbers: List[float], threshold: float) -> bool:275    """""" Check if in given list of numbers, are any two numbers closer to each other than276    given threshold.277    >>> has_close_elements([1.0, 2.0, 3.0], 0.5)278    False279    >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)280    True281    """"""282",12834,0.8683566,-2.3214898,embd_sc-3b-release_humaneval,"paren_list = []284    paren_stack = []285    for paren in paren_string:286        if paren == '(':287            paren_stack.append(paren)288        elif paren == ')':289            if len(paren_stack) == 0:290                raise ValueError(""Unbalanced parentheses"")291            if paren_stack[-1] == '(':292                paren_stack.pop()293            else:294                raise ValueError(""Unbalanced parentheses"")295        else:296            raise ValueError(""Invalid character"")297    if len(paren_stack) != 0:298        raise ValueError(""Unbalanced parentheses"")299    paren_list = [paren_string[i:j+1] for i, j in zip(range(len(paren_string)), range(1, len(paren_string)+1)) if paren_string[i] == '(' and paren_string[j] == ')']300    return paren_list","from typing import List301 302 303def has_close_elements(numbers: List[float], threshold: float) -> bool:304    """""" Check if in given list of numbers, are any two numbers closer to each other than305    given threshold.306    >>> has_close_elements([1.0, 2.0, 3.0], 0.5)307    False308    >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)309    True310    """"""311",13125,-1.7272563,0.7519353,embd_sc-3b-release_humaneval,"paren_groups = []313    paren_stack = []314    for paren in paren_string:315        if paren == '(':316            paren_stack.append(paren)317        elif paren == ')':318            if not paren_stack:319                raise ValueError('Unbalanced parentheses')320            paren_stack.pop()321            if not paren_stack:322                paren_groups.append(paren_string[len(paren_groups):len(paren_string) - len(paren_stack)])323    if paren_stack:324        raise ValueError('Unbalanced parentheses')325    return paren_groups","from typing import List326 327 328def has_close_elements(numbers: List[float], threshold: float) -> bool:329    """""" Check if in given list of numbers, are any two numbers closer to each other than330    given threshold.331    >>> has_close_elements([1.0, 2.0, 3.0], 0.5)332    False333    >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)334    True335    """"""336",13376,-1.7914414,0.80501276,embd_sc-3b-release_humaneval,"paren_string = paren_string.strip()338    paren_groups = []339    paren_stack = []340    for char in paren_string:341        if char == '(':342            paren_stack.append(char)343        elif char == ')':344            if not paren_stack:345                raise ValueError('Unbalanced parentheses')346            paren_stack.pop()347            if not paren_stack:348                paren_groups.append(paren_string[len(paren_groups) * 2:len(paren_stack) * 2])349    if paren_stack:350        raise ValueError('Unbalanced parentheses')351    return paren_groups","from typing import List352 353 354def has_close_elements(numbers: List[float], threshold: float) -> bool:355    """""" Check if in given list of numbers, are any two numbers closer to each other than356    given threshold.357    >>> has_close_elements([1.0, 2.0, 3.0], 0.5)358    False359    >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)360    True361    """"""362",13637,-1.6077102,0.56224316,embd_sc-3b-release_humaneval,"paren_stack = []364    paren_list = []365    for paren in paren_string:366        if paren == '(':367            paren_stack.append(paren)368        elif paren == ')':369            if len(paren_stack) == 0:370                raise ValueError('Unbalanced parentheses')371            paren_stack.pop()372        else:373            raise ValueError('Invalid input')374    if len(paren_stack) != 0:375        raise ValueError('Unbalanced parentheses')376    paren_list = [paren_string[i:j+1] for i, j in zip(range(len(paren_string)), range(len(paren_string), 0, -1))]377    return paren_list","from typing import List378 379 380def has_close_elements(numbers: List[float], threshold: float) -> bool:381    """""" Check if in given list of numbers, are any two numbers closer to each other than382    given threshold.383    >>> has_close_elements([1.0, 2.0, 3.0], 0.5)384    False385    >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)386    True387    """"""388",13898,-1.8601445,0.6414156,embd_sc-3b-release_humaneval,"paren_list = []390    paren_stack = []391    for paren in paren_string:392        if paren == '(':393            paren_stack.append(paren)394        elif paren == ')':395            if len(paren_stack) > 0:396                paren_stack.pop()397            else:398                paren_list.append(')')399        else:400            paren_list.append(paren)401    if len(paren_stack) > 0:402        paren_list.append('(')403    return paren_list","from typing import List404 405 406def has_close_elements(numbers: List[float], threshold: float) -> bool:407    """""" Check if in given list of numbers, are any two numbers closer to each other than408    given threshold.409    >>> has_close_elements([1.0, 2.0, 3.0], 0.5)410    False411    >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)412    True413    """"""414",14159,1.6540036,-2.4872236,embd_sc-3b-release_humaneval,"paren_groups = []416    paren_stack = []417    for paren in paren_string:418        if paren == '(':419            paren_stack.append(paren)420        elif paren == ')':421            if len(paren_stack) == 0:422                raise ValueError('Unbalanced parentheses')423            else:424                paren_stack.pop()425        else:426            raise ValueError('Invalid input')427    if len(paren_stack) != 0:428        raise ValueError('Unbalanced parentheses')429    else:430        paren_groups = [paren_string[i:j+1] for i, j in zip(range(len(paren_string)), range(len(paren_string), 0, -1))]431    return paren_groups","from typing import List432 433 434def has_close_elements(numbers: List[float], threshold: float) -> bool:435    """""" Check if in given list of numbers, are any two numbers closer to each other than436    given threshold.437    >>> has_close_elements([1.0, 2.0, 3.0], 0.5)438    False439    >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)440    True441    """"""442",144310,-1.08243,-0.16148709,embd_ds-6.7b-release_humaneval,"paren_string = paren_string.replace("" "", """")444    stack = []445    result = []446    temp = """"447    for char in paren_string:448        if char == ""("":449            stack.append(char)450            if temp != """":451                temp += char452        elif char == "")"":453            stack.pop()454            temp += char455            if not stack:456                result.append(temp)457                temp = """"458    return result","from typing import List459 460 461def separate_paren_groups(paren_string: str) -> List[str]:462    """""" Input to this function is a string containing multiple groups of nested parentheses. Your goal is to463    separate those group into separate strings and return the list of those.464    Separate groups are balanced (each open brace is properly closed) and not nested within each other465    Ignore any spaces in the input string.466    >>> separate_paren_groups('( ) (( )) (( )( ))')467    ['()', '(())', '(()())']468    """"""469",147011,0.71278983,-2.873535,embd_ds-6.7b-release_humaneval,"groups = []471    stack = []472    start = 0473    for i, char in enumerate(paren_string):474        if char == '(':475            if not stack:476                start = i477            stack.append(char)478        elif char == ')':479            stack.pop()480            if not stack:481                groups.append(paren_string[start:i+1].replace(' ', ''))482    return groups","from typing import List483 484 485def separate_paren_groups(paren_string: str) -> List[str]:486    """""" Input to this function is a string containing multiple groups of nested parentheses. Your goal is to487    separate those group into separate strings and return the list of those.488    Separate groups are balanced (each open brace is properly closed) and not nested within each other489    Ignore any spaces in the input string.490    >>> separate_paren_groups('( ) (( )) (( )( ))')491    ['()', '(())', '(()())']492    """"""493",149412,-1.724142,1.0747672,embd_ds-6.7b-release_humaneval,"groups = []495    stack = []496    start = 0497    for i, char in enumerate(paren_string):498        if char == '(':499            if not stack:500                start = i501            stack.append(char)502        elif char == ')':503            stack.pop()504            if not stack:505                groups.append(paren_string[start:i+1].replace(' ', ''))506    return groups","from typing import List507 508 509def separate_paren_groups(paren_string: str) -> List[str]:510    """""" Input to this function is a string containing multiple groups of nested parentheses. Your goal is to511    separate those group into separate strings and return the list of those.512    Separate groups are balanced (each open brace is properly closed) and not nested within each other513    Ignore any spaces in the input string.514    >>> separate_paren_groups('( ) (( )) (( )( ))')515    ['()', '(())', '(()())']516    """"""517",151813,0.99506915,-3.6535072,embd_ds-6.7b-release_humaneval,"paren_string = paren_string.replace("" "", """")519    stack = []520    result = []521    temp = """"522    for char in paren_string:523        if char == '(':524            if temp:525                stack.append(temp)526                temp = """"527            stack.append(char)528        elif char == ')':529            stack.append(char)530            while stack[-2] != '(':531                top = stack.pop()532                temp = top + temp533            stack.pop()534            temp = ""("" + temp + "")""535            if len(stack) >= 2 and stack[-2] == '(' and stack[-1] == ')':536                result.append(temp)537                temp = """"538                stack = stack[:-2]539                if stack:540                    temp = stack.pop()541    return result","from typing import List542 543 544def separate_paren_groups(paren_string: str) -> List[str]:545    """""" Input to this function is a string containing multiple groups of nested parentheses. Your goal is to546    separate those group into separate strings and return the list of those.547    Separate groups are balanced (each open brace is properly closed) and not nested within each other548    Ignore any spaces in the input string.549    >>> separate_paren_groups('( ) (( )) (( )( ))')550    ['()', '(())', '(()())']551    """"""552",155314,-2.1181016,2.1155057,embd_ds-6.7b-release_humaneval,"groups = []554    stack = []555    start = 0556    for i, char in enumerate(paren_string):557        if char == '(':558            if not stack:559                start = i560            stack.append(char)561        elif char == ')':562            stack.pop()563            if not stack:564                groups.append(paren_string[start:i+1])565    return [group.replace(' ', '') for group in groups]","from typing import List566 567 568def separate_paren_groups(paren_string: str) -> List[str]:569    """""" Input to this function is a string containing multiple groups of nested parentheses. Your goal is to570    separate those group into separate strings and return the list of those.571    Separate groups are balanced (each open brace is properly closed) and not nested within each other572    Ignore any spaces in the input string.573    >>> separate_paren_groups('( ) (( )) (( )( ))')574    ['()', '(())', '(()())']575    """"""576",157715,-1.724142,1.0747672,embd_ds-6.7b-release_humaneval,"# Initialize an empty list to store the separate groups578    separate_groups = []579    # Initialize an empty string to store the current group580    current_group = """"581    # Initialize a counter to track the number of open parentheses582    open_count = 0583    # Iterate over each character in the input string584    for char in paren_string:585        # Ignore spaces586        if char == "" "":587            continue588        # Add the character to the current group589        current_group += char590        # If the character is an open parenthesis, increment the counter591        if char == ""("":592            open_count += 1593        # If the character is a close parenthesis, decrement the counter594        elif char == "")"":595            open_count -= 1596            # If the counter reaches zero, we've found a separate group597            if open_count == 0:598                separate_groups.append(current_group)599                current_group = """"600    # Return the list of separate groups601    return separate_groups","from typing import List602 603 604def separate_paren_groups(paren_string: str) -> List[str]:605    """""" Input to this function is a string containing multiple groups of nested parentheses. Your goal is to606    separate those group into separate strings and return the list of those.607    Separate groups are balanced (each open brace is properly closed) and not nested within each other608    Ignore any spaces in the input string.609    >>> separate_paren_groups('( ) (( )) (( )( ))')610    ['()', '(())', '(()())']611    """"""612",161316,1.2114801,-3.5373847,embd_ds-6.7b-release_humaneval,"result = []614    stack = []615    start = 0616    for i, c in enumerate(paren_string):617        if c == '(':618            if not stack:619                start = i620            stack.append(c)621        elif c == ')':622            stack.pop()623            if not stack:624                result.append(paren_string[start:i+1].replace(' ', ''))625    return result","from typing import List626 627 628def separate_paren_groups(paren_string: str) -> List[str]:629    """""" Input to this function is a string containing multiple groups of nested parentheses. Your goal is to630    separate those group into separate strings and return the list of those.631    Separate groups are balanced (each open brace is properly closed) and not nested within each other632    Ignore any spaces in the input string.633    >>> separate_paren_groups('( ) (( )) (( )( ))')634    ['()', '(())', '(()())']635    """"""636",163717,-2.1902993,2.7116406,embd_ds-1.3b-inst-release_humaneval,"groups = []638    start = 0639    while start < len(paren_string):640        group = ''641        count = 0642        for i in range(start, len(paren_string)):643            if paren_string[i] == '(':644                count += 1645            elif paren_string[i] == ')':646                count -= 1647            if count == 0:648                group += paren_string[start:i+1]649                start = i+1650                break651        groups.append(group)652    return groups","653 654def truncate_number(number: float) -> float:655    """""" Given a positive floating point number, it can be decomposed into656    and integer part (largest integer smaller than given number) and decimals657    (leftover part always smaller than 1).658 659    Return the decimal part of the number.660    >>> truncate_number(3.5)661    0.5662    """"""663",166418,-2.0058916,2.7994738,embd_ds-1.3b-inst-release_humaneval,"groups = []665    start = 0666    while start < len(paren_string):667        count = 0668        for i in range(start, len(paren_string)):669            if paren_string[i] == '(':670                count += 1671            elif paren_string[i] == ')':672                count -= 1673            if count == 0:674                groups.append(paren_string[start:i+1])675                start = i+1676                break677    return groups","678 679def truncate_number(number: float) -> float:680    """""" Given a positive floating point number, it can be decomposed into681    and integer part (largest integer smaller than given number) and decimals682    (leftover part always smaller than 1).683 684    Return the decimal part of the number.685    >>> truncate_number(3.5)686    0.5687    """"""688",168919,1.4265298,-3.6675744,embd_ds-1.3b-inst-release_humaneval,"groups = []690    stack = []691    start = 0692    for i, char in enumerate(paren_string):693        if char == '(':694            if stack:695                start = i696            stack.append(char)697        elif char == ')':698            stack.pop()699            if not stack:700                groups.append(paren_string[start:i+1])701    return groups","702 703def truncate_number(number: float) -> float:704    """""" Given a positive floating point number, it can be decomposed into705    and integer part (largest integer smaller than given number) and decimals706    (leftover part always smaller than 1).707 708    Return the decimal part of the number.709    >>> truncate_number(3.5)710    0.5711    """"""712",171320,-1.7659657,1.3360289,embd_ds-1.3b-inst-release_humaneval,"result = []714    stack = []715    temp = ''716    for char in paren_string:717        if char == ' ':718            continue719        if char == '(':720            stack.append(char)721            temp += char722        elif char == ')':723            stack.append(char)724            temp += char725            if len(stack) == 1:726                result.append(temp)727                temp = ''728            else:729                temp += ' '730    return result","731 732def truncate_number(number: float) -> float:733    """""" Given a positive floating point number, it can be decomposed into734    and integer part (largest integer smaller than given number) and decimals735    (leftover part always smaller than 1).736 737    Return the decimal part of the number.738    >>> truncate_number(3.5)739    0.5740    """"""741",174221,1.4481704,-3.7042668,embd_ds-1.3b-inst-release_humaneval,"groups = []743    start = 0744    count = 0745    for i, char in enumerate(paren_string):746        if char == '(':747            count += 1748        elif char == ')':749            count -= 1750            if count == 0:751                groups.append(paren_string[start:i+1])752                start = i+1753    return groups","754 755def truncate_number(number: float) -> float:756    """""" Given a positive floating point number, it can be decomposed into757    and integer part (largest integer smaller than given number) and decimals758    (leftover part always smaller than 1).759 760    Return the decimal part of the number.761    >>> truncate_number(3.5)762    0.5763    """"""764",176522,-1.9698737,2.4738016,embd_ds-1.3b-inst-release_humaneval,"result = []766    stack = []767    temp = ''768    for char in paren_string:769        if char == ' ':770            continue771        if char == '(':772            stack.append(char)773            temp += char774        if char == ')':775            stack.append(char)776            temp += char777            if len(stack) == 1:778                result.append(temp)779                temp = ''780            else:781                stack.pop()782    return result","783 784def truncate_number(number: float) -> float:785    """""" Given a positive floating point number, it can be decomposed into786    and integer part (largest integer smaller than given number) and decimals787    (leftover part always smaller than 1).788 789    Return the decimal part of the number.790    >>> truncate_number(3.5)791    0.5792    """"""793",179423,-1.7659657,1.3360289,embd_ds-1.3b-inst-release_humaneval,"groups = []795    stack = []796    start = 0797    for i, char in enumerate(paren_string):798        if char == '(':799            if stack:800                start = i801            stack.append(char)802        elif char == ')':803            stack.pop()804            if not stack:805                groups.append(paren_string[start:i+1])806    return groups","807 808def truncate_number(number: float) -> float:809    """""" Given a positive floating point number, it can be decomposed into810    and integer part (largest integer smaller than given number) and decimals811    (leftover part always smaller than 1).812 813    Return the decimal part of the number.814    >>> truncate_number(3.5)815    0.5816    """"""817",181824,-1.3166589,2.4338064,embd_ds-33b-humaneval,"paren_string = paren_string.replace(' ', '')819    groups = []820    start = 0821    count = 0822    for i, char in enumerate(paren_string):823        if char == '(':824            count += 1825        elif char == ')':826            count -= 1827        if count == 0:828            groups.append(paren_string[start:i + 1])829            start = i + 1830    return groups","from typing import List831 832 833def below_zero(operations: List[int]) -> bool:834    """""" You're given a list of deposit and withdrawal operations on a bank account that starts with835    zero balance. Your task is to detect if at any point the balance of account fallls below zero, and836    at that point function should return True. Otherwise it should return False.837    >>> below_zero([1, 2, 3])838    False839    >>> below_zero([1, 2, -4, 5])840    True841    """"""842",184325,-2.0928082,2.3949971,embd_ds-33b-humaneval,"stack = []844    result = []845    for char in paren_string:846        if char == '(':847            stack.append(char)848        elif char == ')':849            stack.append(char)850            if len(stack) == 2:851                result.append(''.join(stack))852                stack = []853    return result","from typing import List854 855 856def below_zero(operations: List[int]) -> bool:857    """""" You're given a list of deposit and withdrawal operations on a bank account that starts with858    zero balance. Your task is to detect if at any point the balance of account fallls below zero, and859    at that point function should return True. Otherwise it should return False.860    >>> below_zero([1, 2, 3])861    False862    >>> below_zero([1, 2, -4, 5])863    True864    """"""865",186626,3.2716482,-0.97033006,embd_ds-33b-humaneval,"# Remove spaces from the string867    paren_string = paren_string.replace(' ', '')868 869    # Initialize variables870    groups = []871    group = ''872    open_count = 0873 874    # Iterate over the string875    for char in paren_string:876        if char == '(':877            open_count += 1878        elif char == ')':879            open_count -= 1880        group += char881        if open_count == 0:882            groups.append(group)883            group = ''884 885    return groups","from typing import List886 887 888def below_zero(operations: List[int]) -> bool:889    """""" You're given a list of deposit and withdrawal operations on a bank account that starts with890    zero balance. Your task is to detect if at any point the balance of account fallls below zero, and891    at that point function should return True. Otherwise it should return False.892    >>> below_zero([1, 2, 3])893    False894    >>> below_zero([1, 2, -4, 5])895    True896    """"""897",189827,1.1374708,-3.3379898,embd_ds-33b-humaneval,"return [s.replace(' ', '') for s in paren_string.split(')(') if s]","from typing import List899 900 901def below_zero(operations: List[int]) -> bool:902    """""" You're given a list of deposit and withdrawal operations on a bank account that starts with903    zero balance. Your task is to detect if at any point the balance of account fallls below zero, and904    at that point function should return True. Otherwise it should return False.905    >>> below_zero([1, 2, 3])906    False907    >>> below_zero([1, 2, -4, 5])908    True909    """"""910",191128,-1.8902442,2.5612226,embd_ds-33b-humaneval,"return [912        paren_string[start + 1:end]913        for start, end in zip(914            [i for i, char in enumerate(paren_string) if char == '('],915            [i for i, char in enumerate(paren_string) if char == ')']916        )917    ]","from typing import List918 919 920def below_zero(operations: List[int]) -> bool:921    """""" You're given a list of deposit and withdrawal operations on a bank account that starts with922    zero balance. Your task is to detect if at any point the balance of account fallls below zero, and923    at that point function should return True. Otherwise it should return False.924    >>> below_zero([1, 2, 3])925    False926    >>> below_zero([1, 2, -4, 5])927    True928    """"""929",193029,1.7874322,0.9896466,embd_ds-33b-humaneval,return []  # Put your code here!!!,"from typing import List931 932 933def below_zero(operations: List[int]) -> bool:934    """""" You're given a list of deposit and withdrawal operations on a bank account that starts with935    zero balance. Your task is to detect if at any point the balance of account fallls below zero, and936    at that point function should return True. Otherwise it should return False.937    >>> below_zero([1, 2, 3])938    False939    >>> below_zero([1, 2, -4, 5])940    True941    """"""942",194330,1.7961204,-1.0396887,embd_ds-33b-humaneval,return [s for s in paren_string.split() if is_balanced(s)],"from typing import List944 945 946def below_zero(operations: List[int]) -> bool:947    """""" You're given a list of deposit and withdrawal operations on a bank account that starts with948    zero balance. Your task is to detect if at any point the balance of account fallls below zero, and949    at that point function should return True. Otherwise it should return False.950    >>> below_zero([1, 2, 3])951    False952    >>> below_zero([1, 2, -4, 5])953    True954    """"""955",195631,-1.9278601,1.7909147,embd_ds-33b-humaneval,"# Remove spaces from the string957    paren_string = paren_string.replace(' ', '')958 959    # Initialize variables960    groups = []961    group = ''962    open_count = 0963 964    # Iterate over the string965    for char in paren_string:966        # If the character is an open parenthesis, increment the open count967        if char == '(':968            open_count += 1969        # If the character is a close parenthesis, decrement the open count970        elif char == ')':971            open_count -= 1972 973        # Add the character to the current group974        group += char975 976        # If the open count is zero, we have a complete group977        if open_count == 0:978            groups.append(group)979            group = ''980 981    return groups","from typing import List982 983 984def below_zero(operations: List[int]) -> bool:985    """""" You're given a list of deposit and withdrawal operations on a bank account that starts with986    zero balance. Your task is to detect if at any point the balance of account fallls below zero, and987    at that point function should return True. Otherwise it should return False.988    >>> below_zero([1, 2, 3])989    False990    >>> below_zero([1, 2, -4, 5])991    True992    """"""993",199432,14.046784,6.7904725,embd_ds-33b-humaneval,"groups = []995    group = ''996    open_count = 0997    for char in paren_string:998        if char == '(':999            open_count += 11000            group += char1001        elif char == ')':1002            open_count -= 11003            group += char1004            if open_count == 0:1005                groups.append(group)1006                group = ''1007    return groups","from typing import List1008 1009 1010def below_zero(operations: List[int]) -> bool:1011    """""" You're given a list of deposit and withdrawal operations on a bank account that starts with1012    zero balance. Your task is to detect if at any point the balance of account fallls below zero, and1013    at that point function should return True. Otherwise it should return False.1014    >>> below_zero([1, 2, 3])1015    False1016    >>> below_zero([1, 2, -4, 5])1017    True1018    """"""1019",1102033,1.2758157,-3.3548443,embd_ds-33b-humaneval,"stack = []1021    result = []1022    for char in paren_string:1023        if char == '(':1024            stack.append(char)1025        elif char == ')':1026            stack.append(char)1027            if len(stack) > 1 and stack[-2] == '(':1028                result.append(''.join(stack))1029                stack = []1030    return result","from typing import List1031 1032 1033def below_zero(operations: List[int]) -> bool:1034    """""" You're given a list of deposit and withdrawal operations on a bank account that starts with1035    zero balance. Your task is to detect if at any point the balance of account fallls below zero, and1036    at that point function should return True. Otherwise it should return False.1037    >>> below_zero([1, 2, 3])1038    False1039    >>> below_zero([1, 2, -4, 5])1040    True1041    """"""1042",110430,-3.2136302,5.586563e-07,embd_sc-3b-release_humaneval,return number - int(number),"from typing import List1044 1045 1046def has_close_elements(numbers: List[float], threshold: float) -> bool:1047    """""" Check if in given list of numbers, are any two numbers closer to each other than1048    given threshold.1049    >>> has_close_elements([1.0, 2.0, 3.0], 0.5)1050    False1051    >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)1052    True1053    """"""1054",210551,9.64089,5.586563e-07,embd_ds-6.7b-release_humaneval,return number % 1,"from typing import List1056 1057 1058def separate_paren_groups(paren_string: str) -> List[str]:1059    """""" Input to this function is a string containing multiple groups of nested parentheses. Your goal is to1060    separate those group into separate strings and return the list of those.1061    Separate groups are balanced (each open brace is properly closed) and not nested within each other1062    Ignore any spaces in the input string.1063    >>> separate_paren_groups('( ) (( )) (( )( ))')1064    ['()', '(())', '(()())']1065    """"""1066",210672,-3.2136302,5.586563e-07,embd_ds-1.3b-inst-release_humaneval,return number - int(number),"1068 1069def truncate_number(number: float) -> float:1070    """""" Given a positive floating point number, it can be decomposed into1071    and integer part (largest integer smaller than given number) and decimals1072    (leftover part always smaller than 1).1073 1074    Return the decimal part of the number.1075    >>> truncate_number(3.5)1076    0.51077    """"""1078",210793,-3.2136302,5.586563e-07,embd_ds-33b-humaneval,return number - int(number),"from typing import List1080 1081 1082def below_zero(operations: List[int]) -> bool:1083    """""" You're given a list of deposit and withdrawal operations on a bank account that starts with1084    zero balance. Your task is to detect if at any point the balance of account fallls below zero, and1085    at that point function should return True. Otherwise it should return False.1086    >>> below_zero([1, 2, 3])1087    False1088    >>> below_zero([1, 2, -4, 5])1089    True1090    """"""1091",210920,-0.57471514,6.2716146e-07,embd_sc-3b-release_humaneval,"balance = 01093    for operation in operations:1094        balance += operation1095        if balance < 0:1096            return True1097    return False","from typing import List1098 1099 1100def has_close_elements(numbers: List[float], threshold: float) -> bool:1101    """""" Check if in given list of numbers, are any two numbers closer to each other than1102    given threshold.1103    >>> has_close_elements([1.0, 2.0, 3.0], 0.5)1104    False1105    >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)1106    True1107    """"""1108",311091,0.9578585,6.2716157e-07,embd_ds-6.7b-release_humaneval,"balance = 01110    for operation in operations:1111        balance += operation1112        if balance < 0:1113            return True1114    return False","from typing import List1115 1116 1117def separate_paren_groups(paren_string: str) -> List[str]:1118    """""" Input to this function is a string containing multiple groups of nested parentheses. Your goal is to1119    separate those group into separate strings and return the list of those.1120    Separate groups are balanced (each open brace is properly closed) and not nested within each other1121    Ignore any spaces in the input string.1122    >>> separate_paren_groups('( ) (( )) (( )( ))')1123    ['()', '(())', '(()())']1124    """"""1125",311262,0.9578584,6.271614e-07,embd_ds-6.7b-release_humaneval,"balance = 01127    for op in operations:1128        balance += op1129        if balance < 0:1130            return True1131    return False","from typing import List1132 1133 1134def separate_paren_groups(paren_string: str) -> List[str]:1135    """""" Input to this function is a string containing multiple groups of nested parentheses. Your goal is to1136    separate those group into separate strings and return the list of those.1137    Separate groups are balanced (each open brace is properly closed) and not nested within each other1138    Ignore any spaces in the input string.1139    >>> separate_paren_groups('( ) (( )) (( )( ))')1140    ['()', '(())', '(()())']1141    """"""1142",311433,-0.57471514,6.271612e-07,embd_ds-6.7b-release_humaneval,"balance = 01144    for operation in operations:1145        balance += operation1146        if balance < 0:1147            return True1148    return False","from typing import List1149 1150 1151def separate_paren_groups(paren_string: str) -> List[str]:1152    """""" Input to this function is a string containing multiple groups of nested parentheses. Your goal is to1153    separate those group into separate strings and return the list of those.1154    Separate groups are balanced (each open brace is properly closed) and not nested within each other1155    Ignore any spaces in the input string.1156    >>> separate_paren_groups('( ) (( )) (( )( ))')1157    ['()', '(())', '(()())']1158    """"""1159",311604,-0.57471514,6.271612e-07,embd_ds-6.7b-release_humaneval,"balance = 01161    for op in operations:1162        balance += op1163        if balance < 0:1164            return True1165    return False","from typing import List1166 1167 1168def separate_paren_groups(paren_string: str) -> List[str]:1169    """""" Input to this function is a string containing multiple groups of nested parentheses. Your goal is to1170    separate those group into separate strings and return the list of those.1171    Separate groups are balanced (each open brace is properly closed) and not nested within each other1172    Ignore any spaces in the input string.1173    >>> separate_paren_groups('( ) (( )) (( )( ))')1174    ['()', '(())', '(()())']1175    """"""1176",311775,0.9578584,6.271613e-07,embd_ds-1.3b-inst-release_humaneval,"balance = 01178    for operation in operations:1179        balance += operation1180        if balance < 0:1181            return True1182    return False","1183 1184def truncate_number(number: float) -> float:1185    """""" Given a positive floating point number, it can be decomposed into1186    and integer part (largest integer smaller than given number) and decimals1187    (leftover part always smaller than 1).1188 1189    Return the decimal part of the number.1190    >>> truncate_number(3.5)1191    0.51192    """"""1193",311946,-0.57471514,6.271612e-07,embd_ds-1.3b-inst-release_humaneval,"balance = 01195    for op in operations:1196        balance += op1197        if balance < 0:1198            return True1199    return False","1200 

Showing the first 1,200 of 68130 lines. Download the file for the rest.