diff --git a/dataset_builder/humaneval_to_elixir.py b/dataset_builder/humaneval_to_elixir.py new file mode 100644 index 0000000000..3e7cdb2ee6 --- /dev/null +++ b/dataset_builder/humaneval_to_elixir.py @@ -0,0 +1,106 @@ +""" +This script translates problems from the OpenAI HumanEval dataset into Elixir. +""" + +import re +import ast +from typing import List, TypeVar +from base_language_translator import LanguageTranslator + +# We turn multi-line docstrings into single-line comments. This captures the +# start of the line. +DOCSTRING_LINESTART_RE = re.compile("""\n(\\s*)""") + +TargetExp = str + + +class Translator(LanguageTranslator[TargetExp]): + USub = "-" + + def file_ext(self) -> str: + return "elixir" + + def stop(self) -> List[str]: + return ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"] + + def translate_prompt( + self, name: str, args: List[ast.arg], _returns: ast.expr, description: str + ) -> str: + """ """ + elixir_description = ( + "# " + re.sub(DOCSTRING_LINESTART_RE, "\n# ", description.strip()) + "\n" + ) + arg_names = [arg.arg for arg in args] + arg_list = ", ".join(arg_names) + result_list = [ + elixir_description, + "defmodule HumanEval do", + f" def candidate({arg_list}), do: {name}({arg_list})", + f" def {name}({arg_list}) do", + f" ", + ] + return "\n".join(result_list) + + def test_suite_prefix_lines(self, entry_point: str) -> List[str]: + """ + This code goes at the start of the test suite. + """ + return [ + "ExUnit.start()", + "defmodule HumanEvalTest do", + " use ExUnit.Case, async: true", + f" test '{entry_point}' do", + ] + + def test_suite_suffix_lines(self) -> List[str]: + return [" end", "end", ""] + + def deep_equality(self, left: TargetExp, right: TargetExp) -> str: + """ + All tests are assertions that compare deep equality between left and right. + + Make sure you use the right equality operator for your language. For example, + == is the wrong operator for Java and OCaml. + """ + return " assert {} == {}".format(right, left) + + def gen_literal(self, c: bool | str | int | float | None) -> TargetExp: + """Translate a literal expression + c: is the literal value + """ + # TODO: Make sure no string weirdness + if type(c) == bool: + return str(c).lower() + elif type(c) == str: + return f'"{c}"' + elif c is None: + return "nil" + return repr(c) + + def gen_var(self, v: str) -> TargetExp: + """Translate a variable with name v.""" + return v + + def gen_list(self, l: List[TargetExp]) -> TargetExp: + """Translate a list with elements l + A list [ x, y, z] translates to [ x, y, z ] (an Elixir list) + """ + return "[" + ", ".join(l) + "]" + + def gen_tuple(self, t: List[TargetExp]) -> TargetExp: + """Translate a tuple with elements t + A tuple (x, y, z) translates to {x, y, z} + """ + return "{" + ", ".join(t) + "}" + + def gen_dict(self, keys: List[TargetExp], values: List[TargetExp]) -> TargetExp: + """Translate a dictionary with keys and values + A dictionary { "key1": val1, "key2": val2 } translates to %{"key1" => val1, "key2" => val2} + """ + return "%{" + ", ".join(f"{k} => {v}" for k, v in zip(keys, values)) + "}" + + def gen_call(self, func: TargetExp, args: List[TargetExp]) -> str: + """Translate a function call `func(args)` + A function call f(x, y, z) translates to f(x, y, z) + """ + return f"HumanEval.{func}({', '.join(args)})" diff --git a/dataset_builder/libexperiments.py b/dataset_builder/libexperiments.py index b8dbc0351e..32ccdb46f4 100644 --- a/dataset_builder/libexperiments.py +++ b/dataset_builder/libexperiments.py @@ -38,7 +38,8 @@ def path(self) -> Path: "swift", "rkt", "ml", - "hs" + "hs", + "elixir", ] MODELS = ["davinci", "incoder", "codegen"] @@ -62,4 +63,3 @@ def all_experiments() -> Iterator[Experiment]: yield Experiment(dataset, lang, model, temp, variation) else: pass - diff --git a/dataset_builder/terms.csv b/dataset_builder/terms.csv index e3a6351603..73fb1fc3cd 100644 --- a/dataset_builder/terms.csv +++ b/dataset_builder/terms.csv @@ -15,6 +15,7 @@ Python,py,array,list,tuple,dictionary,None,True,False R,r,vector,list,list,named list,NULL,TRUE,FALSE Racket,rkt,list,list,list,hash,#f,#t,#f Ruby,rb,array,array,array,hash,nil,true,false +Elixir,elixir,list,list,tuple,map,nil,true,false Rust,rs,vector,vector,tuple,HashMap,None,true,false Scala,scala,list,list,tuple,map,None,true,false Swift,swift,array,array,tuple,dictionary,nil,true,false diff --git a/evaluation/Dockerfile b/evaluation/Dockerfile index 54c7d08241..5fda97cabe 100644 --- a/evaluation/Dockerfile +++ b/evaluation/Dockerfile @@ -57,6 +57,9 @@ RUN mkdir /usr/multiple && wget https://repo.mavenlibs.com/maven/org/javatuples/ # Luau RUN wget https://github.com/Roblox/luau/releases/download/0.594/luau-ubuntu.zip -O /tmp/luau.zip && unzip /tmp/luau.zip -d /bin/ +# Elixir +RUN wget https://binaries2.erlang-solutions.com/ubuntu/pool/contrib/e/elixir/elixir_1.15.4_1_otp_26.0.2~ubuntu~jammy_all.deb -O /tmp/elixir.deb && dpkg -i /tmp/elixir.deb + COPY src /code WORKDIR /code ENTRYPOINT ["python3", "main.py"] diff --git a/evaluation/src/containerized_eval.py b/evaluation/src/containerized_eval.py index 5a2da4a8ae..d2c0018ce4 100644 --- a/evaluation/src/containerized_eval.py +++ b/evaluation/src/containerized_eval.py @@ -23,6 +23,7 @@ import eval_ocaml import eval_matlab import eval_hs +import eval_elixir import tempfile @@ -52,7 +53,8 @@ "fs": (eval_fs.eval_script, ".fsx"), "ml": (eval_ocaml.eval_script, ".ml"), "m": (eval_matlab.eval_script, ".m"), - "hs": (eval_hs.eval_script, ".hs") + "hs": (eval_hs.eval_script, ".hs"), + "elixir": (eval_elixir.eval_script, ".exs"), } def eval_string_script(language, program): @@ -86,4 +88,3 @@ def eval_string_script(language, program): "exit_code": result['exit_code'], "status": result['status'] } - diff --git a/evaluation/src/eval_elixir.py b/evaluation/src/eval_elixir.py new file mode 100644 index 0000000000..94c9178035 --- /dev/null +++ b/evaluation/src/eval_elixir.py @@ -0,0 +1,37 @@ +import argparse +from sys import exit +import subprocess +from pathlib import Path +from generic_eval import main as gmain + + +def eval_script(path: Path): + try: + # Assumes exit-code 0 is all okay + output = subprocess.run(["elixir", str(path)], capture_output=True, timeout=5) + + if output.returncode == 0: + status = "OK" + else: + outmessage = str(output) + if "Assertion with == failed" in outmessage: + status = "AssertionError" + elif "SyntaxError" in outmessage: + status = "SyntaxError" + else: + status = "Exception" + returncode = output.returncode + except subprocess.TimeoutExpired as exc: + status = "Timeout" + output = exc + returncode = -1 + return { + "status": status, + "exit_code": returncode, + "stdout": "" if output.stdout is None else output.stdout.decode("utf-8"), + "stderr": "" if output.stderr is None else output.stderr.decode("utf-8"), + } + + +if __name__ == "__main__": + gmain(eval_script, "Elixir", ".exs") diff --git a/prompts/humaneval-elixir-keep.jsonl b/prompts/humaneval-elixir-keep.jsonl new file mode 100644 index 0000000000..29792cfe41 --- /dev/null +++ b/prompts/humaneval-elixir-keep.jsonl @@ -0,0 +1,161 @@ +{"name": "HumanEval_0_has_close_elements", "language": "elixir", "prompt": "# Check if in given list of numbers, are any two numbers closer to each other than\n# given threshold.\n# >>> has_close_elements([1.0, 2.0, 3.0], 0.5)\n# False\n# >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)\n# True\n\ndefmodule HumanEval do\n def candidate(numbers, threshold), do: has_close_elements(numbers, threshold)\n def has_close_elements(numbers, threshold) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_0_has_close_elements.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'has_close_elements' do\n assert true == HumanEval.candidate([1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3)\n assert false == HumanEval.candidate([1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.05)\n assert true == HumanEval.candidate([1.0, 2.0, 5.9, 4.0, 5.0], 0.95)\n assert false == HumanEval.candidate([1.0, 2.0, 5.9, 4.0, 5.0], 0.8)\n assert true == HumanEval.candidate([1.0, 2.0, 3.0, 4.0, 5.0, 2.0], 0.1)\n assert true == HumanEval.candidate([1.1, 2.2, 3.1, 4.1, 5.1], 1.0)\n assert false == HumanEval.candidate([1.1, 2.2, 3.1, 4.1, 5.1], 0.5)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_100_make_a_pile", "language": "elixir", "prompt": "# Given a positive integer n, you have to make a pile of n levels of stones.\n# The first level has n stones.\n# The number of stones in the next level is:\n# - the next odd number if n is odd.\n# - the next even number if n is even.\n# Return the number of stones in each level in a list, where element at index\n# i represents the number of stones in the level (i+1).\n# Examples:\n# >>> make_a_pile(3)\n# [3, 5, 7]\n\ndefmodule HumanEval do\n def candidate(n), do: make_a_pile(n)\n def make_a_pile(n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_100_make_a_pile.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'make_a_pile' do\n assert [3, 5, 7] == HumanEval.candidate(3)\n assert [4, 6, 8, 10] == HumanEval.candidate(4)\n assert [5, 7, 9, 11, 13] == HumanEval.candidate(5)\n assert [6, 8, 10, 12, 14, 16] == HumanEval.candidate(6)\n assert [8, 10, 12, 14, 16, 18, 20, 22] == HumanEval.candidate(8)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_101_words_string", "language": "elixir", "prompt": "# You will be given a string of words separated by commas or spaces. Your task is\n# to split the string into words and return an array of the words.\n# For example:\n# words_string(\"Hi, my name is John\") == [\"Hi\", \"my\", \"name\", \"is\", \"John\"]\n# words_string(\"One, two, three, four, five, six\") == [\"One\", \"two\", \"three\", \"four\", \"five\", \"six\"]\n\ndefmodule HumanEval do\n def candidate(s), do: words_string(s)\n def words_string(s) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_101_words_string.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'words_string' do\n assert [\"Hi\", \"my\", \"name\", \"is\", \"John\"] == HumanEval.candidate(\"Hi, my name is John\")\n assert [\"One\", \"two\", \"three\", \"four\", \"five\", \"six\"] == HumanEval.candidate(\"One, two, three, four, five, six\")\n assert [\"Hi\", \"my\", \"name\"] == HumanEval.candidate(\"Hi, my name\")\n assert [\"One\", \"two\", \"three\", \"four\", \"five\", \"six\"] == HumanEval.candidate(\"One,, two, three, four, five, six,\")\n assert [] == HumanEval.candidate(\"\")\n assert [\"ahmed\", \"gamal\"] == HumanEval.candidate(\"ahmed , gamal\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_102_choose_num", "language": "elixir", "prompt": "# This function takes two positive numbers x and y and returns the\n# biggest even integer number that is in the range [x, y] inclusive. If \n# there's no such number, then the function should return -1.\n# For example:\n# choose_num(12, 15) = 14\n# choose_num(13, 12) = -1\n\ndefmodule HumanEval do\n def candidate(x, y), do: choose_num(x, y)\n def choose_num(x, y) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_102_choose_num.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'choose_num' do\n assert 14 == HumanEval.candidate(12, 15)\n assert -1 == HumanEval.candidate(13, 12)\n assert 12354 == HumanEval.candidate(33, 12354)\n assert -1 == HumanEval.candidate(5234, 5233)\n assert 28 == HumanEval.candidate(6, 29)\n assert -1 == HumanEval.candidate(27, 10)\n assert -1 == HumanEval.candidate(7, 7)\n assert 546 == HumanEval.candidate(546, 546)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_103_rounded_avg", "language": "elixir", "prompt": "# You are given two positive integers n and m, and your task is to compute the\n# average of the integers from n through m (including n and m). \n# Round the answer to the nearest integer and convert that to binary.\n# If n is greater than m, return -1.\n# Example:\n# rounded_avg(1, 5) => \"0b11\"\n# rounded_avg(7, 5) => -1\n# rounded_avg(10, 20) => \"0b1111\"\n# rounded_avg(20, 33) => \"0b11010\"\n\ndefmodule HumanEval do\n def candidate(n, m), do: rounded_avg(n, m)\n def rounded_avg(n, m) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_103_rounded_avg.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'rounded_avg' do\n assert \"0b11\" == HumanEval.candidate(1, 5)\n assert \"0b1010\" == HumanEval.candidate(7, 13)\n assert \"0b1111001010\" == HumanEval.candidate(964, 977)\n assert \"0b1111100100\" == HumanEval.candidate(996, 997)\n assert \"0b1011000010\" == HumanEval.candidate(560, 851)\n assert \"0b101101110\" == HumanEval.candidate(185, 546)\n assert \"0b110101101\" == HumanEval.candidate(362, 496)\n assert \"0b1001110010\" == HumanEval.candidate(350, 902)\n assert \"0b11010111\" == HumanEval.candidate(197, 233)\n assert -1 == HumanEval.candidate(7, 5)\n assert -1 == HumanEval.candidate(5, 1)\n assert \"0b101\" == HumanEval.candidate(5, 5)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_104_unique_digits", "language": "elixir", "prompt": "# Given a list of positive integers x. return a sorted list of all \n# elements that hasn't any even digit.\n# Note: Returned list should be sorted in increasing order.\n# For example:\n# >>> unique_digits([15, 33, 1422, 1])\n# [1, 15, 33]\n# >>> unique_digits([152, 323, 1422, 10])\n# []\n\ndefmodule HumanEval do\n def candidate(x), do: unique_digits(x)\n def unique_digits(x) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_104_unique_digits.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'unique_digits' do\n assert [1, 15, 33] == HumanEval.candidate([15, 33, 1422, 1])\n assert [] == HumanEval.candidate([152, 323, 1422, 10])\n assert [111, 151] == HumanEval.candidate([12345, 2033, 111, 151])\n assert [31, 135] == HumanEval.candidate([135, 103, 31])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_105_by_length", "language": "elixir", "prompt": "# Given an array of integers, sort the integers that are between 1 and 9 inclusive,\n# reverse the resulting array, and then replace each digit by its corresponding name from\n# \"One\", \"Two\", \"Three\", \"Four\", \"Five\", \"Six\", \"Seven\", \"Eight\", \"Nine\".\n# For example:\n# arr = [2, 1, 1, 4, 5, 8, 2, 3] \n# -> sort arr -> [1, 1, 2, 2, 3, 4, 5, 8] \n# -> reverse arr -> [8, 5, 4, 3, 2, 2, 1, 1]\n# return [\"Eight\", \"Five\", \"Four\", \"Three\", \"Two\", \"Two\", \"One\", \"One\"]\n# If the array is empty, return an empty array:\n# arr = []\n# return []\n# If the array has any strange number ignore it:\n# arr = [1, -1 , 55] \n# -> sort arr -> [-1, 1, 55]\n# -> reverse arr -> [55, 1, -1]\n# return = ['One']\n\ndefmodule HumanEval do\n def candidate(arr), do: by_length(arr)\n def by_length(arr) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_105_by_length.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'by_length' do\n assert [\"Eight\", \"Five\", \"Four\", \"Three\", \"Two\", \"Two\", \"One\", \"One\"] == HumanEval.candidate([2, 1, 1, 4, 5, 8, 2, 3])\n assert [] == HumanEval.candidate([])\n assert [\"One\"] == HumanEval.candidate([1, -1, 55])\n assert [\"Three\", \"Two\", \"One\"] == HumanEval.candidate([1, -1, 3, 2])\n assert [\"Nine\", \"Eight\", \"Four\"] == HumanEval.candidate([9, 4, 8])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_106_f", "language": "elixir", "prompt": "# Implement the function f that takes n as a parameter,\n# and returns a list of size n, such that the value of the element at index i is the factorial of i if i is even\n# or the sum of numbers from 1 to i otherwise.\n# i starts from 1.\n# the factorial of i is the multiplication of the numbers from 1 to i (1 * 2 * ... * i).\n# Example:\n# f(5) == [1, 2, 6, 24, 15]\n\ndefmodule HumanEval do\n def candidate(n), do: f(n)\n def f(n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_106_f.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'f' do\n assert [1, 2, 6, 24, 15] == HumanEval.candidate(5)\n assert [1, 2, 6, 24, 15, 720, 28] == HumanEval.candidate(7)\n assert [1] == HumanEval.candidate(1)\n assert [1, 2, 6] == HumanEval.candidate(3)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_107_even_odd_palindrome", "language": "elixir", "prompt": "# Given a positive integer n, return a tuple that has the number of even and odd\n# integer palindromes that fall within the range(1, n), inclusive.\n# Example 1:\n# Input: 3\n# Output: (1, 2)\n# Explanation:\n# Integer palindrome are 1, 2, 3. one of them is even, and two of them are odd.\n# Example 2:\n# Input: 12\n# Output: (4, 6)\n# Explanation:\n# Integer palindrome are 1, 2, 3, 4, 5, 6, 7, 8, 9, 11. four of them are even, and 6 of them are odd.\n# Note:\n# 1. 1 <= n <= 10^3\n# 2. returned tuple has the number of even and odd integer palindromes respectively.\n\ndefmodule HumanEval do\n def candidate(n), do: even_odd_palindrome(n)\n def even_odd_palindrome(n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_107_even_odd_palindrome.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'even_odd_palindrome' do\n assert {8, 13} == HumanEval.candidate(123)\n assert {4, 6} == HumanEval.candidate(12)\n assert {1, 2} == HumanEval.candidate(3)\n assert {6, 8} == HumanEval.candidate(63)\n assert {5, 6} == HumanEval.candidate(25)\n assert {4, 6} == HumanEval.candidate(19)\n assert {4, 5} == HumanEval.candidate(9)\n assert {0, 1} == HumanEval.candidate(1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_108_count_nums", "language": "elixir", "prompt": "# Write a function count_nums which takes an array of integers and returns\n# the number of elements which has a sum of digits > 0.\n# If a number is negative, then its first signed digit will be negative:\n# e.g. -123 has signed digits -1, 2, and 3.\n# >>> count_nums([]) == 0\n# >>> count_nums([-1, 11, -11]) == 1\n# >>> count_nums([1, 1, 2]) == 3\n\ndefmodule HumanEval do\n def candidate(arr), do: count_nums(arr)\n def count_nums(arr) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_108_count_nums.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'count_nums' do\n assert 0 == HumanEval.candidate([])\n assert 0 == HumanEval.candidate([-1, -2, 0])\n assert 6 == HumanEval.candidate([1, 1, 2, -2, 3, 4, 5])\n assert 5 == HumanEval.candidate([1, 6, 9, -6, 0, 1, 5])\n assert 4 == HumanEval.candidate([1, 100, 98, -7, 1, -1])\n assert 5 == HumanEval.candidate([12, 23, 34, -45, -56, 0])\n assert 1 == HumanEval.candidate([0, 1])\n assert 1 == HumanEval.candidate([1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_109_move_one_ball", "language": "elixir", "prompt": "# We have an array 'arr' of N integers arr[1], arr[2], ..., arr[N].The\n# numbers in the array will be randomly ordered. Your task is to determine if\n# it is possible to get an array sorted in non-decreasing order by performing \n# the following operation on the given array:\n# You are allowed to perform right shift operation any number of times.\n# One right shift operation means shifting all elements of the array by one\n# position in the right direction. The last element of the array will be moved to\n# the starting position in the array i.e. 0th index. \n# If it is possible to obtain the sorted array by performing the above operation\n# then return True else return False.\n# If the given array is empty then return True.\n# Note: The given list is guaranteed to have unique elements.\n# For Example:\n# move_one_ball([3, 4, 5, 1, 2])==>True\n# Explanation: By performin 2 right shift operations, non-decreasing order can\n# be achieved for the given array.\n# move_one_ball([3, 5, 4, 1, 2])==>False\n# Explanation:It is not possible to get non-decreasing order for the given\n# array by performing any number of right shift operations.\n\ndefmodule HumanEval do\n def candidate(arr), do: move_one_ball(arr)\n def move_one_ball(arr) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_109_move_one_ball.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'move_one_ball' do\n assert true == HumanEval.candidate([3, 4, 5, 1, 2])\n assert true == HumanEval.candidate([3, 5, 10, 1, 2])\n assert false == HumanEval.candidate([4, 3, 1, 2])\n assert false == HumanEval.candidate([3, 5, 4, 1, 2])\n assert true == HumanEval.candidate([])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_10_make_palindrome", "language": "elixir", "prompt": "# Find the shortest palindrome that begins with a supplied string.\n# Algorithm idea is simple:\n# - Find the longest postfix of supplied string that is a palindrome.\n# - Append to the end of the string reverse of a string prefix that comes before the palindromic suffix.\n# >>> make_palindrome('')\n# ''\n# >>> make_palindrome('cat')\n# 'catac'\n# >>> make_palindrome('cata')\n# 'catac'\n\ndefmodule HumanEval do\n def candidate(string), do: make_palindrome(string)\n def make_palindrome(string) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_10_make_palindrome.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'make_palindrome' do\n assert \"\" == HumanEval.candidate(\"\")\n assert \"x\" == HumanEval.candidate(\"x\")\n assert \"xyzyx\" == HumanEval.candidate(\"xyz\")\n assert \"xyx\" == HumanEval.candidate(\"xyx\")\n assert \"jerryrrej\" == HumanEval.candidate(\"jerry\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_110_exchange", "language": "elixir", "prompt": "# In this problem, you will implement a function that takes two lists of numbers,\n# and determines whether it is possible to perform an exchange of elements\n# between them to make lst1 a list of only even numbers.\n# There is no limit on the number of exchanged elements between lst1 and lst2.\n# If it is possible to exchange elements between the lst1 and lst2 to make\n# all the elements of lst1 to be even, return \"YES\".\n# Otherwise, return \"NO\".\n# For example:\n# exchange([1, 2, 3, 4], [1, 2, 3, 4]) => \"YES\"\n# exchange([1, 2, 3, 4], [1, 5, 3, 4]) => \"NO\"\n# It is assumed that the input lists will be non-empty.\n\ndefmodule HumanEval do\n def candidate(lst1, lst2), do: exchange(lst1, lst2)\n def exchange(lst1, lst2) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_110_exchange.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'exchange' do\n assert \"YES\" == HumanEval.candidate([1, 2, 3, 4], [1, 2, 3, 4])\n assert \"NO\" == HumanEval.candidate([1, 2, 3, 4], [1, 5, 3, 4])\n assert \"YES\" == HumanEval.candidate([1, 2, 3, 4], [2, 1, 4, 3])\n assert \"YES\" == HumanEval.candidate([5, 7, 3], [2, 6, 4])\n assert \"NO\" == HumanEval.candidate([5, 7, 3], [2, 6, 3])\n assert \"NO\" == HumanEval.candidate([3, 2, 6, 1, 8, 9], [3, 5, 5, 1, 1, 1])\n assert \"YES\" == HumanEval.candidate([100, 200], [200, 200])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_111_histogram", "language": "elixir", "prompt": "# Given a string representing a space separated lowercase letters, return a dictionary\n# of the letter with the most repetition and containing the corresponding count.\n# If several letters have the same occurrence, return all of them.\n# Example:\n# histogram('a b c') == {'a': 1, 'b': 1, 'c': 1}\n# histogram('a b b a') == {'a': 2, 'b': 2}\n# histogram('a b c a b') == {'a': 2, 'b': 2}\n# histogram('b b b b a') == {'b': 4}\n# histogram('') == {}\n\ndefmodule HumanEval do\n def candidate(test), do: histogram(test)\n def histogram(test) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_111_histogram.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'histogram' do\n assert %{\"a\" => 2, \"b\" => 2} == HumanEval.candidate(\"a b b a\")\n assert %{\"a\" => 2, \"b\" => 2} == HumanEval.candidate(\"a b c a b\")\n assert %{\"a\" => 1, \"b\" => 1, \"c\" => 1, \"d\" => 1, \"g\" => 1} == HumanEval.candidate(\"a b c d g\")\n assert %{\"r\" => 1, \"t\" => 1, \"g\" => 1} == HumanEval.candidate(\"r t g\")\n assert %{\"b\" => 4} == HumanEval.candidate(\"b b b b a\")\n assert %{\"r\" => 1, \"t\" => 1, \"g\" => 1} == HumanEval.candidate(\"r t g\")\n assert %{} == HumanEval.candidate(\"\")\n assert %{\"a\" => 1} == HumanEval.candidate(\"a\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_112_reverse_delete", "language": "elixir", "prompt": "# Task\n# We are given two strings s and c, you have to deleted all the characters in s that are equal to any character in c\n# then check if the result string is palindrome.\n# A string is called palindrome if it reads the same backward as forward.\n# You should return a tuple containing the result string and True/False for the check.\n# Example\n# For s = \"abcde\", c = \"ae\", the result should be ('bcd',False)\n# For s = \"abcdef\", c = \"b\" the result should be ('acdef',False)\n# For s = \"abcdedcba\", c = \"ab\", the result should be ('cdedc',True)\n\ndefmodule HumanEval do\n def candidate(s, c), do: reverse_delete(s, c)\n def reverse_delete(s, c) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_112_reverse_delete.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'reverse_delete' do\n assert {\"bcd\", false} == HumanEval.candidate(\"abcde\", \"ae\")\n assert {\"acdef\", false} == HumanEval.candidate(\"abcdef\", \"b\")\n assert {\"cdedc\", true} == HumanEval.candidate(\"abcdedcba\", \"ab\")\n assert {\"dik\", false} == HumanEval.candidate(\"dwik\", \"w\")\n assert {\"\", true} == HumanEval.candidate(\"a\", \"a\")\n assert {\"abcdedcba\", true} == HumanEval.candidate(\"abcdedcba\", \"\")\n assert {\"abcdedcba\", true} == HumanEval.candidate(\"abcdedcba\", \"v\")\n assert {\"abba\", true} == HumanEval.candidate(\"vabba\", \"v\")\n assert {\"\", true} == HumanEval.candidate(\"mamma\", \"mia\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_113_odd_count", "language": "elixir", "prompt": "# Given a list of strings, where each string consists of only digits, return a list.\n# Each element i of the output should be \"the number of odd elements in the\n# string i of the input.\" where all the i's should be replaced by the number\n# of odd digits in the i'th string of the input.\n# >>> odd_count(['1234567'])\n# [\"the number of odd elements 4n the str4ng 4 of the 4nput.\"]\n# >>> odd_count(['3',\"11111111\"])\n# [\"the number of odd elements 1n the str1ng 1 of the 1nput.\",\n# \"the number of odd elements 8n the str8ng 8 of the 8nput.\"]\n\ndefmodule HumanEval do\n def candidate(lst), do: odd_count(lst)\n def odd_count(lst) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_113_odd_count.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'odd_count' do\n assert [\"the number of odd elements 4n the str4ng 4 of the 4nput.\"] == HumanEval.candidate([\"1234567\"])\n assert [\"the number of odd elements 1n the str1ng 1 of the 1nput.\", \"the number of odd elements 8n the str8ng 8 of the 8nput.\"] == HumanEval.candidate([\"3\", \"11111111\"])\n assert [\"the number of odd elements 2n the str2ng 2 of the 2nput.\", \"the number of odd elements 3n the str3ng 3 of the 3nput.\", \"the number of odd elements 2n the str2ng 2 of the 2nput.\"] == HumanEval.candidate([\"271\", \"137\", \"314\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_114_minSubArraySum", "language": "elixir", "prompt": "# Given an array of integers nums, find the minimum sum of any non-empty sub-array\n# of nums.\n# Example\n# minSubArraySum([2, 3, 4, 1, 2, 4]) == 1\n# minSubArraySum([-1, -2, -3]) == -6\n\ndefmodule HumanEval do\n def candidate(nums), do: minSubArraySum(nums)\n def minSubArraySum(nums) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_114_minSubArraySum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'minSubArraySum' do\n assert 1 == HumanEval.candidate([2, 3, 4, 1, 2, 4])\n assert -6 == HumanEval.candidate([-1, -2, -3])\n assert -14 == HumanEval.candidate([-1, -2, -3, 2, -10])\n assert -9999999999999999 == HumanEval.candidate([-9999999999999999])\n assert 0 == HumanEval.candidate([0, 10, 20, 1000000])\n assert -6 == HumanEval.candidate([-1, -2, -3, 10, -5])\n assert -6 == HumanEval.candidate([100, -1, -2, -3, 10, -5])\n assert 3 == HumanEval.candidate([10, 11, 13, 8, 3, 4])\n assert -33 == HumanEval.candidate([100, -33, 32, -1, 0, -2])\n assert -10 == HumanEval.candidate([-10])\n assert 7 == HumanEval.candidate([7])\n assert -1 == HumanEval.candidate([1, -1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_115_max_fill", "language": "elixir", "prompt": "# You are given a rectangular grid of wells. Each row represents a single well,\n# and each 1 in a row represents a single unit of water.\n# Each well has a corresponding bucket that can be used to extract water from it, \n# and all buckets have the same capacity.\n# Your task is to use the buckets to empty the wells.\n# Output the number of times you need to lower the buckets.\n# Example 1:\n# Input: \n# grid : [[0,0,1,0], [0,1,0,0], [1,1,1,1]]\n# bucket_capacity : 1\n# Output: 6\n# Example 2:\n# Input: \n# grid : [[0,0,1,1], [0,0,0,0], [1,1,1,1], [0,1,1,1]]\n# bucket_capacity : 2\n# Output: 5\n# Example 3:\n# Input: \n# grid : [[0,0,0], [0,0,0]]\n# bucket_capacity : 5\n# Output: 0\n# Constraints:\n# * all wells have the same length\n# * 1 <= grid.length <= 10^2\n# * 1 <= grid[:,1].length <= 10^2\n# * grid[i][j] -> 0 | 1\n# * 1 <= capacity <= 10\n\ndefmodule HumanEval do\n def candidate(grid, capacity), do: max_fill(grid, capacity)\n def max_fill(grid, capacity) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_115_max_fill.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'max_fill' do\n assert 6 == HumanEval.candidate([[0, 0, 1, 0], [0, 1, 0, 0], [1, 1, 1, 1]], 1)\n assert 5 == HumanEval.candidate([[0, 0, 1, 1], [0, 0, 0, 0], [1, 1, 1, 1], [0, 1, 1, 1]], 2)\n assert 0 == HumanEval.candidate([[0, 0, 0], [0, 0, 0]], 5)\n assert 4 == HumanEval.candidate([[1, 1, 1, 1], [1, 1, 1, 1]], 2)\n assert 2 == HumanEval.candidate([[1, 1, 1, 1], [1, 1, 1, 1]], 9)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_116_sort_array", "language": "elixir", "prompt": "# In this Kata, you have to sort an array of non-negative integers according to\n# number of ones in their binary representation in ascending order.\n# For similar number of ones, sort based on decimal value.\n# It must be implemented like this:\n# >>> sort_array([1, 5, 2, 3, 4]) == [1, 2, 3, 4, 5]\n# >>> sort_array([-2, -3, -4, -5, -6]) == [-6, -5, -4, -3, -2]\n# >>> sort_array([1, 0, 2, 3, 4]) [0, 1, 2, 3, 4]\n\ndefmodule HumanEval do\n def candidate(arr), do: sort_array(arr)\n def sort_array(arr) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_116_sort_array.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sort_array' do\n assert [1, 2, 4, 3, 5] == HumanEval.candidate([1, 5, 2, 3, 4])\n assert [-4, -2, -6, -5, -3] == HumanEval.candidate([-2, -3, -4, -5, -6])\n assert [0, 1, 2, 4, 3] == HumanEval.candidate([1, 0, 2, 3, 4])\n assert [] == HumanEval.candidate([])\n assert [2, 2, 4, 4, 3, 3, 5, 5, 5, 7, 77] == HumanEval.candidate([2, 5, 77, 4, 5, 3, 5, 7, 2, 3, 4])\n assert [32, 3, 5, 6, 12, 44] == HumanEval.candidate([3, 6, 44, 12, 32, 5])\n assert [2, 4, 8, 16, 32] == HumanEval.candidate([2, 4, 8, 16, 32])\n assert [2, 4, 8, 16, 32] == HumanEval.candidate([2, 4, 8, 16, 32])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_117_select_words", "language": "elixir", "prompt": "# Given a string s and a natural number n, you have been tasked to implement \n# a function that returns a list of all words from string s that contain exactly \n# n consonants, in order these words appear in the string s.\n# If the string s is empty then the function should return an empty list.\n# Note: you may assume the input string contains only letters and spaces.\n# Examples:\n# select_words(\"Mary had a little lamb\", 4) ==> [\"little\"]\n# select_words(\"Mary had a little lamb\", 3) ==> [\"Mary\", \"lamb\"]\n# select_words(\"simple white space\", 2) ==> []\n# select_words(\"Hello world\", 4) ==> [\"world\"]\n# select_words(\"Uncle sam\", 3) ==> [\"Uncle\"]\n\ndefmodule HumanEval do\n def candidate(s, n), do: select_words(s, n)\n def select_words(s, n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_117_select_words.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'select_words' do\n assert [\"little\"] == HumanEval.candidate(\"Mary had a little lamb\", 4)\n assert [\"Mary\", \"lamb\"] == HumanEval.candidate(\"Mary had a little lamb\", 3)\n assert [] == HumanEval.candidate(\"simple white space\", 2)\n assert [\"world\"] == HumanEval.candidate(\"Hello world\", 4)\n assert [\"Uncle\"] == HumanEval.candidate(\"Uncle sam\", 3)\n assert [] == HumanEval.candidate(\"\", 4)\n assert [\"b\", \"c\", \"d\", \"f\"] == HumanEval.candidate(\"a b c d e f\", 1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_118_get_closest_vowel", "language": "elixir", "prompt": "# You are given a word. Your task is to find the closest vowel that stands between \n# two consonants from the right side of the word (case sensitive).\n# Vowels in the beginning and ending doesn't count. Return empty string if you didn't\n# find any vowel met the above condition. \n# You may assume that the given string contains English letter only.\n# Example:\n# get_closest_vowel(\"yogurt\") ==> \"u\"\n# get_closest_vowel(\"FULL\") ==> \"U\"\n# get_closest_vowel(\"quick\") ==> \"\"\n# get_closest_vowel(\"ab\") ==> \"\"\n\ndefmodule HumanEval do\n def candidate(word), do: get_closest_vowel(word)\n def get_closest_vowel(word) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_118_get_closest_vowel.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'get_closest_vowel' do\n assert \"u\" == HumanEval.candidate(\"yogurt\")\n assert \"u\" == HumanEval.candidate(\"full\")\n assert \"\" == HumanEval.candidate(\"easy\")\n assert \"\" == HumanEval.candidate(\"eAsy\")\n assert \"\" == HumanEval.candidate(\"ali\")\n assert \"a\" == HumanEval.candidate(\"bad\")\n assert \"o\" == HumanEval.candidate(\"most\")\n assert \"\" == HumanEval.candidate(\"ab\")\n assert \"\" == HumanEval.candidate(\"ba\")\n assert \"\" == HumanEval.candidate(\"quick\")\n assert \"i\" == HumanEval.candidate(\"anime\")\n assert \"\" == HumanEval.candidate(\"Asia\")\n assert \"o\" == HumanEval.candidate(\"Above\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_119_match_parens", "language": "elixir", "prompt": "# You are given a list of two strings, both strings consist of open\n# parentheses '(' or close parentheses ')' only.\n# Your job is to check if it is possible to concatenate the two strings in\n# some order, that the resulting string will be good.\n# A string S is considered to be good if and only if all parentheses in S\n# are balanced. For example: the string '(())()' is good, while the string\n# '())' is not.\n# Return 'Yes' if there's a way to make a good string, and return 'No' otherwise.\n# Examples:\n# match_parens(['()(', ')']) == 'Yes'\n# match_parens([')', ')']) == 'No'\n\ndefmodule HumanEval do\n def candidate(lst), do: match_parens(lst)\n def match_parens(lst) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_119_match_parens.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'match_parens' do\n assert \"Yes\" == HumanEval.candidate([\"()(\", \")\"])\n assert \"No\" == HumanEval.candidate([\")\", \")\"])\n assert \"No\" == HumanEval.candidate([\"(()(())\", \"())())\"])\n assert \"Yes\" == HumanEval.candidate([\")())\", \"(()()(\"])\n assert \"Yes\" == HumanEval.candidate([\"(())))\", \"(()())((\"])\n assert \"No\" == HumanEval.candidate([\"()\", \"())\"])\n assert \"Yes\" == HumanEval.candidate([\"(()(\", \"()))()\"])\n assert \"No\" == HumanEval.candidate([\"((((\", \"((())\"])\n assert \"No\" == HumanEval.candidate([\")(()\", \"(()(\"])\n assert \"No\" == HumanEval.candidate([\")(\", \")(\"])\n assert \"Yes\" == HumanEval.candidate([\"(\", \")\"])\n assert \"Yes\" == HumanEval.candidate([\")\", \"(\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_11_string_xor", "language": "elixir", "prompt": "# Input are two strings a and b consisting only of 1s and 0s.\n# Perform binary XOR on these inputs and return result also as a string.\n# >>> string_xor('010', '110')\n# '100'\n\ndefmodule HumanEval do\n def candidate(a, b), do: string_xor(a, b)\n def string_xor(a, b) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_11_string_xor.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'string_xor' do\n assert \"010010\" == HumanEval.candidate(\"111000\", \"101010\")\n assert \"0\" == HumanEval.candidate(\"1\", \"1\")\n assert \"0101\" == HumanEval.candidate(\"0101\", \"0000\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_120_maximum", "language": "elixir", "prompt": "# Given an array arr of integers and a positive integer k, return a sorted list \n# of length k with the maximum k numbers in arr.\n# Example 1:\n# Input: arr = [-3, -4, 5], k = 3\n# Output: [-4, -3, 5]\n# Example 2:\n# Input: arr = [4, -4, 4], k = 2\n# Output: [4, 4]\n# Example 3:\n# Input: arr = [-3, 2, 1, 2, -1, -2, 1], k = 1\n# Output: [2]\n# Note:\n# 1. The length of the array will be in the range of [1, 1000].\n# 2. The elements in the array will be in the range of [-1000, 1000].\n# 3. 0 <= k <= len(arr)\n\ndefmodule HumanEval do\n def candidate(arr, k), do: maximum(arr, k)\n def maximum(arr, k) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_120_maximum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'maximum' do\n assert [-4, -3, 5] == HumanEval.candidate([-3, -4, 5], 3)\n assert [4, 4] == HumanEval.candidate([4, -4, 4], 2)\n assert [2] == HumanEval.candidate([-3, 2, 1, 2, -1, -2, 1], 1)\n assert [2, 20, 123] == HumanEval.candidate([123, -123, 20, 0, 1, 2, -3], 3)\n assert [0, 1, 2, 20] == HumanEval.candidate([-123, 20, 0, 1, 2, -3], 4)\n assert [-13, -8, 0, 0, 3, 5, 15] == HumanEval.candidate([5, 15, 0, 3, -13, -8, 0], 7)\n assert [3, 5] == HumanEval.candidate([-1, 0, 2, 5, 3, -10], 2)\n assert [5] == HumanEval.candidate([1, 0, 5, -7], 1)\n assert [-4, 4] == HumanEval.candidate([4, -4], 2)\n assert [-10, 10] == HumanEval.candidate([-10, 10], 2)\n assert [] == HumanEval.candidate([1, 2, 3, -23, 243, -400, 0], 0)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_121_solution", "language": "elixir", "prompt": "# Given a non-empty list of integers, return the sum of all of the odd elements that are in even positions.\n# Examples\n# solution([5, 8, 7, 1]) ==> 12\n# solution([3, 3, 3, 3, 3]) ==> 9\n# solution([30, 13, 24, 321]) ==>0\n\ndefmodule HumanEval do\n def candidate(lst), do: solution(lst)\n def solution(lst) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_121_solution.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'solution' do\n assert 12 == HumanEval.candidate([5, 8, 7, 1])\n assert 9 == HumanEval.candidate([3, 3, 3, 3, 3])\n assert 0 == HumanEval.candidate([30, 13, 24, 321])\n assert 5 == HumanEval.candidate([5, 9])\n assert 0 == HumanEval.candidate([2, 4, 8])\n assert 23 == HumanEval.candidate([30, 13, 23, 32])\n assert 3 == HumanEval.candidate([3, 13, 2, 9])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_122_add_elements", "language": "elixir", "prompt": "# Given a non-empty array of integers arr and an integer k, return\n# the sum of the elements with at most two digits from the first k elements of arr.\n# Example:\n# Input: arr = [111,21,3,4000,5,6,7,8,9], k = 4\n# Output: 24 # sum of 21 + 3\n# Constraints:\n# 1. 1 <= len(arr) <= 100\n# 2. 1 <= k <= len(arr)\n\ndefmodule HumanEval do\n def candidate(arr, k), do: add_elements(arr, k)\n def add_elements(arr, k) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_122_add_elements.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'add_elements' do\n assert -4 == HumanEval.candidate([1, -2, -3, 41, 57, 76, 87, 88, 99], 3)\n assert 0 == HumanEval.candidate([111, 121, 3, 4000, 5, 6], 2)\n assert 125 == HumanEval.candidate([11, 21, 3, 90, 5, 6, 7, 8, 9], 4)\n assert 24 == HumanEval.candidate([111, 21, 3, 4000, 5, 6, 7, 8, 9], 4)\n assert 1 == HumanEval.candidate([1], 1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_123_get_odd_collatz", "language": "elixir", "prompt": "# Given a positive integer n, return a sorted list that has the odd numbers in collatz sequence.\n# The Collatz conjecture is a conjecture in mathematics that concerns a sequence defined\n# as follows: start with any positive integer n. Then each term is obtained from the \n# previous term as follows: if the previous term is even, the next term is one half of \n# the previous term. If the previous term is odd, the next term is 3 times the previous\n# term plus 1. The conjecture is that no matter what value of n, the sequence will always reach 1.\n# Note: \n# 1. Collatz(1) is [1].\n# 2. returned list sorted in increasing order.\n# For example:\n# get_odd_collatz(5) returns [1, 5] # The collatz sequence for 5 is [5, 16, 8, 4, 2, 1], so the odd numbers are only 1, and 5.\n\ndefmodule HumanEval do\n def candidate(n), do: get_odd_collatz(n)\n def get_odd_collatz(n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_123_get_odd_collatz.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'get_odd_collatz' do\n assert [1, 5, 7, 11, 13, 17] == HumanEval.candidate(14)\n assert [1, 5] == HumanEval.candidate(5)\n assert [1, 3, 5] == HumanEval.candidate(12)\n assert [1] == HumanEval.candidate(1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_124_valid_date", "language": "elixir", "prompt": "# You have to write a function which validates a given date string and\n# returns True if the date is valid otherwise False.\n# The date is valid if all of the following rules are satisfied:\n# 1. The date string is not empty.\n# 2. The number of days is not less than 1 or higher than 31 days for months 1,3,5,7,8,10,12. And the number of days is not less than 1 or higher than 30 days for months 4,6,9,11. And, the number of days is not less than 1 or higher than 29 for the month 2.\n# 3. The months should not be less than 1 or higher than 12.\n# 4. The date should be in the format: mm-dd-yyyy\n# for example: \n# valid_date('03-11-2000') => True\n# valid_date('15-01-2012') => False\n# valid_date('04-0-2040') => False\n# valid_date('06-04-2020') => True\n# valid_date('06/04/2020') => False\n\ndefmodule HumanEval do\n def candidate(date), do: valid_date(date)\n def valid_date(date) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_124_valid_date.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'valid_date' do\n assert true == HumanEval.candidate(\"03-11-2000\")\n assert false == HumanEval.candidate(\"15-01-2012\")\n assert false == HumanEval.candidate(\"04-0-2040\")\n assert true == HumanEval.candidate(\"06-04-2020\")\n assert true == HumanEval.candidate(\"01-01-2007\")\n assert false == HumanEval.candidate(\"03-32-2011\")\n assert false == HumanEval.candidate(\"\")\n assert false == HumanEval.candidate(\"04-31-3000\")\n assert true == HumanEval.candidate(\"06-06-2005\")\n assert false == HumanEval.candidate(\"21-31-2000\")\n assert true == HumanEval.candidate(\"04-12-2003\")\n assert false == HumanEval.candidate(\"04122003\")\n assert false == HumanEval.candidate(\"20030412\")\n assert false == HumanEval.candidate(\"2003-04\")\n assert false == HumanEval.candidate(\"2003-04-12\")\n assert false == HumanEval.candidate(\"04-2003\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_125_split_words", "language": "elixir", "prompt": "# Given a string of words, return a list of words split on whitespace, if no whitespaces exists in the text you\n# should split on commas ',' if no commas exists you should return the number of lower-case letters with odd order in the\n# alphabet, ord('a') = 0, ord('b') = 1, ... ord('z') = 25\n# Examples\n# split_words(\"Hello world!\") \u279e [\"Hello\", \"world!\"]\n# split_words(\"Hello,world!\") \u279e [\"Hello\", \"world!\"]\n# split_words(\"abcdef\") == 3\n\ndefmodule HumanEval do\n def candidate(txt), do: split_words(txt)\n def split_words(txt) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_125_split_words.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'split_words' do\n assert [\"Hello\", \"world!\"] == HumanEval.candidate(\"Hello world!\")\n assert [\"Hello\", \"world!\"] == HumanEval.candidate(\"Hello,world!\")\n assert [\"Hello\", \"world,!\"] == HumanEval.candidate(\"Hello world,!\")\n assert [\"Hello,Hello,world\", \"!\"] == HumanEval.candidate(\"Hello,Hello,world !\")\n assert 3 == HumanEval.candidate(\"abcdef\")\n assert 2 == HumanEval.candidate(\"aaabb\")\n assert 1 == HumanEval.candidate(\"aaaBb\")\n assert 0 == HumanEval.candidate(\"\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_126_is_sorted", "language": "elixir", "prompt": "# Given a list of numbers, return whether or not they are sorted\n# in ascending order. If list has more than 1 duplicate of the same\n# number, return False. Assume no negative numbers and only integers.\n# Examples\n# is_sorted([5]) \u279e True\n# is_sorted([1, 2, 3, 4, 5]) \u279e True\n# is_sorted([1, 3, 2, 4, 5]) \u279e False\n# is_sorted([1, 2, 3, 4, 5, 6]) \u279e True\n# is_sorted([1, 2, 3, 4, 5, 6, 7]) \u279e True\n# is_sorted([1, 3, 2, 4, 5, 6, 7]) \u279e False\n# is_sorted([1, 2, 2, 3, 3, 4]) \u279e True\n# is_sorted([1, 2, 2, 2, 3, 4]) \u279e False\n\ndefmodule HumanEval do\n def candidate(lst), do: is_sorted(lst)\n def is_sorted(lst) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_126_is_sorted.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_sorted' do\n assert true == HumanEval.candidate([5])\n assert true == HumanEval.candidate([1, 2, 3, 4, 5])\n assert false == HumanEval.candidate([1, 3, 2, 4, 5])\n assert true == HumanEval.candidate([1, 2, 3, 4, 5, 6])\n assert true == HumanEval.candidate([1, 2, 3, 4, 5, 6, 7])\n assert false == HumanEval.candidate([1, 3, 2, 4, 5, 6, 7])\n assert true == HumanEval.candidate([])\n assert true == HumanEval.candidate([1])\n assert false == HumanEval.candidate([3, 2, 1])\n assert false == HumanEval.candidate([1, 2, 2, 2, 3, 4])\n assert false == HumanEval.candidate([1, 2, 3, 3, 3, 4])\n assert true == HumanEval.candidate([1, 2, 2, 3, 3, 4])\n assert true == HumanEval.candidate([1, 2, 3, 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_127_intersection", "language": "elixir", "prompt": "# You are given two intervals,\n# where each interval is a pair of integers. For example, interval = (start, end) = (1, 2).\n# The given intervals are closed which means that the interval (start, end)\n# includes both start and end.\n# For each given interval, it is assumed that its start is less or equal its end.\n# Your task is to determine whether the length of intersection of these two \n# intervals is a prime number.\n# Example, the intersection of the intervals (1, 3), (2, 4) is (2, 3)\n# which its length is 1, which not a prime number.\n# If the length of the intersection is a prime number, return \"YES\",\n# otherwise, return \"NO\".\n# If the two intervals don't intersect, return \"NO\".\n# [input/output] samples:\n# intersection((1, 2), (2, 3)) ==> \"NO\"\n# intersection((-1, 1), (0, 4)) ==> \"NO\"\n# intersection((-3, -1), (-5, 5)) ==> \"YES\"\n\ndefmodule HumanEval do\n def candidate(interval1, interval2), do: intersection(interval1, interval2)\n def intersection(interval1, interval2) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_127_intersection.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'intersection' do\n assert \"NO\" == HumanEval.candidate({1, 2}, {2, 3})\n assert \"NO\" == HumanEval.candidate({-1, 1}, {0, 4})\n assert \"YES\" == HumanEval.candidate({-3, -1}, {-5, 5})\n assert \"YES\" == HumanEval.candidate({-2, 2}, {-4, 0})\n assert \"NO\" == HumanEval.candidate({-11, 2}, {-1, -1})\n assert \"NO\" == HumanEval.candidate({1, 2}, {3, 5})\n assert \"NO\" == HumanEval.candidate({1, 2}, {1, 2})\n assert \"NO\" == HumanEval.candidate({-2, -2}, {-3, -2})\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_128_prod_signs", "language": "elixir", "prompt": "# You are given an array arr of integers and you need to return\n# sum of magnitudes of integers multiplied by product of all signs\n# of each number in the array, represented by 1, -1 or 0.\n# Note: return None for empty arr.\n# Example:\n# >>> prod_signs([1, 2, 2, -4]) == -9\n# >>> prod_signs([0, 1]) == 0\n# >>> prod_signs([]) == None\n\ndefmodule HumanEval do\n def candidate(arr), do: prod_signs(arr)\n def prod_signs(arr) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_128_prod_signs.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'prod_signs' do\n assert -9 == HumanEval.candidate([1, 2, 2, -4])\n assert 0 == HumanEval.candidate([0, 1])\n assert -10 == HumanEval.candidate([1, 1, 1, 2, 3, -1, 1])\n assert nil == HumanEval.candidate([])\n assert 20 == HumanEval.candidate([2, 4, 1, 2, -1, -1, 9])\n assert 4 == HumanEval.candidate([-1, 1, -1, 1])\n assert -4 == HumanEval.candidate([-1, 1, 1, 1])\n assert 0 == HumanEval.candidate([-1, 1, 1, 0])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_129_minPath", "language": "elixir", "prompt": "# Given a grid with N rows and N columns (N >= 2) and a positive integer k, \n# each cell of the grid contains a value. Every integer in the range [1, N * N]\n# inclusive appears exactly once on the cells of the grid.\n# You have to find the minimum path of length k in the grid. You can start\n# from any cell, and in each step you can move to any of the neighbor cells,\n# in other words, you can go to cells which share an edge with you current\n# cell.\n# Please note that a path of length k means visiting exactly k cells (not\n# necessarily distinct).\n# You CANNOT go off the grid.\n# A path A (of length k) is considered less than a path B (of length k) if\n# after making the ordered lists of the values on the cells that A and B go\n# through (let's call them lst_A and lst_B), lst_A is lexicographically less\n# than lst_B, in other words, there exist an integer index i (1 <= i <= k)\n# such that lst_A[i] < lst_B[i] and for any j (1 <= j < i) we have\n# lst_A[j] = lst_B[j].\n# It is guaranteed that the answer is unique.\n# Return an ordered list of the values on the cells that the minimum path go through.\n# Examples:\n# Input: grid = [ [1,2,3], [4,5,6], [7,8,9]], k = 3\n# Output: [1, 2, 1]\n# Input: grid = [ [5,9,3], [4,1,6], [7,8,2]], k = 1\n# Output: [1]\n\ndefmodule HumanEval do\n def candidate(grid, k), do: minPath(grid, k)\n def minPath(grid, k) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_129_minPath.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'minPath' do\n assert [1, 2, 1] == HumanEval.candidate([[1, 2, 3], [4, 5, 6], [7, 8, 9]], 3)\n assert [1] == HumanEval.candidate([[5, 9, 3], [4, 1, 6], [7, 8, 2]], 1)\n assert [1, 2, 1, 2] == HumanEval.candidate([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]], 4)\n assert [1, 10, 1, 10, 1, 10, 1] == HumanEval.candidate([[6, 4, 13, 10], [5, 7, 12, 1], [3, 16, 11, 15], [8, 14, 9, 2]], 7)\n assert [1, 7, 1, 7, 1] == HumanEval.candidate([[8, 14, 9, 2], [6, 4, 13, 15], [5, 7, 1, 12], [3, 10, 11, 16]], 5)\n assert [1, 6, 1, 6, 1, 6, 1, 6, 1] == HumanEval.candidate([[11, 8, 7, 2], [5, 16, 14, 4], [9, 3, 15, 6], [12, 13, 10, 1]], 9)\n assert [1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6] == HumanEval.candidate([[12, 13, 10, 1], [9, 3, 15, 6], [5, 16, 14, 4], [11, 8, 7, 2]], 12)\n assert [1, 3, 1, 3, 1, 3, 1, 3] == HumanEval.candidate([[2, 7, 4], [3, 1, 5], [6, 8, 9]], 8)\n assert [1, 5, 1, 5, 1, 5, 1, 5] == HumanEval.candidate([[6, 1, 5], [3, 8, 9], [2, 7, 4]], 8)\n assert [1, 2, 1, 2, 1, 2, 1, 2, 1, 2] == HumanEval.candidate([[1, 2], [3, 4]], 10)\n assert [1, 3, 1, 3, 1, 3, 1, 3, 1, 3] == HumanEval.candidate([[1, 3], [3, 2]], 10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_12_longest", "language": "elixir", "prompt": "# Out of list of strings, return the longest one. Return the first one in case of multiple\n# strings of the same length. Return None in case the input list is empty.\n# >>> longest([])\n# >>> longest(['a', 'b', 'c'])\n# 'a'\n# >>> longest(['a', 'bb', 'ccc'])\n# 'ccc'\n\ndefmodule HumanEval do\n def candidate(strings), do: longest(strings)\n def longest(strings) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_12_longest.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'longest' do\n assert nil == HumanEval.candidate([])\n assert \"x\" == HumanEval.candidate([\"x\", \"y\", \"z\"])\n assert \"zzzz\" == HumanEval.candidate([\"x\", \"yyy\", \"zzzz\", \"www\", \"kkkk\", \"abc\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_130_tri", "language": "elixir", "prompt": "# Everyone knows Fibonacci sequence, it was studied deeply by mathematicians in \n# the last couple centuries. However, what people don't know is Tribonacci sequence.\n# Tribonacci sequence is defined by the recurrence:\n# tri(1) = 3\n# tri(n) = 1 + n / 2, if n is even.\n# tri(n) = tri(n - 1) + tri(n - 2) + tri(n + 1), if n is odd.\n# For example:\n# tri(2) = 1 + (2 / 2) = 2\n# tri(4) = 3\n# tri(3) = tri(2) + tri(1) + tri(4)\n# = 2 + 3 + 3 = 8 \n# You are given a non-negative integer number n, you have to a return a list of the \n# first n + 1 numbers of the Tribonacci sequence.\n# Examples:\n# tri(3) = [1, 3, 2, 8]\n\ndefmodule HumanEval do\n def candidate(n), do: tri(n)\n def tri(n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_130_tri.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'tri' do\n assert [1, 3, 2, 8] == HumanEval.candidate(3)\n assert [1, 3, 2, 8, 3] == HumanEval.candidate(4)\n assert [1, 3, 2, 8, 3, 15] == HumanEval.candidate(5)\n assert [1, 3, 2, 8, 3, 15, 4] == HumanEval.candidate(6)\n assert [1, 3, 2, 8, 3, 15, 4, 24] == HumanEval.candidate(7)\n assert [1, 3, 2, 8, 3, 15, 4, 24, 5] == HumanEval.candidate(8)\n assert [1, 3, 2, 8, 3, 15, 4, 24, 5, 35] == HumanEval.candidate(9)\n assert [1, 3, 2, 8, 3, 15, 4, 24, 5, 35, 6, 48, 7, 63, 8, 80, 9, 99, 10, 120, 11] == HumanEval.candidate(20)\n assert [1] == HumanEval.candidate(0)\n assert [1, 3] == HumanEval.candidate(1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_131_digits", "language": "elixir", "prompt": "# Given a positive integer n, return the product of the odd digits.\n# Return 0 if all digits are even.\n# For example:\n# digits(1) == 1\n# digits(4) == 0\n# digits(235) == 15\n\ndefmodule HumanEval do\n def candidate(n), do: digits(n)\n def digits(n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_131_digits.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'digits' do\n assert 5 == HumanEval.candidate(5)\n assert 5 == HumanEval.candidate(54)\n assert 1 == HumanEval.candidate(120)\n assert 5 == HumanEval.candidate(5014)\n assert 315 == HumanEval.candidate(98765)\n assert 2625 == HumanEval.candidate(5576543)\n assert 0 == HumanEval.candidate(2468)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_132_is_nested", "language": "elixir", "prompt": "# Create a function that takes a string as input which contains only square brackets.\n# The function should return True if and only if there is a valid subsequence of brackets \n# where at least one bracket in the subsequence is nested.\n# is_nested('[[]]') \u279e True\n# is_nested('[]]]]]]][[[[[]') \u279e False\n# is_nested('[][]') \u279e False\n# is_nested('[]') \u279e False\n# is_nested('[[][]]') \u279e True\n# is_nested('[[]][[') \u279e True\n\ndefmodule HumanEval do\n def candidate(string), do: is_nested(string)\n def is_nested(string) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_132_is_nested.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_nested' do\n assert true == HumanEval.candidate(\"[[]]\")\n assert false == HumanEval.candidate(\"[]]]]]]][[[[[]\")\n assert false == HumanEval.candidate(\"[][]\")\n assert false == HumanEval.candidate(\"[]\")\n assert true == HumanEval.candidate(\"[[[[]]]]\")\n assert false == HumanEval.candidate(\"[]]]]]]]]]]\")\n assert true == HumanEval.candidate(\"[][][[]]\")\n assert false == HumanEval.candidate(\"[[]\")\n assert false == HumanEval.candidate(\"[]]\")\n assert true == HumanEval.candidate(\"[[]][[\")\n assert true == HumanEval.candidate(\"[[][]]\")\n assert false == HumanEval.candidate(\"\")\n assert false == HumanEval.candidate(\"[[[[[[[[\")\n assert false == HumanEval.candidate(\"]]]]]]]]\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_133_sum_squares", "language": "elixir", "prompt": "# You are given a list of numbers.\n# You need to return the sum of squared numbers in the given list,\n# round each element in the list to the upper int(Ceiling) first.\n# Examples:\n# For lst = [1,2,3] the output should be 14\n# For lst = [1,4,9] the output should be 98\n# For lst = [1,3,5,7] the output should be 84\n# For lst = [1.4,4.2,0] the output should be 29\n# For lst = [-2.4,1,1] the output should be 6\n\ndefmodule HumanEval do\n def candidate(lst), do: sum_squares(lst)\n def sum_squares(lst) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_133_sum_squares.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sum_squares' do\n assert 14 == HumanEval.candidate([1.0, 2.0, 3.0])\n assert 14 == HumanEval.candidate([1.0, 2.0, 3.0])\n assert 84 == HumanEval.candidate([1.0, 3.0, 5.0, 7.0])\n assert 29 == HumanEval.candidate([1.4, 4.2, 0.0])\n assert 6 == HumanEval.candidate([-2.4, 1.0, 1.0])\n assert 10230 == HumanEval.candidate([100.0, 1.0, 15.0, 2.0])\n assert 200000000 == HumanEval.candidate([10000.0, 10000.0])\n assert 75 == HumanEval.candidate([-1.4, 4.6, 6.3])\n assert 1086 == HumanEval.candidate([-1.4, 17.9, 18.9, 19.9])\n assert 0 == HumanEval.candidate([0.0])\n assert 1 == HumanEval.candidate([-1.0])\n assert 2 == HumanEval.candidate([-1.0, 1.0, 0.0])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_134_check_if_last_char_is_a_letter", "language": "elixir", "prompt": "# Create a function that returns True if the last character\n# of a given string is an alphabetical character and is not\n# a part of a word, and False otherwise.\n# Note: \"word\" is a group of characters separated by space.\n# Examples:\n# check_if_last_char_is_a_letter(\"apple pie\") \u279e False\n# check_if_last_char_is_a_letter(\"apple pi e\") \u279e True\n# check_if_last_char_is_a_letter(\"apple pi e \") \u279e False\n# check_if_last_char_is_a_letter(\"\") \u279e False\n\ndefmodule HumanEval do\n def candidate(txt), do: check_if_last_char_is_a_letter(txt)\n def check_if_last_char_is_a_letter(txt) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_134_check_if_last_char_is_a_letter.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'check_if_last_char_is_a_letter' do\n assert false == HumanEval.candidate(\"apple\")\n assert true == HumanEval.candidate(\"apple pi e\")\n assert false == HumanEval.candidate(\"eeeee\")\n assert true == HumanEval.candidate(\"A\")\n assert false == HumanEval.candidate(\"Pumpkin pie \")\n assert false == HumanEval.candidate(\"Pumpkin pie 1\")\n assert false == HumanEval.candidate(\"\")\n assert false == HumanEval.candidate(\"eeeee e \")\n assert false == HumanEval.candidate(\"apple pie\")\n assert false == HumanEval.candidate(\"apple pi e \")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_135_can_arrange", "language": "elixir", "prompt": "# Create a function which returns the largest index of an element which\n# is not greater than or equal to the element immediately preceding it. If\n# no such element exists then return -1. The given array will not contain\n# duplicate values.\n# Examples:\n# can_arrange([1,2,4,3,5]) = 3\n# can_arrange([1,2,3]) = -1\n\ndefmodule HumanEval do\n def candidate(arr), do: can_arrange(arr)\n def can_arrange(arr) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_135_can_arrange.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'can_arrange' do\n assert 3 == HumanEval.candidate([1, 2, 4, 3, 5])\n assert -1 == HumanEval.candidate([1, 2, 4, 5])\n assert 2 == HumanEval.candidate([1, 4, 2, 5, 6, 7, 8, 9, 10])\n assert 4 == HumanEval.candidate([4, 8, 5, 7, 3])\n assert -1 == HumanEval.candidate([])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_136_largest_smallest_integers", "language": "elixir", "prompt": "# Create a function that returns a tuple (a, b), where 'a' is\n# the largest of negative integers, and 'b' is the smallest\n# of positive integers in a list.\n# If there is no negative or positive integers, return them as None.\n# Examples:\n# largest_smallest_integers([2, 4, 1, 3, 5, 7]) == (None, 1)\n# largest_smallest_integers([]) == (None, None)\n# largest_smallest_integers([0]) == (None, None)\n\ndefmodule HumanEval do\n def candidate(lst), do: largest_smallest_integers(lst)\n def largest_smallest_integers(lst) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_136_largest_smallest_integers.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'largest_smallest_integers' do\n assert {nil, 1} == HumanEval.candidate([2, 4, 1, 3, 5, 7])\n assert {nil, 1} == HumanEval.candidate([2, 4, 1, 3, 5, 7, 0])\n assert {-2, 1} == HumanEval.candidate([1, 3, 2, 4, 5, 6, -2])\n assert {-7, 2} == HumanEval.candidate([4, 5, 3, 6, 2, 7, -7])\n assert {-9, 2} == HumanEval.candidate([7, 3, 8, 4, 9, 2, 5, -9])\n assert {nil, nil} == HumanEval.candidate([])\n assert {nil, nil} == HumanEval.candidate([0])\n assert {-1, nil} == HumanEval.candidate([-1, -3, -5, -6])\n assert {-1, nil} == HumanEval.candidate([-1, -3, -5, -6, 0])\n assert {-3, 1} == HumanEval.candidate([-6, -4, -4, -3, 1])\n assert {-3, 1} == HumanEval.candidate([-6, -4, -4, -3, -100, 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_137_compare_one", "language": "elixir", "prompt": "# Create a function that takes integers, floats, or strings representing\n# real numbers, and returns the larger variable in its given variable type.\n# Return None if the values are equal.\n# Note: If a real number is represented as a string, the floating point might be . or ,\n# compare_one(1, 2.5) \u279e 2.5\n# compare_one(1, \"2,3\") \u279e \"2,3\"\n# compare_one(\"5,1\", \"6\") \u279e \"6\"\n# compare_one(\"1\", 1) \u279e None\n\ndefmodule HumanEval do\n def candidate(a, b), do: compare_one(a, b)\n def compare_one(a, b) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_137_compare_one.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'compare_one' do\n assert 2 == HumanEval.candidate(1, 2)\n assert 2.5 == HumanEval.candidate(1, 2.5)\n assert 3 == HumanEval.candidate(2, 3)\n assert 6 == HumanEval.candidate(5, 6)\n assert \"2,3\" == HumanEval.candidate(1, \"2,3\")\n assert \"6\" == HumanEval.candidate(\"5,1\", \"6\")\n assert \"2\" == HumanEval.candidate(\"1\", \"2\")\n assert nil == HumanEval.candidate(\"1\", 1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_138_is_equal_to_sum_even", "language": "elixir", "prompt": "# Evaluate whether the given number n can be written as the sum of exactly 4 positive even numbers\n# Example\n# is_equal_to_sum_even(4) == False\n# is_equal_to_sum_even(6) == False\n# is_equal_to_sum_even(8) == True\n\ndefmodule HumanEval do\n def candidate(n), do: is_equal_to_sum_even(n)\n def is_equal_to_sum_even(n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_138_is_equal_to_sum_even.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_equal_to_sum_even' do\n assert false == HumanEval.candidate(4)\n assert false == HumanEval.candidate(6)\n assert true == HumanEval.candidate(8)\n assert true == HumanEval.candidate(10)\n assert false == HumanEval.candidate(11)\n assert true == HumanEval.candidate(12)\n assert false == HumanEval.candidate(13)\n assert true == HumanEval.candidate(16)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_139_special_factorial", "language": "elixir", "prompt": "# The Brazilian factorial is defined as:\n# brazilian_factorial(n) = n! * (n-1)! * (n-2)! * ... * 1!\n# where n > 0\n# For example:\n# >>> special_factorial(4)\n# 288\n# The function will receive an integer as input and should return the special\n# factorial of this integer.\n\ndefmodule HumanEval do\n def candidate(n), do: special_factorial(n)\n def special_factorial(n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_139_special_factorial.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'special_factorial' do\n assert 288 == HumanEval.candidate(4)\n assert 34560 == HumanEval.candidate(5)\n assert 125411328000 == HumanEval.candidate(7)\n assert 1 == HumanEval.candidate(1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_13_greatest_common_divisor", "language": "elixir", "prompt": "# Return a greatest common divisor of two integers a and b\n# >>> greatest_common_divisor(3, 5)\n# 1\n# >>> greatest_common_divisor(25, 15)\n# 5\n\ndefmodule HumanEval do\n def candidate(a, b), do: greatest_common_divisor(a, b)\n def greatest_common_divisor(a, b) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_13_greatest_common_divisor.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'greatest_common_divisor' do\n assert 1 == HumanEval.candidate(3, 7)\n assert 5 == HumanEval.candidate(10, 15)\n assert 7 == HumanEval.candidate(49, 14)\n assert 12 == HumanEval.candidate(144, 60)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_140_fix_spaces", "language": "elixir", "prompt": "# Given a string text, replace all spaces in it with underscores, \n# and if a string has more than 2 consecutive spaces, \n# then replace all consecutive spaces with - \n# fix_spaces(\"Example\") == \"Example\"\n# fix_spaces(\"Example 1\") == \"Example_1\"\n# fix_spaces(\" Example 2\") == \"_Example_2\"\n# fix_spaces(\" Example 3\") == \"_Example-3\"\n\ndefmodule HumanEval do\n def candidate(text), do: fix_spaces(text)\n def fix_spaces(text) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_140_fix_spaces.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fix_spaces' do\n assert \"Example\" == HumanEval.candidate(\"Example\")\n assert \"Mudasir_Hanif_\" == HumanEval.candidate(\"Mudasir Hanif \")\n assert \"Yellow_Yellow__Dirty__Fellow\" == HumanEval.candidate(\"Yellow Yellow Dirty Fellow\")\n assert \"Exa-mple\" == HumanEval.candidate(\"Exa mple\")\n assert \"-Exa_1_2_2_mple\" == HumanEval.candidate(\" Exa 1 2 2 mple\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_141_file_name_check", "language": "elixir", "prompt": "# Create a function which takes a string representing a file's name, and returns\n# 'Yes' if the the file's name is valid, and returns 'No' otherwise.\n# A file's name is considered to be valid if and only if all the following conditions \n# are met:\n# - There should not be more than three digits ('0'-'9') in the file's name.\n# - The file's name contains exactly one dot '.'\n# - The substring before the dot should not be empty, and it starts with a letter from \n# the latin alphapet ('a'-'z' and 'A'-'Z').\n# - The substring after the dot should be one of these: ['txt', 'exe', 'dll']\n# Examples:\n# file_name_check(\"example.txt\") # => 'Yes'\n# file_name_check(\"1example.dll\") # => 'No' (the name should start with a latin alphapet letter)\n\ndefmodule HumanEval do\n def candidate(file_name), do: file_name_check(file_name)\n def file_name_check(file_name) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_141_file_name_check.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'file_name_check' do\n assert \"Yes\" == HumanEval.candidate(\"example.txt\")\n assert \"No\" == HumanEval.candidate(\"1example.dll\")\n assert \"No\" == HumanEval.candidate(\"s1sdf3.asd\")\n assert \"Yes\" == HumanEval.candidate(\"K.dll\")\n assert \"Yes\" == HumanEval.candidate(\"MY16FILE3.exe\")\n assert \"No\" == HumanEval.candidate(\"His12FILE94.exe\")\n assert \"No\" == HumanEval.candidate(\"_Y.txt\")\n assert \"No\" == HumanEval.candidate(\"?aREYA.exe\")\n assert \"No\" == HumanEval.candidate(\"/this_is_valid.dll\")\n assert \"No\" == HumanEval.candidate(\"this_is_valid.wow\")\n assert \"Yes\" == HumanEval.candidate(\"this_is_valid.txt\")\n assert \"No\" == HumanEval.candidate(\"this_is_valid.txtexe\")\n assert \"No\" == HumanEval.candidate(\"#this2_i4s_5valid.ten\")\n assert \"No\" == HumanEval.candidate(\"@this1_is6_valid.exe\")\n assert \"No\" == HumanEval.candidate(\"this_is_12valid.6exe4.txt\")\n assert \"No\" == HumanEval.candidate(\"all.exe.txt\")\n assert \"Yes\" == HumanEval.candidate(\"I563_No.exe\")\n assert \"Yes\" == HumanEval.candidate(\"Is3youfault.txt\")\n assert \"Yes\" == HumanEval.candidate(\"no_one#knows.dll\")\n assert \"No\" == HumanEval.candidate(\"1I563_Yes3.exe\")\n assert \"No\" == HumanEval.candidate(\"I563_Yes3.txtt\")\n assert \"No\" == HumanEval.candidate(\"final..txt\")\n assert \"No\" == HumanEval.candidate(\"final132\")\n assert \"No\" == HumanEval.candidate(\"_f4indsartal132.\")\n assert \"No\" == HumanEval.candidate(\".txt\")\n assert \"No\" == HumanEval.candidate(\"s.\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_142_sum_squares", "language": "elixir", "prompt": "# \"\n# This function will take a list of integers. For all entries in the list, the function shall square the integer entry if its index is a \n# multiple of 3 and will cube the integer entry if its index is a multiple of 4 and not a multiple of 3. The function will not \n# change the entries in the list whose indexes are not a multiple of 3 or 4. The function shall then return the sum of all entries. \n# Examples:\n# For lst = [1,2,3] the output should be 6\n# For lst = [] the output should be 0\n# For lst = [-1,-5,2,-1,-5] the output should be -126\n\ndefmodule HumanEval do\n def candidate(lst), do: sum_squares(lst)\n def sum_squares(lst) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_142_sum_squares.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sum_squares' do\n assert 6 == HumanEval.candidate([1, 2, 3])\n assert 14 == HumanEval.candidate([1, 4, 9])\n assert 0 == HumanEval.candidate([])\n assert 9 == HumanEval.candidate([1, 1, 1, 1, 1, 1, 1, 1, 1])\n assert -3 == HumanEval.candidate([-1, -1, -1, -1, -1, -1, -1, -1, -1])\n assert 0 == HumanEval.candidate([0])\n assert -126 == HumanEval.candidate([-1, -5, 2, -1, -5])\n assert 3030 == HumanEval.candidate([-56, -99, 1, 0, -2])\n assert 0 == HumanEval.candidate([-1, 0, 0, 0, 0, 0, 0, 0, -1])\n assert -14196 == HumanEval.candidate([-16, -9, -2, 36, 36, 26, -20, 25, -40, 20, -4, 12, -26, 35, 37])\n assert -1448 == HumanEval.candidate([-1, -3, 17, -1, -15, 13, -1, 14, -14, -12, -5, 14, -14, 6, 13, 11, 16, 16, 4, 10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_143_words_in_sentence", "language": "elixir", "prompt": "# You are given a string representing a sentence,\n# the sentence contains some words separated by a space,\n# and you have to return a string that contains the words from the original sentence,\n# whose lengths are prime numbers,\n# the order of the words in the new string should be the same as the original one.\n# Example 1:\n# Input: sentence = \"This is a test\"\n# Output: \"is\"\n# Example 2:\n# Input: sentence = \"lets go for swimming\"\n# Output: \"go for\"\n# Constraints:\n# * 1 <= len(sentence) <= 100\n# * sentence contains only letters\n\ndefmodule HumanEval do\n def candidate(sentence), do: words_in_sentence(sentence)\n def words_in_sentence(sentence) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_143_words_in_sentence.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'words_in_sentence' do\n assert \"is\" == HumanEval.candidate(\"This is a test\")\n assert \"go for\" == HumanEval.candidate(\"lets go for swimming\")\n assert \"there is no place\" == HumanEval.candidate(\"there is no place available here\")\n assert \"Hi am Hussein\" == HumanEval.candidate(\"Hi I am Hussein\")\n assert \"go for it\" == HumanEval.candidate(\"go for it\")\n assert \"\" == HumanEval.candidate(\"here\")\n assert \"is\" == HumanEval.candidate(\"here is\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_144_simplify", "language": "elixir", "prompt": "# Your task is to implement a function that will simplify the expression\n# x * n. The function returns True if x * n evaluates to a whole number and False\n# otherwise. Both x and n, are string representation of a fraction, and have the following format,\n# / where both numerator and denominator are positive whole numbers.\n# You can assume that x, and n are valid fractions, and do not have zero as denominator.\n# simplify(\"1/5\", \"5/1\") = True\n# simplify(\"1/6\", \"2/1\") = False\n# simplify(\"7/10\", \"10/2\") = False\n\ndefmodule HumanEval do\n def candidate(x, n), do: simplify(x, n)\n def simplify(x, n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_144_simplify.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'simplify' do\n assert true == HumanEval.candidate(\"1/5\", \"5/1\")\n assert false == HumanEval.candidate(\"1/6\", \"2/1\")\n assert true == HumanEval.candidate(\"5/1\", \"3/1\")\n assert false == HumanEval.candidate(\"7/10\", \"10/2\")\n assert true == HumanEval.candidate(\"2/10\", \"50/10\")\n assert true == HumanEval.candidate(\"7/2\", \"4/2\")\n assert true == HumanEval.candidate(\"11/6\", \"6/1\")\n assert false == HumanEval.candidate(\"2/3\", \"5/2\")\n assert false == HumanEval.candidate(\"5/2\", \"3/5\")\n assert true == HumanEval.candidate(\"2/4\", \"8/4\")\n assert true == HumanEval.candidate(\"2/4\", \"4/2\")\n assert true == HumanEval.candidate(\"1/5\", \"5/1\")\n assert false == HumanEval.candidate(\"1/5\", \"1/5\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_145_order_by_points", "language": "elixir", "prompt": "# Write a function which sorts the given list of integers\n# in ascending order according to the sum of their digits.\n# Note: if there are several items with similar sum of their digits,\n# order them based on their index in original list.\n# For example:\n# >>> order_by_points([1, 11, -1, -11, -12]) == [-1, -11, 1, -12, 11]\n# >>> order_by_points([]) == []\n\ndefmodule HumanEval do\n def candidate(nums), do: order_by_points(nums)\n def order_by_points(nums) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_145_order_by_points.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'order_by_points' do\n assert [-1, -11, 1, -12, 11] == HumanEval.candidate([1, 11, -1, -11, -12])\n assert [0, 2, 3, 6, 53, 423, 423, 423, 1234, 145, 37, 46, 56, 463, 3457] == HumanEval.candidate([1234, 423, 463, 145, 2, 423, 423, 53, 6, 37, 3457, 3, 56, 0, 46])\n assert [] == HumanEval.candidate([])\n assert [-3, -32, -98, -11, 1, 2, 43, 54] == HumanEval.candidate([1, -11, -32, 43, 54, -98, 2, -3])\n assert [1, 10, 2, 11, 3, 4, 5, 6, 7, 8, 9] == HumanEval.candidate([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])\n assert [-76, -21, 0, 4, 23, 6, 6] == HumanEval.candidate([0, 6, 6, -76, -21, 23, 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_146_specialFilter", "language": "elixir", "prompt": "# Write a function that takes an array of numbers as input and returns \n# the number of elements in the array that are greater than 10 and both \n# first and last digits of a number are odd (1, 3, 5, 7, 9).\n# For example:\n# specialFilter([15, -73, 14, -15]) => 1 \n# specialFilter([33, -2, -3, 45, 21, 109]) => 2\n\ndefmodule HumanEval do\n def candidate(nums), do: specialFilter(nums)\n def specialFilter(nums) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_146_specialFilter.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'specialFilter' do\n assert 0 == HumanEval.candidate([5, -2, 1, -5])\n assert 1 == HumanEval.candidate([15, -73, 14, -15])\n assert 2 == HumanEval.candidate([33, -2, -3, 45, 21, 109])\n assert 4 == HumanEval.candidate([43, -12, 93, 125, 121, 109])\n assert 3 == HumanEval.candidate([71, -2, -33, 75, 21, 19])\n assert 0 == HumanEval.candidate([1])\n assert 0 == HumanEval.candidate([])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_147_get_max_triples", "language": "elixir", "prompt": "# You are given a positive integer n. You have to create an integer array a of length n.\n# For each i (1 \u2264 i \u2264 n), the value of a[i] = i * i - i + 1.\n# Return the number of triples (a[i], a[j], a[k]) of a where i < j < k, \n# and a[i] + a[j] + a[k] is a multiple of 3.\n# Example :\n# Input: n = 5\n# Output: 1\n# Explanation: \n# a = [1, 3, 7, 13, 21]\n# The only valid triple is (1, 7, 13).\n\ndefmodule HumanEval do\n def candidate(n), do: get_max_triples(n)\n def get_max_triples(n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_147_get_max_triples.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'get_max_triples' do\n assert 1 == HumanEval.candidate(5)\n assert 4 == HumanEval.candidate(6)\n assert 36 == HumanEval.candidate(10)\n assert 53361 == HumanEval.candidate(100)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_148_bf", "language": "elixir", "prompt": "# There are eight planets in our solar system: the closerst to the Sun \n# is Mercury, the next one is Venus, then Earth, Mars, Jupiter, Saturn, \n# Uranus, Neptune.\n# Write a function that takes two planet names as strings planet1 and planet2. \n# The function should return a tuple containing all planets whose orbits are \n# located between the orbit of planet1 and the orbit of planet2, sorted by \n# the proximity to the sun. \n# The function should return an empty tuple if planet1 or planet2\n# are not correct planet names. \n# Examples\n# bf(\"Jupiter\", \"Neptune\") ==> (\"Saturn\", \"Uranus\")\n# bf(\"Earth\", \"Mercury\") ==> (\"Venus\")\n# bf(\"Mercury\", \"Uranus\") ==> (\"Venus\", \"Earth\", \"Mars\", \"Jupiter\", \"Saturn\")\n\ndefmodule HumanEval do\n def candidate(planet1, planet2), do: bf(planet1, planet2)\n def bf(planet1, planet2) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_148_bf.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'bf' do\n assert {\"Saturn\", \"Uranus\"} == HumanEval.candidate(\"Jupiter\", \"Neptune\")\n assert {\"Venus\"} == HumanEval.candidate(\"Earth\", \"Mercury\")\n assert {\"Venus\", \"Earth\", \"Mars\", \"Jupiter\", \"Saturn\"} == HumanEval.candidate(\"Mercury\", \"Uranus\")\n assert {\"Earth\", \"Mars\", \"Jupiter\", \"Saturn\", \"Uranus\"} == HumanEval.candidate(\"Neptune\", \"Venus\")\n assert {} == HumanEval.candidate(\"Earth\", \"Earth\")\n assert {} == HumanEval.candidate(\"Mars\", \"Earth\")\n assert {} == HumanEval.candidate(\"Jupiter\", \"Makemake\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_149_sorted_list_sum", "language": "elixir", "prompt": "# Write a function that accepts a list of strings as a parameter,\n# deletes the strings that have odd lengths from it,\n# and returns the resulted list with a sorted order,\n# The list is always a list of strings and never an array of numbers,\n# and it may contain duplicates.\n# The order of the list should be ascending by length of each word, and you\n# should return the list sorted by that rule.\n# If two words have the same length, sort the list alphabetically.\n# The function should return a list of strings in sorted order.\n# You may assume that all words will have the same length.\n# For example:\n# assert list_sort([\"aa\", \"a\", \"aaa\"]) => [\"aa\"]\n# assert list_sort([\"ab\", \"a\", \"aaa\", \"cd\"]) => [\"ab\", \"cd\"]\n\ndefmodule HumanEval do\n def candidate(lst), do: sorted_list_sum(lst)\n def sorted_list_sum(lst) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_149_sorted_list_sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sorted_list_sum' do\n assert [\"aa\"] == HumanEval.candidate([\"aa\", \"a\", \"aaa\"])\n assert [\"AI\", \"asdf\", \"school\"] == HumanEval.candidate([\"school\", \"AI\", \"asdf\", \"b\"])\n assert [] == HumanEval.candidate([\"d\", \"b\", \"c\", \"a\"])\n assert [\"abcd\", \"dcba\"] == HumanEval.candidate([\"d\", \"dcba\", \"abcd\", \"a\"])\n assert [\"AI\", \"ai\", \"au\"] == HumanEval.candidate([\"AI\", \"ai\", \"au\"])\n assert [] == HumanEval.candidate([\"a\", \"b\", \"b\", \"c\", \"c\", \"a\"])\n assert [\"cc\", \"dd\", \"aaaa\", \"bbbb\"] == HumanEval.candidate([\"aaaa\", \"bbbb\", \"dd\", \"cc\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_14_all_prefixes", "language": "elixir", "prompt": "# Return list of all prefixes from shortest to longest of the input string\n# >>> all_prefixes('abc')\n# ['a', 'ab', 'abc']\n\ndefmodule HumanEval do\n def candidate(string), do: all_prefixes(string)\n def all_prefixes(string) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_14_all_prefixes.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'all_prefixes' do\n assert [] == HumanEval.candidate(\"\")\n assert [\"a\", \"as\", \"asd\", \"asdf\", \"asdfg\", \"asdfgh\"] == HumanEval.candidate(\"asdfgh\")\n assert [\"W\", \"WW\", \"WWW\"] == HumanEval.candidate(\"WWW\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_150_x_or_y", "language": "elixir", "prompt": "# A simple program which should return the value of x if n is \n# a prime number and should return the value of y otherwise.\n# Examples:\n# for x_or_y(7, 34, 12) == 34\n# for x_or_y(15, 8, 5) == 5\n\ndefmodule HumanEval do\n def candidate(n, x, y), do: x_or_y(n, x, y)\n def x_or_y(n, x, y) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_150_x_or_y.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'x_or_y' do\n assert 34 == HumanEval.candidate(7, 34, 12)\n assert 5 == HumanEval.candidate(15, 8, 5)\n assert 33 == HumanEval.candidate(3, 33, 5212)\n assert 3 == HumanEval.candidate(1259, 3, 52)\n assert -1 == HumanEval.candidate(7919, -1, 12)\n assert 583 == HumanEval.candidate(3609, 1245, 583)\n assert 129 == HumanEval.candidate(91, 56, 129)\n assert 1234 == HumanEval.candidate(6, 34, 1234)\n assert 0 == HumanEval.candidate(1, 2, 0)\n assert 2 == HumanEval.candidate(2, 2, 0)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_151_double_the_difference", "language": "elixir", "prompt": "# Given a list of numbers, return the sum of squares of the numbers\n# in the list that are odd. Ignore numbers that are negative or not integers.\n# double_the_difference([1, 3, 2, 0]) == 1 + 9 + 0 + 0 = 10\n# double_the_difference([-1, -2, 0]) == 0\n# double_the_difference([9, -2]) == 81\n# double_the_difference([0]) == 0 \n# If the input list is empty, return 0.\n\ndefmodule HumanEval do\n def candidate(lst), do: double_the_difference(lst)\n def double_the_difference(lst) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_151_double_the_difference.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'double_the_difference' do\n assert 0 == HumanEval.candidate([])\n assert 25 == HumanEval.candidate([5.0, 4.0])\n assert 0 == HumanEval.candidate([0.1, 0.2, 0.3])\n assert 0 == HumanEval.candidate([-10.0, -20.0, -30.0])\n assert 0 == HumanEval.candidate([-1.0, -2.0, 8.0])\n assert 34 == HumanEval.candidate([0.2, 3.0, 5.0])\n assert 165 == HumanEval.candidate([-9.0, -7.0, -5.0, -3.0, -1.0, 1.0, 3.0, 5.0, 7.0, 9.0])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_152_compare", "language": "elixir", "prompt": "# I think we all remember that feeling when the result of some long-awaited\n# event is finally known. The feelings and thoughts you have at that moment are\n# definitely worth noting down and comparing.\n# Your task is to determine if a person correctly guessed the results of a number of matches.\n# You are given two arrays of scores and guesses of equal length, where each index shows a match. \n# Return an array of the same length denoting how far off each guess was. If they have guessed correctly,\n# the value is 0, and if not, the value is the absolute difference between the guess and the score.\n# example:\n# compare([1,2,3,4,5,1],[1,2,3,4,2,-2]) -> [0,0,0,0,3,3]\n# compare([0,5,0,0,0,4],[4,1,1,0,0,-2]) -> [4,4,1,0,0,6]\n\ndefmodule HumanEval do\n def candidate(game, guess), do: compare(game, guess)\n def compare(game, guess) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_152_compare.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'compare' do\n assert [0, 0, 0, 0, 3, 3] == HumanEval.candidate([1, 2, 3, 4, 5, 1], [1, 2, 3, 4, 2, -2])\n assert [0, 0, 0, 0, 0, 0] == HumanEval.candidate([0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0])\n assert [2, 4, 6] == HumanEval.candidate([1, 2, 3], [-1, -2, -3])\n assert [2, 0, 0, 1] == HumanEval.candidate([1, 2, 3, 5], [-1, 2, 3, 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_153_Strongest_Extension", "language": "elixir", "prompt": "# You will be given the name of a class (a string) and a list of extensions.\n# The extensions are to be used to load additional classes to the class. The\n# strength of the extension is as follows: Let CAP be the number of the uppercase\n# letters in the extension's name, and let SM be the number of lowercase letters \n# in the extension's name, the strength is given by the fraction CAP - SM. \n# You should find the strongest extension and return a string in this \n# format: ClassName.StrongestExtensionName.\n# If there are two or more extensions with the same strength, you should\n# choose the one that comes first in the list.\n# For example, if you are given \"Slices\" as the class and a list of the\n# extensions: ['SErviNGSliCes', 'Cheese', 'StuFfed'] then you should\n# return 'Slices.SErviNGSliCes' since 'SErviNGSliCes' is the strongest extension \n# (its strength is -1).\n# Example:\n# for Strongest_Extension('my_class', ['AA', 'Be', 'CC']) == 'my_class.AA'\n\ndefmodule HumanEval do\n def candidate(class_name, extensions), do: Strongest_Extension(class_name, extensions)\n def Strongest_Extension(class_name, extensions) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_153_Strongest_Extension.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'Strongest_Extension' do\n assert \"Watashi.eIGHt8OKe\" == HumanEval.candidate(\"Watashi\", [\"tEN\", \"niNE\", \"eIGHt8OKe\"])\n assert \"Boku123.YEs.WeCaNe\" == HumanEval.candidate(\"Boku123\", [\"nani\", \"NazeDa\", \"YEs.WeCaNe\", \"32145tggg\"])\n assert \"__YESIMHERE.NuLl__\" == HumanEval.candidate(\"__YESIMHERE\", [\"t\", \"eMptY\", \"nothing\", \"zeR00\", \"NuLl__\", \"123NoooneB321\"])\n assert \"K.TAR\" == HumanEval.candidate(\"K\", [\"Ta\", \"TAR\", \"t234An\", \"cosSo\"])\n assert \"__HAHA.123\" == HumanEval.candidate(\"__HAHA\", [\"Tab\", \"123\", \"781345\", \"-_-\"])\n assert \"YameRore.okIWILL123\" == HumanEval.candidate(\"YameRore\", [\"HhAas\", \"okIWILL123\", \"WorkOut\", \"Fails\", \"-_-\"])\n assert \"finNNalLLly.WoW\" == HumanEval.candidate(\"finNNalLLly\", [\"Die\", \"NowW\", \"Wow\", \"WoW\"])\n assert \"_.Bb\" == HumanEval.candidate(\"_\", [\"Bb\", \"91245\"])\n assert \"Sp.671235\" == HumanEval.candidate(\"Sp\", [\"671235\", \"Bb\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_154_cycpattern_check", "language": "elixir", "prompt": "# You are given 2 words. You need to return True if the second word or any of its rotations is a substring in the first word\n# cycpattern_check(\"abcd\",\"abd\") => False\n# cycpattern_check(\"hello\",\"ell\") => True\n# cycpattern_check(\"whassup\",\"psus\") => False\n# cycpattern_check(\"abab\",\"baa\") => True\n# cycpattern_check(\"efef\",\"eeff\") => False\n# cycpattern_check(\"himenss\",\"simen\") => True\n\ndefmodule HumanEval do\n def candidate(a, b), do: cycpattern_check(a, b)\n def cycpattern_check(a, b) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_154_cycpattern_check.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'cycpattern_check' do\n assert false == HumanEval.candidate(\"xyzw\", \"xyw\")\n assert true == HumanEval.candidate(\"yello\", \"ell\")\n assert false == HumanEval.candidate(\"whattup\", \"ptut\")\n assert true == HumanEval.candidate(\"efef\", \"fee\")\n assert false == HumanEval.candidate(\"abab\", \"aabb\")\n assert true == HumanEval.candidate(\"winemtt\", \"tinem\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_155_even_odd_count", "language": "elixir", "prompt": "# Given an integer. return a tuple that has the number of even and odd digits respectively.\n# Example:\n# even_odd_count(-12) ==> (1, 1)\n# even_odd_count(123) ==> (1, 2)\n\ndefmodule HumanEval do\n def candidate(num), do: even_odd_count(num)\n def even_odd_count(num) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_155_even_odd_count.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'even_odd_count' do\n assert {0, 1} == HumanEval.candidate(7)\n assert {1, 1} == HumanEval.candidate(-78)\n assert {2, 2} == HumanEval.candidate(3452)\n assert {3, 3} == HumanEval.candidate(346211)\n assert {3, 3} == HumanEval.candidate(-345821)\n assert {1, 0} == HumanEval.candidate(-2)\n assert {2, 3} == HumanEval.candidate(-45347)\n assert {1, 0} == HumanEval.candidate(0)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_156_int_to_mini_roman", "language": "elixir", "prompt": "# Given a positive integer, obtain its roman numeral equivalent as a string,\n# and return it in lowercase.\n# Restrictions: 1 <= num <= 1000\n# Examples:\n# >>> int_to_mini_roman(19) == 'xix'\n# >>> int_to_mini_roman(152) == 'clii'\n# >>> int_to_mini_roman(426) == 'cdxxvi'\n\ndefmodule HumanEval do\n def candidate(number), do: int_to_mini_roman(number)\n def int_to_mini_roman(number) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_156_int_to_mini_roman.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'int_to_mini_roman' do\n assert \"xix\" == HumanEval.candidate(19)\n assert \"clii\" == HumanEval.candidate(152)\n assert \"ccli\" == HumanEval.candidate(251)\n assert \"cdxxvi\" == HumanEval.candidate(426)\n assert \"d\" == HumanEval.candidate(500)\n assert \"i\" == HumanEval.candidate(1)\n assert \"iv\" == HumanEval.candidate(4)\n assert \"xliii\" == HumanEval.candidate(43)\n assert \"xc\" == HumanEval.candidate(90)\n assert \"xciv\" == HumanEval.candidate(94)\n assert \"dxxxii\" == HumanEval.candidate(532)\n assert \"cm\" == HumanEval.candidate(900)\n assert \"cmxciv\" == HumanEval.candidate(994)\n assert \"m\" == HumanEval.candidate(1000)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_157_right_angle_triangle", "language": "elixir", "prompt": "# Given the lengths of the three sides of a triangle. Return True if the three\n# sides form a right-angled triangle, False otherwise.\n# A right-angled triangle is a triangle in which one angle is right angle or \n# 90 degree.\n# Example:\n# right_angle_triangle(3, 4, 5) == True\n# right_angle_triangle(1, 2, 3) == False\n\ndefmodule HumanEval do\n def candidate(a, b, c), do: right_angle_triangle(a, b, c)\n def right_angle_triangle(a, b, c) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_157_right_angle_triangle.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'right_angle_triangle' do\n assert true == HumanEval.candidate(3, 4, 5)\n assert false == HumanEval.candidate(1, 2, 3)\n assert true == HumanEval.candidate(10, 6, 8)\n assert false == HumanEval.candidate(2, 2, 2)\n assert true == HumanEval.candidate(7, 24, 25)\n assert false == HumanEval.candidate(10, 5, 7)\n assert true == HumanEval.candidate(5, 12, 13)\n assert true == HumanEval.candidate(15, 8, 17)\n assert true == HumanEval.candidate(48, 55, 73)\n assert false == HumanEval.candidate(1, 1, 1)\n assert false == HumanEval.candidate(2, 2, 10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_158_find_max", "language": "elixir", "prompt": "# Write a function that accepts a list of strings.\n# The list contains different words. Return the word with maximum number\n# of unique characters. If multiple strings have maximum number of unique\n# characters, return the one which comes first in lexicographical order.\n# find_max([\"name\", \"of\", \"string\"]) == \"string\"\n# find_max([\"name\", \"enam\", \"game\"]) == \"enam\"\n# find_max([\"aaaaaaa\", \"bb\" ,\"cc\"]) == \"\"aaaaaaa\"\n\ndefmodule HumanEval do\n def candidate(words), do: find_max(words)\n def find_max(words) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_158_find_max.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'find_max' do\n assert \"string\" == HumanEval.candidate([\"name\", \"of\", \"string\"])\n assert \"enam\" == HumanEval.candidate([\"name\", \"enam\", \"game\"])\n assert \"aaaaaaa\" == HumanEval.candidate([\"aaaaaaa\", \"bb\", \"cc\"])\n assert \"abc\" == HumanEval.candidate([\"abc\", \"cba\"])\n assert \"footbott\" == HumanEval.candidate([\"play\", \"this\", \"game\", \"of\", \"footbott\"])\n assert \"gonna\" == HumanEval.candidate([\"we\", \"are\", \"gonna\", \"rock\"])\n assert \"nation\" == HumanEval.candidate([\"we\", \"are\", \"a\", \"mad\", \"nation\"])\n assert \"this\" == HumanEval.candidate([\"this\", \"is\", \"a\", \"prrk\"])\n assert \"b\" == HumanEval.candidate([\"b\"])\n assert \"play\" == HumanEval.candidate([\"play\", \"play\", \"play\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_159_eat", "language": "elixir", "prompt": "# You're a hungry rabbit, and you already have eaten a certain number of carrots,\n# but now you need to eat more carrots to complete the day's meals.\n# you should return an array of [ total number of eaten carrots after your meals,\n# the number of carrots left after your meals ]\n# if there are not enough remaining carrots, you will eat all remaining carrots, but will still be hungry.\n# Example:\n# * eat(5, 6, 10) -> [11, 4]\n# * eat(4, 8, 9) -> [12, 1]\n# * eat(1, 10, 10) -> [11, 0]\n# * eat(2, 11, 5) -> [7, 0]\n# Variables:\n# @number : integer\n# the number of carrots that you have eaten.\n# @need : integer\n# the number of carrots that you need to eat.\n# @remaining : integer\n# the number of remaining carrots thet exist in stock\n# Constrain:\n# * 0 <= number <= 1000\n# * 0 <= need <= 1000\n# * 0 <= remaining <= 1000\n# Have fun :)\n\ndefmodule HumanEval do\n def candidate(number, need, remaining), do: eat(number, need, remaining)\n def eat(number, need, remaining) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_159_eat.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'eat' do\n assert [11, 4] == HumanEval.candidate(5, 6, 10)\n assert [12, 1] == HumanEval.candidate(4, 8, 9)\n assert [11, 0] == HumanEval.candidate(1, 10, 10)\n assert [7, 0] == HumanEval.candidate(2, 11, 5)\n assert [9, 2] == HumanEval.candidate(4, 5, 7)\n assert [5, 0] == HumanEval.candidate(4, 5, 1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_15_string_sequence", "language": "elixir", "prompt": "# Return a string containing space-delimited numbers starting from 0 upto n inclusive.\n# >>> string_sequence(0)\n# '0'\n# >>> string_sequence(5)\n# '0 1 2 3 4 5'\n\ndefmodule HumanEval do\n def candidate(n), do: string_sequence(n)\n def string_sequence(n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_15_string_sequence.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'string_sequence' do\n assert \"0\" == HumanEval.candidate(0)\n assert \"0 1 2 3\" == HumanEval.candidate(3)\n assert \"0 1 2 3 4 5 6 7 8 9 10\" == HumanEval.candidate(10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_160_do_algebra", "language": "elixir", "prompt": "# Given two lists operator, and operand. The first list has basic algebra operations, and \n# the second list is a list of integers. Use the two given lists to build the algebric \n# expression and return the evaluation of this expression.\n# The basic algebra operations:\n# Addition ( + ) \n# Subtraction ( - ) \n# Multiplication ( * ) \n# Floor division ( // ) \n# Exponentiation ( ** ) \n# Example:\n# operator['+', '*', '-']\n# array = [2, 3, 4, 5]\n# result = 2 + 3 * 4 - 5\n# => result = 9\n# Note:\n# The length of operator list is equal to the length of operand list minus one.\n# Operand is a list of of non-negative integers.\n# Operator list has at least one operator, and operand list has at least two operands.\n\ndefmodule HumanEval do\n def candidate(operator, operand), do: do_algebra(operator, operand)\n def do_algebra(operator, operand) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_160_do_algebra.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'do_algebra' do\n assert 37 == HumanEval.candidate([\"**\", \"*\", \"+\"], [2, 3, 4, 5])\n assert 9 == HumanEval.candidate([\"+\", \"*\", \"-\"], [2, 3, 4, 5])\n assert 8 == HumanEval.candidate([\"//\", \"*\"], [7, 3, 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_161_solve", "language": "elixir", "prompt": "# You are given a string s.\n# if s[i] is a letter, reverse its case from lower to upper or vise versa, \n# otherwise keep it as it is.\n# If the string contains no letters, reverse the string.\n# The function should return the resulted string.\n# Examples\n# solve(\"1234\") = \"4321\"\n# solve(\"ab\") = \"AB\"\n# solve(\"#a@C\") = \"#A@c\"\n\ndefmodule HumanEval do\n def candidate(s), do: solve(s)\n def solve(s) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_161_solve.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'solve' do\n assert \"aSdF\" == HumanEval.candidate(\"AsDf\")\n assert \"4321\" == HumanEval.candidate(\"1234\")\n assert \"AB\" == HumanEval.candidate(\"ab\")\n assert \"#A@c\" == HumanEval.candidate(\"#a@C\")\n assert \"#aSDFw^45\" == HumanEval.candidate(\"#AsdfW^45\")\n assert \"2@6#\" == HumanEval.candidate(\"#6@2\")\n assert \"#$A^d\" == HumanEval.candidate(\"#$a^D\")\n assert \"#CCC\" == HumanEval.candidate(\"#ccc\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_162_string_to_md5", "language": "elixir", "prompt": "# Given a string 'text', return its md5 hash equivalent string.\n# If 'text' is an empty string, return None.\n# >>> string_to_md5('Hello world') == '3e25960a79dbc69b674cd4ec67a72c62'\n\ndefmodule HumanEval do\n def candidate(text), do: string_to_md5(text)\n def string_to_md5(text) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_162_string_to_md5.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'string_to_md5' do\n assert \"3e25960a79dbc69b674cd4ec67a72c62\" == HumanEval.candidate(\"Hello world\")\n assert nil == HumanEval.candidate(\"\")\n assert \"0ef78513b0cb8cef12743f5aeb35f888\" == HumanEval.candidate(\"A B C\")\n assert \"5f4dcc3b5aa765d61d8327deb882cf99\" == HumanEval.candidate(\"password\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_163_generate_integers", "language": "elixir", "prompt": "# Given two positive integers a and b, return the even digits between a\n# and b, in ascending order.\n# For example:\n# generate_integers(2, 8) => [2, 4, 6, 8]\n# generate_integers(8, 2) => [2, 4, 6, 8]\n# generate_integers(10, 14) => []\n\ndefmodule HumanEval do\n def candidate(a, b), do: generate_integers(a, b)\n def generate_integers(a, b) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_163_generate_integers.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'generate_integers' do\n assert [2, 4, 6, 8] == HumanEval.candidate(2, 10)\n assert [2, 4, 6, 8] == HumanEval.candidate(10, 2)\n assert [2, 4, 6, 8] == HumanEval.candidate(132, 2)\n assert [] == HumanEval.candidate(17, 89)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_16_count_distinct_characters", "language": "elixir", "prompt": "# Given a string, find out how many distinct characters (regardless of case) does it consist of\n# >>> count_distinct_characters('xyzXYZ')\n# 3\n# >>> count_distinct_characters('Jerry')\n# 4\n\ndefmodule HumanEval do\n def candidate(string), do: count_distinct_characters(string)\n def count_distinct_characters(string) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_16_count_distinct_characters.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'count_distinct_characters' do\n assert 0 == HumanEval.candidate(\"\")\n assert 5 == HumanEval.candidate(\"abcde\")\n assert 5 == HumanEval.candidate(\"abcdecadeCADE\")\n assert 1 == HumanEval.candidate(\"aaaaAAAAaaaa\")\n assert 5 == HumanEval.candidate(\"Jerry jERRY JeRRRY\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_17_parse_music", "language": "elixir", "prompt": "# Input to this function is a string representing musical notes in a special ASCII format.\n# Your task is to parse this string and return list of integers corresponding to how many beats does each\n# not last.\n# Here is a legend:\n# 'o' - whole note, lasts four beats\n# 'o|' - half note, lasts two beats\n# '.|' - quater note, lasts one beat\n# >>> parse_music('o o| .| o| o| .| .| .| .| o o')\n# [4, 2, 1, 2, 2, 1, 1, 1, 1, 4, 4]\n\ndefmodule HumanEval do\n def candidate(music_string), do: parse_music(music_string)\n def parse_music(music_string) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_17_parse_music.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'parse_music' do\n assert [] == HumanEval.candidate(\"\")\n assert [4, 4, 4, 4] == HumanEval.candidate(\"o o o o\")\n assert [1, 1, 1, 1] == HumanEval.candidate(\".| .| .| .|\")\n assert [2, 2, 1, 1, 4, 4, 4, 4] == HumanEval.candidate(\"o| o| .| .| o o o o\")\n assert [2, 1, 2, 1, 4, 2, 4, 2] == HumanEval.candidate(\"o| .| o| .| o o| o o|\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_18_how_many_times", "language": "elixir", "prompt": "# Find how many times a given substring can be found in the original string. Count overlaping cases.\n# >>> how_many_times('', 'a')\n# 0\n# >>> how_many_times('aaa', 'a')\n# 3\n# >>> how_many_times('aaaa', 'aa')\n# 3\n\ndefmodule HumanEval do\n def candidate(string, substring), do: how_many_times(string, substring)\n def how_many_times(string, substring) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_18_how_many_times.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'how_many_times' do\n assert 0 == HumanEval.candidate(\"\", \"x\")\n assert 4 == HumanEval.candidate(\"xyxyxyx\", \"x\")\n assert 4 == HumanEval.candidate(\"cacacacac\", \"cac\")\n assert 1 == HumanEval.candidate(\"john doe\", \"john\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_19_sort_numbers", "language": "elixir", "prompt": "# Input is a space-delimited string of numberals from 'zero' to 'nine'.\n# Valid choices are 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight' and 'nine'.\n# Return the string with numbers sorted from smallest to largest\n# >>> sort_numbers('three one five')\n# 'one three five'\n\ndefmodule HumanEval do\n def candidate(numbers), do: sort_numbers(numbers)\n def sort_numbers(numbers) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_19_sort_numbers.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sort_numbers' do\n assert \"\" == HumanEval.candidate(\"\")\n assert \"three\" == HumanEval.candidate(\"three\")\n assert \"three five nine\" == HumanEval.candidate(\"three five nine\")\n assert \"zero four five seven eight nine\" == HumanEval.candidate(\"five zero four seven nine eight\")\n assert \"zero one two three four five six\" == HumanEval.candidate(\"six five four three two one zero\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_1_separate_paren_groups", "language": "elixir", "prompt": "# Input to this function is a string containing multiple groups of nested parentheses. Your goal is to\n# separate those group into separate strings and return the list of those.\n# Separate groups are balanced (each open brace is properly closed) and not nested within each other\n# Ignore any spaces in the input string.\n# >>> separate_paren_groups('( ) (( )) (( )( ))')\n# ['()', '(())', '(()())']\n\ndefmodule HumanEval do\n def candidate(paren_string), do: separate_paren_groups(paren_string)\n def separate_paren_groups(paren_string) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_1_separate_paren_groups.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'separate_paren_groups' do\n assert [\"(()())\", \"((()))\", \"()\", \"((())()())\"] == HumanEval.candidate(\"(()()) ((())) () ((())()())\")\n assert [\"()\", \"(())\", \"((()))\", \"(((())))\"] == HumanEval.candidate(\"() (()) ((())) (((())))\")\n assert [\"(()(())((())))\"] == HumanEval.candidate(\"(()(())((())))\")\n assert [\"()\", \"(())\", \"(()())\"] == HumanEval.candidate(\"( ) (( )) (( )( ))\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_20_find_closest_elements", "language": "elixir", "prompt": "# From a supplied list of numbers (of length at least two) select and return two that are the closest to each\n# other and return them in order (smaller number, larger number).\n# >>> find_closest_elements([1.0, 2.0, 3.0, 4.0, 5.0, 2.2])\n# (2.0, 2.2)\n# >>> find_closest_elements([1.0, 2.0, 3.0, 4.0, 5.0, 2.0])\n# (2.0, 2.0)\n\ndefmodule HumanEval do\n def candidate(numbers), do: find_closest_elements(numbers)\n def find_closest_elements(numbers) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_20_find_closest_elements.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'find_closest_elements' do\n assert {3.9, 4.0} == HumanEval.candidate([1.0, 2.0, 3.9, 4.0, 5.0, 2.2])\n assert {5.0, 5.9} == HumanEval.candidate([1.0, 2.0, 5.9, 4.0, 5.0])\n assert {2.0, 2.2} == HumanEval.candidate([1.0, 2.0, 3.0, 4.0, 5.0, 2.2])\n assert {2.0, 2.0} == HumanEval.candidate([1.0, 2.0, 3.0, 4.0, 5.0, 2.0])\n assert {2.2, 3.1} == HumanEval.candidate([1.1, 2.2, 3.1, 4.1, 5.1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_21_rescale_to_unit", "language": "elixir", "prompt": "# Given list of numbers (of at least two elements), apply a linear transform to that list,\n# such that the smallest number will become 0 and the largest will become 1\n# >>> rescale_to_unit([1.0, 2.0, 3.0, 4.0, 5.0])\n# [0.0, 0.25, 0.5, 0.75, 1.0]\n\ndefmodule HumanEval do\n def candidate(numbers), do: rescale_to_unit(numbers)\n def rescale_to_unit(numbers) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_21_rescale_to_unit.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'rescale_to_unit' do\n assert [0.0, 1.0] == HumanEval.candidate([2.0, 49.9])\n assert [1.0, 0.0] == HumanEval.candidate([100.0, 49.9])\n assert [0.0, 0.25, 0.5, 0.75, 1.0] == HumanEval.candidate([1.0, 2.0, 3.0, 4.0, 5.0])\n assert [0.25, 0.0, 1.0, 0.5, 0.75] == HumanEval.candidate([2.0, 1.0, 5.0, 3.0, 4.0])\n assert [0.25, 0.0, 1.0, 0.5, 0.75] == HumanEval.candidate([12.0, 11.0, 15.0, 13.0, 14.0])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_22_filter_integers", "language": "elixir", "prompt": "# Filter given list of any python values only for integers\n# >>> filter_integers(['a', 3.14, 5])\n# [5]\n# >>> filter_integers([1, 2, 3, 'abc', {}, []])\n# [1, 2, 3]\n\ndefmodule HumanEval do\n def candidate(values), do: filter_integers(values)\n def filter_integers(values) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_22_filter_integers.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'filter_integers' do\n assert [] == HumanEval.candidate([])\n assert [4, 9] == HumanEval.candidate([4, %{}, [], 23.2, 9, \"adasd\"])\n assert [3, 3, 3] == HumanEval.candidate([3, \"c\", 3, 3, \"a\", \"b\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_23_strlen", "language": "elixir", "prompt": "# Return length of given string\n# >>> strlen('')\n# 0\n# >>> strlen('abc')\n# 3\n\ndefmodule HumanEval do\n def candidate(string), do: strlen(string)\n def strlen(string) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_23_strlen.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'strlen' do\n assert 0 == HumanEval.candidate(\"\")\n assert 1 == HumanEval.candidate(\"x\")\n assert 9 == HumanEval.candidate(\"asdasnakj\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_24_largest_divisor", "language": "elixir", "prompt": "# For a given number n, find the largest number that divides n evenly, smaller than n\n# >>> largest_divisor(15)\n# 5\n\ndefmodule HumanEval do\n def candidate(n), do: largest_divisor(n)\n def largest_divisor(n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_24_largest_divisor.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'largest_divisor' do\n assert 1 == HumanEval.candidate(3)\n assert 1 == HumanEval.candidate(7)\n assert 5 == HumanEval.candidate(10)\n assert 50 == HumanEval.candidate(100)\n assert 7 == HumanEval.candidate(49)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_25_factorize", "language": "elixir", "prompt": "# Return list of prime factors of given integer in the order from smallest to largest.\n# Each of the factors should be listed number of times corresponding to how many times it appeares in factorization.\n# Input number should be equal to the product of all factors\n# >>> factorize(8)\n# [2, 2, 2]\n# >>> factorize(25)\n# [5, 5]\n# >>> factorize(70)\n# [2, 5, 7]\n\ndefmodule HumanEval do\n def candidate(n), do: factorize(n)\n def factorize(n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_25_factorize.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'factorize' do\n assert [2] == HumanEval.candidate(2)\n assert [2, 2] == HumanEval.candidate(4)\n assert [2, 2, 2] == HumanEval.candidate(8)\n assert [3, 19] == HumanEval.candidate(57)\n assert [3, 3, 19, 19] == HumanEval.candidate(3249)\n assert [3, 3, 3, 19, 19, 19] == HumanEval.candidate(185193)\n assert [3, 19, 19, 19] == HumanEval.candidate(20577)\n assert [2, 3, 3] == HumanEval.candidate(18)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_26_remove_duplicates", "language": "elixir", "prompt": "# From a list of integers, remove all elements that occur more than once.\n# Keep order of elements left the same as in the input.\n# >>> remove_duplicates([1, 2, 3, 2, 4])\n# [1, 3, 4]\n\ndefmodule HumanEval do\n def candidate(numbers), do: remove_duplicates(numbers)\n def remove_duplicates(numbers) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_26_remove_duplicates.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'remove_duplicates' do\n assert [] == HumanEval.candidate([])\n assert [1, 2, 3, 4] == HumanEval.candidate([1, 2, 3, 4])\n assert [1, 4, 5] == HumanEval.candidate([1, 2, 3, 2, 4, 3, 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_27_flip_case", "language": "elixir", "prompt": "# For a given string, flip lowercase characters to uppercase and uppercase to lowercase.\n# >>> flip_case('Hello')\n# 'hELLO'\n\ndefmodule HumanEval do\n def candidate(string), do: flip_case(string)\n def flip_case(string) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_27_flip_case.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'flip_case' do\n assert \"\" == HumanEval.candidate(\"\")\n assert \"hELLO!\" == HumanEval.candidate(\"Hello!\")\n assert \"tHESE VIOLENT DELIGHTS HAVE VIOLENT ENDS\" == HumanEval.candidate(\"These violent delights have violent ends\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_28_concatenate", "language": "elixir", "prompt": "# Concatenate list of strings into a single string\n# >>> concatenate([])\n# ''\n# >>> concatenate(['a', 'b', 'c'])\n# 'abc'\n\ndefmodule HumanEval do\n def candidate(strings), do: concatenate(strings)\n def concatenate(strings) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_28_concatenate.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'concatenate' do\n assert \"\" == HumanEval.candidate([])\n assert \"xyz\" == HumanEval.candidate([\"x\", \"y\", \"z\"])\n assert \"xyzwk\" == HumanEval.candidate([\"x\", \"y\", \"z\", \"w\", \"k\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_29_filter_by_prefix", "language": "elixir", "prompt": "# Filter an input list of strings only for ones that start with a given prefix.\n# >>> filter_by_prefix([], 'a')\n# []\n# >>> filter_by_prefix(['abc', 'bcd', 'cde', 'array'], 'a')\n# ['abc', 'array']\n\ndefmodule HumanEval do\n def candidate(strings, prefix), do: filter_by_prefix(strings, prefix)\n def filter_by_prefix(strings, prefix) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_29_filter_by_prefix.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'filter_by_prefix' do\n assert [] == HumanEval.candidate([], \"john\")\n assert [\"xxx\", \"xxxAAA\", \"xxx\"] == HumanEval.candidate([\"xxx\", \"asd\", \"xxy\", \"john doe\", \"xxxAAA\", \"xxx\"], \"xxx\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_2_truncate_number", "language": "elixir", "prompt": "# Given a positive floating point number, it can be decomposed into\n# and integer part (largest integer smaller than given number) and decimals\n# (leftover part always smaller than 1).\n# Return the decimal part of the number.\n# >>> truncate_number(3.5)\n# 0.5\n\ndefmodule HumanEval do\n def candidate(number), do: truncate_number(number)\n def truncate_number(number) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_2_truncate_number.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'truncate_number' do\n assert 0.5 == HumanEval.candidate(3.5)\n assert 0.25 == HumanEval.candidate(1.25)\n assert 0.0 == HumanEval.candidate(123.0)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_30_get_positive", "language": "elixir", "prompt": "# Return only positive numbers in the list.\n# >>> get_positive([-1, 2, -4, 5, 6])\n# [2, 5, 6]\n# >>> get_positive([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])\n# [5, 3, 2, 3, 9, 123, 1]\n\ndefmodule HumanEval do\n def candidate(l), do: get_positive(l)\n def get_positive(l) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_30_get_positive.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'get_positive' do\n assert [4, 5, 6] == HumanEval.candidate([-1, -2, 4, 5, 6])\n assert [5, 3, 2, 3, 3, 9, 123, 1] == HumanEval.candidate([5, 3, -5, 2, 3, 3, 9, 0, 123, 1, -10])\n assert [] == HumanEval.candidate([-1, -2])\n assert [] == HumanEval.candidate([])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_31_is_prime", "language": "elixir", "prompt": "# Return true if a given number is prime, and false otherwise.\n# >>> is_prime(6)\n# False\n# >>> is_prime(101)\n# True\n# >>> is_prime(11)\n# True\n# >>> is_prime(13441)\n# True\n# >>> is_prime(61)\n# True\n# >>> is_prime(4)\n# False\n# >>> is_prime(1)\n# False\n\ndefmodule HumanEval do\n def candidate(n), do: is_prime(n)\n def is_prime(n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_31_is_prime.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_prime' do\n assert false == HumanEval.candidate(6)\n assert true == HumanEval.candidate(101)\n assert true == HumanEval.candidate(11)\n assert true == HumanEval.candidate(13441)\n assert true == HumanEval.candidate(61)\n assert false == HumanEval.candidate(4)\n assert false == HumanEval.candidate(1)\n assert true == HumanEval.candidate(5)\n assert true == HumanEval.candidate(11)\n assert true == HumanEval.candidate(17)\n assert false == HumanEval.candidate(85)\n assert false == HumanEval.candidate(77)\n assert false == HumanEval.candidate(255379)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_33_sort_third", "language": "elixir", "prompt": "# This function takes a list l and returns a list l' such that\n# l' is identical to l in the indicies that are not divisible by three, while its values at the indicies that are divisible by three are equal\n# to the values of the corresponding indicies of l, but sorted.\n# >>> sort_third([1, 2, 3])\n# [1, 2, 3]\n# >>> sort_third([5, 6, 3, 4, 8, 9, 2])\n# [2, 6, 3, 4, 8, 9, 5]\n\ndefmodule HumanEval do\n def candidate(l), do: sort_third(l)\n def sort_third(l) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_33_sort_third.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sort_third' do\n assert [2, 6, 3, 4, 8, 9, 5] == HumanEval.candidate([5, 6, 3, 4, 8, 9, 2])\n assert [2, 8, 3, 4, 6, 9, 5] == HumanEval.candidate([5, 8, 3, 4, 6, 9, 2])\n assert [2, 6, 9, 4, 8, 3, 5] == HumanEval.candidate([5, 6, 9, 4, 8, 3, 2])\n assert [2, 6, 3, 4, 8, 9, 5, 1] == HumanEval.candidate([5, 6, 3, 4, 8, 9, 2, 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_34_unique", "language": "elixir", "prompt": "# Return sorted unique elements in a list\n# >>> unique([5, 3, 5, 2, 3, 3, 9, 0, 123])\n# [0, 2, 3, 5, 9, 123]\n\ndefmodule HumanEval do\n def candidate(l), do: unique(l)\n def unique(l) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_34_unique.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'unique' do\n assert [0, 2, 3, 5, 9, 123] == HumanEval.candidate([5, 3, 5, 2, 3, 3, 9, 0, 123])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_35_max_element", "language": "elixir", "prompt": "# Return maximum element in the list.\n# >>> max_element([1, 2, 3])\n# 3\n# >>> max_element([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])\n# 123\n\ndefmodule HumanEval do\n def candidate(l), do: max_element(l)\n def max_element(l) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_35_max_element.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'max_element' do\n assert 3 == HumanEval.candidate([1, 2, 3])\n assert 124 == HumanEval.candidate([5, 3, -5, 2, -3, 3, 9, 0, 124, 1, -10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_36_fizz_buzz", "language": "elixir", "prompt": "# Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.\n# >>> fizz_buzz(50)\n# 0\n# >>> fizz_buzz(78)\n# 2\n# >>> fizz_buzz(79)\n# 3\n\ndefmodule HumanEval do\n def candidate(n), do: fizz_buzz(n)\n def fizz_buzz(n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_36_fizz_buzz.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fizz_buzz' do\n assert 0 == HumanEval.candidate(50)\n assert 2 == HumanEval.candidate(78)\n assert 3 == HumanEval.candidate(79)\n assert 3 == HumanEval.candidate(100)\n assert 6 == HumanEval.candidate(200)\n assert 192 == HumanEval.candidate(4000)\n assert 639 == HumanEval.candidate(10000)\n assert 8026 == HumanEval.candidate(100000)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_37_sort_even", "language": "elixir", "prompt": "# This function takes a list l and returns a list l' such that\n# l' is identical to l in the odd indicies, while its values at the even indicies are equal\n# to the values of the even indicies of l, but sorted.\n# >>> sort_even([1, 2, 3])\n# [1, 2, 3]\n# >>> sort_even([5, 6, 3, 4])\n# [3, 6, 5, 4]\n\ndefmodule HumanEval do\n def candidate(l), do: sort_even(l)\n def sort_even(l) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_37_sort_even.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sort_even' do\n assert [1, 2, 3] == HumanEval.candidate([1, 2, 3])\n assert [-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123] == HumanEval.candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])\n assert [-12, 8, 3, 4, 5, 2, 12, 11, 23, -10] == HumanEval.candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_39_prime_fib", "language": "elixir", "prompt": "# prime_fib returns n-th number that is a Fibonacci number and it's also prime.\n# >>> prime_fib(1)\n# 2\n# >>> prime_fib(2)\n# 3\n# >>> prime_fib(3)\n# 5\n# >>> prime_fib(4)\n# 13\n# >>> prime_fib(5)\n# 89\n\ndefmodule HumanEval do\n def candidate(n), do: prime_fib(n)\n def prime_fib(n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_39_prime_fib.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'prime_fib' do\n assert 2 == HumanEval.candidate(1)\n assert 3 == HumanEval.candidate(2)\n assert 5 == HumanEval.candidate(3)\n assert 13 == HumanEval.candidate(4)\n assert 89 == HumanEval.candidate(5)\n assert 233 == HumanEval.candidate(6)\n assert 1597 == HumanEval.candidate(7)\n assert 28657 == HumanEval.candidate(8)\n assert 514229 == HumanEval.candidate(9)\n assert 433494437 == HumanEval.candidate(10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_3_below_zero", "language": "elixir", "prompt": "# You're given a list of deposit and withdrawal operations on a bank account that starts with\n# zero balance. Your task is to detect if at any point the balance of account fallls below zero, and\n# at that point function should return True. Otherwise it should return False.\n# >>> below_zero([1, 2, 3])\n# False\n# >>> below_zero([1, 2, -4, 5])\n# True\n\ndefmodule HumanEval do\n def candidate(operations), do: below_zero(operations)\n def below_zero(operations) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_3_below_zero.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'below_zero' do\n assert false == HumanEval.candidate([])\n assert false == HumanEval.candidate([1, 2, -3, 1, 2, -3])\n assert true == HumanEval.candidate([1, 2, -4, 5, 6])\n assert false == HumanEval.candidate([1, -1, 2, -2, 5, -5, 4, -4])\n assert true == HumanEval.candidate([1, -1, 2, -2, 5, -5, 4, -5])\n assert true == HumanEval.candidate([1, -2, 2, -2, 5, -5, 4, -4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_40_triples_sum_to_zero", "language": "elixir", "prompt": "# triples_sum_to_zero takes a list of integers as an input.\n# it returns True if there are three distinct elements in the list that\n# sum to zero, and False otherwise.\n# >>> triples_sum_to_zero([1, 3, 5, 0])\n# False\n# >>> triples_sum_to_zero([1, 3, -2, 1])\n# True\n# >>> triples_sum_to_zero([1, 2, 3, 7])\n# False\n# >>> triples_sum_to_zero([2, 4, -5, 3, 9, 7])\n# True\n# >>> triples_sum_to_zero([1])\n# False\n\ndefmodule HumanEval do\n def candidate(l), do: triples_sum_to_zero(l)\n def triples_sum_to_zero(l) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_40_triples_sum_to_zero.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'triples_sum_to_zero' do\n assert false == HumanEval.candidate([1, 3, 5, 0])\n assert false == HumanEval.candidate([1, 3, 5, -1])\n assert true == HumanEval.candidate([1, 3, -2, 1])\n assert false == HumanEval.candidate([1, 2, 3, 7])\n assert false == HumanEval.candidate([1, 2, 5, 7])\n assert true == HumanEval.candidate([2, 4, -5, 3, 9, 7])\n assert false == HumanEval.candidate([1])\n assert false == HumanEval.candidate([1, 3, 5, -100])\n assert false == HumanEval.candidate([100, 3, 5, -100])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_41_car_race_collision", "language": "elixir", "prompt": "# Imagine a road that's a perfectly straight infinitely long line.\n# n cars are driving left to right; simultaneously, a different set of n cars\n# are driving right to left. The two sets of cars start out being very far from\n# each other. All cars move in the same speed. Two cars are said to collide\n# when a car that's moving left to right hits a car that's moving right to left.\n# However, the cars are infinitely sturdy and strong; as a result, they continue moving\n# in their trajectory as if they did not collide.\n# This function outputs the number of such collisions.\n\ndefmodule HumanEval do\n def candidate(n), do: car_race_collision(n)\n def car_race_collision(n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_41_car_race_collision.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'car_race_collision' do\n assert 4 == HumanEval.candidate(2)\n assert 9 == HumanEval.candidate(3)\n assert 16 == HumanEval.candidate(4)\n assert 64 == HumanEval.candidate(8)\n assert 100 == HumanEval.candidate(10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_42_incr_list", "language": "elixir", "prompt": "# Return list with elements incremented by 1.\n# >>> incr_list([1, 2, 3])\n# [2, 3, 4]\n# >>> incr_list([5, 3, 5, 2, 3, 3, 9, 0, 123])\n# [6, 4, 6, 3, 4, 4, 10, 1, 124]\n\ndefmodule HumanEval do\n def candidate(l), do: incr_list(l)\n def incr_list(l) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_42_incr_list.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'incr_list' do\n assert [] == HumanEval.candidate([])\n assert [4, 3, 2] == HumanEval.candidate([3, 2, 1])\n assert [6, 3, 6, 3, 4, 4, 10, 1, 124] == HumanEval.candidate([5, 2, 5, 2, 3, 3, 9, 0, 123])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_43_pairs_sum_to_zero", "language": "elixir", "prompt": "# pairs_sum_to_zero takes a list of integers as an input.\n# it returns True if there are two distinct elements in the list that\n# sum to zero, and False otherwise.\n# >>> pairs_sum_to_zero([1, 3, 5, 0])\n# False\n# >>> pairs_sum_to_zero([1, 3, -2, 1])\n# False\n# >>> pairs_sum_to_zero([1, 2, 3, 7])\n# False\n# >>> pairs_sum_to_zero([2, 4, -5, 3, 5, 7])\n# True\n# >>> pairs_sum_to_zero([1])\n# False\n\ndefmodule HumanEval do\n def candidate(l), do: pairs_sum_to_zero(l)\n def pairs_sum_to_zero(l) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_43_pairs_sum_to_zero.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'pairs_sum_to_zero' do\n assert false == HumanEval.candidate([1, 3, 5, 0])\n assert false == HumanEval.candidate([1, 3, -2, 1])\n assert false == HumanEval.candidate([1, 2, 3, 7])\n assert true == HumanEval.candidate([2, 4, -5, 3, 5, 7])\n assert false == HumanEval.candidate([1])\n assert true == HumanEval.candidate([-3, 9, -1, 3, 2, 30])\n assert true == HumanEval.candidate([-3, 9, -1, 3, 2, 31])\n assert false == HumanEval.candidate([-3, 9, -1, 4, 2, 30])\n assert false == HumanEval.candidate([-3, 9, -1, 4, 2, 31])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_44_change_base", "language": "elixir", "prompt": "# Change numerical base of input number x to base.\n# return string representation after the conversion.\n# base numbers are less than 10.\n# >>> change_base(8, 3)\n# '22'\n# >>> change_base(8, 2)\n# '1000'\n# >>> change_base(7, 2)\n# '111'\n\ndefmodule HumanEval do\n def candidate(x, base), do: change_base(x, base)\n def change_base(x, base) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_44_change_base.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'change_base' do\n assert \"22\" == HumanEval.candidate(8, 3)\n assert \"100\" == HumanEval.candidate(9, 3)\n assert \"11101010\" == HumanEval.candidate(234, 2)\n assert \"10000\" == HumanEval.candidate(16, 2)\n assert \"1000\" == HumanEval.candidate(8, 2)\n assert \"111\" == HumanEval.candidate(7, 2)\n assert \"2\" == HumanEval.candidate(2, 3)\n assert \"3\" == HumanEval.candidate(3, 4)\n assert \"4\" == HumanEval.candidate(4, 5)\n assert \"5\" == HumanEval.candidate(5, 6)\n assert \"6\" == HumanEval.candidate(6, 7)\n assert \"7\" == HumanEval.candidate(7, 8)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_45_triangle_area", "language": "elixir", "prompt": "# Given length of a side and high return area for a triangle.\n# >>> triangle_area(5, 3)\n# 7.5\n\ndefmodule HumanEval do\n def candidate(a, h), do: triangle_area(a, h)\n def triangle_area(a, h) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_45_triangle_area.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'triangle_area' do\n assert 7.5 == HumanEval.candidate(5, 3)\n assert 2.0 == HumanEval.candidate(2, 2)\n assert 40.0 == HumanEval.candidate(10, 8)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_46_fib4", "language": "elixir", "prompt": "# The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:\n# fib4(0) -> 0\n# fib4(1) -> 0\n# fib4(2) -> 2\n# fib4(3) -> 0\n# fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).\n# Please write a function to efficiently compute the n-th element of the fib4 number sequence. Do not use recursion.\n# >>> fib4(5)\n# 4\n# >>> fib4(6)\n# 8\n# >>> fib4(7)\n# 14\n\ndefmodule HumanEval do\n def candidate(n), do: fib4(n)\n def fib4(n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_46_fib4.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fib4' do\n assert 4 == HumanEval.candidate(5)\n assert 28 == HumanEval.candidate(8)\n assert 104 == HumanEval.candidate(10)\n assert 386 == HumanEval.candidate(12)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_47_median", "language": "elixir", "prompt": "# Return median of elements in the list l.\n# >>> median([3, 1, 2, 4, 5])\n# 3\n# >>> median([-10, 4, 6, 1000, 10, 20])\n# 15.0\n\ndefmodule HumanEval do\n def candidate(l), do: median(l)\n def median(l) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_47_median.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'median' do\n assert 3 == HumanEval.candidate([3, 1, 2, 4, 5])\n assert 8.0 == HumanEval.candidate([-10, 4, 6, 1000, 10, 20])\n assert 5 == HumanEval.candidate([5])\n assert 5.5 == HumanEval.candidate([6, 5])\n assert 7 == HumanEval.candidate([8, 1, 3, 9, 9, 2, 7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_48_is_palindrome", "language": "elixir", "prompt": "# Checks if given string is a palindrome\n# >>> is_palindrome('')\n# True\n# >>> is_palindrome('aba')\n# True\n# >>> is_palindrome('aaaaa')\n# True\n# >>> is_palindrome('zbcd')\n# False\n\ndefmodule HumanEval do\n def candidate(text), do: is_palindrome(text)\n def is_palindrome(text) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_48_is_palindrome.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_palindrome' do\n assert true == HumanEval.candidate(\"\")\n assert true == HumanEval.candidate(\"aba\")\n assert true == HumanEval.candidate(\"aaaaa\")\n assert false == HumanEval.candidate(\"zbcd\")\n assert true == HumanEval.candidate(\"xywyx\")\n assert false == HumanEval.candidate(\"xywyz\")\n assert false == HumanEval.candidate(\"xywzx\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_49_modp", "language": "elixir", "prompt": "# Return 2^n modulo p (be aware of numerics).\n# >>> modp(3, 5)\n# 3\n# >>> modp(1101, 101)\n# 2\n# >>> modp(0, 101)\n# 1\n# >>> modp(3, 11)\n# 8\n# >>> modp(100, 101)\n# 1\n\ndefmodule HumanEval do\n def candidate(n, p), do: modp(n, p)\n def modp(n, p) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_49_modp.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'modp' do\n assert 3 == HumanEval.candidate(3, 5)\n assert 2 == HumanEval.candidate(1101, 101)\n assert 1 == HumanEval.candidate(0, 101)\n assert 8 == HumanEval.candidate(3, 11)\n assert 1 == HumanEval.candidate(100, 101)\n assert 4 == HumanEval.candidate(30, 5)\n assert 3 == HumanEval.candidate(31, 5)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_4_mean_absolute_deviation", "language": "elixir", "prompt": "# For a given list of input numbers, calculate Mean Absolute Deviation\n# around the mean of this dataset.\n# Mean Absolute Deviation is the average absolute difference between each\n# element and a centerpoint (mean in this case):\n# MAD = average | x - x_mean |\n# >>> mean_absolute_deviation([1.0, 2.0, 3.0, 4.0])\n# 1.0\n\ndefmodule HumanEval do\n def candidate(numbers), do: mean_absolute_deviation(numbers)\n def mean_absolute_deviation(numbers) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_4_mean_absolute_deviation.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'mean_absolute_deviation' do\n assert 0.5 == HumanEval.candidate([1.0, 2.0])\n assert 1.0 == HumanEval.candidate([1.0, 2.0, 3.0, 4.0])\n assert 1.2 == HumanEval.candidate([1.0, 2.0, 3.0, 4.0, 5.0])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_51_remove_vowels", "language": "elixir", "prompt": "# remove_vowels is a function that takes string and returns string without vowels.\n# >>> remove_vowels('')\n# ''\n# >>> remove_vowels('abcdef')\n# 'bcdf'\n# >>> remove_vowels('aaaaa')\n# ''\n# >>> remove_vowels('aaBAA')\n# 'B'\n# >>> remove_vowels('zbcd')\n# 'zbcd'\n\ndefmodule HumanEval do\n def candidate(text), do: remove_vowels(text)\n def remove_vowels(text) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_51_remove_vowels.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'remove_vowels' do\n assert \"\" == HumanEval.candidate(\"\")\n assert \"bcdf\nghjklm\" == HumanEval.candidate(\"abcdef\nghijklm\")\n assert \"fdcb\" == HumanEval.candidate(\"fedcba\")\n assert \"\" == HumanEval.candidate(\"eeeee\")\n assert \"cB\" == HumanEval.candidate(\"acBAA\")\n assert \"cB\" == HumanEval.candidate(\"EcBOO\")\n assert \"ybcd\" == HumanEval.candidate(\"ybcd\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_52_below_threshold", "language": "elixir", "prompt": "# Return True if all numbers in the list l are below threshold t.\n# >>> below_threshold([1, 2, 4, 10], 100)\n# True\n# >>> below_threshold([1, 20, 4, 10], 5)\n# False\n\ndefmodule HumanEval do\n def candidate(l, t), do: below_threshold(l, t)\n def below_threshold(l, t) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_52_below_threshold.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'below_threshold' do\n assert true == HumanEval.candidate([1, 2, 4, 10], 100)\n assert false == HumanEval.candidate([1, 20, 4, 10], 5)\n assert true == HumanEval.candidate([1, 20, 4, 10], 21)\n assert true == HumanEval.candidate([1, 20, 4, 10], 22)\n assert true == HumanEval.candidate([1, 8, 4, 10], 11)\n assert false == HumanEval.candidate([1, 8, 4, 10], 10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_53_add", "language": "elixir", "prompt": "# Add two numbers x and y\n# >>> add(2, 3)\n# 5\n# >>> add(5, 7)\n# 12\n\ndefmodule HumanEval do\n def candidate(x, y), do: add(x, y)\n def add(x, y) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_53_add.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'add' do\n assert 1 == HumanEval.candidate(0, 1)\n assert 1 == HumanEval.candidate(1, 0)\n assert 5 == HumanEval.candidate(2, 3)\n assert 12 == HumanEval.candidate(5, 7)\n assert 12 == HumanEval.candidate(7, 5)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_54_same_chars", "language": "elixir", "prompt": "# Check if two words have the same characters.\n# >>> same_chars('eabcdzzzz', 'dddzzzzzzzddeddabc')\n# True\n# >>> same_chars('abcd', 'dddddddabc')\n# True\n# >>> same_chars('dddddddabc', 'abcd')\n# True\n# >>> same_chars('eabcd', 'dddddddabc')\n# False\n# >>> same_chars('abcd', 'dddddddabce')\n# False\n# >>> same_chars('eabcdzzzz', 'dddzzzzzzzddddabc')\n# False\n\ndefmodule HumanEval do\n def candidate(s0, s1), do: same_chars(s0, s1)\n def same_chars(s0, s1) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_54_same_chars.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'same_chars' do\n assert true == HumanEval.candidate(\"eabcdzzzz\", \"dddzzzzzzzddeddabc\")\n assert true == HumanEval.candidate(\"abcd\", \"dddddddabc\")\n assert true == HumanEval.candidate(\"dddddddabc\", \"abcd\")\n assert false == HumanEval.candidate(\"eabcd\", \"dddddddabc\")\n assert false == HumanEval.candidate(\"abcd\", \"dddddddabcf\")\n assert false == HumanEval.candidate(\"eabcdzzzz\", \"dddzzzzzzzddddabc\")\n assert false == HumanEval.candidate(\"aabb\", \"aaccc\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_55_fib", "language": "elixir", "prompt": "# Return n-th Fibonacci number.\n# >>> fib(10)\n# 55\n# >>> fib(1)\n# 1\n# >>> fib(8)\n# 21\n\ndefmodule HumanEval do\n def candidate(n), do: fib(n)\n def fib(n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_55_fib.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fib' do\n assert 55 == HumanEval.candidate(10)\n assert 1 == HumanEval.candidate(1)\n assert 21 == HumanEval.candidate(8)\n assert 89 == HumanEval.candidate(11)\n assert 144 == HumanEval.candidate(12)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_56_correct_bracketing", "language": "elixir", "prompt": "# brackets is a string of \"<\" and \">\".\n# return True if every opening bracket has a corresponding closing bracket.\n# >>> correct_bracketing(\"<\")\n# False\n# >>> correct_bracketing(\"<>\")\n# True\n# >>> correct_bracketing(\"<<><>>\")\n# True\n# >>> correct_bracketing(\"><<>\")\n# False\n\ndefmodule HumanEval do\n def candidate(brackets), do: correct_bracketing(brackets)\n def correct_bracketing(brackets) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_56_correct_bracketing.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'correct_bracketing' do\n assert true == HumanEval.candidate(\"<>\")\n assert true == HumanEval.candidate(\"<<><>>\")\n assert true == HumanEval.candidate(\"<><><<><>><>\")\n assert true == HumanEval.candidate(\"<><><<<><><>><>><<><><<>>>\")\n assert false == HumanEval.candidate(\"<<<><>>>>\")\n assert false == HumanEval.candidate(\"><<>\")\n assert false == HumanEval.candidate(\"<\")\n assert false == HumanEval.candidate(\"<<<<\")\n assert false == HumanEval.candidate(\">\")\n assert false == HumanEval.candidate(\"<<>\")\n assert false == HumanEval.candidate(\"<><><<><>><>><<>\")\n assert false == HumanEval.candidate(\"<><><<><>><>>><>\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_57_monotonic", "language": "elixir", "prompt": "# Return True is list elements are monotonically increasing or decreasing.\n# >>> monotonic([1, 2, 4, 20])\n# True\n# >>> monotonic([1, 20, 4, 10])\n# False\n# >>> monotonic([4, 1, 0, -10])\n# True\n\ndefmodule HumanEval do\n def candidate(l), do: monotonic(l)\n def monotonic(l) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_57_monotonic.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'monotonic' do\n assert true == HumanEval.candidate([1, 2, 4, 10])\n assert true == HumanEval.candidate([1, 2, 4, 20])\n assert false == HumanEval.candidate([1, 20, 4, 10])\n assert true == HumanEval.candidate([4, 1, 0, -10])\n assert true == HumanEval.candidate([4, 1, 1, 0])\n assert false == HumanEval.candidate([1, 2, 3, 2, 5, 60])\n assert true == HumanEval.candidate([1, 2, 3, 4, 5, 60])\n assert true == HumanEval.candidate([9, 9, 9, 9])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_58_common", "language": "elixir", "prompt": "# Return sorted unique common elements for two lists.\n# >>> common([1, 4, 3, 34, 653, 2, 5], [5, 7, 1, 5, 9, 653, 121])\n# [1, 5, 653]\n# >>> common([5, 3, 2, 8], [3, 2])\n# [2, 3]\n\ndefmodule HumanEval do\n def candidate(l1, l2), do: common(l1, l2)\n def common(l1, l2) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_58_common.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'common' do\n assert [1, 5, 653] == HumanEval.candidate([1, 4, 3, 34, 653, 2, 5], [5, 7, 1, 5, 9, 653, 121])\n assert [2, 3] == HumanEval.candidate([5, 3, 2, 8], [3, 2])\n assert [2, 3, 4] == HumanEval.candidate([4, 3, 2, 8], [3, 2, 4])\n assert [] == HumanEval.candidate([4, 3, 2, 8], [])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_59_largest_prime_factor", "language": "elixir", "prompt": "# Return the largest prime factor of n. Assume n > 1 and is not a prime.\n# >>> largest_prime_factor(13195)\n# 29\n# >>> largest_prime_factor(2048)\n# 2\n\ndefmodule HumanEval do\n def candidate(n), do: largest_prime_factor(n)\n def largest_prime_factor(n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_59_largest_prime_factor.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'largest_prime_factor' do\n assert 5 == HumanEval.candidate(15)\n assert 3 == HumanEval.candidate(27)\n assert 7 == HumanEval.candidate(63)\n assert 11 == HumanEval.candidate(330)\n assert 29 == HumanEval.candidate(13195)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_5_intersperse", "language": "elixir", "prompt": "# Insert a number 'delimeter' between every two consecutive elements of input list `numbers'\n# >>> intersperse([], 4)\n# []\n# >>> intersperse([1, 2, 3], 4)\n# [1, 4, 2, 4, 3]\n\ndefmodule HumanEval do\n def candidate(numbers, delimeter), do: intersperse(numbers, delimeter)\n def intersperse(numbers, delimeter) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_5_intersperse.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'intersperse' do\n assert [] == HumanEval.candidate([], 7)\n assert [5, 8, 6, 8, 3, 8, 2] == HumanEval.candidate([5, 6, 3, 2], 8)\n assert [2, 2, 2, 2, 2] == HumanEval.candidate([2, 2, 2], 2)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_60_sum_to_n", "language": "elixir", "prompt": "# sum_to_n is a function that sums numbers from 1 to n.\n# >>> sum_to_n(30)\n# 465\n# >>> sum_to_n(100)\n# 5050\n# >>> sum_to_n(5)\n# 15\n# >>> sum_to_n(10)\n# 55\n# >>> sum_to_n(1)\n# 1\n\ndefmodule HumanEval do\n def candidate(n), do: sum_to_n(n)\n def sum_to_n(n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_60_sum_to_n.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sum_to_n' do\n assert 1 == HumanEval.candidate(1)\n assert 21 == HumanEval.candidate(6)\n assert 66 == HumanEval.candidate(11)\n assert 465 == HumanEval.candidate(30)\n assert 5050 == HumanEval.candidate(100)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_61_correct_bracketing", "language": "elixir", "prompt": "# brackets is a string of \"(\" and \")\".\n# return True if every opening bracket has a corresponding closing bracket.\n# >>> correct_bracketing(\"(\")\n# False\n# >>> correct_bracketing(\"()\")\n# True\n# >>> correct_bracketing(\"(()())\")\n# True\n# >>> correct_bracketing(\")(()\")\n# False\n\ndefmodule HumanEval do\n def candidate(brackets), do: correct_bracketing(brackets)\n def correct_bracketing(brackets) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_61_correct_bracketing.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'correct_bracketing' do\n assert true == HumanEval.candidate(\"()\")\n assert true == HumanEval.candidate(\"(()())\")\n assert true == HumanEval.candidate(\"()()(()())()\")\n assert true == HumanEval.candidate(\"()()((()()())())(()()(()))\")\n assert false == HumanEval.candidate(\"((()())))\")\n assert false == HumanEval.candidate(\")(()\")\n assert false == HumanEval.candidate(\"(\")\n assert false == HumanEval.candidate(\"((((\")\n assert false == HumanEval.candidate(\")\")\n assert false == HumanEval.candidate(\"(()\")\n assert false == HumanEval.candidate(\"()()(()())())(()\")\n assert false == HumanEval.candidate(\"()()(()())()))()\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_62_derivative", "language": "elixir", "prompt": "# xs represent coefficients of a polynomial.\n# xs[0] + xs[1] * x + xs[2] * x^2 + ....\n# Return derivative of this polynomial in the same form.\n# >>> derivative([3, 1, 2, 4, 5])\n# [1, 4, 12, 20]\n# >>> derivative([1, 2, 3])\n# [2, 6]\n\ndefmodule HumanEval do\n def candidate(xs), do: derivative(xs)\n def derivative(xs) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_62_derivative.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'derivative' do\n assert [1, 4, 12, 20] == HumanEval.candidate([3, 1, 2, 4, 5])\n assert [2, 6] == HumanEval.candidate([1, 2, 3])\n assert [2, 2] == HumanEval.candidate([3, 2, 1])\n assert [2, 2, 0, 16] == HumanEval.candidate([3, 2, 1, 0, 4])\n assert [] == HumanEval.candidate([1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_63_fibfib", "language": "elixir", "prompt": "# The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:\n# fibfib(0) == 0\n# fibfib(1) == 0\n# fibfib(2) == 1\n# fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).\n# Please write a function to efficiently compute the n-th element of the fibfib number sequence.\n# >>> fibfib(1)\n# 0\n# >>> fibfib(5)\n# 4\n# >>> fibfib(8)\n# 24\n\ndefmodule HumanEval do\n def candidate(n), do: fibfib(n)\n def fibfib(n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_63_fibfib.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fibfib' do\n assert 1 == HumanEval.candidate(2)\n assert 0 == HumanEval.candidate(1)\n assert 4 == HumanEval.candidate(5)\n assert 24 == HumanEval.candidate(8)\n assert 81 == HumanEval.candidate(10)\n assert 274 == HumanEval.candidate(12)\n assert 927 == HumanEval.candidate(14)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_64_vowels_count", "language": "elixir", "prompt": "# Write a function vowels_count which takes a string representing\n# a word as input and returns the number of vowels in the string.\n# Vowels in this case are 'a', 'e', 'i', 'o', 'u'. Here, 'y' is also a\n# vowel, but only when it is at the end of the given word.\n# Example:\n# >>> vowels_count(\"abcde\")\n# 2\n# >>> vowels_count(\"ACEDY\")\n# 3\n\ndefmodule HumanEval do\n def candidate(s), do: vowels_count(s)\n def vowels_count(s) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_64_vowels_count.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'vowels_count' do\n assert 2 == HumanEval.candidate(\"abcde\")\n assert 3 == HumanEval.candidate(\"Alone\")\n assert 2 == HumanEval.candidate(\"key\")\n assert 1 == HumanEval.candidate(\"bye\")\n assert 2 == HumanEval.candidate(\"keY\")\n assert 1 == HumanEval.candidate(\"bYe\")\n assert 3 == HumanEval.candidate(\"ACEDY\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_65_circular_shift", "language": "elixir", "prompt": "# Circular shift the digits of the integer x, shift the digits right by shift\n# and return the result as a string.\n# If shift > number of digits, return digits reversed.\n# >>> circular_shift(12, 1)\n# \"21\"\n# >>> circular_shift(12, 2)\n# \"12\"\n\ndefmodule HumanEval do\n def candidate(x, shift), do: circular_shift(x, shift)\n def circular_shift(x, shift) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_65_circular_shift.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'circular_shift' do\n assert \"001\" == HumanEval.candidate(100, 2)\n assert \"12\" == HumanEval.candidate(12, 2)\n assert \"79\" == HumanEval.candidate(97, 8)\n assert \"21\" == HumanEval.candidate(12, 1)\n assert \"11\" == HumanEval.candidate(11, 101)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_66_digitSum", "language": "elixir", "prompt": "# Task\n# Write a function that takes a string as input and returns the sum of the upper characters only'\n# ASCII codes.\n# Examples:\n# digitSum(\"\") => 0\n# digitSum(\"abAB\") => 131\n# digitSum(\"abcCd\") => 67\n# digitSum(\"helloE\") => 69\n# digitSum(\"woArBld\") => 131\n# digitSum(\"aAaaaXa\") => 153\n\ndefmodule HumanEval do\n def candidate(s), do: digitSum(s)\n def digitSum(s) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_66_digitSum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'digitSum' do\n assert 0 == HumanEval.candidate(\"\")\n assert 131 == HumanEval.candidate(\"abAB\")\n assert 67 == HumanEval.candidate(\"abcCd\")\n assert 69 == HumanEval.candidate(\"helloE\")\n assert 131 == HumanEval.candidate(\"woArBld\")\n assert 153 == HumanEval.candidate(\"aAaaaXa\")\n assert 151 == HumanEval.candidate(\" How are yOu?\")\n assert 327 == HumanEval.candidate(\"You arE Very Smart\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_67_fruit_distribution", "language": "elixir", "prompt": "# In this task, you will be given a string that represents a number of apples and oranges \n# that are distributed in a basket of fruit this basket contains \n# apples, oranges, and mango fruits. Given the string that represents the total number of \n# the oranges and apples and an integer that represent the total number of the fruits \n# in the basket return the number of the mango fruits in the basket.\n# for examble:\n# fruit_distribution(\"5 apples and 6 oranges\", 19) ->19 - 5 - 6 = 8\n# fruit_distribution(\"0 apples and 1 oranges\",3) -> 3 - 0 - 1 = 2\n# fruit_distribution(\"2 apples and 3 oranges\", 100) -> 100 - 2 - 3 = 95\n# fruit_distribution(\"100 apples and 1 oranges\",120) -> 120 - 100 - 1 = 19\n\ndefmodule HumanEval do\n def candidate(s, n), do: fruit_distribution(s, n)\n def fruit_distribution(s, n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_67_fruit_distribution.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fruit_distribution' do\n assert 8 == HumanEval.candidate(\"5 apples and 6 oranges\", 19)\n assert 10 == HumanEval.candidate(\"5 apples and 6 oranges\", 21)\n assert 2 == HumanEval.candidate(\"0 apples and 1 oranges\", 3)\n assert 2 == HumanEval.candidate(\"1 apples and 0 oranges\", 3)\n assert 95 == HumanEval.candidate(\"2 apples and 3 oranges\", 100)\n assert 0 == HumanEval.candidate(\"2 apples and 3 oranges\", 5)\n assert 19 == HumanEval.candidate(\"1 apples and 100 oranges\", 120)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_68_pluck", "language": "elixir", "prompt": "# \"Given an array representing a branch of a tree that has non-negative integer nodes\n# your task is to pluck one of the nodes and return it.\n# The plucked node should be the node with the smallest even value.\n# If multiple nodes with the same smallest even value are found return the node that has smallest index.\n# The plucked node should be returned in a list, [ smalest_value, its index ],\n# If there are no even values or the given array is empty, return [].\n# Example 1:\n# Input: [4,2,3]\n# Output: [2, 1]\n# Explanation: 2 has the smallest even value, and 2 has the smallest index.\n# Example 2:\n# Input: [1,2,3]\n# Output: [2, 1]\n# Explanation: 2 has the smallest even value, and 2 has the smallest index. \n# Example 3:\n# Input: []\n# Output: []\n# Example 4:\n# Input: [5, 0, 3, 0, 4, 2]\n# Output: [0, 1]\n# Explanation: 0 is the smallest value, but there are two zeros,\n# so we will choose the first zero, which has the smallest index.\n# Constraints:\n# * 1 <= nodes.length <= 10000\n# * 0 <= node.value\n\ndefmodule HumanEval do\n def candidate(arr), do: pluck(arr)\n def pluck(arr) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_68_pluck.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'pluck' do\n assert [2, 1] == HumanEval.candidate([4, 2, 3])\n assert [2, 1] == HumanEval.candidate([1, 2, 3])\n assert [] == HumanEval.candidate([])\n assert [0, 1] == HumanEval.candidate([5, 0, 3, 0, 4, 2])\n assert [0, 3] == HumanEval.candidate([1, 2, 3, 0, 5, 3])\n assert [4, 1] == HumanEval.candidate([5, 4, 8, 4, 8])\n assert [6, 1] == HumanEval.candidate([7, 6, 7, 1])\n assert [] == HumanEval.candidate([7, 9, 7, 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_69_search", "language": "elixir", "prompt": "# You are given a non-empty list of positive integers. Return the greatest integer that is greater than \n# zero, and has a frequency greater than or equal to the value of the integer itself. \n# The frequency of an integer is the number of times it appears in the list.\n# If no such a value exist, return -1.\n# Examples:\n# search([4, 1, 2, 2, 3, 1]) == 2\n# search([1, 2, 2, 3, 3, 3, 4, 4, 4]) == 3\n# search([5, 5, 4, 4, 4]) == -1\n\ndefmodule HumanEval do\n def candidate(lst), do: search(lst)\n def search(lst) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_69_search.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'search' do\n assert 1 == HumanEval.candidate([5, 5, 5, 5, 1])\n assert 4 == HumanEval.candidate([4, 1, 4, 1, 4, 4])\n assert -1 == HumanEval.candidate([3, 3])\n assert 8 == HumanEval.candidate([8, 8, 8, 8, 8, 8, 8, 8])\n assert 2 == HumanEval.candidate([2, 3, 3, 2, 2])\n assert 1 == HumanEval.candidate([2, 7, 8, 8, 4, 8, 7, 3, 9, 6, 5, 10, 4, 3, 6, 7, 1, 7, 4, 10, 8, 1])\n assert 2 == HumanEval.candidate([3, 2, 8, 2])\n assert 1 == HumanEval.candidate([6, 7, 1, 8, 8, 10, 5, 8, 5, 3, 10])\n assert -1 == HumanEval.candidate([8, 8, 3, 6, 5, 6, 4])\n assert 1 == HumanEval.candidate([6, 9, 6, 7, 1, 4, 7, 1, 8, 8, 9, 8, 10, 10, 8, 4, 10, 4, 10, 1, 2, 9, 5, 7, 9])\n assert 1 == HumanEval.candidate([1, 9, 10, 1, 3])\n assert 5 == HumanEval.candidate([6, 9, 7, 5, 8, 7, 5, 3, 7, 5, 10, 10, 3, 6, 10, 2, 8, 6, 5, 4, 9, 5, 3, 10])\n assert 1 == HumanEval.candidate([1])\n assert 4 == HumanEval.candidate([8, 8, 10, 6, 4, 3, 5, 8, 2, 4, 2, 8, 4, 6, 10, 4, 2, 1, 10, 2, 1, 1, 5])\n assert 2 == HumanEval.candidate([2, 10, 4, 8, 2, 10, 5, 1, 2, 9, 5, 5, 6, 3, 8, 6, 4, 10])\n assert 1 == HumanEval.candidate([1, 6, 10, 1, 6, 9, 10, 8, 6, 8, 7, 3])\n assert 4 == HumanEval.candidate([9, 2, 4, 1, 5, 1, 5, 2, 5, 7, 7, 7, 3, 10, 1, 5, 4, 2, 8, 4, 1, 9, 10, 7, 10, 2, 8, 10, 9, 4])\n assert 4 == HumanEval.candidate([2, 6, 4, 2, 8, 7, 5, 6, 4, 10, 4, 6, 3, 7, 8, 8, 3, 1, 4, 2, 2, 10, 7])\n assert 2 == HumanEval.candidate([9, 8, 6, 10, 2, 6, 10, 2, 7, 8, 10, 3, 8, 2, 6, 2, 3, 1])\n assert -1 == HumanEval.candidate([5, 5, 3, 9, 5, 6, 3, 2, 8, 5, 6, 10, 10, 6, 8, 4, 10, 7, 7, 10, 8])\n assert -1 == HumanEval.candidate([10])\n assert 2 == HumanEval.candidate([9, 7, 7, 2, 4, 7, 2, 10, 9, 7, 5, 7, 2])\n assert 1 == HumanEval.candidate([5, 4, 10, 2, 1, 1, 10, 3, 6, 1, 8])\n assert 1 == HumanEval.candidate([7, 9, 9, 9, 3, 4, 1, 5, 9, 1, 2, 1, 1, 10, 7, 5, 6, 7, 6, 7, 7, 6])\n assert -1 == HumanEval.candidate([3, 10, 10, 9, 2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_6_parse_nested_parens", "language": "elixir", "prompt": "# Input to this function is a string represented multiple groups for nested parentheses separated by spaces.\n# For each of the group, output the deepest level of nesting of parentheses.\n# E.g. (()()) has maximum two levels of nesting while ((())) has three.\n# >>> parse_nested_parens('(()()) ((())) () ((())()())')\n# [2, 3, 1, 3]\n\ndefmodule HumanEval do\n def candidate(paren_string), do: parse_nested_parens(paren_string)\n def parse_nested_parens(paren_string) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_6_parse_nested_parens.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'parse_nested_parens' do\n assert [2, 3, 1, 3] == HumanEval.candidate(\"(()()) ((())) () ((())()())\")\n assert [1, 2, 3, 4] == HumanEval.candidate(\"() (()) ((())) (((())))\")\n assert [4] == HumanEval.candidate(\"(()(())((())))\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_70_strange_sort_list", "language": "elixir", "prompt": "# Given list of integers, return list in strange order.\n# Strange sorting, is when you start with the minimum value,\n# then maximum of the remaining integers, then minimum and so on.\n# Examples:\n# strange_sort_list([1, 2, 3, 4]) == [1, 4, 2, 3]\n# strange_sort_list([5, 5, 5, 5]) == [5, 5, 5, 5]\n# strange_sort_list([]) == []\n\ndefmodule HumanEval do\n def candidate(lst), do: strange_sort_list(lst)\n def strange_sort_list(lst) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_70_strange_sort_list.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'strange_sort_list' do\n assert [1, 4, 2, 3] == HumanEval.candidate([1, 2, 3, 4])\n assert [5, 9, 6, 8, 7] == HumanEval.candidate([5, 6, 7, 8, 9])\n assert [1, 5, 2, 4, 3] == HumanEval.candidate([1, 2, 3, 4, 5])\n assert [1, 9, 5, 8, 6, 7] == HumanEval.candidate([5, 6, 7, 8, 9, 1])\n assert [5, 5, 5, 5] == HumanEval.candidate([5, 5, 5, 5])\n assert [] == HumanEval.candidate([])\n assert [1, 8, 2, 7, 3, 6, 4, 5] == HumanEval.candidate([1, 2, 3, 4, 5, 6, 7, 8])\n assert [-5, 5, -5, 5, 0, 2, 2, 2] == HumanEval.candidate([0, 2, 2, 2, 5, 5, -5, -5])\n assert [111111] == HumanEval.candidate([111111])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_71_triangle_area", "language": "elixir", "prompt": "# Given the lengths of the three sides of a triangle. Return the area of\n# the triangle rounded to 2 decimal points if the three sides form a valid triangle. \n# Otherwise return -1\n# Three sides make a valid triangle when the sum of any two sides is greater \n# than the third side.\n# Example:\n# triangle_area(3, 4, 5) == 6.00\n# triangle_area(1, 2, 10) == -1\n\ndefmodule HumanEval do\n def candidate(a, b, c), do: triangle_area(a, b, c)\n def triangle_area(a, b, c) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_71_triangle_area.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'triangle_area' do\n assert 6.0 == HumanEval.candidate(3, 4, 5)\n assert -1 == HumanEval.candidate(1, 2, 10)\n assert 8.18 == HumanEval.candidate(4, 8, 5)\n assert 1.73 == HumanEval.candidate(2, 2, 2)\n assert -1 == HumanEval.candidate(1, 2, 3)\n assert 16.25 == HumanEval.candidate(10, 5, 7)\n assert -1 == HumanEval.candidate(2, 6, 3)\n assert 0.43 == HumanEval.candidate(1, 1, 1)\n assert -1 == HumanEval.candidate(2, 2, 10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_72_will_it_fly", "language": "elixir", "prompt": "# Write a function that returns True if the object q will fly, and False otherwise.\n# The object q will fly if it's balanced (it is a palindromic list) and the sum of its elements is less than or equal the maximum possible weight w.\n# Example:\n# will_it_fly([1, 2], 5) \u279e False \n# # 1+2 is less than the maximum possible weight, but it's unbalanced.\n# will_it_fly([3, 2, 3], 1) \u279e False\n# # it's balanced, but 3+2+3 is more than the maximum possible weight.\n# will_it_fly([3, 2, 3], 9) \u279e True\n# # 3+2+3 is less than the maximum possible weight, and it's balanced.\n# will_it_fly([3], 5) \u279e True\n# # 3 is less than the maximum possible weight, and it's balanced.\n\ndefmodule HumanEval do\n def candidate(q, w), do: will_it_fly(q, w)\n def will_it_fly(q, w) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_72_will_it_fly.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'will_it_fly' do\n assert true == HumanEval.candidate([3, 2, 3], 9)\n assert false == HumanEval.candidate([1, 2], 5)\n assert true == HumanEval.candidate([3], 5)\n assert false == HumanEval.candidate([3, 2, 3], 1)\n assert false == HumanEval.candidate([1, 2, 3], 6)\n assert true == HumanEval.candidate([5], 5)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_73_smallest_change", "language": "elixir", "prompt": "# Given an array arr of integers, find the minimum number of elements that\n# need to be changed to make the array palindromic. A palindromic array is an array that\n# is read the same backwards and forwards. In one change, you can change one element to any other element.\n# For example:\n# smallest_change([1,2,3,5,4,7,9,6]) == 4\n# smallest_change([1, 2, 3, 4, 3, 2, 2]) == 1\n# smallest_change([1, 2, 3, 2, 1]) == 0\n\ndefmodule HumanEval do\n def candidate(arr), do: smallest_change(arr)\n def smallest_change(arr) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_73_smallest_change.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'smallest_change' do\n assert 4 == HumanEval.candidate([1, 2, 3, 5, 4, 7, 9, 6])\n assert 1 == HumanEval.candidate([1, 2, 3, 4, 3, 2, 2])\n assert 1 == HumanEval.candidate([1, 4, 2])\n assert 1 == HumanEval.candidate([1, 4, 4, 2])\n assert 0 == HumanEval.candidate([1, 2, 3, 2, 1])\n assert 0 == HumanEval.candidate([3, 1, 1, 3])\n assert 0 == HumanEval.candidate([1])\n assert 1 == HumanEval.candidate([0, 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_74_total_match", "language": "elixir", "prompt": "# Write a function that accepts two lists of strings and returns the list that has \n# total number of chars in the all strings of the list less than the other list.\n# if the two lists have the same number of chars, return the first list.\n# Examples\n# total_match([], []) \u279e []\n# total_match(['hi', 'admin'], ['hI', 'Hi']) \u279e ['hI', 'Hi']\n# total_match(['hi', 'admin'], ['hi', 'hi', 'admin', 'project']) \u279e ['hi', 'admin']\n# total_match(['hi', 'admin'], ['hI', 'hi', 'hi']) \u279e ['hI', 'hi', 'hi']\n# total_match(['4'], ['1', '2', '3', '4', '5']) \u279e ['4']\n\ndefmodule HumanEval do\n def candidate(lst1, lst2), do: total_match(lst1, lst2)\n def total_match(lst1, lst2) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_74_total_match.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'total_match' do\n assert [] == HumanEval.candidate([], [])\n assert [\"hi\", \"hi\"] == HumanEval.candidate([\"hi\", \"admin\"], [\"hi\", \"hi\"])\n assert [\"hi\", \"admin\"] == HumanEval.candidate([\"hi\", \"admin\"], [\"hi\", \"hi\", \"admin\", \"project\"])\n assert [\"4\"] == HumanEval.candidate([\"4\"], [\"1\", \"2\", \"3\", \"4\", \"5\"])\n assert [\"hI\", \"Hi\"] == HumanEval.candidate([\"hi\", \"admin\"], [\"hI\", \"Hi\"])\n assert [\"hI\", \"hi\", \"hi\"] == HumanEval.candidate([\"hi\", \"admin\"], [\"hI\", \"hi\", \"hi\"])\n assert [\"hi\", \"admin\"] == HumanEval.candidate([\"hi\", \"admin\"], [\"hI\", \"hi\", \"hii\"])\n assert [] == HumanEval.candidate([], [\"this\"])\n assert [] == HumanEval.candidate([\"this\"], [])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_75_is_multiply_prime", "language": "elixir", "prompt": "# Write a function that returns true if the given number is the multiplication of 3 prime numbers\n# and false otherwise.\n# Knowing that (a) is less then 100. \n# Example:\n# is_multiply_prime(30) == True\n# 30 = 2 * 3 * 5\n\ndefmodule HumanEval do\n def candidate(a), do: is_multiply_prime(a)\n def is_multiply_prime(a) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_75_is_multiply_prime.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_multiply_prime' do\n assert false == HumanEval.candidate(5)\n assert true == HumanEval.candidate(30)\n assert true == HumanEval.candidate(8)\n assert false == HumanEval.candidate(10)\n assert true == HumanEval.candidate(125)\n assert true == HumanEval.candidate(105)\n assert false == HumanEval.candidate(126)\n assert false == HumanEval.candidate(729)\n assert false == HumanEval.candidate(891)\n assert true == HumanEval.candidate(1001)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_76_is_simple_power", "language": "elixir", "prompt": "# Your task is to write a function that returns true if a number x is a simple\n# power of n and false in other cases.\n# x is a simple power of n if n**int=x\n# For example:\n# is_simple_power(1, 4) => true\n# is_simple_power(2, 2) => true\n# is_simple_power(8, 2) => true\n# is_simple_power(3, 2) => false\n# is_simple_power(3, 1) => false\n# is_simple_power(5, 3) => false\n\ndefmodule HumanEval do\n def candidate(x, n), do: is_simple_power(x, n)\n def is_simple_power(x, n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_76_is_simple_power.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_simple_power' do\n assert true == HumanEval.candidate(16, 2)\n assert false == HumanEval.candidate(143214, 16)\n assert true == HumanEval.candidate(4, 2)\n assert true == HumanEval.candidate(9, 3)\n assert true == HumanEval.candidate(16, 4)\n assert false == HumanEval.candidate(24, 2)\n assert false == HumanEval.candidate(128, 4)\n assert false == HumanEval.candidate(12, 6)\n assert true == HumanEval.candidate(1, 1)\n assert true == HumanEval.candidate(1, 12)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_77_iscube", "language": "elixir", "prompt": "# Write a function that takes an integer a and returns True \n# if this ingeger is a cube of some integer number.\n# Note: you may assume the input is always valid.\n# Examples:\n# iscube(1) ==> True\n# iscube(2) ==> False\n# iscube(-1) ==> True\n# iscube(64) ==> True\n# iscube(0) ==> True\n# iscube(180) ==> False\n\ndefmodule HumanEval do\n def candidate(a), do: iscube(a)\n def iscube(a) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_77_iscube.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'iscube' do\n assert true == HumanEval.candidate(1)\n assert false == HumanEval.candidate(2)\n assert true == HumanEval.candidate(-1)\n assert true == HumanEval.candidate(64)\n assert false == HumanEval.candidate(180)\n assert true == HumanEval.candidate(1000)\n assert true == HumanEval.candidate(0)\n assert false == HumanEval.candidate(1729)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_78_hex_key", "language": "elixir", "prompt": "# You have been tasked to write a function that receives \n# a hexadecimal number as a string and counts the number of hexadecimal \n# digits that are primes (prime number, or a prime, is a natural number \n# greater than 1 that is not a product of two smaller natural numbers).\n# Hexadecimal digits are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.\n# Prime numbers are 2, 3, 5, 7, 11, 13, 17,...\n# So you have to determine a number of the following digits: 2, 3, 5, 7, \n# B (=decimal 11), D (=decimal 13).\n# Note: you may assume the input is always correct or empty string, \n# and symbols A,B,C,D,E,F are always uppercase.\n# Examples:\n# For num = \"AB\" the output should be 1.\n# For num = \"1077E\" the output should be 2.\n# For num = \"ABED1A33\" the output should be 4.\n# For num = \"123456789ABCDEF0\" the output should be 6.\n# For num = \"2020\" the output should be 2.\n\ndefmodule HumanEval do\n def candidate(num), do: hex_key(num)\n def hex_key(num) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_78_hex_key.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'hex_key' do\n assert 1 == HumanEval.candidate(\"AB\")\n assert 2 == HumanEval.candidate(\"1077E\")\n assert 4 == HumanEval.candidate(\"ABED1A33\")\n assert 2 == HumanEval.candidate(\"2020\")\n assert 6 == HumanEval.candidate(\"123456789ABCDEF0\")\n assert 12 == HumanEval.candidate(\"112233445566778899AABBCCDDEEFF00\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_79_decimal_to_binary", "language": "elixir", "prompt": "# You will be given a number in decimal form and your task is to convert it to\n# binary format. The function should return a string, with each character representing a binary\n# number. Each character in the string will be '0' or '1'.\n# There will be an extra couple of characters 'db' at the beginning and at the end of the string.\n# The extra characters are there to help with the format.\n# Examples:\n# decimal_to_binary(15) # returns \"db1111db\"\n# decimal_to_binary(32) # returns \"db100000db\"\n\ndefmodule HumanEval do\n def candidate(decimal), do: decimal_to_binary(decimal)\n def decimal_to_binary(decimal) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_79_decimal_to_binary.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'decimal_to_binary' do\n assert \"db0db\" == HumanEval.candidate(0)\n assert \"db100000db\" == HumanEval.candidate(32)\n assert \"db1100111db\" == HumanEval.candidate(103)\n assert \"db1111db\" == HumanEval.candidate(15)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_7_filter_by_substring", "language": "elixir", "prompt": "# Filter an input list of strings only for ones that contain given substring\n# >>> filter_by_substring([], 'a')\n# []\n# >>> filter_by_substring(['abc', 'bacd', 'cde', 'array'], 'a')\n# ['abc', 'bacd', 'array']\n\ndefmodule HumanEval do\n def candidate(strings, substring), do: filter_by_substring(strings, substring)\n def filter_by_substring(strings, substring) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_7_filter_by_substring.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'filter_by_substring' do\n assert [] == HumanEval.candidate([], \"john\")\n assert [\"xxx\", \"xxxAAA\", \"xxx\"] == HumanEval.candidate([\"xxx\", \"asd\", \"xxy\", \"john doe\", \"xxxAAA\", \"xxx\"], \"xxx\")\n assert [\"xxx\", \"aaaxxy\", \"xxxAAA\", \"xxx\"] == HumanEval.candidate([\"xxx\", \"asd\", \"aaaxxy\", \"john doe\", \"xxxAAA\", \"xxx\"], \"xx\")\n assert [\"grunt\", \"prune\"] == HumanEval.candidate([\"grunt\", \"trumpet\", \"prune\", \"gruesome\"], \"run\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_80_is_happy", "language": "elixir", "prompt": "# You are given a string s.\n# Your task is to check if the string is happy or not.\n# A string is happy if its length is at least 3 and every 3 consecutive letters are distinct\n# For example:\n# is_happy(a) => False\n# is_happy(aa) => False\n# is_happy(abcd) => True\n# is_happy(aabb) => False\n# is_happy(adb) => True\n# is_happy(xyy) => False\n\ndefmodule HumanEval do\n def candidate(s), do: is_happy(s)\n def is_happy(s) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_80_is_happy.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_happy' do\n assert false == HumanEval.candidate(\"a\")\n assert false == HumanEval.candidate(\"aa\")\n assert true == HumanEval.candidate(\"abcd\")\n assert false == HumanEval.candidate(\"aabb\")\n assert true == HumanEval.candidate(\"adb\")\n assert false == HumanEval.candidate(\"xyy\")\n assert true == HumanEval.candidate(\"iopaxpoi\")\n assert false == HumanEval.candidate(\"iopaxioi\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_81_numerical_letter_grade", "language": "elixir", "prompt": "# It is the last week of the semester and the teacher has to give the grades\n# to students. The teacher has been making her own algorithm for grading.\n# The only problem is, she has lost the code she used for grading.\n# She has given you a list of GPAs for some students and you have to write \n# a function that can output a list of letter grades using the following table:\n# GPA | Letter grade\n# 4.0 A+\n# > 3.7 A \n# > 3.3 A- \n# > 3.0 B+\n# > 2.7 B \n# > 2.3 B-\n# > 2.0 C+\n# > 1.7 C\n# > 1.3 C-\n# > 1.0 D+ \n# > 0.7 D \n# > 0.0 D-\n# 0.0 E\n# Example:\n# grade_equation([4.0, 3, 1.7, 2, 3.5]) ==> ['A+', 'B', 'C-', 'C', 'A-']\n\ndefmodule HumanEval do\n def candidate(grades), do: numerical_letter_grade(grades)\n def numerical_letter_grade(grades) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_81_numerical_letter_grade.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'numerical_letter_grade' do\n assert [\"A+\", \"B\", \"C-\", \"C\", \"A-\"] == HumanEval.candidate([4.0, 3, 1.7, 2, 3.5])\n assert [\"D+\"] == HumanEval.candidate([1.2])\n assert [\"D-\"] == HumanEval.candidate([0.5])\n assert [\"E\"] == HumanEval.candidate([0.0])\n assert [\"D\", \"D-\", \"C-\", \"B\", \"B+\"] == HumanEval.candidate([1.0, 0.3, 1.5, 2.8, 3.3])\n assert [\"E\", \"D-\"] == HumanEval.candidate([0.0, 0.7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_82_prime_length", "language": "elixir", "prompt": "# Write a function that takes a string and returns True if the string\n# length is a prime number or False otherwise\n# Examples\n# prime_length('Hello') == True\n# prime_length('abcdcba') == True\n# prime_length('kittens') == True\n# prime_length('orange') == False\n\ndefmodule HumanEval do\n def candidate(string), do: prime_length(string)\n def prime_length(string) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_82_prime_length.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'prime_length' do\n assert true == HumanEval.candidate(\"Hello\")\n assert true == HumanEval.candidate(\"abcdcba\")\n assert true == HumanEval.candidate(\"kittens\")\n assert false == HumanEval.candidate(\"orange\")\n assert true == HumanEval.candidate(\"wow\")\n assert true == HumanEval.candidate(\"world\")\n assert true == HumanEval.candidate(\"MadaM\")\n assert true == HumanEval.candidate(\"Wow\")\n assert false == HumanEval.candidate(\"\")\n assert true == HumanEval.candidate(\"HI\")\n assert true == HumanEval.candidate(\"go\")\n assert false == HumanEval.candidate(\"gogo\")\n assert false == HumanEval.candidate(\"aaaaaaaaaaaaaaa\")\n assert true == HumanEval.candidate(\"Madam\")\n assert false == HumanEval.candidate(\"M\")\n assert false == HumanEval.candidate(\"0\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_83_starts_one_ends", "language": "elixir", "prompt": "# Given a positive integer n, return the count of the numbers of n-digit\n# positive integers that start or end with 1.\n\ndefmodule HumanEval do\n def candidate(n), do: starts_one_ends(n)\n def starts_one_ends(n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_83_starts_one_ends.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'starts_one_ends' do\n assert 1 == HumanEval.candidate(1)\n assert 18 == HumanEval.candidate(2)\n assert 180 == HumanEval.candidate(3)\n assert 1800 == HumanEval.candidate(4)\n assert 18000 == HumanEval.candidate(5)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_84_solve", "language": "elixir", "prompt": "# Given a positive integer N, return the total sum of its digits in binary.\n# Example\n# For N = 1000, the sum of digits will be 1 the output should be \"1\".\n# For N = 150, the sum of digits will be 6 the output should be \"110\".\n# For N = 147, the sum of digits will be 12 the output should be \"1100\".\n# Variables:\n# @N integer\n# Constraints: 0 \u2264 N \u2264 10000.\n# Output:\n# a string of binary number\n\ndefmodule HumanEval do\n def candidate(N), do: solve(N)\n def solve(N) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_84_solve.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'solve' do\n assert \"1\" == HumanEval.candidate(1000)\n assert \"110\" == HumanEval.candidate(150)\n assert \"1100\" == HumanEval.candidate(147)\n assert \"1001\" == HumanEval.candidate(333)\n assert \"10010\" == HumanEval.candidate(963)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_85_add", "language": "elixir", "prompt": "# Given a non-empty list of integers lst. add the even elements that are at odd indices..\n# Examples:\n# add([4, 2, 6, 7]) ==> 2\n\ndefmodule HumanEval do\n def candidate(lst), do: add(lst)\n def add(lst) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_85_add.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'add' do\n assert 88 == HumanEval.candidate([4, 88])\n assert 122 == HumanEval.candidate([4, 5, 6, 7, 2, 122])\n assert 0 == HumanEval.candidate([4, 0, 6, 7])\n assert 12 == HumanEval.candidate([4, 4, 6, 8])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_86_anti_shuffle", "language": "elixir", "prompt": "# Write a function that takes a string and returns an ordered version of it.\n# Ordered version of string, is a string where all words (separated by space)\n# are replaced by a new word where all the characters arranged in\n# ascending order based on ascii value.\n# Note: You should keep the order of words and blank spaces in the sentence.\n# For example:\n# anti_shuffle('Hi') returns 'Hi'\n# anti_shuffle('hello') returns 'ehllo'\n# anti_shuffle('Hello World!!!') returns 'Hello !!!Wdlor'\n\ndefmodule HumanEval do\n def candidate(s), do: anti_shuffle(s)\n def anti_shuffle(s) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_86_anti_shuffle.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'anti_shuffle' do\n assert \"Hi\" == HumanEval.candidate(\"Hi\")\n assert \"ehllo\" == HumanEval.candidate(\"hello\")\n assert \"bemnru\" == HumanEval.candidate(\"number\")\n assert \"abcd\" == HumanEval.candidate(\"abcd\")\n assert \"Hello !!!Wdlor\" == HumanEval.candidate(\"Hello World!!!\")\n assert \"\" == HumanEval.candidate(\"\")\n assert \".Hi My aemn is Meirst .Rboot How aer ?ouy\" == HumanEval.candidate(\"Hi. My name is Mister Robot. How are you?\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_87_get_row", "language": "elixir", "prompt": "# You are given a 2 dimensional data, as a nested lists,\n# which is similar to matrix, however, unlike matrices,\n# each row may contain a different number of columns.\n# Given lst, and integer x, find integers x in the list,\n# and return list of tuples, [(x1, y1), (x2, y2) ...] such that\n# each tuple is a coordinate - (row, columns), starting with 0.\n# Sort coordinates initially by rows in ascending order.\n# Also, sort coordinates of the row by columns in descending order.\n# Examples:\n# get_row([\n# [1,2,3,4,5,6],\n# [1,2,3,4,1,6],\n# [1,2,3,4,5,1]\n# ], 1) == [(0, 0), (1, 4), (1, 0), (2, 5), (2, 0)]\n# get_row([], 1) == []\n# get_row([[], [1], [1, 2, 3]], 3) == [(2, 2)]\n\ndefmodule HumanEval do\n def candidate(lst, x), do: get_row(lst, x)\n def get_row(lst, x) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_87_get_row.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'get_row' do\n assert [{0, 0}, {1, 4}, {1, 0}, {2, 5}, {2, 0}] == HumanEval.candidate([[1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 1, 6], [1, 2, 3, 4, 5, 1]], 1)\n assert [{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}] == HumanEval.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], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6]], 2)\n assert [{0, 0}, {1, 0}, {2, 1}, {2, 0}, {3, 2}, {3, 0}, {4, 3}, {4, 0}, {5, 4}, {5, 0}, {6, 5}, {6, 0}] == HumanEval.candidate([[1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6], [1, 1, 3, 4, 5, 6], [1, 2, 1, 4, 5, 6], [1, 2, 3, 1, 5, 6], [1, 2, 3, 4, 1, 6], [1, 2, 3, 4, 5, 1]], 1)\n assert [] == HumanEval.candidate([], 1)\n assert [] == HumanEval.candidate([[1]], 2)\n assert [{2, 2}] == HumanEval.candidate([[], [1], [1, 2, 3]], 3)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_88_sort_array", "language": "elixir", "prompt": "# Given an array of non-negative integers, return a copy of the given array after sorting,\n# you will sort the given array in ascending order if the sum( first index value, last index value) is odd,\n# or sort it in descending order if the sum( first index value, last index value) is even.\n# Note:\n# * don't change the given array.\n# Examples:\n# * sort_array([]) => []\n# * sort_array([5]) => [5]\n# * sort_array([2, 4, 3, 0, 1, 5]) => [0, 1, 2, 3, 4, 5]\n# * sort_array([2, 4, 3, 0, 1, 5, 6]) => [6, 5, 4, 3, 2, 1, 0]\n\ndefmodule HumanEval do\n def candidate(array), do: sort_array(array)\n def sort_array(array) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_88_sort_array.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sort_array' do\n assert [] == HumanEval.candidate([])\n assert [5] == HumanEval.candidate([5])\n assert [0, 1, 2, 3, 4, 5] == HumanEval.candidate([2, 4, 3, 0, 1, 5])\n assert [6, 5, 4, 3, 2, 1, 0] == HumanEval.candidate([2, 4, 3, 0, 1, 5, 6])\n assert [1, 2] == HumanEval.candidate([2, 1])\n assert [0, 11, 15, 32, 42, 87] == HumanEval.candidate([15, 42, 87, 32, 11, 0])\n assert [23, 21, 14, 11] == HumanEval.candidate([21, 14, 23, 11])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_89_encrypt", "language": "elixir", "prompt": "# Create a function encrypt that takes a string as an argument and\n# returns a string encrypted with the alphabet being rotated. \n# The alphabet should be rotated in a manner such that the letters \n# shift down by two multiplied to two places.\n# For example:\n# encrypt('hi') returns 'lm'\n# encrypt('asdfghjkl') returns 'ewhjklnop'\n# encrypt('gf') returns 'kj'\n# encrypt('et') returns 'ix'\n\ndefmodule HumanEval do\n def candidate(s), do: encrypt(s)\n def encrypt(s) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_89_encrypt.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'encrypt' do\n assert \"lm\" == HumanEval.candidate(\"hi\")\n assert \"ewhjklnop\" == HumanEval.candidate(\"asdfghjkl\")\n assert \"kj\" == HumanEval.candidate(\"gf\")\n assert \"ix\" == HumanEval.candidate(\"et\")\n assert \"jeiajeaijeiak\" == HumanEval.candidate(\"faewfawefaewg\")\n assert \"lippsqcjvmirh\" == HumanEval.candidate(\"hellomyfriend\")\n assert \"hbdhpqrmpjylqmpyjlpmlyjrqpmqryjlpmqryjljygyjl\" == HumanEval.candidate(\"dxzdlmnilfuhmilufhlihufnmlimnufhlimnufhfucufh\")\n assert \"e\" == HumanEval.candidate(\"a\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_8_sum_product", "language": "elixir", "prompt": "# For a given list of integers, return a tuple consisting of a sum and a product of all the integers in a list.\n# Empty sum should be equal to 0 and empty product should be equal to 1.\n# >>> sum_product([])\n# (0, 1)\n# >>> sum_product([1, 2, 3, 4])\n# (10, 24)\n\ndefmodule HumanEval do\n def candidate(numbers), do: sum_product(numbers)\n def sum_product(numbers) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_8_sum_product.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sum_product' do\n assert {0, 1} == HumanEval.candidate([])\n assert {3, 1} == HumanEval.candidate([1, 1, 1])\n assert {100, 0} == HumanEval.candidate([100, 0])\n assert {15, 105} == HumanEval.candidate([3, 5, 7])\n assert {10, 10} == HumanEval.candidate([10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_90_next_smallest", "language": "elixir", "prompt": "# You are given a list of integers.\n# Write a function next_smallest() that returns the 2nd smallest element of the list.\n# Return None if there is no such element.\n# next_smallest([1, 2, 3, 4, 5]) == 2\n# next_smallest([5, 1, 4, 3, 2]) == 2\n# next_smallest([]) == None\n# next_smallest([1, 1]) == None\n\ndefmodule HumanEval do\n def candidate(lst), do: next_smallest(lst)\n def next_smallest(lst) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_90_next_smallest.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'next_smallest' do\n assert 2 == HumanEval.candidate([1, 2, 3, 4, 5])\n assert 2 == HumanEval.candidate([5, 1, 4, 3, 2])\n assert nil == HumanEval.candidate([])\n assert nil == HumanEval.candidate([1, 1])\n assert 1 == HumanEval.candidate([1, 1, 1, 1, 0])\n assert nil == HumanEval.candidate([1, 1])\n assert -35 == HumanEval.candidate([-35, 34, 12, -45])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_91_is_bored", "language": "elixir", "prompt": "# You'll be given a string of words, and your task is to count the number\n# of boredoms. A boredom is a sentence that starts with the word \"I\".\n# Sentences are delimited by '.', '?' or '!'.\n# For example:\n# >>> is_bored(\"Hello world\")\n# 0\n# >>> is_bored(\"The sky is blue. The sun is shining. I love this weather\")\n# 1\n\ndefmodule HumanEval do\n def candidate(S), do: is_bored(S)\n def is_bored(S) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_91_is_bored.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_bored' do\n assert 0 == HumanEval.candidate(\"Hello world\")\n assert 0 == HumanEval.candidate(\"Is the sky blue?\")\n assert 1 == HumanEval.candidate(\"I love It !\")\n assert 0 == HumanEval.candidate(\"bIt\")\n assert 2 == HumanEval.candidate(\"I feel good today. I will be productive. will kill It\")\n assert 0 == HumanEval.candidate(\"You and I are going for a walk\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_92_any_int", "language": "elixir", "prompt": "# Create a function that takes 3 numbers.\n# Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.\n# Returns false in any other cases.\n# Examples\n# any_int(5, 2, 7) \u279e True\n# any_int(3, 2, 2) \u279e False\n# any_int(3, -2, 1) \u279e True\n# any_int(3.6, -2.2, 2) \u279e False\n\ndefmodule HumanEval do\n def candidate(x, y, z), do: any_int(x, y, z)\n def any_int(x, y, z) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_92_any_int.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'any_int' do\n assert true == HumanEval.candidate(2, 3, 1)\n assert false == HumanEval.candidate(2.5, 2, 3)\n assert false == HumanEval.candidate(1.5, 5, 3.5)\n assert false == HumanEval.candidate(2, 6, 2)\n assert true == HumanEval.candidate(4, 2, 2)\n assert false == HumanEval.candidate(2.2, 2.2, 2.2)\n assert true == HumanEval.candidate(-4, 6, 2)\n assert true == HumanEval.candidate(2, 1, 1)\n assert true == HumanEval.candidate(3, 4, 7)\n assert false == HumanEval.candidate(3.0, 4, 7)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_93_encode", "language": "elixir", "prompt": "# Write a function that takes a message, and encodes in such a \n# way that it swaps case of all letters, replaces all vowels in \n# the message with the letter that appears 2 places ahead of that \n# vowel in the english alphabet. \n# Assume only letters. \n# Examples:\n# >>> encode('test')\n# 'TGST'\n# >>> encode('This is a message')\n# 'tHKS KS C MGSSCGG'\n\ndefmodule HumanEval do\n def candidate(message), do: encode(message)\n def encode(message) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_93_encode.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'encode' do\n assert \"tgst\" == HumanEval.candidate(\"TEST\")\n assert \"mWDCSKR\" == HumanEval.candidate(\"Mudasir\")\n assert \"ygs\" == HumanEval.candidate(\"YES\")\n assert \"tHKS KS C MGSSCGG\" == HumanEval.candidate(\"This is a message\")\n assert \"k dQnT kNqW wHcT Tq wRkTg\" == HumanEval.candidate(\"I DoNt KnOw WhAt tO WrItE\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_94_skjkasdkd", "language": "elixir", "prompt": "# You are given a list of integers.\n# You need to find the largest prime value and return the sum of its digits.\n# Examples:\n# For lst = [0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3] the output should be 10\n# For lst = [1,0,1,8,2,4597,2,1,3,40,1,2,1,2,4,2,5,1] the output should be 25\n# For lst = [1,3,1,32,5107,34,83278,109,163,23,2323,32,30,1,9,3] the output should be 13\n# For lst = [0,724,32,71,99,32,6,0,5,91,83,0,5,6] the output should be 11\n# For lst = [0,81,12,3,1,21] the output should be 3\n# For lst = [0,8,1,2,1,7] the output should be 7\n\ndefmodule HumanEval do\n def candidate(lst), do: skjkasdkd(lst)\n def skjkasdkd(lst) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_94_skjkasdkd.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'skjkasdkd' do\n assert 10 == HumanEval.candidate([0, 3, 2, 1, 3, 5, 7, 4, 5, 5, 5, 2, 181, 32, 4, 32, 3, 2, 32, 324, 4, 3])\n assert 25 == HumanEval.candidate([1, 0, 1, 8, 2, 4597, 2, 1, 3, 40, 1, 2, 1, 2, 4, 2, 5, 1])\n assert 13 == HumanEval.candidate([1, 3, 1, 32, 5107, 34, 83278, 109, 163, 23, 2323, 32, 30, 1, 9, 3])\n assert 11 == HumanEval.candidate([0, 724, 32, 71, 99, 32, 6, 0, 5, 91, 83, 0, 5, 6])\n assert 3 == HumanEval.candidate([0, 81, 12, 3, 1, 21])\n assert 7 == HumanEval.candidate([0, 8, 1, 2, 1, 7])\n assert 19 == HumanEval.candidate([8191])\n assert 19 == HumanEval.candidate([8191, 123456, 127, 7])\n assert 10 == HumanEval.candidate([127, 97, 8192])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_95_check_dict_case", "language": "elixir", "prompt": "# Given a dictionary, return True if all keys are strings in lower \n# case or all keys are strings in upper case, else return False.\n# The function should return False is the given dictionary is empty.\n# Examples:\n# check_dict_case({\"a\":\"apple\", \"b\":\"banana\"}) should return True.\n# check_dict_case({\"a\":\"apple\", \"A\":\"banana\", \"B\":\"banana\"}) should return False.\n# check_dict_case({\"a\":\"apple\", \"8\":\"banana\", \"a\":\"apple\"}) should return False.\n# check_dict_case({\"Name\":\"John\", \"Age\":\"36\", \"City\":\"Houston\"}) should return False.\n# check_dict_case({\"STATE\":\"NC\", \"ZIP\":\"12345\" }) should return True.\n\ndefmodule HumanEval do\n def candidate(dict), do: check_dict_case(dict)\n def check_dict_case(dict) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_95_check_dict_case.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'check_dict_case' do\n assert true == HumanEval.candidate(%{\"p\" => \"pineapple\", \"b\" => \"banana\"})\n assert false == HumanEval.candidate(%{\"p\" => \"pineapple\", \"A\" => \"banana\", \"B\" => \"banana\"})\n assert false == HumanEval.candidate(%{\"p\" => \"pineapple\", \"5\" => \"banana\", \"a\" => \"apple\"})\n assert false == HumanEval.candidate(%{\"Name\" => \"John\", \"Age\" => \"36\", \"City\" => \"Houston\"})\n assert true == HumanEval.candidate(%{\"STATE\" => \"NC\", \"ZIP\" => \"12345\"})\n assert true == HumanEval.candidate(%{\"fruit\" => \"Orange\", \"taste\" => \"Sweet\"})\n assert false == HumanEval.candidate(%{})\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_96_count_up_to", "language": "elixir", "prompt": "# Implement a function that takes an non-negative integer and returns an array of the first n\n# integers that are prime numbers and less than n.\n# for example:\n# count_up_to(5) => [2,3]\n# count_up_to(11) => [2,3,5,7]\n# count_up_to(0) => []\n# count_up_to(20) => [2,3,5,7,11,13,17,19]\n# count_up_to(1) => []\n# count_up_to(18) => [2,3,5,7,11,13,17]\n\ndefmodule HumanEval do\n def candidate(n), do: count_up_to(n)\n def count_up_to(n) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_96_count_up_to.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'count_up_to' do\n assert [2, 3] == HumanEval.candidate(5)\n assert [2, 3, 5] == HumanEval.candidate(6)\n assert [2, 3, 5] == HumanEval.candidate(7)\n assert [2, 3, 5, 7] == HumanEval.candidate(10)\n assert [] == HumanEval.candidate(0)\n assert [2, 3, 5, 7, 11, 13, 17, 19] == HumanEval.candidate(22)\n assert [] == HumanEval.candidate(1)\n assert [2, 3, 5, 7, 11, 13, 17] == HumanEval.candidate(18)\n assert [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43] == HumanEval.candidate(47)\n assert [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97] == HumanEval.candidate(101)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_97_multiply", "language": "elixir", "prompt": "# Complete the function that takes two integers and returns \n# the product of their unit digits.\n# Assume the input is always valid.\n# Examples:\n# multiply(148, 412) should return 16.\n# multiply(19, 28) should return 72.\n# multiply(2020, 1851) should return 0.\n# multiply(14,-15) should return 20.\n\ndefmodule HumanEval do\n def candidate(a, b), do: multiply(a, b)\n def multiply(a, b) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_97_multiply.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'multiply' do\n assert 16 == HumanEval.candidate(148, 412)\n assert 72 == HumanEval.candidate(19, 28)\n assert 0 == HumanEval.candidate(2020, 1851)\n assert 20 == HumanEval.candidate(14, -15)\n assert 42 == HumanEval.candidate(76, 67)\n assert 49 == HumanEval.candidate(17, 27)\n assert 0 == HumanEval.candidate(0, 1)\n assert 0 == HumanEval.candidate(0, 0)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_98_count_upper", "language": "elixir", "prompt": "# Given a string s, count the number of uppercase vowels in even indices.\n# For example:\n# count_upper('aBCdEf') returns 1\n# count_upper('abcdefg') returns 0\n# count_upper('dBBE') returns 0\n\ndefmodule HumanEval do\n def candidate(s), do: count_upper(s)\n def count_upper(s) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_98_count_upper.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'count_upper' do\n assert 1 == HumanEval.candidate(\"aBCdEf\")\n assert 0 == HumanEval.candidate(\"abcdefg\")\n assert 0 == HumanEval.candidate(\"dBBE\")\n assert 0 == HumanEval.candidate(\"B\")\n assert 1 == HumanEval.candidate(\"U\")\n assert 0 == HumanEval.candidate(\"\")\n assert 2 == HumanEval.candidate(\"EEEE\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_99_closest_integer", "language": "elixir", "prompt": "# Create a function that takes a value (string) representing a number\n# and returns the closest integer to it. If the number is equidistant\n# from two integers, round it away from zero.\n# Examples\n# >>> closest_integer(\"10\")\n# 10\n# >>> closest_integer(\"15.3\")\n# 15\n# Note:\n# Rounding away from zero means that if the given number is equidistant\n# from two integers, the one you should return is the one that is the\n# farthest from zero. For example closest_integer(\"14.5\") should\n# return 15 and closest_integer(\"-14.5\") should return -15.\n\ndefmodule HumanEval do\n def candidate(value), do: closest_integer(value)\n def closest_integer(value) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_99_closest_integer.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'closest_integer' do\n assert 10 == HumanEval.candidate(\"10\")\n assert 15 == HumanEval.candidate(\"14.5\")\n assert -16 == HumanEval.candidate(\"-15.5\")\n assert 15 == HumanEval.candidate(\"15.3\")\n assert 0 == HumanEval.candidate(\"0\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_9_rolling_max", "language": "elixir", "prompt": "# From a given list of integers, generate a list of rolling maximum element found until given moment\n# in the sequence.\n# >>> rolling_max([1, 2, 3, 2, 3, 4, 2])\n# [1, 2, 3, 3, 3, 4, 4]\n\ndefmodule HumanEval do\n def candidate(numbers), do: rolling_max(numbers)\n def rolling_max(numbers) do\n ", "doctests": "keep", "original": "/home/MultiPL-E/datasets/../datasets/originals/HumanEval_9_rolling_max.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'rolling_max' do\n assert [] == HumanEval.candidate([])\n assert [1, 2, 3, 4] == HumanEval.candidate([1, 2, 3, 4])\n assert [4, 4, 4, 4] == HumanEval.candidate([4, 3, 2, 1])\n assert [3, 3, 3, 100, 100] == HumanEval.candidate([3, 2, 3, 100, 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} diff --git a/prompts/humaneval-elixir-remove.jsonl b/prompts/humaneval-elixir-remove.jsonl new file mode 100644 index 0000000000..5033f5a444 --- /dev/null +++ b/prompts/humaneval-elixir-remove.jsonl @@ -0,0 +1,158 @@ +{"name": "HumanEval_0_has_close_elements", "language": "elixir", "prompt": "# Check if in given list of numbers, are any two numbers closer to each other than\n# given threshold.\n\ndefmodule HumanEval do\n def candidate(numbers, threshold), do: has_close_elements(numbers, threshold)\n def has_close_elements(numbers, threshold) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_0_has_close_elements.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'has_close_elements' do\n assert true == HumanEval.candidate([1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3)\n assert false == HumanEval.candidate([1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.05)\n assert true == HumanEval.candidate([1.0, 2.0, 5.9, 4.0, 5.0], 0.95)\n assert false == HumanEval.candidate([1.0, 2.0, 5.9, 4.0, 5.0], 0.8)\n assert true == HumanEval.candidate([1.0, 2.0, 3.0, 4.0, 5.0, 2.0], 0.1)\n assert true == HumanEval.candidate([1.1, 2.2, 3.1, 4.1, 5.1], 1.0)\n assert false == HumanEval.candidate([1.1, 2.2, 3.1, 4.1, 5.1], 0.5)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_100_make_a_pile", "language": "elixir", "prompt": "# Given a positive integer n, you have to make a pile of n levels of stones.\n# The first level has n stones.\n# The number of stones in the next level is:\n# - the next odd number if n is odd.\n# - the next even number if n is even.\n# Return the number of stones in each level in a list, where element at index\n# i represents the number of stones in the level (i+1).\n# Examples:\n\ndefmodule HumanEval do\n def candidate(n), do: make_a_pile(n)\n def make_a_pile(n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_100_make_a_pile.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'make_a_pile' do\n assert [3, 5, 7] == HumanEval.candidate(3)\n assert [4, 6, 8, 10] == HumanEval.candidate(4)\n assert [5, 7, 9, 11, 13] == HumanEval.candidate(5)\n assert [6, 8, 10, 12, 14, 16] == HumanEval.candidate(6)\n assert [8, 10, 12, 14, 16, 18, 20, 22] == HumanEval.candidate(8)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_101_words_string", "language": "elixir", "prompt": "# You will be given a string of words separated by commas or spaces. Your task is\n# to split the string into words and return an array of the words.\n# For example:\n\ndefmodule HumanEval do\n def candidate(s), do: words_string(s)\n def words_string(s) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_101_words_string.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'words_string' do\n assert [\"Hi\", \"my\", \"name\", \"is\", \"John\"] == HumanEval.candidate(\"Hi, my name is John\")\n assert [\"One\", \"two\", \"three\", \"four\", \"five\", \"six\"] == HumanEval.candidate(\"One, two, three, four, five, six\")\n assert [\"Hi\", \"my\", \"name\"] == HumanEval.candidate(\"Hi, my name\")\n assert [\"One\", \"two\", \"three\", \"four\", \"five\", \"six\"] == HumanEval.candidate(\"One,, two, three, four, five, six,\")\n assert [] == HumanEval.candidate(\"\")\n assert [\"ahmed\", \"gamal\"] == HumanEval.candidate(\"ahmed , gamal\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_102_choose_num", "language": "elixir", "prompt": "# This function takes two positive numbers x and y and returns the\n# biggest even integer number that is in the range [x, y] inclusive. If \n# there's no such number, then the function should return -1.\n# For example:\n\ndefmodule HumanEval do\n def candidate(x, y), do: choose_num(x, y)\n def choose_num(x, y) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_102_choose_num.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'choose_num' do\n assert 14 == HumanEval.candidate(12, 15)\n assert -1 == HumanEval.candidate(13, 12)\n assert 12354 == HumanEval.candidate(33, 12354)\n assert -1 == HumanEval.candidate(5234, 5233)\n assert 28 == HumanEval.candidate(6, 29)\n assert -1 == HumanEval.candidate(27, 10)\n assert -1 == HumanEval.candidate(7, 7)\n assert 546 == HumanEval.candidate(546, 546)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_103_rounded_avg", "language": "elixir", "prompt": "# You are given two positive integers n and m, and your task is to compute the\n# average of the integers from n through m (including n and m). \n# Round the answer to the nearest integer and convert that to binary.\n# If n is greater than m, return -1.\n# Example:\n\ndefmodule HumanEval do\n def candidate(n, m), do: rounded_avg(n, m)\n def rounded_avg(n, m) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_103_rounded_avg.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'rounded_avg' do\n assert \"0b11\" == HumanEval.candidate(1, 5)\n assert \"0b1010\" == HumanEval.candidate(7, 13)\n assert \"0b1111001010\" == HumanEval.candidate(964, 977)\n assert \"0b1111100100\" == HumanEval.candidate(996, 997)\n assert \"0b1011000010\" == HumanEval.candidate(560, 851)\n assert \"0b101101110\" == HumanEval.candidate(185, 546)\n assert \"0b110101101\" == HumanEval.candidate(362, 496)\n assert \"0b1001110010\" == HumanEval.candidate(350, 902)\n assert \"0b11010111\" == HumanEval.candidate(197, 233)\n assert -1 == HumanEval.candidate(7, 5)\n assert -1 == HumanEval.candidate(5, 1)\n assert \"0b101\" == HumanEval.candidate(5, 5)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_104_unique_digits", "language": "elixir", "prompt": "# Given a list of positive integers x. return a sorted list of all \n# elements that hasn't any even digit.\n# Note: Returned list should be sorted in increasing order.\n# For example:\n\ndefmodule HumanEval do\n def candidate(x), do: unique_digits(x)\n def unique_digits(x) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_104_unique_digits.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'unique_digits' do\n assert [1, 15, 33] == HumanEval.candidate([15, 33, 1422, 1])\n assert [] == HumanEval.candidate([152, 323, 1422, 10])\n assert [111, 151] == HumanEval.candidate([12345, 2033, 111, 151])\n assert [31, 135] == HumanEval.candidate([135, 103, 31])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_105_by_length", "language": "elixir", "prompt": "# Given an array of integers, sort the integers that are between 1 and 9 inclusive,\n# reverse the resulting array, and then replace each digit by its corresponding name from\n# \"One\", \"Two\", \"Three\", \"Four\", \"Five\", \"Six\", \"Seven\", \"Eight\", \"Nine\".\n# For example:\n# If the array is empty, return an empty array:\n# If the array has any strange number ignore it:\n\ndefmodule HumanEval do\n def candidate(arr), do: by_length(arr)\n def by_length(arr) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_105_by_length.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'by_length' do\n assert [\"Eight\", \"Five\", \"Four\", \"Three\", \"Two\", \"Two\", \"One\", \"One\"] == HumanEval.candidate([2, 1, 1, 4, 5, 8, 2, 3])\n assert [] == HumanEval.candidate([])\n assert [\"One\"] == HumanEval.candidate([1, -1, 55])\n assert [\"Three\", \"Two\", \"One\"] == HumanEval.candidate([1, -1, 3, 2])\n assert [\"Nine\", \"Eight\", \"Four\"] == HumanEval.candidate([9, 4, 8])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_106_f", "language": "elixir", "prompt": "# Implement the function f that takes n as a parameter,\n# and returns a list of size n, such that the value of the element at index i is the factorial of i if i is even\n# or the sum of numbers from 1 to i otherwise.\n# i starts from 1.\n# the factorial of i is the multiplication of the numbers from 1 to i (1 * 2 * ... * i).\n# Example:\n\ndefmodule HumanEval do\n def candidate(n), do: f(n)\n def f(n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_106_f.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'f' do\n assert [1, 2, 6, 24, 15] == HumanEval.candidate(5)\n assert [1, 2, 6, 24, 15, 720, 28] == HumanEval.candidate(7)\n assert [1] == HumanEval.candidate(1)\n assert [1, 2, 6] == HumanEval.candidate(3)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_107_even_odd_palindrome", "language": "elixir", "prompt": "# Given a positive integer n, return a tuple that has the number of even and odd\n# integer palindromes that fall within the range(1, n), inclusive.\n# Example 1:\n# Explanation:\n# Integer palindrome are 1, 2, 3. one of them is even, and two of them are odd.\n# Example 2:\n# Explanation:\n# Integer palindrome are 1, 2, 3, 4, 5, 6, 7, 8, 9, 11. four of them are even, and 6 of them are odd.\n# Note:\n# 1. 1 <= n <= 10^3\n# 2. returned tuple has the number of even and odd integer palindromes respectively.\n\ndefmodule HumanEval do\n def candidate(n), do: even_odd_palindrome(n)\n def even_odd_palindrome(n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_107_even_odd_palindrome.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'even_odd_palindrome' do\n assert {8, 13} == HumanEval.candidate(123)\n assert {4, 6} == HumanEval.candidate(12)\n assert {1, 2} == HumanEval.candidate(3)\n assert {6, 8} == HumanEval.candidate(63)\n assert {5, 6} == HumanEval.candidate(25)\n assert {4, 6} == HumanEval.candidate(19)\n assert {4, 5} == HumanEval.candidate(9)\n assert {0, 1} == HumanEval.candidate(1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_108_count_nums", "language": "elixir", "prompt": "# Write a function count_nums which takes an array of integers and returns\n# the number of elements which has a sum of digits > 0.\n# If a number is negative, then its first signed digit will be negative:\n# e.g. -123 has signed digits -1, 2, and 3.\n\ndefmodule HumanEval do\n def candidate(arr), do: count_nums(arr)\n def count_nums(arr) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_108_count_nums.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'count_nums' do\n assert 0 == HumanEval.candidate([])\n assert 0 == HumanEval.candidate([-1, -2, 0])\n assert 6 == HumanEval.candidate([1, 1, 2, -2, 3, 4, 5])\n assert 5 == HumanEval.candidate([1, 6, 9, -6, 0, 1, 5])\n assert 4 == HumanEval.candidate([1, 100, 98, -7, 1, -1])\n assert 5 == HumanEval.candidate([12, 23, 34, -45, -56, 0])\n assert 1 == HumanEval.candidate([0, 1])\n assert 1 == HumanEval.candidate([1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_109_move_one_ball", "language": "elixir", "prompt": "# We have an array 'arr' of N integers arr[1], arr[2], ..., arr[N].The\n# numbers in the array will be randomly ordered. Your task is to determine if\n# it is possible to get an array sorted in non-decreasing order by performing \n# the following operation on the given array:\n# You are allowed to perform right shift operation any number of times.\n# One right shift operation means shifting all elements of the array by one\n# position in the right direction. The last element of the array will be moved to\n# the starting position in the array i.e. 0th index. \n# If it is possible to obtain the sorted array by performing the above operation\n# then return True else return False.\n# If the given array is empty then return True.\n# Note: The given list is guaranteed to have unique elements.\n# For Example:\n# Explanation: By performin 2 right shift operations, non-decreasing order can\n# be achieved for the given array.\n# Explanation:It is not possible to get non-decreasing order for the given\n# array by performing any number of right shift operations.\n\ndefmodule HumanEval do\n def candidate(arr), do: move_one_ball(arr)\n def move_one_ball(arr) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_109_move_one_ball.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'move_one_ball' do\n assert true == HumanEval.candidate([3, 4, 5, 1, 2])\n assert true == HumanEval.candidate([3, 5, 10, 1, 2])\n assert false == HumanEval.candidate([4, 3, 1, 2])\n assert false == HumanEval.candidate([3, 5, 4, 1, 2])\n assert true == HumanEval.candidate([])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_10_make_palindrome", "language": "elixir", "prompt": "# Find the shortest palindrome that begins with a supplied string.\n# Algorithm idea is simple:\n# - Find the longest postfix of supplied string that is a palindrome.\n# - Append to the end of the string reverse of a string prefix that comes before the palindromic suffix.\n\ndefmodule HumanEval do\n def candidate(string), do: make_palindrome(string)\n def make_palindrome(string) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_10_make_palindrome.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'make_palindrome' do\n assert \"\" == HumanEval.candidate(\"\")\n assert \"x\" == HumanEval.candidate(\"x\")\n assert \"xyzyx\" == HumanEval.candidate(\"xyz\")\n assert \"xyx\" == HumanEval.candidate(\"xyx\")\n assert \"jerryrrej\" == HumanEval.candidate(\"jerry\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_110_exchange", "language": "elixir", "prompt": "# In this problem, you will implement a function that takes two lists of numbers,\n# and determines whether it is possible to perform an exchange of elements\n# between them to make lst1 a list of only even numbers.\n# There is no limit on the number of exchanged elements between lst1 and lst2.\n# If it is possible to exchange elements between the lst1 and lst2 to make\n# all the elements of lst1 to be even, return \"YES\".\n# Otherwise, return \"NO\".\n# For example:\n# It is assumed that the input lists will be non-empty.\n\ndefmodule HumanEval do\n def candidate(lst1, lst2), do: exchange(lst1, lst2)\n def exchange(lst1, lst2) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_110_exchange.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'exchange' do\n assert \"YES\" == HumanEval.candidate([1, 2, 3, 4], [1, 2, 3, 4])\n assert \"NO\" == HumanEval.candidate([1, 2, 3, 4], [1, 5, 3, 4])\n assert \"YES\" == HumanEval.candidate([1, 2, 3, 4], [2, 1, 4, 3])\n assert \"YES\" == HumanEval.candidate([5, 7, 3], [2, 6, 4])\n assert \"NO\" == HumanEval.candidate([5, 7, 3], [2, 6, 3])\n assert \"NO\" == HumanEval.candidate([3, 2, 6, 1, 8, 9], [3, 5, 5, 1, 1, 1])\n assert \"YES\" == HumanEval.candidate([100, 200], [200, 200])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_111_histogram", "language": "elixir", "prompt": "# Given a string representing a space separated lowercase letters, return a dictionary\n# of the letter with the most repetition and containing the corresponding count.\n# If several letters have the same occurrence, return all of them.\n# Example:\n\ndefmodule HumanEval do\n def candidate(test), do: histogram(test)\n def histogram(test) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_111_histogram.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'histogram' do\n assert %{\"a\" => 2, \"b\" => 2} == HumanEval.candidate(\"a b b a\")\n assert %{\"a\" => 2, \"b\" => 2} == HumanEval.candidate(\"a b c a b\")\n assert %{\"a\" => 1, \"b\" => 1, \"c\" => 1, \"d\" => 1, \"g\" => 1} == HumanEval.candidate(\"a b c d g\")\n assert %{\"r\" => 1, \"t\" => 1, \"g\" => 1} == HumanEval.candidate(\"r t g\")\n assert %{\"b\" => 4} == HumanEval.candidate(\"b b b b a\")\n assert %{\"r\" => 1, \"t\" => 1, \"g\" => 1} == HumanEval.candidate(\"r t g\")\n assert %{} == HumanEval.candidate(\"\")\n assert %{\"a\" => 1} == HumanEval.candidate(\"a\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_112_reverse_delete", "language": "elixir", "prompt": "# Task\n# We are given two strings s and c, you have to deleted all the characters in s that are equal to any character in c\n# then check if the result string is palindrome.\n# A string is called palindrome if it reads the same backward as forward.\n# You should return a tuple containing the result string and True/False for the check.\n# Example\n\ndefmodule HumanEval do\n def candidate(s, c), do: reverse_delete(s, c)\n def reverse_delete(s, c) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_112_reverse_delete.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'reverse_delete' do\n assert {\"bcd\", false} == HumanEval.candidate(\"abcde\", \"ae\")\n assert {\"acdef\", false} == HumanEval.candidate(\"abcdef\", \"b\")\n assert {\"cdedc\", true} == HumanEval.candidate(\"abcdedcba\", \"ab\")\n assert {\"dik\", false} == HumanEval.candidate(\"dwik\", \"w\")\n assert {\"\", true} == HumanEval.candidate(\"a\", \"a\")\n assert {\"abcdedcba\", true} == HumanEval.candidate(\"abcdedcba\", \"\")\n assert {\"abcdedcba\", true} == HumanEval.candidate(\"abcdedcba\", \"v\")\n assert {\"abba\", true} == HumanEval.candidate(\"vabba\", \"v\")\n assert {\"\", true} == HumanEval.candidate(\"mamma\", \"mia\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_113_odd_count", "language": "elixir", "prompt": "# Given a list of strings, where each string consists of only digits, return a list.\n# Each element i of the output should be \"the number of odd elements in the\n# string i of the input.\" where all the i's should be replaced by the number\n# of odd digits in the i'th string of the input.\n\ndefmodule HumanEval do\n def candidate(lst), do: odd_count(lst)\n def odd_count(lst) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_113_odd_count.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'odd_count' do\n assert [\"the number of odd elements 4n the str4ng 4 of the 4nput.\"] == HumanEval.candidate([\"1234567\"])\n assert [\"the number of odd elements 1n the str1ng 1 of the 1nput.\", \"the number of odd elements 8n the str8ng 8 of the 8nput.\"] == HumanEval.candidate([\"3\", \"11111111\"])\n assert [\"the number of odd elements 2n the str2ng 2 of the 2nput.\", \"the number of odd elements 3n the str3ng 3 of the 3nput.\", \"the number of odd elements 2n the str2ng 2 of the 2nput.\"] == HumanEval.candidate([\"271\", \"137\", \"314\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_114_minSubArraySum", "language": "elixir", "prompt": "# Given an array of integers nums, find the minimum sum of any non-empty sub-array\n# of nums.\n# Example\n\ndefmodule HumanEval do\n def candidate(nums), do: minSubArraySum(nums)\n def minSubArraySum(nums) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_114_minSubArraySum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'minSubArraySum' do\n assert 1 == HumanEval.candidate([2, 3, 4, 1, 2, 4])\n assert -6 == HumanEval.candidate([-1, -2, -3])\n assert -14 == HumanEval.candidate([-1, -2, -3, 2, -10])\n assert -9999999999999999 == HumanEval.candidate([-9999999999999999])\n assert 0 == HumanEval.candidate([0, 10, 20, 1000000])\n assert -6 == HumanEval.candidate([-1, -2, -3, 10, -5])\n assert -6 == HumanEval.candidate([100, -1, -2, -3, 10, -5])\n assert 3 == HumanEval.candidate([10, 11, 13, 8, 3, 4])\n assert -33 == HumanEval.candidate([100, -33, 32, -1, 0, -2])\n assert -10 == HumanEval.candidate([-10])\n assert 7 == HumanEval.candidate([7])\n assert -1 == HumanEval.candidate([1, -1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_115_max_fill", "language": "elixir", "prompt": "# You are given a rectangular grid of wells. Each row represents a single well,\n# and each 1 in a row represents a single unit of water.\n# Each well has a corresponding bucket that can be used to extract water from it, \n# and all buckets have the same capacity.\n# Your task is to use the buckets to empty the wells.\n# Output the number of times you need to lower the buckets.\n# Example 1:\n# Example 2:\n# Example 3:\n# Constraints:\n# * all wells have the same length\n# * 1 <= grid.length <= 10^2\n# * 1 <= grid[:,1].length <= 10^2\n# * grid[i][j] -> 0 | 1\n# * 1 <= capacity <= 10\n\ndefmodule HumanEval do\n def candidate(grid, capacity), do: max_fill(grid, capacity)\n def max_fill(grid, capacity) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_115_max_fill.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'max_fill' do\n assert 6 == HumanEval.candidate([[0, 0, 1, 0], [0, 1, 0, 0], [1, 1, 1, 1]], 1)\n assert 5 == HumanEval.candidate([[0, 0, 1, 1], [0, 0, 0, 0], [1, 1, 1, 1], [0, 1, 1, 1]], 2)\n assert 0 == HumanEval.candidate([[0, 0, 0], [0, 0, 0]], 5)\n assert 4 == HumanEval.candidate([[1, 1, 1, 1], [1, 1, 1, 1]], 2)\n assert 2 == HumanEval.candidate([[1, 1, 1, 1], [1, 1, 1, 1]], 9)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_116_sort_array", "language": "elixir", "prompt": "# In this Kata, you have to sort an array of non-negative integers according to\n# number of ones in their binary representation in ascending order.\n# For similar number of ones, sort based on decimal value.\n# It must be implemented like this:\n\ndefmodule HumanEval do\n def candidate(arr), do: sort_array(arr)\n def sort_array(arr) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_116_sort_array.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sort_array' do\n assert [1, 2, 4, 3, 5] == HumanEval.candidate([1, 5, 2, 3, 4])\n assert [-4, -2, -6, -5, -3] == HumanEval.candidate([-2, -3, -4, -5, -6])\n assert [0, 1, 2, 4, 3] == HumanEval.candidate([1, 0, 2, 3, 4])\n assert [] == HumanEval.candidate([])\n assert [2, 2, 4, 4, 3, 3, 5, 5, 5, 7, 77] == HumanEval.candidate([2, 5, 77, 4, 5, 3, 5, 7, 2, 3, 4])\n assert [32, 3, 5, 6, 12, 44] == HumanEval.candidate([3, 6, 44, 12, 32, 5])\n assert [2, 4, 8, 16, 32] == HumanEval.candidate([2, 4, 8, 16, 32])\n assert [2, 4, 8, 16, 32] == HumanEval.candidate([2, 4, 8, 16, 32])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_117_select_words", "language": "elixir", "prompt": "# Given a string s and a natural number n, you have been tasked to implement \n# a function that returns a list of all words from string s that contain exactly \n# n consonants, in order these words appear in the string s.\n# If the string s is empty then the function should return an empty list.\n# Note: you may assume the input string contains only letters and spaces.\n# Examples:\n\ndefmodule HumanEval do\n def candidate(s, n), do: select_words(s, n)\n def select_words(s, n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_117_select_words.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'select_words' do\n assert [\"little\"] == HumanEval.candidate(\"Mary had a little lamb\", 4)\n assert [\"Mary\", \"lamb\"] == HumanEval.candidate(\"Mary had a little lamb\", 3)\n assert [] == HumanEval.candidate(\"simple white space\", 2)\n assert [\"world\"] == HumanEval.candidate(\"Hello world\", 4)\n assert [\"Uncle\"] == HumanEval.candidate(\"Uncle sam\", 3)\n assert [] == HumanEval.candidate(\"\", 4)\n assert [\"b\", \"c\", \"d\", \"f\"] == HumanEval.candidate(\"a b c d e f\", 1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_118_get_closest_vowel", "language": "elixir", "prompt": "# You are given a word. Your task is to find the closest vowel that stands between \n# two consonants from the right side of the word (case sensitive).\n# Vowels in the beginning and ending doesn't count. Return empty string if you didn't\n# find any vowel met the above condition. \n# You may assume that the given string contains English letter only.\n# Example:\n\ndefmodule HumanEval do\n def candidate(word), do: get_closest_vowel(word)\n def get_closest_vowel(word) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_118_get_closest_vowel.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'get_closest_vowel' do\n assert \"u\" == HumanEval.candidate(\"yogurt\")\n assert \"u\" == HumanEval.candidate(\"full\")\n assert \"\" == HumanEval.candidate(\"easy\")\n assert \"\" == HumanEval.candidate(\"eAsy\")\n assert \"\" == HumanEval.candidate(\"ali\")\n assert \"a\" == HumanEval.candidate(\"bad\")\n assert \"o\" == HumanEval.candidate(\"most\")\n assert \"\" == HumanEval.candidate(\"ab\")\n assert \"\" == HumanEval.candidate(\"ba\")\n assert \"\" == HumanEval.candidate(\"quick\")\n assert \"i\" == HumanEval.candidate(\"anime\")\n assert \"\" == HumanEval.candidate(\"Asia\")\n assert \"o\" == HumanEval.candidate(\"Above\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_119_match_parens", "language": "elixir", "prompt": "# You are given a list of two strings, both strings consist of open\n# parentheses '(' or close parentheses ')' only.\n# Your job is to check if it is possible to concatenate the two strings in\n# some order, that the resulting string will be good.\n# A string S is considered to be good if and only if all parentheses in S\n# are balanced. For example: the string '(())()' is good, while the string\n# '())' is not.\n# Return 'Yes' if there's a way to make a good string, and return 'No' otherwise.\n# Examples:\n\ndefmodule HumanEval do\n def candidate(lst), do: match_parens(lst)\n def match_parens(lst) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_119_match_parens.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'match_parens' do\n assert \"Yes\" == HumanEval.candidate([\"()(\", \")\"])\n assert \"No\" == HumanEval.candidate([\")\", \")\"])\n assert \"No\" == HumanEval.candidate([\"(()(())\", \"())())\"])\n assert \"Yes\" == HumanEval.candidate([\")())\", \"(()()(\"])\n assert \"Yes\" == HumanEval.candidate([\"(())))\", \"(()())((\"])\n assert \"No\" == HumanEval.candidate([\"()\", \"())\"])\n assert \"Yes\" == HumanEval.candidate([\"(()(\", \"()))()\"])\n assert \"No\" == HumanEval.candidate([\"((((\", \"((())\"])\n assert \"No\" == HumanEval.candidate([\")(()\", \"(()(\"])\n assert \"No\" == HumanEval.candidate([\")(\", \")(\"])\n assert \"Yes\" == HumanEval.candidate([\"(\", \")\"])\n assert \"Yes\" == HumanEval.candidate([\")\", \"(\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_11_string_xor", "language": "elixir", "prompt": "# Input are two strings a and b consisting only of 1s and 0s.\n# Perform binary XOR on these inputs and return result also as a string.\n\ndefmodule HumanEval do\n def candidate(a, b), do: string_xor(a, b)\n def string_xor(a, b) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_11_string_xor.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'string_xor' do\n assert \"010010\" == HumanEval.candidate(\"111000\", \"101010\")\n assert \"0\" == HumanEval.candidate(\"1\", \"1\")\n assert \"0101\" == HumanEval.candidate(\"0101\", \"0000\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_120_maximum", "language": "elixir", "prompt": "# Given an array arr of integers and a positive integer k, return a sorted list \n# of length k with the maximum k numbers in arr.\n# Example 1:\n# Example 2:\n# Example 3:\n# Note:\n# 1. The length of the array will be in the range of [1, 1000].\n# 2. The elements in the array will be in the range of [-1000, 1000].\n# 3. 0 <= k <= len(arr)\n\ndefmodule HumanEval do\n def candidate(arr, k), do: maximum(arr, k)\n def maximum(arr, k) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_120_maximum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'maximum' do\n assert [-4, -3, 5] == HumanEval.candidate([-3, -4, 5], 3)\n assert [4, 4] == HumanEval.candidate([4, -4, 4], 2)\n assert [2] == HumanEval.candidate([-3, 2, 1, 2, -1, -2, 1], 1)\n assert [2, 20, 123] == HumanEval.candidate([123, -123, 20, 0, 1, 2, -3], 3)\n assert [0, 1, 2, 20] == HumanEval.candidate([-123, 20, 0, 1, 2, -3], 4)\n assert [-13, -8, 0, 0, 3, 5, 15] == HumanEval.candidate([5, 15, 0, 3, -13, -8, 0], 7)\n assert [3, 5] == HumanEval.candidate([-1, 0, 2, 5, 3, -10], 2)\n assert [5] == HumanEval.candidate([1, 0, 5, -7], 1)\n assert [-4, 4] == HumanEval.candidate([4, -4], 2)\n assert [-10, 10] == HumanEval.candidate([-10, 10], 2)\n assert [] == HumanEval.candidate([1, 2, 3, -23, 243, -400, 0], 0)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_121_solution", "language": "elixir", "prompt": "# Given a non-empty list of integers, return the sum of all of the odd elements that are in even positions.\n# Examples\n\ndefmodule HumanEval do\n def candidate(lst), do: solution(lst)\n def solution(lst) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_121_solution.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'solution' do\n assert 12 == HumanEval.candidate([5, 8, 7, 1])\n assert 9 == HumanEval.candidate([3, 3, 3, 3, 3])\n assert 0 == HumanEval.candidate([30, 13, 24, 321])\n assert 5 == HumanEval.candidate([5, 9])\n assert 0 == HumanEval.candidate([2, 4, 8])\n assert 23 == HumanEval.candidate([30, 13, 23, 32])\n assert 3 == HumanEval.candidate([3, 13, 2, 9])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_122_add_elements", "language": "elixir", "prompt": "# Given a non-empty array of integers arr and an integer k, return\n# the sum of the elements with at most two digits from the first k elements of arr.\n# Example:\n# Constraints:\n# 1. 1 <= len(arr) <= 100\n# 2. 1 <= k <= len(arr)\n\ndefmodule HumanEval do\n def candidate(arr, k), do: add_elements(arr, k)\n def add_elements(arr, k) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_122_add_elements.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'add_elements' do\n assert -4 == HumanEval.candidate([1, -2, -3, 41, 57, 76, 87, 88, 99], 3)\n assert 0 == HumanEval.candidate([111, 121, 3, 4000, 5, 6], 2)\n assert 125 == HumanEval.candidate([11, 21, 3, 90, 5, 6, 7, 8, 9], 4)\n assert 24 == HumanEval.candidate([111, 21, 3, 4000, 5, 6, 7, 8, 9], 4)\n assert 1 == HumanEval.candidate([1], 1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_123_get_odd_collatz", "language": "elixir", "prompt": "# Given a positive integer n, return a sorted list that has the odd numbers in collatz sequence.\n# The Collatz conjecture is a conjecture in mathematics that concerns a sequence defined\n# as follows: start with any positive integer n. Then each term is obtained from the \n# previous term as follows: if the previous term is even, the next term is one half of \n# the previous term. If the previous term is odd, the next term is 3 times the previous\n# term plus 1. The conjecture is that no matter what value of n, the sequence will always reach 1.\n# Note: \n# 1. Collatz(1) is [1].\n# 2. returned list sorted in increasing order.\n# For example:\n# get_odd_collatz(5) returns [1, 5] # The collatz sequence for 5 is [5, 16, 8, 4, 2, 1], so the odd numbers are only 1, and 5.\n\ndefmodule HumanEval do\n def candidate(n), do: get_odd_collatz(n)\n def get_odd_collatz(n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_123_get_odd_collatz.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'get_odd_collatz' do\n assert [1, 5, 7, 11, 13, 17] == HumanEval.candidate(14)\n assert [1, 5] == HumanEval.candidate(5)\n assert [1, 3, 5] == HumanEval.candidate(12)\n assert [1] == HumanEval.candidate(1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_124_valid_date", "language": "elixir", "prompt": "# You have to write a function which validates a given date string and\n# returns True if the date is valid otherwise False.\n# The date is valid if all of the following rules are satisfied:\n# 1. The date string is not empty.\n# 2. The number of days is not less than 1 or higher than 31 days for months 1,3,5,7,8,10,12. And the number of days is not less than 1 or higher than 30 days for months 4,6,9,11. And, the number of days is not less than 1 or higher than 29 for the month 2.\n# 3. The months should not be less than 1 or higher than 12.\n# 4. The date should be in the format: mm-dd-yyyy\n\ndefmodule HumanEval do\n def candidate(date), do: valid_date(date)\n def valid_date(date) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_124_valid_date.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'valid_date' do\n assert true == HumanEval.candidate(\"03-11-2000\")\n assert false == HumanEval.candidate(\"15-01-2012\")\n assert false == HumanEval.candidate(\"04-0-2040\")\n assert true == HumanEval.candidate(\"06-04-2020\")\n assert true == HumanEval.candidate(\"01-01-2007\")\n assert false == HumanEval.candidate(\"03-32-2011\")\n assert false == HumanEval.candidate(\"\")\n assert false == HumanEval.candidate(\"04-31-3000\")\n assert true == HumanEval.candidate(\"06-06-2005\")\n assert false == HumanEval.candidate(\"21-31-2000\")\n assert true == HumanEval.candidate(\"04-12-2003\")\n assert false == HumanEval.candidate(\"04122003\")\n assert false == HumanEval.candidate(\"20030412\")\n assert false == HumanEval.candidate(\"2003-04\")\n assert false == HumanEval.candidate(\"2003-04-12\")\n assert false == HumanEval.candidate(\"04-2003\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_125_split_words", "language": "elixir", "prompt": "# Given a string of words, return a list of words split on whitespace, if no whitespaces exists in the text you\n# should split on commas ',' if no commas exists you should return the number of lower-case letters with odd order in the\n# alphabet, ord('a') = 0, ord('b') = 1, ... ord('z') = 25\n# Examples\n\ndefmodule HumanEval do\n def candidate(txt), do: split_words(txt)\n def split_words(txt) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_125_split_words.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'split_words' do\n assert [\"Hello\", \"world!\"] == HumanEval.candidate(\"Hello world!\")\n assert [\"Hello\", \"world!\"] == HumanEval.candidate(\"Hello,world!\")\n assert [\"Hello\", \"world,!\"] == HumanEval.candidate(\"Hello world,!\")\n assert [\"Hello,Hello,world\", \"!\"] == HumanEval.candidate(\"Hello,Hello,world !\")\n assert 3 == HumanEval.candidate(\"abcdef\")\n assert 2 == HumanEval.candidate(\"aaabb\")\n assert 1 == HumanEval.candidate(\"aaaBb\")\n assert 0 == HumanEval.candidate(\"\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_126_is_sorted", "language": "elixir", "prompt": "# Given a list of numbers, return whether or not they are sorted\n# in ascending order. If list has more than 1 duplicate of the same\n# number, return False. Assume no negative numbers and only integers.\n# Examples\n\ndefmodule HumanEval do\n def candidate(lst), do: is_sorted(lst)\n def is_sorted(lst) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_126_is_sorted.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_sorted' do\n assert true == HumanEval.candidate([5])\n assert true == HumanEval.candidate([1, 2, 3, 4, 5])\n assert false == HumanEval.candidate([1, 3, 2, 4, 5])\n assert true == HumanEval.candidate([1, 2, 3, 4, 5, 6])\n assert true == HumanEval.candidate([1, 2, 3, 4, 5, 6, 7])\n assert false == HumanEval.candidate([1, 3, 2, 4, 5, 6, 7])\n assert true == HumanEval.candidate([])\n assert true == HumanEval.candidate([1])\n assert false == HumanEval.candidate([3, 2, 1])\n assert false == HumanEval.candidate([1, 2, 2, 2, 3, 4])\n assert false == HumanEval.candidate([1, 2, 3, 3, 3, 4])\n assert true == HumanEval.candidate([1, 2, 2, 3, 3, 4])\n assert true == HumanEval.candidate([1, 2, 3, 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_127_intersection", "language": "elixir", "prompt": "# You are given two intervals,\n# where each interval is a pair of integers. For example, interval = (start, end) = (1, 2).\n# The given intervals are closed which means that the interval (start, end)\n# includes both start and end.\n# For each given interval, it is assumed that its start is less or equal its end.\n# Your task is to determine whether the length of intersection of these two \n# intervals is a prime number.\n# Example, the intersection of the intervals (1, 3), (2, 4) is (2, 3)\n# which its length is 1, which not a prime number.\n# If the length of the intersection is a prime number, return \"YES\",\n# otherwise, return \"NO\".\n# If the two intervals don't intersect, return \"NO\".\n# [input/output] samples:\n\ndefmodule HumanEval do\n def candidate(interval1, interval2), do: intersection(interval1, interval2)\n def intersection(interval1, interval2) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_127_intersection.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'intersection' do\n assert \"NO\" == HumanEval.candidate({1, 2}, {2, 3})\n assert \"NO\" == HumanEval.candidate({-1, 1}, {0, 4})\n assert \"YES\" == HumanEval.candidate({-3, -1}, {-5, 5})\n assert \"YES\" == HumanEval.candidate({-2, 2}, {-4, 0})\n assert \"NO\" == HumanEval.candidate({-11, 2}, {-1, -1})\n assert \"NO\" == HumanEval.candidate({1, 2}, {3, 5})\n assert \"NO\" == HumanEval.candidate({1, 2}, {1, 2})\n assert \"NO\" == HumanEval.candidate({-2, -2}, {-3, -2})\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_128_prod_signs", "language": "elixir", "prompt": "# You are given an array arr of integers and you need to return\n# sum of magnitudes of integers multiplied by product of all signs\n# of each number in the array, represented by 1, -1 or 0.\n# Note: return None for empty arr.\n# Example:\n\ndefmodule HumanEval do\n def candidate(arr), do: prod_signs(arr)\n def prod_signs(arr) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_128_prod_signs.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'prod_signs' do\n assert -9 == HumanEval.candidate([1, 2, 2, -4])\n assert 0 == HumanEval.candidate([0, 1])\n assert -10 == HumanEval.candidate([1, 1, 1, 2, 3, -1, 1])\n assert nil == HumanEval.candidate([])\n assert 20 == HumanEval.candidate([2, 4, 1, 2, -1, -1, 9])\n assert 4 == HumanEval.candidate([-1, 1, -1, 1])\n assert -4 == HumanEval.candidate([-1, 1, 1, 1])\n assert 0 == HumanEval.candidate([-1, 1, 1, 0])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_129_minPath", "language": "elixir", "prompt": "# Given a grid with N rows and N columns (N >= 2) and a positive integer k, \n# each cell of the grid contains a value. Every integer in the range [1, N * N]\n# inclusive appears exactly once on the cells of the grid.\n# You have to find the minimum path of length k in the grid. You can start\n# from any cell, and in each step you can move to any of the neighbor cells,\n# in other words, you can go to cells which share an edge with you current\n# cell.\n# Please note that a path of length k means visiting exactly k cells (not\n# necessarily distinct).\n# You CANNOT go off the grid.\n# A path A (of length k) is considered less than a path B (of length k) if\n# after making the ordered lists of the values on the cells that A and B go\n# through (let's call them lst_A and lst_B), lst_A is lexicographically less\n# than lst_B, in other words, there exist an integer index i (1 <= i <= k)\n# such that lst_A[i] < lst_B[i] and for any j (1 <= j < i) we have\n# lst_A[j] = lst_B[j].\n# It is guaranteed that the answer is unique.\n# Return an ordered list of the values on the cells that the minimum path go through.\n# Examples:\n\ndefmodule HumanEval do\n def candidate(grid, k), do: minPath(grid, k)\n def minPath(grid, k) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_129_minPath.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'minPath' do\n assert [1, 2, 1] == HumanEval.candidate([[1, 2, 3], [4, 5, 6], [7, 8, 9]], 3)\n assert [1] == HumanEval.candidate([[5, 9, 3], [4, 1, 6], [7, 8, 2]], 1)\n assert [1, 2, 1, 2] == HumanEval.candidate([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]], 4)\n assert [1, 10, 1, 10, 1, 10, 1] == HumanEval.candidate([[6, 4, 13, 10], [5, 7, 12, 1], [3, 16, 11, 15], [8, 14, 9, 2]], 7)\n assert [1, 7, 1, 7, 1] == HumanEval.candidate([[8, 14, 9, 2], [6, 4, 13, 15], [5, 7, 1, 12], [3, 10, 11, 16]], 5)\n assert [1, 6, 1, 6, 1, 6, 1, 6, 1] == HumanEval.candidate([[11, 8, 7, 2], [5, 16, 14, 4], [9, 3, 15, 6], [12, 13, 10, 1]], 9)\n assert [1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6] == HumanEval.candidate([[12, 13, 10, 1], [9, 3, 15, 6], [5, 16, 14, 4], [11, 8, 7, 2]], 12)\n assert [1, 3, 1, 3, 1, 3, 1, 3] == HumanEval.candidate([[2, 7, 4], [3, 1, 5], [6, 8, 9]], 8)\n assert [1, 5, 1, 5, 1, 5, 1, 5] == HumanEval.candidate([[6, 1, 5], [3, 8, 9], [2, 7, 4]], 8)\n assert [1, 2, 1, 2, 1, 2, 1, 2, 1, 2] == HumanEval.candidate([[1, 2], [3, 4]], 10)\n assert [1, 3, 1, 3, 1, 3, 1, 3, 1, 3] == HumanEval.candidate([[1, 3], [3, 2]], 10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_12_longest", "language": "elixir", "prompt": "# Out of list of strings, return the longest one. Return the first one in case of multiple\n# strings of the same length. Return None in case the input list is empty.\n\ndefmodule HumanEval do\n def candidate(strings), do: longest(strings)\n def longest(strings) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_12_longest.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'longest' do\n assert nil == HumanEval.candidate([])\n assert \"x\" == HumanEval.candidate([\"x\", \"y\", \"z\"])\n assert \"zzzz\" == HumanEval.candidate([\"x\", \"yyy\", \"zzzz\", \"www\", \"kkkk\", \"abc\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_130_tri", "language": "elixir", "prompt": "# Everyone knows Fibonacci sequence, it was studied deeply by mathematicians in \n# the last couple centuries. However, what people don't know is Tribonacci sequence.\n# Tribonacci sequence is defined by the recurrence:\n# tri(1) = 3\n# tri(n) = 1 + n / 2, if n is even.\n# tri(n) = tri(n - 1) + tri(n - 2) + tri(n + 1), if n is odd.\n# For example:\n# tri(2) = 1 + (2 / 2) = 2\n# tri(4) = 3\n# tri(3) = tri(2) + tri(1) + tri(4)\n# = 2 + 3 + 3 = 8 \n# You are given a non-negative integer number n, you have to a return a list of the \n# first n + 1 numbers of the Tribonacci sequence.\n# Examples:\n\ndefmodule HumanEval do\n def candidate(n), do: tri(n)\n def tri(n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_130_tri.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'tri' do\n assert [1, 3, 2, 8] == HumanEval.candidate(3)\n assert [1, 3, 2, 8, 3] == HumanEval.candidate(4)\n assert [1, 3, 2, 8, 3, 15] == HumanEval.candidate(5)\n assert [1, 3, 2, 8, 3, 15, 4] == HumanEval.candidate(6)\n assert [1, 3, 2, 8, 3, 15, 4, 24] == HumanEval.candidate(7)\n assert [1, 3, 2, 8, 3, 15, 4, 24, 5] == HumanEval.candidate(8)\n assert [1, 3, 2, 8, 3, 15, 4, 24, 5, 35] == HumanEval.candidate(9)\n assert [1, 3, 2, 8, 3, 15, 4, 24, 5, 35, 6, 48, 7, 63, 8, 80, 9, 99, 10, 120, 11] == HumanEval.candidate(20)\n assert [1] == HumanEval.candidate(0)\n assert [1, 3] == HumanEval.candidate(1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_131_digits", "language": "elixir", "prompt": "# Given a positive integer n, return the product of the odd digits.\n# Return 0 if all digits are even.\n# For example:\n\ndefmodule HumanEval do\n def candidate(n), do: digits(n)\n def digits(n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_131_digits.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'digits' do\n assert 5 == HumanEval.candidate(5)\n assert 5 == HumanEval.candidate(54)\n assert 1 == HumanEval.candidate(120)\n assert 5 == HumanEval.candidate(5014)\n assert 315 == HumanEval.candidate(98765)\n assert 2625 == HumanEval.candidate(5576543)\n assert 0 == HumanEval.candidate(2468)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_132_is_nested", "language": "elixir", "prompt": "# Create a function that takes a string as input which contains only square brackets.\n# The function should return True if and only if there is a valid subsequence of brackets \n# where at least one bracket in the subsequence is nested.\n\ndefmodule HumanEval do\n def candidate(string), do: is_nested(string)\n def is_nested(string) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_132_is_nested.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_nested' do\n assert true == HumanEval.candidate(\"[[]]\")\n assert false == HumanEval.candidate(\"[]]]]]]][[[[[]\")\n assert false == HumanEval.candidate(\"[][]\")\n assert false == HumanEval.candidate(\"[]\")\n assert true == HumanEval.candidate(\"[[[[]]]]\")\n assert false == HumanEval.candidate(\"[]]]]]]]]]]\")\n assert true == HumanEval.candidate(\"[][][[]]\")\n assert false == HumanEval.candidate(\"[[]\")\n assert false == HumanEval.candidate(\"[]]\")\n assert true == HumanEval.candidate(\"[[]][[\")\n assert true == HumanEval.candidate(\"[[][]]\")\n assert false == HumanEval.candidate(\"\")\n assert false == HumanEval.candidate(\"[[[[[[[[\")\n assert false == HumanEval.candidate(\"]]]]]]]]\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_133_sum_squares", "language": "elixir", "prompt": "# You are given a list of numbers.\n# You need to return the sum of squared numbers in the given list,\n# round each element in the list to the upper int(Ceiling) first.\n# Examples:\n\ndefmodule HumanEval do\n def candidate(lst), do: sum_squares(lst)\n def sum_squares(lst) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_133_sum_squares.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sum_squares' do\n assert 14 == HumanEval.candidate([1.0, 2.0, 3.0])\n assert 14 == HumanEval.candidate([1.0, 2.0, 3.0])\n assert 84 == HumanEval.candidate([1.0, 3.0, 5.0, 7.0])\n assert 29 == HumanEval.candidate([1.4, 4.2, 0.0])\n assert 6 == HumanEval.candidate([-2.4, 1.0, 1.0])\n assert 10230 == HumanEval.candidate([100.0, 1.0, 15.0, 2.0])\n assert 200000000 == HumanEval.candidate([10000.0, 10000.0])\n assert 75 == HumanEval.candidate([-1.4, 4.6, 6.3])\n assert 1086 == HumanEval.candidate([-1.4, 17.9, 18.9, 19.9])\n assert 0 == HumanEval.candidate([0.0])\n assert 1 == HumanEval.candidate([-1.0])\n assert 2 == HumanEval.candidate([-1.0, 1.0, 0.0])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_134_check_if_last_char_is_a_letter", "language": "elixir", "prompt": "# Create a function that returns True if the last character\n# of a given string is an alphabetical character and is not\n# a part of a word, and False otherwise.\n# Note: \"word\" is a group of characters separated by space.\n# Examples:\n\ndefmodule HumanEval do\n def candidate(txt), do: check_if_last_char_is_a_letter(txt)\n def check_if_last_char_is_a_letter(txt) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_134_check_if_last_char_is_a_letter.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'check_if_last_char_is_a_letter' do\n assert false == HumanEval.candidate(\"apple\")\n assert true == HumanEval.candidate(\"apple pi e\")\n assert false == HumanEval.candidate(\"eeeee\")\n assert true == HumanEval.candidate(\"A\")\n assert false == HumanEval.candidate(\"Pumpkin pie \")\n assert false == HumanEval.candidate(\"Pumpkin pie 1\")\n assert false == HumanEval.candidate(\"\")\n assert false == HumanEval.candidate(\"eeeee e \")\n assert false == HumanEval.candidate(\"apple pie\")\n assert false == HumanEval.candidate(\"apple pi e \")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_135_can_arrange", "language": "elixir", "prompt": "# Create a function which returns the largest index of an element which\n# is not greater than or equal to the element immediately preceding it. If\n# no such element exists then return -1. The given array will not contain\n# duplicate values.\n# Examples:\n\ndefmodule HumanEval do\n def candidate(arr), do: can_arrange(arr)\n def can_arrange(arr) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_135_can_arrange.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'can_arrange' do\n assert 3 == HumanEval.candidate([1, 2, 4, 3, 5])\n assert -1 == HumanEval.candidate([1, 2, 4, 5])\n assert 2 == HumanEval.candidate([1, 4, 2, 5, 6, 7, 8, 9, 10])\n assert 4 == HumanEval.candidate([4, 8, 5, 7, 3])\n assert -1 == HumanEval.candidate([])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_136_largest_smallest_integers", "language": "elixir", "prompt": "# Create a function that returns a tuple (a, b), where 'a' is\n# the largest of negative integers, and 'b' is the smallest\n# of positive integers in a list.\n# If there is no negative or positive integers, return them as None.\n# Examples:\n\ndefmodule HumanEval do\n def candidate(lst), do: largest_smallest_integers(lst)\n def largest_smallest_integers(lst) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_136_largest_smallest_integers.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'largest_smallest_integers' do\n assert {nil, 1} == HumanEval.candidate([2, 4, 1, 3, 5, 7])\n assert {nil, 1} == HumanEval.candidate([2, 4, 1, 3, 5, 7, 0])\n assert {-2, 1} == HumanEval.candidate([1, 3, 2, 4, 5, 6, -2])\n assert {-7, 2} == HumanEval.candidate([4, 5, 3, 6, 2, 7, -7])\n assert {-9, 2} == HumanEval.candidate([7, 3, 8, 4, 9, 2, 5, -9])\n assert {nil, nil} == HumanEval.candidate([])\n assert {nil, nil} == HumanEval.candidate([0])\n assert {-1, nil} == HumanEval.candidate([-1, -3, -5, -6])\n assert {-1, nil} == HumanEval.candidate([-1, -3, -5, -6, 0])\n assert {-3, 1} == HumanEval.candidate([-6, -4, -4, -3, 1])\n assert {-3, 1} == HumanEval.candidate([-6, -4, -4, -3, -100, 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_137_compare_one", "language": "elixir", "prompt": "# Create a function that takes integers, floats, or strings representing\n# real numbers, and returns the larger variable in its given variable type.\n# Return None if the values are equal.\n# Note: If a real number is represented as a string, the floating point might be . or ,\n\ndefmodule HumanEval do\n def candidate(a, b), do: compare_one(a, b)\n def compare_one(a, b) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_137_compare_one.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'compare_one' do\n assert 2 == HumanEval.candidate(1, 2)\n assert 2.5 == HumanEval.candidate(1, 2.5)\n assert 3 == HumanEval.candidate(2, 3)\n assert 6 == HumanEval.candidate(5, 6)\n assert \"2,3\" == HumanEval.candidate(1, \"2,3\")\n assert \"6\" == HumanEval.candidate(\"5,1\", \"6\")\n assert \"2\" == HumanEval.candidate(\"1\", \"2\")\n assert nil == HumanEval.candidate(\"1\", 1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_138_is_equal_to_sum_even", "language": "elixir", "prompt": "# Evaluate whether the given number n can be written as the sum of exactly 4 positive even numbers\n# Example\n\ndefmodule HumanEval do\n def candidate(n), do: is_equal_to_sum_even(n)\n def is_equal_to_sum_even(n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_138_is_equal_to_sum_even.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_equal_to_sum_even' do\n assert false == HumanEval.candidate(4)\n assert false == HumanEval.candidate(6)\n assert true == HumanEval.candidate(8)\n assert true == HumanEval.candidate(10)\n assert false == HumanEval.candidate(11)\n assert true == HumanEval.candidate(12)\n assert false == HumanEval.candidate(13)\n assert true == HumanEval.candidate(16)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_139_special_factorial", "language": "elixir", "prompt": "# The Brazilian factorial is defined as:\n# brazilian_factorial(n) = n! * (n-1)! * (n-2)! * ... * 1!\n# where n > 0\n# For example:\n# The function will receive an integer as input and should return the special\n# factorial of this integer.\n\ndefmodule HumanEval do\n def candidate(n), do: special_factorial(n)\n def special_factorial(n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_139_special_factorial.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'special_factorial' do\n assert 288 == HumanEval.candidate(4)\n assert 34560 == HumanEval.candidate(5)\n assert 125411328000 == HumanEval.candidate(7)\n assert 1 == HumanEval.candidate(1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_13_greatest_common_divisor", "language": "elixir", "prompt": "# Return a greatest common divisor of two integers a and b\n\ndefmodule HumanEval do\n def candidate(a, b), do: greatest_common_divisor(a, b)\n def greatest_common_divisor(a, b) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_13_greatest_common_divisor.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'greatest_common_divisor' do\n assert 1 == HumanEval.candidate(3, 7)\n assert 5 == HumanEval.candidate(10, 15)\n assert 7 == HumanEval.candidate(49, 14)\n assert 12 == HumanEval.candidate(144, 60)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_140_fix_spaces", "language": "elixir", "prompt": "# Given a string text, replace all spaces in it with underscores, \n# and if a string has more than 2 consecutive spaces, \n# then replace all consecutive spaces with -\n\ndefmodule HumanEval do\n def candidate(text), do: fix_spaces(text)\n def fix_spaces(text) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_140_fix_spaces.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fix_spaces' do\n assert \"Example\" == HumanEval.candidate(\"Example\")\n assert \"Mudasir_Hanif_\" == HumanEval.candidate(\"Mudasir Hanif \")\n assert \"Yellow_Yellow__Dirty__Fellow\" == HumanEval.candidate(\"Yellow Yellow Dirty Fellow\")\n assert \"Exa-mple\" == HumanEval.candidate(\"Exa mple\")\n assert \"-Exa_1_2_2_mple\" == HumanEval.candidate(\" Exa 1 2 2 mple\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_141_file_name_check", "language": "elixir", "prompt": "# Create a function which takes a string representing a file's name, and returns\n# 'Yes' if the the file's name is valid, and returns 'No' otherwise.\n# A file's name is considered to be valid if and only if all the following conditions \n# are met:\n# - There should not be more than three digits ('0'-'9') in the file's name.\n# - The file's name contains exactly one dot '.'\n# - The substring before the dot should not be empty, and it starts with a letter from \n# the latin alphapet ('a'-'z' and 'A'-'Z').\n# - The substring after the dot should be one of these: ['txt', 'exe', 'dll']\n# Examples:\n\ndefmodule HumanEval do\n def candidate(file_name), do: file_name_check(file_name)\n def file_name_check(file_name) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_141_file_name_check.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'file_name_check' do\n assert \"Yes\" == HumanEval.candidate(\"example.txt\")\n assert \"No\" == HumanEval.candidate(\"1example.dll\")\n assert \"No\" == HumanEval.candidate(\"s1sdf3.asd\")\n assert \"Yes\" == HumanEval.candidate(\"K.dll\")\n assert \"Yes\" == HumanEval.candidate(\"MY16FILE3.exe\")\n assert \"No\" == HumanEval.candidate(\"His12FILE94.exe\")\n assert \"No\" == HumanEval.candidate(\"_Y.txt\")\n assert \"No\" == HumanEval.candidate(\"?aREYA.exe\")\n assert \"No\" == HumanEval.candidate(\"/this_is_valid.dll\")\n assert \"No\" == HumanEval.candidate(\"this_is_valid.wow\")\n assert \"Yes\" == HumanEval.candidate(\"this_is_valid.txt\")\n assert \"No\" == HumanEval.candidate(\"this_is_valid.txtexe\")\n assert \"No\" == HumanEval.candidate(\"#this2_i4s_5valid.ten\")\n assert \"No\" == HumanEval.candidate(\"@this1_is6_valid.exe\")\n assert \"No\" == HumanEval.candidate(\"this_is_12valid.6exe4.txt\")\n assert \"No\" == HumanEval.candidate(\"all.exe.txt\")\n assert \"Yes\" == HumanEval.candidate(\"I563_No.exe\")\n assert \"Yes\" == HumanEval.candidate(\"Is3youfault.txt\")\n assert \"Yes\" == HumanEval.candidate(\"no_one#knows.dll\")\n assert \"No\" == HumanEval.candidate(\"1I563_Yes3.exe\")\n assert \"No\" == HumanEval.candidate(\"I563_Yes3.txtt\")\n assert \"No\" == HumanEval.candidate(\"final..txt\")\n assert \"No\" == HumanEval.candidate(\"final132\")\n assert \"No\" == HumanEval.candidate(\"_f4indsartal132.\")\n assert \"No\" == HumanEval.candidate(\".txt\")\n assert \"No\" == HumanEval.candidate(\"s.\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_142_sum_squares", "language": "elixir", "prompt": "# \"\n# This function will take a list of integers. For all entries in the list, the function shall square the integer entry if its index is a \n# multiple of 3 and will cube the integer entry if its index is a multiple of 4 and not a multiple of 3. The function will not \n# change the entries in the list whose indexes are not a multiple of 3 or 4. The function shall then return the sum of all entries. \n# Examples:\n\ndefmodule HumanEval do\n def candidate(lst), do: sum_squares(lst)\n def sum_squares(lst) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_142_sum_squares.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sum_squares' do\n assert 6 == HumanEval.candidate([1, 2, 3])\n assert 14 == HumanEval.candidate([1, 4, 9])\n assert 0 == HumanEval.candidate([])\n assert 9 == HumanEval.candidate([1, 1, 1, 1, 1, 1, 1, 1, 1])\n assert -3 == HumanEval.candidate([-1, -1, -1, -1, -1, -1, -1, -1, -1])\n assert 0 == HumanEval.candidate([0])\n assert -126 == HumanEval.candidate([-1, -5, 2, -1, -5])\n assert 3030 == HumanEval.candidate([-56, -99, 1, 0, -2])\n assert 0 == HumanEval.candidate([-1, 0, 0, 0, 0, 0, 0, 0, -1])\n assert -14196 == HumanEval.candidate([-16, -9, -2, 36, 36, 26, -20, 25, -40, 20, -4, 12, -26, 35, 37])\n assert -1448 == HumanEval.candidate([-1, -3, 17, -1, -15, 13, -1, 14, -14, -12, -5, 14, -14, 6, 13, 11, 16, 16, 4, 10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_143_words_in_sentence", "language": "elixir", "prompt": "# You are given a string representing a sentence,\n# the sentence contains some words separated by a space,\n# and you have to return a string that contains the words from the original sentence,\n# whose lengths are prime numbers,\n# the order of the words in the new string should be the same as the original one.\n# Example 1:\n# Example 2:\n# Constraints:\n# * 1 <= len(sentence) <= 100\n# * sentence contains only letters\n\ndefmodule HumanEval do\n def candidate(sentence), do: words_in_sentence(sentence)\n def words_in_sentence(sentence) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_143_words_in_sentence.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'words_in_sentence' do\n assert \"is\" == HumanEval.candidate(\"This is a test\")\n assert \"go for\" == HumanEval.candidate(\"lets go for swimming\")\n assert \"there is no place\" == HumanEval.candidate(\"there is no place available here\")\n assert \"Hi am Hussein\" == HumanEval.candidate(\"Hi I am Hussein\")\n assert \"go for it\" == HumanEval.candidate(\"go for it\")\n assert \"\" == HumanEval.candidate(\"here\")\n assert \"is\" == HumanEval.candidate(\"here is\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_144_simplify", "language": "elixir", "prompt": "# Your task is to implement a function that will simplify the expression\n# x * n. The function returns True if x * n evaluates to a whole number and False\n# otherwise. Both x and n, are string representation of a fraction, and have the following format,\n# / where both numerator and denominator are positive whole numbers.\n# You can assume that x, and n are valid fractions, and do not have zero as denominator.\n\ndefmodule HumanEval do\n def candidate(x, n), do: simplify(x, n)\n def simplify(x, n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_144_simplify.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'simplify' do\n assert true == HumanEval.candidate(\"1/5\", \"5/1\")\n assert false == HumanEval.candidate(\"1/6\", \"2/1\")\n assert true == HumanEval.candidate(\"5/1\", \"3/1\")\n assert false == HumanEval.candidate(\"7/10\", \"10/2\")\n assert true == HumanEval.candidate(\"2/10\", \"50/10\")\n assert true == HumanEval.candidate(\"7/2\", \"4/2\")\n assert true == HumanEval.candidate(\"11/6\", \"6/1\")\n assert false == HumanEval.candidate(\"2/3\", \"5/2\")\n assert false == HumanEval.candidate(\"5/2\", \"3/5\")\n assert true == HumanEval.candidate(\"2/4\", \"8/4\")\n assert true == HumanEval.candidate(\"2/4\", \"4/2\")\n assert true == HumanEval.candidate(\"1/5\", \"5/1\")\n assert false == HumanEval.candidate(\"1/5\", \"1/5\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_145_order_by_points", "language": "elixir", "prompt": "# Write a function which sorts the given list of integers\n# in ascending order according to the sum of their digits.\n# Note: if there are several items with similar sum of their digits,\n# order them based on their index in original list.\n# For example:\n\ndefmodule HumanEval do\n def candidate(nums), do: order_by_points(nums)\n def order_by_points(nums) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_145_order_by_points.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'order_by_points' do\n assert [-1, -11, 1, -12, 11] == HumanEval.candidate([1, 11, -1, -11, -12])\n assert [0, 2, 3, 6, 53, 423, 423, 423, 1234, 145, 37, 46, 56, 463, 3457] == HumanEval.candidate([1234, 423, 463, 145, 2, 423, 423, 53, 6, 37, 3457, 3, 56, 0, 46])\n assert [] == HumanEval.candidate([])\n assert [-3, -32, -98, -11, 1, 2, 43, 54] == HumanEval.candidate([1, -11, -32, 43, 54, -98, 2, -3])\n assert [1, 10, 2, 11, 3, 4, 5, 6, 7, 8, 9] == HumanEval.candidate([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])\n assert [-76, -21, 0, 4, 23, 6, 6] == HumanEval.candidate([0, 6, 6, -76, -21, 23, 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_146_specialFilter", "language": "elixir", "prompt": "# Write a function that takes an array of numbers as input and returns \n# the number of elements in the array that are greater than 10 and both \n# first and last digits of a number are odd (1, 3, 5, 7, 9).\n# For example:\n\ndefmodule HumanEval do\n def candidate(nums), do: specialFilter(nums)\n def specialFilter(nums) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_146_specialFilter.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'specialFilter' do\n assert 0 == HumanEval.candidate([5, -2, 1, -5])\n assert 1 == HumanEval.candidate([15, -73, 14, -15])\n assert 2 == HumanEval.candidate([33, -2, -3, 45, 21, 109])\n assert 4 == HumanEval.candidate([43, -12, 93, 125, 121, 109])\n assert 3 == HumanEval.candidate([71, -2, -33, 75, 21, 19])\n assert 0 == HumanEval.candidate([1])\n assert 0 == HumanEval.candidate([])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_147_get_max_triples", "language": "elixir", "prompt": "# You are given a positive integer n. You have to create an integer array a of length n.\n# For each i (1 \u2264 i \u2264 n), the value of a[i] = i * i - i + 1.\n# Return the number of triples (a[i], a[j], a[k]) of a where i < j < k, \n# and a[i] + a[j] + a[k] is a multiple of 3.\n# Example :\n# Explanation: \n# a = [1, 3, 7, 13, 21]\n# The only valid triple is (1, 7, 13).\n\ndefmodule HumanEval do\n def candidate(n), do: get_max_triples(n)\n def get_max_triples(n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_147_get_max_triples.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'get_max_triples' do\n assert 1 == HumanEval.candidate(5)\n assert 4 == HumanEval.candidate(6)\n assert 36 == HumanEval.candidate(10)\n assert 53361 == HumanEval.candidate(100)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_148_bf", "language": "elixir", "prompt": "# There are eight planets in our solar system: the closerst to the Sun \n# is Mercury, the next one is Venus, then Earth, Mars, Jupiter, Saturn, \n# Uranus, Neptune.\n# Write a function that takes two planet names as strings planet1 and planet2. \n# The function should return a tuple containing all planets whose orbits are \n# located between the orbit of planet1 and the orbit of planet2, sorted by \n# the proximity to the sun. \n# The function should return an empty tuple if planet1 or planet2\n# are not correct planet names. \n# Examples\n\ndefmodule HumanEval do\n def candidate(planet1, planet2), do: bf(planet1, planet2)\n def bf(planet1, planet2) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_148_bf.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'bf' do\n assert {\"Saturn\", \"Uranus\"} == HumanEval.candidate(\"Jupiter\", \"Neptune\")\n assert {\"Venus\"} == HumanEval.candidate(\"Earth\", \"Mercury\")\n assert {\"Venus\", \"Earth\", \"Mars\", \"Jupiter\", \"Saturn\"} == HumanEval.candidate(\"Mercury\", \"Uranus\")\n assert {\"Earth\", \"Mars\", \"Jupiter\", \"Saturn\", \"Uranus\"} == HumanEval.candidate(\"Neptune\", \"Venus\")\n assert {} == HumanEval.candidate(\"Earth\", \"Earth\")\n assert {} == HumanEval.candidate(\"Mars\", \"Earth\")\n assert {} == HumanEval.candidate(\"Jupiter\", \"Makemake\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_149_sorted_list_sum", "language": "elixir", "prompt": "# Write a function that accepts a list of strings as a parameter,\n# deletes the strings that have odd lengths from it,\n# and returns the resulted list with a sorted order,\n# The list is always a list of strings and never an array of numbers,\n# and it may contain duplicates.\n# The order of the list should be ascending by length of each word, and you\n# should return the list sorted by that rule.\n# If two words have the same length, sort the list alphabetically.\n# The function should return a list of strings in sorted order.\n# You may assume that all words will have the same length.\n# For example:\n\ndefmodule HumanEval do\n def candidate(lst), do: sorted_list_sum(lst)\n def sorted_list_sum(lst) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_149_sorted_list_sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sorted_list_sum' do\n assert [\"aa\"] == HumanEval.candidate([\"aa\", \"a\", \"aaa\"])\n assert [\"AI\", \"asdf\", \"school\"] == HumanEval.candidate([\"school\", \"AI\", \"asdf\", \"b\"])\n assert [] == HumanEval.candidate([\"d\", \"b\", \"c\", \"a\"])\n assert [\"abcd\", \"dcba\"] == HumanEval.candidate([\"d\", \"dcba\", \"abcd\", \"a\"])\n assert [\"AI\", \"ai\", \"au\"] == HumanEval.candidate([\"AI\", \"ai\", \"au\"])\n assert [] == HumanEval.candidate([\"a\", \"b\", \"b\", \"c\", \"c\", \"a\"])\n assert [\"cc\", \"dd\", \"aaaa\", \"bbbb\"] == HumanEval.candidate([\"aaaa\", \"bbbb\", \"dd\", \"cc\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_14_all_prefixes", "language": "elixir", "prompt": "# Return list of all prefixes from shortest to longest of the input string\n\ndefmodule HumanEval do\n def candidate(string), do: all_prefixes(string)\n def all_prefixes(string) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_14_all_prefixes.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'all_prefixes' do\n assert [] == HumanEval.candidate(\"\")\n assert [\"a\", \"as\", \"asd\", \"asdf\", \"asdfg\", \"asdfgh\"] == HumanEval.candidate(\"asdfgh\")\n assert [\"W\", \"WW\", \"WWW\"] == HumanEval.candidate(\"WWW\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_150_x_or_y", "language": "elixir", "prompt": "# A simple program which should return the value of x if n is \n# a prime number and should return the value of y otherwise.\n# Examples:\n\ndefmodule HumanEval do\n def candidate(n, x, y), do: x_or_y(n, x, y)\n def x_or_y(n, x, y) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_150_x_or_y.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'x_or_y' do\n assert 34 == HumanEval.candidate(7, 34, 12)\n assert 5 == HumanEval.candidate(15, 8, 5)\n assert 33 == HumanEval.candidate(3, 33, 5212)\n assert 3 == HumanEval.candidate(1259, 3, 52)\n assert -1 == HumanEval.candidate(7919, -1, 12)\n assert 583 == HumanEval.candidate(3609, 1245, 583)\n assert 129 == HumanEval.candidate(91, 56, 129)\n assert 1234 == HumanEval.candidate(6, 34, 1234)\n assert 0 == HumanEval.candidate(1, 2, 0)\n assert 2 == HumanEval.candidate(2, 2, 0)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_151_double_the_difference", "language": "elixir", "prompt": "# Given a list of numbers, return the sum of squares of the numbers\n# in the list that are odd. Ignore numbers that are negative or not integers.\n# If the input list is empty, return 0.\n\ndefmodule HumanEval do\n def candidate(lst), do: double_the_difference(lst)\n def double_the_difference(lst) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_151_double_the_difference.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'double_the_difference' do\n assert 0 == HumanEval.candidate([])\n assert 25 == HumanEval.candidate([5.0, 4.0])\n assert 0 == HumanEval.candidate([0.1, 0.2, 0.3])\n assert 0 == HumanEval.candidate([-10.0, -20.0, -30.0])\n assert 0 == HumanEval.candidate([-1.0, -2.0, 8.0])\n assert 34 == HumanEval.candidate([0.2, 3.0, 5.0])\n assert 165 == HumanEval.candidate([-9.0, -7.0, -5.0, -3.0, -1.0, 1.0, 3.0, 5.0, 7.0, 9.0])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_152_compare", "language": "elixir", "prompt": "# I think we all remember that feeling when the result of some long-awaited\n# event is finally known. The feelings and thoughts you have at that moment are\n# definitely worth noting down and comparing.\n# Your task is to determine if a person correctly guessed the results of a number of matches.\n# You are given two arrays of scores and guesses of equal length, where each index shows a match. \n# Return an array of the same length denoting how far off each guess was. If they have guessed correctly,\n# the value is 0, and if not, the value is the absolute difference between the guess and the score.\n# example:\n\ndefmodule HumanEval do\n def candidate(game, guess), do: compare(game, guess)\n def compare(game, guess) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_152_compare.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'compare' do\n assert [0, 0, 0, 0, 3, 3] == HumanEval.candidate([1, 2, 3, 4, 5, 1], [1, 2, 3, 4, 2, -2])\n assert [0, 0, 0, 0, 0, 0] == HumanEval.candidate([0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0])\n assert [2, 4, 6] == HumanEval.candidate([1, 2, 3], [-1, -2, -3])\n assert [2, 0, 0, 1] == HumanEval.candidate([1, 2, 3, 5], [-1, 2, 3, 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_153_Strongest_Extension", "language": "elixir", "prompt": "# You will be given the name of a class (a string) and a list of extensions.\n# The extensions are to be used to load additional classes to the class. The\n# strength of the extension is as follows: Let CAP be the number of the uppercase\n# letters in the extension's name, and let SM be the number of lowercase letters \n# in the extension's name, the strength is given by the fraction CAP - SM. \n# You should find the strongest extension and return a string in this \n# format: ClassName.StrongestExtensionName.\n# If there are two or more extensions with the same strength, you should\n# choose the one that comes first in the list.\n# For example, if you are given \"Slices\" as the class and a list of the\n# extensions: ['SErviNGSliCes', 'Cheese', 'StuFfed'] then you should\n# return 'Slices.SErviNGSliCes' since 'SErviNGSliCes' is the strongest extension \n# (its strength is -1).\n# Example:\n\ndefmodule HumanEval do\n def candidate(class_name, extensions), do: Strongest_Extension(class_name, extensions)\n def Strongest_Extension(class_name, extensions) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_153_Strongest_Extension.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'Strongest_Extension' do\n assert \"Watashi.eIGHt8OKe\" == HumanEval.candidate(\"Watashi\", [\"tEN\", \"niNE\", \"eIGHt8OKe\"])\n assert \"Boku123.YEs.WeCaNe\" == HumanEval.candidate(\"Boku123\", [\"nani\", \"NazeDa\", \"YEs.WeCaNe\", \"32145tggg\"])\n assert \"__YESIMHERE.NuLl__\" == HumanEval.candidate(\"__YESIMHERE\", [\"t\", \"eMptY\", \"nothing\", \"zeR00\", \"NuLl__\", \"123NoooneB321\"])\n assert \"K.TAR\" == HumanEval.candidate(\"K\", [\"Ta\", \"TAR\", \"t234An\", \"cosSo\"])\n assert \"__HAHA.123\" == HumanEval.candidate(\"__HAHA\", [\"Tab\", \"123\", \"781345\", \"-_-\"])\n assert \"YameRore.okIWILL123\" == HumanEval.candidate(\"YameRore\", [\"HhAas\", \"okIWILL123\", \"WorkOut\", \"Fails\", \"-_-\"])\n assert \"finNNalLLly.WoW\" == HumanEval.candidate(\"finNNalLLly\", [\"Die\", \"NowW\", \"Wow\", \"WoW\"])\n assert \"_.Bb\" == HumanEval.candidate(\"_\", [\"Bb\", \"91245\"])\n assert \"Sp.671235\" == HumanEval.candidate(\"Sp\", [\"671235\", \"Bb\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_154_cycpattern_check", "language": "elixir", "prompt": "# You are given 2 words. You need to return True if the second word or any of its rotations is a substring in the first word\n\ndefmodule HumanEval do\n def candidate(a, b), do: cycpattern_check(a, b)\n def cycpattern_check(a, b) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_154_cycpattern_check.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'cycpattern_check' do\n assert false == HumanEval.candidate(\"xyzw\", \"xyw\")\n assert true == HumanEval.candidate(\"yello\", \"ell\")\n assert false == HumanEval.candidate(\"whattup\", \"ptut\")\n assert true == HumanEval.candidate(\"efef\", \"fee\")\n assert false == HumanEval.candidate(\"abab\", \"aabb\")\n assert true == HumanEval.candidate(\"winemtt\", \"tinem\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_155_even_odd_count", "language": "elixir", "prompt": "# Given an integer. return a tuple that has the number of even and odd digits respectively.\n# Example:\n\ndefmodule HumanEval do\n def candidate(num), do: even_odd_count(num)\n def even_odd_count(num) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_155_even_odd_count.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'even_odd_count' do\n assert {0, 1} == HumanEval.candidate(7)\n assert {1, 1} == HumanEval.candidate(-78)\n assert {2, 2} == HumanEval.candidate(3452)\n assert {3, 3} == HumanEval.candidate(346211)\n assert {3, 3} == HumanEval.candidate(-345821)\n assert {1, 0} == HumanEval.candidate(-2)\n assert {2, 3} == HumanEval.candidate(-45347)\n assert {1, 0} == HumanEval.candidate(0)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_156_int_to_mini_roman", "language": "elixir", "prompt": "# Given a positive integer, obtain its roman numeral equivalent as a string,\n# and return it in lowercase.\n# Restrictions: 1 <= num <= 1000\n# Examples:\n\ndefmodule HumanEval do\n def candidate(number), do: int_to_mini_roman(number)\n def int_to_mini_roman(number) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_156_int_to_mini_roman.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'int_to_mini_roman' do\n assert \"xix\" == HumanEval.candidate(19)\n assert \"clii\" == HumanEval.candidate(152)\n assert \"ccli\" == HumanEval.candidate(251)\n assert \"cdxxvi\" == HumanEval.candidate(426)\n assert \"d\" == HumanEval.candidate(500)\n assert \"i\" == HumanEval.candidate(1)\n assert \"iv\" == HumanEval.candidate(4)\n assert \"xliii\" == HumanEval.candidate(43)\n assert \"xc\" == HumanEval.candidate(90)\n assert \"xciv\" == HumanEval.candidate(94)\n assert \"dxxxii\" == HumanEval.candidate(532)\n assert \"cm\" == HumanEval.candidate(900)\n assert \"cmxciv\" == HumanEval.candidate(994)\n assert \"m\" == HumanEval.candidate(1000)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_157_right_angle_triangle", "language": "elixir", "prompt": "# Given the lengths of the three sides of a triangle. Return True if the three\n# sides form a right-angled triangle, False otherwise.\n# A right-angled triangle is a triangle in which one angle is right angle or \n# 90 degree.\n# Example:\n\ndefmodule HumanEval do\n def candidate(a, b, c), do: right_angle_triangle(a, b, c)\n def right_angle_triangle(a, b, c) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_157_right_angle_triangle.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'right_angle_triangle' do\n assert true == HumanEval.candidate(3, 4, 5)\n assert false == HumanEval.candidate(1, 2, 3)\n assert true == HumanEval.candidate(10, 6, 8)\n assert false == HumanEval.candidate(2, 2, 2)\n assert true == HumanEval.candidate(7, 24, 25)\n assert false == HumanEval.candidate(10, 5, 7)\n assert true == HumanEval.candidate(5, 12, 13)\n assert true == HumanEval.candidate(15, 8, 17)\n assert true == HumanEval.candidate(48, 55, 73)\n assert false == HumanEval.candidate(1, 1, 1)\n assert false == HumanEval.candidate(2, 2, 10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_158_find_max", "language": "elixir", "prompt": "# Write a function that accepts a list of strings.\n# The list contains different words. Return the word with maximum number\n# of unique characters. If multiple strings have maximum number of unique\n# characters, return the one which comes first in lexicographical order.\n\ndefmodule HumanEval do\n def candidate(words), do: find_max(words)\n def find_max(words) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_158_find_max.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'find_max' do\n assert \"string\" == HumanEval.candidate([\"name\", \"of\", \"string\"])\n assert \"enam\" == HumanEval.candidate([\"name\", \"enam\", \"game\"])\n assert \"aaaaaaa\" == HumanEval.candidate([\"aaaaaaa\", \"bb\", \"cc\"])\n assert \"abc\" == HumanEval.candidate([\"abc\", \"cba\"])\n assert \"footbott\" == HumanEval.candidate([\"play\", \"this\", \"game\", \"of\", \"footbott\"])\n assert \"gonna\" == HumanEval.candidate([\"we\", \"are\", \"gonna\", \"rock\"])\n assert \"nation\" == HumanEval.candidate([\"we\", \"are\", \"a\", \"mad\", \"nation\"])\n assert \"this\" == HumanEval.candidate([\"this\", \"is\", \"a\", \"prrk\"])\n assert \"b\" == HumanEval.candidate([\"b\"])\n assert \"play\" == HumanEval.candidate([\"play\", \"play\", \"play\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_159_eat", "language": "elixir", "prompt": "# You're a hungry rabbit, and you already have eaten a certain number of carrots,\n# but now you need to eat more carrots to complete the day's meals.\n# you should return an array of [ total number of eaten carrots after your meals,\n# the number of carrots left after your meals ]\n# if there are not enough remaining carrots, you will eat all remaining carrots, but will still be hungry.\n# Example:\n# Variables:\n# @number : integer\n# the number of carrots that you have eaten.\n# @need : integer\n# the number of carrots that you need to eat.\n# @remaining : integer\n# the number of remaining carrots thet exist in stock\n# Constrain:\n# * 0 <= number <= 1000\n# * 0 <= need <= 1000\n# * 0 <= remaining <= 1000\n# Have fun :)\n\ndefmodule HumanEval do\n def candidate(number, need, remaining), do: eat(number, need, remaining)\n def eat(number, need, remaining) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_159_eat.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'eat' do\n assert [11, 4] == HumanEval.candidate(5, 6, 10)\n assert [12, 1] == HumanEval.candidate(4, 8, 9)\n assert [11, 0] == HumanEval.candidate(1, 10, 10)\n assert [7, 0] == HumanEval.candidate(2, 11, 5)\n assert [9, 2] == HumanEval.candidate(4, 5, 7)\n assert [5, 0] == HumanEval.candidate(4, 5, 1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_15_string_sequence", "language": "elixir", "prompt": "# Return a string containing space-delimited numbers starting from 0 upto n inclusive.\n\ndefmodule HumanEval do\n def candidate(n), do: string_sequence(n)\n def string_sequence(n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_15_string_sequence.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'string_sequence' do\n assert \"0\" == HumanEval.candidate(0)\n assert \"0 1 2 3\" == HumanEval.candidate(3)\n assert \"0 1 2 3 4 5 6 7 8 9 10\" == HumanEval.candidate(10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_161_solve", "language": "elixir", "prompt": "# You are given a string s.\n# if s[i] is a letter, reverse its case from lower to upper or vise versa, \n# otherwise keep it as it is.\n# If the string contains no letters, reverse the string.\n# The function should return the resulted string.\n# Examples\n\ndefmodule HumanEval do\n def candidate(s), do: solve(s)\n def solve(s) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_161_solve.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'solve' do\n assert \"aSdF\" == HumanEval.candidate(\"AsDf\")\n assert \"4321\" == HumanEval.candidate(\"1234\")\n assert \"AB\" == HumanEval.candidate(\"ab\")\n assert \"#A@c\" == HumanEval.candidate(\"#a@C\")\n assert \"#aSDFw^45\" == HumanEval.candidate(\"#AsdfW^45\")\n assert \"2@6#\" == HumanEval.candidate(\"#6@2\")\n assert \"#$A^d\" == HumanEval.candidate(\"#$a^D\")\n assert \"#CCC\" == HumanEval.candidate(\"#ccc\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_162_string_to_md5", "language": "elixir", "prompt": "# Given a string 'text', return its md5 hash equivalent string.\n# If 'text' is an empty string, return None.\n\ndefmodule HumanEval do\n def candidate(text), do: string_to_md5(text)\n def string_to_md5(text) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_162_string_to_md5.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'string_to_md5' do\n assert \"3e25960a79dbc69b674cd4ec67a72c62\" == HumanEval.candidate(\"Hello world\")\n assert nil == HumanEval.candidate(\"\")\n assert \"0ef78513b0cb8cef12743f5aeb35f888\" == HumanEval.candidate(\"A B C\")\n assert \"5f4dcc3b5aa765d61d8327deb882cf99\" == HumanEval.candidate(\"password\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_163_generate_integers", "language": "elixir", "prompt": "# Given two positive integers a and b, return the even digits between a\n# and b, in ascending order.\n# For example:\n\ndefmodule HumanEval do\n def candidate(a, b), do: generate_integers(a, b)\n def generate_integers(a, b) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_163_generate_integers.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'generate_integers' do\n assert [2, 4, 6, 8] == HumanEval.candidate(2, 10)\n assert [2, 4, 6, 8] == HumanEval.candidate(10, 2)\n assert [2, 4, 6, 8] == HumanEval.candidate(132, 2)\n assert [] == HumanEval.candidate(17, 89)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_16_count_distinct_characters", "language": "elixir", "prompt": "# Given a string, find out how many distinct characters (regardless of case) does it consist of\n\ndefmodule HumanEval do\n def candidate(string), do: count_distinct_characters(string)\n def count_distinct_characters(string) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_16_count_distinct_characters.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'count_distinct_characters' do\n assert 0 == HumanEval.candidate(\"\")\n assert 5 == HumanEval.candidate(\"abcde\")\n assert 5 == HumanEval.candidate(\"abcdecadeCADE\")\n assert 1 == HumanEval.candidate(\"aaaaAAAAaaaa\")\n assert 5 == HumanEval.candidate(\"Jerry jERRY JeRRRY\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_17_parse_music", "language": "elixir", "prompt": "# Input to this function is a string representing musical notes in a special ASCII format.\n# Your task is to parse this string and return list of integers corresponding to how many beats does each\n# not last.\n# Here is a legend:\n# 'o' - whole note, lasts four beats\n# 'o|' - half note, lasts two beats\n# '.|' - quater note, lasts one beat\n\ndefmodule HumanEval do\n def candidate(music_string), do: parse_music(music_string)\n def parse_music(music_string) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_17_parse_music.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'parse_music' do\n assert [] == HumanEval.candidate(\"\")\n assert [4, 4, 4, 4] == HumanEval.candidate(\"o o o o\")\n assert [1, 1, 1, 1] == HumanEval.candidate(\".| .| .| .|\")\n assert [2, 2, 1, 1, 4, 4, 4, 4] == HumanEval.candidate(\"o| o| .| .| o o o o\")\n assert [2, 1, 2, 1, 4, 2, 4, 2] == HumanEval.candidate(\"o| .| o| .| o o| o o|\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_18_how_many_times", "language": "elixir", "prompt": "# Find how many times a given substring can be found in the original string. Count overlaping cases.\n\ndefmodule HumanEval do\n def candidate(string, substring), do: how_many_times(string, substring)\n def how_many_times(string, substring) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_18_how_many_times.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'how_many_times' do\n assert 0 == HumanEval.candidate(\"\", \"x\")\n assert 4 == HumanEval.candidate(\"xyxyxyx\", \"x\")\n assert 4 == HumanEval.candidate(\"cacacacac\", \"cac\")\n assert 1 == HumanEval.candidate(\"john doe\", \"john\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_19_sort_numbers", "language": "elixir", "prompt": "# Input is a space-delimited string of numberals from 'zero' to 'nine'.\n# Valid choices are 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight' and 'nine'.\n# Return the string with numbers sorted from smallest to largest\n\ndefmodule HumanEval do\n def candidate(numbers), do: sort_numbers(numbers)\n def sort_numbers(numbers) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_19_sort_numbers.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sort_numbers' do\n assert \"\" == HumanEval.candidate(\"\")\n assert \"three\" == HumanEval.candidate(\"three\")\n assert \"three five nine\" == HumanEval.candidate(\"three five nine\")\n assert \"zero four five seven eight nine\" == HumanEval.candidate(\"five zero four seven nine eight\")\n assert \"zero one two three four five six\" == HumanEval.candidate(\"six five four three two one zero\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_1_separate_paren_groups", "language": "elixir", "prompt": "# Input to this function is a string containing multiple groups of nested parentheses. Your goal is to\n# separate those group into separate strings and return the list of those.\n# Separate groups are balanced (each open brace is properly closed) and not nested within each other\n# Ignore any spaces in the input string.\n\ndefmodule HumanEval do\n def candidate(paren_string), do: separate_paren_groups(paren_string)\n def separate_paren_groups(paren_string) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_1_separate_paren_groups.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'separate_paren_groups' do\n assert [\"(()())\", \"((()))\", \"()\", \"((())()())\"] == HumanEval.candidate(\"(()()) ((())) () ((())()())\")\n assert [\"()\", \"(())\", \"((()))\", \"(((())))\"] == HumanEval.candidate(\"() (()) ((())) (((())))\")\n assert [\"(()(())((())))\"] == HumanEval.candidate(\"(()(())((())))\")\n assert [\"()\", \"(())\", \"(()())\"] == HumanEval.candidate(\"( ) (( )) (( )( ))\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_20_find_closest_elements", "language": "elixir", "prompt": "# From a supplied list of numbers (of length at least two) select and return two that are the closest to each\n# other and return them in order (smaller number, larger number).\n\ndefmodule HumanEval do\n def candidate(numbers), do: find_closest_elements(numbers)\n def find_closest_elements(numbers) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_20_find_closest_elements.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'find_closest_elements' do\n assert {3.9, 4.0} == HumanEval.candidate([1.0, 2.0, 3.9, 4.0, 5.0, 2.2])\n assert {5.0, 5.9} == HumanEval.candidate([1.0, 2.0, 5.9, 4.0, 5.0])\n assert {2.0, 2.2} == HumanEval.candidate([1.0, 2.0, 3.0, 4.0, 5.0, 2.2])\n assert {2.0, 2.0} == HumanEval.candidate([1.0, 2.0, 3.0, 4.0, 5.0, 2.0])\n assert {2.2, 3.1} == HumanEval.candidate([1.1, 2.2, 3.1, 4.1, 5.1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_21_rescale_to_unit", "language": "elixir", "prompt": "# Given list of numbers (of at least two elements), apply a linear transform to that list,\n# such that the smallest number will become 0 and the largest will become 1\n\ndefmodule HumanEval do\n def candidate(numbers), do: rescale_to_unit(numbers)\n def rescale_to_unit(numbers) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_21_rescale_to_unit.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'rescale_to_unit' do\n assert [0.0, 1.0] == HumanEval.candidate([2.0, 49.9])\n assert [1.0, 0.0] == HumanEval.candidate([100.0, 49.9])\n assert [0.0, 0.25, 0.5, 0.75, 1.0] == HumanEval.candidate([1.0, 2.0, 3.0, 4.0, 5.0])\n assert [0.25, 0.0, 1.0, 0.5, 0.75] == HumanEval.candidate([2.0, 1.0, 5.0, 3.0, 4.0])\n assert [0.25, 0.0, 1.0, 0.5, 0.75] == HumanEval.candidate([12.0, 11.0, 15.0, 13.0, 14.0])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_22_filter_integers", "language": "elixir", "prompt": "# Filter given list of any python values only for integers\n\ndefmodule HumanEval do\n def candidate(values), do: filter_integers(values)\n def filter_integers(values) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_22_filter_integers.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'filter_integers' do\n assert [] == HumanEval.candidate([])\n assert [4, 9] == HumanEval.candidate([4, %{}, [], 23.2, 9, \"adasd\"])\n assert [3, 3, 3] == HumanEval.candidate([3, \"c\", 3, 3, \"a\", \"b\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_23_strlen", "language": "elixir", "prompt": "# Return length of given string\n\ndefmodule HumanEval do\n def candidate(string), do: strlen(string)\n def strlen(string) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_23_strlen.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'strlen' do\n assert 0 == HumanEval.candidate(\"\")\n assert 1 == HumanEval.candidate(\"x\")\n assert 9 == HumanEval.candidate(\"asdasnakj\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_24_largest_divisor", "language": "elixir", "prompt": "# For a given number n, find the largest number that divides n evenly, smaller than n\n\ndefmodule HumanEval do\n def candidate(n), do: largest_divisor(n)\n def largest_divisor(n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_24_largest_divisor.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'largest_divisor' do\n assert 1 == HumanEval.candidate(3)\n assert 1 == HumanEval.candidate(7)\n assert 5 == HumanEval.candidate(10)\n assert 50 == HumanEval.candidate(100)\n assert 7 == HumanEval.candidate(49)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_25_factorize", "language": "elixir", "prompt": "# Return list of prime factors of given integer in the order from smallest to largest.\n# Each of the factors should be listed number of times corresponding to how many times it appeares in factorization.\n# Input number should be equal to the product of all factors\n\ndefmodule HumanEval do\n def candidate(n), do: factorize(n)\n def factorize(n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_25_factorize.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'factorize' do\n assert [2] == HumanEval.candidate(2)\n assert [2, 2] == HumanEval.candidate(4)\n assert [2, 2, 2] == HumanEval.candidate(8)\n assert [3, 19] == HumanEval.candidate(57)\n assert [3, 3, 19, 19] == HumanEval.candidate(3249)\n assert [3, 3, 3, 19, 19, 19] == HumanEval.candidate(185193)\n assert [3, 19, 19, 19] == HumanEval.candidate(20577)\n assert [2, 3, 3] == HumanEval.candidate(18)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_26_remove_duplicates", "language": "elixir", "prompt": "# From a list of integers, remove all elements that occur more than once.\n# Keep order of elements left the same as in the input.\n\ndefmodule HumanEval do\n def candidate(numbers), do: remove_duplicates(numbers)\n def remove_duplicates(numbers) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_26_remove_duplicates.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'remove_duplicates' do\n assert [] == HumanEval.candidate([])\n assert [1, 2, 3, 4] == HumanEval.candidate([1, 2, 3, 4])\n assert [1, 4, 5] == HumanEval.candidate([1, 2, 3, 2, 4, 3, 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_27_flip_case", "language": "elixir", "prompt": "# For a given string, flip lowercase characters to uppercase and uppercase to lowercase.\n\ndefmodule HumanEval do\n def candidate(string), do: flip_case(string)\n def flip_case(string) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_27_flip_case.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'flip_case' do\n assert \"\" == HumanEval.candidate(\"\")\n assert \"hELLO!\" == HumanEval.candidate(\"Hello!\")\n assert \"tHESE VIOLENT DELIGHTS HAVE VIOLENT ENDS\" == HumanEval.candidate(\"These violent delights have violent ends\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_28_concatenate", "language": "elixir", "prompt": "# Concatenate list of strings into a single string\n\ndefmodule HumanEval do\n def candidate(strings), do: concatenate(strings)\n def concatenate(strings) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_28_concatenate.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'concatenate' do\n assert \"\" == HumanEval.candidate([])\n assert \"xyz\" == HumanEval.candidate([\"x\", \"y\", \"z\"])\n assert \"xyzwk\" == HumanEval.candidate([\"x\", \"y\", \"z\", \"w\", \"k\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_29_filter_by_prefix", "language": "elixir", "prompt": "# Filter an input list of strings only for ones that start with a given prefix.\n\ndefmodule HumanEval do\n def candidate(strings, prefix), do: filter_by_prefix(strings, prefix)\n def filter_by_prefix(strings, prefix) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_29_filter_by_prefix.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'filter_by_prefix' do\n assert [] == HumanEval.candidate([], \"john\")\n assert [\"xxx\", \"xxxAAA\", \"xxx\"] == HumanEval.candidate([\"xxx\", \"asd\", \"xxy\", \"john doe\", \"xxxAAA\", \"xxx\"], \"xxx\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_2_truncate_number", "language": "elixir", "prompt": "# Given a positive floating point number, it can be decomposed into\n# and integer part (largest integer smaller than given number) and decimals\n# (leftover part always smaller than 1).\n# Return the decimal part of the number.\n\ndefmodule HumanEval do\n def candidate(number), do: truncate_number(number)\n def truncate_number(number) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_2_truncate_number.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'truncate_number' do\n assert 0.5 == HumanEval.candidate(3.5)\n assert 0.25 == HumanEval.candidate(1.25)\n assert 0.0 == HumanEval.candidate(123.0)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_30_get_positive", "language": "elixir", "prompt": "# Return only positive numbers in the list.\n\ndefmodule HumanEval do\n def candidate(l), do: get_positive(l)\n def get_positive(l) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_30_get_positive.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'get_positive' do\n assert [4, 5, 6] == HumanEval.candidate([-1, -2, 4, 5, 6])\n assert [5, 3, 2, 3, 3, 9, 123, 1] == HumanEval.candidate([5, 3, -5, 2, 3, 3, 9, 0, 123, 1, -10])\n assert [] == HumanEval.candidate([-1, -2])\n assert [] == HumanEval.candidate([])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_31_is_prime", "language": "elixir", "prompt": "# Return true if a given number is prime, and false otherwise.\n\ndefmodule HumanEval do\n def candidate(n), do: is_prime(n)\n def is_prime(n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_31_is_prime.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_prime' do\n assert false == HumanEval.candidate(6)\n assert true == HumanEval.candidate(101)\n assert true == HumanEval.candidate(11)\n assert true == HumanEval.candidate(13441)\n assert true == HumanEval.candidate(61)\n assert false == HumanEval.candidate(4)\n assert false == HumanEval.candidate(1)\n assert true == HumanEval.candidate(5)\n assert true == HumanEval.candidate(11)\n assert true == HumanEval.candidate(17)\n assert false == HumanEval.candidate(85)\n assert false == HumanEval.candidate(77)\n assert false == HumanEval.candidate(255379)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_33_sort_third", "language": "elixir", "prompt": "# This function takes a list l and returns a list l' such that\n# l' is identical to l in the indicies that are not divisible by three, while its values at the indicies that are divisible by three are equal\n# to the values of the corresponding indicies of l, but sorted.\n\ndefmodule HumanEval do\n def candidate(l), do: sort_third(l)\n def sort_third(l) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_33_sort_third.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sort_third' do\n assert [2, 6, 3, 4, 8, 9, 5] == HumanEval.candidate([5, 6, 3, 4, 8, 9, 2])\n assert [2, 8, 3, 4, 6, 9, 5] == HumanEval.candidate([5, 8, 3, 4, 6, 9, 2])\n assert [2, 6, 9, 4, 8, 3, 5] == HumanEval.candidate([5, 6, 9, 4, 8, 3, 2])\n assert [2, 6, 3, 4, 8, 9, 5, 1] == HumanEval.candidate([5, 6, 3, 4, 8, 9, 2, 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_34_unique", "language": "elixir", "prompt": "# Return sorted unique elements in a list\n\ndefmodule HumanEval do\n def candidate(l), do: unique(l)\n def unique(l) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_34_unique.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'unique' do\n assert [0, 2, 3, 5, 9, 123] == HumanEval.candidate([5, 3, 5, 2, 3, 3, 9, 0, 123])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_35_max_element", "language": "elixir", "prompt": "# Return maximum element in the list.\n\ndefmodule HumanEval do\n def candidate(l), do: max_element(l)\n def max_element(l) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_35_max_element.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'max_element' do\n assert 3 == HumanEval.candidate([1, 2, 3])\n assert 124 == HumanEval.candidate([5, 3, -5, 2, -3, 3, 9, 0, 124, 1, -10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_36_fizz_buzz", "language": "elixir", "prompt": "# Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.\n\ndefmodule HumanEval do\n def candidate(n), do: fizz_buzz(n)\n def fizz_buzz(n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_36_fizz_buzz.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fizz_buzz' do\n assert 0 == HumanEval.candidate(50)\n assert 2 == HumanEval.candidate(78)\n assert 3 == HumanEval.candidate(79)\n assert 3 == HumanEval.candidate(100)\n assert 6 == HumanEval.candidate(200)\n assert 192 == HumanEval.candidate(4000)\n assert 639 == HumanEval.candidate(10000)\n assert 8026 == HumanEval.candidate(100000)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_37_sort_even", "language": "elixir", "prompt": "# This function takes a list l and returns a list l' such that\n# l' is identical to l in the odd indicies, while its values at the even indicies are equal\n# to the values of the even indicies of l, but sorted.\n\ndefmodule HumanEval do\n def candidate(l), do: sort_even(l)\n def sort_even(l) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_37_sort_even.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sort_even' do\n assert [1, 2, 3] == HumanEval.candidate([1, 2, 3])\n assert [-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123] == HumanEval.candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])\n assert [-12, 8, 3, 4, 5, 2, 12, 11, 23, -10] == HumanEval.candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_39_prime_fib", "language": "elixir", "prompt": "# prime_fib returns n-th number that is a Fibonacci number and it's also prime.\n\ndefmodule HumanEval do\n def candidate(n), do: prime_fib(n)\n def prime_fib(n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_39_prime_fib.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'prime_fib' do\n assert 2 == HumanEval.candidate(1)\n assert 3 == HumanEval.candidate(2)\n assert 5 == HumanEval.candidate(3)\n assert 13 == HumanEval.candidate(4)\n assert 89 == HumanEval.candidate(5)\n assert 233 == HumanEval.candidate(6)\n assert 1597 == HumanEval.candidate(7)\n assert 28657 == HumanEval.candidate(8)\n assert 514229 == HumanEval.candidate(9)\n assert 433494437 == HumanEval.candidate(10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_3_below_zero", "language": "elixir", "prompt": "# You're given a list of deposit and withdrawal operations on a bank account that starts with\n# zero balance. Your task is to detect if at any point the balance of account fallls below zero, and\n# at that point function should return True. Otherwise it should return False.\n\ndefmodule HumanEval do\n def candidate(operations), do: below_zero(operations)\n def below_zero(operations) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_3_below_zero.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'below_zero' do\n assert false == HumanEval.candidate([])\n assert false == HumanEval.candidate([1, 2, -3, 1, 2, -3])\n assert true == HumanEval.candidate([1, 2, -4, 5, 6])\n assert false == HumanEval.candidate([1, -1, 2, -2, 5, -5, 4, -4])\n assert true == HumanEval.candidate([1, -1, 2, -2, 5, -5, 4, -5])\n assert true == HumanEval.candidate([1, -2, 2, -2, 5, -5, 4, -4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_40_triples_sum_to_zero", "language": "elixir", "prompt": "# triples_sum_to_zero takes a list of integers as an input.\n# it returns True if there are three distinct elements in the list that\n# sum to zero, and False otherwise.\n\ndefmodule HumanEval do\n def candidate(l), do: triples_sum_to_zero(l)\n def triples_sum_to_zero(l) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_40_triples_sum_to_zero.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'triples_sum_to_zero' do\n assert false == HumanEval.candidate([1, 3, 5, 0])\n assert false == HumanEval.candidate([1, 3, 5, -1])\n assert true == HumanEval.candidate([1, 3, -2, 1])\n assert false == HumanEval.candidate([1, 2, 3, 7])\n assert false == HumanEval.candidate([1, 2, 5, 7])\n assert true == HumanEval.candidate([2, 4, -5, 3, 9, 7])\n assert false == HumanEval.candidate([1])\n assert false == HumanEval.candidate([1, 3, 5, -100])\n assert false == HumanEval.candidate([100, 3, 5, -100])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_42_incr_list", "language": "elixir", "prompt": "# Return list with elements incremented by 1.\n\ndefmodule HumanEval do\n def candidate(l), do: incr_list(l)\n def incr_list(l) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_42_incr_list.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'incr_list' do\n assert [] == HumanEval.candidate([])\n assert [4, 3, 2] == HumanEval.candidate([3, 2, 1])\n assert [6, 3, 6, 3, 4, 4, 10, 1, 124] == HumanEval.candidate([5, 2, 5, 2, 3, 3, 9, 0, 123])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_43_pairs_sum_to_zero", "language": "elixir", "prompt": "# pairs_sum_to_zero takes a list of integers as an input.\n# it returns True if there are two distinct elements in the list that\n# sum to zero, and False otherwise.\n\ndefmodule HumanEval do\n def candidate(l), do: pairs_sum_to_zero(l)\n def pairs_sum_to_zero(l) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_43_pairs_sum_to_zero.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'pairs_sum_to_zero' do\n assert false == HumanEval.candidate([1, 3, 5, 0])\n assert false == HumanEval.candidate([1, 3, -2, 1])\n assert false == HumanEval.candidate([1, 2, 3, 7])\n assert true == HumanEval.candidate([2, 4, -5, 3, 5, 7])\n assert false == HumanEval.candidate([1])\n assert true == HumanEval.candidate([-3, 9, -1, 3, 2, 30])\n assert true == HumanEval.candidate([-3, 9, -1, 3, 2, 31])\n assert false == HumanEval.candidate([-3, 9, -1, 4, 2, 30])\n assert false == HumanEval.candidate([-3, 9, -1, 4, 2, 31])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_44_change_base", "language": "elixir", "prompt": "# Change numerical base of input number x to base.\n# return string representation after the conversion.\n# base numbers are less than 10.\n\ndefmodule HumanEval do\n def candidate(x, base), do: change_base(x, base)\n def change_base(x, base) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_44_change_base.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'change_base' do\n assert \"22\" == HumanEval.candidate(8, 3)\n assert \"100\" == HumanEval.candidate(9, 3)\n assert \"11101010\" == HumanEval.candidate(234, 2)\n assert \"10000\" == HumanEval.candidate(16, 2)\n assert \"1000\" == HumanEval.candidate(8, 2)\n assert \"111\" == HumanEval.candidate(7, 2)\n assert \"2\" == HumanEval.candidate(2, 3)\n assert \"3\" == HumanEval.candidate(3, 4)\n assert \"4\" == HumanEval.candidate(4, 5)\n assert \"5\" == HumanEval.candidate(5, 6)\n assert \"6\" == HumanEval.candidate(6, 7)\n assert \"7\" == HumanEval.candidate(7, 8)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_45_triangle_area", "language": "elixir", "prompt": "# Given length of a side and high return area for a triangle.\n\ndefmodule HumanEval do\n def candidate(a, h), do: triangle_area(a, h)\n def triangle_area(a, h) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_45_triangle_area.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'triangle_area' do\n assert 7.5 == HumanEval.candidate(5, 3)\n assert 2.0 == HumanEval.candidate(2, 2)\n assert 40.0 == HumanEval.candidate(10, 8)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_46_fib4", "language": "elixir", "prompt": "# The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:\n# fib4(0) -> 0\n# fib4(1) -> 0\n# fib4(2) -> 2\n# fib4(3) -> 0\n# fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).\n# Please write a function to efficiently compute the n-th element of the fib4 number sequence. Do not use recursion.\n\ndefmodule HumanEval do\n def candidate(n), do: fib4(n)\n def fib4(n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_46_fib4.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fib4' do\n assert 4 == HumanEval.candidate(5)\n assert 28 == HumanEval.candidate(8)\n assert 104 == HumanEval.candidate(10)\n assert 386 == HumanEval.candidate(12)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_47_median", "language": "elixir", "prompt": "# Return median of elements in the list l.\n\ndefmodule HumanEval do\n def candidate(l), do: median(l)\n def median(l) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_47_median.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'median' do\n assert 3 == HumanEval.candidate([3, 1, 2, 4, 5])\n assert 8.0 == HumanEval.candidate([-10, 4, 6, 1000, 10, 20])\n assert 5 == HumanEval.candidate([5])\n assert 5.5 == HumanEval.candidate([6, 5])\n assert 7 == HumanEval.candidate([8, 1, 3, 9, 9, 2, 7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_48_is_palindrome", "language": "elixir", "prompt": "# Checks if given string is a palindrome\n\ndefmodule HumanEval do\n def candidate(text), do: is_palindrome(text)\n def is_palindrome(text) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_48_is_palindrome.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_palindrome' do\n assert true == HumanEval.candidate(\"\")\n assert true == HumanEval.candidate(\"aba\")\n assert true == HumanEval.candidate(\"aaaaa\")\n assert false == HumanEval.candidate(\"zbcd\")\n assert true == HumanEval.candidate(\"xywyx\")\n assert false == HumanEval.candidate(\"xywyz\")\n assert false == HumanEval.candidate(\"xywzx\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_49_modp", "language": "elixir", "prompt": "# Return 2^n modulo p (be aware of numerics).\n\ndefmodule HumanEval do\n def candidate(n, p), do: modp(n, p)\n def modp(n, p) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_49_modp.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'modp' do\n assert 3 == HumanEval.candidate(3, 5)\n assert 2 == HumanEval.candidate(1101, 101)\n assert 1 == HumanEval.candidate(0, 101)\n assert 8 == HumanEval.candidate(3, 11)\n assert 1 == HumanEval.candidate(100, 101)\n assert 4 == HumanEval.candidate(30, 5)\n assert 3 == HumanEval.candidate(31, 5)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_4_mean_absolute_deviation", "language": "elixir", "prompt": "# For a given list of input numbers, calculate Mean Absolute Deviation\n# around the mean of this dataset.\n# Mean Absolute Deviation is the average absolute difference between each\n# element and a centerpoint (mean in this case):\n# MAD = average | x - x_mean |\n\ndefmodule HumanEval do\n def candidate(numbers), do: mean_absolute_deviation(numbers)\n def mean_absolute_deviation(numbers) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_4_mean_absolute_deviation.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'mean_absolute_deviation' do\n assert 0.5 == HumanEval.candidate([1.0, 2.0])\n assert 1.0 == HumanEval.candidate([1.0, 2.0, 3.0, 4.0])\n assert 1.2 == HumanEval.candidate([1.0, 2.0, 3.0, 4.0, 5.0])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_51_remove_vowels", "language": "elixir", "prompt": "# remove_vowels is a function that takes string and returns string without vowels.\n\ndefmodule HumanEval do\n def candidate(text), do: remove_vowels(text)\n def remove_vowels(text) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_51_remove_vowels.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'remove_vowels' do\n assert \"\" == HumanEval.candidate(\"\")\n assert \"bcdf\nghjklm\" == HumanEval.candidate(\"abcdef\nghijklm\")\n assert \"fdcb\" == HumanEval.candidate(\"fedcba\")\n assert \"\" == HumanEval.candidate(\"eeeee\")\n assert \"cB\" == HumanEval.candidate(\"acBAA\")\n assert \"cB\" == HumanEval.candidate(\"EcBOO\")\n assert \"ybcd\" == HumanEval.candidate(\"ybcd\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_52_below_threshold", "language": "elixir", "prompt": "# Return True if all numbers in the list l are below threshold t.\n\ndefmodule HumanEval do\n def candidate(l, t), do: below_threshold(l, t)\n def below_threshold(l, t) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_52_below_threshold.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'below_threshold' do\n assert true == HumanEval.candidate([1, 2, 4, 10], 100)\n assert false == HumanEval.candidate([1, 20, 4, 10], 5)\n assert true == HumanEval.candidate([1, 20, 4, 10], 21)\n assert true == HumanEval.candidate([1, 20, 4, 10], 22)\n assert true == HumanEval.candidate([1, 8, 4, 10], 11)\n assert false == HumanEval.candidate([1, 8, 4, 10], 10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_53_add", "language": "elixir", "prompt": "# Add two numbers x and y\n\ndefmodule HumanEval do\n def candidate(x, y), do: add(x, y)\n def add(x, y) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_53_add.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'add' do\n assert 1 == HumanEval.candidate(0, 1)\n assert 1 == HumanEval.candidate(1, 0)\n assert 5 == HumanEval.candidate(2, 3)\n assert 12 == HumanEval.candidate(5, 7)\n assert 12 == HumanEval.candidate(7, 5)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_54_same_chars", "language": "elixir", "prompt": "# Check if two words have the same characters.\n\ndefmodule HumanEval do\n def candidate(s0, s1), do: same_chars(s0, s1)\n def same_chars(s0, s1) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_54_same_chars.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'same_chars' do\n assert true == HumanEval.candidate(\"eabcdzzzz\", \"dddzzzzzzzddeddabc\")\n assert true == HumanEval.candidate(\"abcd\", \"dddddddabc\")\n assert true == HumanEval.candidate(\"dddddddabc\", \"abcd\")\n assert false == HumanEval.candidate(\"eabcd\", \"dddddddabc\")\n assert false == HumanEval.candidate(\"abcd\", \"dddddddabcf\")\n assert false == HumanEval.candidate(\"eabcdzzzz\", \"dddzzzzzzzddddabc\")\n assert false == HumanEval.candidate(\"aabb\", \"aaccc\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_55_fib", "language": "elixir", "prompt": "# Return n-th Fibonacci number.\n\ndefmodule HumanEval do\n def candidate(n), do: fib(n)\n def fib(n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_55_fib.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fib' do\n assert 55 == HumanEval.candidate(10)\n assert 1 == HumanEval.candidate(1)\n assert 21 == HumanEval.candidate(8)\n assert 89 == HumanEval.candidate(11)\n assert 144 == HumanEval.candidate(12)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_56_correct_bracketing", "language": "elixir", "prompt": "# brackets is a string of \"<\" and \">\".\n# return True if every opening bracket has a corresponding closing bracket.\n\ndefmodule HumanEval do\n def candidate(brackets), do: correct_bracketing(brackets)\n def correct_bracketing(brackets) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_56_correct_bracketing.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'correct_bracketing' do\n assert true == HumanEval.candidate(\"<>\")\n assert true == HumanEval.candidate(\"<<><>>\")\n assert true == HumanEval.candidate(\"<><><<><>><>\")\n assert true == HumanEval.candidate(\"<><><<<><><>><>><<><><<>>>\")\n assert false == HumanEval.candidate(\"<<<><>>>>\")\n assert false == HumanEval.candidate(\"><<>\")\n assert false == HumanEval.candidate(\"<\")\n assert false == HumanEval.candidate(\"<<<<\")\n assert false == HumanEval.candidate(\">\")\n assert false == HumanEval.candidate(\"<<>\")\n assert false == HumanEval.candidate(\"<><><<><>><>><<>\")\n assert false == HumanEval.candidate(\"<><><<><>><>>><>\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_57_monotonic", "language": "elixir", "prompt": "# Return True is list elements are monotonically increasing or decreasing.\n\ndefmodule HumanEval do\n def candidate(l), do: monotonic(l)\n def monotonic(l) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_57_monotonic.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'monotonic' do\n assert true == HumanEval.candidate([1, 2, 4, 10])\n assert true == HumanEval.candidate([1, 2, 4, 20])\n assert false == HumanEval.candidate([1, 20, 4, 10])\n assert true == HumanEval.candidate([4, 1, 0, -10])\n assert true == HumanEval.candidate([4, 1, 1, 0])\n assert false == HumanEval.candidate([1, 2, 3, 2, 5, 60])\n assert true == HumanEval.candidate([1, 2, 3, 4, 5, 60])\n assert true == HumanEval.candidate([9, 9, 9, 9])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_58_common", "language": "elixir", "prompt": "# Return sorted unique common elements for two lists.\n\ndefmodule HumanEval do\n def candidate(l1, l2), do: common(l1, l2)\n def common(l1, l2) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_58_common.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'common' do\n assert [1, 5, 653] == HumanEval.candidate([1, 4, 3, 34, 653, 2, 5], [5, 7, 1, 5, 9, 653, 121])\n assert [2, 3] == HumanEval.candidate([5, 3, 2, 8], [3, 2])\n assert [2, 3, 4] == HumanEval.candidate([4, 3, 2, 8], [3, 2, 4])\n assert [] == HumanEval.candidate([4, 3, 2, 8], [])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_59_largest_prime_factor", "language": "elixir", "prompt": "# Return the largest prime factor of n. Assume n > 1 and is not a prime.\n\ndefmodule HumanEval do\n def candidate(n), do: largest_prime_factor(n)\n def largest_prime_factor(n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_59_largest_prime_factor.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'largest_prime_factor' do\n assert 5 == HumanEval.candidate(15)\n assert 3 == HumanEval.candidate(27)\n assert 7 == HumanEval.candidate(63)\n assert 11 == HumanEval.candidate(330)\n assert 29 == HumanEval.candidate(13195)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_5_intersperse", "language": "elixir", "prompt": "# Insert a number 'delimeter' between every two consecutive elements of input list `numbers'\n\ndefmodule HumanEval do\n def candidate(numbers, delimeter), do: intersperse(numbers, delimeter)\n def intersperse(numbers, delimeter) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_5_intersperse.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'intersperse' do\n assert [] == HumanEval.candidate([], 7)\n assert [5, 8, 6, 8, 3, 8, 2] == HumanEval.candidate([5, 6, 3, 2], 8)\n assert [2, 2, 2, 2, 2] == HumanEval.candidate([2, 2, 2], 2)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_60_sum_to_n", "language": "elixir", "prompt": "# sum_to_n is a function that sums numbers from 1 to n.\n\ndefmodule HumanEval do\n def candidate(n), do: sum_to_n(n)\n def sum_to_n(n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_60_sum_to_n.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sum_to_n' do\n assert 1 == HumanEval.candidate(1)\n assert 21 == HumanEval.candidate(6)\n assert 66 == HumanEval.candidate(11)\n assert 465 == HumanEval.candidate(30)\n assert 5050 == HumanEval.candidate(100)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_61_correct_bracketing", "language": "elixir", "prompt": "# brackets is a string of \"(\" and \")\".\n# return True if every opening bracket has a corresponding closing bracket.\n\ndefmodule HumanEval do\n def candidate(brackets), do: correct_bracketing(brackets)\n def correct_bracketing(brackets) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_61_correct_bracketing.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'correct_bracketing' do\n assert true == HumanEval.candidate(\"()\")\n assert true == HumanEval.candidate(\"(()())\")\n assert true == HumanEval.candidate(\"()()(()())()\")\n assert true == HumanEval.candidate(\"()()((()()())())(()()(()))\")\n assert false == HumanEval.candidate(\"((()())))\")\n assert false == HumanEval.candidate(\")(()\")\n assert false == HumanEval.candidate(\"(\")\n assert false == HumanEval.candidate(\"((((\")\n assert false == HumanEval.candidate(\")\")\n assert false == HumanEval.candidate(\"(()\")\n assert false == HumanEval.candidate(\"()()(()())())(()\")\n assert false == HumanEval.candidate(\"()()(()())()))()\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_62_derivative", "language": "elixir", "prompt": "# xs represent coefficients of a polynomial.\n# xs[0] + xs[1] * x + xs[2] * x^2 + ....\n# Return derivative of this polynomial in the same form.\n\ndefmodule HumanEval do\n def candidate(xs), do: derivative(xs)\n def derivative(xs) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_62_derivative.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'derivative' do\n assert [1, 4, 12, 20] == HumanEval.candidate([3, 1, 2, 4, 5])\n assert [2, 6] == HumanEval.candidate([1, 2, 3])\n assert [2, 2] == HumanEval.candidate([3, 2, 1])\n assert [2, 2, 0, 16] == HumanEval.candidate([3, 2, 1, 0, 4])\n assert [] == HumanEval.candidate([1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_63_fibfib", "language": "elixir", "prompt": "# The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:\n# fibfib(0) == 0\n# fibfib(1) == 0\n# fibfib(2) == 1\n# fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).\n# Please write a function to efficiently compute the n-th element of the fibfib number sequence.\n\ndefmodule HumanEval do\n def candidate(n), do: fibfib(n)\n def fibfib(n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_63_fibfib.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fibfib' do\n assert 1 == HumanEval.candidate(2)\n assert 0 == HumanEval.candidate(1)\n assert 4 == HumanEval.candidate(5)\n assert 24 == HumanEval.candidate(8)\n assert 81 == HumanEval.candidate(10)\n assert 274 == HumanEval.candidate(12)\n assert 927 == HumanEval.candidate(14)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_64_vowels_count", "language": "elixir", "prompt": "# Write a function vowels_count which takes a string representing\n# a word as input and returns the number of vowels in the string.\n# Vowels in this case are 'a', 'e', 'i', 'o', 'u'. Here, 'y' is also a\n# vowel, but only when it is at the end of the given word.\n# Example:\n\ndefmodule HumanEval do\n def candidate(s), do: vowels_count(s)\n def vowels_count(s) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_64_vowels_count.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'vowels_count' do\n assert 2 == HumanEval.candidate(\"abcde\")\n assert 3 == HumanEval.candidate(\"Alone\")\n assert 2 == HumanEval.candidate(\"key\")\n assert 1 == HumanEval.candidate(\"bye\")\n assert 2 == HumanEval.candidate(\"keY\")\n assert 1 == HumanEval.candidate(\"bYe\")\n assert 3 == HumanEval.candidate(\"ACEDY\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_65_circular_shift", "language": "elixir", "prompt": "# Circular shift the digits of the integer x, shift the digits right by shift\n# and return the result as a string.\n# If shift > number of digits, return digits reversed.\n\ndefmodule HumanEval do\n def candidate(x, shift), do: circular_shift(x, shift)\n def circular_shift(x, shift) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_65_circular_shift.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'circular_shift' do\n assert \"001\" == HumanEval.candidate(100, 2)\n assert \"12\" == HumanEval.candidate(12, 2)\n assert \"79\" == HumanEval.candidate(97, 8)\n assert \"21\" == HumanEval.candidate(12, 1)\n assert \"11\" == HumanEval.candidate(11, 101)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_66_digitSum", "language": "elixir", "prompt": "# Task\n# Write a function that takes a string as input and returns the sum of the upper characters only'\n# ASCII codes.\n# Examples:\n\ndefmodule HumanEval do\n def candidate(s), do: digitSum(s)\n def digitSum(s) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_66_digitSum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'digitSum' do\n assert 0 == HumanEval.candidate(\"\")\n assert 131 == HumanEval.candidate(\"abAB\")\n assert 67 == HumanEval.candidate(\"abcCd\")\n assert 69 == HumanEval.candidate(\"helloE\")\n assert 131 == HumanEval.candidate(\"woArBld\")\n assert 153 == HumanEval.candidate(\"aAaaaXa\")\n assert 151 == HumanEval.candidate(\" How are yOu?\")\n assert 327 == HumanEval.candidate(\"You arE Very Smart\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_67_fruit_distribution", "language": "elixir", "prompt": "# In this task, you will be given a string that represents a number of apples and oranges \n# that are distributed in a basket of fruit this basket contains \n# apples, oranges, and mango fruits. Given the string that represents the total number of \n# the oranges and apples and an integer that represent the total number of the fruits \n# in the basket return the number of the mango fruits in the basket.\n# for examble:\n\ndefmodule HumanEval do\n def candidate(s, n), do: fruit_distribution(s, n)\n def fruit_distribution(s, n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_67_fruit_distribution.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fruit_distribution' do\n assert 8 == HumanEval.candidate(\"5 apples and 6 oranges\", 19)\n assert 10 == HumanEval.candidate(\"5 apples and 6 oranges\", 21)\n assert 2 == HumanEval.candidate(\"0 apples and 1 oranges\", 3)\n assert 2 == HumanEval.candidate(\"1 apples and 0 oranges\", 3)\n assert 95 == HumanEval.candidate(\"2 apples and 3 oranges\", 100)\n assert 0 == HumanEval.candidate(\"2 apples and 3 oranges\", 5)\n assert 19 == HumanEval.candidate(\"1 apples and 100 oranges\", 120)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_68_pluck", "language": "elixir", "prompt": "# \"Given an array representing a branch of a tree that has non-negative integer nodes\n# your task is to pluck one of the nodes and return it.\n# The plucked node should be the node with the smallest even value.\n# If multiple nodes with the same smallest even value are found return the node that has smallest index.\n# The plucked node should be returned in a list, [ smalest_value, its index ],\n# If there are no even values or the given array is empty, return [].\n# Example 1:\n# Explanation: 2 has the smallest even value, and 2 has the smallest index.\n# Example 2:\n# Explanation: 2 has the smallest even value, and 2 has the smallest index.\n# Example 3:\n# Example 4:\n# Explanation: 0 is the smallest value, but there are two zeros,\n# so we will choose the first zero, which has the smallest index.\n# Constraints:\n# * 1 <= nodes.length <= 10000\n# * 0 <= node.value\n\ndefmodule HumanEval do\n def candidate(arr), do: pluck(arr)\n def pluck(arr) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_68_pluck.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'pluck' do\n assert [2, 1] == HumanEval.candidate([4, 2, 3])\n assert [2, 1] == HumanEval.candidate([1, 2, 3])\n assert [] == HumanEval.candidate([])\n assert [0, 1] == HumanEval.candidate([5, 0, 3, 0, 4, 2])\n assert [0, 3] == HumanEval.candidate([1, 2, 3, 0, 5, 3])\n assert [4, 1] == HumanEval.candidate([5, 4, 8, 4, 8])\n assert [6, 1] == HumanEval.candidate([7, 6, 7, 1])\n assert [] == HumanEval.candidate([7, 9, 7, 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_69_search", "language": "elixir", "prompt": "# You are given a non-empty list of positive integers. Return the greatest integer that is greater than \n# zero, and has a frequency greater than or equal to the value of the integer itself. \n# The frequency of an integer is the number of times it appears in the list.\n# If no such a value exist, return -1.\n# Examples:\n\ndefmodule HumanEval do\n def candidate(lst), do: search(lst)\n def search(lst) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_69_search.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'search' do\n assert 1 == HumanEval.candidate([5, 5, 5, 5, 1])\n assert 4 == HumanEval.candidate([4, 1, 4, 1, 4, 4])\n assert -1 == HumanEval.candidate([3, 3])\n assert 8 == HumanEval.candidate([8, 8, 8, 8, 8, 8, 8, 8])\n assert 2 == HumanEval.candidate([2, 3, 3, 2, 2])\n assert 1 == HumanEval.candidate([2, 7, 8, 8, 4, 8, 7, 3, 9, 6, 5, 10, 4, 3, 6, 7, 1, 7, 4, 10, 8, 1])\n assert 2 == HumanEval.candidate([3, 2, 8, 2])\n assert 1 == HumanEval.candidate([6, 7, 1, 8, 8, 10, 5, 8, 5, 3, 10])\n assert -1 == HumanEval.candidate([8, 8, 3, 6, 5, 6, 4])\n assert 1 == HumanEval.candidate([6, 9, 6, 7, 1, 4, 7, 1, 8, 8, 9, 8, 10, 10, 8, 4, 10, 4, 10, 1, 2, 9, 5, 7, 9])\n assert 1 == HumanEval.candidate([1, 9, 10, 1, 3])\n assert 5 == HumanEval.candidate([6, 9, 7, 5, 8, 7, 5, 3, 7, 5, 10, 10, 3, 6, 10, 2, 8, 6, 5, 4, 9, 5, 3, 10])\n assert 1 == HumanEval.candidate([1])\n assert 4 == HumanEval.candidate([8, 8, 10, 6, 4, 3, 5, 8, 2, 4, 2, 8, 4, 6, 10, 4, 2, 1, 10, 2, 1, 1, 5])\n assert 2 == HumanEval.candidate([2, 10, 4, 8, 2, 10, 5, 1, 2, 9, 5, 5, 6, 3, 8, 6, 4, 10])\n assert 1 == HumanEval.candidate([1, 6, 10, 1, 6, 9, 10, 8, 6, 8, 7, 3])\n assert 4 == HumanEval.candidate([9, 2, 4, 1, 5, 1, 5, 2, 5, 7, 7, 7, 3, 10, 1, 5, 4, 2, 8, 4, 1, 9, 10, 7, 10, 2, 8, 10, 9, 4])\n assert 4 == HumanEval.candidate([2, 6, 4, 2, 8, 7, 5, 6, 4, 10, 4, 6, 3, 7, 8, 8, 3, 1, 4, 2, 2, 10, 7])\n assert 2 == HumanEval.candidate([9, 8, 6, 10, 2, 6, 10, 2, 7, 8, 10, 3, 8, 2, 6, 2, 3, 1])\n assert -1 == HumanEval.candidate([5, 5, 3, 9, 5, 6, 3, 2, 8, 5, 6, 10, 10, 6, 8, 4, 10, 7, 7, 10, 8])\n assert -1 == HumanEval.candidate([10])\n assert 2 == HumanEval.candidate([9, 7, 7, 2, 4, 7, 2, 10, 9, 7, 5, 7, 2])\n assert 1 == HumanEval.candidate([5, 4, 10, 2, 1, 1, 10, 3, 6, 1, 8])\n assert 1 == HumanEval.candidate([7, 9, 9, 9, 3, 4, 1, 5, 9, 1, 2, 1, 1, 10, 7, 5, 6, 7, 6, 7, 7, 6])\n assert -1 == HumanEval.candidate([3, 10, 10, 9, 2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_6_parse_nested_parens", "language": "elixir", "prompt": "# Input to this function is a string represented multiple groups for nested parentheses separated by spaces.\n# For each of the group, output the deepest level of nesting of parentheses.\n# E.g. (()()) has maximum two levels of nesting while ((())) has three.\n\ndefmodule HumanEval do\n def candidate(paren_string), do: parse_nested_parens(paren_string)\n def parse_nested_parens(paren_string) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_6_parse_nested_parens.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'parse_nested_parens' do\n assert [2, 3, 1, 3] == HumanEval.candidate(\"(()()) ((())) () ((())()())\")\n assert [1, 2, 3, 4] == HumanEval.candidate(\"() (()) ((())) (((())))\")\n assert [4] == HumanEval.candidate(\"(()(())((())))\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_70_strange_sort_list", "language": "elixir", "prompt": "# Given list of integers, return list in strange order.\n# Strange sorting, is when you start with the minimum value,\n# then maximum of the remaining integers, then minimum and so on.\n# Examples:\n\ndefmodule HumanEval do\n def candidate(lst), do: strange_sort_list(lst)\n def strange_sort_list(lst) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_70_strange_sort_list.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'strange_sort_list' do\n assert [1, 4, 2, 3] == HumanEval.candidate([1, 2, 3, 4])\n assert [5, 9, 6, 8, 7] == HumanEval.candidate([5, 6, 7, 8, 9])\n assert [1, 5, 2, 4, 3] == HumanEval.candidate([1, 2, 3, 4, 5])\n assert [1, 9, 5, 8, 6, 7] == HumanEval.candidate([5, 6, 7, 8, 9, 1])\n assert [5, 5, 5, 5] == HumanEval.candidate([5, 5, 5, 5])\n assert [] == HumanEval.candidate([])\n assert [1, 8, 2, 7, 3, 6, 4, 5] == HumanEval.candidate([1, 2, 3, 4, 5, 6, 7, 8])\n assert [-5, 5, -5, 5, 0, 2, 2, 2] == HumanEval.candidate([0, 2, 2, 2, 5, 5, -5, -5])\n assert [111111] == HumanEval.candidate([111111])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_71_triangle_area", "language": "elixir", "prompt": "# Given the lengths of the three sides of a triangle. Return the area of\n# the triangle rounded to 2 decimal points if the three sides form a valid triangle. \n# Otherwise return -1\n# Three sides make a valid triangle when the sum of any two sides is greater \n# than the third side.\n# Example:\n\ndefmodule HumanEval do\n def candidate(a, b, c), do: triangle_area(a, b, c)\n def triangle_area(a, b, c) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_71_triangle_area.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'triangle_area' do\n assert 6.0 == HumanEval.candidate(3, 4, 5)\n assert -1 == HumanEval.candidate(1, 2, 10)\n assert 8.18 == HumanEval.candidate(4, 8, 5)\n assert 1.73 == HumanEval.candidate(2, 2, 2)\n assert -1 == HumanEval.candidate(1, 2, 3)\n assert 16.25 == HumanEval.candidate(10, 5, 7)\n assert -1 == HumanEval.candidate(2, 6, 3)\n assert 0.43 == HumanEval.candidate(1, 1, 1)\n assert -1 == HumanEval.candidate(2, 2, 10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_72_will_it_fly", "language": "elixir", "prompt": "# Write a function that returns True if the object q will fly, and False otherwise.\n# The object q will fly if it's balanced (it is a palindromic list) and the sum of its elements is less than or equal the maximum possible weight w.\n# Example:\n# # 1+2 is less than the maximum possible weight, but it's unbalanced.\n# # it's balanced, but 3+2+3 is more than the maximum possible weight.\n# # 3+2+3 is less than the maximum possible weight, and it's balanced.\n# # 3 is less than the maximum possible weight, and it's balanced.\n\ndefmodule HumanEval do\n def candidate(q, w), do: will_it_fly(q, w)\n def will_it_fly(q, w) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_72_will_it_fly.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'will_it_fly' do\n assert true == HumanEval.candidate([3, 2, 3], 9)\n assert false == HumanEval.candidate([1, 2], 5)\n assert true == HumanEval.candidate([3], 5)\n assert false == HumanEval.candidate([3, 2, 3], 1)\n assert false == HumanEval.candidate([1, 2, 3], 6)\n assert true == HumanEval.candidate([5], 5)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_73_smallest_change", "language": "elixir", "prompt": "# Given an array arr of integers, find the minimum number of elements that\n# need to be changed to make the array palindromic. A palindromic array is an array that\n# is read the same backwards and forwards. In one change, you can change one element to any other element.\n# For example:\n\ndefmodule HumanEval do\n def candidate(arr), do: smallest_change(arr)\n def smallest_change(arr) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_73_smallest_change.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'smallest_change' do\n assert 4 == HumanEval.candidate([1, 2, 3, 5, 4, 7, 9, 6])\n assert 1 == HumanEval.candidate([1, 2, 3, 4, 3, 2, 2])\n assert 1 == HumanEval.candidate([1, 4, 2])\n assert 1 == HumanEval.candidate([1, 4, 4, 2])\n assert 0 == HumanEval.candidate([1, 2, 3, 2, 1])\n assert 0 == HumanEval.candidate([3, 1, 1, 3])\n assert 0 == HumanEval.candidate([1])\n assert 1 == HumanEval.candidate([0, 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_74_total_match", "language": "elixir", "prompt": "# Write a function that accepts two lists of strings and returns the list that has \n# total number of chars in the all strings of the list less than the other list.\n# if the two lists have the same number of chars, return the first list.\n# Examples\n\ndefmodule HumanEval do\n def candidate(lst1, lst2), do: total_match(lst1, lst2)\n def total_match(lst1, lst2) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_74_total_match.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'total_match' do\n assert [] == HumanEval.candidate([], [])\n assert [\"hi\", \"hi\"] == HumanEval.candidate([\"hi\", \"admin\"], [\"hi\", \"hi\"])\n assert [\"hi\", \"admin\"] == HumanEval.candidate([\"hi\", \"admin\"], [\"hi\", \"hi\", \"admin\", \"project\"])\n assert [\"4\"] == HumanEval.candidate([\"4\"], [\"1\", \"2\", \"3\", \"4\", \"5\"])\n assert [\"hI\", \"Hi\"] == HumanEval.candidate([\"hi\", \"admin\"], [\"hI\", \"Hi\"])\n assert [\"hI\", \"hi\", \"hi\"] == HumanEval.candidate([\"hi\", \"admin\"], [\"hI\", \"hi\", \"hi\"])\n assert [\"hi\", \"admin\"] == HumanEval.candidate([\"hi\", \"admin\"], [\"hI\", \"hi\", \"hii\"])\n assert [] == HumanEval.candidate([], [\"this\"])\n assert [] == HumanEval.candidate([\"this\"], [])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_75_is_multiply_prime", "language": "elixir", "prompt": "# Write a function that returns true if the given number is the multiplication of 3 prime numbers\n# and false otherwise.\n# Knowing that (a) is less then 100. \n# Example:\n# 30 = 2 * 3 * 5\n\ndefmodule HumanEval do\n def candidate(a), do: is_multiply_prime(a)\n def is_multiply_prime(a) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_75_is_multiply_prime.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_multiply_prime' do\n assert false == HumanEval.candidate(5)\n assert true == HumanEval.candidate(30)\n assert true == HumanEval.candidate(8)\n assert false == HumanEval.candidate(10)\n assert true == HumanEval.candidate(125)\n assert true == HumanEval.candidate(105)\n assert false == HumanEval.candidate(126)\n assert false == HumanEval.candidate(729)\n assert false == HumanEval.candidate(891)\n assert true == HumanEval.candidate(1001)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_76_is_simple_power", "language": "elixir", "prompt": "# Your task is to write a function that returns true if a number x is a simple\n# power of n and false in other cases.\n# x is a simple power of n if n**int=x\n# For example:\n\ndefmodule HumanEval do\n def candidate(x, n), do: is_simple_power(x, n)\n def is_simple_power(x, n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_76_is_simple_power.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_simple_power' do\n assert true == HumanEval.candidate(16, 2)\n assert false == HumanEval.candidate(143214, 16)\n assert true == HumanEval.candidate(4, 2)\n assert true == HumanEval.candidate(9, 3)\n assert true == HumanEval.candidate(16, 4)\n assert false == HumanEval.candidate(24, 2)\n assert false == HumanEval.candidate(128, 4)\n assert false == HumanEval.candidate(12, 6)\n assert true == HumanEval.candidate(1, 1)\n assert true == HumanEval.candidate(1, 12)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_77_iscube", "language": "elixir", "prompt": "# Write a function that takes an integer a and returns True \n# if this ingeger is a cube of some integer number.\n# Note: you may assume the input is always valid.\n# Examples:\n\ndefmodule HumanEval do\n def candidate(a), do: iscube(a)\n def iscube(a) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_77_iscube.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'iscube' do\n assert true == HumanEval.candidate(1)\n assert false == HumanEval.candidate(2)\n assert true == HumanEval.candidate(-1)\n assert true == HumanEval.candidate(64)\n assert false == HumanEval.candidate(180)\n assert true == HumanEval.candidate(1000)\n assert true == HumanEval.candidate(0)\n assert false == HumanEval.candidate(1729)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_78_hex_key", "language": "elixir", "prompt": "# You have been tasked to write a function that receives \n# a hexadecimal number as a string and counts the number of hexadecimal \n# digits that are primes (prime number, or a prime, is a natural number \n# greater than 1 that is not a product of two smaller natural numbers).\n# Hexadecimal digits are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.\n# Prime numbers are 2, 3, 5, 7, 11, 13, 17,...\n# So you have to determine a number of the following digits: 2, 3, 5, 7, \n# B (=decimal 11), D (=decimal 13).\n# Note: you may assume the input is always correct or empty string, \n# and symbols A,B,C,D,E,F are always uppercase.\n# Examples:\n\ndefmodule HumanEval do\n def candidate(num), do: hex_key(num)\n def hex_key(num) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_78_hex_key.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'hex_key' do\n assert 1 == HumanEval.candidate(\"AB\")\n assert 2 == HumanEval.candidate(\"1077E\")\n assert 4 == HumanEval.candidate(\"ABED1A33\")\n assert 2 == HumanEval.candidate(\"2020\")\n assert 6 == HumanEval.candidate(\"123456789ABCDEF0\")\n assert 12 == HumanEval.candidate(\"112233445566778899AABBCCDDEEFF00\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_79_decimal_to_binary", "language": "elixir", "prompt": "# You will be given a number in decimal form and your task is to convert it to\n# binary format. The function should return a string, with each character representing a binary\n# number. Each character in the string will be '0' or '1'.\n# There will be an extra couple of characters 'db' at the beginning and at the end of the string.\n# The extra characters are there to help with the format.\n# Examples:\n\ndefmodule HumanEval do\n def candidate(decimal), do: decimal_to_binary(decimal)\n def decimal_to_binary(decimal) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_79_decimal_to_binary.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'decimal_to_binary' do\n assert \"db0db\" == HumanEval.candidate(0)\n assert \"db100000db\" == HumanEval.candidate(32)\n assert \"db1100111db\" == HumanEval.candidate(103)\n assert \"db1111db\" == HumanEval.candidate(15)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_7_filter_by_substring", "language": "elixir", "prompt": "# Filter an input list of strings only for ones that contain given substring\n\ndefmodule HumanEval do\n def candidate(strings, substring), do: filter_by_substring(strings, substring)\n def filter_by_substring(strings, substring) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_7_filter_by_substring.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'filter_by_substring' do\n assert [] == HumanEval.candidate([], \"john\")\n assert [\"xxx\", \"xxxAAA\", \"xxx\"] == HumanEval.candidate([\"xxx\", \"asd\", \"xxy\", \"john doe\", \"xxxAAA\", \"xxx\"], \"xxx\")\n assert [\"xxx\", \"aaaxxy\", \"xxxAAA\", \"xxx\"] == HumanEval.candidate([\"xxx\", \"asd\", \"aaaxxy\", \"john doe\", \"xxxAAA\", \"xxx\"], \"xx\")\n assert [\"grunt\", \"prune\"] == HumanEval.candidate([\"grunt\", \"trumpet\", \"prune\", \"gruesome\"], \"run\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_80_is_happy", "language": "elixir", "prompt": "# You are given a string s.\n# Your task is to check if the string is happy or not.\n# A string is happy if its length is at least 3 and every 3 consecutive letters are distinct\n# For example:\n\ndefmodule HumanEval do\n def candidate(s), do: is_happy(s)\n def is_happy(s) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_80_is_happy.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_happy' do\n assert false == HumanEval.candidate(\"a\")\n assert false == HumanEval.candidate(\"aa\")\n assert true == HumanEval.candidate(\"abcd\")\n assert false == HumanEval.candidate(\"aabb\")\n assert true == HumanEval.candidate(\"adb\")\n assert false == HumanEval.candidate(\"xyy\")\n assert true == HumanEval.candidate(\"iopaxpoi\")\n assert false == HumanEval.candidate(\"iopaxioi\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_81_numerical_letter_grade", "language": "elixir", "prompt": "# It is the last week of the semester and the teacher has to give the grades\n# to students. The teacher has been making her own algorithm for grading.\n# The only problem is, she has lost the code she used for grading.\n# She has given you a list of GPAs for some students and you have to write \n# a function that can output a list of letter grades using the following table:\n# GPA | Letter grade\n# 4.0 A+\n# > 3.7 A \n# > 3.3 A- \n# > 3.0 B+\n# > 2.7 B \n# > 2.3 B-\n# > 2.0 C+\n# > 1.7 C\n# > 1.3 C-\n# > 1.0 D+ \n# > 0.7 D \n# > 0.0 D-\n# 0.0 E\n# Example:\n\ndefmodule HumanEval do\n def candidate(grades), do: numerical_letter_grade(grades)\n def numerical_letter_grade(grades) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_81_numerical_letter_grade.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'numerical_letter_grade' do\n assert [\"A+\", \"B\", \"C-\", \"C\", \"A-\"] == HumanEval.candidate([4.0, 3, 1.7, 2, 3.5])\n assert [\"D+\"] == HumanEval.candidate([1.2])\n assert [\"D-\"] == HumanEval.candidate([0.5])\n assert [\"E\"] == HumanEval.candidate([0.0])\n assert [\"D\", \"D-\", \"C-\", \"B\", \"B+\"] == HumanEval.candidate([1.0, 0.3, 1.5, 2.8, 3.3])\n assert [\"E\", \"D-\"] == HumanEval.candidate([0.0, 0.7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_82_prime_length", "language": "elixir", "prompt": "# Write a function that takes a string and returns True if the string\n# length is a prime number or False otherwise\n# Examples\n\ndefmodule HumanEval do\n def candidate(string), do: prime_length(string)\n def prime_length(string) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_82_prime_length.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'prime_length' do\n assert true == HumanEval.candidate(\"Hello\")\n assert true == HumanEval.candidate(\"abcdcba\")\n assert true == HumanEval.candidate(\"kittens\")\n assert false == HumanEval.candidate(\"orange\")\n assert true == HumanEval.candidate(\"wow\")\n assert true == HumanEval.candidate(\"world\")\n assert true == HumanEval.candidate(\"MadaM\")\n assert true == HumanEval.candidate(\"Wow\")\n assert false == HumanEval.candidate(\"\")\n assert true == HumanEval.candidate(\"HI\")\n assert true == HumanEval.candidate(\"go\")\n assert false == HumanEval.candidate(\"gogo\")\n assert false == HumanEval.candidate(\"aaaaaaaaaaaaaaa\")\n assert true == HumanEval.candidate(\"Madam\")\n assert false == HumanEval.candidate(\"M\")\n assert false == HumanEval.candidate(\"0\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_84_solve", "language": "elixir", "prompt": "# Given a positive integer N, return the total sum of its digits in binary.\n# Example\n# Variables:\n# @N integer\n# Constraints: 0 \u2264 N \u2264 10000.\n# Output:\n# a string of binary number\n\ndefmodule HumanEval do\n def candidate(N), do: solve(N)\n def solve(N) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_84_solve.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'solve' do\n assert \"1\" == HumanEval.candidate(1000)\n assert \"110\" == HumanEval.candidate(150)\n assert \"1100\" == HumanEval.candidate(147)\n assert \"1001\" == HumanEval.candidate(333)\n assert \"10010\" == HumanEval.candidate(963)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_85_add", "language": "elixir", "prompt": "# Given a non-empty list of integers lst. add the even elements that are at odd indices..\n# Examples:\n\ndefmodule HumanEval do\n def candidate(lst), do: add(lst)\n def add(lst) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_85_add.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'add' do\n assert 88 == HumanEval.candidate([4, 88])\n assert 122 == HumanEval.candidate([4, 5, 6, 7, 2, 122])\n assert 0 == HumanEval.candidate([4, 0, 6, 7])\n assert 12 == HumanEval.candidate([4, 4, 6, 8])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_86_anti_shuffle", "language": "elixir", "prompt": "# Write a function that takes a string and returns an ordered version of it.\n# Ordered version of string, is a string where all words (separated by space)\n# are replaced by a new word where all the characters arranged in\n# ascending order based on ascii value.\n# Note: You should keep the order of words and blank spaces in the sentence.\n# For example:\n\ndefmodule HumanEval do\n def candidate(s), do: anti_shuffle(s)\n def anti_shuffle(s) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_86_anti_shuffle.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'anti_shuffle' do\n assert \"Hi\" == HumanEval.candidate(\"Hi\")\n assert \"ehllo\" == HumanEval.candidate(\"hello\")\n assert \"bemnru\" == HumanEval.candidate(\"number\")\n assert \"abcd\" == HumanEval.candidate(\"abcd\")\n assert \"Hello !!!Wdlor\" == HumanEval.candidate(\"Hello World!!!\")\n assert \"\" == HumanEval.candidate(\"\")\n assert \".Hi My aemn is Meirst .Rboot How aer ?ouy\" == HumanEval.candidate(\"Hi. My name is Mister Robot. How are you?\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_87_get_row", "language": "elixir", "prompt": "# You are given a 2 dimensional data, as a nested lists,\n# which is similar to matrix, however, unlike matrices,\n# each row may contain a different number of columns.\n# Given lst, and integer x, find integers x in the list,\n# and return list of tuples, [(x1, y1), (x2, y2) ...] such that\n# each tuple is a coordinate - (row, columns), starting with 0.\n# Sort coordinates initially by rows in ascending order.\n# Also, sort coordinates of the row by columns in descending order.\n# Examples:\n\ndefmodule HumanEval do\n def candidate(lst, x), do: get_row(lst, x)\n def get_row(lst, x) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_87_get_row.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'get_row' do\n assert [{0, 0}, {1, 4}, {1, 0}, {2, 5}, {2, 0}] == HumanEval.candidate([[1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 1, 6], [1, 2, 3, 4, 5, 1]], 1)\n assert [{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}] == HumanEval.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], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6]], 2)\n assert [{0, 0}, {1, 0}, {2, 1}, {2, 0}, {3, 2}, {3, 0}, {4, 3}, {4, 0}, {5, 4}, {5, 0}, {6, 5}, {6, 0}] == HumanEval.candidate([[1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6], [1, 1, 3, 4, 5, 6], [1, 2, 1, 4, 5, 6], [1, 2, 3, 1, 5, 6], [1, 2, 3, 4, 1, 6], [1, 2, 3, 4, 5, 1]], 1)\n assert [] == HumanEval.candidate([], 1)\n assert [] == HumanEval.candidate([[1]], 2)\n assert [{2, 2}] == HumanEval.candidate([[], [1], [1, 2, 3]], 3)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_88_sort_array", "language": "elixir", "prompt": "# Given an array of non-negative integers, return a copy of the given array after sorting,\n# you will sort the given array in ascending order if the sum( first index value, last index value) is odd,\n# or sort it in descending order if the sum( first index value, last index value) is even.\n# Note:\n# * don't change the given array.\n# Examples:\n\ndefmodule HumanEval do\n def candidate(array), do: sort_array(array)\n def sort_array(array) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_88_sort_array.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sort_array' do\n assert [] == HumanEval.candidate([])\n assert [5] == HumanEval.candidate([5])\n assert [0, 1, 2, 3, 4, 5] == HumanEval.candidate([2, 4, 3, 0, 1, 5])\n assert [6, 5, 4, 3, 2, 1, 0] == HumanEval.candidate([2, 4, 3, 0, 1, 5, 6])\n assert [1, 2] == HumanEval.candidate([2, 1])\n assert [0, 11, 15, 32, 42, 87] == HumanEval.candidate([15, 42, 87, 32, 11, 0])\n assert [23, 21, 14, 11] == HumanEval.candidate([21, 14, 23, 11])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_89_encrypt", "language": "elixir", "prompt": "# Create a function encrypt that takes a string as an argument and\n# returns a string encrypted with the alphabet being rotated. \n# The alphabet should be rotated in a manner such that the letters \n# shift down by two multiplied to two places.\n# For example:\n\ndefmodule HumanEval do\n def candidate(s), do: encrypt(s)\n def encrypt(s) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_89_encrypt.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'encrypt' do\n assert \"lm\" == HumanEval.candidate(\"hi\")\n assert \"ewhjklnop\" == HumanEval.candidate(\"asdfghjkl\")\n assert \"kj\" == HumanEval.candidate(\"gf\")\n assert \"ix\" == HumanEval.candidate(\"et\")\n assert \"jeiajeaijeiak\" == HumanEval.candidate(\"faewfawefaewg\")\n assert \"lippsqcjvmirh\" == HumanEval.candidate(\"hellomyfriend\")\n assert \"hbdhpqrmpjylqmpyjlpmlyjrqpmqryjlpmqryjljygyjl\" == HumanEval.candidate(\"dxzdlmnilfuhmilufhlihufnmlimnufhlimnufhfucufh\")\n assert \"e\" == HumanEval.candidate(\"a\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_8_sum_product", "language": "elixir", "prompt": "# For a given list of integers, return a tuple consisting of a sum and a product of all the integers in a list.\n# Empty sum should be equal to 0 and empty product should be equal to 1.\n\ndefmodule HumanEval do\n def candidate(numbers), do: sum_product(numbers)\n def sum_product(numbers) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_8_sum_product.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sum_product' do\n assert {0, 1} == HumanEval.candidate([])\n assert {3, 1} == HumanEval.candidate([1, 1, 1])\n assert {100, 0} == HumanEval.candidate([100, 0])\n assert {15, 105} == HumanEval.candidate([3, 5, 7])\n assert {10, 10} == HumanEval.candidate([10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_90_next_smallest", "language": "elixir", "prompt": "# You are given a list of integers.\n# Write a function next_smallest() that returns the 2nd smallest element of the list.\n# Return None if there is no such element.\n\ndefmodule HumanEval do\n def candidate(lst), do: next_smallest(lst)\n def next_smallest(lst) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_90_next_smallest.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'next_smallest' do\n assert 2 == HumanEval.candidate([1, 2, 3, 4, 5])\n assert 2 == HumanEval.candidate([5, 1, 4, 3, 2])\n assert nil == HumanEval.candidate([])\n assert nil == HumanEval.candidate([1, 1])\n assert 1 == HumanEval.candidate([1, 1, 1, 1, 0])\n assert nil == HumanEval.candidate([1, 1])\n assert -35 == HumanEval.candidate([-35, 34, 12, -45])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_91_is_bored", "language": "elixir", "prompt": "# You'll be given a string of words, and your task is to count the number\n# of boredoms. A boredom is a sentence that starts with the word \"I\".\n# Sentences are delimited by '.', '?' or '!'.\n# For example:\n\ndefmodule HumanEval do\n def candidate(S), do: is_bored(S)\n def is_bored(S) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_91_is_bored.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_bored' do\n assert 0 == HumanEval.candidate(\"Hello world\")\n assert 0 == HumanEval.candidate(\"Is the sky blue?\")\n assert 1 == HumanEval.candidate(\"I love It !\")\n assert 0 == HumanEval.candidate(\"bIt\")\n assert 2 == HumanEval.candidate(\"I feel good today. I will be productive. will kill It\")\n assert 0 == HumanEval.candidate(\"You and I are going for a walk\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_92_any_int", "language": "elixir", "prompt": "# Create a function that takes 3 numbers.\n# Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.\n# Returns false in any other cases.\n# Examples\n\ndefmodule HumanEval do\n def candidate(x, y, z), do: any_int(x, y, z)\n def any_int(x, y, z) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_92_any_int.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'any_int' do\n assert true == HumanEval.candidate(2, 3, 1)\n assert false == HumanEval.candidate(2.5, 2, 3)\n assert false == HumanEval.candidate(1.5, 5, 3.5)\n assert false == HumanEval.candidate(2, 6, 2)\n assert true == HumanEval.candidate(4, 2, 2)\n assert false == HumanEval.candidate(2.2, 2.2, 2.2)\n assert true == HumanEval.candidate(-4, 6, 2)\n assert true == HumanEval.candidate(2, 1, 1)\n assert true == HumanEval.candidate(3, 4, 7)\n assert false == HumanEval.candidate(3.0, 4, 7)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_93_encode", "language": "elixir", "prompt": "# Write a function that takes a message, and encodes in such a \n# way that it swaps case of all letters, replaces all vowels in \n# the message with the letter that appears 2 places ahead of that \n# vowel in the english alphabet. \n# Assume only letters. \n# Examples:\n\ndefmodule HumanEval do\n def candidate(message), do: encode(message)\n def encode(message) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_93_encode.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'encode' do\n assert \"tgst\" == HumanEval.candidate(\"TEST\")\n assert \"mWDCSKR\" == HumanEval.candidate(\"Mudasir\")\n assert \"ygs\" == HumanEval.candidate(\"YES\")\n assert \"tHKS KS C MGSSCGG\" == HumanEval.candidate(\"This is a message\")\n assert \"k dQnT kNqW wHcT Tq wRkTg\" == HumanEval.candidate(\"I DoNt KnOw WhAt tO WrItE\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_94_skjkasdkd", "language": "elixir", "prompt": "# You are given a list of integers.\n# You need to find the largest prime value and return the sum of its digits.\n# Examples:\n\ndefmodule HumanEval do\n def candidate(lst), do: skjkasdkd(lst)\n def skjkasdkd(lst) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_94_skjkasdkd.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'skjkasdkd' do\n assert 10 == HumanEval.candidate([0, 3, 2, 1, 3, 5, 7, 4, 5, 5, 5, 2, 181, 32, 4, 32, 3, 2, 32, 324, 4, 3])\n assert 25 == HumanEval.candidate([1, 0, 1, 8, 2, 4597, 2, 1, 3, 40, 1, 2, 1, 2, 4, 2, 5, 1])\n assert 13 == HumanEval.candidate([1, 3, 1, 32, 5107, 34, 83278, 109, 163, 23, 2323, 32, 30, 1, 9, 3])\n assert 11 == HumanEval.candidate([0, 724, 32, 71, 99, 32, 6, 0, 5, 91, 83, 0, 5, 6])\n assert 3 == HumanEval.candidate([0, 81, 12, 3, 1, 21])\n assert 7 == HumanEval.candidate([0, 8, 1, 2, 1, 7])\n assert 19 == HumanEval.candidate([8191])\n assert 19 == HumanEval.candidate([8191, 123456, 127, 7])\n assert 10 == HumanEval.candidate([127, 97, 8192])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_95_check_dict_case", "language": "elixir", "prompt": "# Given a dictionary, return True if all keys are strings in lower \n# case or all keys are strings in upper case, else return False.\n# The function should return False is the given dictionary is empty.\n# Examples:\n\ndefmodule HumanEval do\n def candidate(dict), do: check_dict_case(dict)\n def check_dict_case(dict) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_95_check_dict_case.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'check_dict_case' do\n assert true == HumanEval.candidate(%{\"p\" => \"pineapple\", \"b\" => \"banana\"})\n assert false == HumanEval.candidate(%{\"p\" => \"pineapple\", \"A\" => \"banana\", \"B\" => \"banana\"})\n assert false == HumanEval.candidate(%{\"p\" => \"pineapple\", \"5\" => \"banana\", \"a\" => \"apple\"})\n assert false == HumanEval.candidate(%{\"Name\" => \"John\", \"Age\" => \"36\", \"City\" => \"Houston\"})\n assert true == HumanEval.candidate(%{\"STATE\" => \"NC\", \"ZIP\" => \"12345\"})\n assert true == HumanEval.candidate(%{\"fruit\" => \"Orange\", \"taste\" => \"Sweet\"})\n assert false == HumanEval.candidate(%{})\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_96_count_up_to", "language": "elixir", "prompt": "# Implement a function that takes an non-negative integer and returns an array of the first n\n# integers that are prime numbers and less than n.\n# for example:\n\ndefmodule HumanEval do\n def candidate(n), do: count_up_to(n)\n def count_up_to(n) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_96_count_up_to.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'count_up_to' do\n assert [2, 3] == HumanEval.candidate(5)\n assert [2, 3, 5] == HumanEval.candidate(6)\n assert [2, 3, 5] == HumanEval.candidate(7)\n assert [2, 3, 5, 7] == HumanEval.candidate(10)\n assert [] == HumanEval.candidate(0)\n assert [2, 3, 5, 7, 11, 13, 17, 19] == HumanEval.candidate(22)\n assert [] == HumanEval.candidate(1)\n assert [2, 3, 5, 7, 11, 13, 17] == HumanEval.candidate(18)\n assert [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43] == HumanEval.candidate(47)\n assert [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97] == HumanEval.candidate(101)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_97_multiply", "language": "elixir", "prompt": "# Complete the function that takes two integers and returns \n# the product of their unit digits.\n# Assume the input is always valid.\n# Examples:\n\ndefmodule HumanEval do\n def candidate(a, b), do: multiply(a, b)\n def multiply(a, b) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_97_multiply.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'multiply' do\n assert 16 == HumanEval.candidate(148, 412)\n assert 72 == HumanEval.candidate(19, 28)\n assert 0 == HumanEval.candidate(2020, 1851)\n assert 20 == HumanEval.candidate(14, -15)\n assert 42 == HumanEval.candidate(76, 67)\n assert 49 == HumanEval.candidate(17, 27)\n assert 0 == HumanEval.candidate(0, 1)\n assert 0 == HumanEval.candidate(0, 0)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_98_count_upper", "language": "elixir", "prompt": "# Given a string s, count the number of uppercase vowels in even indices.\n# For example:\n\ndefmodule HumanEval do\n def candidate(s), do: count_upper(s)\n def count_upper(s) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_98_count_upper.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'count_upper' do\n assert 1 == HumanEval.candidate(\"aBCdEf\")\n assert 0 == HumanEval.candidate(\"abcdefg\")\n assert 0 == HumanEval.candidate(\"dBBE\")\n assert 0 == HumanEval.candidate(\"B\")\n assert 1 == HumanEval.candidate(\"U\")\n assert 0 == HumanEval.candidate(\"\")\n assert 2 == HumanEval.candidate(\"EEEE\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_99_closest_integer", "language": "elixir", "prompt": "# Create a function that takes a value (string) representing a number\n# and returns the closest integer to it. If the number is equidistant\n# from two integers, round it away from zero.\n# Examples\n# Note:\n# Rounding away from zero means that if the given number is equidistant\n# from two integers, the one you should return is the one that is the\n# farthest from zero. For example closest_integer(\"14.5\") should\n# return 15 and closest_integer(\"-14.5\") should return -15.\n\ndefmodule HumanEval do\n def candidate(value), do: closest_integer(value)\n def closest_integer(value) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_99_closest_integer.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'closest_integer' do\n assert 10 == HumanEval.candidate(\"10\")\n assert 15 == HumanEval.candidate(\"14.5\")\n assert -16 == HumanEval.candidate(\"-15.5\")\n assert 15 == HumanEval.candidate(\"15.3\")\n assert 0 == HumanEval.candidate(\"0\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_9_rolling_max", "language": "elixir", "prompt": "# From a given list of integers, generate a list of rolling maximum element found until given moment\n# in the sequence.\n\ndefmodule HumanEval do\n def candidate(numbers), do: rolling_max(numbers)\n def rolling_max(numbers) do\n ", "doctests": "remove", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_9_rolling_max.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'rolling_max' do\n assert [] == HumanEval.candidate([])\n assert [1, 2, 3, 4] == HumanEval.candidate([1, 2, 3, 4])\n assert [4, 4, 4, 4] == HumanEval.candidate([4, 3, 2, 1])\n assert [3, 3, 3, 100, 100] == HumanEval.candidate([3, 2, 3, 100, 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} diff --git a/prompts/humaneval-elixir-reworded.jsonl b/prompts/humaneval-elixir-reworded.jsonl new file mode 100644 index 0000000000..0ace3af003 --- /dev/null +++ b/prompts/humaneval-elixir-reworded.jsonl @@ -0,0 +1,161 @@ +{"name": "HumanEval_0_has_close_elements", "language": "elixir", "prompt": "# Check if in given list of numbers, are any two numbers closer to each other than\n# given threshold.\n# >>> HumanEval.has_close_elements([1.0, 2.0, 3.0], 0.5)\n# false\n# >>> HumanEval.has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)\n# true\n\ndefmodule HumanEval do\n def candidate(numbers, threshold), do: has_close_elements(numbers, threshold)\n def has_close_elements(numbers, threshold) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_0_has_close_elements.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'has_close_elements' do\n assert true == HumanEval.candidate([1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3)\n assert false == HumanEval.candidate([1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.05)\n assert true == HumanEval.candidate([1.0, 2.0, 5.9, 4.0, 5.0], 0.95)\n assert false == HumanEval.candidate([1.0, 2.0, 5.9, 4.0, 5.0], 0.8)\n assert true == HumanEval.candidate([1.0, 2.0, 3.0, 4.0, 5.0, 2.0], 0.1)\n assert true == HumanEval.candidate([1.1, 2.2, 3.1, 4.1, 5.1], 1.0)\n assert false == HumanEval.candidate([1.1, 2.2, 3.1, 4.1, 5.1], 0.5)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_100_make_a_pile", "language": "elixir", "prompt": "# Given a positive integer n, you have to make a pile of n levels of stones.\n# The first level has n stones.\n# The number of stones in the next level is:\n# - the next odd number if n is odd.\n# - the next even number if n is even.\n# Return the number of stones in each level in a list, where element at index\n# i represents the number of stones in the level (i+1).\n# Examples:\n# >>> HumanEval.make_a_pile(3)\n# [3, 5, 7]\n\ndefmodule HumanEval do\n def candidate(n), do: make_a_pile(n)\n def make_a_pile(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_100_make_a_pile.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'make_a_pile' do\n assert [3, 5, 7] == HumanEval.candidate(3)\n assert [4, 6, 8, 10] == HumanEval.candidate(4)\n assert [5, 7, 9, 11, 13] == HumanEval.candidate(5)\n assert [6, 8, 10, 12, 14, 16] == HumanEval.candidate(6)\n assert [8, 10, 12, 14, 16, 18, 20, 22] == HumanEval.candidate(8)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_101_words_string", "language": "elixir", "prompt": "# You will be given a string of words separated by commas or spaces. Your task is\n# to split the string into words and return a list of the words.\n# For example:\n# >>> HumanEval.words_string(\"Hi, my name is John\")\n# [\"Hi\", \"my\", \"name\", \"is\", \"John\"]\n# >>> HumanEval.words_string(\"One, two, three, four, five, six\")\n# [\"One\", \"two\", \"three\", \"four\", \"five\", \"six\"]\n\ndefmodule HumanEval do\n def candidate(s), do: words_string(s)\n def words_string(s) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_101_words_string.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'words_string' do\n assert [\"Hi\", \"my\", \"name\", \"is\", \"John\"] == HumanEval.candidate(\"Hi, my name is John\")\n assert [\"One\", \"two\", \"three\", \"four\", \"five\", \"six\"] == HumanEval.candidate(\"One, two, three, four, five, six\")\n assert [\"Hi\", \"my\", \"name\"] == HumanEval.candidate(\"Hi, my name\")\n assert [\"One\", \"two\", \"three\", \"four\", \"five\", \"six\"] == HumanEval.candidate(\"One,, two, three, four, five, six,\")\n assert [] == HumanEval.candidate(\"\")\n assert [\"ahmed\", \"gamal\"] == HumanEval.candidate(\"ahmed , gamal\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_102_choose_num", "language": "elixir", "prompt": "# This function takes two positive numbers x and y and returns the\n# biggest even integer number that is in the range [x, y] inclusive. If \n# there's no such number, then the function should return -1.\n# For example:\n# >>> HumanEval.choose_num(12, 15)\n# 14\n# >>> HumanEval.choose_num(13, 12)\n# -1\n\ndefmodule HumanEval do\n def candidate(x, y), do: choose_num(x, y)\n def choose_num(x, y) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_102_choose_num.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'choose_num' do\n assert 14 == HumanEval.candidate(12, 15)\n assert -1 == HumanEval.candidate(13, 12)\n assert 12354 == HumanEval.candidate(33, 12354)\n assert -1 == HumanEval.candidate(5234, 5233)\n assert 28 == HumanEval.candidate(6, 29)\n assert -1 == HumanEval.candidate(27, 10)\n assert -1 == HumanEval.candidate(7, 7)\n assert 546 == HumanEval.candidate(546, 546)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_103_rounded_avg", "language": "elixir", "prompt": "# You are given two positive integers n and m, and your task is to compute the\n# average of the integers from n through m (including n and m). \n# Round the answer to the nearest integer and convert that to binary.\n# If n is greater than m, return -1.\n# Example:\n# >>> HumanEval.rounded_avg(1, 5)\n# \"0b11\"\n# >>> HumanEval.rounded_avg(7, 5)\n# -1\n# >>> HumanEval.rounded_avg(10, 20)\n# \"0b1111\"\n# >>> HumanEval.rounded_avg(20, 33)\n# \"0b11010\"\n\ndefmodule HumanEval do\n def candidate(n, m), do: rounded_avg(n, m)\n def rounded_avg(n, m) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_103_rounded_avg.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'rounded_avg' do\n assert \"0b11\" == HumanEval.candidate(1, 5)\n assert \"0b1010\" == HumanEval.candidate(7, 13)\n assert \"0b1111001010\" == HumanEval.candidate(964, 977)\n assert \"0b1111100100\" == HumanEval.candidate(996, 997)\n assert \"0b1011000010\" == HumanEval.candidate(560, 851)\n assert \"0b101101110\" == HumanEval.candidate(185, 546)\n assert \"0b110101101\" == HumanEval.candidate(362, 496)\n assert \"0b1001110010\" == HumanEval.candidate(350, 902)\n assert \"0b11010111\" == HumanEval.candidate(197, 233)\n assert -1 == HumanEval.candidate(7, 5)\n assert -1 == HumanEval.candidate(5, 1)\n assert \"0b101\" == HumanEval.candidate(5, 5)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_104_unique_digits", "language": "elixir", "prompt": "# Given a list of positive integers x. return a sorted list of all \n# elements that hasn't any even digit.\n# Note: Returned list should be sorted in increasing order.\n# For example:\n# >>> HumanEval.unique_digits([15, 33, 1422, 1])\n# [1, 15, 33]\n# >>> HumanEval.unique_digits([152, 323, 1422, 10])\n# []\n\ndefmodule HumanEval do\n def candidate(x), do: unique_digits(x)\n def unique_digits(x) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_104_unique_digits.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'unique_digits' do\n assert [1, 15, 33] == HumanEval.candidate([15, 33, 1422, 1])\n assert [] == HumanEval.candidate([152, 323, 1422, 10])\n assert [111, 151] == HumanEval.candidate([12345, 2033, 111, 151])\n assert [31, 135] == HumanEval.candidate([135, 103, 31])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_105_by_length", "language": "elixir", "prompt": "# Given a list of integers, sort the integers that are between 1 and 9 inclusive,\n# reverse the resulting list, and then replace each digit by its corresponding name from\n# \"One\", \"Two\", \"Three\", \"Four\", \"Five\", \"Six\", \"Seven\", \"Eight\", \"Nine\".\n# For example:\n# >>> HumanEval.by_length([2, 1, 1, 4, 5, 8, 2, 3])\n# [\"Eight\", \"Five\", \"Four\", \"Three\", \"Two\", \"Two\", \"One\", \"One\"]\n# If the list is empty, return an empty list:\n# >>> HumanEval.by_length([])\n# []\n# If the list has any strange number ignore it:\n# >>> HumanEval.by_length([1, -1, 55])\n# [\"One\"]\n\ndefmodule HumanEval do\n def candidate(arr), do: by_length(arr)\n def by_length(arr) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_105_by_length.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'by_length' do\n assert [\"Eight\", \"Five\", \"Four\", \"Three\", \"Two\", \"Two\", \"One\", \"One\"] == HumanEval.candidate([2, 1, 1, 4, 5, 8, 2, 3])\n assert [] == HumanEval.candidate([])\n assert [\"One\"] == HumanEval.candidate([1, -1, 55])\n assert [\"Three\", \"Two\", \"One\"] == HumanEval.candidate([1, -1, 3, 2])\n assert [\"Nine\", \"Eight\", \"Four\"] == HumanEval.candidate([9, 4, 8])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_106_f", "language": "elixir", "prompt": "# Implement the function f that takes n as a parameter,\n# and returns a list of size n, such that the value of the element at index i is the factorial of i if i is even\n# or the sum of numbers from 1 to i otherwise.\n# i starts from 1.\n# the factorial of i is the multiplication of the numbers from 1 to i (1 * 2 * ... * i).\n# Example:\n# >>> HumanEval.f(5)\n# [1, 2, 6, 24, 15]\n\ndefmodule HumanEval do\n def candidate(n), do: f(n)\n def f(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_106_f.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'f' do\n assert [1, 2, 6, 24, 15] == HumanEval.candidate(5)\n assert [1, 2, 6, 24, 15, 720, 28] == HumanEval.candidate(7)\n assert [1] == HumanEval.candidate(1)\n assert [1, 2, 6] == HumanEval.candidate(3)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_107_even_odd_palindrome", "language": "elixir", "prompt": "# Given a positive integer n, return a tuple that has the number of even and odd\n# integer palindromes that fall within the range(1, n), inclusive.\n# Example 1:\n# >>> HumanEval.even_odd_palindrome(3)\n# {1, 2}\n# Explanation:\n# Integer palindrome are 1, 2, 3. one of them is even, and two of them are odd.\n# Example 2:\n# >>> HumanEval.even_odd_palindrome(12)\n# {4, 6}\n# Explanation:\n# Integer palindrome are 1, 2, 3, 4, 5, 6, 7, 8, 9, 11. four of them are even, and 6 of them are odd.\n# Note:\n# 1. 1 <= n <= 10^3\n# 2. returned tuple has the number of even and odd integer palindromes respectively.\n\ndefmodule HumanEval do\n def candidate(n), do: even_odd_palindrome(n)\n def even_odd_palindrome(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_107_even_odd_palindrome.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'even_odd_palindrome' do\n assert {8, 13} == HumanEval.candidate(123)\n assert {4, 6} == HumanEval.candidate(12)\n assert {1, 2} == HumanEval.candidate(3)\n assert {6, 8} == HumanEval.candidate(63)\n assert {5, 6} == HumanEval.candidate(25)\n assert {4, 6} == HumanEval.candidate(19)\n assert {4, 5} == HumanEval.candidate(9)\n assert {0, 1} == HumanEval.candidate(1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_108_count_nums", "language": "elixir", "prompt": "# Write a function count_nums which takes a list of integers and returns\n# the number of elements which has a sum of digits > 0.\n# If a number is negative, then its first signed digit will be negative:\n# e.g. -123 has signed digits -1, 2, and 3.\n# >>> HumanEval.count_nums([])\n# 0\n# >>> HumanEval.count_nums([-1, 11, -11])\n# 1\n# >>> HumanEval.count_nums([1, 1, 2])\n# 3\n\ndefmodule HumanEval do\n def candidate(arr), do: count_nums(arr)\n def count_nums(arr) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_108_count_nums.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'count_nums' do\n assert 0 == HumanEval.candidate([])\n assert 0 == HumanEval.candidate([-1, -2, 0])\n assert 6 == HumanEval.candidate([1, 1, 2, -2, 3, 4, 5])\n assert 5 == HumanEval.candidate([1, 6, 9, -6, 0, 1, 5])\n assert 4 == HumanEval.candidate([1, 100, 98, -7, 1, -1])\n assert 5 == HumanEval.candidate([12, 23, 34, -45, -56, 0])\n assert 1 == HumanEval.candidate([0, 1])\n assert 1 == HumanEval.candidate([1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_109_move_one_ball", "language": "elixir", "prompt": "# We have a list 'arr' of N integers arr[1], arr[2], ..., arr[N].The\n# numbers in the list will be randomly ordered. Your task is to determine if\n# it is possible to get a list sorted in non-decreasing order by performing \n# the following operation on the given list:\n# You are allowed to perform right shift operation any number of times.\n# One right shift operation means shifting all elements of the list by one\n# position in the right direction. The last element of the list will be moved to\n# the starting position in the list i.e. 0th index. \n# If it is possible to obtain the sorted list by performing the above operation\n# then return true else return false.\n# If the given list is empty then return true.\n# Note: The given list is guaranteed to have unique elements.\n# For Example:\n# >>> HumanEval.move_one_ball([3, 4, 5, 1, 2])\n# true\n# Explanation: By performin 2 right shift operations, non-decreasing order can\n# be achieved for the given list.\n# >>> HumanEval.move_one_ball([3, 5, 4, 1, 2])\n# false\n# Explanation:It is not possible to get non-decreasing order for the given\n# list by performing any number of right shift operations.\n\ndefmodule HumanEval do\n def candidate(arr), do: move_one_ball(arr)\n def move_one_ball(arr) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_109_move_one_ball.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'move_one_ball' do\n assert true == HumanEval.candidate([3, 4, 5, 1, 2])\n assert true == HumanEval.candidate([3, 5, 10, 1, 2])\n assert false == HumanEval.candidate([4, 3, 1, 2])\n assert false == HumanEval.candidate([3, 5, 4, 1, 2])\n assert true == HumanEval.candidate([])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_10_make_palindrome", "language": "elixir", "prompt": "# Find the shortest palindrome that begins with a supplied string.\n# Algorithm idea is simple:\n# - Find the longest postfix of supplied string that is a palindrome.\n# - Append to the end of the string reverse of a string prefix that comes before the palindromic suffix.\n# >>> HumanEval.make_palindrome(\"\")\n# \"\"\n# >>> HumanEval.make_palindrome(\"cat\")\n# \"catac\"\n# >>> HumanEval.make_palindrome(\"cata\")\n# \"catac\"\n\ndefmodule HumanEval do\n def candidate(string), do: make_palindrome(string)\n def make_palindrome(string) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_10_make_palindrome.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'make_palindrome' do\n assert \"\" == HumanEval.candidate(\"\")\n assert \"x\" == HumanEval.candidate(\"x\")\n assert \"xyzyx\" == HumanEval.candidate(\"xyz\")\n assert \"xyx\" == HumanEval.candidate(\"xyx\")\n assert \"jerryrrej\" == HumanEval.candidate(\"jerry\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_110_exchange", "language": "elixir", "prompt": "# In this problem, you will implement a function that takes two lists of numbers,\n# and determines whether it is possible to perform an exchange of elements\n# between them to make lst1 a list of only even numbers.\n# There is no limit on the number of exchanged elements between lst1 and lst2.\n# If it is possible to exchange elements between the lst1 and lst2 to make\n# all the elements of lst1 to be even, return \"YES\".\n# Otherwise, return \"NO\".\n# For example:\n# >>> HumanEval.exchange([1, 2, 3, 4], [1, 2, 3, 4])\n# \"YES\"\n# >>> HumanEval.exchange([1, 2, 3, 4], [1, 5, 3, 4])\n# \"NO\"\n# It is assumed that the input lists will be non-empty.\n\ndefmodule HumanEval do\n def candidate(lst1, lst2), do: exchange(lst1, lst2)\n def exchange(lst1, lst2) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_110_exchange.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'exchange' do\n assert \"YES\" == HumanEval.candidate([1, 2, 3, 4], [1, 2, 3, 4])\n assert \"NO\" == HumanEval.candidate([1, 2, 3, 4], [1, 5, 3, 4])\n assert \"YES\" == HumanEval.candidate([1, 2, 3, 4], [2, 1, 4, 3])\n assert \"YES\" == HumanEval.candidate([5, 7, 3], [2, 6, 4])\n assert \"NO\" == HumanEval.candidate([5, 7, 3], [2, 6, 3])\n assert \"NO\" == HumanEval.candidate([3, 2, 6, 1, 8, 9], [3, 5, 5, 1, 1, 1])\n assert \"YES\" == HumanEval.candidate([100, 200], [200, 200])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_111_histogram", "language": "elixir", "prompt": "# Given a string representing a space separated lowercase letters, return a map\n# of the letter with the most repetition and containing the corresponding count.\n# If several letters have the same occurrence, return all of them.\n# Example:\n# >>> HumanEval.histogram(\"a b c\")\n# %{\"a\" => 1, \"b\" => 1, \"c\" => 1}\n# >>> HumanEval.histogram(\"a b b a\")\n# %{\"a\" => 2, \"b\" => 2}\n# >>> HumanEval.histogram(\"a b c a b\")\n# %{\"a\" => 2, \"b\" => 2}\n# >>> HumanEval.histogram(\"b b b b a\")\n# %{\"b\" => 4}\n# >>> HumanEval.histogram(\"\")\n# %{}\n\ndefmodule HumanEval do\n def candidate(test), do: histogram(test)\n def histogram(test) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_111_histogram.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'histogram' do\n assert %{\"a\" => 2, \"b\" => 2} == HumanEval.candidate(\"a b b a\")\n assert %{\"a\" => 2, \"b\" => 2} == HumanEval.candidate(\"a b c a b\")\n assert %{\"a\" => 1, \"b\" => 1, \"c\" => 1, \"d\" => 1, \"g\" => 1} == HumanEval.candidate(\"a b c d g\")\n assert %{\"r\" => 1, \"t\" => 1, \"g\" => 1} == HumanEval.candidate(\"r t g\")\n assert %{\"b\" => 4} == HumanEval.candidate(\"b b b b a\")\n assert %{\"r\" => 1, \"t\" => 1, \"g\" => 1} == HumanEval.candidate(\"r t g\")\n assert %{} == HumanEval.candidate(\"\")\n assert %{\"a\" => 1} == HumanEval.candidate(\"a\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_112_reverse_delete", "language": "elixir", "prompt": "# Task\n# We are given two strings s and c, you have to deleted all the characters in s that are equal to any character in c\n# then check if the result string is palindrome.\n# A string is called palindrome if it reads the same backward as forward.\n# You should return a tuple containing the result string and true/false for the check.\n# Example\n# >>> HumanEval.reverse_delete(\"abcde\", \"ae\")\n# {\"bcd\", false}\n# >>> HumanEval.reverse_delete(\"abcdef\", \"b\")\n# {\"acdef\", false}\n# >>> HumanEval.reverse_delete(\"abcdedcba\", \"ab\")\n# {\"cdedc\", true}\n\ndefmodule HumanEval do\n def candidate(s, c), do: reverse_delete(s, c)\n def reverse_delete(s, c) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_112_reverse_delete.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'reverse_delete' do\n assert {\"bcd\", false} == HumanEval.candidate(\"abcde\", \"ae\")\n assert {\"acdef\", false} == HumanEval.candidate(\"abcdef\", \"b\")\n assert {\"cdedc\", true} == HumanEval.candidate(\"abcdedcba\", \"ab\")\n assert {\"dik\", false} == HumanEval.candidate(\"dwik\", \"w\")\n assert {\"\", true} == HumanEval.candidate(\"a\", \"a\")\n assert {\"abcdedcba\", true} == HumanEval.candidate(\"abcdedcba\", \"\")\n assert {\"abcdedcba\", true} == HumanEval.candidate(\"abcdedcba\", \"v\")\n assert {\"abba\", true} == HumanEval.candidate(\"vabba\", \"v\")\n assert {\"\", true} == HumanEval.candidate(\"mamma\", \"mia\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_113_odd_count", "language": "elixir", "prompt": "# Given a list of strings, where each string consists of only digits, return a list.\n# Each element i of the output should be \"the number of odd elements in the\n# string i of the input.\" where all the i's should be replaced by the number\n# of odd digits in the i'th string of the input.\n# >>> HumanEval.odd_count([\"1234567\"])\n# [\"the number of odd elements 4n the str4ng 4 of the 4nput.\"]\n# >>> HumanEval.odd_count([\"3\", \"11111111\"])\n# [\"the number of odd elements 1n the str1ng 1 of the 1nput.\", \"the number of odd elements 8n the str8ng 8 of the 8nput.\"]\n\ndefmodule HumanEval do\n def candidate(lst), do: odd_count(lst)\n def odd_count(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_113_odd_count.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'odd_count' do\n assert [\"the number of odd elements 4n the str4ng 4 of the 4nput.\"] == HumanEval.candidate([\"1234567\"])\n assert [\"the number of odd elements 1n the str1ng 1 of the 1nput.\", \"the number of odd elements 8n the str8ng 8 of the 8nput.\"] == HumanEval.candidate([\"3\", \"11111111\"])\n assert [\"the number of odd elements 2n the str2ng 2 of the 2nput.\", \"the number of odd elements 3n the str3ng 3 of the 3nput.\", \"the number of odd elements 2n the str2ng 2 of the 2nput.\"] == HumanEval.candidate([\"271\", \"137\", \"314\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_114_minSubArraySum", "language": "elixir", "prompt": "# Given a list of integers nums, find the minimum sum of any non-empty sub-list\n# of nums.\n# Example\n# >>> HumanEval.minSubArraySum([2, 3, 4, 1, 2, 4])\n# 1\n# >>> HumanEval.minSubArraySum([-1, -2, -3])\n# -6\n\ndefmodule HumanEval do\n def candidate(nums), do: minSubArraySum(nums)\n def minSubArraySum(nums) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_114_minSubArraySum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'minSubArraySum' do\n assert 1 == HumanEval.candidate([2, 3, 4, 1, 2, 4])\n assert -6 == HumanEval.candidate([-1, -2, -3])\n assert -14 == HumanEval.candidate([-1, -2, -3, 2, -10])\n assert -9999999999999999 == HumanEval.candidate([-9999999999999999])\n assert 0 == HumanEval.candidate([0, 10, 20, 1000000])\n assert -6 == HumanEval.candidate([-1, -2, -3, 10, -5])\n assert -6 == HumanEval.candidate([100, -1, -2, -3, 10, -5])\n assert 3 == HumanEval.candidate([10, 11, 13, 8, 3, 4])\n assert -33 == HumanEval.candidate([100, -33, 32, -1, 0, -2])\n assert -10 == HumanEval.candidate([-10])\n assert 7 == HumanEval.candidate([7])\n assert -1 == HumanEval.candidate([1, -1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_115_max_fill", "language": "elixir", "prompt": "# You are given a rectangular grid of wells. Each row represents a single well,\n# and each 1 in a row represents a single unit of water.\n# Each well has a corresponding bucket that can be used to extract water from it, \n# and all buckets have the same capacity.\n# Your task is to use the buckets to empty the wells.\n# Output the number of times you need to lower the buckets.\n# Example 1:\n# >>> HumanEval.max_fill([[0, 0, 1, 0], [0, 1, 0, 0], [1, 1, 1, 1]], 1)\n# 6\n# Example 2:\n# >>> HumanEval.max_fill([[0, 0, 1, 1], [0, 0, 0, 0], [1, 1, 1, 1], [0, 1, 1, 1]], 2)\n# 5\n# Example 3:\n# >>> HumanEval.max_fill([[0, 0, 0], [0, 0, 0]], 5)\n# 0\n# Constraints:\n# * all wells have the same length\n# * 1 <= grid.length <= 10^2\n# * 1 <= grid[:,1].length <= 10^2\n# * grid[i][j] -> 0 | 1\n# * 1 <= capacity <= 10\n\ndefmodule HumanEval do\n def candidate(grid, capacity), do: max_fill(grid, capacity)\n def max_fill(grid, capacity) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_115_max_fill.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'max_fill' do\n assert 6 == HumanEval.candidate([[0, 0, 1, 0], [0, 1, 0, 0], [1, 1, 1, 1]], 1)\n assert 5 == HumanEval.candidate([[0, 0, 1, 1], [0, 0, 0, 0], [1, 1, 1, 1], [0, 1, 1, 1]], 2)\n assert 0 == HumanEval.candidate([[0, 0, 0], [0, 0, 0]], 5)\n assert 4 == HumanEval.candidate([[1, 1, 1, 1], [1, 1, 1, 1]], 2)\n assert 2 == HumanEval.candidate([[1, 1, 1, 1], [1, 1, 1, 1]], 9)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_116_sort_array", "language": "elixir", "prompt": "# In this Kata, you have to sort a list of non-negative integers according to\n# number of ones in their binary representation in ascending order.\n# For similar number of ones, sort based on decimal value.\n# It must be implemented like this:\n# >>> HumanEval.sort_array([1, 5, 2, 3, 4])\n# [1, 2, 3, 4, 5]\n# >>> HumanEval.sort_array([-2, -3, -4, -5, -6])\n# [-6, -5, -4, -3, -2]\n# >>> HumanEval.sort_array([1, 0, 2, 3, 4])\n# [0, 1, 2, 3, 4]\n\ndefmodule HumanEval do\n def candidate(arr), do: sort_array(arr)\n def sort_array(arr) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_116_sort_array.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sort_array' do\n assert [1, 2, 4, 3, 5] == HumanEval.candidate([1, 5, 2, 3, 4])\n assert [-4, -2, -6, -5, -3] == HumanEval.candidate([-2, -3, -4, -5, -6])\n assert [0, 1, 2, 4, 3] == HumanEval.candidate([1, 0, 2, 3, 4])\n assert [] == HumanEval.candidate([])\n assert [2, 2, 4, 4, 3, 3, 5, 5, 5, 7, 77] == HumanEval.candidate([2, 5, 77, 4, 5, 3, 5, 7, 2, 3, 4])\n assert [32, 3, 5, 6, 12, 44] == HumanEval.candidate([3, 6, 44, 12, 32, 5])\n assert [2, 4, 8, 16, 32] == HumanEval.candidate([2, 4, 8, 16, 32])\n assert [2, 4, 8, 16, 32] == HumanEval.candidate([2, 4, 8, 16, 32])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_117_select_words", "language": "elixir", "prompt": "# Given a string s and a natural number n, you have been tasked to implement \n# a function that returns a list of all words from string s that contain exactly \n# n consonants, in order these words appear in the string s.\n# If the string s is empty then the function should return an empty list.\n# Note: you may assume the input string contains only letters and spaces.\n# Examples:\n# >>> HumanEval.select_words(\"Mary had a little lamb\", 4)\n# [\"little\"]\n# >>> HumanEval.select_words(\"Mary had a little lamb\", 3)\n# [\"Mary\", \"lamb\"]\n# >>> HumanEval.select_words(\"simple white space\", 2)\n# []\n# >>> HumanEval.select_words(\"Hello world\", 4)\n# [\"world\"]\n# >>> HumanEval.select_words(\"Uncle sam\", 3)\n# [\"Uncle\"]\n\ndefmodule HumanEval do\n def candidate(s, n), do: select_words(s, n)\n def select_words(s, n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_117_select_words.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'select_words' do\n assert [\"little\"] == HumanEval.candidate(\"Mary had a little lamb\", 4)\n assert [\"Mary\", \"lamb\"] == HumanEval.candidate(\"Mary had a little lamb\", 3)\n assert [] == HumanEval.candidate(\"simple white space\", 2)\n assert [\"world\"] == HumanEval.candidate(\"Hello world\", 4)\n assert [\"Uncle\"] == HumanEval.candidate(\"Uncle sam\", 3)\n assert [] == HumanEval.candidate(\"\", 4)\n assert [\"b\", \"c\", \"d\", \"f\"] == HumanEval.candidate(\"a b c d e f\", 1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_118_get_closest_vowel", "language": "elixir", "prompt": "# You are given a word. Your task is to find the closest vowel that stands between \n# two consonants from the right side of the word (case sensitive).\n# Vowels in the beginning and ending doesn't count. Return empty string if you didn't\n# find any vowel met the above condition. \n# You may assume that the given string contains English letter only.\n# Example:\n# >>> HumanEval.get_closest_vowel(\"yogurt\")\n# \"u\"\n# >>> HumanEval.get_closest_vowel(\"FULL\")\n# \"U\"\n# >>> HumanEval.get_closest_vowel(\"quick\")\n# \"\"\n# >>> HumanEval.get_closest_vowel(\"ab\")\n# \"\"\n\ndefmodule HumanEval do\n def candidate(word), do: get_closest_vowel(word)\n def get_closest_vowel(word) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_118_get_closest_vowel.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'get_closest_vowel' do\n assert \"u\" == HumanEval.candidate(\"yogurt\")\n assert \"u\" == HumanEval.candidate(\"full\")\n assert \"\" == HumanEval.candidate(\"easy\")\n assert \"\" == HumanEval.candidate(\"eAsy\")\n assert \"\" == HumanEval.candidate(\"ali\")\n assert \"a\" == HumanEval.candidate(\"bad\")\n assert \"o\" == HumanEval.candidate(\"most\")\n assert \"\" == HumanEval.candidate(\"ab\")\n assert \"\" == HumanEval.candidate(\"ba\")\n assert \"\" == HumanEval.candidate(\"quick\")\n assert \"i\" == HumanEval.candidate(\"anime\")\n assert \"\" == HumanEval.candidate(\"Asia\")\n assert \"o\" == HumanEval.candidate(\"Above\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_119_match_parens", "language": "elixir", "prompt": "# You are given a list of two strings, both strings consist of open\n# parentheses '(' or close parentheses ')' only.\n# Your job is to check if it is possible to concatenate the two strings in\n# some order, that the resulting string will be good.\n# A string S is considered to be good if and only if all parentheses in S\n# are balanced. For example: the string '(())()' is good, while the string\n# '())' is not.\n# Return 'Yes' if there's a way to make a good string, and return 'No' otherwise.\n# Examples:\n# >>> HumanEval.match_parens([\"()(\", \")\"])\n# \"Yes\"\n# >>> HumanEval.match_parens([\")\", \")\"])\n# \"No\"\n\ndefmodule HumanEval do\n def candidate(lst), do: match_parens(lst)\n def match_parens(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_119_match_parens.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'match_parens' do\n assert \"Yes\" == HumanEval.candidate([\"()(\", \")\"])\n assert \"No\" == HumanEval.candidate([\")\", \")\"])\n assert \"No\" == HumanEval.candidate([\"(()(())\", \"())())\"])\n assert \"Yes\" == HumanEval.candidate([\")())\", \"(()()(\"])\n assert \"Yes\" == HumanEval.candidate([\"(())))\", \"(()())((\"])\n assert \"No\" == HumanEval.candidate([\"()\", \"())\"])\n assert \"Yes\" == HumanEval.candidate([\"(()(\", \"()))()\"])\n assert \"No\" == HumanEval.candidate([\"((((\", \"((())\"])\n assert \"No\" == HumanEval.candidate([\")(()\", \"(()(\"])\n assert \"No\" == HumanEval.candidate([\")(\", \")(\"])\n assert \"Yes\" == HumanEval.candidate([\"(\", \")\"])\n assert \"Yes\" == HumanEval.candidate([\")\", \"(\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_11_string_xor", "language": "elixir", "prompt": "# Input are two strings a and b consisting only of 1s and 0s.\n# Perform binary XOR on these inputs and return result also as a string.\n# >>> HumanEval.string_xor(\"010\", \"110\")\n# \"100\"\n\ndefmodule HumanEval do\n def candidate(a, b), do: string_xor(a, b)\n def string_xor(a, b) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_11_string_xor.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'string_xor' do\n assert \"010010\" == HumanEval.candidate(\"111000\", \"101010\")\n assert \"0\" == HumanEval.candidate(\"1\", \"1\")\n assert \"0101\" == HumanEval.candidate(\"0101\", \"0000\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_120_maximum", "language": "elixir", "prompt": "# Given a list arr of integers and a positive integer k, return a sorted list \n# of length k with the maximum k numbers in arr.\n# Example 1:\n# >>> HumanEval.maximum([-3, -4, 5], 3)\n# [-4, -3, 5]\n# Example 2:\n# >>> HumanEval.maximum([4, -4, 4], 2)\n# [4, 4]\n# Example 3:\n# >>> HumanEval.maximum([-3, 2, 1, 2, -1, -2, 1], 1)\n# [2]\n# Note:\n# 1. The length of the list will be in the range of [1, 1000].\n# 2. The elements in the list will be in the range of [-1000, 1000].\n# 3. 0 <= k <= len(arr)\n\ndefmodule HumanEval do\n def candidate(arr, k), do: maximum(arr, k)\n def maximum(arr, k) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_120_maximum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'maximum' do\n assert [-4, -3, 5] == HumanEval.candidate([-3, -4, 5], 3)\n assert [4, 4] == HumanEval.candidate([4, -4, 4], 2)\n assert [2] == HumanEval.candidate([-3, 2, 1, 2, -1, -2, 1], 1)\n assert [2, 20, 123] == HumanEval.candidate([123, -123, 20, 0, 1, 2, -3], 3)\n assert [0, 1, 2, 20] == HumanEval.candidate([-123, 20, 0, 1, 2, -3], 4)\n assert [-13, -8, 0, 0, 3, 5, 15] == HumanEval.candidate([5, 15, 0, 3, -13, -8, 0], 7)\n assert [3, 5] == HumanEval.candidate([-1, 0, 2, 5, 3, -10], 2)\n assert [5] == HumanEval.candidate([1, 0, 5, -7], 1)\n assert [-4, 4] == HumanEval.candidate([4, -4], 2)\n assert [-10, 10] == HumanEval.candidate([-10, 10], 2)\n assert [] == HumanEval.candidate([1, 2, 3, -23, 243, -400, 0], 0)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_121_solution", "language": "elixir", "prompt": "# Given a non-empty list of integers, return the sum of all of the odd elements that are in even positions.\n# Examples\n# >>> HumanEval.solution([5, 8, 7, 1])\n# 12\n# >>> HumanEval.solution([3, 3, 3, 3, 3])\n# 9\n# >>> HumanEval.solution([30, 13, 24, 321])\n# 0\n\ndefmodule HumanEval do\n def candidate(lst), do: solution(lst)\n def solution(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_121_solution.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'solution' do\n assert 12 == HumanEval.candidate([5, 8, 7, 1])\n assert 9 == HumanEval.candidate([3, 3, 3, 3, 3])\n assert 0 == HumanEval.candidate([30, 13, 24, 321])\n assert 5 == HumanEval.candidate([5, 9])\n assert 0 == HumanEval.candidate([2, 4, 8])\n assert 23 == HumanEval.candidate([30, 13, 23, 32])\n assert 3 == HumanEval.candidate([3, 13, 2, 9])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_122_add_elements", "language": "elixir", "prompt": "# Given a non-empty list of integers arr and an integer k, return\n# the sum of the elements with at most two digits from the first k elements of arr.\n# Example:\n# >>> HumanEval.add_elements([111, 21, 3, 4000, 5, 6, 7, 8, 9], 4)\n# 24\n# Constraints:\n# 1. 1 <= len(arr) <= 100\n# 2. 1 <= k <= len(arr)\n\ndefmodule HumanEval do\n def candidate(arr, k), do: add_elements(arr, k)\n def add_elements(arr, k) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_122_add_elements.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'add_elements' do\n assert -4 == HumanEval.candidate([1, -2, -3, 41, 57, 76, 87, 88, 99], 3)\n assert 0 == HumanEval.candidate([111, 121, 3, 4000, 5, 6], 2)\n assert 125 == HumanEval.candidate([11, 21, 3, 90, 5, 6, 7, 8, 9], 4)\n assert 24 == HumanEval.candidate([111, 21, 3, 4000, 5, 6, 7, 8, 9], 4)\n assert 1 == HumanEval.candidate([1], 1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_123_get_odd_collatz", "language": "elixir", "prompt": "# Given a positive integer n, return a sorted list that has the odd numbers in collatz sequence.\n# The Collatz conjecture is a conjecture in mathematics that concerns a sequence defined\n# as follows: start with any positive integer n. Then each term is obtained from the \n# previous term as follows: if the previous term is even, the next term is one half of \n# the previous term. If the previous term is odd, the next term is 3 times the previous\n# term plus 1. The conjecture is that no matter what value of n, the sequence will always reach 1.\n# Note: \n# 1. Collatz(1) is [1].\n# 2. returned list sorted in increasing order.\n# For example:\n# get_odd_collatz(5) returns [1, 5] # The collatz sequence for 5 is [5, 16, 8, 4, 2, 1], so the odd numbers are only 1, and 5.\n# >>> HumanEval.get_odd_collatz(5)\n# [1, 5]\n\ndefmodule HumanEval do\n def candidate(n), do: get_odd_collatz(n)\n def get_odd_collatz(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_123_get_odd_collatz.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'get_odd_collatz' do\n assert [1, 5, 7, 11, 13, 17] == HumanEval.candidate(14)\n assert [1, 5] == HumanEval.candidate(5)\n assert [1, 3, 5] == HumanEval.candidate(12)\n assert [1] == HumanEval.candidate(1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_124_valid_date", "language": "elixir", "prompt": "# You have to write a function which validates a given date string and\n# returns true if the date is valid otherwise false.\n# The date is valid if all of the following rules are satisfied:\n# 1. The date string is not empty.\n# 2. The number of days is not less than 1 or higher than 31 days for months 1,3,5,7,8,10,12. And the number of days is not less than 1 or higher than 30 days for months 4,6,9,11. And, the number of days is not less than 1 or higher than 29 for the month 2.\n# 3. The months should not be less than 1 or higher than 12.\n# 4. The date should be in the format: mm-dd-yyyy\n# >>> HumanEval.valid_date(\"03-11-2000\")\n# true\n# >>> HumanEval.valid_date(\"15-01-2012\")\n# false\n# >>> HumanEval.valid_date(\"04-0-2040\")\n# false\n# >>> HumanEval.valid_date(\"06-04-2020\")\n# true\n# >>> HumanEval.valid_date(\"06/04/2020\")\n# false\n\ndefmodule HumanEval do\n def candidate(date), do: valid_date(date)\n def valid_date(date) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_124_valid_date.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'valid_date' do\n assert true == HumanEval.candidate(\"03-11-2000\")\n assert false == HumanEval.candidate(\"15-01-2012\")\n assert false == HumanEval.candidate(\"04-0-2040\")\n assert true == HumanEval.candidate(\"06-04-2020\")\n assert true == HumanEval.candidate(\"01-01-2007\")\n assert false == HumanEval.candidate(\"03-32-2011\")\n assert false == HumanEval.candidate(\"\")\n assert false == HumanEval.candidate(\"04-31-3000\")\n assert true == HumanEval.candidate(\"06-06-2005\")\n assert false == HumanEval.candidate(\"21-31-2000\")\n assert true == HumanEval.candidate(\"04-12-2003\")\n assert false == HumanEval.candidate(\"04122003\")\n assert false == HumanEval.candidate(\"20030412\")\n assert false == HumanEval.candidate(\"2003-04\")\n assert false == HumanEval.candidate(\"2003-04-12\")\n assert false == HumanEval.candidate(\"04-2003\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_125_split_words", "language": "elixir", "prompt": "# Given a string of words, return a list of words split on whitespace, if no whitespaces exists in the text you\n# should split on commas ',' if no commas exists you should return the number of lower-case letters with odd order in the\n# alphabet, ord('a') = 0, ord('b') = 1, ... ord('z') = 25\n# Examples\n# >>> HumanEval.split_words(\"Hello world!\")\n# [\"Hello\", \"world!\"]\n# >>> HumanEval.split_words(\"Hello,world!\")\n# [\"Hello\", \"world!\"]\n# >>> HumanEval.split_words(\"abcdef\")\n# 3\n\ndefmodule HumanEval do\n def candidate(txt), do: split_words(txt)\n def split_words(txt) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_125_split_words.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'split_words' do\n assert [\"Hello\", \"world!\"] == HumanEval.candidate(\"Hello world!\")\n assert [\"Hello\", \"world!\"] == HumanEval.candidate(\"Hello,world!\")\n assert [\"Hello\", \"world,!\"] == HumanEval.candidate(\"Hello world,!\")\n assert [\"Hello,Hello,world\", \"!\"] == HumanEval.candidate(\"Hello,Hello,world !\")\n assert 3 == HumanEval.candidate(\"abcdef\")\n assert 2 == HumanEval.candidate(\"aaabb\")\n assert 1 == HumanEval.candidate(\"aaaBb\")\n assert 0 == HumanEval.candidate(\"\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_126_is_sorted", "language": "elixir", "prompt": "# Given a list of numbers, return whether or not they are sorted\n# in ascending order. If list has more than 1 duplicate of the same\n# number, return false. Assume no negative numbers and only integers.\n# Examples\n# >>> HumanEval.is_sorted([5])\n# true\n# >>> HumanEval.is_sorted([1, 2, 3, 4, 5])\n# true\n# >>> HumanEval.is_sorted([1, 3, 2, 4, 5])\n# false\n# >>> HumanEval.is_sorted([1, 2, 3, 4, 5, 6])\n# true\n# >>> HumanEval.is_sorted([1, 2, 3, 4, 5, 6, 7])\n# true\n# >>> HumanEval.is_sorted([1, 3, 2, 4, 5, 6, 7])\n# false\n# >>> HumanEval.is_sorted([1, 2, 2, 3, 3, 4])\n# true\n# >>> HumanEval.is_sorted([1, 2, 2, 2, 3, 4])\n# false\n\ndefmodule HumanEval do\n def candidate(lst), do: is_sorted(lst)\n def is_sorted(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_126_is_sorted.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_sorted' do\n assert true == HumanEval.candidate([5])\n assert true == HumanEval.candidate([1, 2, 3, 4, 5])\n assert false == HumanEval.candidate([1, 3, 2, 4, 5])\n assert true == HumanEval.candidate([1, 2, 3, 4, 5, 6])\n assert true == HumanEval.candidate([1, 2, 3, 4, 5, 6, 7])\n assert false == HumanEval.candidate([1, 3, 2, 4, 5, 6, 7])\n assert true == HumanEval.candidate([])\n assert true == HumanEval.candidate([1])\n assert false == HumanEval.candidate([3, 2, 1])\n assert false == HumanEval.candidate([1, 2, 2, 2, 3, 4])\n assert false == HumanEval.candidate([1, 2, 3, 3, 3, 4])\n assert true == HumanEval.candidate([1, 2, 2, 3, 3, 4])\n assert true == HumanEval.candidate([1, 2, 3, 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_127_intersection", "language": "elixir", "prompt": "# You are given two intervals,\n# where each interval is a pair of integers. For example, interval = (start, end) = (1, 2).\n# The given intervals are closed which means that the interval (start, end)\n# includes both start and end.\n# For each given interval, it is assumed that its start is less or equal its end.\n# Your task is to determine whether the length of intersection of these two \n# intervals is a prime number.\n# Example, the intersection of the intervals (1, 3), (2, 4) is (2, 3)\n# which its length is 1, which not a prime number.\n# If the length of the intersection is a prime number, return \"YES\",\n# otherwise, return \"NO\".\n# If the two intervals don't intersect, return \"NO\".\n# [input/output] samples:\n# >>> HumanEval.intersection({1, 2}, {2, 3})\n# \"NO\"\n# >>> HumanEval.intersection({-1, 1}, {0, 4})\n# \"NO\"\n# >>> HumanEval.intersection({-3, -1}, {-5, 5})\n# \"YES\"\n\ndefmodule HumanEval do\n def candidate(interval1, interval2), do: intersection(interval1, interval2)\n def intersection(interval1, interval2) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_127_intersection.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'intersection' do\n assert \"NO\" == HumanEval.candidate({1, 2}, {2, 3})\n assert \"NO\" == HumanEval.candidate({-1, 1}, {0, 4})\n assert \"YES\" == HumanEval.candidate({-3, -1}, {-5, 5})\n assert \"YES\" == HumanEval.candidate({-2, 2}, {-4, 0})\n assert \"NO\" == HumanEval.candidate({-11, 2}, {-1, -1})\n assert \"NO\" == HumanEval.candidate({1, 2}, {3, 5})\n assert \"NO\" == HumanEval.candidate({1, 2}, {1, 2})\n assert \"NO\" == HumanEval.candidate({-2, -2}, {-3, -2})\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_128_prod_signs", "language": "elixir", "prompt": "# You are given a list arr of integers and you need to return\n# sum of magnitudes of integers multiplied by product of all signs\n# of each number in the list, represented by 1, -1 or 0.\n# Note: return nil for empty arr.\n# Example:\n# >>> HumanEval.prod_signs([1, 2, 2, -4])\n# 9\n# >>> HumanEval.prod_signs([0, 1])\n# 0\n# >>> HumanEval.prod_signs([])\n# nil\n\ndefmodule HumanEval do\n def candidate(arr), do: prod_signs(arr)\n def prod_signs(arr) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_128_prod_signs.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'prod_signs' do\n assert -9 == HumanEval.candidate([1, 2, 2, -4])\n assert 0 == HumanEval.candidate([0, 1])\n assert -10 == HumanEval.candidate([1, 1, 1, 2, 3, -1, 1])\n assert nil == HumanEval.candidate([])\n assert 20 == HumanEval.candidate([2, 4, 1, 2, -1, -1, 9])\n assert 4 == HumanEval.candidate([-1, 1, -1, 1])\n assert -4 == HumanEval.candidate([-1, 1, 1, 1])\n assert 0 == HumanEval.candidate([-1, 1, 1, 0])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_129_minPath", "language": "elixir", "prompt": "# Given a grid with N rows and N columns (N >= 2) and a positive integer k, \n# each cell of the grid contains a value. Every integer in the range [1, N * N]\n# inclusive appears exactly once on the cells of the grid.\n# You have to find the minimum path of length k in the grid. You can start\n# from any cell, and in each step you can move to any of the neighbor cells,\n# in other words, you can go to cells which share an edge with you current\n# cell.\n# Please note that a path of length k means visiting exactly k cells (not\n# necessarily distinct).\n# You CANNOT go off the grid.\n# A path A (of length k) is considered less than a path B (of length k) if\n# after making the ordered lists of the values on the cells that A and B go\n# through (let's call them lst_A and lst_B), lst_A is lexicographically less\n# than lst_B, in other words, there exist an integer index i (1 <= i <= k)\n# such that lst_A[i] < lst_B[i] and for any j (1 <= j < i) we have\n# lst_A[j] = lst_B[j].\n# It is guaranteed that the answer is unique.\n# Return an ordered list of the values on the cells that the minimum path go through.\n# Examples: \n# >>> HumanEval.minPath([[1, 2, 3], [4, 5, 6], [7, 8, 9]], 3)\n# [1, 2, 1]\n# >>> HumanEval.minPath([[5, 9, 3], [4, 1, 6], [7, 8, 2]], 1)\n# [1]\n\ndefmodule HumanEval do\n def candidate(grid, k), do: minPath(grid, k)\n def minPath(grid, k) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_129_minPath.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'minPath' do\n assert [1, 2, 1] == HumanEval.candidate([[1, 2, 3], [4, 5, 6], [7, 8, 9]], 3)\n assert [1] == HumanEval.candidate([[5, 9, 3], [4, 1, 6], [7, 8, 2]], 1)\n assert [1, 2, 1, 2] == HumanEval.candidate([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]], 4)\n assert [1, 10, 1, 10, 1, 10, 1] == HumanEval.candidate([[6, 4, 13, 10], [5, 7, 12, 1], [3, 16, 11, 15], [8, 14, 9, 2]], 7)\n assert [1, 7, 1, 7, 1] == HumanEval.candidate([[8, 14, 9, 2], [6, 4, 13, 15], [5, 7, 1, 12], [3, 10, 11, 16]], 5)\n assert [1, 6, 1, 6, 1, 6, 1, 6, 1] == HumanEval.candidate([[11, 8, 7, 2], [5, 16, 14, 4], [9, 3, 15, 6], [12, 13, 10, 1]], 9)\n assert [1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6] == HumanEval.candidate([[12, 13, 10, 1], [9, 3, 15, 6], [5, 16, 14, 4], [11, 8, 7, 2]], 12)\n assert [1, 3, 1, 3, 1, 3, 1, 3] == HumanEval.candidate([[2, 7, 4], [3, 1, 5], [6, 8, 9]], 8)\n assert [1, 5, 1, 5, 1, 5, 1, 5] == HumanEval.candidate([[6, 1, 5], [3, 8, 9], [2, 7, 4]], 8)\n assert [1, 2, 1, 2, 1, 2, 1, 2, 1, 2] == HumanEval.candidate([[1, 2], [3, 4]], 10)\n assert [1, 3, 1, 3, 1, 3, 1, 3, 1, 3] == HumanEval.candidate([[1, 3], [3, 2]], 10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_12_longest", "language": "elixir", "prompt": "# Out of list of strings, return the longest one. Return the first one in case of multiple\n# strings of the same length. Return nil in case the input list is empty.\n# >>> HumanEval.longest([])\n# nil\n# >>> HumanEval.longest([\"a\", \"b\", \"c\"])\n# \"a\"\n# >>> HumanEval.longest([\"a\", \"bb\", \"ccc\"])\n# \"ccc\"\n\ndefmodule HumanEval do\n def candidate(strings), do: longest(strings)\n def longest(strings) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_12_longest.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'longest' do\n assert nil == HumanEval.candidate([])\n assert \"x\" == HumanEval.candidate([\"x\", \"y\", \"z\"])\n assert \"zzzz\" == HumanEval.candidate([\"x\", \"yyy\", \"zzzz\", \"www\", \"kkkk\", \"abc\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_130_tri", "language": "elixir", "prompt": "# Everyone knows Fibonacci sequence, it was studied deeply by mathematicians in \n# the last couple centuries. However, what people don't know is Tribonacci sequence.\n# Tribonacci sequence is defined by the recurrence:\n# tri(1) = 3\n# tri(n) = 1 + n / 2, if n is even.\n# tri(n) = tri(n - 1) + tri(n - 2) + tri(n + 1), if n is odd.\n# For example:\n# tri(2) = 1 + (2 / 2) = 2\n# tri(4) = 3\n# tri(3) = tri(2) + tri(1) + tri(4)\n# = 2 + 3 + 3 = 8 \n# You are given a non-negative integer number n, you have to a return a list of the \n# first n + 1 numbers of the Tribonacci sequence.\n# Examples:\n# >>> HumanEval.tri(3)\n# [1, 3, 2, 8]\n\ndefmodule HumanEval do\n def candidate(n), do: tri(n)\n def tri(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_130_tri.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'tri' do\n assert [1, 3, 2, 8] == HumanEval.candidate(3)\n assert [1, 3, 2, 8, 3] == HumanEval.candidate(4)\n assert [1, 3, 2, 8, 3, 15] == HumanEval.candidate(5)\n assert [1, 3, 2, 8, 3, 15, 4] == HumanEval.candidate(6)\n assert [1, 3, 2, 8, 3, 15, 4, 24] == HumanEval.candidate(7)\n assert [1, 3, 2, 8, 3, 15, 4, 24, 5] == HumanEval.candidate(8)\n assert [1, 3, 2, 8, 3, 15, 4, 24, 5, 35] == HumanEval.candidate(9)\n assert [1, 3, 2, 8, 3, 15, 4, 24, 5, 35, 6, 48, 7, 63, 8, 80, 9, 99, 10, 120, 11] == HumanEval.candidate(20)\n assert [1] == HumanEval.candidate(0)\n assert [1, 3] == HumanEval.candidate(1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_131_digits", "language": "elixir", "prompt": "# Given a positive integer n, return the product of the odd digits.\n# Return 0 if all digits are even.\n# For example:\n# >>> HumanEval.digits(1)\n# 1\n# >>> HumanEval.digits(4)\n# 0\n# >>> HumanEval.digits(235)\n# 15\n\ndefmodule HumanEval do\n def candidate(n), do: digits(n)\n def digits(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_131_digits.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'digits' do\n assert 5 == HumanEval.candidate(5)\n assert 5 == HumanEval.candidate(54)\n assert 1 == HumanEval.candidate(120)\n assert 5 == HumanEval.candidate(5014)\n assert 315 == HumanEval.candidate(98765)\n assert 2625 == HumanEval.candidate(5576543)\n assert 0 == HumanEval.candidate(2468)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_132_is_nested", "language": "elixir", "prompt": "# Create a function that takes a string as input which contains only square brackets.\n# The function should return true if and only if there is a valid subsequence of brackets \n# where at least one bracket in the subsequence is nested.\n# >>> HumanEval.is_nested(\"[[]]\")\n# true\n# >>> HumanEval.is_nested(\"[]]]]]]][[[[[]\")\n# false\n# >>> HumanEval.is_nested(\"[][]\")\n# false\n# >>> HumanEval.is_nested(\"[]\")\n# false\n# >>> HumanEval.is_nested(\"[[][]]\")\n# true\n# >>> HumanEval.is_nested(\"[[]][[\")\n# true\n\ndefmodule HumanEval do\n def candidate(string), do: is_nested(string)\n def is_nested(string) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_132_is_nested.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_nested' do\n assert true == HumanEval.candidate(\"[[]]\")\n assert false == HumanEval.candidate(\"[]]]]]]][[[[[]\")\n assert false == HumanEval.candidate(\"[][]\")\n assert false == HumanEval.candidate(\"[]\")\n assert true == HumanEval.candidate(\"[[[[]]]]\")\n assert false == HumanEval.candidate(\"[]]]]]]]]]]\")\n assert true == HumanEval.candidate(\"[][][[]]\")\n assert false == HumanEval.candidate(\"[[]\")\n assert false == HumanEval.candidate(\"[]]\")\n assert true == HumanEval.candidate(\"[[]][[\")\n assert true == HumanEval.candidate(\"[[][]]\")\n assert false == HumanEval.candidate(\"\")\n assert false == HumanEval.candidate(\"[[[[[[[[\")\n assert false == HumanEval.candidate(\"]]]]]]]]\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_133_sum_squares", "language": "elixir", "prompt": "# You are given a list of numbers.\n# You need to return the sum of squared numbers in the given list,\n# round each element in the list to the upper int(Ceiling) first.\n# Examples:\n# >>> HumanEval.lst([1.0, 2.0, 3.0])\n# 14\n# >>> HumanEval.lst([1.0, 4.0, 9.0])\n# 98\n# >>> HumanEval.lst([1.0, 3.0, 5.0, 7.0])\n# 84\n# >>> HumanEval.lst([1.4, 4.2, 0.0])\n# 29\n# >>> HumanEval.lst([-2.4, 1.0, 1.0])\n# 6\n\ndefmodule HumanEval do\n def candidate(lst), do: sum_squares(lst)\n def sum_squares(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_133_sum_squares.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sum_squares' do\n assert 14 == HumanEval.candidate([1.0, 2.0, 3.0])\n assert 14 == HumanEval.candidate([1.0, 2.0, 3.0])\n assert 84 == HumanEval.candidate([1.0, 3.0, 5.0, 7.0])\n assert 29 == HumanEval.candidate([1.4, 4.2, 0.0])\n assert 6 == HumanEval.candidate([-2.4, 1.0, 1.0])\n assert 10230 == HumanEval.candidate([100.0, 1.0, 15.0, 2.0])\n assert 200000000 == HumanEval.candidate([10000.0, 10000.0])\n assert 75 == HumanEval.candidate([-1.4, 4.6, 6.3])\n assert 1086 == HumanEval.candidate([-1.4, 17.9, 18.9, 19.9])\n assert 0 == HumanEval.candidate([0.0])\n assert 1 == HumanEval.candidate([-1.0])\n assert 2 == HumanEval.candidate([-1.0, 1.0, 0.0])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_134_check_if_last_char_is_a_letter", "language": "elixir", "prompt": "# Create a function that returns true if the last character\n# of a given string is an alphabetical character and is not\n# a part of a word, and false otherwise.\n# Note: \"word\" is a group of characters separated by space.\n# Examples:\n# >>> HumanEval.check_if_last_char_is_a_letter(\"apple pie\")\n# false\n# >>> HumanEval.check_if_last_char_is_a_letter(\"apple pi e\")\n# true\n# >>> HumanEval.check_if_last_char_is_a_letter(\"apple pi e \")\n# false\n# >>> HumanEval.check_if_last_char_is_a_letter(\"\")\n# false\n\ndefmodule HumanEval do\n def candidate(txt), do: check_if_last_char_is_a_letter(txt)\n def check_if_last_char_is_a_letter(txt) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_134_check_if_last_char_is_a_letter.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'check_if_last_char_is_a_letter' do\n assert false == HumanEval.candidate(\"apple\")\n assert true == HumanEval.candidate(\"apple pi e\")\n assert false == HumanEval.candidate(\"eeeee\")\n assert true == HumanEval.candidate(\"A\")\n assert false == HumanEval.candidate(\"Pumpkin pie \")\n assert false == HumanEval.candidate(\"Pumpkin pie 1\")\n assert false == HumanEval.candidate(\"\")\n assert false == HumanEval.candidate(\"eeeee e \")\n assert false == HumanEval.candidate(\"apple pie\")\n assert false == HumanEval.candidate(\"apple pi e \")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_135_can_arrange", "language": "elixir", "prompt": "# Create a function which returns the largest index of an element which\n# is not greater than or equal to the element immediately preceding it. If\n# no such element exists then return -1. The given list will not contain\n# duplicate values.\n# Examples:\n# >>> HumanEval.can_arrange([1, 2, 4, 3, 5])\n# 3\n# >>> HumanEval.can_arrange([1, 2, 3])\n# -1\n\ndefmodule HumanEval do\n def candidate(arr), do: can_arrange(arr)\n def can_arrange(arr) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_135_can_arrange.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'can_arrange' do\n assert 3 == HumanEval.candidate([1, 2, 4, 3, 5])\n assert -1 == HumanEval.candidate([1, 2, 4, 5])\n assert 2 == HumanEval.candidate([1, 4, 2, 5, 6, 7, 8, 9, 10])\n assert 4 == HumanEval.candidate([4, 8, 5, 7, 3])\n assert -1 == HumanEval.candidate([])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_136_largest_smallest_integers", "language": "elixir", "prompt": "# Create a function that returns a tuple (a, b), where 'a' is\n# the largest of negative integers, and 'b' is the smallest\n# of positive integers in a list.\n# If there is no negative or positive integers, return them as nil.\n# Examples:\n# >>> HumanEval.largest_smallest_integers([2, 4, 1, 3, 5, 7])\n# {nil, 1}\n# >>> HumanEval.largest_smallest_integers([])\n# {nil, nil}\n# >>> HumanEval.largest_smallest_integers([0])\n# {nil, nil}\n\ndefmodule HumanEval do\n def candidate(lst), do: largest_smallest_integers(lst)\n def largest_smallest_integers(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_136_largest_smallest_integers.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'largest_smallest_integers' do\n assert {nil, 1} == HumanEval.candidate([2, 4, 1, 3, 5, 7])\n assert {nil, 1} == HumanEval.candidate([2, 4, 1, 3, 5, 7, 0])\n assert {-2, 1} == HumanEval.candidate([1, 3, 2, 4, 5, 6, -2])\n assert {-7, 2} == HumanEval.candidate([4, 5, 3, 6, 2, 7, -7])\n assert {-9, 2} == HumanEval.candidate([7, 3, 8, 4, 9, 2, 5, -9])\n assert {nil, nil} == HumanEval.candidate([])\n assert {nil, nil} == HumanEval.candidate([0])\n assert {-1, nil} == HumanEval.candidate([-1, -3, -5, -6])\n assert {-1, nil} == HumanEval.candidate([-1, -3, -5, -6, 0])\n assert {-3, 1} == HumanEval.candidate([-6, -4, -4, -3, 1])\n assert {-3, 1} == HumanEval.candidate([-6, -4, -4, -3, -100, 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_137_compare_one", "language": "elixir", "prompt": "# Create a function that takes integers, floats, or strings representing\n# real numbers, and returns the larger variable in its given variable type.\n# Return nil if the values are equal.\n# Note: If a real number is represented as a string, the floating point might be . or ,\n# >>> HumanEval.compare_one(1, 2.5)\n# 2.5\n# >>> HumanEval.compare_one(1, \"2,3\")\n# \"2,3\"\n# >>> HumanEval.compare_one(\"5,1\", \"6\")\n# \"6\"\n# >>> HumanEval.compare_one(\"1\", 1)\n# nil\n\ndefmodule HumanEval do\n def candidate(a, b), do: compare_one(a, b)\n def compare_one(a, b) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_137_compare_one.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'compare_one' do\n assert 2 == HumanEval.candidate(1, 2)\n assert 2.5 == HumanEval.candidate(1, 2.5)\n assert 3 == HumanEval.candidate(2, 3)\n assert 6 == HumanEval.candidate(5, 6)\n assert \"2,3\" == HumanEval.candidate(1, \"2,3\")\n assert \"6\" == HumanEval.candidate(\"5,1\", \"6\")\n assert \"2\" == HumanEval.candidate(\"1\", \"2\")\n assert nil == HumanEval.candidate(\"1\", 1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_138_is_equal_to_sum_even", "language": "elixir", "prompt": "# Evaluate whether the given number n can be written as the sum of exactly 4 positive even numbers\n# Example\n# >>> HumanEval.is_equal_to_sum_even(4)\n# false\n# >>> HumanEval.is_equal_to_sum_even(6)\n# false\n# >>> HumanEval.is_equal_to_sum_even(8)\n# true\n\ndefmodule HumanEval do\n def candidate(n), do: is_equal_to_sum_even(n)\n def is_equal_to_sum_even(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_138_is_equal_to_sum_even.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_equal_to_sum_even' do\n assert false == HumanEval.candidate(4)\n assert false == HumanEval.candidate(6)\n assert true == HumanEval.candidate(8)\n assert true == HumanEval.candidate(10)\n assert false == HumanEval.candidate(11)\n assert true == HumanEval.candidate(12)\n assert false == HumanEval.candidate(13)\n assert true == HumanEval.candidate(16)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_139_special_factorial", "language": "elixir", "prompt": "# The Brazilian factorial is defined as:\n# brazilian_factorial(n) = n! * (n-1)! * (n-2)! * ... * 1!\n# where n > 0\n# For example:\n# >>> HumanEval.special_factorial(4)\n# 288\n# The function will receive an integer as input and should return the special\n# factorial of this integer.\n\ndefmodule HumanEval do\n def candidate(n), do: special_factorial(n)\n def special_factorial(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_139_special_factorial.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'special_factorial' do\n assert 288 == HumanEval.candidate(4)\n assert 34560 == HumanEval.candidate(5)\n assert 125411328000 == HumanEval.candidate(7)\n assert 1 == HumanEval.candidate(1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_13_greatest_common_divisor", "language": "elixir", "prompt": "# Return a greatest common divisor of two integers a and b\n# >>> HumanEval.greatest_common_divisor(3, 5)\n# 1\n# >>> HumanEval.greatest_common_divisor(25, 15)\n# 5\n\ndefmodule HumanEval do\n def candidate(a, b), do: greatest_common_divisor(a, b)\n def greatest_common_divisor(a, b) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_13_greatest_common_divisor.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'greatest_common_divisor' do\n assert 1 == HumanEval.candidate(3, 7)\n assert 5 == HumanEval.candidate(10, 15)\n assert 7 == HumanEval.candidate(49, 14)\n assert 12 == HumanEval.candidate(144, 60)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_140_fix_spaces", "language": "elixir", "prompt": "# Given a string text, replace all spaces in it with underscores, \n# and if a string has more than 2 consecutive spaces, \n# then replace all consecutive spaces with - \n# >>> HumanEval.fix_spaces(\" Example\")\n# \"Example\"\n# >>> HumanEval.fix_spaces(\" Example 1\")\n# \"Example_1\"\n# >>> HumanEval.fix_spaces(\" Example 2\")\n# \"_Example_2\"\n# >>> HumanEval.fix_spaces(\" Example 3\")\n# \"_Example-3\"\n\ndefmodule HumanEval do\n def candidate(text), do: fix_spaces(text)\n def fix_spaces(text) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_140_fix_spaces.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fix_spaces' do\n assert \"Example\" == HumanEval.candidate(\"Example\")\n assert \"Mudasir_Hanif_\" == HumanEval.candidate(\"Mudasir Hanif \")\n assert \"Yellow_Yellow__Dirty__Fellow\" == HumanEval.candidate(\"Yellow Yellow Dirty Fellow\")\n assert \"Exa-mple\" == HumanEval.candidate(\"Exa mple\")\n assert \"-Exa_1_2_2_mple\" == HumanEval.candidate(\" Exa 1 2 2 mple\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_141_file_name_check", "language": "elixir", "prompt": "# Create a function which takes a string representing a file's name, and returns\n# 'Yes' if the the file's name is valid, and returns 'No' otherwise.\n# A file's name is considered to be valid if and only if all the following conditions \n# are met:\n# - There should not be more than three digits ('0'-'9') in the file's name.\n# - The file's name contains exactly one dot '.'\n# - The substring before the dot should not be empty, and it starts with a letter from \n# the latin alphapet ('a'-'z' and 'A'-'Z').\n# - The substring after the dot should be one of these: ['txt', 'exe', 'dll']\n# Examples:\n# >>> HumanEval.file_name_check(\"example.txt\")\n# \"Yes\"\n# >>> HumanEval.file_name_check(\"1example.dll\")\n# \"No\"\n\ndefmodule HumanEval do\n def candidate(file_name), do: file_name_check(file_name)\n def file_name_check(file_name) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_141_file_name_check.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'file_name_check' do\n assert \"Yes\" == HumanEval.candidate(\"example.txt\")\n assert \"No\" == HumanEval.candidate(\"1example.dll\")\n assert \"No\" == HumanEval.candidate(\"s1sdf3.asd\")\n assert \"Yes\" == HumanEval.candidate(\"K.dll\")\n assert \"Yes\" == HumanEval.candidate(\"MY16FILE3.exe\")\n assert \"No\" == HumanEval.candidate(\"His12FILE94.exe\")\n assert \"No\" == HumanEval.candidate(\"_Y.txt\")\n assert \"No\" == HumanEval.candidate(\"?aREYA.exe\")\n assert \"No\" == HumanEval.candidate(\"/this_is_valid.dll\")\n assert \"No\" == HumanEval.candidate(\"this_is_valid.wow\")\n assert \"Yes\" == HumanEval.candidate(\"this_is_valid.txt\")\n assert \"No\" == HumanEval.candidate(\"this_is_valid.txtexe\")\n assert \"No\" == HumanEval.candidate(\"#this2_i4s_5valid.ten\")\n assert \"No\" == HumanEval.candidate(\"@this1_is6_valid.exe\")\n assert \"No\" == HumanEval.candidate(\"this_is_12valid.6exe4.txt\")\n assert \"No\" == HumanEval.candidate(\"all.exe.txt\")\n assert \"Yes\" == HumanEval.candidate(\"I563_No.exe\")\n assert \"Yes\" == HumanEval.candidate(\"Is3youfault.txt\")\n assert \"Yes\" == HumanEval.candidate(\"no_one#knows.dll\")\n assert \"No\" == HumanEval.candidate(\"1I563_Yes3.exe\")\n assert \"No\" == HumanEval.candidate(\"I563_Yes3.txtt\")\n assert \"No\" == HumanEval.candidate(\"final..txt\")\n assert \"No\" == HumanEval.candidate(\"final132\")\n assert \"No\" == HumanEval.candidate(\"_f4indsartal132.\")\n assert \"No\" == HumanEval.candidate(\".txt\")\n assert \"No\" == HumanEval.candidate(\"s.\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_142_sum_squares", "language": "elixir", "prompt": "# \"\n# This function will take a list of integers. For all entries in the list, the function shall square the integer entry if its index is a \n# multiple of 3 and will cube the integer entry if its index is a multiple of 4 and not a multiple of 3. The function will not \n# change the entries in the list whose indexes are not a multiple of 3 or 4. The function shall then return the sum of all entries. \n# Examples:\n# >>> lst\n# [1, 2, 3]\n# >>> lst\n# []\n# >>> lst\n# [-1, -5, 2, -1, -5]\n\ndefmodule HumanEval do\n def candidate(lst), do: sum_squares(lst)\n def sum_squares(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_142_sum_squares.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sum_squares' do\n assert 6 == HumanEval.candidate([1, 2, 3])\n assert 14 == HumanEval.candidate([1, 4, 9])\n assert 0 == HumanEval.candidate([])\n assert 9 == HumanEval.candidate([1, 1, 1, 1, 1, 1, 1, 1, 1])\n assert -3 == HumanEval.candidate([-1, -1, -1, -1, -1, -1, -1, -1, -1])\n assert 0 == HumanEval.candidate([0])\n assert -126 == HumanEval.candidate([-1, -5, 2, -1, -5])\n assert 3030 == HumanEval.candidate([-56, -99, 1, 0, -2])\n assert 0 == HumanEval.candidate([-1, 0, 0, 0, 0, 0, 0, 0, -1])\n assert -14196 == HumanEval.candidate([-16, -9, -2, 36, 36, 26, -20, 25, -40, 20, -4, 12, -26, 35, 37])\n assert -1448 == HumanEval.candidate([-1, -3, 17, -1, -15, 13, -1, 14, -14, -12, -5, 14, -14, 6, 13, 11, 16, 16, 4, 10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_143_words_in_sentence", "language": "elixir", "prompt": "# You are given a string representing a sentence,\n# the sentence contains some words separated by a space,\n# and you have to return a string that contains the words from the original sentence,\n# whose lengths are prime numbers,\n# the order of the words in the new string should be the same as the original one.\n# Example 1:\n# >>> HumanEval.words_in_sentence(\"This is a test\")\n# \"is\"\n# Example 2:\n# >>> HumanEval.words_in_sentence(\"lets go for swimming\")\n# \"go for\"\n# Constraints:\n# * 1 <= len(sentence) <= 100\n# * sentence contains only letters\n\ndefmodule HumanEval do\n def candidate(sentence), do: words_in_sentence(sentence)\n def words_in_sentence(sentence) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_143_words_in_sentence.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'words_in_sentence' do\n assert \"is\" == HumanEval.candidate(\"This is a test\")\n assert \"go for\" == HumanEval.candidate(\"lets go for swimming\")\n assert \"there is no place\" == HumanEval.candidate(\"there is no place available here\")\n assert \"Hi am Hussein\" == HumanEval.candidate(\"Hi I am Hussein\")\n assert \"go for it\" == HumanEval.candidate(\"go for it\")\n assert \"\" == HumanEval.candidate(\"here\")\n assert \"is\" == HumanEval.candidate(\"here is\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_144_simplify", "language": "elixir", "prompt": "# Your task is to implement a function that will simplify the expression\n# x * n. The function returns true if x * n evaluates to a whole number and false\n# otherwise. Both x and n, are string representation of a fraction, and have the following format,\n# / where both numerator and denominator are positive whole numbers.\n# You can assume that x, and n are valid fractions, and do not have zero as denominator.\n# >>> HumanEval.simplify(\"1/5\", \"5/1\")\n# true\n# >>> HumanEval.simplify(\"1/6\", \"2/1\")\n# false\n# >>> HumanEval.simplify(\"7/10\", \"10/2\")\n# false\n\ndefmodule HumanEval do\n def candidate(x, n), do: simplify(x, n)\n def simplify(x, n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_144_simplify.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'simplify' do\n assert true == HumanEval.candidate(\"1/5\", \"5/1\")\n assert false == HumanEval.candidate(\"1/6\", \"2/1\")\n assert true == HumanEval.candidate(\"5/1\", \"3/1\")\n assert false == HumanEval.candidate(\"7/10\", \"10/2\")\n assert true == HumanEval.candidate(\"2/10\", \"50/10\")\n assert true == HumanEval.candidate(\"7/2\", \"4/2\")\n assert true == HumanEval.candidate(\"11/6\", \"6/1\")\n assert false == HumanEval.candidate(\"2/3\", \"5/2\")\n assert false == HumanEval.candidate(\"5/2\", \"3/5\")\n assert true == HumanEval.candidate(\"2/4\", \"8/4\")\n assert true == HumanEval.candidate(\"2/4\", \"4/2\")\n assert true == HumanEval.candidate(\"1/5\", \"5/1\")\n assert false == HumanEval.candidate(\"1/5\", \"1/5\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_145_order_by_points", "language": "elixir", "prompt": "# Write a function which sorts the given list of integers\n# in ascending order according to the sum of their digits.\n# Note: if there are several items with similar sum of their digits,\n# order them based on their index in original list.\n# For example:\n# >>> HumanEval.order_by_points([1, 11, -1, -11, -12])\n# [-1, -11, 1, -12, 11]\n# >>> HumanEval.order_by_points([])\n# []\n\ndefmodule HumanEval do\n def candidate(nums), do: order_by_points(nums)\n def order_by_points(nums) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_145_order_by_points.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'order_by_points' do\n assert [-1, -11, 1, -12, 11] == HumanEval.candidate([1, 11, -1, -11, -12])\n assert [0, 2, 3, 6, 53, 423, 423, 423, 1234, 145, 37, 46, 56, 463, 3457] == HumanEval.candidate([1234, 423, 463, 145, 2, 423, 423, 53, 6, 37, 3457, 3, 56, 0, 46])\n assert [] == HumanEval.candidate([])\n assert [-3, -32, -98, -11, 1, 2, 43, 54] == HumanEval.candidate([1, -11, -32, 43, 54, -98, 2, -3])\n assert [1, 10, 2, 11, 3, 4, 5, 6, 7, 8, 9] == HumanEval.candidate([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])\n assert [-76, -21, 0, 4, 23, 6, 6] == HumanEval.candidate([0, 6, 6, -76, -21, 23, 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_146_specialFilter", "language": "elixir", "prompt": "# Write a function that takes a list of numbers as input and returns \n# the number of elements in the list that are greater than 10 and both \n# first and last digits of a number are odd (1, 3, 5, 7, 9).\n# For example:\n# >>> HumanEval.specialFilter([15, -73, 14, -15])\n# 1\n# >>> HumanEval.specialFilter([33, -2, -3, 45, 21, 109])\n# 2\n\ndefmodule HumanEval do\n def candidate(nums), do: specialFilter(nums)\n def specialFilter(nums) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_146_specialFilter.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'specialFilter' do\n assert 0 == HumanEval.candidate([5, -2, 1, -5])\n assert 1 == HumanEval.candidate([15, -73, 14, -15])\n assert 2 == HumanEval.candidate([33, -2, -3, 45, 21, 109])\n assert 4 == HumanEval.candidate([43, -12, 93, 125, 121, 109])\n assert 3 == HumanEval.candidate([71, -2, -33, 75, 21, 19])\n assert 0 == HumanEval.candidate([1])\n assert 0 == HumanEval.candidate([])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_147_get_max_triples", "language": "elixir", "prompt": "# You are given a positive integer n. You have to create an integer list a of length n.\n# For each i (1 \u2264 i \u2264 n), the value of a[i] = i * i - i + 1.\n# Return the number of triples (a[i], a[j], a[k]) of a where i < j < k, \n# and a[i] + a[j] + a[k] is a multiple of 3.\n# Example :\n# >>> HumanEval.get_max_triples(5)\n# 1\n# Explanation: \n# a = [1, 3, 7, 13, 21]\n# The only valid triple is (1, 7, 13).\n\ndefmodule HumanEval do\n def candidate(n), do: get_max_triples(n)\n def get_max_triples(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_147_get_max_triples.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'get_max_triples' do\n assert 1 == HumanEval.candidate(5)\n assert 4 == HumanEval.candidate(6)\n assert 36 == HumanEval.candidate(10)\n assert 53361 == HumanEval.candidate(100)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_148_bf", "language": "elixir", "prompt": "# There are eight planets in our solar system: the closerst to the Sun \n# is Mercury, the next one is Venus, then Earth, Mars, Jupiter, Saturn, \n# Uranus, Neptune.\n# Write a function that takes two planet names as strings planet1 and planet2. \n# The function should return a tuple containing all planets whose orbits are \n# located between the orbit of planet1 and the orbit of planet2, sorted by \n# the proximity to the sun. \n# The function should return an empty tuple if planet1 or planet2\n# are not correct planet names. \n# Examples\n# >>> HumanEval.bf(\"Jupiter\", \"Neptune\")\n# {\"Saturn\", \"Uranus\"}\n# >>> HumanEval.bf(\"Earth\", \"Mercury\")\n# \"Venus\"\n# >>> HumanEval.bf(\"Mercury\", \"Uranus\")\n# {\"Venus\", \"Earth\", \"Mars\", \"Jupiter\", \"Saturn\"}\n\ndefmodule HumanEval do\n def candidate(planet1, planet2), do: bf(planet1, planet2)\n def bf(planet1, planet2) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_148_bf.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'bf' do\n assert {\"Saturn\", \"Uranus\"} == HumanEval.candidate(\"Jupiter\", \"Neptune\")\n assert {\"Venus\"} == HumanEval.candidate(\"Earth\", \"Mercury\")\n assert {\"Venus\", \"Earth\", \"Mars\", \"Jupiter\", \"Saturn\"} == HumanEval.candidate(\"Mercury\", \"Uranus\")\n assert {\"Earth\", \"Mars\", \"Jupiter\", \"Saturn\", \"Uranus\"} == HumanEval.candidate(\"Neptune\", \"Venus\")\n assert {} == HumanEval.candidate(\"Earth\", \"Earth\")\n assert {} == HumanEval.candidate(\"Mars\", \"Earth\")\n assert {} == HumanEval.candidate(\"Jupiter\", \"Makemake\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_149_sorted_list_sum", "language": "elixir", "prompt": "# Write a function that accepts a list of strings as a parameter,\n# deletes the strings that have odd lengths from it,\n# and returns the resulted list with a sorted order,\n# The list is always a list of strings and never a list of numbers,\n# and it may contain duplicates.\n# The order of the list should be ascending by length of each word, and you\n# should return the list sorted by that rule.\n# If two words have the same length, sort the list alphabetically.\n# The function should return a list of strings in sorted order.\n# You may assume that all words will have the same length.\n# For example:\n# >>> HumanEval.list_sort([\"aa\", \"a\", \"aaa\"])\n# [\"aa\"]\n# >>> HumanEval.list_sort([\"ab\", \"a\", \"aaa\", \"cd\"])\n# [\"ab\", \"cd\"]\n\ndefmodule HumanEval do\n def candidate(lst), do: sorted_list_sum(lst)\n def sorted_list_sum(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_149_sorted_list_sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sorted_list_sum' do\n assert [\"aa\"] == HumanEval.candidate([\"aa\", \"a\", \"aaa\"])\n assert [\"AI\", \"asdf\", \"school\"] == HumanEval.candidate([\"school\", \"AI\", \"asdf\", \"b\"])\n assert [] == HumanEval.candidate([\"d\", \"b\", \"c\", \"a\"])\n assert [\"abcd\", \"dcba\"] == HumanEval.candidate([\"d\", \"dcba\", \"abcd\", \"a\"])\n assert [\"AI\", \"ai\", \"au\"] == HumanEval.candidate([\"AI\", \"ai\", \"au\"])\n assert [] == HumanEval.candidate([\"a\", \"b\", \"b\", \"c\", \"c\", \"a\"])\n assert [\"cc\", \"dd\", \"aaaa\", \"bbbb\"] == HumanEval.candidate([\"aaaa\", \"bbbb\", \"dd\", \"cc\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_14_all_prefixes", "language": "elixir", "prompt": "# Return list of all prefixes from shortest to longest of the input string\n# >>> HumanEval.all_prefixes(\"abc\")\n# [\"a\", \"ab\", \"abc\"]\n\ndefmodule HumanEval do\n def candidate(string), do: all_prefixes(string)\n def all_prefixes(string) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_14_all_prefixes.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'all_prefixes' do\n assert [] == HumanEval.candidate(\"\")\n assert [\"a\", \"as\", \"asd\", \"asdf\", \"asdfg\", \"asdfgh\"] == HumanEval.candidate(\"asdfgh\")\n assert [\"W\", \"WW\", \"WWW\"] == HumanEval.candidate(\"WWW\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_150_x_or_y", "language": "elixir", "prompt": "# A simple program which should return the value of x if n is \n# a prime number and should return the value of y otherwise.\n# Examples:\n# >>> HumanEval.x_or_y(7, 34, 12)\n# 34\n# >>> HumanEval.x_or_y(15, 8, 5)\n# 5\n\ndefmodule HumanEval do\n def candidate(n, x, y), do: x_or_y(n, x, y)\n def x_or_y(n, x, y) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_150_x_or_y.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'x_or_y' do\n assert 34 == HumanEval.candidate(7, 34, 12)\n assert 5 == HumanEval.candidate(15, 8, 5)\n assert 33 == HumanEval.candidate(3, 33, 5212)\n assert 3 == HumanEval.candidate(1259, 3, 52)\n assert -1 == HumanEval.candidate(7919, -1, 12)\n assert 583 == HumanEval.candidate(3609, 1245, 583)\n assert 129 == HumanEval.candidate(91, 56, 129)\n assert 1234 == HumanEval.candidate(6, 34, 1234)\n assert 0 == HumanEval.candidate(1, 2, 0)\n assert 2 == HumanEval.candidate(2, 2, 0)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_151_double_the_difference", "language": "elixir", "prompt": "# Given a list of numbers, return the sum of squares of the numbers\n# in the list that are odd. Ignore numbers that are negative or not integers.\n# >>> HumanEval.double_the_difference([1, 3, 2, 0])\n# 10\n# >>> HumanEval.double_the_difference([-1, -2, 0])\n# 0\n# >>> HumanEval.double_the_difference([9, -2])\n# 81\n# >>> HumanEval.double_the_difference([0])\n# 0\n# If the input list is empty, return 0.\n\ndefmodule HumanEval do\n def candidate(lst), do: double_the_difference(lst)\n def double_the_difference(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_151_double_the_difference.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'double_the_difference' do\n assert 0 == HumanEval.candidate([])\n assert 25 == HumanEval.candidate([5.0, 4.0])\n assert 0 == HumanEval.candidate([0.1, 0.2, 0.3])\n assert 0 == HumanEval.candidate([-10.0, -20.0, -30.0])\n assert 0 == HumanEval.candidate([-1.0, -2.0, 8.0])\n assert 34 == HumanEval.candidate([0.2, 3.0, 5.0])\n assert 165 == HumanEval.candidate([-9.0, -7.0, -5.0, -3.0, -1.0, 1.0, 3.0, 5.0, 7.0, 9.0])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_152_compare", "language": "elixir", "prompt": "# I think we all remember that feeling when the result of some long-awaited\n# event is finally known. The feelings and thoughts you have at that moment are\n# definitely worth noting down and comparing.\n# Your task is to determine if a person correctly guessed the results of a number of matches.\n# You are given two lists of scores and guesses of equal length, where each index shows a match. \n# Return a list of the same length denoting how far off each guess was. If they have guessed correctly,\n# the value is 0, and if not, the value is the absolute difference between the guess and the score.\n# example:\n# >>> HumanEval.compare([1, 2, 3, 4, 5, 1], [1, 2, 3, 4, 2, -2])\n# [0, 0, 0, 0, 3, 3]\n# >>> HumanEval.compare([0, 5, 0, 0, 0, 4], [4, 1, 1, 0, 0, -2])\n# [4, 4, 1, 0, 0, 6]\n\ndefmodule HumanEval do\n def candidate(game, guess), do: compare(game, guess)\n def compare(game, guess) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_152_compare.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'compare' do\n assert [0, 0, 0, 0, 3, 3] == HumanEval.candidate([1, 2, 3, 4, 5, 1], [1, 2, 3, 4, 2, -2])\n assert [0, 0, 0, 0, 0, 0] == HumanEval.candidate([0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0])\n assert [2, 4, 6] == HumanEval.candidate([1, 2, 3], [-1, -2, -3])\n assert [2, 0, 0, 1] == HumanEval.candidate([1, 2, 3, 5], [-1, 2, 3, 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_153_Strongest_Extension", "language": "elixir", "prompt": "# You will be given the name of a class (a string) and a list of extensions.\n# The extensions are to be used to load additional classes to the class. The\n# strength of the extension is as follows: Let CAP be the number of the uppercase\n# letters in the extension's name, and let SM be the number of lowercase letters \n# in the extension's name, the strength is given by the fraction CAP - SM. \n# You should find the strongest extension and return a string in this \n# format: ClassName.StrongestExtensionName.\n# If there are two or more extensions with the same strength, you should\n# choose the one that comes first in the list.\n# For example, if you are given \"Slices\" as the class and a list of the\n# extensions: ['SErviNGSliCes', 'Cheese', 'StuFfed'] then you should\n# return 'Slices.SErviNGSliCes' since 'SErviNGSliCes' is the strongest extension \n# (its strength is -1).\n# Example:\n# >>> HumanEval.Strongest_Extension(\"my_class\", [\"AA\", \"Be\", \"CC\"])\n# \"my_class.AA\"\n\ndefmodule HumanEval do\n def candidate(class_name, extensions), do: Strongest_Extension(class_name, extensions)\n def Strongest_Extension(class_name, extensions) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_153_Strongest_Extension.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'Strongest_Extension' do\n assert \"Watashi.eIGHt8OKe\" == HumanEval.candidate(\"Watashi\", [\"tEN\", \"niNE\", \"eIGHt8OKe\"])\n assert \"Boku123.YEs.WeCaNe\" == HumanEval.candidate(\"Boku123\", [\"nani\", \"NazeDa\", \"YEs.WeCaNe\", \"32145tggg\"])\n assert \"__YESIMHERE.NuLl__\" == HumanEval.candidate(\"__YESIMHERE\", [\"t\", \"eMptY\", \"nothing\", \"zeR00\", \"NuLl__\", \"123NoooneB321\"])\n assert \"K.TAR\" == HumanEval.candidate(\"K\", [\"Ta\", \"TAR\", \"t234An\", \"cosSo\"])\n assert \"__HAHA.123\" == HumanEval.candidate(\"__HAHA\", [\"Tab\", \"123\", \"781345\", \"-_-\"])\n assert \"YameRore.okIWILL123\" == HumanEval.candidate(\"YameRore\", [\"HhAas\", \"okIWILL123\", \"WorkOut\", \"Fails\", \"-_-\"])\n assert \"finNNalLLly.WoW\" == HumanEval.candidate(\"finNNalLLly\", [\"Die\", \"NowW\", \"Wow\", \"WoW\"])\n assert \"_.Bb\" == HumanEval.candidate(\"_\", [\"Bb\", \"91245\"])\n assert \"Sp.671235\" == HumanEval.candidate(\"Sp\", [\"671235\", \"Bb\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_154_cycpattern_check", "language": "elixir", "prompt": "# You are given 2 words. You need to return true if the second word or any of its rotations is a substring in the first word\n# >>> HumanEval.cycpattern_check(\"abcd\", \"abd\")\n# false\n# >>> HumanEval.cycpattern_check(\"hello\", \"ell\")\n# true\n# >>> HumanEval.cycpattern_check(\"whassup\", \"psus\")\n# false\n# >>> HumanEval.cycpattern_check(\"abab\", \"baa\")\n# true\n# >>> HumanEval.cycpattern_check(\"efef\", \"eeff\")\n# false\n# >>> HumanEval.cycpattern_check(\"himenss\", \"simen\")\n# true\n\ndefmodule HumanEval do\n def candidate(a, b), do: cycpattern_check(a, b)\n def cycpattern_check(a, b) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_154_cycpattern_check.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'cycpattern_check' do\n assert false == HumanEval.candidate(\"xyzw\", \"xyw\")\n assert true == HumanEval.candidate(\"yello\", \"ell\")\n assert false == HumanEval.candidate(\"whattup\", \"ptut\")\n assert true == HumanEval.candidate(\"efef\", \"fee\")\n assert false == HumanEval.candidate(\"abab\", \"aabb\")\n assert true == HumanEval.candidate(\"winemtt\", \"tinem\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_155_even_odd_count", "language": "elixir", "prompt": "# Given an integer. return a tuple that has the number of even and odd digits respectively.\n# Example:\n# >>> HumanEval.even_odd_count(-12)\n# {1, 1}\n# >>> HumanEval.even_odd_count(123)\n# {1, 2}\n\ndefmodule HumanEval do\n def candidate(num), do: even_odd_count(num)\n def even_odd_count(num) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_155_even_odd_count.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'even_odd_count' do\n assert {0, 1} == HumanEval.candidate(7)\n assert {1, 1} == HumanEval.candidate(-78)\n assert {2, 2} == HumanEval.candidate(3452)\n assert {3, 3} == HumanEval.candidate(346211)\n assert {3, 3} == HumanEval.candidate(-345821)\n assert {1, 0} == HumanEval.candidate(-2)\n assert {2, 3} == HumanEval.candidate(-45347)\n assert {1, 0} == HumanEval.candidate(0)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_156_int_to_mini_roman", "language": "elixir", "prompt": "# Given a positive integer, obtain its roman numeral equivalent as a string,\n# and return it in lowercase.\n# Restrictions: 1 <= num <= 1000\n# Examples:\n# >>> HumanEval.int_to_mini_roman(19)\n# \"xix\"\n# >>> HumanEval.int_to_mini_roman(152)\n# \"clii\"\n# >>> HumanEval.int_to_mini_roman(426)\n# \"cdxxvi\"\n\ndefmodule HumanEval do\n def candidate(number), do: int_to_mini_roman(number)\n def int_to_mini_roman(number) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_156_int_to_mini_roman.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'int_to_mini_roman' do\n assert \"xix\" == HumanEval.candidate(19)\n assert \"clii\" == HumanEval.candidate(152)\n assert \"ccli\" == HumanEval.candidate(251)\n assert \"cdxxvi\" == HumanEval.candidate(426)\n assert \"d\" == HumanEval.candidate(500)\n assert \"i\" == HumanEval.candidate(1)\n assert \"iv\" == HumanEval.candidate(4)\n assert \"xliii\" == HumanEval.candidate(43)\n assert \"xc\" == HumanEval.candidate(90)\n assert \"xciv\" == HumanEval.candidate(94)\n assert \"dxxxii\" == HumanEval.candidate(532)\n assert \"cm\" == HumanEval.candidate(900)\n assert \"cmxciv\" == HumanEval.candidate(994)\n assert \"m\" == HumanEval.candidate(1000)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_157_right_angle_triangle", "language": "elixir", "prompt": "# Given the lengths of the three sides of a triangle. Return true if the three\n# sides form a right-angled triangle, false otherwise.\n# A right-angled triangle is a triangle in which one angle is right angle or \n# 90 degree.\n# Example:\n# >>> HumanEval.right_angle_triangle(3, 4, 5)\n# true\n# >>> HumanEval.right_angle_triangle(1, 2, 3)\n# false\n\ndefmodule HumanEval do\n def candidate(a, b, c), do: right_angle_triangle(a, b, c)\n def right_angle_triangle(a, b, c) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_157_right_angle_triangle.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'right_angle_triangle' do\n assert true == HumanEval.candidate(3, 4, 5)\n assert false == HumanEval.candidate(1, 2, 3)\n assert true == HumanEval.candidate(10, 6, 8)\n assert false == HumanEval.candidate(2, 2, 2)\n assert true == HumanEval.candidate(7, 24, 25)\n assert false == HumanEval.candidate(10, 5, 7)\n assert true == HumanEval.candidate(5, 12, 13)\n assert true == HumanEval.candidate(15, 8, 17)\n assert true == HumanEval.candidate(48, 55, 73)\n assert false == HumanEval.candidate(1, 1, 1)\n assert false == HumanEval.candidate(2, 2, 10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_158_find_max", "language": "elixir", "prompt": "# Write a function that accepts a list of strings.\n# The list contains different words. Return the word with maximum number\n# of unique characters. If multiple strings have maximum number of unique\n# characters, return the one which comes first in lexicographical order.\n# >>> HumanEval.find_max([\"name\", \"of\", \"string\"])\n# \"string\"\n# >>> HumanEval.find_max([\"name\", \"enam\", \"game\"])\n# \"enam\"\n# >>> HumanEval.find_max([\"aaaaaaa\", \"bb\", \"cc\"])\n# \"aaaaaaa\"\n\ndefmodule HumanEval do\n def candidate(words), do: find_max(words)\n def find_max(words) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_158_find_max.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'find_max' do\n assert \"string\" == HumanEval.candidate([\"name\", \"of\", \"string\"])\n assert \"enam\" == HumanEval.candidate([\"name\", \"enam\", \"game\"])\n assert \"aaaaaaa\" == HumanEval.candidate([\"aaaaaaa\", \"bb\", \"cc\"])\n assert \"abc\" == HumanEval.candidate([\"abc\", \"cba\"])\n assert \"footbott\" == HumanEval.candidate([\"play\", \"this\", \"game\", \"of\", \"footbott\"])\n assert \"gonna\" == HumanEval.candidate([\"we\", \"are\", \"gonna\", \"rock\"])\n assert \"nation\" == HumanEval.candidate([\"we\", \"are\", \"a\", \"mad\", \"nation\"])\n assert \"this\" == HumanEval.candidate([\"this\", \"is\", \"a\", \"prrk\"])\n assert \"b\" == HumanEval.candidate([\"b\"])\n assert \"play\" == HumanEval.candidate([\"play\", \"play\", \"play\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_159_eat", "language": "elixir", "prompt": "# You're a hungry rabbit, and you already have eaten a certain number of carrots,\n# but now you need to eat more carrots to complete the day's meals.\n# you should return a list of [ total number of eaten carrots after your meals,\n# the number of carrots left after your meals ]\n# if there are not enough remaining carrots, you will eat all remaining carrots, but will still be hungry.\n# Example:\n# >>> HumanEval.eat(5, 6, 10)\n# [11, 4]\n# >>> HumanEval.eat(4, 8, 9)\n# [12, 1]\n# >>> HumanEval.eat(1, 10, 10)\n# [11, 0]\n# >>> HumanEval.eat(2, 11, 5)\n# [7, 0]\n# Variables:\n# @number : integer\n# the number of carrots that you have eaten.\n# @need : integer\n# the number of carrots that you need to eat.\n# @remaining : integer\n# the number of remaining carrots thet exist in stock\n# Constrain:\n# * 0 <= number <= 1000\n# * 0 <= need <= 1000\n# * 0 <= remaining <= 1000\n# Have fun :)\n\ndefmodule HumanEval do\n def candidate(number, need, remaining), do: eat(number, need, remaining)\n def eat(number, need, remaining) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_159_eat.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'eat' do\n assert [11, 4] == HumanEval.candidate(5, 6, 10)\n assert [12, 1] == HumanEval.candidate(4, 8, 9)\n assert [11, 0] == HumanEval.candidate(1, 10, 10)\n assert [7, 0] == HumanEval.candidate(2, 11, 5)\n assert [9, 2] == HumanEval.candidate(4, 5, 7)\n assert [5, 0] == HumanEval.candidate(4, 5, 1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_15_string_sequence", "language": "elixir", "prompt": "# Return a string containing space-delimited numbers starting from 0 upto n inclusive.\n# >>> HumanEval.string_sequence(0)\n# \"0\"\n# >>> HumanEval.string_sequence(5)\n# \"0 1 2 3 4 5\"\n\ndefmodule HumanEval do\n def candidate(n), do: string_sequence(n)\n def string_sequence(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_15_string_sequence.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'string_sequence' do\n assert \"0\" == HumanEval.candidate(0)\n assert \"0 1 2 3\" == HumanEval.candidate(3)\n assert \"0 1 2 3 4 5 6 7 8 9 10\" == HumanEval.candidate(10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_160_do_algebra", "language": "elixir", "prompt": "# Given two lists operator, and operand. The first list has basic algebra operations, and \n# the second list is a list of integers. Use the two given lists to build the algebric \n# expression and return the evaluation of this expression.\n# The basic algebra operations:\n# Addition ( + ) \n# Subtraction ( - ) \n# Multiplication ( * ) \n# Floor division ( // ) \n# Exponentiation ( ** ) \n# Example:\n# operator['+', '*', '-']\n# list = [2, 3, 4, 5]\n# result = 2 + 3 * 4 - 5\n# => result = 9\n# Note:\n# The length of operator list is equal to the length of operand list minus one.\n# Operand is a list of of non-negative integers.\n# Operator list has at least one operator, and operand list has at least two operands.\n\ndefmodule HumanEval do\n def candidate(operator, operand), do: do_algebra(operator, operand)\n def do_algebra(operator, operand) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_160_do_algebra.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'do_algebra' do\n assert 37 == HumanEval.candidate([\"**\", \"*\", \"+\"], [2, 3, 4, 5])\n assert 9 == HumanEval.candidate([\"+\", \"*\", \"-\"], [2, 3, 4, 5])\n assert 8 == HumanEval.candidate([\"//\", \"*\"], [7, 3, 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_161_solve", "language": "elixir", "prompt": "# You are given a string s.\n# if s[i] is a letter, reverse its case from lower to upper or vise versa, \n# otherwise keep it as it is.\n# If the string contains no letters, reverse the string.\n# The function should return the resulted string.\n# Examples\n# >>> HumanEval.solve(\"1234\")\n# \"4321\"\n# >>> HumanEval.solve(\"ab\")\n# \"AB\"\n# >>> HumanEval.solve(\"#a@C\")\n# \"#A@c\"\n\ndefmodule HumanEval do\n def candidate(s), do: solve(s)\n def solve(s) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_161_solve.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'solve' do\n assert \"aSdF\" == HumanEval.candidate(\"AsDf\")\n assert \"4321\" == HumanEval.candidate(\"1234\")\n assert \"AB\" == HumanEval.candidate(\"ab\")\n assert \"#A@c\" == HumanEval.candidate(\"#a@C\")\n assert \"#aSDFw^45\" == HumanEval.candidate(\"#AsdfW^45\")\n assert \"2@6#\" == HumanEval.candidate(\"#6@2\")\n assert \"#$A^d\" == HumanEval.candidate(\"#$a^D\")\n assert \"#CCC\" == HumanEval.candidate(\"#ccc\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_162_string_to_md5", "language": "elixir", "prompt": "# Given a string 'text', return its md5 hash equivalent string.\n# If 'text' is an empty string, return nil.\n# >>> HumanEval.string_to_md5(\"Hello world\")\n# \"3e25960a79dbc69b674cd4ec67a72c62\"\n\ndefmodule HumanEval do\n def candidate(text), do: string_to_md5(text)\n def string_to_md5(text) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_162_string_to_md5.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'string_to_md5' do\n assert \"3e25960a79dbc69b674cd4ec67a72c62\" == HumanEval.candidate(\"Hello world\")\n assert nil == HumanEval.candidate(\"\")\n assert \"0ef78513b0cb8cef12743f5aeb35f888\" == HumanEval.candidate(\"A B C\")\n assert \"5f4dcc3b5aa765d61d8327deb882cf99\" == HumanEval.candidate(\"password\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_163_generate_integers", "language": "elixir", "prompt": "# Given two positive integers a and b, return the even digits between a\n# and b, in ascending order.\n# For example:\n# >>> HumanEval.generate_integers(2, 8)\n# [2, 4, 6, 8]\n# >>> HumanEval.generate_integers(8, 2)\n# [2, 4, 6, 8]\n# >>> HumanEval.generate_integers(10, 14)\n# []\n\ndefmodule HumanEval do\n def candidate(a, b), do: generate_integers(a, b)\n def generate_integers(a, b) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_163_generate_integers.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'generate_integers' do\n assert [2, 4, 6, 8] == HumanEval.candidate(2, 10)\n assert [2, 4, 6, 8] == HumanEval.candidate(10, 2)\n assert [2, 4, 6, 8] == HumanEval.candidate(132, 2)\n assert [] == HumanEval.candidate(17, 89)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_16_count_distinct_characters", "language": "elixir", "prompt": "# Given a string, find out how many distinct characters (regardless of case) does it consist of\n# >>> HumanEval.count_distinct_characters(\"xyzXYZ\")\n# 3\n# >>> HumanEval.count_distinct_characters(\"Jerry\")\n# 4\n\ndefmodule HumanEval do\n def candidate(string), do: count_distinct_characters(string)\n def count_distinct_characters(string) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_16_count_distinct_characters.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'count_distinct_characters' do\n assert 0 == HumanEval.candidate(\"\")\n assert 5 == HumanEval.candidate(\"abcde\")\n assert 5 == HumanEval.candidate(\"abcdecadeCADE\")\n assert 1 == HumanEval.candidate(\"aaaaAAAAaaaa\")\n assert 5 == HumanEval.candidate(\"Jerry jERRY JeRRRY\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_17_parse_music", "language": "elixir", "prompt": "# Input to this function is a string representing musical notes in a special ASCII format.\n# Your task is to parse this string and return list of integers corresponding to how many beats does each\n# not last.\n# Here is a legend:\n# 'o' - whole note, lasts four beats\n# 'o|' - half note, lasts two beats\n# '.|' - quater note, lasts one beat\n# >>> HumanEval.parse_music(\"o o| .| o| o| .| .| .| .| o o\")\n# [4, 2, 1, 2, 2, 1, 1, 1, 1, 4, 4]\n\ndefmodule HumanEval do\n def candidate(music_string), do: parse_music(music_string)\n def parse_music(music_string) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_17_parse_music.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'parse_music' do\n assert [] == HumanEval.candidate(\"\")\n assert [4, 4, 4, 4] == HumanEval.candidate(\"o o o o\")\n assert [1, 1, 1, 1] == HumanEval.candidate(\".| .| .| .|\")\n assert [2, 2, 1, 1, 4, 4, 4, 4] == HumanEval.candidate(\"o| o| .| .| o o o o\")\n assert [2, 1, 2, 1, 4, 2, 4, 2] == HumanEval.candidate(\"o| .| o| .| o o| o o|\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_18_how_many_times", "language": "elixir", "prompt": "# Find how many times a given substring can be found in the original string. Count overlaping cases.\n# >>> HumanEval.how_many_times(\"\", \"a\")\n# 0\n# >>> HumanEval.how_many_times(\"aaa\", \"a\")\n# 3\n# >>> HumanEval.how_many_times(\"aaaa\", \"aa\")\n# 3\n\ndefmodule HumanEval do\n def candidate(string, substring), do: how_many_times(string, substring)\n def how_many_times(string, substring) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_18_how_many_times.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'how_many_times' do\n assert 0 == HumanEval.candidate(\"\", \"x\")\n assert 4 == HumanEval.candidate(\"xyxyxyx\", \"x\")\n assert 4 == HumanEval.candidate(\"cacacacac\", \"cac\")\n assert 1 == HumanEval.candidate(\"john doe\", \"john\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_19_sort_numbers", "language": "elixir", "prompt": "# Input is a space-delimited string of numberals from 'zero' to 'nine'.\n# Valid choices are 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight' and 'nine'.\n# Return the string with numbers sorted from smallest to largest\n# >>> HumanEval.sort_numbers(\"three one five\")\n# \"one three five\"\n\ndefmodule HumanEval do\n def candidate(numbers), do: sort_numbers(numbers)\n def sort_numbers(numbers) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_19_sort_numbers.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sort_numbers' do\n assert \"\" == HumanEval.candidate(\"\")\n assert \"three\" == HumanEval.candidate(\"three\")\n assert \"three five nine\" == HumanEval.candidate(\"three five nine\")\n assert \"zero four five seven eight nine\" == HumanEval.candidate(\"five zero four seven nine eight\")\n assert \"zero one two three four five six\" == HumanEval.candidate(\"six five four three two one zero\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_1_separate_paren_groups", "language": "elixir", "prompt": "# Input to this function is a string containing multiple groups of nested parentheses. Your goal is to\n# separate those group into separate strings and return the list of those.\n# Separate groups are balanced (each open brace is properly closed) and not nested within each other\n# Ignore any spaces in the input string.\n# >>> HumanEval.separate_paren_groups(\"( ) (( )) (( )( ))\")\n# [\"()\", \"(())\", \"(()())\"]\n\ndefmodule HumanEval do\n def candidate(paren_string), do: separate_paren_groups(paren_string)\n def separate_paren_groups(paren_string) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_1_separate_paren_groups.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'separate_paren_groups' do\n assert [\"(()())\", \"((()))\", \"()\", \"((())()())\"] == HumanEval.candidate(\"(()()) ((())) () ((())()())\")\n assert [\"()\", \"(())\", \"((()))\", \"(((())))\"] == HumanEval.candidate(\"() (()) ((())) (((())))\")\n assert [\"(()(())((())))\"] == HumanEval.candidate(\"(()(())((())))\")\n assert [\"()\", \"(())\", \"(()())\"] == HumanEval.candidate(\"( ) (( )) (( )( ))\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_20_find_closest_elements", "language": "elixir", "prompt": "# From a supplied list of numbers (of length at least two) select and return two that are the closest to each\n# other and return them in order (smaller number, larger number).\n# >>> HumanEval.find_closest_elements([1.0, 2.0, 3.0, 4.0, 5.0, 2.2])\n# {2.0, 2.2}\n# >>> HumanEval.find_closest_elements([1.0, 2.0, 3.0, 4.0, 5.0, 2.0])\n# {2.0, 2.0}\n\ndefmodule HumanEval do\n def candidate(numbers), do: find_closest_elements(numbers)\n def find_closest_elements(numbers) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_20_find_closest_elements.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'find_closest_elements' do\n assert {3.9, 4.0} == HumanEval.candidate([1.0, 2.0, 3.9, 4.0, 5.0, 2.2])\n assert {5.0, 5.9} == HumanEval.candidate([1.0, 2.0, 5.9, 4.0, 5.0])\n assert {2.0, 2.2} == HumanEval.candidate([1.0, 2.0, 3.0, 4.0, 5.0, 2.2])\n assert {2.0, 2.0} == HumanEval.candidate([1.0, 2.0, 3.0, 4.0, 5.0, 2.0])\n assert {2.2, 3.1} == HumanEval.candidate([1.1, 2.2, 3.1, 4.1, 5.1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_21_rescale_to_unit", "language": "elixir", "prompt": "# Given list of numbers (of at least two elements), apply a linear transform to that list,\n# such that the smallest number will become 0 and the largest will become 1\n# >>> HumanEval.rescale_to_unit([1.0, 2.0, 3.0, 4.0, 5.0])\n# [0.0, 0.25, 0.5, 0.75, 1.0]\n\ndefmodule HumanEval do\n def candidate(numbers), do: rescale_to_unit(numbers)\n def rescale_to_unit(numbers) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_21_rescale_to_unit.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'rescale_to_unit' do\n assert [0.0, 1.0] == HumanEval.candidate([2.0, 49.9])\n assert [1.0, 0.0] == HumanEval.candidate([100.0, 49.9])\n assert [0.0, 0.25, 0.5, 0.75, 1.0] == HumanEval.candidate([1.0, 2.0, 3.0, 4.0, 5.0])\n assert [0.25, 0.0, 1.0, 0.5, 0.75] == HumanEval.candidate([2.0, 1.0, 5.0, 3.0, 4.0])\n assert [0.25, 0.0, 1.0, 0.5, 0.75] == HumanEval.candidate([12.0, 11.0, 15.0, 13.0, 14.0])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_22_filter_integers", "language": "elixir", "prompt": "# Filter given list of any elixirthon values only for integers\n# >>> HumanEval.filter_integers([\"a\", 3.14, 5])\n# [5]\n# >>> HumanEval.filter_integers([1, 2, 3, \"abc\", %{}, []])\n# [1, 2, 3]\n\ndefmodule HumanEval do\n def candidate(values), do: filter_integers(values)\n def filter_integers(values) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_22_filter_integers.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'filter_integers' do\n assert [] == HumanEval.candidate([])\n assert [4, 9] == HumanEval.candidate([4, %{}, [], 23.2, 9, \"adasd\"])\n assert [3, 3, 3] == HumanEval.candidate([3, \"c\", 3, 3, \"a\", \"b\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_23_strlen", "language": "elixir", "prompt": "# Return length of given string\n# >>> HumanEval.strlen(\"\")\n# 0\n# >>> HumanEval.strlen(\"abc\")\n# 3\n\ndefmodule HumanEval do\n def candidate(string), do: strlen(string)\n def strlen(string) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_23_strlen.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'strlen' do\n assert 0 == HumanEval.candidate(\"\")\n assert 1 == HumanEval.candidate(\"x\")\n assert 9 == HumanEval.candidate(\"asdasnakj\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_24_largest_divisor", "language": "elixir", "prompt": "# For a given number n, find the largest number that divides n evenly, smaller than n\n# >>> HumanEval.largest_divisor(15)\n# 5\n\ndefmodule HumanEval do\n def candidate(n), do: largest_divisor(n)\n def largest_divisor(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_24_largest_divisor.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'largest_divisor' do\n assert 1 == HumanEval.candidate(3)\n assert 1 == HumanEval.candidate(7)\n assert 5 == HumanEval.candidate(10)\n assert 50 == HumanEval.candidate(100)\n assert 7 == HumanEval.candidate(49)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_25_factorize", "language": "elixir", "prompt": "# Return list of prime factors of given integer in the order from smallest to largest.\n# Each of the factors should be listed number of times corresponding to how many times it appeares in factorization.\n# Input number should be equal to the product of all factors\n# >>> HumanEval.factorize(8)\n# [2, 2, 2]\n# >>> HumanEval.factorize(25)\n# [5, 5]\n# >>> HumanEval.factorize(70)\n# [2, 5, 7]\n\ndefmodule HumanEval do\n def candidate(n), do: factorize(n)\n def factorize(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_25_factorize.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'factorize' do\n assert [2] == HumanEval.candidate(2)\n assert [2, 2] == HumanEval.candidate(4)\n assert [2, 2, 2] == HumanEval.candidate(8)\n assert [3, 19] == HumanEval.candidate(57)\n assert [3, 3, 19, 19] == HumanEval.candidate(3249)\n assert [3, 3, 3, 19, 19, 19] == HumanEval.candidate(185193)\n assert [3, 19, 19, 19] == HumanEval.candidate(20577)\n assert [2, 3, 3] == HumanEval.candidate(18)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_26_remove_duplicates", "language": "elixir", "prompt": "# From a list of integers, remove all elements that occur more than once.\n# Keep order of elements left the same as in the input.\n# >>> HumanEval.remove_duplicates([1, 2, 3, 2, 4])\n# [1, 3, 4]\n\ndefmodule HumanEval do\n def candidate(numbers), do: remove_duplicates(numbers)\n def remove_duplicates(numbers) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_26_remove_duplicates.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'remove_duplicates' do\n assert [] == HumanEval.candidate([])\n assert [1, 2, 3, 4] == HumanEval.candidate([1, 2, 3, 4])\n assert [1, 4, 5] == HumanEval.candidate([1, 2, 3, 2, 4, 3, 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_27_flip_case", "language": "elixir", "prompt": "# For a given string, flip lowercase characters to uppercase and uppercase to lowercase.\n# >>> HumanEval.flip_case(\"Hello\")\n# \"hELLO\"\n\ndefmodule HumanEval do\n def candidate(string), do: flip_case(string)\n def flip_case(string) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_27_flip_case.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'flip_case' do\n assert \"\" == HumanEval.candidate(\"\")\n assert \"hELLO!\" == HumanEval.candidate(\"Hello!\")\n assert \"tHESE VIOLENT DELIGHTS HAVE VIOLENT ENDS\" == HumanEval.candidate(\"These violent delights have violent ends\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_28_concatenate", "language": "elixir", "prompt": "# Concatenate list of strings into a single string\n# >>> HumanEval.concatenate([])\n# \"\"\n# >>> HumanEval.concatenate([\"a\", \"b\", \"c\"])\n# \"abc\"\n\ndefmodule HumanEval do\n def candidate(strings), do: concatenate(strings)\n def concatenate(strings) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_28_concatenate.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'concatenate' do\n assert \"\" == HumanEval.candidate([])\n assert \"xyz\" == HumanEval.candidate([\"x\", \"y\", \"z\"])\n assert \"xyzwk\" == HumanEval.candidate([\"x\", \"y\", \"z\", \"w\", \"k\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_29_filter_by_prefix", "language": "elixir", "prompt": "# Filter an input list of strings only for ones that start with a given prefix.\n# >>> HumanEval.filter_by_prefix([], \"a\")\n# []\n# >>> HumanEval.filter_by_prefix([\"abc\", \"bcd\", \"cde\", \"array\"], \"a\")\n# [\"abc\", \"array\"]\n\ndefmodule HumanEval do\n def candidate(strings, prefix), do: filter_by_prefix(strings, prefix)\n def filter_by_prefix(strings, prefix) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_29_filter_by_prefix.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'filter_by_prefix' do\n assert [] == HumanEval.candidate([], \"john\")\n assert [\"xxx\", \"xxxAAA\", \"xxx\"] == HumanEval.candidate([\"xxx\", \"asd\", \"xxy\", \"john doe\", \"xxxAAA\", \"xxx\"], \"xxx\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_2_truncate_number", "language": "elixir", "prompt": "# Given a positive floating point number, it can be decomposed into\n# and integer part (largest integer smaller than given number) and decimals\n# (leftover part always smaller than 1).\n# Return the decimal part of the number.\n# >>> HumanEval.truncate_number(3.5)\n# 0.5\n\ndefmodule HumanEval do\n def candidate(number), do: truncate_number(number)\n def truncate_number(number) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_2_truncate_number.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'truncate_number' do\n assert 0.5 == HumanEval.candidate(3.5)\n assert 0.25 == HumanEval.candidate(1.25)\n assert 0.0 == HumanEval.candidate(123.0)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_30_get_positive", "language": "elixir", "prompt": "# Return only positive numbers in the list.\n# >>> HumanEval.get_positive([-1, 2, -4, 5, 6])\n# [2, 5, 6]\n# >>> HumanEval.get_positive([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])\n# [5, 3, 2, 3, 9, 123, 1]\n\ndefmodule HumanEval do\n def candidate(l), do: get_positive(l)\n def get_positive(l) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_30_get_positive.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'get_positive' do\n assert [4, 5, 6] == HumanEval.candidate([-1, -2, 4, 5, 6])\n assert [5, 3, 2, 3, 3, 9, 123, 1] == HumanEval.candidate([5, 3, -5, 2, 3, 3, 9, 0, 123, 1, -10])\n assert [] == HumanEval.candidate([-1, -2])\n assert [] == HumanEval.candidate([])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_31_is_prime", "language": "elixir", "prompt": "# Return true if a given number is prime, and false otherwise.\n# >>> HumanEval.is_prime(6)\n# false\n# >>> HumanEval.is_prime(101)\n# true\n# >>> HumanEval.is_prime(11)\n# true\n# >>> HumanEval.is_prime(13441)\n# true\n# >>> HumanEval.is_prime(61)\n# true\n# >>> HumanEval.is_prime(4)\n# false\n# >>> HumanEval.is_prime(1)\n# false\n\ndefmodule HumanEval do\n def candidate(n), do: is_prime(n)\n def is_prime(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_31_is_prime.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_prime' do\n assert false == HumanEval.candidate(6)\n assert true == HumanEval.candidate(101)\n assert true == HumanEval.candidate(11)\n assert true == HumanEval.candidate(13441)\n assert true == HumanEval.candidate(61)\n assert false == HumanEval.candidate(4)\n assert false == HumanEval.candidate(1)\n assert true == HumanEval.candidate(5)\n assert true == HumanEval.candidate(11)\n assert true == HumanEval.candidate(17)\n assert false == HumanEval.candidate(85)\n assert false == HumanEval.candidate(77)\n assert false == HumanEval.candidate(255379)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_33_sort_third", "language": "elixir", "prompt": "# This function takes a list l and returns a list l' such that\n# l' is identical to l in the indicies that are not divisible by three, while its values at the indicies that are divisible by three are equal\n# to the values of the corresponding indicies of l, but sorted.\n# >>> HumanEval.sort_third([1, 2, 3])\n# [1, 2, 3]\n# >>> HumanEval.sort_third([5, 6, 3, 4, 8, 9, 2])\n# [2, 6, 3, 4, 8, 9, 5]\n\ndefmodule HumanEval do\n def candidate(l), do: sort_third(l)\n def sort_third(l) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_33_sort_third.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sort_third' do\n assert [2, 6, 3, 4, 8, 9, 5] == HumanEval.candidate([5, 6, 3, 4, 8, 9, 2])\n assert [2, 8, 3, 4, 6, 9, 5] == HumanEval.candidate([5, 8, 3, 4, 6, 9, 2])\n assert [2, 6, 9, 4, 8, 3, 5] == HumanEval.candidate([5, 6, 9, 4, 8, 3, 2])\n assert [2, 6, 3, 4, 8, 9, 5, 1] == HumanEval.candidate([5, 6, 3, 4, 8, 9, 2, 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_34_unique", "language": "elixir", "prompt": "# Return sorted unique elements in a list\n# >>> HumanEval.unique([5, 3, 5, 2, 3, 3, 9, 0, 123])\n# [0, 2, 3, 5, 9, 123]\n\ndefmodule HumanEval do\n def candidate(l), do: unique(l)\n def unique(l) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_34_unique.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'unique' do\n assert [0, 2, 3, 5, 9, 123] == HumanEval.candidate([5, 3, 5, 2, 3, 3, 9, 0, 123])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_35_max_element", "language": "elixir", "prompt": "# Return maximum element in the list.\n# >>> HumanEval.max_element([1, 2, 3])\n# 3\n# >>> HumanEval.max_element([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])\n# 123\n\ndefmodule HumanEval do\n def candidate(l), do: max_element(l)\n def max_element(l) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_35_max_element.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'max_element' do\n assert 3 == HumanEval.candidate([1, 2, 3])\n assert 124 == HumanEval.candidate([5, 3, -5, 2, -3, 3, 9, 0, 124, 1, -10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_36_fizz_buzz", "language": "elixir", "prompt": "# Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.\n# >>> HumanEval.fizz_buzz(50)\n# 0\n# >>> HumanEval.fizz_buzz(78)\n# 2\n# >>> HumanEval.fizz_buzz(79)\n# 3\n\ndefmodule HumanEval do\n def candidate(n), do: fizz_buzz(n)\n def fizz_buzz(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_36_fizz_buzz.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fizz_buzz' do\n assert 0 == HumanEval.candidate(50)\n assert 2 == HumanEval.candidate(78)\n assert 3 == HumanEval.candidate(79)\n assert 3 == HumanEval.candidate(100)\n assert 6 == HumanEval.candidate(200)\n assert 192 == HumanEval.candidate(4000)\n assert 639 == HumanEval.candidate(10000)\n assert 8026 == HumanEval.candidate(100000)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_37_sort_even", "language": "elixir", "prompt": "# This function takes a list l and returns a list l' such that\n# l' is identical to l in the odd indicies, while its values at the even indicies are equal\n# to the values of the even indicies of l, but sorted.\n# >>> HumanEval.sort_even([1, 2, 3])\n# [1, 2, 3]\n# >>> HumanEval.sort_even([5, 6, 3, 4])\n# [3, 6, 5, 4]\n\ndefmodule HumanEval do\n def candidate(l), do: sort_even(l)\n def sort_even(l) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_37_sort_even.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sort_even' do\n assert [1, 2, 3] == HumanEval.candidate([1, 2, 3])\n assert [-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123] == HumanEval.candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])\n assert [-12, 8, 3, 4, 5, 2, 12, 11, 23, -10] == HumanEval.candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_39_prime_fib", "language": "elixir", "prompt": "# prime_fib returns n-th number that is a Fibonacci number and it's also prime.\n# >>> HumanEval.prime_fib(1)\n# 2\n# >>> HumanEval.prime_fib(2)\n# 3\n# >>> HumanEval.prime_fib(3)\n# 5\n# >>> HumanEval.prime_fib(4)\n# 13\n# >>> HumanEval.prime_fib(5)\n# 89\n\ndefmodule HumanEval do\n def candidate(n), do: prime_fib(n)\n def prime_fib(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_39_prime_fib.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'prime_fib' do\n assert 2 == HumanEval.candidate(1)\n assert 3 == HumanEval.candidate(2)\n assert 5 == HumanEval.candidate(3)\n assert 13 == HumanEval.candidate(4)\n assert 89 == HumanEval.candidate(5)\n assert 233 == HumanEval.candidate(6)\n assert 1597 == HumanEval.candidate(7)\n assert 28657 == HumanEval.candidate(8)\n assert 514229 == HumanEval.candidate(9)\n assert 433494437 == HumanEval.candidate(10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_3_below_zero", "language": "elixir", "prompt": "# You're given a list of deposit and withdrawal operations on a bank account that starts with\n# zero balance. Your task is to detect if at any point the balance of account fallls below zero, and\n# at that point function should return true. Otherwise it should return false.\n# >>> HumanEval.below_zero([1, 2, 3])\n# false\n# >>> HumanEval.below_zero([1, 2, -4, 5])\n# true\n\ndefmodule HumanEval do\n def candidate(operations), do: below_zero(operations)\n def below_zero(operations) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_3_below_zero.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'below_zero' do\n assert false == HumanEval.candidate([])\n assert false == HumanEval.candidate([1, 2, -3, 1, 2, -3])\n assert true == HumanEval.candidate([1, 2, -4, 5, 6])\n assert false == HumanEval.candidate([1, -1, 2, -2, 5, -5, 4, -4])\n assert true == HumanEval.candidate([1, -1, 2, -2, 5, -5, 4, -5])\n assert true == HumanEval.candidate([1, -2, 2, -2, 5, -5, 4, -4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_40_triples_sum_to_zero", "language": "elixir", "prompt": "# triples_sum_to_zero takes a list of integers as an input.\n# it returns true if there are three distinct elements in the list that\n# sum to zero, and false otherwise.\n# >>> HumanEval.triples_sum_to_zero([1, 3, 5, 0])\n# false\n# >>> HumanEval.triples_sum_to_zero([1, 3, -2, 1])\n# true\n# >>> HumanEval.triples_sum_to_zero([1, 2, 3, 7])\n# false\n# >>> HumanEval.triples_sum_to_zero([2, 4, -5, 3, 9, 7])\n# true\n# >>> HumanEval.triples_sum_to_zero([1])\n# false\n\ndefmodule HumanEval do\n def candidate(l), do: triples_sum_to_zero(l)\n def triples_sum_to_zero(l) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_40_triples_sum_to_zero.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'triples_sum_to_zero' do\n assert false == HumanEval.candidate([1, 3, 5, 0])\n assert false == HumanEval.candidate([1, 3, 5, -1])\n assert true == HumanEval.candidate([1, 3, -2, 1])\n assert false == HumanEval.candidate([1, 2, 3, 7])\n assert false == HumanEval.candidate([1, 2, 5, 7])\n assert true == HumanEval.candidate([2, 4, -5, 3, 9, 7])\n assert false == HumanEval.candidate([1])\n assert false == HumanEval.candidate([1, 3, 5, -100])\n assert false == HumanEval.candidate([100, 3, 5, -100])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_41_car_race_collision", "language": "elixir", "prompt": "# Imagine a road that's a perfectly straight infinitely long line.\n# n cars are driving left to right; simultaneously, a different set of n cars\n# are driving right to left. The two sets of cars start out being very far from\n# each other. All cars move in the same speed. Two cars are said to collide\n# when a car that's moving left to right hits a car that's moving right to left.\n# However, the cars are infinitely sturdy and strong; as a result, they continue moving\n# in their trajectory as if they did not collide.\n# This function outputs the number of such collisions.\n\ndefmodule HumanEval do\n def candidate(n), do: car_race_collision(n)\n def car_race_collision(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_41_car_race_collision.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'car_race_collision' do\n assert 4 == HumanEval.candidate(2)\n assert 9 == HumanEval.candidate(3)\n assert 16 == HumanEval.candidate(4)\n assert 64 == HumanEval.candidate(8)\n assert 100 == HumanEval.candidate(10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_42_incr_list", "language": "elixir", "prompt": "# Return list with elements incremented by 1.\n# >>> HumanEval.incr_list([1, 2, 3])\n# [2, 3, 4]\n# >>> HumanEval.incr_list([5, 3, 5, 2, 3, 3, 9, 0, 123])\n# [6, 4, 6, 3, 4, 4, 10, 1, 124]\n\ndefmodule HumanEval do\n def candidate(l), do: incr_list(l)\n def incr_list(l) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_42_incr_list.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'incr_list' do\n assert [] == HumanEval.candidate([])\n assert [4, 3, 2] == HumanEval.candidate([3, 2, 1])\n assert [6, 3, 6, 3, 4, 4, 10, 1, 124] == HumanEval.candidate([5, 2, 5, 2, 3, 3, 9, 0, 123])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_43_pairs_sum_to_zero", "language": "elixir", "prompt": "# pairs_sum_to_zero takes a list of integers as an input.\n# it returns true if there are two distinct elements in the list that\n# sum to zero, and false otherwise.\n# >>> HumanEval.pairs_sum_to_zero([1, 3, 5, 0])\n# false\n# >>> HumanEval.pairs_sum_to_zero([1, 3, -2, 1])\n# false\n# >>> HumanEval.pairs_sum_to_zero([1, 2, 3, 7])\n# false\n# >>> HumanEval.pairs_sum_to_zero([2, 4, -5, 3, 5, 7])\n# true\n# >>> HumanEval.pairs_sum_to_zero([1])\n# false\n\ndefmodule HumanEval do\n def candidate(l), do: pairs_sum_to_zero(l)\n def pairs_sum_to_zero(l) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_43_pairs_sum_to_zero.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'pairs_sum_to_zero' do\n assert false == HumanEval.candidate([1, 3, 5, 0])\n assert false == HumanEval.candidate([1, 3, -2, 1])\n assert false == HumanEval.candidate([1, 2, 3, 7])\n assert true == HumanEval.candidate([2, 4, -5, 3, 5, 7])\n assert false == HumanEval.candidate([1])\n assert true == HumanEval.candidate([-3, 9, -1, 3, 2, 30])\n assert true == HumanEval.candidate([-3, 9, -1, 3, 2, 31])\n assert false == HumanEval.candidate([-3, 9, -1, 4, 2, 30])\n assert false == HumanEval.candidate([-3, 9, -1, 4, 2, 31])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_44_change_base", "language": "elixir", "prompt": "# Change numerical base of input number x to base.\n# return string representation after the conversion.\n# base numbers are less than 10.\n# >>> HumanEval.change_base(8, 3)\n# \"22\"\n# >>> HumanEval.change_base(8, 2)\n# \"1000\"\n# >>> HumanEval.change_base(7, 2)\n# \"111\"\n\ndefmodule HumanEval do\n def candidate(x, base), do: change_base(x, base)\n def change_base(x, base) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_44_change_base.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'change_base' do\n assert \"22\" == HumanEval.candidate(8, 3)\n assert \"100\" == HumanEval.candidate(9, 3)\n assert \"11101010\" == HumanEval.candidate(234, 2)\n assert \"10000\" == HumanEval.candidate(16, 2)\n assert \"1000\" == HumanEval.candidate(8, 2)\n assert \"111\" == HumanEval.candidate(7, 2)\n assert \"2\" == HumanEval.candidate(2, 3)\n assert \"3\" == HumanEval.candidate(3, 4)\n assert \"4\" == HumanEval.candidate(4, 5)\n assert \"5\" == HumanEval.candidate(5, 6)\n assert \"6\" == HumanEval.candidate(6, 7)\n assert \"7\" == HumanEval.candidate(7, 8)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_45_triangle_area", "language": "elixir", "prompt": "# Given length of a side and high return area for a triangle.\n# >>> HumanEval.triangle_area(5, 3)\n# 7.5\n\ndefmodule HumanEval do\n def candidate(a, h), do: triangle_area(a, h)\n def triangle_area(a, h) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_45_triangle_area.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'triangle_area' do\n assert 7.5 == HumanEval.candidate(5, 3)\n assert 2.0 == HumanEval.candidate(2, 2)\n assert 40.0 == HumanEval.candidate(10, 8)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_46_fib4", "language": "elixir", "prompt": "# The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:\n# fib4(0) -> 0\n# fib4(1) -> 0\n# fib4(2) -> 2\n# fib4(3) -> 0\n# fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).\n# Please write a function to efficiently compute the n-th element of the fib4 number sequence. Do not use recursion.\n# >>> HumanEval.fib4(5)\n# 4\n# >>> HumanEval.fib4(6)\n# 8\n# >>> HumanEval.fib4(7)\n# 14\n\ndefmodule HumanEval do\n def candidate(n), do: fib4(n)\n def fib4(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_46_fib4.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fib4' do\n assert 4 == HumanEval.candidate(5)\n assert 28 == HumanEval.candidate(8)\n assert 104 == HumanEval.candidate(10)\n assert 386 == HumanEval.candidate(12)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_47_median", "language": "elixir", "prompt": "# Return median of elements in the list l.\n# >>> HumanEval.median([3, 1, 2, 4, 5])\n# 3\n# >>> HumanEval.median([-10, 4, 6, 1000, 10, 20])\n# 15.0\n\ndefmodule HumanEval do\n def candidate(l), do: median(l)\n def median(l) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_47_median.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'median' do\n assert 3 == HumanEval.candidate([3, 1, 2, 4, 5])\n assert 8.0 == HumanEval.candidate([-10, 4, 6, 1000, 10, 20])\n assert 5 == HumanEval.candidate([5])\n assert 5.5 == HumanEval.candidate([6, 5])\n assert 7 == HumanEval.candidate([8, 1, 3, 9, 9, 2, 7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_48_is_palindrome", "language": "elixir", "prompt": "# Checks if given string is a palindrome\n# >>> HumanEval.is_palindrome(\"\")\n# true\n# >>> HumanEval.is_palindrome(\"aba\")\n# true\n# >>> HumanEval.is_palindrome(\"aaaaa\")\n# true\n# >>> HumanEval.is_palindrome(\"zbcd\")\n# false\n\ndefmodule HumanEval do\n def candidate(text), do: is_palindrome(text)\n def is_palindrome(text) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_48_is_palindrome.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_palindrome' do\n assert true == HumanEval.candidate(\"\")\n assert true == HumanEval.candidate(\"aba\")\n assert true == HumanEval.candidate(\"aaaaa\")\n assert false == HumanEval.candidate(\"zbcd\")\n assert true == HumanEval.candidate(\"xywyx\")\n assert false == HumanEval.candidate(\"xywyz\")\n assert false == HumanEval.candidate(\"xywzx\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_49_modp", "language": "elixir", "prompt": "# Return 2^n modulo p (be aware of numerics).\n# >>> HumanEval.modp(3, 5)\n# 3\n# >>> HumanEval.modp(1101, 101)\n# 2\n# >>> HumanEval.modp(0, 101)\n# 1\n# >>> HumanEval.modp(3, 11)\n# 8\n# >>> HumanEval.modp(100, 101)\n# 1\n\ndefmodule HumanEval do\n def candidate(n, p), do: modp(n, p)\n def modp(n, p) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_49_modp.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'modp' do\n assert 3 == HumanEval.candidate(3, 5)\n assert 2 == HumanEval.candidate(1101, 101)\n assert 1 == HumanEval.candidate(0, 101)\n assert 8 == HumanEval.candidate(3, 11)\n assert 1 == HumanEval.candidate(100, 101)\n assert 4 == HumanEval.candidate(30, 5)\n assert 3 == HumanEval.candidate(31, 5)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_4_mean_absolute_deviation", "language": "elixir", "prompt": "# For a given list of input numbers, calculate Mean Absolute Deviation\n# around the mean of this dataset.\n# Mean Absolute Deviation is the average absolute difference between each\n# element and a centerpoint (mean in this case):\n# MAD = average | x - x_mean |\n# >>> HumanEval.mean_absolute_deviation([1.0, 2.0, 3.0, 4.0])\n# 1.0\n\ndefmodule HumanEval do\n def candidate(numbers), do: mean_absolute_deviation(numbers)\n def mean_absolute_deviation(numbers) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_4_mean_absolute_deviation.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'mean_absolute_deviation' do\n assert 0.5 == HumanEval.candidate([1.0, 2.0])\n assert 1.0 == HumanEval.candidate([1.0, 2.0, 3.0, 4.0])\n assert 1.2 == HumanEval.candidate([1.0, 2.0, 3.0, 4.0, 5.0])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_51_remove_vowels", "language": "elixir", "prompt": "# remove_vowels is a function that takes string and returns string without vowels.\n# >>> HumanEval.remove_vowels(\"\")\n# \"\"\n# >>> HumanEval.remove_vowels(\"abcdef\")\n# \"bcdf\"\n# >>> HumanEval.remove_vowels(\"aaaaa\")\n# \"\"\n# >>> HumanEval.remove_vowels(\"aaBAA\")\n# \"B\"\n# >>> HumanEval.remove_vowels(\"zbcd\")\n# \"zbcd\"\n\ndefmodule HumanEval do\n def candidate(text), do: remove_vowels(text)\n def remove_vowels(text) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_51_remove_vowels.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'remove_vowels' do\n assert \"\" == HumanEval.candidate(\"\")\n assert \"bcdf\nghjklm\" == HumanEval.candidate(\"abcdef\nghijklm\")\n assert \"fdcb\" == HumanEval.candidate(\"fedcba\")\n assert \"\" == HumanEval.candidate(\"eeeee\")\n assert \"cB\" == HumanEval.candidate(\"acBAA\")\n assert \"cB\" == HumanEval.candidate(\"EcBOO\")\n assert \"ybcd\" == HumanEval.candidate(\"ybcd\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_52_below_threshold", "language": "elixir", "prompt": "# Return true if all numbers in the list l are below threshold t.\n# >>> HumanEval.below_threshold([1, 2, 4, 10], 100)\n# true\n# >>> HumanEval.below_threshold([1, 20, 4, 10], 5)\n# false\n\ndefmodule HumanEval do\n def candidate(l, t), do: below_threshold(l, t)\n def below_threshold(l, t) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_52_below_threshold.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'below_threshold' do\n assert true == HumanEval.candidate([1, 2, 4, 10], 100)\n assert false == HumanEval.candidate([1, 20, 4, 10], 5)\n assert true == HumanEval.candidate([1, 20, 4, 10], 21)\n assert true == HumanEval.candidate([1, 20, 4, 10], 22)\n assert true == HumanEval.candidate([1, 8, 4, 10], 11)\n assert false == HumanEval.candidate([1, 8, 4, 10], 10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_53_add", "language": "elixir", "prompt": "# Add two numbers x and y\n# >>> HumanEval.add(2, 3)\n# 5\n# >>> HumanEval.add(5, 7)\n# 12\n\ndefmodule HumanEval do\n def candidate(x, y), do: add(x, y)\n def add(x, y) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_53_add.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'add' do\n assert 1 == HumanEval.candidate(0, 1)\n assert 1 == HumanEval.candidate(1, 0)\n assert 5 == HumanEval.candidate(2, 3)\n assert 12 == HumanEval.candidate(5, 7)\n assert 12 == HumanEval.candidate(7, 5)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_54_same_chars", "language": "elixir", "prompt": "# Check if two words have the same characters.\n# >>> HumanEval.same_chars(\"eabcdzzzz\", \"dddzzzzzzzddeddabc\")\n# true\n# >>> HumanEval.same_chars(\"abcd\", \"dddddddabc\")\n# true\n# >>> HumanEval.same_chars(\"dddddddabc\", \"abcd\")\n# true\n# >>> HumanEval.same_chars(\"eabcd\", \"dddddddabc\")\n# false\n# >>> HumanEval.same_chars(\"abcd\", \"dddddddabce\")\n# false\n# >>> HumanEval.same_chars(\"eabcdzzzz\", \"dddzzzzzzzddddabc\")\n# false\n\ndefmodule HumanEval do\n def candidate(s0, s1), do: same_chars(s0, s1)\n def same_chars(s0, s1) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_54_same_chars.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'same_chars' do\n assert true == HumanEval.candidate(\"eabcdzzzz\", \"dddzzzzzzzddeddabc\")\n assert true == HumanEval.candidate(\"abcd\", \"dddddddabc\")\n assert true == HumanEval.candidate(\"dddddddabc\", \"abcd\")\n assert false == HumanEval.candidate(\"eabcd\", \"dddddddabc\")\n assert false == HumanEval.candidate(\"abcd\", \"dddddddabcf\")\n assert false == HumanEval.candidate(\"eabcdzzzz\", \"dddzzzzzzzddddabc\")\n assert false == HumanEval.candidate(\"aabb\", \"aaccc\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_55_fib", "language": "elixir", "prompt": "# Return n-th Fibonacci number.\n# >>> HumanEval.fib(10)\n# 55\n# >>> HumanEval.fib(1)\n# 1\n# >>> HumanEval.fib(8)\n# 21\n\ndefmodule HumanEval do\n def candidate(n), do: fib(n)\n def fib(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_55_fib.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fib' do\n assert 55 == HumanEval.candidate(10)\n assert 1 == HumanEval.candidate(1)\n assert 21 == HumanEval.candidate(8)\n assert 89 == HumanEval.candidate(11)\n assert 144 == HumanEval.candidate(12)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_56_correct_bracketing", "language": "elixir", "prompt": "# brackets is a string of \"<\" and \">\".\n# return true if every opening bracket has a corresponding closing bracket.\n# >>> HumanEval.correct_bracketing(\"<\")\n# false\n# >>> HumanEval.correct_bracketing(\"<>\")\n# true\n# >>> HumanEval.correct_bracketing(\"<<><>>\")\n# true\n# >>> HumanEval.correct_bracketing(\"><<>\")\n# false\n\ndefmodule HumanEval do\n def candidate(brackets), do: correct_bracketing(brackets)\n def correct_bracketing(brackets) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_56_correct_bracketing.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'correct_bracketing' do\n assert true == HumanEval.candidate(\"<>\")\n assert true == HumanEval.candidate(\"<<><>>\")\n assert true == HumanEval.candidate(\"<><><<><>><>\")\n assert true == HumanEval.candidate(\"<><><<<><><>><>><<><><<>>>\")\n assert false == HumanEval.candidate(\"<<<><>>>>\")\n assert false == HumanEval.candidate(\"><<>\")\n assert false == HumanEval.candidate(\"<\")\n assert false == HumanEval.candidate(\"<<<<\")\n assert false == HumanEval.candidate(\">\")\n assert false == HumanEval.candidate(\"<<>\")\n assert false == HumanEval.candidate(\"<><><<><>><>><<>\")\n assert false == HumanEval.candidate(\"<><><<><>><>>><>\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_57_monotonic", "language": "elixir", "prompt": "# Return true is list elements are monotonically increasing or decreasing.\n# >>> HumanEval.monotonic([1, 2, 4, 20])\n# true\n# >>> HumanEval.monotonic([1, 20, 4, 10])\n# false\n# >>> HumanEval.monotonic([4, 1, 0, -10])\n# true\n\ndefmodule HumanEval do\n def candidate(l), do: monotonic(l)\n def monotonic(l) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_57_monotonic.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'monotonic' do\n assert true == HumanEval.candidate([1, 2, 4, 10])\n assert true == HumanEval.candidate([1, 2, 4, 20])\n assert false == HumanEval.candidate([1, 20, 4, 10])\n assert true == HumanEval.candidate([4, 1, 0, -10])\n assert true == HumanEval.candidate([4, 1, 1, 0])\n assert false == HumanEval.candidate([1, 2, 3, 2, 5, 60])\n assert true == HumanEval.candidate([1, 2, 3, 4, 5, 60])\n assert true == HumanEval.candidate([9, 9, 9, 9])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_58_common", "language": "elixir", "prompt": "# Return sorted unique common elements for two lists.\n# >>> HumanEval.common([1, 4, 3, 34, 653, 2, 5], [5, 7, 1, 5, 9, 653, 121])\n# [1, 5, 653]\n# >>> HumanEval.common([5, 3, 2, 8], [3, 2])\n# [2, 3]\n\ndefmodule HumanEval do\n def candidate(l1, l2), do: common(l1, l2)\n def common(l1, l2) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_58_common.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'common' do\n assert [1, 5, 653] == HumanEval.candidate([1, 4, 3, 34, 653, 2, 5], [5, 7, 1, 5, 9, 653, 121])\n assert [2, 3] == HumanEval.candidate([5, 3, 2, 8], [3, 2])\n assert [2, 3, 4] == HumanEval.candidate([4, 3, 2, 8], [3, 2, 4])\n assert [] == HumanEval.candidate([4, 3, 2, 8], [])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_59_largest_prime_factor", "language": "elixir", "prompt": "# Return the largest prime factor of n. Assume n > 1 and is not a prime.\n# >>> HumanEval.largest_prime_factor(13195)\n# 29\n# >>> HumanEval.largest_prime_factor(2048)\n# 2\n\ndefmodule HumanEval do\n def candidate(n), do: largest_prime_factor(n)\n def largest_prime_factor(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_59_largest_prime_factor.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'largest_prime_factor' do\n assert 5 == HumanEval.candidate(15)\n assert 3 == HumanEval.candidate(27)\n assert 7 == HumanEval.candidate(63)\n assert 11 == HumanEval.candidate(330)\n assert 29 == HumanEval.candidate(13195)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_5_intersperse", "language": "elixir", "prompt": "# Insert a number 'delimeter' between every two consecutive elements of input list `numbers'\n# >>> HumanEval.intersperse([], 4)\n# []\n# >>> HumanEval.intersperse([1, 2, 3], 4)\n# [1, 4, 2, 4, 3]\n\ndefmodule HumanEval do\n def candidate(numbers, delimeter), do: intersperse(numbers, delimeter)\n def intersperse(numbers, delimeter) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_5_intersperse.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'intersperse' do\n assert [] == HumanEval.candidate([], 7)\n assert [5, 8, 6, 8, 3, 8, 2] == HumanEval.candidate([5, 6, 3, 2], 8)\n assert [2, 2, 2, 2, 2] == HumanEval.candidate([2, 2, 2], 2)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_60_sum_to_n", "language": "elixir", "prompt": "# sum_to_n is a function that sums numbers from 1 to n.\n# >>> HumanEval.sum_to_n(30)\n# 465\n# >>> HumanEval.sum_to_n(100)\n# 5050\n# >>> HumanEval.sum_to_n(5)\n# 15\n# >>> HumanEval.sum_to_n(10)\n# 55\n# >>> HumanEval.sum_to_n(1)\n# 1\n\ndefmodule HumanEval do\n def candidate(n), do: sum_to_n(n)\n def sum_to_n(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_60_sum_to_n.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sum_to_n' do\n assert 1 == HumanEval.candidate(1)\n assert 21 == HumanEval.candidate(6)\n assert 66 == HumanEval.candidate(11)\n assert 465 == HumanEval.candidate(30)\n assert 5050 == HumanEval.candidate(100)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_61_correct_bracketing", "language": "elixir", "prompt": "# brackets is a string of \"(\" and \")\".\n# return true if every opening bracket has a corresponding closing bracket.\n# >>> HumanEval.correct_bracketing(\"(\")\n# false\n# >>> HumanEval.correct_bracketing(\"()\")\n# true\n# >>> HumanEval.correct_bracketing(\"(()())\")\n# true\n# >>> HumanEval.correct_bracketing(\")(()\")\n# false\n\ndefmodule HumanEval do\n def candidate(brackets), do: correct_bracketing(brackets)\n def correct_bracketing(brackets) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_61_correct_bracketing.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'correct_bracketing' do\n assert true == HumanEval.candidate(\"()\")\n assert true == HumanEval.candidate(\"(()())\")\n assert true == HumanEval.candidate(\"()()(()())()\")\n assert true == HumanEval.candidate(\"()()((()()())())(()()(()))\")\n assert false == HumanEval.candidate(\"((()())))\")\n assert false == HumanEval.candidate(\")(()\")\n assert false == HumanEval.candidate(\"(\")\n assert false == HumanEval.candidate(\"((((\")\n assert false == HumanEval.candidate(\")\")\n assert false == HumanEval.candidate(\"(()\")\n assert false == HumanEval.candidate(\"()()(()())())(()\")\n assert false == HumanEval.candidate(\"()()(()())()))()\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_62_derivative", "language": "elixir", "prompt": "# xs represent coefficients of a polynomial.\n# xs[0] + xs[1] * x + xs[2] * x^2 + ....\n# Return derivative of this polynomial in the same form.\n# >>> HumanEval.derivative([3, 1, 2, 4, 5])\n# [1, 4, 12, 20]\n# >>> HumanEval.derivative([1, 2, 3])\n# [2, 6]\n\ndefmodule HumanEval do\n def candidate(xs), do: derivative(xs)\n def derivative(xs) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_62_derivative.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'derivative' do\n assert [1, 4, 12, 20] == HumanEval.candidate([3, 1, 2, 4, 5])\n assert [2, 6] == HumanEval.candidate([1, 2, 3])\n assert [2, 2] == HumanEval.candidate([3, 2, 1])\n assert [2, 2, 0, 16] == HumanEval.candidate([3, 2, 1, 0, 4])\n assert [] == HumanEval.candidate([1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_63_fibfib", "language": "elixir", "prompt": "# The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:\n# fibfib(0) == 0\n# fibfib(1) == 0\n# fibfib(2) == 1\n# fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).\n# Please write a function to efficiently compute the n-th element of the fibfib number sequence.\n# >>> HumanEval.fibfib(1)\n# 0\n# >>> HumanEval.fibfib(5)\n# 4\n# >>> HumanEval.fibfib(8)\n# 24\n\ndefmodule HumanEval do\n def candidate(n), do: fibfib(n)\n def fibfib(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_63_fibfib.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fibfib' do\n assert 1 == HumanEval.candidate(2)\n assert 0 == HumanEval.candidate(1)\n assert 4 == HumanEval.candidate(5)\n assert 24 == HumanEval.candidate(8)\n assert 81 == HumanEval.candidate(10)\n assert 274 == HumanEval.candidate(12)\n assert 927 == HumanEval.candidate(14)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_64_vowels_count", "language": "elixir", "prompt": "# Write a function vowels_count which takes a string representing\n# a word as input and returns the number of vowels in the string.\n# Vowels in this case are 'a', 'e', 'i', 'o', 'u'. Here, 'y' is also a\n# vowel, but only when it is at the end of the given word.\n# Example:\n# >>> HumanEval.vowels_count(\"abcde\")\n# 2\n# >>> HumanEval.vowels_count(\"ACEDY\")\n# 3\n\ndefmodule HumanEval do\n def candidate(s), do: vowels_count(s)\n def vowels_count(s) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_64_vowels_count.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'vowels_count' do\n assert 2 == HumanEval.candidate(\"abcde\")\n assert 3 == HumanEval.candidate(\"Alone\")\n assert 2 == HumanEval.candidate(\"key\")\n assert 1 == HumanEval.candidate(\"bye\")\n assert 2 == HumanEval.candidate(\"keY\")\n assert 1 == HumanEval.candidate(\"bYe\")\n assert 3 == HumanEval.candidate(\"ACEDY\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_65_circular_shift", "language": "elixir", "prompt": "# Circular shift the digits of the integer x, shift the digits right by shift\n# and return the result as a string.\n# If shift > number of digits, return digits reversed.\n# >>> HumanEval.circular_shift(12, 1)\n# \"21\"\n# >>> HumanEval.circular_shift(12, 2)\n# \"12\"\n\ndefmodule HumanEval do\n def candidate(x, shift), do: circular_shift(x, shift)\n def circular_shift(x, shift) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_65_circular_shift.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'circular_shift' do\n assert \"001\" == HumanEval.candidate(100, 2)\n assert \"12\" == HumanEval.candidate(12, 2)\n assert \"79\" == HumanEval.candidate(97, 8)\n assert \"21\" == HumanEval.candidate(12, 1)\n assert \"11\" == HumanEval.candidate(11, 101)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_66_digitSum", "language": "elixir", "prompt": "# Task\n# Write a function that takes a string as input and returns the sum of the upper characters only'\n# ASCII codes.\n# Examples:\n# >>> HumanEval.digitSum(\"\")\n# 0\n# >>> HumanEval.digitSum(\"abAB\")\n# 131\n# >>> HumanEval.digitSum(\"abcCd\")\n# 67\n# >>> HumanEval.digitSum(\"helloE\")\n# 69\n# >>> HumanEval.digitSum(\"woArBld\")\n# 131\n# >>> HumanEval.digitSum(\"aAaaaXa\")\n# 153\n\ndefmodule HumanEval do\n def candidate(s), do: digitSum(s)\n def digitSum(s) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_66_digitSum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'digitSum' do\n assert 0 == HumanEval.candidate(\"\")\n assert 131 == HumanEval.candidate(\"abAB\")\n assert 67 == HumanEval.candidate(\"abcCd\")\n assert 69 == HumanEval.candidate(\"helloE\")\n assert 131 == HumanEval.candidate(\"woArBld\")\n assert 153 == HumanEval.candidate(\"aAaaaXa\")\n assert 151 == HumanEval.candidate(\" How are yOu?\")\n assert 327 == HumanEval.candidate(\"You arE Very Smart\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_67_fruit_distribution", "language": "elixir", "prompt": "# In this task, you will be given a string that represents a number of apples and oranges \n# that are distributed in a basket of fruit this basket contains \n# apples, oranges, and mango fruits. Given the string that represents the total number of \n# the oranges and apples and an integer that represent the total number of the fruits \n# in the basket return the number of the mango fruits in the basket.\n# for examble:\n# >>> HumanEval.fruit_distribution(\"5 apples and 6 oranges\", 19)\n# 8\n# >>> HumanEval.fruit_distribution(\"0 apples and 1 oranges\", 3)\n# 2\n# >>> HumanEval.fruit_distribution(\"2 apples and 3 oranges\", 100)\n# 95\n# >>> HumanEval.fruit_distribution(\"100 apples and 1 oranges\", 120)\n# 19\n\ndefmodule HumanEval do\n def candidate(s, n), do: fruit_distribution(s, n)\n def fruit_distribution(s, n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_67_fruit_distribution.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fruit_distribution' do\n assert 8 == HumanEval.candidate(\"5 apples and 6 oranges\", 19)\n assert 10 == HumanEval.candidate(\"5 apples and 6 oranges\", 21)\n assert 2 == HumanEval.candidate(\"0 apples and 1 oranges\", 3)\n assert 2 == HumanEval.candidate(\"1 apples and 0 oranges\", 3)\n assert 95 == HumanEval.candidate(\"2 apples and 3 oranges\", 100)\n assert 0 == HumanEval.candidate(\"2 apples and 3 oranges\", 5)\n assert 19 == HumanEval.candidate(\"1 apples and 100 oranges\", 120)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_68_pluck", "language": "elixir", "prompt": "# \"Given a list representing a branch of a tree that has non-negative integer nodes\n# your task is to pluck one of the nodes and return it.\n# The plucked node should be the node with the smallest even value.\n# If multiple nodes with the same smallest even value are found return the node that has smallest index.\n# The plucked node should be returned in a list, [ smalest_value, its index ],\n# If there are no even values or the given list is empty, return [].\n# Example 1:\n# >>> HumanEval.pluck([4, 2, 3])\n# [2, 1]\n# Explanation: 2 has the smallest even value, and 2 has the smallest index.\n# Example 2:\n# >>> HumanEval.pluck([1, 2, 3])\n# [2, 1]\n# Explanation: 2 has the smallest even value, and 2 has the smallest index.\n# Example 3:\n# >>> HumanEval.pluck([])\n# []\n# Example 4:\n# >>> HumanEval.pluck([5, 0, 3, 0, 4, 2])\n# [0, 1]\n# Explanation: 0 is the smallest value, but there are two zeros,\n# so we will choose the first zero, which has the smallest index.\n# Constraints:\n# * 1 <= nodes.length <= 10000\n# * 0 <= node.value\n\ndefmodule HumanEval do\n def candidate(arr), do: pluck(arr)\n def pluck(arr) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_68_pluck.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'pluck' do\n assert [2, 1] == HumanEval.candidate([4, 2, 3])\n assert [2, 1] == HumanEval.candidate([1, 2, 3])\n assert [] == HumanEval.candidate([])\n assert [0, 1] == HumanEval.candidate([5, 0, 3, 0, 4, 2])\n assert [0, 3] == HumanEval.candidate([1, 2, 3, 0, 5, 3])\n assert [4, 1] == HumanEval.candidate([5, 4, 8, 4, 8])\n assert [6, 1] == HumanEval.candidate([7, 6, 7, 1])\n assert [] == HumanEval.candidate([7, 9, 7, 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_69_search", "language": "elixir", "prompt": "# You are given a non-empty list of positive integers. Return the greatest integer that is greater than \n# zero, and has a frequency greater than or equal to the value of the integer itself. \n# The frequency of an integer is the number of times it appears in the list.\n# If no such a value exist, return -1.\n# Examples:\n# >>> HumanEval.search([4, 1, 2, 2, 3, 1])\n# 2\n# >>> HumanEval.search([1, 2, 2, 3, 3, 3, 4, 4, 4])\n# 3\n# >>> HumanEval.search([5, 5, 4, 4, 4])\n# -1\n\ndefmodule HumanEval do\n def candidate(lst), do: search(lst)\n def search(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_69_search.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'search' do\n assert 1 == HumanEval.candidate([5, 5, 5, 5, 1])\n assert 4 == HumanEval.candidate([4, 1, 4, 1, 4, 4])\n assert -1 == HumanEval.candidate([3, 3])\n assert 8 == HumanEval.candidate([8, 8, 8, 8, 8, 8, 8, 8])\n assert 2 == HumanEval.candidate([2, 3, 3, 2, 2])\n assert 1 == HumanEval.candidate([2, 7, 8, 8, 4, 8, 7, 3, 9, 6, 5, 10, 4, 3, 6, 7, 1, 7, 4, 10, 8, 1])\n assert 2 == HumanEval.candidate([3, 2, 8, 2])\n assert 1 == HumanEval.candidate([6, 7, 1, 8, 8, 10, 5, 8, 5, 3, 10])\n assert -1 == HumanEval.candidate([8, 8, 3, 6, 5, 6, 4])\n assert 1 == HumanEval.candidate([6, 9, 6, 7, 1, 4, 7, 1, 8, 8, 9, 8, 10, 10, 8, 4, 10, 4, 10, 1, 2, 9, 5, 7, 9])\n assert 1 == HumanEval.candidate([1, 9, 10, 1, 3])\n assert 5 == HumanEval.candidate([6, 9, 7, 5, 8, 7, 5, 3, 7, 5, 10, 10, 3, 6, 10, 2, 8, 6, 5, 4, 9, 5, 3, 10])\n assert 1 == HumanEval.candidate([1])\n assert 4 == HumanEval.candidate([8, 8, 10, 6, 4, 3, 5, 8, 2, 4, 2, 8, 4, 6, 10, 4, 2, 1, 10, 2, 1, 1, 5])\n assert 2 == HumanEval.candidate([2, 10, 4, 8, 2, 10, 5, 1, 2, 9, 5, 5, 6, 3, 8, 6, 4, 10])\n assert 1 == HumanEval.candidate([1, 6, 10, 1, 6, 9, 10, 8, 6, 8, 7, 3])\n assert 4 == HumanEval.candidate([9, 2, 4, 1, 5, 1, 5, 2, 5, 7, 7, 7, 3, 10, 1, 5, 4, 2, 8, 4, 1, 9, 10, 7, 10, 2, 8, 10, 9, 4])\n assert 4 == HumanEval.candidate([2, 6, 4, 2, 8, 7, 5, 6, 4, 10, 4, 6, 3, 7, 8, 8, 3, 1, 4, 2, 2, 10, 7])\n assert 2 == HumanEval.candidate([9, 8, 6, 10, 2, 6, 10, 2, 7, 8, 10, 3, 8, 2, 6, 2, 3, 1])\n assert -1 == HumanEval.candidate([5, 5, 3, 9, 5, 6, 3, 2, 8, 5, 6, 10, 10, 6, 8, 4, 10, 7, 7, 10, 8])\n assert -1 == HumanEval.candidate([10])\n assert 2 == HumanEval.candidate([9, 7, 7, 2, 4, 7, 2, 10, 9, 7, 5, 7, 2])\n assert 1 == HumanEval.candidate([5, 4, 10, 2, 1, 1, 10, 3, 6, 1, 8])\n assert 1 == HumanEval.candidate([7, 9, 9, 9, 3, 4, 1, 5, 9, 1, 2, 1, 1, 10, 7, 5, 6, 7, 6, 7, 7, 6])\n assert -1 == HumanEval.candidate([3, 10, 10, 9, 2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_6_parse_nested_parens", "language": "elixir", "prompt": "# Input to this function is a string represented multiple groups for nested parentheses separated by spaces.\n# For each of the group, output the deepest level of nesting of parentheses.\n# E.g. (()()) has maximum two levels of nesting while ((())) has three.\n# >>> HumanEval.parse_nested_parens(\"(()()) ((())) () ((())()())\")\n# [2, 3, 1, 3]\n\ndefmodule HumanEval do\n def candidate(paren_string), do: parse_nested_parens(paren_string)\n def parse_nested_parens(paren_string) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_6_parse_nested_parens.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'parse_nested_parens' do\n assert [2, 3, 1, 3] == HumanEval.candidate(\"(()()) ((())) () ((())()())\")\n assert [1, 2, 3, 4] == HumanEval.candidate(\"() (()) ((())) (((())))\")\n assert [4] == HumanEval.candidate(\"(()(())((())))\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_70_strange_sort_list", "language": "elixir", "prompt": "# Given list of integers, return list in strange order.\n# Strange sorting, is when you start with the minimum value,\n# then maximum of the remaining integers, then minimum and so on.\n# Examples:\n# >>> HumanEval.strange_sort_list([1, 2, 3, 4])\n# [1, 4, 2, 3]\n# >>> HumanEval.strange_sort_list([5, 5, 5, 5])\n# [5, 5, 5, 5]\n# >>> HumanEval.strange_sort_list([])\n# []\n\ndefmodule HumanEval do\n def candidate(lst), do: strange_sort_list(lst)\n def strange_sort_list(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_70_strange_sort_list.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'strange_sort_list' do\n assert [1, 4, 2, 3] == HumanEval.candidate([1, 2, 3, 4])\n assert [5, 9, 6, 8, 7] == HumanEval.candidate([5, 6, 7, 8, 9])\n assert [1, 5, 2, 4, 3] == HumanEval.candidate([1, 2, 3, 4, 5])\n assert [1, 9, 5, 8, 6, 7] == HumanEval.candidate([5, 6, 7, 8, 9, 1])\n assert [5, 5, 5, 5] == HumanEval.candidate([5, 5, 5, 5])\n assert [] == HumanEval.candidate([])\n assert [1, 8, 2, 7, 3, 6, 4, 5] == HumanEval.candidate([1, 2, 3, 4, 5, 6, 7, 8])\n assert [-5, 5, -5, 5, 0, 2, 2, 2] == HumanEval.candidate([0, 2, 2, 2, 5, 5, -5, -5])\n assert [111111] == HumanEval.candidate([111111])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_71_triangle_area", "language": "elixir", "prompt": "# Given the lengths of the three sides of a triangle. Return the area of\n# the triangle rounded to 2 decimal points if the three sides form a valid triangle. \n# Otherwise return -1\n# Three sides make a valid triangle when the sum of any two sides is greater \n# than the third side.\n# Example:\n# >>> HumanEval.triangle_area(3, 4, 5)\n# 6.0\n# >>> HumanEval.triangle_area(1, 2, 10)\n# -1\n\ndefmodule HumanEval do\n def candidate(a, b, c), do: triangle_area(a, b, c)\n def triangle_area(a, b, c) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_71_triangle_area.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'triangle_area' do\n assert 6.0 == HumanEval.candidate(3, 4, 5)\n assert -1 == HumanEval.candidate(1, 2, 10)\n assert 8.18 == HumanEval.candidate(4, 8, 5)\n assert 1.73 == HumanEval.candidate(2, 2, 2)\n assert -1 == HumanEval.candidate(1, 2, 3)\n assert 16.25 == HumanEval.candidate(10, 5, 7)\n assert -1 == HumanEval.candidate(2, 6, 3)\n assert 0.43 == HumanEval.candidate(1, 1, 1)\n assert -1 == HumanEval.candidate(2, 2, 10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_72_will_it_fly", "language": "elixir", "prompt": "# Write a function that returns true if the object q will fly, and false otherwise.\n# The object q will fly if it's balanced (it is a palindromic list) and the sum of its elements is less than or equal the maximum possible weight w.\n# Example:\n# >>> HumanEval.will_it_fly([1, 2], 5)\n# false\n# # 1+2 is less than the maximum possible weight, but it's unbalanced.\n# >>> HumanEval.will_it_fly([3, 2, 3], 1)\n# false\n# # it's balanced, but 3+2+3 is more than the maximum possible weight.\n# >>> HumanEval.will_it_fly([3, 2, 3], 9)\n# true\n# # 3+2+3 is less than the maximum possible weight, and it's balanced.\n# >>> HumanEval.will_it_fly([3], 5)\n# true\n# # 3 is less than the maximum possible weight, and it's balanced.\n\ndefmodule HumanEval do\n def candidate(q, w), do: will_it_fly(q, w)\n def will_it_fly(q, w) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_72_will_it_fly.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'will_it_fly' do\n assert true == HumanEval.candidate([3, 2, 3], 9)\n assert false == HumanEval.candidate([1, 2], 5)\n assert true == HumanEval.candidate([3], 5)\n assert false == HumanEval.candidate([3, 2, 3], 1)\n assert false == HumanEval.candidate([1, 2, 3], 6)\n assert true == HumanEval.candidate([5], 5)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_73_smallest_change", "language": "elixir", "prompt": "# Given a list arr of integers, find the minimum number of elements that\n# need to be changed to make the list palindromic. A palindromic list is a list that\n# is read the same backwards and forwards. In one change, you can change one element to any other element.\n# For example:\n# >>> HumanEval.smallest_change([1, 2, 3, 5, 4, 7, 9, 6])\n# 4\n# >>> HumanEval.smallest_change([1, 2, 3, 4, 3, 2, 2])\n# 1\n# >>> HumanEval.smallest_change([1, 2, 3, 2, 1])\n# 0\n\ndefmodule HumanEval do\n def candidate(arr), do: smallest_change(arr)\n def smallest_change(arr) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_73_smallest_change.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'smallest_change' do\n assert 4 == HumanEval.candidate([1, 2, 3, 5, 4, 7, 9, 6])\n assert 1 == HumanEval.candidate([1, 2, 3, 4, 3, 2, 2])\n assert 1 == HumanEval.candidate([1, 4, 2])\n assert 1 == HumanEval.candidate([1, 4, 4, 2])\n assert 0 == HumanEval.candidate([1, 2, 3, 2, 1])\n assert 0 == HumanEval.candidate([3, 1, 1, 3])\n assert 0 == HumanEval.candidate([1])\n assert 1 == HumanEval.candidate([0, 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_74_total_match", "language": "elixir", "prompt": "# Write a function that accepts two lists of strings and returns the list that has \n# total number of chars in the all strings of the list less than the other list.\n# if the two lists have the same number of chars, return the first list.\n# Examples\n# >>> HumanEval.total_match([], [])\n# []\n# >>> HumanEval.total_match([\"hi\", \"admin\"], [\"hI\", \"Hi\"])\n# [\"hI\", \"Hi\"]\n# >>> HumanEval.total_match([\"hi\", \"admin\"], [\"hi\", \"hi\", \"admin\", \"project\"])\n# [\"hi\", \"admin\"]\n# >>> HumanEval.total_match([\"hi\", \"admin\"], [\"hI\", \"hi\", \"hi\"])\n# [\"hI\", \"hi\", \"hi\"]\n# >>> HumanEval.total_match([\"4\"], [\"1\", \"2\", \"3\", \"4\", \"5\"])\n# [\"4\"]\n\ndefmodule HumanEval do\n def candidate(lst1, lst2), do: total_match(lst1, lst2)\n def total_match(lst1, lst2) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_74_total_match.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'total_match' do\n assert [] == HumanEval.candidate([], [])\n assert [\"hi\", \"hi\"] == HumanEval.candidate([\"hi\", \"admin\"], [\"hi\", \"hi\"])\n assert [\"hi\", \"admin\"] == HumanEval.candidate([\"hi\", \"admin\"], [\"hi\", \"hi\", \"admin\", \"project\"])\n assert [\"4\"] == HumanEval.candidate([\"4\"], [\"1\", \"2\", \"3\", \"4\", \"5\"])\n assert [\"hI\", \"Hi\"] == HumanEval.candidate([\"hi\", \"admin\"], [\"hI\", \"Hi\"])\n assert [\"hI\", \"hi\", \"hi\"] == HumanEval.candidate([\"hi\", \"admin\"], [\"hI\", \"hi\", \"hi\"])\n assert [\"hi\", \"admin\"] == HumanEval.candidate([\"hi\", \"admin\"], [\"hI\", \"hi\", \"hii\"])\n assert [] == HumanEval.candidate([], [\"this\"])\n assert [] == HumanEval.candidate([\"this\"], [])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_75_is_multiply_prime", "language": "elixir", "prompt": "# Write a function that returns true if the given number is the multiplication of 3 prime numbers\n# and false otherwise.\n# Knowing that (a) is less then 100. \n# Example:\n# >>> HumanEval.is_multiply_prime(30)\n# true\n# 30 = 2 * 3 * 5\n\ndefmodule HumanEval do\n def candidate(a), do: is_multiply_prime(a)\n def is_multiply_prime(a) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_75_is_multiply_prime.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_multiply_prime' do\n assert false == HumanEval.candidate(5)\n assert true == HumanEval.candidate(30)\n assert true == HumanEval.candidate(8)\n assert false == HumanEval.candidate(10)\n assert true == HumanEval.candidate(125)\n assert true == HumanEval.candidate(105)\n assert false == HumanEval.candidate(126)\n assert false == HumanEval.candidate(729)\n assert false == HumanEval.candidate(891)\n assert true == HumanEval.candidate(1001)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_76_is_simple_power", "language": "elixir", "prompt": "# Your task is to write a function that returns true if a number x is a simple\n# power of n and false in other cases.\n# x is a simple power of n if n**int=x\n# For example:\n# >>> HumanEval.is_simple_power(1, 4)\n# true\n# >>> HumanEval.is_simple_power(2, 2)\n# true\n# >>> HumanEval.is_simple_power(8, 2)\n# true\n# >>> HumanEval.is_simple_power(3, 2)\n# false\n# >>> HumanEval.is_simple_power(3, 1)\n# false\n# >>> HumanEval.is_simple_power(5, 3)\n# false\n\ndefmodule HumanEval do\n def candidate(x, n), do: is_simple_power(x, n)\n def is_simple_power(x, n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_76_is_simple_power.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_simple_power' do\n assert true == HumanEval.candidate(16, 2)\n assert false == HumanEval.candidate(143214, 16)\n assert true == HumanEval.candidate(4, 2)\n assert true == HumanEval.candidate(9, 3)\n assert true == HumanEval.candidate(16, 4)\n assert false == HumanEval.candidate(24, 2)\n assert false == HumanEval.candidate(128, 4)\n assert false == HumanEval.candidate(12, 6)\n assert true == HumanEval.candidate(1, 1)\n assert true == HumanEval.candidate(1, 12)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_77_iscube", "language": "elixir", "prompt": "# Write a function that takes an integer a and returns true \n# if this ingeger is a cube of some integer number.\n# Note: you may assume the input is always valid.\n# Examples:\n# >>> HumanEval.iscube(1)\n# true\n# >>> HumanEval.iscube(2)\n# false\n# >>> HumanEval.iscube(-1)\n# true\n# >>> HumanEval.iscube(64)\n# true\n# >>> HumanEval.iscube(0)\n# true\n# >>> HumanEval.iscube(180)\n# false\n\ndefmodule HumanEval do\n def candidate(a), do: iscube(a)\n def iscube(a) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_77_iscube.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'iscube' do\n assert true == HumanEval.candidate(1)\n assert false == HumanEval.candidate(2)\n assert true == HumanEval.candidate(-1)\n assert true == HumanEval.candidate(64)\n assert false == HumanEval.candidate(180)\n assert true == HumanEval.candidate(1000)\n assert true == HumanEval.candidate(0)\n assert false == HumanEval.candidate(1729)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_78_hex_key", "language": "elixir", "prompt": "# You have been tasked to write a function that receives \n# a hexadecimal number as a string and counts the number of hexadecimal \n# digits that are primes (prime number, or a prime, is a natural number \n# greater than 1 that is not a product of two smaller natural numbers).\n# Hexadecimal digits are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.\n# Prime numbers are 2, 3, 5, 7, 11, 13, 17,...\n# So you have to determine a number of the following digits: 2, 3, 5, 7, \n# B (=decimal 11), D (=decimal 13).\n# Note: you may assume the input is always correct or empty string, \n# and symbols A,B,C,D,E,F are always uppercase.\n# Examples:\n# >>> HumanEval.hex_key(\"AB\")\n# 1\n# >>> HumanEval.hex_key(\"1077E\")\n# 2\n# >>> HumanEval.hex_key(\"ABED1A33\")\n# 4\n# >>> HumanEval.hex_key(\"123456789ABCDEF0\")\n# 6\n# >>> HumanEval.hex_key(\"2020\")\n# 2\n\ndefmodule HumanEval do\n def candidate(num), do: hex_key(num)\n def hex_key(num) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_78_hex_key.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'hex_key' do\n assert 1 == HumanEval.candidate(\"AB\")\n assert 2 == HumanEval.candidate(\"1077E\")\n assert 4 == HumanEval.candidate(\"ABED1A33\")\n assert 2 == HumanEval.candidate(\"2020\")\n assert 6 == HumanEval.candidate(\"123456789ABCDEF0\")\n assert 12 == HumanEval.candidate(\"112233445566778899AABBCCDDEEFF00\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_79_decimal_to_binary", "language": "elixir", "prompt": "# You will be given a number in decimal form and your task is to convert it to\n# binary format. The function should return a string, with each character representing a binary\n# number. Each character in the string will be '0' or '1'.\n# There will be an extra couple of characters 'db' at the beginning and at the end of the string.\n# The extra characters are there to help with the format.\n# Examples:\n# >>> HumanEval.decimal_to_binary(15)\n# \"db1111db\"\n# >>> HumanEval.decimal_to_binary(32)\n# \"db100000db\"\n\ndefmodule HumanEval do\n def candidate(decimal), do: decimal_to_binary(decimal)\n def decimal_to_binary(decimal) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_79_decimal_to_binary.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'decimal_to_binary' do\n assert \"db0db\" == HumanEval.candidate(0)\n assert \"db100000db\" == HumanEval.candidate(32)\n assert \"db1100111db\" == HumanEval.candidate(103)\n assert \"db1111db\" == HumanEval.candidate(15)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_7_filter_by_substring", "language": "elixir", "prompt": "# Filter an input list of strings only for ones that contain given substring\n# >>> HumanEval.filter_by_substring([], \"a\")\n# []\n# >>> HumanEval.filter_by_substring([\"abc\", \"bacd\", \"cde\", \"array\"], \"a\")\n# [\"abc\", \"bacd\", \"array\"]\n\ndefmodule HumanEval do\n def candidate(strings, substring), do: filter_by_substring(strings, substring)\n def filter_by_substring(strings, substring) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_7_filter_by_substring.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'filter_by_substring' do\n assert [] == HumanEval.candidate([], \"john\")\n assert [\"xxx\", \"xxxAAA\", \"xxx\"] == HumanEval.candidate([\"xxx\", \"asd\", \"xxy\", \"john doe\", \"xxxAAA\", \"xxx\"], \"xxx\")\n assert [\"xxx\", \"aaaxxy\", \"xxxAAA\", \"xxx\"] == HumanEval.candidate([\"xxx\", \"asd\", \"aaaxxy\", \"john doe\", \"xxxAAA\", \"xxx\"], \"xx\")\n assert [\"grunt\", \"prune\"] == HumanEval.candidate([\"grunt\", \"trumpet\", \"prune\", \"gruesome\"], \"run\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_80_is_happy", "language": "elixir", "prompt": "# You are given a string s.\n# Your task is to check if the string is hapelixir or not.\n# A string is hapelixir if its length is at least 3 and every 3 consecutive letters are distinct\n# For example:\n# >>> HumanEval.is_happy(\"a\")\n# false\n# >>> HumanEval.is_happy(\"aa\")\n# false\n# >>> HumanEval.is_happy(\"abcd\")\n# true\n# >>> HumanEval.is_happy(\"aabb\")\n# false\n# >>> HumanEval.is_happy(\"adb\")\n# true\n# >>> HumanEval.is_happy(\"xyy\")\n# false\n\ndefmodule HumanEval do\n def candidate(s), do: is_happy(s)\n def is_happy(s) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_80_is_happy.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_happy' do\n assert false == HumanEval.candidate(\"a\")\n assert false == HumanEval.candidate(\"aa\")\n assert true == HumanEval.candidate(\"abcd\")\n assert false == HumanEval.candidate(\"aabb\")\n assert true == HumanEval.candidate(\"adb\")\n assert false == HumanEval.candidate(\"xyy\")\n assert true == HumanEval.candidate(\"iopaxpoi\")\n assert false == HumanEval.candidate(\"iopaxioi\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_81_numerical_letter_grade", "language": "elixir", "prompt": "# It is the last week of the semester and the teacher has to give the grades\n# to students. The teacher has been making her own algorithm for grading.\n# The only problem is, she has lost the code she used for grading.\n# She has given you a list of GPAs for some students and you have to write \n# a function that can output a list of letter grades using the following table:\n# GPA | Letter grade\n# 4.0 A+\n# > 3.7 A \n# > 3.3 A- \n# > 3.0 B+\n# > 2.7 B \n# > 2.3 B-\n# > 2.0 C+\n# > 1.7 C\n# > 1.3 C-\n# > 1.0 D+ \n# > 0.7 D \n# > 0.0 D-\n# 0.0 E\n# Example:\n# >>> HumanEval.grade_equation([4.0, 3, 1.7, 2, 3.5])\n# [\"A+\", \"B\", \"C-\", \"C\", \"A-\"]\n\ndefmodule HumanEval do\n def candidate(grades), do: numerical_letter_grade(grades)\n def numerical_letter_grade(grades) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_81_numerical_letter_grade.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'numerical_letter_grade' do\n assert [\"A+\", \"B\", \"C-\", \"C\", \"A-\"] == HumanEval.candidate([4.0, 3, 1.7, 2, 3.5])\n assert [\"D+\"] == HumanEval.candidate([1.2])\n assert [\"D-\"] == HumanEval.candidate([0.5])\n assert [\"E\"] == HumanEval.candidate([0.0])\n assert [\"D\", \"D-\", \"C-\", \"B\", \"B+\"] == HumanEval.candidate([1.0, 0.3, 1.5, 2.8, 3.3])\n assert [\"E\", \"D-\"] == HumanEval.candidate([0.0, 0.7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_82_prime_length", "language": "elixir", "prompt": "# Write a function that takes a string and returns true if the string\n# length is a prime number or false otherwise\n# Examples\n# >>> HumanEval.prime_length(\"Hello\")\n# true\n# >>> HumanEval.prime_length(\"abcdcba\")\n# true\n# >>> HumanEval.prime_length(\"kittens\")\n# true\n# >>> HumanEval.prime_length(\"orange\")\n# false\n\ndefmodule HumanEval do\n def candidate(string), do: prime_length(string)\n def prime_length(string) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_82_prime_length.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'prime_length' do\n assert true == HumanEval.candidate(\"Hello\")\n assert true == HumanEval.candidate(\"abcdcba\")\n assert true == HumanEval.candidate(\"kittens\")\n assert false == HumanEval.candidate(\"orange\")\n assert true == HumanEval.candidate(\"wow\")\n assert true == HumanEval.candidate(\"world\")\n assert true == HumanEval.candidate(\"MadaM\")\n assert true == HumanEval.candidate(\"Wow\")\n assert false == HumanEval.candidate(\"\")\n assert true == HumanEval.candidate(\"HI\")\n assert true == HumanEval.candidate(\"go\")\n assert false == HumanEval.candidate(\"gogo\")\n assert false == HumanEval.candidate(\"aaaaaaaaaaaaaaa\")\n assert true == HumanEval.candidate(\"Madam\")\n assert false == HumanEval.candidate(\"M\")\n assert false == HumanEval.candidate(\"0\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_83_starts_one_ends", "language": "elixir", "prompt": "# Given a positive integer n, return the count of the numbers of n-digit\n# positive integers that start or end with 1.\n\ndefmodule HumanEval do\n def candidate(n), do: starts_one_ends(n)\n def starts_one_ends(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_83_starts_one_ends.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'starts_one_ends' do\n assert 1 == HumanEval.candidate(1)\n assert 18 == HumanEval.candidate(2)\n assert 180 == HumanEval.candidate(3)\n assert 1800 == HumanEval.candidate(4)\n assert 18000 == HumanEval.candidate(5)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_84_solve", "language": "elixir", "prompt": "# Given a positive integer N, return the total sum of its digits in binary.\n# Example\n# >>> HumanEval.solve(1000)\n# \"1\"\n# >>> HumanEval.solve(150)\n# \"110\"\n# >>> HumanEval.solve(147)\n# \"1100\"\n# Variables:\n# @N integer\n# Constraints: 0 \u2264 N \u2264 10000.\n# Output:\n# a string of binary number\n\ndefmodule HumanEval do\n def candidate(N), do: solve(N)\n def solve(N) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_84_solve.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'solve' do\n assert \"1\" == HumanEval.candidate(1000)\n assert \"110\" == HumanEval.candidate(150)\n assert \"1100\" == HumanEval.candidate(147)\n assert \"1001\" == HumanEval.candidate(333)\n assert \"10010\" == HumanEval.candidate(963)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_85_add", "language": "elixir", "prompt": "# Given a non-empty list of integers lst. add the even elements that are at odd indices..\n# Examples:\n# >>> HumanEval.add([4, 2, 6, 7])\n# 2\n\ndefmodule HumanEval do\n def candidate(lst), do: add(lst)\n def add(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_85_add.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'add' do\n assert 88 == HumanEval.candidate([4, 88])\n assert 122 == HumanEval.candidate([4, 5, 6, 7, 2, 122])\n assert 0 == HumanEval.candidate([4, 0, 6, 7])\n assert 12 == HumanEval.candidate([4, 4, 6, 8])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_86_anti_shuffle", "language": "elixir", "prompt": "# Write a function that takes a string and returns an ordered version of it.\n# Ordered version of string, is a string where all words (separated by space)\n# are replaced by a new word where all the characters arranged in\n# ascending order based on ascii value.\n# Note: You should keep the order of words and blank spaces in the sentence.\n# For example:\n# >>> HumanEval.anti_shuffle(\"Hi\")\n# \"Hi\"\n# >>> HumanEval.anti_shuffle(\"hello\")\n# \"ehllo\"\n# >>> HumanEval.anti_shuffle(\"Hello World!!!\")\n# \"Hello !!!Wdlor\"\n\ndefmodule HumanEval do\n def candidate(s), do: anti_shuffle(s)\n def anti_shuffle(s) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_86_anti_shuffle.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'anti_shuffle' do\n assert \"Hi\" == HumanEval.candidate(\"Hi\")\n assert \"ehllo\" == HumanEval.candidate(\"hello\")\n assert \"bemnru\" == HumanEval.candidate(\"number\")\n assert \"abcd\" == HumanEval.candidate(\"abcd\")\n assert \"Hello !!!Wdlor\" == HumanEval.candidate(\"Hello World!!!\")\n assert \"\" == HumanEval.candidate(\"\")\n assert \".Hi My aemn is Meirst .Rboot How aer ?ouy\" == HumanEval.candidate(\"Hi. My name is Mister Robot. How are you?\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_87_get_row", "language": "elixir", "prompt": "# You are given a 2 dimensional data, as a nested lists,\n# which is similar to matrix, however, unlike matrices,\n# each row may contain a different number of columns.\n# Given lst, and integer x, find integers x in the list,\n# and return list of tuples, [(x1, y1), (x2, y2) ...] such that\n# each tuple is a coordinate - (row, columns), starting with 0.\n# Sort coordinates initially by rows in ascending order.\n# Also, sort coordinates of the row by columns in descending order.\n# Examples:\n# >>> HumanEval.get_row([[1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 1, 6], [1, 2, 3, 4, 5, 1]], 1)\n# [{0, 0}, {1, 4}, {1, 0}, {2, 5}, {2, 0}]\n# >>> HumanEval.get_row([], 1)\n# []\n# >>> HumanEval.get_row([[], [1], [1, 2, 3]], 3)\n# [{2, 2}]\n\ndefmodule HumanEval do\n def candidate(lst, x), do: get_row(lst, x)\n def get_row(lst, x) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_87_get_row.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'get_row' do\n assert [{0, 0}, {1, 4}, {1, 0}, {2, 5}, {2, 0}] == HumanEval.candidate([[1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 1, 6], [1, 2, 3, 4, 5, 1]], 1)\n assert [{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}] == HumanEval.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], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6]], 2)\n assert [{0, 0}, {1, 0}, {2, 1}, {2, 0}, {3, 2}, {3, 0}, {4, 3}, {4, 0}, {5, 4}, {5, 0}, {6, 5}, {6, 0}] == HumanEval.candidate([[1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6], [1, 1, 3, 4, 5, 6], [1, 2, 1, 4, 5, 6], [1, 2, 3, 1, 5, 6], [1, 2, 3, 4, 1, 6], [1, 2, 3, 4, 5, 1]], 1)\n assert [] == HumanEval.candidate([], 1)\n assert [] == HumanEval.candidate([[1]], 2)\n assert [{2, 2}] == HumanEval.candidate([[], [1], [1, 2, 3]], 3)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_88_sort_array", "language": "elixir", "prompt": "# Given a list of non-negative integers, return a coelixir of the given list after sorting,\n# you will sort the given list in ascending order if the sum( first index value, last index value) is odd,\n# or sort it in descending order if the sum( first index value, last index value) is even.\n# Note:\n# * don't change the given list.\n# Examples:\n# >>> HumanEval.sort_array([])\n# []\n# >>> HumanEval.sort_array([5])\n# [5]\n# >>> HumanEval.sort_array([2, 4, 3, 0, 1, 5])\n# [0, 1, 2, 3, 4, 5]\n# >>> HumanEval.sort_array([2, 4, 3, 0, 1, 5, 6])\n# [6, 5, 4, 3, 2, 1, 0]\n\ndefmodule HumanEval do\n def candidate(array), do: sort_array(array)\n def sort_array(array) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_88_sort_array.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sort_array' do\n assert [] == HumanEval.candidate([])\n assert [5] == HumanEval.candidate([5])\n assert [0, 1, 2, 3, 4, 5] == HumanEval.candidate([2, 4, 3, 0, 1, 5])\n assert [6, 5, 4, 3, 2, 1, 0] == HumanEval.candidate([2, 4, 3, 0, 1, 5, 6])\n assert [1, 2] == HumanEval.candidate([2, 1])\n assert [0, 11, 15, 32, 42, 87] == HumanEval.candidate([15, 42, 87, 32, 11, 0])\n assert [23, 21, 14, 11] == HumanEval.candidate([21, 14, 23, 11])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_89_encrypt", "language": "elixir", "prompt": "# Create a function encrypt that takes a string as an argument and\n# returns a string encrypted with the alphabet being rotated. \n# The alphabet should be rotated in a manner such that the letters \n# shift down by two multiplied to two places.\n# For example:\n# >>> HumanEval.encrypt(\"hi\")\n# \"lm\"\n# >>> HumanEval.encrypt(\"asdfghjkl\")\n# \"ewhjklnop\"\n# >>> HumanEval.encrypt(\"gf\")\n# \"kj\"\n# >>> HumanEval.encrypt(\"et\")\n# \"ix\"\n\ndefmodule HumanEval do\n def candidate(s), do: encrypt(s)\n def encrypt(s) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_89_encrypt.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'encrypt' do\n assert \"lm\" == HumanEval.candidate(\"hi\")\n assert \"ewhjklnop\" == HumanEval.candidate(\"asdfghjkl\")\n assert \"kj\" == HumanEval.candidate(\"gf\")\n assert \"ix\" == HumanEval.candidate(\"et\")\n assert \"jeiajeaijeiak\" == HumanEval.candidate(\"faewfawefaewg\")\n assert \"lippsqcjvmirh\" == HumanEval.candidate(\"hellomyfriend\")\n assert \"hbdhpqrmpjylqmpyjlpmlyjrqpmqryjlpmqryjljygyjl\" == HumanEval.candidate(\"dxzdlmnilfuhmilufhlihufnmlimnufhlimnufhfucufh\")\n assert \"e\" == HumanEval.candidate(\"a\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_8_sum_product", "language": "elixir", "prompt": "# For a given list of integers, return a tuple consisting of a sum and a product of all the integers in a list.\n# Empty sum should be equal to 0 and empty product should be equal to 1.\n# >>> HumanEval.sum_product([])\n# {0, 1}\n# >>> HumanEval.sum_product([1, 2, 3, 4])\n# {10, 24}\n\ndefmodule HumanEval do\n def candidate(numbers), do: sum_product(numbers)\n def sum_product(numbers) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_8_sum_product.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sum_product' do\n assert {0, 1} == HumanEval.candidate([])\n assert {3, 1} == HumanEval.candidate([1, 1, 1])\n assert {100, 0} == HumanEval.candidate([100, 0])\n assert {15, 105} == HumanEval.candidate([3, 5, 7])\n assert {10, 10} == HumanEval.candidate([10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_90_next_smallest", "language": "elixir", "prompt": "# You are given a list of integers.\n# Write a function next_smallest() that returns the 2nd smallest element of the list.\n# Return nil if there is no such element.\n# >>> HumanEval.next_smallest([1, 2, 3, 4, 5])\n# 2\n# >>> HumanEval.next_smallest([5, 1, 4, 3, 2])\n# 2\n# >>> HumanEval.next_smallest([])\n# nil\n# >>> HumanEval.next_smallest([1, 1])\n# nil\n\ndefmodule HumanEval do\n def candidate(lst), do: next_smallest(lst)\n def next_smallest(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_90_next_smallest.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'next_smallest' do\n assert 2 == HumanEval.candidate([1, 2, 3, 4, 5])\n assert 2 == HumanEval.candidate([5, 1, 4, 3, 2])\n assert nil == HumanEval.candidate([])\n assert nil == HumanEval.candidate([1, 1])\n assert 1 == HumanEval.candidate([1, 1, 1, 1, 0])\n assert nil == HumanEval.candidate([1, 1])\n assert -35 == HumanEval.candidate([-35, 34, 12, -45])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_91_is_bored", "language": "elixir", "prompt": "# You'll be given a string of words, and your task is to count the number\n# of boredoms. A boredom is a sentence that starts with the word \"I\".\n# Sentences are delimited by '.', '?' or '!'.\n# For example:\n# >>> HumanEval.is_bored(\"Hello world\")\n# 0\n# >>> HumanEval.is_bored(\"The sky is blue. The sun is shining. I love this weather\")\n# 1\n\ndefmodule HumanEval do\n def candidate(S), do: is_bored(S)\n def is_bored(S) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_91_is_bored.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_bored' do\n assert 0 == HumanEval.candidate(\"Hello world\")\n assert 0 == HumanEval.candidate(\"Is the sky blue?\")\n assert 1 == HumanEval.candidate(\"I love It !\")\n assert 0 == HumanEval.candidate(\"bIt\")\n assert 2 == HumanEval.candidate(\"I feel good today. I will be productive. will kill It\")\n assert 0 == HumanEval.candidate(\"You and I are going for a walk\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_92_any_int", "language": "elixir", "prompt": "# Create a function that takes 3 numbers.\n# Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.\n# Returns false in any other cases.\n# Examples\n# >>> HumanEval.any_int(5, 2, 7)\n# true\n# >>> HumanEval.any_int(3, 2, 2)\n# false\n# >>> HumanEval.any_int(3, -2, 1)\n# true\n# >>> HumanEval.any_int(3.6, -2.2, 2)\n# false\n\ndefmodule HumanEval do\n def candidate(x, y, z), do: any_int(x, y, z)\n def any_int(x, y, z) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_92_any_int.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'any_int' do\n assert true == HumanEval.candidate(2, 3, 1)\n assert false == HumanEval.candidate(2.5, 2, 3)\n assert false == HumanEval.candidate(1.5, 5, 3.5)\n assert false == HumanEval.candidate(2, 6, 2)\n assert true == HumanEval.candidate(4, 2, 2)\n assert false == HumanEval.candidate(2.2, 2.2, 2.2)\n assert true == HumanEval.candidate(-4, 6, 2)\n assert true == HumanEval.candidate(2, 1, 1)\n assert true == HumanEval.candidate(3, 4, 7)\n assert false == HumanEval.candidate(3.0, 4, 7)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_93_encode", "language": "elixir", "prompt": "# Write a function that takes a message, and encodes in such a \n# way that it swaps case of all letters, replaces all vowels in \n# the message with the letter that appears 2 places ahead of that \n# vowel in the english alphabet. \n# Assume only letters. \n# Examples:\n# >>> HumanEval.encode(\"test\")\n# \"TGST\"\n# >>> HumanEval.encode(\"This is a message\")\n# \"tHKS KS C MGSSCGG\"\n\ndefmodule HumanEval do\n def candidate(message), do: encode(message)\n def encode(message) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_93_encode.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'encode' do\n assert \"tgst\" == HumanEval.candidate(\"TEST\")\n assert \"mWDCSKR\" == HumanEval.candidate(\"Mudasir\")\n assert \"ygs\" == HumanEval.candidate(\"YES\")\n assert \"tHKS KS C MGSSCGG\" == HumanEval.candidate(\"This is a message\")\n assert \"k dQnT kNqW wHcT Tq wRkTg\" == HumanEval.candidate(\"I DoNt KnOw WhAt tO WrItE\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_94_skjkasdkd", "language": "elixir", "prompt": "# You are given a list of integers.\n# You need to find the largest prime value and return the sum of its digits.\n# Examples:\n# >>> HumanEval.skjkasdkd([0, 3, 2, 1, 3, 5, 7, 4, 5, 5, 5, 2, 181, 32, 4, 32, 3, 2, 32, 324, 4, 3])\n# 10\n# >>> HumanEval.skjkasdkd([1, 0, 1, 8, 2, 4597, 2, 1, 3, 40, 1, 2, 1, 2, 4, 2, 5, 1])\n# 25\n# >>> HumanEval.skjkasdkd([1, 3, 1, 32, 5107, 34, 83278, 109, 163, 23, 2323, 32, 30, 1, 9, 3])\n# 13\n# >>> HumanEval.skjkasdkd([0, 724, 32, 71, 99, 32, 6, 0, 5, 91, 83, 0, 5, 6])\n# 11\n# >>> HumanEval.skjkasdkd([0, 81, 12, 3, 1, 21])\n# 3\n# >>> HumanEval.skjkasdkd([0, 8, 1, 2, 1, 7])\n# 7\n\ndefmodule HumanEval do\n def candidate(lst), do: skjkasdkd(lst)\n def skjkasdkd(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_94_skjkasdkd.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'skjkasdkd' do\n assert 10 == HumanEval.candidate([0, 3, 2, 1, 3, 5, 7, 4, 5, 5, 5, 2, 181, 32, 4, 32, 3, 2, 32, 324, 4, 3])\n assert 25 == HumanEval.candidate([1, 0, 1, 8, 2, 4597, 2, 1, 3, 40, 1, 2, 1, 2, 4, 2, 5, 1])\n assert 13 == HumanEval.candidate([1, 3, 1, 32, 5107, 34, 83278, 109, 163, 23, 2323, 32, 30, 1, 9, 3])\n assert 11 == HumanEval.candidate([0, 724, 32, 71, 99, 32, 6, 0, 5, 91, 83, 0, 5, 6])\n assert 3 == HumanEval.candidate([0, 81, 12, 3, 1, 21])\n assert 7 == HumanEval.candidate([0, 8, 1, 2, 1, 7])\n assert 19 == HumanEval.candidate([8191])\n assert 19 == HumanEval.candidate([8191, 123456, 127, 7])\n assert 10 == HumanEval.candidate([127, 97, 8192])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_95_check_dict_case", "language": "elixir", "prompt": "# Given a map, return true if all keys are strings in lower \n# case or all keys are strings in upper case, else return false.\n# The function should return false is the given map is empty.\n# Examples:\n# >>> HumanEval.check_dict_case(%{\"a\" => \"apple\", \"b\" => \"banana\"})\n# true\n# >>> HumanEval.check_dict_case(%{\"a\" => \"apple\", \"A\" => \"banana\", \"B\" => \"banana\"})\n# false\n# >>> HumanEval.check_dict_case(%{\"a\" => \"apple\", 8 => \"banana\", \"a\" => \"apple\"})\n# false\n# >>> HumanEval.check_dict_case(%{\"Name\" => \"John\", \"Age\" => \"36\", \"City\" => \"Houston\"})\n# false\n# >>> HumanEval.check_dict_case(%{\"STATE\" => \"NC\", \"ZIP\" => \"12345\"})\n# true\n\ndefmodule HumanEval do\n def candidate(dict), do: check_dict_case(dict)\n def check_dict_case(dict) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_95_check_dict_case.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'check_dict_case' do\n assert true == HumanEval.candidate(%{\"p\" => \"pineapple\", \"b\" => \"banana\"})\n assert false == HumanEval.candidate(%{\"p\" => \"pineapple\", \"A\" => \"banana\", \"B\" => \"banana\"})\n assert false == HumanEval.candidate(%{\"p\" => \"pineapple\", \"5\" => \"banana\", \"a\" => \"apple\"})\n assert false == HumanEval.candidate(%{\"Name\" => \"John\", \"Age\" => \"36\", \"City\" => \"Houston\"})\n assert true == HumanEval.candidate(%{\"STATE\" => \"NC\", \"ZIP\" => \"12345\"})\n assert true == HumanEval.candidate(%{\"fruit\" => \"Orange\", \"taste\" => \"Sweet\"})\n assert false == HumanEval.candidate(%{})\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_96_count_up_to", "language": "elixir", "prompt": "# Implement a function that takes an non-negative integer and returns a list of the first n\n# integers that are prime numbers and less than n.\n# for example:\n# >>> HumanEval.count_up_to(5)\n# [2, 3]\n# >>> HumanEval.count_up_to(11)\n# [2, 3, 5, 7]\n# >>> HumanEval.count_up_to(0)\n# []\n# >>> HumanEval.count_up_to(20)\n# [2, 3, 5, 7, 11, 13, 17, 19]\n# >>> HumanEval.count_up_to(1)\n# []\n# >>> HumanEval.count_up_to(18)\n# [2, 3, 5, 7, 11, 13, 17]\n\ndefmodule HumanEval do\n def candidate(n), do: count_up_to(n)\n def count_up_to(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_96_count_up_to.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'count_up_to' do\n assert [2, 3] == HumanEval.candidate(5)\n assert [2, 3, 5] == HumanEval.candidate(6)\n assert [2, 3, 5] == HumanEval.candidate(7)\n assert [2, 3, 5, 7] == HumanEval.candidate(10)\n assert [] == HumanEval.candidate(0)\n assert [2, 3, 5, 7, 11, 13, 17, 19] == HumanEval.candidate(22)\n assert [] == HumanEval.candidate(1)\n assert [2, 3, 5, 7, 11, 13, 17] == HumanEval.candidate(18)\n assert [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43] == HumanEval.candidate(47)\n assert [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97] == HumanEval.candidate(101)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_97_multiply", "language": "elixir", "prompt": "# Complete the function that takes two integers and returns \n# the product of their unit digits.\n# Assume the input is always valid.\n# Examples:\n# >>> HumanEval.multiply(148, 412)\n# 16\n# >>> HumanEval.multiply(19, 28)\n# 72\n# >>> HumanEval.multiply(2020, 1851)\n# 0\n# >>> HumanEval.multiply(14, -15)\n# 20\n\ndefmodule HumanEval do\n def candidate(a, b), do: multiply(a, b)\n def multiply(a, b) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_97_multiply.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'multiply' do\n assert 16 == HumanEval.candidate(148, 412)\n assert 72 == HumanEval.candidate(19, 28)\n assert 0 == HumanEval.candidate(2020, 1851)\n assert 20 == HumanEval.candidate(14, -15)\n assert 42 == HumanEval.candidate(76, 67)\n assert 49 == HumanEval.candidate(17, 27)\n assert 0 == HumanEval.candidate(0, 1)\n assert 0 == HumanEval.candidate(0, 0)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_98_count_upper", "language": "elixir", "prompt": "# Given a string s, count the number of uppercase vowels in even indices.\n# For example:\n# >>> HumanEval.count_upper(\"aBCdEf\")\n# 1\n# >>> HumanEval.count_upper(\"abcdefg\")\n# 0\n# >>> HumanEval.count_upper(\"dBBE\")\n# 0\n\ndefmodule HumanEval do\n def candidate(s), do: count_upper(s)\n def count_upper(s) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_98_count_upper.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'count_upper' do\n assert 1 == HumanEval.candidate(\"aBCdEf\")\n assert 0 == HumanEval.candidate(\"abcdefg\")\n assert 0 == HumanEval.candidate(\"dBBE\")\n assert 0 == HumanEval.candidate(\"B\")\n assert 1 == HumanEval.candidate(\"U\")\n assert 0 == HumanEval.candidate(\"\")\n assert 2 == HumanEval.candidate(\"EEEE\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_99_closest_integer", "language": "elixir", "prompt": "# Create a function that takes a value (string) representing a number\n# and returns the closest integer to it. If the number is equidistant\n# from two integers, round it away from zero.\n# Examples\n# >>> HumanEval.closest_integer(\"10\")\n# 10\n# >>> HumanEval.closest_integer(\"15.3\")\n# 15\n# Note:\n# Rounding away from zero means that if the given number is equidistant\n# from two integers, the one you should return is the one that is the\n# farthest from zero. For example closest_integer(\"14.5\") should\n# return 15 and closest_integer(\"-14.5\") should return -15.\n\ndefmodule HumanEval do\n def candidate(value), do: closest_integer(value)\n def closest_integer(value) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_99_closest_integer.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'closest_integer' do\n assert 10 == HumanEval.candidate(\"10\")\n assert 15 == HumanEval.candidate(\"14.5\")\n assert -16 == HumanEval.candidate(\"-15.5\")\n assert 15 == HumanEval.candidate(\"15.3\")\n assert 0 == HumanEval.candidate(\"0\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_9_rolling_max", "language": "elixir", "prompt": "# From a given list of integers, generate a list of rolling maximum element found until given moment\n# in the sequence.\n# >>> HumanEval.rolling_max([1, 2, 3, 2, 3, 4, 2])\n# [1, 2, 3, 3, 3, 4, 4]\n\ndefmodule HumanEval do\n def candidate(numbers), do: rolling_max(numbers)\n def rolling_max(numbers) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_9_rolling_max.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'rolling_max' do\n assert [] == HumanEval.candidate([])\n assert [1, 2, 3, 4] == HumanEval.candidate([1, 2, 3, 4])\n assert [4, 4, 4, 4] == HumanEval.candidate([4, 3, 2, 1])\n assert [3, 3, 3, 100, 100] == HumanEval.candidate([3, 2, 3, 100, 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} diff --git a/prompts/humaneval-elixir-transform.jsonl b/prompts/humaneval-elixir-transform.jsonl new file mode 100644 index 0000000000..be5a0adeec --- /dev/null +++ b/prompts/humaneval-elixir-transform.jsonl @@ -0,0 +1,161 @@ +{"name": "HumanEval_0_has_close_elements", "language": "elixir", "prompt": "# Check if in given list of numbers, are any two numbers closer to each other than\n# given threshold.\n# >>> HumanEval.has_close_elements([1.0, 2.0, 3.0], 0.5)\n# false\n# >>> HumanEval.has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)\n# true\n\ndefmodule HumanEval do\n def candidate(numbers, threshold), do: has_close_elements(numbers, threshold)\n def has_close_elements(numbers, threshold) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_0_has_close_elements.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'has_close_elements' do\n assert true == HumanEval.candidate([1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3)\n assert false == HumanEval.candidate([1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.05)\n assert true == HumanEval.candidate([1.0, 2.0, 5.9, 4.0, 5.0], 0.95)\n assert false == HumanEval.candidate([1.0, 2.0, 5.9, 4.0, 5.0], 0.8)\n assert true == HumanEval.candidate([1.0, 2.0, 3.0, 4.0, 5.0, 2.0], 0.1)\n assert true == HumanEval.candidate([1.1, 2.2, 3.1, 4.1, 5.1], 1.0)\n assert false == HumanEval.candidate([1.1, 2.2, 3.1, 4.1, 5.1], 0.5)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_100_make_a_pile", "language": "elixir", "prompt": "# Given a positive integer n, you have to make a pile of n levels of stones.\n# The first level has n stones.\n# The number of stones in the next level is:\n# - the next odd number if n is odd.\n# - the next even number if n is even.\n# Return the number of stones in each level in a list, where element at index\n# i represents the number of stones in the level (i+1).\n# Examples:\n# >>> HumanEval.make_a_pile(3)\n# [3, 5, 7]\n\ndefmodule HumanEval do\n def candidate(n), do: make_a_pile(n)\n def make_a_pile(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_100_make_a_pile.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'make_a_pile' do\n assert [3, 5, 7] == HumanEval.candidate(3)\n assert [4, 6, 8, 10] == HumanEval.candidate(4)\n assert [5, 7, 9, 11, 13] == HumanEval.candidate(5)\n assert [6, 8, 10, 12, 14, 16] == HumanEval.candidate(6)\n assert [8, 10, 12, 14, 16, 18, 20, 22] == HumanEval.candidate(8)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_101_words_string", "language": "elixir", "prompt": "# You will be given a string of words separated by commas or spaces. Your task is\n# to split the string into words and return an array of the words.\n# For example:\n# >>> HumanEval.words_string(\"Hi, my name is John\")\n# [\"Hi\", \"my\", \"name\", \"is\", \"John\"]\n# >>> HumanEval.words_string(\"One, two, three, four, five, six\")\n# [\"One\", \"two\", \"three\", \"four\", \"five\", \"six\"]\n\ndefmodule HumanEval do\n def candidate(s), do: words_string(s)\n def words_string(s) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_101_words_string.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'words_string' do\n assert [\"Hi\", \"my\", \"name\", \"is\", \"John\"] == HumanEval.candidate(\"Hi, my name is John\")\n assert [\"One\", \"two\", \"three\", \"four\", \"five\", \"six\"] == HumanEval.candidate(\"One, two, three, four, five, six\")\n assert [\"Hi\", \"my\", \"name\"] == HumanEval.candidate(\"Hi, my name\")\n assert [\"One\", \"two\", \"three\", \"four\", \"five\", \"six\"] == HumanEval.candidate(\"One,, two, three, four, five, six,\")\n assert [] == HumanEval.candidate(\"\")\n assert [\"ahmed\", \"gamal\"] == HumanEval.candidate(\"ahmed , gamal\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_102_choose_num", "language": "elixir", "prompt": "# This function takes two positive numbers x and y and returns the\n# biggest even integer number that is in the range [x, y] inclusive. If \n# there's no such number, then the function should return -1.\n# For example:\n# >>> HumanEval.choose_num(12, 15)\n# 14\n# >>> HumanEval.choose_num(13, 12)\n# -1\n\ndefmodule HumanEval do\n def candidate(x, y), do: choose_num(x, y)\n def choose_num(x, y) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_102_choose_num.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'choose_num' do\n assert 14 == HumanEval.candidate(12, 15)\n assert -1 == HumanEval.candidate(13, 12)\n assert 12354 == HumanEval.candidate(33, 12354)\n assert -1 == HumanEval.candidate(5234, 5233)\n assert 28 == HumanEval.candidate(6, 29)\n assert -1 == HumanEval.candidate(27, 10)\n assert -1 == HumanEval.candidate(7, 7)\n assert 546 == HumanEval.candidate(546, 546)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_103_rounded_avg", "language": "elixir", "prompt": "# You are given two positive integers n and m, and your task is to compute the\n# average of the integers from n through m (including n and m). \n# Round the answer to the nearest integer and convert that to binary.\n# If n is greater than m, return -1.\n# Example:\n# >>> HumanEval.rounded_avg(1, 5)\n# \"0b11\"\n# >>> HumanEval.rounded_avg(7, 5)\n# -1\n# >>> HumanEval.rounded_avg(10, 20)\n# \"0b1111\"\n# >>> HumanEval.rounded_avg(20, 33)\n# \"0b11010\"\n\ndefmodule HumanEval do\n def candidate(n, m), do: rounded_avg(n, m)\n def rounded_avg(n, m) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_103_rounded_avg.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'rounded_avg' do\n assert \"0b11\" == HumanEval.candidate(1, 5)\n assert \"0b1010\" == HumanEval.candidate(7, 13)\n assert \"0b1111001010\" == HumanEval.candidate(964, 977)\n assert \"0b1111100100\" == HumanEval.candidate(996, 997)\n assert \"0b1011000010\" == HumanEval.candidate(560, 851)\n assert \"0b101101110\" == HumanEval.candidate(185, 546)\n assert \"0b110101101\" == HumanEval.candidate(362, 496)\n assert \"0b1001110010\" == HumanEval.candidate(350, 902)\n assert \"0b11010111\" == HumanEval.candidate(197, 233)\n assert -1 == HumanEval.candidate(7, 5)\n assert -1 == HumanEval.candidate(5, 1)\n assert \"0b101\" == HumanEval.candidate(5, 5)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_104_unique_digits", "language": "elixir", "prompt": "# Given a list of positive integers x. return a sorted list of all \n# elements that hasn't any even digit.\n# Note: Returned list should be sorted in increasing order.\n# For example:\n# >>> HumanEval.unique_digits([15, 33, 1422, 1])\n# [1, 15, 33]\n# >>> HumanEval.unique_digits([152, 323, 1422, 10])\n# []\n\ndefmodule HumanEval do\n def candidate(x), do: unique_digits(x)\n def unique_digits(x) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_104_unique_digits.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'unique_digits' do\n assert [1, 15, 33] == HumanEval.candidate([15, 33, 1422, 1])\n assert [] == HumanEval.candidate([152, 323, 1422, 10])\n assert [111, 151] == HumanEval.candidate([12345, 2033, 111, 151])\n assert [31, 135] == HumanEval.candidate([135, 103, 31])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_105_by_length", "language": "elixir", "prompt": "# Given an array of integers, sort the integers that are between 1 and 9 inclusive,\n# reverse the resulting array, and then replace each digit by its corresponding name from\n# \"One\", \"Two\", \"Three\", \"Four\", \"Five\", \"Six\", \"Seven\", \"Eight\", \"Nine\".\n# For example:\n# >>> HumanEval.by_length([2, 1, 1, 4, 5, 8, 2, 3])\n# [\"Eight\", \"Five\", \"Four\", \"Three\", \"Two\", \"Two\", \"One\", \"One\"]\n# If the array is empty, return an empty array:\n# >>> HumanEval.by_length([])\n# []\n# If the array has any strange number ignore it:\n# >>> HumanEval.by_length([1, -1, 55])\n# [\"One\"]\n\ndefmodule HumanEval do\n def candidate(arr), do: by_length(arr)\n def by_length(arr) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_105_by_length.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'by_length' do\n assert [\"Eight\", \"Five\", \"Four\", \"Three\", \"Two\", \"Two\", \"One\", \"One\"] == HumanEval.candidate([2, 1, 1, 4, 5, 8, 2, 3])\n assert [] == HumanEval.candidate([])\n assert [\"One\"] == HumanEval.candidate([1, -1, 55])\n assert [\"Three\", \"Two\", \"One\"] == HumanEval.candidate([1, -1, 3, 2])\n assert [\"Nine\", \"Eight\", \"Four\"] == HumanEval.candidate([9, 4, 8])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_106_f", "language": "elixir", "prompt": "# Implement the function f that takes n as a parameter,\n# and returns a list of size n, such that the value of the element at index i is the factorial of i if i is even\n# or the sum of numbers from 1 to i otherwise.\n# i starts from 1.\n# the factorial of i is the multiplication of the numbers from 1 to i (1 * 2 * ... * i).\n# Example:\n# >>> HumanEval.f(5)\n# [1, 2, 6, 24, 15]\n\ndefmodule HumanEval do\n def candidate(n), do: f(n)\n def f(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_106_f.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'f' do\n assert [1, 2, 6, 24, 15] == HumanEval.candidate(5)\n assert [1, 2, 6, 24, 15, 720, 28] == HumanEval.candidate(7)\n assert [1] == HumanEval.candidate(1)\n assert [1, 2, 6] == HumanEval.candidate(3)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_107_even_odd_palindrome", "language": "elixir", "prompt": "# Given a positive integer n, return a tuple that has the number of even and odd\n# integer palindromes that fall within the range(1, n), inclusive.\n# Example 1:\n# >>> HumanEval.even_odd_palindrome(3)\n# {1, 2}\n# Explanation:\n# Integer palindrome are 1, 2, 3. one of them is even, and two of them are odd.\n# Example 2:\n# >>> HumanEval.even_odd_palindrome(12)\n# {4, 6}\n# Explanation:\n# Integer palindrome are 1, 2, 3, 4, 5, 6, 7, 8, 9, 11. four of them are even, and 6 of them are odd.\n# Note:\n# 1. 1 <= n <= 10^3\n# 2. returned tuple has the number of even and odd integer palindromes respectively.\n\ndefmodule HumanEval do\n def candidate(n), do: even_odd_palindrome(n)\n def even_odd_palindrome(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_107_even_odd_palindrome.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'even_odd_palindrome' do\n assert {8, 13} == HumanEval.candidate(123)\n assert {4, 6} == HumanEval.candidate(12)\n assert {1, 2} == HumanEval.candidate(3)\n assert {6, 8} == HumanEval.candidate(63)\n assert {5, 6} == HumanEval.candidate(25)\n assert {4, 6} == HumanEval.candidate(19)\n assert {4, 5} == HumanEval.candidate(9)\n assert {0, 1} == HumanEval.candidate(1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_108_count_nums", "language": "elixir", "prompt": "# Write a function count_nums which takes an array of integers and returns\n# the number of elements which has a sum of digits > 0.\n# If a number is negative, then its first signed digit will be negative:\n# e.g. -123 has signed digits -1, 2, and 3.\n# >>> HumanEval.count_nums([])\n# 0\n# >>> HumanEval.count_nums([-1, 11, -11])\n# 1\n# >>> HumanEval.count_nums([1, 1, 2])\n# 3\n\ndefmodule HumanEval do\n def candidate(arr), do: count_nums(arr)\n def count_nums(arr) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_108_count_nums.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'count_nums' do\n assert 0 == HumanEval.candidate([])\n assert 0 == HumanEval.candidate([-1, -2, 0])\n assert 6 == HumanEval.candidate([1, 1, 2, -2, 3, 4, 5])\n assert 5 == HumanEval.candidate([1, 6, 9, -6, 0, 1, 5])\n assert 4 == HumanEval.candidate([1, 100, 98, -7, 1, -1])\n assert 5 == HumanEval.candidate([12, 23, 34, -45, -56, 0])\n assert 1 == HumanEval.candidate([0, 1])\n assert 1 == HumanEval.candidate([1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_109_move_one_ball", "language": "elixir", "prompt": "# We have an array 'arr' of N integers arr[1], arr[2], ..., arr[N].The\n# numbers in the array will be randomly ordered. Your task is to determine if\n# it is possible to get an array sorted in non-decreasing order by performing \n# the following operation on the given array:\n# You are allowed to perform right shift operation any number of times.\n# One right shift operation means shifting all elements of the array by one\n# position in the right direction. The last element of the array will be moved to\n# the starting position in the array i.e. 0th index. \n# If it is possible to obtain the sorted array by performing the above operation\n# then return True else return False.\n# If the given array is empty then return True.\n# Note: The given list is guaranteed to have unique elements.\n# For Example:\n# >>> HumanEval.move_one_ball([3, 4, 5, 1, 2])\n# true\n# Explanation: By performin 2 right shift operations, non-decreasing order can\n# be achieved for the given array.\n# >>> HumanEval.move_one_ball([3, 5, 4, 1, 2])\n# false\n# Explanation:It is not possible to get non-decreasing order for the given\n# array by performing any number of right shift operations.\n\ndefmodule HumanEval do\n def candidate(arr), do: move_one_ball(arr)\n def move_one_ball(arr) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_109_move_one_ball.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'move_one_ball' do\n assert true == HumanEval.candidate([3, 4, 5, 1, 2])\n assert true == HumanEval.candidate([3, 5, 10, 1, 2])\n assert false == HumanEval.candidate([4, 3, 1, 2])\n assert false == HumanEval.candidate([3, 5, 4, 1, 2])\n assert true == HumanEval.candidate([])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_10_make_palindrome", "language": "elixir", "prompt": "# Find the shortest palindrome that begins with a supplied string.\n# Algorithm idea is simple:\n# - Find the longest postfix of supplied string that is a palindrome.\n# - Append to the end of the string reverse of a string prefix that comes before the palindromic suffix.\n# >>> HumanEval.make_palindrome(\"\")\n# \"\"\n# >>> HumanEval.make_palindrome(\"cat\")\n# \"catac\"\n# >>> HumanEval.make_palindrome(\"cata\")\n# \"catac\"\n\ndefmodule HumanEval do\n def candidate(string), do: make_palindrome(string)\n def make_palindrome(string) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_10_make_palindrome.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'make_palindrome' do\n assert \"\" == HumanEval.candidate(\"\")\n assert \"x\" == HumanEval.candidate(\"x\")\n assert \"xyzyx\" == HumanEval.candidate(\"xyz\")\n assert \"xyx\" == HumanEval.candidate(\"xyx\")\n assert \"jerryrrej\" == HumanEval.candidate(\"jerry\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_110_exchange", "language": "elixir", "prompt": "# In this problem, you will implement a function that takes two lists of numbers,\n# and determines whether it is possible to perform an exchange of elements\n# between them to make lst1 a list of only even numbers.\n# There is no limit on the number of exchanged elements between lst1 and lst2.\n# If it is possible to exchange elements between the lst1 and lst2 to make\n# all the elements of lst1 to be even, return \"YES\".\n# Otherwise, return \"NO\".\n# For example:\n# >>> HumanEval.exchange([1, 2, 3, 4], [1, 2, 3, 4])\n# \"YES\"\n# >>> HumanEval.exchange([1, 2, 3, 4], [1, 5, 3, 4])\n# \"NO\"\n# It is assumed that the input lists will be non-empty.\n\ndefmodule HumanEval do\n def candidate(lst1, lst2), do: exchange(lst1, lst2)\n def exchange(lst1, lst2) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_110_exchange.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'exchange' do\n assert \"YES\" == HumanEval.candidate([1, 2, 3, 4], [1, 2, 3, 4])\n assert \"NO\" == HumanEval.candidate([1, 2, 3, 4], [1, 5, 3, 4])\n assert \"YES\" == HumanEval.candidate([1, 2, 3, 4], [2, 1, 4, 3])\n assert \"YES\" == HumanEval.candidate([5, 7, 3], [2, 6, 4])\n assert \"NO\" == HumanEval.candidate([5, 7, 3], [2, 6, 3])\n assert \"NO\" == HumanEval.candidate([3, 2, 6, 1, 8, 9], [3, 5, 5, 1, 1, 1])\n assert \"YES\" == HumanEval.candidate([100, 200], [200, 200])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_111_histogram", "language": "elixir", "prompt": "# Given a string representing a space separated lowercase letters, return a dictionary\n# of the letter with the most repetition and containing the corresponding count.\n# If several letters have the same occurrence, return all of them.\n# Example:\n# >>> HumanEval.histogram(\"a b c\")\n# %{\"a\" => 1, \"b\" => 1, \"c\" => 1}\n# >>> HumanEval.histogram(\"a b b a\")\n# %{\"a\" => 2, \"b\" => 2}\n# >>> HumanEval.histogram(\"a b c a b\")\n# %{\"a\" => 2, \"b\" => 2}\n# >>> HumanEval.histogram(\"b b b b a\")\n# %{\"b\" => 4}\n# >>> HumanEval.histogram(\"\")\n# %{}\n\ndefmodule HumanEval do\n def candidate(test), do: histogram(test)\n def histogram(test) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_111_histogram.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'histogram' do\n assert %{\"a\" => 2, \"b\" => 2} == HumanEval.candidate(\"a b b a\")\n assert %{\"a\" => 2, \"b\" => 2} == HumanEval.candidate(\"a b c a b\")\n assert %{\"a\" => 1, \"b\" => 1, \"c\" => 1, \"d\" => 1, \"g\" => 1} == HumanEval.candidate(\"a b c d g\")\n assert %{\"r\" => 1, \"t\" => 1, \"g\" => 1} == HumanEval.candidate(\"r t g\")\n assert %{\"b\" => 4} == HumanEval.candidate(\"b b b b a\")\n assert %{\"r\" => 1, \"t\" => 1, \"g\" => 1} == HumanEval.candidate(\"r t g\")\n assert %{} == HumanEval.candidate(\"\")\n assert %{\"a\" => 1} == HumanEval.candidate(\"a\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_112_reverse_delete", "language": "elixir", "prompt": "# Task\n# We are given two strings s and c, you have to deleted all the characters in s that are equal to any character in c\n# then check if the result string is palindrome.\n# A string is called palindrome if it reads the same backward as forward.\n# You should return a tuple containing the result string and True/False for the check.\n# Example\n# >>> HumanEval.reverse_delete(\"abcde\", \"ae\")\n# {\"bcd\", false}\n# >>> HumanEval.reverse_delete(\"abcdef\", \"b\")\n# {\"acdef\", false}\n# >>> HumanEval.reverse_delete(\"abcdedcba\", \"ab\")\n# {\"cdedc\", true}\n\ndefmodule HumanEval do\n def candidate(s, c), do: reverse_delete(s, c)\n def reverse_delete(s, c) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_112_reverse_delete.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'reverse_delete' do\n assert {\"bcd\", false} == HumanEval.candidate(\"abcde\", \"ae\")\n assert {\"acdef\", false} == HumanEval.candidate(\"abcdef\", \"b\")\n assert {\"cdedc\", true} == HumanEval.candidate(\"abcdedcba\", \"ab\")\n assert {\"dik\", false} == HumanEval.candidate(\"dwik\", \"w\")\n assert {\"\", true} == HumanEval.candidate(\"a\", \"a\")\n assert {\"abcdedcba\", true} == HumanEval.candidate(\"abcdedcba\", \"\")\n assert {\"abcdedcba\", true} == HumanEval.candidate(\"abcdedcba\", \"v\")\n assert {\"abba\", true} == HumanEval.candidate(\"vabba\", \"v\")\n assert {\"\", true} == HumanEval.candidate(\"mamma\", \"mia\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_113_odd_count", "language": "elixir", "prompt": "# Given a list of strings, where each string consists of only digits, return a list.\n# Each element i of the output should be \"the number of odd elements in the\n# string i of the input.\" where all the i's should be replaced by the number\n# of odd digits in the i'th string of the input.\n# >>> HumanEval.odd_count([\"1234567\"])\n# [\"the number of odd elements 4n the str4ng 4 of the 4nput.\"]\n# >>> HumanEval.odd_count([\"3\", \"11111111\"])\n# [\"the number of odd elements 1n the str1ng 1 of the 1nput.\", \"the number of odd elements 8n the str8ng 8 of the 8nput.\"]\n\ndefmodule HumanEval do\n def candidate(lst), do: odd_count(lst)\n def odd_count(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_113_odd_count.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'odd_count' do\n assert [\"the number of odd elements 4n the str4ng 4 of the 4nput.\"] == HumanEval.candidate([\"1234567\"])\n assert [\"the number of odd elements 1n the str1ng 1 of the 1nput.\", \"the number of odd elements 8n the str8ng 8 of the 8nput.\"] == HumanEval.candidate([\"3\", \"11111111\"])\n assert [\"the number of odd elements 2n the str2ng 2 of the 2nput.\", \"the number of odd elements 3n the str3ng 3 of the 3nput.\", \"the number of odd elements 2n the str2ng 2 of the 2nput.\"] == HumanEval.candidate([\"271\", \"137\", \"314\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_114_minSubArraySum", "language": "elixir", "prompt": "# Given an array of integers nums, find the minimum sum of any non-empty sub-array\n# of nums.\n# Example\n# >>> HumanEval.minSubArraySum([2, 3, 4, 1, 2, 4])\n# 1\n# >>> HumanEval.minSubArraySum([-1, -2, -3])\n# -6\n\ndefmodule HumanEval do\n def candidate(nums), do: minSubArraySum(nums)\n def minSubArraySum(nums) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_114_minSubArraySum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'minSubArraySum' do\n assert 1 == HumanEval.candidate([2, 3, 4, 1, 2, 4])\n assert -6 == HumanEval.candidate([-1, -2, -3])\n assert -14 == HumanEval.candidate([-1, -2, -3, 2, -10])\n assert -9999999999999999 == HumanEval.candidate([-9999999999999999])\n assert 0 == HumanEval.candidate([0, 10, 20, 1000000])\n assert -6 == HumanEval.candidate([-1, -2, -3, 10, -5])\n assert -6 == HumanEval.candidate([100, -1, -2, -3, 10, -5])\n assert 3 == HumanEval.candidate([10, 11, 13, 8, 3, 4])\n assert -33 == HumanEval.candidate([100, -33, 32, -1, 0, -2])\n assert -10 == HumanEval.candidate([-10])\n assert 7 == HumanEval.candidate([7])\n assert -1 == HumanEval.candidate([1, -1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_115_max_fill", "language": "elixir", "prompt": "# You are given a rectangular grid of wells. Each row represents a single well,\n# and each 1 in a row represents a single unit of water.\n# Each well has a corresponding bucket that can be used to extract water from it, \n# and all buckets have the same capacity.\n# Your task is to use the buckets to empty the wells.\n# Output the number of times you need to lower the buckets.\n# Example 1:\n# >>> HumanEval.max_fill([[0, 0, 1, 0], [0, 1, 0, 0], [1, 1, 1, 1]], 1)\n# 6\n# Example 2:\n# >>> HumanEval.max_fill([[0, 0, 1, 1], [0, 0, 0, 0], [1, 1, 1, 1], [0, 1, 1, 1]], 2)\n# 5\n# Example 3:\n# >>> HumanEval.max_fill([[0, 0, 0], [0, 0, 0]], 5)\n# 0\n# Constraints:\n# * all wells have the same length\n# * 1 <= grid.length <= 10^2\n# * 1 <= grid[:,1].length <= 10^2\n# * grid[i][j] -> 0 | 1\n# * 1 <= capacity <= 10\n\ndefmodule HumanEval do\n def candidate(grid, capacity), do: max_fill(grid, capacity)\n def max_fill(grid, capacity) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_115_max_fill.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'max_fill' do\n assert 6 == HumanEval.candidate([[0, 0, 1, 0], [0, 1, 0, 0], [1, 1, 1, 1]], 1)\n assert 5 == HumanEval.candidate([[0, 0, 1, 1], [0, 0, 0, 0], [1, 1, 1, 1], [0, 1, 1, 1]], 2)\n assert 0 == HumanEval.candidate([[0, 0, 0], [0, 0, 0]], 5)\n assert 4 == HumanEval.candidate([[1, 1, 1, 1], [1, 1, 1, 1]], 2)\n assert 2 == HumanEval.candidate([[1, 1, 1, 1], [1, 1, 1, 1]], 9)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_116_sort_array", "language": "elixir", "prompt": "# In this Kata, you have to sort an array of non-negative integers according to\n# number of ones in their binary representation in ascending order.\n# For similar number of ones, sort based on decimal value.\n# It must be implemented like this:\n# >>> HumanEval.sort_array([1, 5, 2, 3, 4])\n# [1, 2, 3, 4, 5]\n# >>> HumanEval.sort_array([-2, -3, -4, -5, -6])\n# [-6, -5, -4, -3, -2]\n# >>> HumanEval.sort_array([1, 0, 2, 3, 4])\n# [0, 1, 2, 3, 4]\n\ndefmodule HumanEval do\n def candidate(arr), do: sort_array(arr)\n def sort_array(arr) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_116_sort_array.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sort_array' do\n assert [1, 2, 4, 3, 5] == HumanEval.candidate([1, 5, 2, 3, 4])\n assert [-4, -2, -6, -5, -3] == HumanEval.candidate([-2, -3, -4, -5, -6])\n assert [0, 1, 2, 4, 3] == HumanEval.candidate([1, 0, 2, 3, 4])\n assert [] == HumanEval.candidate([])\n assert [2, 2, 4, 4, 3, 3, 5, 5, 5, 7, 77] == HumanEval.candidate([2, 5, 77, 4, 5, 3, 5, 7, 2, 3, 4])\n assert [32, 3, 5, 6, 12, 44] == HumanEval.candidate([3, 6, 44, 12, 32, 5])\n assert [2, 4, 8, 16, 32] == HumanEval.candidate([2, 4, 8, 16, 32])\n assert [2, 4, 8, 16, 32] == HumanEval.candidate([2, 4, 8, 16, 32])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_117_select_words", "language": "elixir", "prompt": "# Given a string s and a natural number n, you have been tasked to implement \n# a function that returns a list of all words from string s that contain exactly \n# n consonants, in order these words appear in the string s.\n# If the string s is empty then the function should return an empty list.\n# Note: you may assume the input string contains only letters and spaces.\n# Examples:\n# >>> HumanEval.select_words(\"Mary had a little lamb\", 4)\n# [\"little\"]\n# >>> HumanEval.select_words(\"Mary had a little lamb\", 3)\n# [\"Mary\", \"lamb\"]\n# >>> HumanEval.select_words(\"simple white space\", 2)\n# []\n# >>> HumanEval.select_words(\"Hello world\", 4)\n# [\"world\"]\n# >>> HumanEval.select_words(\"Uncle sam\", 3)\n# [\"Uncle\"]\n\ndefmodule HumanEval do\n def candidate(s, n), do: select_words(s, n)\n def select_words(s, n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_117_select_words.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'select_words' do\n assert [\"little\"] == HumanEval.candidate(\"Mary had a little lamb\", 4)\n assert [\"Mary\", \"lamb\"] == HumanEval.candidate(\"Mary had a little lamb\", 3)\n assert [] == HumanEval.candidate(\"simple white space\", 2)\n assert [\"world\"] == HumanEval.candidate(\"Hello world\", 4)\n assert [\"Uncle\"] == HumanEval.candidate(\"Uncle sam\", 3)\n assert [] == HumanEval.candidate(\"\", 4)\n assert [\"b\", \"c\", \"d\", \"f\"] == HumanEval.candidate(\"a b c d e f\", 1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_118_get_closest_vowel", "language": "elixir", "prompt": "# You are given a word. Your task is to find the closest vowel that stands between \n# two consonants from the right side of the word (case sensitive).\n# Vowels in the beginning and ending doesn't count. Return empty string if you didn't\n# find any vowel met the above condition. \n# You may assume that the given string contains English letter only.\n# Example:\n# >>> HumanEval.get_closest_vowel(\"yogurt\")\n# \"u\"\n# >>> HumanEval.get_closest_vowel(\"FULL\")\n# \"U\"\n# >>> HumanEval.get_closest_vowel(\"quick\")\n# \"\"\n# >>> HumanEval.get_closest_vowel(\"ab\")\n# \"\"\n\ndefmodule HumanEval do\n def candidate(word), do: get_closest_vowel(word)\n def get_closest_vowel(word) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_118_get_closest_vowel.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'get_closest_vowel' do\n assert \"u\" == HumanEval.candidate(\"yogurt\")\n assert \"u\" == HumanEval.candidate(\"full\")\n assert \"\" == HumanEval.candidate(\"easy\")\n assert \"\" == HumanEval.candidate(\"eAsy\")\n assert \"\" == HumanEval.candidate(\"ali\")\n assert \"a\" == HumanEval.candidate(\"bad\")\n assert \"o\" == HumanEval.candidate(\"most\")\n assert \"\" == HumanEval.candidate(\"ab\")\n assert \"\" == HumanEval.candidate(\"ba\")\n assert \"\" == HumanEval.candidate(\"quick\")\n assert \"i\" == HumanEval.candidate(\"anime\")\n assert \"\" == HumanEval.candidate(\"Asia\")\n assert \"o\" == HumanEval.candidate(\"Above\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_119_match_parens", "language": "elixir", "prompt": "# You are given a list of two strings, both strings consist of open\n# parentheses '(' or close parentheses ')' only.\n# Your job is to check if it is possible to concatenate the two strings in\n# some order, that the resulting string will be good.\n# A string S is considered to be good if and only if all parentheses in S\n# are balanced. For example: the string '(())()' is good, while the string\n# '())' is not.\n# Return 'Yes' if there's a way to make a good string, and return 'No' otherwise.\n# Examples:\n# >>> HumanEval.match_parens([\"()(\", \")\"])\n# \"Yes\"\n# >>> HumanEval.match_parens([\")\", \")\"])\n# \"No\"\n\ndefmodule HumanEval do\n def candidate(lst), do: match_parens(lst)\n def match_parens(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_119_match_parens.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'match_parens' do\n assert \"Yes\" == HumanEval.candidate([\"()(\", \")\"])\n assert \"No\" == HumanEval.candidate([\")\", \")\"])\n assert \"No\" == HumanEval.candidate([\"(()(())\", \"())())\"])\n assert \"Yes\" == HumanEval.candidate([\")())\", \"(()()(\"])\n assert \"Yes\" == HumanEval.candidate([\"(())))\", \"(()())((\"])\n assert \"No\" == HumanEval.candidate([\"()\", \"())\"])\n assert \"Yes\" == HumanEval.candidate([\"(()(\", \"()))()\"])\n assert \"No\" == HumanEval.candidate([\"((((\", \"((())\"])\n assert \"No\" == HumanEval.candidate([\")(()\", \"(()(\"])\n assert \"No\" == HumanEval.candidate([\")(\", \")(\"])\n assert \"Yes\" == HumanEval.candidate([\"(\", \")\"])\n assert \"Yes\" == HumanEval.candidate([\")\", \"(\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_11_string_xor", "language": "elixir", "prompt": "# Input are two strings a and b consisting only of 1s and 0s.\n# Perform binary XOR on these inputs and return result also as a string.\n# >>> HumanEval.string_xor(\"010\", \"110\")\n# \"100\"\n\ndefmodule HumanEval do\n def candidate(a, b), do: string_xor(a, b)\n def string_xor(a, b) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_11_string_xor.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'string_xor' do\n assert \"010010\" == HumanEval.candidate(\"111000\", \"101010\")\n assert \"0\" == HumanEval.candidate(\"1\", \"1\")\n assert \"0101\" == HumanEval.candidate(\"0101\", \"0000\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_120_maximum", "language": "elixir", "prompt": "# Given an array arr of integers and a positive integer k, return a sorted list \n# of length k with the maximum k numbers in arr.\n# Example 1:\n# >>> HumanEval.maximum([-3, -4, 5], 3)\n# [-4, -3, 5]\n# Example 2:\n# >>> HumanEval.maximum([4, -4, 4], 2)\n# [4, 4]\n# Example 3:\n# >>> HumanEval.maximum([-3, 2, 1, 2, -1, -2, 1], 1)\n# [2]\n# Note:\n# 1. The length of the array will be in the range of [1, 1000].\n# 2. The elements in the array will be in the range of [-1000, 1000].\n# 3. 0 <= k <= len(arr)\n\ndefmodule HumanEval do\n def candidate(arr, k), do: maximum(arr, k)\n def maximum(arr, k) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_120_maximum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'maximum' do\n assert [-4, -3, 5] == HumanEval.candidate([-3, -4, 5], 3)\n assert [4, 4] == HumanEval.candidate([4, -4, 4], 2)\n assert [2] == HumanEval.candidate([-3, 2, 1, 2, -1, -2, 1], 1)\n assert [2, 20, 123] == HumanEval.candidate([123, -123, 20, 0, 1, 2, -3], 3)\n assert [0, 1, 2, 20] == HumanEval.candidate([-123, 20, 0, 1, 2, -3], 4)\n assert [-13, -8, 0, 0, 3, 5, 15] == HumanEval.candidate([5, 15, 0, 3, -13, -8, 0], 7)\n assert [3, 5] == HumanEval.candidate([-1, 0, 2, 5, 3, -10], 2)\n assert [5] == HumanEval.candidate([1, 0, 5, -7], 1)\n assert [-4, 4] == HumanEval.candidate([4, -4], 2)\n assert [-10, 10] == HumanEval.candidate([-10, 10], 2)\n assert [] == HumanEval.candidate([1, 2, 3, -23, 243, -400, 0], 0)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_121_solution", "language": "elixir", "prompt": "# Given a non-empty list of integers, return the sum of all of the odd elements that are in even positions.\n# Examples\n# >>> HumanEval.solution([5, 8, 7, 1])\n# 12\n# >>> HumanEval.solution([3, 3, 3, 3, 3])\n# 9\n# >>> HumanEval.solution([30, 13, 24, 321])\n# 0\n\ndefmodule HumanEval do\n def candidate(lst), do: solution(lst)\n def solution(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_121_solution.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'solution' do\n assert 12 == HumanEval.candidate([5, 8, 7, 1])\n assert 9 == HumanEval.candidate([3, 3, 3, 3, 3])\n assert 0 == HumanEval.candidate([30, 13, 24, 321])\n assert 5 == HumanEval.candidate([5, 9])\n assert 0 == HumanEval.candidate([2, 4, 8])\n assert 23 == HumanEval.candidate([30, 13, 23, 32])\n assert 3 == HumanEval.candidate([3, 13, 2, 9])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_122_add_elements", "language": "elixir", "prompt": "# Given a non-empty array of integers arr and an integer k, return\n# the sum of the elements with at most two digits from the first k elements of arr.\n# Example:\n# >>> HumanEval.add_elements([111, 21, 3, 4000, 5, 6, 7, 8, 9], 4)\n# 24\n# Constraints:\n# 1. 1 <= len(arr) <= 100\n# 2. 1 <= k <= len(arr)\n\ndefmodule HumanEval do\n def candidate(arr, k), do: add_elements(arr, k)\n def add_elements(arr, k) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_122_add_elements.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'add_elements' do\n assert -4 == HumanEval.candidate([1, -2, -3, 41, 57, 76, 87, 88, 99], 3)\n assert 0 == HumanEval.candidate([111, 121, 3, 4000, 5, 6], 2)\n assert 125 == HumanEval.candidate([11, 21, 3, 90, 5, 6, 7, 8, 9], 4)\n assert 24 == HumanEval.candidate([111, 21, 3, 4000, 5, 6, 7, 8, 9], 4)\n assert 1 == HumanEval.candidate([1], 1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_123_get_odd_collatz", "language": "elixir", "prompt": "# Given a positive integer n, return a sorted list that has the odd numbers in collatz sequence.\n# The Collatz conjecture is a conjecture in mathematics that concerns a sequence defined\n# as follows: start with any positive integer n. Then each term is obtained from the \n# previous term as follows: if the previous term is even, the next term is one half of \n# the previous term. If the previous term is odd, the next term is 3 times the previous\n# term plus 1. The conjecture is that no matter what value of n, the sequence will always reach 1.\n# Note: \n# 1. Collatz(1) is [1].\n# 2. returned list sorted in increasing order.\n# For example:\n# get_odd_collatz(5) returns [1, 5] # The collatz sequence for 5 is [5, 16, 8, 4, 2, 1], so the odd numbers are only 1, and 5.\n# >>> HumanEval.get_odd_collatz(5)\n# [1, 5]\n\ndefmodule HumanEval do\n def candidate(n), do: get_odd_collatz(n)\n def get_odd_collatz(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_123_get_odd_collatz.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'get_odd_collatz' do\n assert [1, 5, 7, 11, 13, 17] == HumanEval.candidate(14)\n assert [1, 5] == HumanEval.candidate(5)\n assert [1, 3, 5] == HumanEval.candidate(12)\n assert [1] == HumanEval.candidate(1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_124_valid_date", "language": "elixir", "prompt": "# You have to write a function which validates a given date string and\n# returns True if the date is valid otherwise False.\n# The date is valid if all of the following rules are satisfied:\n# 1. The date string is not empty.\n# 2. The number of days is not less than 1 or higher than 31 days for months 1,3,5,7,8,10,12. And the number of days is not less than 1 or higher than 30 days for months 4,6,9,11. And, the number of days is not less than 1 or higher than 29 for the month 2.\n# 3. The months should not be less than 1 or higher than 12.\n# 4. The date should be in the format: mm-dd-yyyy\n# >>> HumanEval.valid_date(\"03-11-2000\")\n# true\n# >>> HumanEval.valid_date(\"15-01-2012\")\n# false\n# >>> HumanEval.valid_date(\"04-0-2040\")\n# false\n# >>> HumanEval.valid_date(\"06-04-2020\")\n# true\n# >>> HumanEval.valid_date(\"06/04/2020\")\n# false\n\ndefmodule HumanEval do\n def candidate(date), do: valid_date(date)\n def valid_date(date) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_124_valid_date.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'valid_date' do\n assert true == HumanEval.candidate(\"03-11-2000\")\n assert false == HumanEval.candidate(\"15-01-2012\")\n assert false == HumanEval.candidate(\"04-0-2040\")\n assert true == HumanEval.candidate(\"06-04-2020\")\n assert true == HumanEval.candidate(\"01-01-2007\")\n assert false == HumanEval.candidate(\"03-32-2011\")\n assert false == HumanEval.candidate(\"\")\n assert false == HumanEval.candidate(\"04-31-3000\")\n assert true == HumanEval.candidate(\"06-06-2005\")\n assert false == HumanEval.candidate(\"21-31-2000\")\n assert true == HumanEval.candidate(\"04-12-2003\")\n assert false == HumanEval.candidate(\"04122003\")\n assert false == HumanEval.candidate(\"20030412\")\n assert false == HumanEval.candidate(\"2003-04\")\n assert false == HumanEval.candidate(\"2003-04-12\")\n assert false == HumanEval.candidate(\"04-2003\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_125_split_words", "language": "elixir", "prompt": "# Given a string of words, return a list of words split on whitespace, if no whitespaces exists in the text you\n# should split on commas ',' if no commas exists you should return the number of lower-case letters with odd order in the\n# alphabet, ord('a') = 0, ord('b') = 1, ... ord('z') = 25\n# Examples\n# >>> HumanEval.split_words(\"Hello world!\")\n# [\"Hello\", \"world!\"]\n# >>> HumanEval.split_words(\"Hello,world!\")\n# [\"Hello\", \"world!\"]\n# >>> HumanEval.split_words(\"abcdef\")\n# 3\n\ndefmodule HumanEval do\n def candidate(txt), do: split_words(txt)\n def split_words(txt) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_125_split_words.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'split_words' do\n assert [\"Hello\", \"world!\"] == HumanEval.candidate(\"Hello world!\")\n assert [\"Hello\", \"world!\"] == HumanEval.candidate(\"Hello,world!\")\n assert [\"Hello\", \"world,!\"] == HumanEval.candidate(\"Hello world,!\")\n assert [\"Hello,Hello,world\", \"!\"] == HumanEval.candidate(\"Hello,Hello,world !\")\n assert 3 == HumanEval.candidate(\"abcdef\")\n assert 2 == HumanEval.candidate(\"aaabb\")\n assert 1 == HumanEval.candidate(\"aaaBb\")\n assert 0 == HumanEval.candidate(\"\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_126_is_sorted", "language": "elixir", "prompt": "# Given a list of numbers, return whether or not they are sorted\n# in ascending order. If list has more than 1 duplicate of the same\n# number, return False. Assume no negative numbers and only integers.\n# Examples\n# >>> HumanEval.is_sorted([5])\n# true\n# >>> HumanEval.is_sorted([1, 2, 3, 4, 5])\n# true\n# >>> HumanEval.is_sorted([1, 3, 2, 4, 5])\n# false\n# >>> HumanEval.is_sorted([1, 2, 3, 4, 5, 6])\n# true\n# >>> HumanEval.is_sorted([1, 2, 3, 4, 5, 6, 7])\n# true\n# >>> HumanEval.is_sorted([1, 3, 2, 4, 5, 6, 7])\n# false\n# >>> HumanEval.is_sorted([1, 2, 2, 3, 3, 4])\n# true\n# >>> HumanEval.is_sorted([1, 2, 2, 2, 3, 4])\n# false\n\ndefmodule HumanEval do\n def candidate(lst), do: is_sorted(lst)\n def is_sorted(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_126_is_sorted.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_sorted' do\n assert true == HumanEval.candidate([5])\n assert true == HumanEval.candidate([1, 2, 3, 4, 5])\n assert false == HumanEval.candidate([1, 3, 2, 4, 5])\n assert true == HumanEval.candidate([1, 2, 3, 4, 5, 6])\n assert true == HumanEval.candidate([1, 2, 3, 4, 5, 6, 7])\n assert false == HumanEval.candidate([1, 3, 2, 4, 5, 6, 7])\n assert true == HumanEval.candidate([])\n assert true == HumanEval.candidate([1])\n assert false == HumanEval.candidate([3, 2, 1])\n assert false == HumanEval.candidate([1, 2, 2, 2, 3, 4])\n assert false == HumanEval.candidate([1, 2, 3, 3, 3, 4])\n assert true == HumanEval.candidate([1, 2, 2, 3, 3, 4])\n assert true == HumanEval.candidate([1, 2, 3, 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_127_intersection", "language": "elixir", "prompt": "# You are given two intervals,\n# where each interval is a pair of integers. For example, interval = (start, end) = (1, 2).\n# The given intervals are closed which means that the interval (start, end)\n# includes both start and end.\n# For each given interval, it is assumed that its start is less or equal its end.\n# Your task is to determine whether the length of intersection of these two \n# intervals is a prime number.\n# Example, the intersection of the intervals (1, 3), (2, 4) is (2, 3)\n# which its length is 1, which not a prime number.\n# If the length of the intersection is a prime number, return \"YES\",\n# otherwise, return \"NO\".\n# If the two intervals don't intersect, return \"NO\".\n# [input/output] samples:\n# >>> HumanEval.intersection({1, 2}, {2, 3})\n# \"NO\"\n# >>> HumanEval.intersection({-1, 1}, {0, 4})\n# \"NO\"\n# >>> HumanEval.intersection({-3, -1}, {-5, 5})\n# \"YES\"\n\ndefmodule HumanEval do\n def candidate(interval1, interval2), do: intersection(interval1, interval2)\n def intersection(interval1, interval2) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_127_intersection.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'intersection' do\n assert \"NO\" == HumanEval.candidate({1, 2}, {2, 3})\n assert \"NO\" == HumanEval.candidate({-1, 1}, {0, 4})\n assert \"YES\" == HumanEval.candidate({-3, -1}, {-5, 5})\n assert \"YES\" == HumanEval.candidate({-2, 2}, {-4, 0})\n assert \"NO\" == HumanEval.candidate({-11, 2}, {-1, -1})\n assert \"NO\" == HumanEval.candidate({1, 2}, {3, 5})\n assert \"NO\" == HumanEval.candidate({1, 2}, {1, 2})\n assert \"NO\" == HumanEval.candidate({-2, -2}, {-3, -2})\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_128_prod_signs", "language": "elixir", "prompt": "# You are given an array arr of integers and you need to return\n# sum of magnitudes of integers multiplied by product of all signs\n# of each number in the array, represented by 1, -1 or 0.\n# Note: return None for empty arr.\n# Example:\n# >>> HumanEval.prod_signs([1, 2, 2, -4])\n# 9\n# >>> HumanEval.prod_signs([0, 1])\n# 0\n# >>> HumanEval.prod_signs([])\n# nil\n\ndefmodule HumanEval do\n def candidate(arr), do: prod_signs(arr)\n def prod_signs(arr) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_128_prod_signs.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'prod_signs' do\n assert -9 == HumanEval.candidate([1, 2, 2, -4])\n assert 0 == HumanEval.candidate([0, 1])\n assert -10 == HumanEval.candidate([1, 1, 1, 2, 3, -1, 1])\n assert nil == HumanEval.candidate([])\n assert 20 == HumanEval.candidate([2, 4, 1, 2, -1, -1, 9])\n assert 4 == HumanEval.candidate([-1, 1, -1, 1])\n assert -4 == HumanEval.candidate([-1, 1, 1, 1])\n assert 0 == HumanEval.candidate([-1, 1, 1, 0])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_129_minPath", "language": "elixir", "prompt": "# Given a grid with N rows and N columns (N >= 2) and a positive integer k, \n# each cell of the grid contains a value. Every integer in the range [1, N * N]\n# inclusive appears exactly once on the cells of the grid.\n# You have to find the minimum path of length k in the grid. You can start\n# from any cell, and in each step you can move to any of the neighbor cells,\n# in other words, you can go to cells which share an edge with you current\n# cell.\n# Please note that a path of length k means visiting exactly k cells (not\n# necessarily distinct).\n# You CANNOT go off the grid.\n# A path A (of length k) is considered less than a path B (of length k) if\n# after making the ordered lists of the values on the cells that A and B go\n# through (let's call them lst_A and lst_B), lst_A is lexicographically less\n# than lst_B, in other words, there exist an integer index i (1 <= i <= k)\n# such that lst_A[i] < lst_B[i] and for any j (1 <= j < i) we have\n# lst_A[j] = lst_B[j].\n# It is guaranteed that the answer is unique.\n# Return an ordered list of the values on the cells that the minimum path go through.\n# Examples: \n# >>> HumanEval.minPath([[1, 2, 3], [4, 5, 6], [7, 8, 9]], 3)\n# [1, 2, 1]\n# >>> HumanEval.minPath([[5, 9, 3], [4, 1, 6], [7, 8, 2]], 1)\n# [1]\n\ndefmodule HumanEval do\n def candidate(grid, k), do: minPath(grid, k)\n def minPath(grid, k) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_129_minPath.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'minPath' do\n assert [1, 2, 1] == HumanEval.candidate([[1, 2, 3], [4, 5, 6], [7, 8, 9]], 3)\n assert [1] == HumanEval.candidate([[5, 9, 3], [4, 1, 6], [7, 8, 2]], 1)\n assert [1, 2, 1, 2] == HumanEval.candidate([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]], 4)\n assert [1, 10, 1, 10, 1, 10, 1] == HumanEval.candidate([[6, 4, 13, 10], [5, 7, 12, 1], [3, 16, 11, 15], [8, 14, 9, 2]], 7)\n assert [1, 7, 1, 7, 1] == HumanEval.candidate([[8, 14, 9, 2], [6, 4, 13, 15], [5, 7, 1, 12], [3, 10, 11, 16]], 5)\n assert [1, 6, 1, 6, 1, 6, 1, 6, 1] == HumanEval.candidate([[11, 8, 7, 2], [5, 16, 14, 4], [9, 3, 15, 6], [12, 13, 10, 1]], 9)\n assert [1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6] == HumanEval.candidate([[12, 13, 10, 1], [9, 3, 15, 6], [5, 16, 14, 4], [11, 8, 7, 2]], 12)\n assert [1, 3, 1, 3, 1, 3, 1, 3] == HumanEval.candidate([[2, 7, 4], [3, 1, 5], [6, 8, 9]], 8)\n assert [1, 5, 1, 5, 1, 5, 1, 5] == HumanEval.candidate([[6, 1, 5], [3, 8, 9], [2, 7, 4]], 8)\n assert [1, 2, 1, 2, 1, 2, 1, 2, 1, 2] == HumanEval.candidate([[1, 2], [3, 4]], 10)\n assert [1, 3, 1, 3, 1, 3, 1, 3, 1, 3] == HumanEval.candidate([[1, 3], [3, 2]], 10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_12_longest", "language": "elixir", "prompt": "# Out of list of strings, return the longest one. Return the first one in case of multiple\n# strings of the same length. Return None in case the input list is empty.\n# >>> HumanEval.longest([])\n# nil\n# >>> HumanEval.longest([\"a\", \"b\", \"c\"])\n# \"a\"\n# >>> HumanEval.longest([\"a\", \"bb\", \"ccc\"])\n# \"ccc\"\n\ndefmodule HumanEval do\n def candidate(strings), do: longest(strings)\n def longest(strings) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_12_longest.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'longest' do\n assert nil == HumanEval.candidate([])\n assert \"x\" == HumanEval.candidate([\"x\", \"y\", \"z\"])\n assert \"zzzz\" == HumanEval.candidate([\"x\", \"yyy\", \"zzzz\", \"www\", \"kkkk\", \"abc\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_130_tri", "language": "elixir", "prompt": "# Everyone knows Fibonacci sequence, it was studied deeply by mathematicians in \n# the last couple centuries. However, what people don't know is Tribonacci sequence.\n# Tribonacci sequence is defined by the recurrence:\n# tri(1) = 3\n# tri(n) = 1 + n / 2, if n is even.\n# tri(n) = tri(n - 1) + tri(n - 2) + tri(n + 1), if n is odd.\n# For example:\n# tri(2) = 1 + (2 / 2) = 2\n# tri(4) = 3\n# tri(3) = tri(2) + tri(1) + tri(4)\n# = 2 + 3 + 3 = 8 \n# You are given a non-negative integer number n, you have to a return a list of the \n# first n + 1 numbers of the Tribonacci sequence.\n# Examples:\n# >>> HumanEval.tri(3)\n# [1, 3, 2, 8]\n\ndefmodule HumanEval do\n def candidate(n), do: tri(n)\n def tri(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_130_tri.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'tri' do\n assert [1, 3, 2, 8] == HumanEval.candidate(3)\n assert [1, 3, 2, 8, 3] == HumanEval.candidate(4)\n assert [1, 3, 2, 8, 3, 15] == HumanEval.candidate(5)\n assert [1, 3, 2, 8, 3, 15, 4] == HumanEval.candidate(6)\n assert [1, 3, 2, 8, 3, 15, 4, 24] == HumanEval.candidate(7)\n assert [1, 3, 2, 8, 3, 15, 4, 24, 5] == HumanEval.candidate(8)\n assert [1, 3, 2, 8, 3, 15, 4, 24, 5, 35] == HumanEval.candidate(9)\n assert [1, 3, 2, 8, 3, 15, 4, 24, 5, 35, 6, 48, 7, 63, 8, 80, 9, 99, 10, 120, 11] == HumanEval.candidate(20)\n assert [1] == HumanEval.candidate(0)\n assert [1, 3] == HumanEval.candidate(1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_131_digits", "language": "elixir", "prompt": "# Given a positive integer n, return the product of the odd digits.\n# Return 0 if all digits are even.\n# For example:\n# >>> HumanEval.digits(1)\n# 1\n# >>> HumanEval.digits(4)\n# 0\n# >>> HumanEval.digits(235)\n# 15\n\ndefmodule HumanEval do\n def candidate(n), do: digits(n)\n def digits(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_131_digits.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'digits' do\n assert 5 == HumanEval.candidate(5)\n assert 5 == HumanEval.candidate(54)\n assert 1 == HumanEval.candidate(120)\n assert 5 == HumanEval.candidate(5014)\n assert 315 == HumanEval.candidate(98765)\n assert 2625 == HumanEval.candidate(5576543)\n assert 0 == HumanEval.candidate(2468)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_132_is_nested", "language": "elixir", "prompt": "# Create a function that takes a string as input which contains only square brackets.\n# The function should return True if and only if there is a valid subsequence of brackets \n# where at least one bracket in the subsequence is nested.\n# >>> HumanEval.is_nested(\"[[]]\")\n# true\n# >>> HumanEval.is_nested(\"[]]]]]]][[[[[]\")\n# false\n# >>> HumanEval.is_nested(\"[][]\")\n# false\n# >>> HumanEval.is_nested(\"[]\")\n# false\n# >>> HumanEval.is_nested(\"[[][]]\")\n# true\n# >>> HumanEval.is_nested(\"[[]][[\")\n# true\n\ndefmodule HumanEval do\n def candidate(string), do: is_nested(string)\n def is_nested(string) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_132_is_nested.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_nested' do\n assert true == HumanEval.candidate(\"[[]]\")\n assert false == HumanEval.candidate(\"[]]]]]]][[[[[]\")\n assert false == HumanEval.candidate(\"[][]\")\n assert false == HumanEval.candidate(\"[]\")\n assert true == HumanEval.candidate(\"[[[[]]]]\")\n assert false == HumanEval.candidate(\"[]]]]]]]]]]\")\n assert true == HumanEval.candidate(\"[][][[]]\")\n assert false == HumanEval.candidate(\"[[]\")\n assert false == HumanEval.candidate(\"[]]\")\n assert true == HumanEval.candidate(\"[[]][[\")\n assert true == HumanEval.candidate(\"[[][]]\")\n assert false == HumanEval.candidate(\"\")\n assert false == HumanEval.candidate(\"[[[[[[[[\")\n assert false == HumanEval.candidate(\"]]]]]]]]\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_133_sum_squares", "language": "elixir", "prompt": "# You are given a list of numbers.\n# You need to return the sum of squared numbers in the given list,\n# round each element in the list to the upper int(Ceiling) first.\n# Examples:\n# >>> HumanEval.lst([1.0, 2.0, 3.0])\n# 14\n# >>> HumanEval.lst([1.0, 4.0, 9.0])\n# 98\n# >>> HumanEval.lst([1.0, 3.0, 5.0, 7.0])\n# 84\n# >>> HumanEval.lst([1.4, 4.2, 0.0])\n# 29\n# >>> HumanEval.lst([-2.4, 1.0, 1.0])\n# 6\n\ndefmodule HumanEval do\n def candidate(lst), do: sum_squares(lst)\n def sum_squares(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_133_sum_squares.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sum_squares' do\n assert 14 == HumanEval.candidate([1.0, 2.0, 3.0])\n assert 14 == HumanEval.candidate([1.0, 2.0, 3.0])\n assert 84 == HumanEval.candidate([1.0, 3.0, 5.0, 7.0])\n assert 29 == HumanEval.candidate([1.4, 4.2, 0.0])\n assert 6 == HumanEval.candidate([-2.4, 1.0, 1.0])\n assert 10230 == HumanEval.candidate([100.0, 1.0, 15.0, 2.0])\n assert 200000000 == HumanEval.candidate([10000.0, 10000.0])\n assert 75 == HumanEval.candidate([-1.4, 4.6, 6.3])\n assert 1086 == HumanEval.candidate([-1.4, 17.9, 18.9, 19.9])\n assert 0 == HumanEval.candidate([0.0])\n assert 1 == HumanEval.candidate([-1.0])\n assert 2 == HumanEval.candidate([-1.0, 1.0, 0.0])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_134_check_if_last_char_is_a_letter", "language": "elixir", "prompt": "# Create a function that returns True if the last character\n# of a given string is an alphabetical character and is not\n# a part of a word, and False otherwise.\n# Note: \"word\" is a group of characters separated by space.\n# Examples:\n# >>> HumanEval.check_if_last_char_is_a_letter(\"apple pie\")\n# false\n# >>> HumanEval.check_if_last_char_is_a_letter(\"apple pi e\")\n# true\n# >>> HumanEval.check_if_last_char_is_a_letter(\"apple pi e \")\n# false\n# >>> HumanEval.check_if_last_char_is_a_letter(\"\")\n# false\n\ndefmodule HumanEval do\n def candidate(txt), do: check_if_last_char_is_a_letter(txt)\n def check_if_last_char_is_a_letter(txt) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_134_check_if_last_char_is_a_letter.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'check_if_last_char_is_a_letter' do\n assert false == HumanEval.candidate(\"apple\")\n assert true == HumanEval.candidate(\"apple pi e\")\n assert false == HumanEval.candidate(\"eeeee\")\n assert true == HumanEval.candidate(\"A\")\n assert false == HumanEval.candidate(\"Pumpkin pie \")\n assert false == HumanEval.candidate(\"Pumpkin pie 1\")\n assert false == HumanEval.candidate(\"\")\n assert false == HumanEval.candidate(\"eeeee e \")\n assert false == HumanEval.candidate(\"apple pie\")\n assert false == HumanEval.candidate(\"apple pi e \")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_135_can_arrange", "language": "elixir", "prompt": "# Create a function which returns the largest index of an element which\n# is not greater than or equal to the element immediately preceding it. If\n# no such element exists then return -1. The given array will not contain\n# duplicate values.\n# Examples:\n# >>> HumanEval.can_arrange([1, 2, 4, 3, 5])\n# 3\n# >>> HumanEval.can_arrange([1, 2, 3])\n# -1\n\ndefmodule HumanEval do\n def candidate(arr), do: can_arrange(arr)\n def can_arrange(arr) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_135_can_arrange.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'can_arrange' do\n assert 3 == HumanEval.candidate([1, 2, 4, 3, 5])\n assert -1 == HumanEval.candidate([1, 2, 4, 5])\n assert 2 == HumanEval.candidate([1, 4, 2, 5, 6, 7, 8, 9, 10])\n assert 4 == HumanEval.candidate([4, 8, 5, 7, 3])\n assert -1 == HumanEval.candidate([])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_136_largest_smallest_integers", "language": "elixir", "prompt": "# Create a function that returns a tuple (a, b), where 'a' is\n# the largest of negative integers, and 'b' is the smallest\n# of positive integers in a list.\n# If there is no negative or positive integers, return them as None.\n# Examples:\n# >>> HumanEval.largest_smallest_integers([2, 4, 1, 3, 5, 7])\n# {nil, 1}\n# >>> HumanEval.largest_smallest_integers([])\n# {nil, nil}\n# >>> HumanEval.largest_smallest_integers([0])\n# {nil, nil}\n\ndefmodule HumanEval do\n def candidate(lst), do: largest_smallest_integers(lst)\n def largest_smallest_integers(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_136_largest_smallest_integers.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'largest_smallest_integers' do\n assert {nil, 1} == HumanEval.candidate([2, 4, 1, 3, 5, 7])\n assert {nil, 1} == HumanEval.candidate([2, 4, 1, 3, 5, 7, 0])\n assert {-2, 1} == HumanEval.candidate([1, 3, 2, 4, 5, 6, -2])\n assert {-7, 2} == HumanEval.candidate([4, 5, 3, 6, 2, 7, -7])\n assert {-9, 2} == HumanEval.candidate([7, 3, 8, 4, 9, 2, 5, -9])\n assert {nil, nil} == HumanEval.candidate([])\n assert {nil, nil} == HumanEval.candidate([0])\n assert {-1, nil} == HumanEval.candidate([-1, -3, -5, -6])\n assert {-1, nil} == HumanEval.candidate([-1, -3, -5, -6, 0])\n assert {-3, 1} == HumanEval.candidate([-6, -4, -4, -3, 1])\n assert {-3, 1} == HumanEval.candidate([-6, -4, -4, -3, -100, 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_137_compare_one", "language": "elixir", "prompt": "# Create a function that takes integers, floats, or strings representing\n# real numbers, and returns the larger variable in its given variable type.\n# Return None if the values are equal.\n# Note: If a real number is represented as a string, the floating point might be . or ,\n# >>> HumanEval.compare_one(1, 2.5)\n# 2.5\n# >>> HumanEval.compare_one(1, \"2,3\")\n# \"2,3\"\n# >>> HumanEval.compare_one(\"5,1\", \"6\")\n# \"6\"\n# >>> HumanEval.compare_one(\"1\", 1)\n# nil\n\ndefmodule HumanEval do\n def candidate(a, b), do: compare_one(a, b)\n def compare_one(a, b) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_137_compare_one.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'compare_one' do\n assert 2 == HumanEval.candidate(1, 2)\n assert 2.5 == HumanEval.candidate(1, 2.5)\n assert 3 == HumanEval.candidate(2, 3)\n assert 6 == HumanEval.candidate(5, 6)\n assert \"2,3\" == HumanEval.candidate(1, \"2,3\")\n assert \"6\" == HumanEval.candidate(\"5,1\", \"6\")\n assert \"2\" == HumanEval.candidate(\"1\", \"2\")\n assert nil == HumanEval.candidate(\"1\", 1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_138_is_equal_to_sum_even", "language": "elixir", "prompt": "# Evaluate whether the given number n can be written as the sum of exactly 4 positive even numbers\n# Example\n# >>> HumanEval.is_equal_to_sum_even(4)\n# false\n# >>> HumanEval.is_equal_to_sum_even(6)\n# false\n# >>> HumanEval.is_equal_to_sum_even(8)\n# true\n\ndefmodule HumanEval do\n def candidate(n), do: is_equal_to_sum_even(n)\n def is_equal_to_sum_even(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_138_is_equal_to_sum_even.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_equal_to_sum_even' do\n assert false == HumanEval.candidate(4)\n assert false == HumanEval.candidate(6)\n assert true == HumanEval.candidate(8)\n assert true == HumanEval.candidate(10)\n assert false == HumanEval.candidate(11)\n assert true == HumanEval.candidate(12)\n assert false == HumanEval.candidate(13)\n assert true == HumanEval.candidate(16)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_139_special_factorial", "language": "elixir", "prompt": "# The Brazilian factorial is defined as:\n# brazilian_factorial(n) = n! * (n-1)! * (n-2)! * ... * 1!\n# where n > 0\n# For example:\n# >>> HumanEval.special_factorial(4)\n# 288\n# The function will receive an integer as input and should return the special\n# factorial of this integer.\n\ndefmodule HumanEval do\n def candidate(n), do: special_factorial(n)\n def special_factorial(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_139_special_factorial.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'special_factorial' do\n assert 288 == HumanEval.candidate(4)\n assert 34560 == HumanEval.candidate(5)\n assert 125411328000 == HumanEval.candidate(7)\n assert 1 == HumanEval.candidate(1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_13_greatest_common_divisor", "language": "elixir", "prompt": "# Return a greatest common divisor of two integers a and b\n# >>> HumanEval.greatest_common_divisor(3, 5)\n# 1\n# >>> HumanEval.greatest_common_divisor(25, 15)\n# 5\n\ndefmodule HumanEval do\n def candidate(a, b), do: greatest_common_divisor(a, b)\n def greatest_common_divisor(a, b) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_13_greatest_common_divisor.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'greatest_common_divisor' do\n assert 1 == HumanEval.candidate(3, 7)\n assert 5 == HumanEval.candidate(10, 15)\n assert 7 == HumanEval.candidate(49, 14)\n assert 12 == HumanEval.candidate(144, 60)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_140_fix_spaces", "language": "elixir", "prompt": "# Given a string text, replace all spaces in it with underscores, \n# and if a string has more than 2 consecutive spaces, \n# then replace all consecutive spaces with - \n# >>> HumanEval.fix_spaces(\" Example\")\n# \"Example\"\n# >>> HumanEval.fix_spaces(\" Example 1\")\n# \"Example_1\"\n# >>> HumanEval.fix_spaces(\" Example 2\")\n# \"_Example_2\"\n# >>> HumanEval.fix_spaces(\" Example 3\")\n# \"_Example-3\"\n\ndefmodule HumanEval do\n def candidate(text), do: fix_spaces(text)\n def fix_spaces(text) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_140_fix_spaces.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fix_spaces' do\n assert \"Example\" == HumanEval.candidate(\"Example\")\n assert \"Mudasir_Hanif_\" == HumanEval.candidate(\"Mudasir Hanif \")\n assert \"Yellow_Yellow__Dirty__Fellow\" == HumanEval.candidate(\"Yellow Yellow Dirty Fellow\")\n assert \"Exa-mple\" == HumanEval.candidate(\"Exa mple\")\n assert \"-Exa_1_2_2_mple\" == HumanEval.candidate(\" Exa 1 2 2 mple\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_141_file_name_check", "language": "elixir", "prompt": "# Create a function which takes a string representing a file's name, and returns\n# 'Yes' if the the file's name is valid, and returns 'No' otherwise.\n# A file's name is considered to be valid if and only if all the following conditions \n# are met:\n# - There should not be more than three digits ('0'-'9') in the file's name.\n# - The file's name contains exactly one dot '.'\n# - The substring before the dot should not be empty, and it starts with a letter from \n# the latin alphapet ('a'-'z' and 'A'-'Z').\n# - The substring after the dot should be one of these: ['txt', 'exe', 'dll']\n# Examples:\n# >>> HumanEval.file_name_check(\"example.txt\")\n# \"Yes\"\n# >>> HumanEval.file_name_check(\"1example.dll\")\n# \"No\"\n\ndefmodule HumanEval do\n def candidate(file_name), do: file_name_check(file_name)\n def file_name_check(file_name) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_141_file_name_check.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'file_name_check' do\n assert \"Yes\" == HumanEval.candidate(\"example.txt\")\n assert \"No\" == HumanEval.candidate(\"1example.dll\")\n assert \"No\" == HumanEval.candidate(\"s1sdf3.asd\")\n assert \"Yes\" == HumanEval.candidate(\"K.dll\")\n assert \"Yes\" == HumanEval.candidate(\"MY16FILE3.exe\")\n assert \"No\" == HumanEval.candidate(\"His12FILE94.exe\")\n assert \"No\" == HumanEval.candidate(\"_Y.txt\")\n assert \"No\" == HumanEval.candidate(\"?aREYA.exe\")\n assert \"No\" == HumanEval.candidate(\"/this_is_valid.dll\")\n assert \"No\" == HumanEval.candidate(\"this_is_valid.wow\")\n assert \"Yes\" == HumanEval.candidate(\"this_is_valid.txt\")\n assert \"No\" == HumanEval.candidate(\"this_is_valid.txtexe\")\n assert \"No\" == HumanEval.candidate(\"#this2_i4s_5valid.ten\")\n assert \"No\" == HumanEval.candidate(\"@this1_is6_valid.exe\")\n assert \"No\" == HumanEval.candidate(\"this_is_12valid.6exe4.txt\")\n assert \"No\" == HumanEval.candidate(\"all.exe.txt\")\n assert \"Yes\" == HumanEval.candidate(\"I563_No.exe\")\n assert \"Yes\" == HumanEval.candidate(\"Is3youfault.txt\")\n assert \"Yes\" == HumanEval.candidate(\"no_one#knows.dll\")\n assert \"No\" == HumanEval.candidate(\"1I563_Yes3.exe\")\n assert \"No\" == HumanEval.candidate(\"I563_Yes3.txtt\")\n assert \"No\" == HumanEval.candidate(\"final..txt\")\n assert \"No\" == HumanEval.candidate(\"final132\")\n assert \"No\" == HumanEval.candidate(\"_f4indsartal132.\")\n assert \"No\" == HumanEval.candidate(\".txt\")\n assert \"No\" == HumanEval.candidate(\"s.\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_142_sum_squares", "language": "elixir", "prompt": "# \"\n# This function will take a list of integers. For all entries in the list, the function shall square the integer entry if its index is a \n# multiple of 3 and will cube the integer entry if its index is a multiple of 4 and not a multiple of 3. The function will not \n# change the entries in the list whose indexes are not a multiple of 3 or 4. The function shall then return the sum of all entries. \n# Examples:\n# >>> lst\n# [1, 2, 3]\n# >>> lst\n# []\n# >>> lst\n# [-1, -5, 2, -1, -5]\n\ndefmodule HumanEval do\n def candidate(lst), do: sum_squares(lst)\n def sum_squares(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_142_sum_squares.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sum_squares' do\n assert 6 == HumanEval.candidate([1, 2, 3])\n assert 14 == HumanEval.candidate([1, 4, 9])\n assert 0 == HumanEval.candidate([])\n assert 9 == HumanEval.candidate([1, 1, 1, 1, 1, 1, 1, 1, 1])\n assert -3 == HumanEval.candidate([-1, -1, -1, -1, -1, -1, -1, -1, -1])\n assert 0 == HumanEval.candidate([0])\n assert -126 == HumanEval.candidate([-1, -5, 2, -1, -5])\n assert 3030 == HumanEval.candidate([-56, -99, 1, 0, -2])\n assert 0 == HumanEval.candidate([-1, 0, 0, 0, 0, 0, 0, 0, -1])\n assert -14196 == HumanEval.candidate([-16, -9, -2, 36, 36, 26, -20, 25, -40, 20, -4, 12, -26, 35, 37])\n assert -1448 == HumanEval.candidate([-1, -3, 17, -1, -15, 13, -1, 14, -14, -12, -5, 14, -14, 6, 13, 11, 16, 16, 4, 10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_143_words_in_sentence", "language": "elixir", "prompt": "# You are given a string representing a sentence,\n# the sentence contains some words separated by a space,\n# and you have to return a string that contains the words from the original sentence,\n# whose lengths are prime numbers,\n# the order of the words in the new string should be the same as the original one.\n# Example 1:\n# >>> HumanEval.words_in_sentence(\"This is a test\")\n# \"is\"\n# Example 2:\n# >>> HumanEval.words_in_sentence(\"lets go for swimming\")\n# \"go for\"\n# Constraints:\n# * 1 <= len(sentence) <= 100\n# * sentence contains only letters\n\ndefmodule HumanEval do\n def candidate(sentence), do: words_in_sentence(sentence)\n def words_in_sentence(sentence) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_143_words_in_sentence.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'words_in_sentence' do\n assert \"is\" == HumanEval.candidate(\"This is a test\")\n assert \"go for\" == HumanEval.candidate(\"lets go for swimming\")\n assert \"there is no place\" == HumanEval.candidate(\"there is no place available here\")\n assert \"Hi am Hussein\" == HumanEval.candidate(\"Hi I am Hussein\")\n assert \"go for it\" == HumanEval.candidate(\"go for it\")\n assert \"\" == HumanEval.candidate(\"here\")\n assert \"is\" == HumanEval.candidate(\"here is\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_144_simplify", "language": "elixir", "prompt": "# Your task is to implement a function that will simplify the expression\n# x * n. The function returns True if x * n evaluates to a whole number and False\n# otherwise. Both x and n, are string representation of a fraction, and have the following format,\n# / where both numerator and denominator are positive whole numbers.\n# You can assume that x, and n are valid fractions, and do not have zero as denominator.\n# >>> HumanEval.simplify(\"1/5\", \"5/1\")\n# true\n# >>> HumanEval.simplify(\"1/6\", \"2/1\")\n# false\n# >>> HumanEval.simplify(\"7/10\", \"10/2\")\n# false\n\ndefmodule HumanEval do\n def candidate(x, n), do: simplify(x, n)\n def simplify(x, n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_144_simplify.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'simplify' do\n assert true == HumanEval.candidate(\"1/5\", \"5/1\")\n assert false == HumanEval.candidate(\"1/6\", \"2/1\")\n assert true == HumanEval.candidate(\"5/1\", \"3/1\")\n assert false == HumanEval.candidate(\"7/10\", \"10/2\")\n assert true == HumanEval.candidate(\"2/10\", \"50/10\")\n assert true == HumanEval.candidate(\"7/2\", \"4/2\")\n assert true == HumanEval.candidate(\"11/6\", \"6/1\")\n assert false == HumanEval.candidate(\"2/3\", \"5/2\")\n assert false == HumanEval.candidate(\"5/2\", \"3/5\")\n assert true == HumanEval.candidate(\"2/4\", \"8/4\")\n assert true == HumanEval.candidate(\"2/4\", \"4/2\")\n assert true == HumanEval.candidate(\"1/5\", \"5/1\")\n assert false == HumanEval.candidate(\"1/5\", \"1/5\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_145_order_by_points", "language": "elixir", "prompt": "# Write a function which sorts the given list of integers\n# in ascending order according to the sum of their digits.\n# Note: if there are several items with similar sum of their digits,\n# order them based on their index in original list.\n# For example:\n# >>> HumanEval.order_by_points([1, 11, -1, -11, -12])\n# [-1, -11, 1, -12, 11]\n# >>> HumanEval.order_by_points([])\n# []\n\ndefmodule HumanEval do\n def candidate(nums), do: order_by_points(nums)\n def order_by_points(nums) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_145_order_by_points.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'order_by_points' do\n assert [-1, -11, 1, -12, 11] == HumanEval.candidate([1, 11, -1, -11, -12])\n assert [0, 2, 3, 6, 53, 423, 423, 423, 1234, 145, 37, 46, 56, 463, 3457] == HumanEval.candidate([1234, 423, 463, 145, 2, 423, 423, 53, 6, 37, 3457, 3, 56, 0, 46])\n assert [] == HumanEval.candidate([])\n assert [-3, -32, -98, -11, 1, 2, 43, 54] == HumanEval.candidate([1, -11, -32, 43, 54, -98, 2, -3])\n assert [1, 10, 2, 11, 3, 4, 5, 6, 7, 8, 9] == HumanEval.candidate([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])\n assert [-76, -21, 0, 4, 23, 6, 6] == HumanEval.candidate([0, 6, 6, -76, -21, 23, 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_146_specialFilter", "language": "elixir", "prompt": "# Write a function that takes an array of numbers as input and returns \n# the number of elements in the array that are greater than 10 and both \n# first and last digits of a number are odd (1, 3, 5, 7, 9).\n# For example:\n# >>> HumanEval.specialFilter([15, -73, 14, -15])\n# 1\n# >>> HumanEval.specialFilter([33, -2, -3, 45, 21, 109])\n# 2\n\ndefmodule HumanEval do\n def candidate(nums), do: specialFilter(nums)\n def specialFilter(nums) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_146_specialFilter.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'specialFilter' do\n assert 0 == HumanEval.candidate([5, -2, 1, -5])\n assert 1 == HumanEval.candidate([15, -73, 14, -15])\n assert 2 == HumanEval.candidate([33, -2, -3, 45, 21, 109])\n assert 4 == HumanEval.candidate([43, -12, 93, 125, 121, 109])\n assert 3 == HumanEval.candidate([71, -2, -33, 75, 21, 19])\n assert 0 == HumanEval.candidate([1])\n assert 0 == HumanEval.candidate([])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_147_get_max_triples", "language": "elixir", "prompt": "# You are given a positive integer n. You have to create an integer array a of length n.\n# For each i (1 \u2264 i \u2264 n), the value of a[i] = i * i - i + 1.\n# Return the number of triples (a[i], a[j], a[k]) of a where i < j < k, \n# and a[i] + a[j] + a[k] is a multiple of 3.\n# Example :\n# >>> HumanEval.get_max_triples(5)\n# 1\n# Explanation: \n# a = [1, 3, 7, 13, 21]\n# The only valid triple is (1, 7, 13).\n\ndefmodule HumanEval do\n def candidate(n), do: get_max_triples(n)\n def get_max_triples(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_147_get_max_triples.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'get_max_triples' do\n assert 1 == HumanEval.candidate(5)\n assert 4 == HumanEval.candidate(6)\n assert 36 == HumanEval.candidate(10)\n assert 53361 == HumanEval.candidate(100)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_148_bf", "language": "elixir", "prompt": "# There are eight planets in our solar system: the closerst to the Sun \n# is Mercury, the next one is Venus, then Earth, Mars, Jupiter, Saturn, \n# Uranus, Neptune.\n# Write a function that takes two planet names as strings planet1 and planet2. \n# The function should return a tuple containing all planets whose orbits are \n# located between the orbit of planet1 and the orbit of planet2, sorted by \n# the proximity to the sun. \n# The function should return an empty tuple if planet1 or planet2\n# are not correct planet names. \n# Examples\n# >>> HumanEval.bf(\"Jupiter\", \"Neptune\")\n# {\"Saturn\", \"Uranus\"}\n# >>> HumanEval.bf(\"Earth\", \"Mercury\")\n# \"Venus\"\n# >>> HumanEval.bf(\"Mercury\", \"Uranus\")\n# {\"Venus\", \"Earth\", \"Mars\", \"Jupiter\", \"Saturn\"}\n\ndefmodule HumanEval do\n def candidate(planet1, planet2), do: bf(planet1, planet2)\n def bf(planet1, planet2) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_148_bf.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'bf' do\n assert {\"Saturn\", \"Uranus\"} == HumanEval.candidate(\"Jupiter\", \"Neptune\")\n assert {\"Venus\"} == HumanEval.candidate(\"Earth\", \"Mercury\")\n assert {\"Venus\", \"Earth\", \"Mars\", \"Jupiter\", \"Saturn\"} == HumanEval.candidate(\"Mercury\", \"Uranus\")\n assert {\"Earth\", \"Mars\", \"Jupiter\", \"Saturn\", \"Uranus\"} == HumanEval.candidate(\"Neptune\", \"Venus\")\n assert {} == HumanEval.candidate(\"Earth\", \"Earth\")\n assert {} == HumanEval.candidate(\"Mars\", \"Earth\")\n assert {} == HumanEval.candidate(\"Jupiter\", \"Makemake\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_149_sorted_list_sum", "language": "elixir", "prompt": "# Write a function that accepts a list of strings as a parameter,\n# deletes the strings that have odd lengths from it,\n# and returns the resulted list with a sorted order,\n# The list is always a list of strings and never an array of numbers,\n# and it may contain duplicates.\n# The order of the list should be ascending by length of each word, and you\n# should return the list sorted by that rule.\n# If two words have the same length, sort the list alphabetically.\n# The function should return a list of strings in sorted order.\n# You may assume that all words will have the same length.\n# For example:\n# >>> HumanEval.list_sort([\"aa\", \"a\", \"aaa\"])\n# [\"aa\"]\n# >>> HumanEval.list_sort([\"ab\", \"a\", \"aaa\", \"cd\"])\n# [\"ab\", \"cd\"]\n\ndefmodule HumanEval do\n def candidate(lst), do: sorted_list_sum(lst)\n def sorted_list_sum(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_149_sorted_list_sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sorted_list_sum' do\n assert [\"aa\"] == HumanEval.candidate([\"aa\", \"a\", \"aaa\"])\n assert [\"AI\", \"asdf\", \"school\"] == HumanEval.candidate([\"school\", \"AI\", \"asdf\", \"b\"])\n assert [] == HumanEval.candidate([\"d\", \"b\", \"c\", \"a\"])\n assert [\"abcd\", \"dcba\"] == HumanEval.candidate([\"d\", \"dcba\", \"abcd\", \"a\"])\n assert [\"AI\", \"ai\", \"au\"] == HumanEval.candidate([\"AI\", \"ai\", \"au\"])\n assert [] == HumanEval.candidate([\"a\", \"b\", \"b\", \"c\", \"c\", \"a\"])\n assert [\"cc\", \"dd\", \"aaaa\", \"bbbb\"] == HumanEval.candidate([\"aaaa\", \"bbbb\", \"dd\", \"cc\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_14_all_prefixes", "language": "elixir", "prompt": "# Return list of all prefixes from shortest to longest of the input string\n# >>> HumanEval.all_prefixes(\"abc\")\n# [\"a\", \"ab\", \"abc\"]\n\ndefmodule HumanEval do\n def candidate(string), do: all_prefixes(string)\n def all_prefixes(string) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_14_all_prefixes.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'all_prefixes' do\n assert [] == HumanEval.candidate(\"\")\n assert [\"a\", \"as\", \"asd\", \"asdf\", \"asdfg\", \"asdfgh\"] == HumanEval.candidate(\"asdfgh\")\n assert [\"W\", \"WW\", \"WWW\"] == HumanEval.candidate(\"WWW\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_150_x_or_y", "language": "elixir", "prompt": "# A simple program which should return the value of x if n is \n# a prime number and should return the value of y otherwise.\n# Examples:\n# >>> HumanEval.x_or_y(7, 34, 12)\n# 34\n# >>> HumanEval.x_or_y(15, 8, 5)\n# 5\n\ndefmodule HumanEval do\n def candidate(n, x, y), do: x_or_y(n, x, y)\n def x_or_y(n, x, y) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_150_x_or_y.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'x_or_y' do\n assert 34 == HumanEval.candidate(7, 34, 12)\n assert 5 == HumanEval.candidate(15, 8, 5)\n assert 33 == HumanEval.candidate(3, 33, 5212)\n assert 3 == HumanEval.candidate(1259, 3, 52)\n assert -1 == HumanEval.candidate(7919, -1, 12)\n assert 583 == HumanEval.candidate(3609, 1245, 583)\n assert 129 == HumanEval.candidate(91, 56, 129)\n assert 1234 == HumanEval.candidate(6, 34, 1234)\n assert 0 == HumanEval.candidate(1, 2, 0)\n assert 2 == HumanEval.candidate(2, 2, 0)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_151_double_the_difference", "language": "elixir", "prompt": "# Given a list of numbers, return the sum of squares of the numbers\n# in the list that are odd. Ignore numbers that are negative or not integers.\n# >>> HumanEval.double_the_difference([1, 3, 2, 0])\n# 10\n# >>> HumanEval.double_the_difference([-1, -2, 0])\n# 0\n# >>> HumanEval.double_the_difference([9, -2])\n# 81\n# >>> HumanEval.double_the_difference([0])\n# 0\n# If the input list is empty, return 0.\n\ndefmodule HumanEval do\n def candidate(lst), do: double_the_difference(lst)\n def double_the_difference(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_151_double_the_difference.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'double_the_difference' do\n assert 0 == HumanEval.candidate([])\n assert 25 == HumanEval.candidate([5.0, 4.0])\n assert 0 == HumanEval.candidate([0.1, 0.2, 0.3])\n assert 0 == HumanEval.candidate([-10.0, -20.0, -30.0])\n assert 0 == HumanEval.candidate([-1.0, -2.0, 8.0])\n assert 34 == HumanEval.candidate([0.2, 3.0, 5.0])\n assert 165 == HumanEval.candidate([-9.0, -7.0, -5.0, -3.0, -1.0, 1.0, 3.0, 5.0, 7.0, 9.0])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_152_compare", "language": "elixir", "prompt": "# I think we all remember that feeling when the result of some long-awaited\n# event is finally known. The feelings and thoughts you have at that moment are\n# definitely worth noting down and comparing.\n# Your task is to determine if a person correctly guessed the results of a number of matches.\n# You are given two arrays of scores and guesses of equal length, where each index shows a match. \n# Return an array of the same length denoting how far off each guess was. If they have guessed correctly,\n# the value is 0, and if not, the value is the absolute difference between the guess and the score.\n# example:\n# >>> HumanEval.compare([1, 2, 3, 4, 5, 1], [1, 2, 3, 4, 2, -2])\n# [0, 0, 0, 0, 3, 3]\n# >>> HumanEval.compare([0, 5, 0, 0, 0, 4], [4, 1, 1, 0, 0, -2])\n# [4, 4, 1, 0, 0, 6]\n\ndefmodule HumanEval do\n def candidate(game, guess), do: compare(game, guess)\n def compare(game, guess) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_152_compare.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'compare' do\n assert [0, 0, 0, 0, 3, 3] == HumanEval.candidate([1, 2, 3, 4, 5, 1], [1, 2, 3, 4, 2, -2])\n assert [0, 0, 0, 0, 0, 0] == HumanEval.candidate([0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0])\n assert [2, 4, 6] == HumanEval.candidate([1, 2, 3], [-1, -2, -3])\n assert [2, 0, 0, 1] == HumanEval.candidate([1, 2, 3, 5], [-1, 2, 3, 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_153_Strongest_Extension", "language": "elixir", "prompt": "# You will be given the name of a class (a string) and a list of extensions.\n# The extensions are to be used to load additional classes to the class. The\n# strength of the extension is as follows: Let CAP be the number of the uppercase\n# letters in the extension's name, and let SM be the number of lowercase letters \n# in the extension's name, the strength is given by the fraction CAP - SM. \n# You should find the strongest extension and return a string in this \n# format: ClassName.StrongestExtensionName.\n# If there are two or more extensions with the same strength, you should\n# choose the one that comes first in the list.\n# For example, if you are given \"Slices\" as the class and a list of the\n# extensions: ['SErviNGSliCes', 'Cheese', 'StuFfed'] then you should\n# return 'Slices.SErviNGSliCes' since 'SErviNGSliCes' is the strongest extension \n# (its strength is -1).\n# Example:\n# >>> HumanEval.Strongest_Extension(\"my_class\", [\"AA\", \"Be\", \"CC\"])\n# \"my_class.AA\"\n\ndefmodule HumanEval do\n def candidate(class_name, extensions), do: Strongest_Extension(class_name, extensions)\n def Strongest_Extension(class_name, extensions) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_153_Strongest_Extension.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'Strongest_Extension' do\n assert \"Watashi.eIGHt8OKe\" == HumanEval.candidate(\"Watashi\", [\"tEN\", \"niNE\", \"eIGHt8OKe\"])\n assert \"Boku123.YEs.WeCaNe\" == HumanEval.candidate(\"Boku123\", [\"nani\", \"NazeDa\", \"YEs.WeCaNe\", \"32145tggg\"])\n assert \"__YESIMHERE.NuLl__\" == HumanEval.candidate(\"__YESIMHERE\", [\"t\", \"eMptY\", \"nothing\", \"zeR00\", \"NuLl__\", \"123NoooneB321\"])\n assert \"K.TAR\" == HumanEval.candidate(\"K\", [\"Ta\", \"TAR\", \"t234An\", \"cosSo\"])\n assert \"__HAHA.123\" == HumanEval.candidate(\"__HAHA\", [\"Tab\", \"123\", \"781345\", \"-_-\"])\n assert \"YameRore.okIWILL123\" == HumanEval.candidate(\"YameRore\", [\"HhAas\", \"okIWILL123\", \"WorkOut\", \"Fails\", \"-_-\"])\n assert \"finNNalLLly.WoW\" == HumanEval.candidate(\"finNNalLLly\", [\"Die\", \"NowW\", \"Wow\", \"WoW\"])\n assert \"_.Bb\" == HumanEval.candidate(\"_\", [\"Bb\", \"91245\"])\n assert \"Sp.671235\" == HumanEval.candidate(\"Sp\", [\"671235\", \"Bb\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_154_cycpattern_check", "language": "elixir", "prompt": "# You are given 2 words. You need to return True if the second word or any of its rotations is a substring in the first word\n# >>> HumanEval.cycpattern_check(\"abcd\", \"abd\")\n# false\n# >>> HumanEval.cycpattern_check(\"hello\", \"ell\")\n# true\n# >>> HumanEval.cycpattern_check(\"whassup\", \"psus\")\n# false\n# >>> HumanEval.cycpattern_check(\"abab\", \"baa\")\n# true\n# >>> HumanEval.cycpattern_check(\"efef\", \"eeff\")\n# false\n# >>> HumanEval.cycpattern_check(\"himenss\", \"simen\")\n# true\n\ndefmodule HumanEval do\n def candidate(a, b), do: cycpattern_check(a, b)\n def cycpattern_check(a, b) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_154_cycpattern_check.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'cycpattern_check' do\n assert false == HumanEval.candidate(\"xyzw\", \"xyw\")\n assert true == HumanEval.candidate(\"yello\", \"ell\")\n assert false == HumanEval.candidate(\"whattup\", \"ptut\")\n assert true == HumanEval.candidate(\"efef\", \"fee\")\n assert false == HumanEval.candidate(\"abab\", \"aabb\")\n assert true == HumanEval.candidate(\"winemtt\", \"tinem\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_155_even_odd_count", "language": "elixir", "prompt": "# Given an integer. return a tuple that has the number of even and odd digits respectively.\n# Example:\n# >>> HumanEval.even_odd_count(-12)\n# {1, 1}\n# >>> HumanEval.even_odd_count(123)\n# {1, 2}\n\ndefmodule HumanEval do\n def candidate(num), do: even_odd_count(num)\n def even_odd_count(num) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_155_even_odd_count.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'even_odd_count' do\n assert {0, 1} == HumanEval.candidate(7)\n assert {1, 1} == HumanEval.candidate(-78)\n assert {2, 2} == HumanEval.candidate(3452)\n assert {3, 3} == HumanEval.candidate(346211)\n assert {3, 3} == HumanEval.candidate(-345821)\n assert {1, 0} == HumanEval.candidate(-2)\n assert {2, 3} == HumanEval.candidate(-45347)\n assert {1, 0} == HumanEval.candidate(0)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_156_int_to_mini_roman", "language": "elixir", "prompt": "# Given a positive integer, obtain its roman numeral equivalent as a string,\n# and return it in lowercase.\n# Restrictions: 1 <= num <= 1000\n# Examples:\n# >>> HumanEval.int_to_mini_roman(19)\n# \"xix\"\n# >>> HumanEval.int_to_mini_roman(152)\n# \"clii\"\n# >>> HumanEval.int_to_mini_roman(426)\n# \"cdxxvi\"\n\ndefmodule HumanEval do\n def candidate(number), do: int_to_mini_roman(number)\n def int_to_mini_roman(number) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_156_int_to_mini_roman.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'int_to_mini_roman' do\n assert \"xix\" == HumanEval.candidate(19)\n assert \"clii\" == HumanEval.candidate(152)\n assert \"ccli\" == HumanEval.candidate(251)\n assert \"cdxxvi\" == HumanEval.candidate(426)\n assert \"d\" == HumanEval.candidate(500)\n assert \"i\" == HumanEval.candidate(1)\n assert \"iv\" == HumanEval.candidate(4)\n assert \"xliii\" == HumanEval.candidate(43)\n assert \"xc\" == HumanEval.candidate(90)\n assert \"xciv\" == HumanEval.candidate(94)\n assert \"dxxxii\" == HumanEval.candidate(532)\n assert \"cm\" == HumanEval.candidate(900)\n assert \"cmxciv\" == HumanEval.candidate(994)\n assert \"m\" == HumanEval.candidate(1000)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_157_right_angle_triangle", "language": "elixir", "prompt": "# Given the lengths of the three sides of a triangle. Return True if the three\n# sides form a right-angled triangle, False otherwise.\n# A right-angled triangle is a triangle in which one angle is right angle or \n# 90 degree.\n# Example:\n# >>> HumanEval.right_angle_triangle(3, 4, 5)\n# true\n# >>> HumanEval.right_angle_triangle(1, 2, 3)\n# false\n\ndefmodule HumanEval do\n def candidate(a, b, c), do: right_angle_triangle(a, b, c)\n def right_angle_triangle(a, b, c) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_157_right_angle_triangle.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'right_angle_triangle' do\n assert true == HumanEval.candidate(3, 4, 5)\n assert false == HumanEval.candidate(1, 2, 3)\n assert true == HumanEval.candidate(10, 6, 8)\n assert false == HumanEval.candidate(2, 2, 2)\n assert true == HumanEval.candidate(7, 24, 25)\n assert false == HumanEval.candidate(10, 5, 7)\n assert true == HumanEval.candidate(5, 12, 13)\n assert true == HumanEval.candidate(15, 8, 17)\n assert true == HumanEval.candidate(48, 55, 73)\n assert false == HumanEval.candidate(1, 1, 1)\n assert false == HumanEval.candidate(2, 2, 10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_158_find_max", "language": "elixir", "prompt": "# Write a function that accepts a list of strings.\n# The list contains different words. Return the word with maximum number\n# of unique characters. If multiple strings have maximum number of unique\n# characters, return the one which comes first in lexicographical order.\n# >>> HumanEval.find_max([\"name\", \"of\", \"string\"])\n# \"string\"\n# >>> HumanEval.find_max([\"name\", \"enam\", \"game\"])\n# \"enam\"\n# >>> HumanEval.find_max([\"aaaaaaa\", \"bb\", \"cc\"])\n# \"aaaaaaa\"\n\ndefmodule HumanEval do\n def candidate(words), do: find_max(words)\n def find_max(words) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_158_find_max.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'find_max' do\n assert \"string\" == HumanEval.candidate([\"name\", \"of\", \"string\"])\n assert \"enam\" == HumanEval.candidate([\"name\", \"enam\", \"game\"])\n assert \"aaaaaaa\" == HumanEval.candidate([\"aaaaaaa\", \"bb\", \"cc\"])\n assert \"abc\" == HumanEval.candidate([\"abc\", \"cba\"])\n assert \"footbott\" == HumanEval.candidate([\"play\", \"this\", \"game\", \"of\", \"footbott\"])\n assert \"gonna\" == HumanEval.candidate([\"we\", \"are\", \"gonna\", \"rock\"])\n assert \"nation\" == HumanEval.candidate([\"we\", \"are\", \"a\", \"mad\", \"nation\"])\n assert \"this\" == HumanEval.candidate([\"this\", \"is\", \"a\", \"prrk\"])\n assert \"b\" == HumanEval.candidate([\"b\"])\n assert \"play\" == HumanEval.candidate([\"play\", \"play\", \"play\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_159_eat", "language": "elixir", "prompt": "# You're a hungry rabbit, and you already have eaten a certain number of carrots,\n# but now you need to eat more carrots to complete the day's meals.\n# you should return an array of [ total number of eaten carrots after your meals,\n# the number of carrots left after your meals ]\n# if there are not enough remaining carrots, you will eat all remaining carrots, but will still be hungry.\n# Example:\n# >>> HumanEval.eat(5, 6, 10)\n# [11, 4]\n# >>> HumanEval.eat(4, 8, 9)\n# [12, 1]\n# >>> HumanEval.eat(1, 10, 10)\n# [11, 0]\n# >>> HumanEval.eat(2, 11, 5)\n# [7, 0]\n# Variables:\n# @number : integer\n# the number of carrots that you have eaten.\n# @need : integer\n# the number of carrots that you need to eat.\n# @remaining : integer\n# the number of remaining carrots thet exist in stock\n# Constrain:\n# * 0 <= number <= 1000\n# * 0 <= need <= 1000\n# * 0 <= remaining <= 1000\n# Have fun :)\n\ndefmodule HumanEval do\n def candidate(number, need, remaining), do: eat(number, need, remaining)\n def eat(number, need, remaining) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_159_eat.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'eat' do\n assert [11, 4] == HumanEval.candidate(5, 6, 10)\n assert [12, 1] == HumanEval.candidate(4, 8, 9)\n assert [11, 0] == HumanEval.candidate(1, 10, 10)\n assert [7, 0] == HumanEval.candidate(2, 11, 5)\n assert [9, 2] == HumanEval.candidate(4, 5, 7)\n assert [5, 0] == HumanEval.candidate(4, 5, 1)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_15_string_sequence", "language": "elixir", "prompt": "# Return a string containing space-delimited numbers starting from 0 upto n inclusive.\n# >>> HumanEval.string_sequence(0)\n# \"0\"\n# >>> HumanEval.string_sequence(5)\n# \"0 1 2 3 4 5\"\n\ndefmodule HumanEval do\n def candidate(n), do: string_sequence(n)\n def string_sequence(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_15_string_sequence.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'string_sequence' do\n assert \"0\" == HumanEval.candidate(0)\n assert \"0 1 2 3\" == HumanEval.candidate(3)\n assert \"0 1 2 3 4 5 6 7 8 9 10\" == HumanEval.candidate(10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_160_do_algebra", "language": "elixir", "prompt": "# Given two lists operator, and operand. The first list has basic algebra operations, and \n# the second list is a list of integers. Use the two given lists to build the algebric \n# expression and return the evaluation of this expression.\n# The basic algebra operations:\n# Addition ( + ) \n# Subtraction ( - ) \n# Multiplication ( * ) \n# Floor division ( // ) \n# Exponentiation ( ** ) \n# Example:\n# operator['+', '*', '-']\n# array = [2, 3, 4, 5]\n# result = 2 + 3 * 4 - 5\n# => result = 9\n# Note:\n# The length of operator list is equal to the length of operand list minus one.\n# Operand is a list of of non-negative integers.\n# Operator list has at least one operator, and operand list has at least two operands.\n\ndefmodule HumanEval do\n def candidate(operator, operand), do: do_algebra(operator, operand)\n def do_algebra(operator, operand) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_160_do_algebra.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'do_algebra' do\n assert 37 == HumanEval.candidate([\"**\", \"*\", \"+\"], [2, 3, 4, 5])\n assert 9 == HumanEval.candidate([\"+\", \"*\", \"-\"], [2, 3, 4, 5])\n assert 8 == HumanEval.candidate([\"//\", \"*\"], [7, 3, 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_161_solve", "language": "elixir", "prompt": "# You are given a string s.\n# if s[i] is a letter, reverse its case from lower to upper or vise versa, \n# otherwise keep it as it is.\n# If the string contains no letters, reverse the string.\n# The function should return the resulted string.\n# Examples\n# >>> HumanEval.solve(\"1234\")\n# \"4321\"\n# >>> HumanEval.solve(\"ab\")\n# \"AB\"\n# >>> HumanEval.solve(\"#a@C\")\n# \"#A@c\"\n\ndefmodule HumanEval do\n def candidate(s), do: solve(s)\n def solve(s) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_161_solve.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'solve' do\n assert \"aSdF\" == HumanEval.candidate(\"AsDf\")\n assert \"4321\" == HumanEval.candidate(\"1234\")\n assert \"AB\" == HumanEval.candidate(\"ab\")\n assert \"#A@c\" == HumanEval.candidate(\"#a@C\")\n assert \"#aSDFw^45\" == HumanEval.candidate(\"#AsdfW^45\")\n assert \"2@6#\" == HumanEval.candidate(\"#6@2\")\n assert \"#$A^d\" == HumanEval.candidate(\"#$a^D\")\n assert \"#CCC\" == HumanEval.candidate(\"#ccc\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_162_string_to_md5", "language": "elixir", "prompt": "# Given a string 'text', return its md5 hash equivalent string.\n# If 'text' is an empty string, return None.\n# >>> HumanEval.string_to_md5(\"Hello world\")\n# \"3e25960a79dbc69b674cd4ec67a72c62\"\n\ndefmodule HumanEval do\n def candidate(text), do: string_to_md5(text)\n def string_to_md5(text) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_162_string_to_md5.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'string_to_md5' do\n assert \"3e25960a79dbc69b674cd4ec67a72c62\" == HumanEval.candidate(\"Hello world\")\n assert nil == HumanEval.candidate(\"\")\n assert \"0ef78513b0cb8cef12743f5aeb35f888\" == HumanEval.candidate(\"A B C\")\n assert \"5f4dcc3b5aa765d61d8327deb882cf99\" == HumanEval.candidate(\"password\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_163_generate_integers", "language": "elixir", "prompt": "# Given two positive integers a and b, return the even digits between a\n# and b, in ascending order.\n# For example:\n# >>> HumanEval.generate_integers(2, 8)\n# [2, 4, 6, 8]\n# >>> HumanEval.generate_integers(8, 2)\n# [2, 4, 6, 8]\n# >>> HumanEval.generate_integers(10, 14)\n# []\n\ndefmodule HumanEval do\n def candidate(a, b), do: generate_integers(a, b)\n def generate_integers(a, b) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_163_generate_integers.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'generate_integers' do\n assert [2, 4, 6, 8] == HumanEval.candidate(2, 10)\n assert [2, 4, 6, 8] == HumanEval.candidate(10, 2)\n assert [2, 4, 6, 8] == HumanEval.candidate(132, 2)\n assert [] == HumanEval.candidate(17, 89)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_16_count_distinct_characters", "language": "elixir", "prompt": "# Given a string, find out how many distinct characters (regardless of case) does it consist of\n# >>> HumanEval.count_distinct_characters(\"xyzXYZ\")\n# 3\n# >>> HumanEval.count_distinct_characters(\"Jerry\")\n# 4\n\ndefmodule HumanEval do\n def candidate(string), do: count_distinct_characters(string)\n def count_distinct_characters(string) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_16_count_distinct_characters.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'count_distinct_characters' do\n assert 0 == HumanEval.candidate(\"\")\n assert 5 == HumanEval.candidate(\"abcde\")\n assert 5 == HumanEval.candidate(\"abcdecadeCADE\")\n assert 1 == HumanEval.candidate(\"aaaaAAAAaaaa\")\n assert 5 == HumanEval.candidate(\"Jerry jERRY JeRRRY\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_17_parse_music", "language": "elixir", "prompt": "# Input to this function is a string representing musical notes in a special ASCII format.\n# Your task is to parse this string and return list of integers corresponding to how many beats does each\n# not last.\n# Here is a legend:\n# 'o' - whole note, lasts four beats\n# 'o|' - half note, lasts two beats\n# '.|' - quater note, lasts one beat\n# >>> HumanEval.parse_music(\"o o| .| o| o| .| .| .| .| o o\")\n# [4, 2, 1, 2, 2, 1, 1, 1, 1, 4, 4]\n\ndefmodule HumanEval do\n def candidate(music_string), do: parse_music(music_string)\n def parse_music(music_string) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_17_parse_music.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'parse_music' do\n assert [] == HumanEval.candidate(\"\")\n assert [4, 4, 4, 4] == HumanEval.candidate(\"o o o o\")\n assert [1, 1, 1, 1] == HumanEval.candidate(\".| .| .| .|\")\n assert [2, 2, 1, 1, 4, 4, 4, 4] == HumanEval.candidate(\"o| o| .| .| o o o o\")\n assert [2, 1, 2, 1, 4, 2, 4, 2] == HumanEval.candidate(\"o| .| o| .| o o| o o|\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_18_how_many_times", "language": "elixir", "prompt": "# Find how many times a given substring can be found in the original string. Count overlaping cases.\n# >>> HumanEval.how_many_times(\"\", \"a\")\n# 0\n# >>> HumanEval.how_many_times(\"aaa\", \"a\")\n# 3\n# >>> HumanEval.how_many_times(\"aaaa\", \"aa\")\n# 3\n\ndefmodule HumanEval do\n def candidate(string, substring), do: how_many_times(string, substring)\n def how_many_times(string, substring) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_18_how_many_times.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'how_many_times' do\n assert 0 == HumanEval.candidate(\"\", \"x\")\n assert 4 == HumanEval.candidate(\"xyxyxyx\", \"x\")\n assert 4 == HumanEval.candidate(\"cacacacac\", \"cac\")\n assert 1 == HumanEval.candidate(\"john doe\", \"john\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_19_sort_numbers", "language": "elixir", "prompt": "# Input is a space-delimited string of numberals from 'zero' to 'nine'.\n# Valid choices are 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight' and 'nine'.\n# Return the string with numbers sorted from smallest to largest\n# >>> HumanEval.sort_numbers(\"three one five\")\n# \"one three five\"\n\ndefmodule HumanEval do\n def candidate(numbers), do: sort_numbers(numbers)\n def sort_numbers(numbers) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_19_sort_numbers.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sort_numbers' do\n assert \"\" == HumanEval.candidate(\"\")\n assert \"three\" == HumanEval.candidate(\"three\")\n assert \"three five nine\" == HumanEval.candidate(\"three five nine\")\n assert \"zero four five seven eight nine\" == HumanEval.candidate(\"five zero four seven nine eight\")\n assert \"zero one two three four five six\" == HumanEval.candidate(\"six five four three two one zero\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_1_separate_paren_groups", "language": "elixir", "prompt": "# Input to this function is a string containing multiple groups of nested parentheses. Your goal is to\n# separate those group into separate strings and return the list of those.\n# Separate groups are balanced (each open brace is properly closed) and not nested within each other\n# Ignore any spaces in the input string.\n# >>> HumanEval.separate_paren_groups(\"( ) (( )) (( )( ))\")\n# [\"()\", \"(())\", \"(()())\"]\n\ndefmodule HumanEval do\n def candidate(paren_string), do: separate_paren_groups(paren_string)\n def separate_paren_groups(paren_string) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_1_separate_paren_groups.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'separate_paren_groups' do\n assert [\"(()())\", \"((()))\", \"()\", \"((())()())\"] == HumanEval.candidate(\"(()()) ((())) () ((())()())\")\n assert [\"()\", \"(())\", \"((()))\", \"(((())))\"] == HumanEval.candidate(\"() (()) ((())) (((())))\")\n assert [\"(()(())((())))\"] == HumanEval.candidate(\"(()(())((())))\")\n assert [\"()\", \"(())\", \"(()())\"] == HumanEval.candidate(\"( ) (( )) (( )( ))\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_20_find_closest_elements", "language": "elixir", "prompt": "# From a supplied list of numbers (of length at least two) select and return two that are the closest to each\n# other and return them in order (smaller number, larger number).\n# >>> HumanEval.find_closest_elements([1.0, 2.0, 3.0, 4.0, 5.0, 2.2])\n# {2.0, 2.2}\n# >>> HumanEval.find_closest_elements([1.0, 2.0, 3.0, 4.0, 5.0, 2.0])\n# {2.0, 2.0}\n\ndefmodule HumanEval do\n def candidate(numbers), do: find_closest_elements(numbers)\n def find_closest_elements(numbers) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_20_find_closest_elements.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'find_closest_elements' do\n assert {3.9, 4.0} == HumanEval.candidate([1.0, 2.0, 3.9, 4.0, 5.0, 2.2])\n assert {5.0, 5.9} == HumanEval.candidate([1.0, 2.0, 5.9, 4.0, 5.0])\n assert {2.0, 2.2} == HumanEval.candidate([1.0, 2.0, 3.0, 4.0, 5.0, 2.2])\n assert {2.0, 2.0} == HumanEval.candidate([1.0, 2.0, 3.0, 4.0, 5.0, 2.0])\n assert {2.2, 3.1} == HumanEval.candidate([1.1, 2.2, 3.1, 4.1, 5.1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_21_rescale_to_unit", "language": "elixir", "prompt": "# Given list of numbers (of at least two elements), apply a linear transform to that list,\n# such that the smallest number will become 0 and the largest will become 1\n# >>> HumanEval.rescale_to_unit([1.0, 2.0, 3.0, 4.0, 5.0])\n# [0.0, 0.25, 0.5, 0.75, 1.0]\n\ndefmodule HumanEval do\n def candidate(numbers), do: rescale_to_unit(numbers)\n def rescale_to_unit(numbers) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_21_rescale_to_unit.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'rescale_to_unit' do\n assert [0.0, 1.0] == HumanEval.candidate([2.0, 49.9])\n assert [1.0, 0.0] == HumanEval.candidate([100.0, 49.9])\n assert [0.0, 0.25, 0.5, 0.75, 1.0] == HumanEval.candidate([1.0, 2.0, 3.0, 4.0, 5.0])\n assert [0.25, 0.0, 1.0, 0.5, 0.75] == HumanEval.candidate([2.0, 1.0, 5.0, 3.0, 4.0])\n assert [0.25, 0.0, 1.0, 0.5, 0.75] == HumanEval.candidate([12.0, 11.0, 15.0, 13.0, 14.0])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_22_filter_integers", "language": "elixir", "prompt": "# Filter given list of any python values only for integers\n# >>> HumanEval.filter_integers([\"a\", 3.14, 5])\n# [5]\n# >>> HumanEval.filter_integers([1, 2, 3, \"abc\", %{}, []])\n# [1, 2, 3]\n\ndefmodule HumanEval do\n def candidate(values), do: filter_integers(values)\n def filter_integers(values) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_22_filter_integers.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'filter_integers' do\n assert [] == HumanEval.candidate([])\n assert [4, 9] == HumanEval.candidate([4, %{}, [], 23.2, 9, \"adasd\"])\n assert [3, 3, 3] == HumanEval.candidate([3, \"c\", 3, 3, \"a\", \"b\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_23_strlen", "language": "elixir", "prompt": "# Return length of given string\n# >>> HumanEval.strlen(\"\")\n# 0\n# >>> HumanEval.strlen(\"abc\")\n# 3\n\ndefmodule HumanEval do\n def candidate(string), do: strlen(string)\n def strlen(string) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_23_strlen.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'strlen' do\n assert 0 == HumanEval.candidate(\"\")\n assert 1 == HumanEval.candidate(\"x\")\n assert 9 == HumanEval.candidate(\"asdasnakj\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_24_largest_divisor", "language": "elixir", "prompt": "# For a given number n, find the largest number that divides n evenly, smaller than n\n# >>> HumanEval.largest_divisor(15)\n# 5\n\ndefmodule HumanEval do\n def candidate(n), do: largest_divisor(n)\n def largest_divisor(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_24_largest_divisor.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'largest_divisor' do\n assert 1 == HumanEval.candidate(3)\n assert 1 == HumanEval.candidate(7)\n assert 5 == HumanEval.candidate(10)\n assert 50 == HumanEval.candidate(100)\n assert 7 == HumanEval.candidate(49)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_25_factorize", "language": "elixir", "prompt": "# Return list of prime factors of given integer in the order from smallest to largest.\n# Each of the factors should be listed number of times corresponding to how many times it appeares in factorization.\n# Input number should be equal to the product of all factors\n# >>> HumanEval.factorize(8)\n# [2, 2, 2]\n# >>> HumanEval.factorize(25)\n# [5, 5]\n# >>> HumanEval.factorize(70)\n# [2, 5, 7]\n\ndefmodule HumanEval do\n def candidate(n), do: factorize(n)\n def factorize(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_25_factorize.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'factorize' do\n assert [2] == HumanEval.candidate(2)\n assert [2, 2] == HumanEval.candidate(4)\n assert [2, 2, 2] == HumanEval.candidate(8)\n assert [3, 19] == HumanEval.candidate(57)\n assert [3, 3, 19, 19] == HumanEval.candidate(3249)\n assert [3, 3, 3, 19, 19, 19] == HumanEval.candidate(185193)\n assert [3, 19, 19, 19] == HumanEval.candidate(20577)\n assert [2, 3, 3] == HumanEval.candidate(18)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_26_remove_duplicates", "language": "elixir", "prompt": "# From a list of integers, remove all elements that occur more than once.\n# Keep order of elements left the same as in the input.\n# >>> HumanEval.remove_duplicates([1, 2, 3, 2, 4])\n# [1, 3, 4]\n\ndefmodule HumanEval do\n def candidate(numbers), do: remove_duplicates(numbers)\n def remove_duplicates(numbers) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_26_remove_duplicates.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'remove_duplicates' do\n assert [] == HumanEval.candidate([])\n assert [1, 2, 3, 4] == HumanEval.candidate([1, 2, 3, 4])\n assert [1, 4, 5] == HumanEval.candidate([1, 2, 3, 2, 4, 3, 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_27_flip_case", "language": "elixir", "prompt": "# For a given string, flip lowercase characters to uppercase and uppercase to lowercase.\n# >>> HumanEval.flip_case(\"Hello\")\n# \"hELLO\"\n\ndefmodule HumanEval do\n def candidate(string), do: flip_case(string)\n def flip_case(string) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_27_flip_case.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'flip_case' do\n assert \"\" == HumanEval.candidate(\"\")\n assert \"hELLO!\" == HumanEval.candidate(\"Hello!\")\n assert \"tHESE VIOLENT DELIGHTS HAVE VIOLENT ENDS\" == HumanEval.candidate(\"These violent delights have violent ends\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_28_concatenate", "language": "elixir", "prompt": "# Concatenate list of strings into a single string\n# >>> HumanEval.concatenate([])\n# \"\"\n# >>> HumanEval.concatenate([\"a\", \"b\", \"c\"])\n# \"abc\"\n\ndefmodule HumanEval do\n def candidate(strings), do: concatenate(strings)\n def concatenate(strings) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_28_concatenate.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'concatenate' do\n assert \"\" == HumanEval.candidate([])\n assert \"xyz\" == HumanEval.candidate([\"x\", \"y\", \"z\"])\n assert \"xyzwk\" == HumanEval.candidate([\"x\", \"y\", \"z\", \"w\", \"k\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_29_filter_by_prefix", "language": "elixir", "prompt": "# Filter an input list of strings only for ones that start with a given prefix.\n# >>> HumanEval.filter_by_prefix([], \"a\")\n# []\n# >>> HumanEval.filter_by_prefix([\"abc\", \"bcd\", \"cde\", \"array\"], \"a\")\n# [\"abc\", \"array\"]\n\ndefmodule HumanEval do\n def candidate(strings, prefix), do: filter_by_prefix(strings, prefix)\n def filter_by_prefix(strings, prefix) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_29_filter_by_prefix.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'filter_by_prefix' do\n assert [] == HumanEval.candidate([], \"john\")\n assert [\"xxx\", \"xxxAAA\", \"xxx\"] == HumanEval.candidate([\"xxx\", \"asd\", \"xxy\", \"john doe\", \"xxxAAA\", \"xxx\"], \"xxx\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_2_truncate_number", "language": "elixir", "prompt": "# Given a positive floating point number, it can be decomposed into\n# and integer part (largest integer smaller than given number) and decimals\n# (leftover part always smaller than 1).\n# Return the decimal part of the number.\n# >>> HumanEval.truncate_number(3.5)\n# 0.5\n\ndefmodule HumanEval do\n def candidate(number), do: truncate_number(number)\n def truncate_number(number) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_2_truncate_number.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'truncate_number' do\n assert 0.5 == HumanEval.candidate(3.5)\n assert 0.25 == HumanEval.candidate(1.25)\n assert 0.0 == HumanEval.candidate(123.0)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_30_get_positive", "language": "elixir", "prompt": "# Return only positive numbers in the list.\n# >>> HumanEval.get_positive([-1, 2, -4, 5, 6])\n# [2, 5, 6]\n# >>> HumanEval.get_positive([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])\n# [5, 3, 2, 3, 9, 123, 1]\n\ndefmodule HumanEval do\n def candidate(l), do: get_positive(l)\n def get_positive(l) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_30_get_positive.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'get_positive' do\n assert [4, 5, 6] == HumanEval.candidate([-1, -2, 4, 5, 6])\n assert [5, 3, 2, 3, 3, 9, 123, 1] == HumanEval.candidate([5, 3, -5, 2, 3, 3, 9, 0, 123, 1, -10])\n assert [] == HumanEval.candidate([-1, -2])\n assert [] == HumanEval.candidate([])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_31_is_prime", "language": "elixir", "prompt": "# Return true if a given number is prime, and false otherwise.\n# >>> HumanEval.is_prime(6)\n# false\n# >>> HumanEval.is_prime(101)\n# true\n# >>> HumanEval.is_prime(11)\n# true\n# >>> HumanEval.is_prime(13441)\n# true\n# >>> HumanEval.is_prime(61)\n# true\n# >>> HumanEval.is_prime(4)\n# false\n# >>> HumanEval.is_prime(1)\n# false\n\ndefmodule HumanEval do\n def candidate(n), do: is_prime(n)\n def is_prime(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_31_is_prime.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_prime' do\n assert false == HumanEval.candidate(6)\n assert true == HumanEval.candidate(101)\n assert true == HumanEval.candidate(11)\n assert true == HumanEval.candidate(13441)\n assert true == HumanEval.candidate(61)\n assert false == HumanEval.candidate(4)\n assert false == HumanEval.candidate(1)\n assert true == HumanEval.candidate(5)\n assert true == HumanEval.candidate(11)\n assert true == HumanEval.candidate(17)\n assert false == HumanEval.candidate(85)\n assert false == HumanEval.candidate(77)\n assert false == HumanEval.candidate(255379)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_33_sort_third", "language": "elixir", "prompt": "# This function takes a list l and returns a list l' such that\n# l' is identical to l in the indicies that are not divisible by three, while its values at the indicies that are divisible by three are equal\n# to the values of the corresponding indicies of l, but sorted.\n# >>> HumanEval.sort_third([1, 2, 3])\n# [1, 2, 3]\n# >>> HumanEval.sort_third([5, 6, 3, 4, 8, 9, 2])\n# [2, 6, 3, 4, 8, 9, 5]\n\ndefmodule HumanEval do\n def candidate(l), do: sort_third(l)\n def sort_third(l) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_33_sort_third.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sort_third' do\n assert [2, 6, 3, 4, 8, 9, 5] == HumanEval.candidate([5, 6, 3, 4, 8, 9, 2])\n assert [2, 8, 3, 4, 6, 9, 5] == HumanEval.candidate([5, 8, 3, 4, 6, 9, 2])\n assert [2, 6, 9, 4, 8, 3, 5] == HumanEval.candidate([5, 6, 9, 4, 8, 3, 2])\n assert [2, 6, 3, 4, 8, 9, 5, 1] == HumanEval.candidate([5, 6, 3, 4, 8, 9, 2, 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_34_unique", "language": "elixir", "prompt": "# Return sorted unique elements in a list\n# >>> HumanEval.unique([5, 3, 5, 2, 3, 3, 9, 0, 123])\n# [0, 2, 3, 5, 9, 123]\n\ndefmodule HumanEval do\n def candidate(l), do: unique(l)\n def unique(l) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_34_unique.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'unique' do\n assert [0, 2, 3, 5, 9, 123] == HumanEval.candidate([5, 3, 5, 2, 3, 3, 9, 0, 123])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_35_max_element", "language": "elixir", "prompt": "# Return maximum element in the list.\n# >>> HumanEval.max_element([1, 2, 3])\n# 3\n# >>> HumanEval.max_element([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])\n# 123\n\ndefmodule HumanEval do\n def candidate(l), do: max_element(l)\n def max_element(l) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_35_max_element.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'max_element' do\n assert 3 == HumanEval.candidate([1, 2, 3])\n assert 124 == HumanEval.candidate([5, 3, -5, 2, -3, 3, 9, 0, 124, 1, -10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_36_fizz_buzz", "language": "elixir", "prompt": "# Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.\n# >>> HumanEval.fizz_buzz(50)\n# 0\n# >>> HumanEval.fizz_buzz(78)\n# 2\n# >>> HumanEval.fizz_buzz(79)\n# 3\n\ndefmodule HumanEval do\n def candidate(n), do: fizz_buzz(n)\n def fizz_buzz(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_36_fizz_buzz.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fizz_buzz' do\n assert 0 == HumanEval.candidate(50)\n assert 2 == HumanEval.candidate(78)\n assert 3 == HumanEval.candidate(79)\n assert 3 == HumanEval.candidate(100)\n assert 6 == HumanEval.candidate(200)\n assert 192 == HumanEval.candidate(4000)\n assert 639 == HumanEval.candidate(10000)\n assert 8026 == HumanEval.candidate(100000)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_37_sort_even", "language": "elixir", "prompt": "# This function takes a list l and returns a list l' such that\n# l' is identical to l in the odd indicies, while its values at the even indicies are equal\n# to the values of the even indicies of l, but sorted.\n# >>> HumanEval.sort_even([1, 2, 3])\n# [1, 2, 3]\n# >>> HumanEval.sort_even([5, 6, 3, 4])\n# [3, 6, 5, 4]\n\ndefmodule HumanEval do\n def candidate(l), do: sort_even(l)\n def sort_even(l) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_37_sort_even.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sort_even' do\n assert [1, 2, 3] == HumanEval.candidate([1, 2, 3])\n assert [-10, 3, -5, 2, -3, 3, 5, 0, 9, 1, 123] == HumanEval.candidate([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])\n assert [-12, 8, 3, 4, 5, 2, 12, 11, 23, -10] == HumanEval.candidate([5, 8, -12, 4, 23, 2, 3, 11, 12, -10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_39_prime_fib", "language": "elixir", "prompt": "# prime_fib returns n-th number that is a Fibonacci number and it's also prime.\n# >>> HumanEval.prime_fib(1)\n# 2\n# >>> HumanEval.prime_fib(2)\n# 3\n# >>> HumanEval.prime_fib(3)\n# 5\n# >>> HumanEval.prime_fib(4)\n# 13\n# >>> HumanEval.prime_fib(5)\n# 89\n\ndefmodule HumanEval do\n def candidate(n), do: prime_fib(n)\n def prime_fib(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_39_prime_fib.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'prime_fib' do\n assert 2 == HumanEval.candidate(1)\n assert 3 == HumanEval.candidate(2)\n assert 5 == HumanEval.candidate(3)\n assert 13 == HumanEval.candidate(4)\n assert 89 == HumanEval.candidate(5)\n assert 233 == HumanEval.candidate(6)\n assert 1597 == HumanEval.candidate(7)\n assert 28657 == HumanEval.candidate(8)\n assert 514229 == HumanEval.candidate(9)\n assert 433494437 == HumanEval.candidate(10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_3_below_zero", "language": "elixir", "prompt": "# You're given a list of deposit and withdrawal operations on a bank account that starts with\n# zero balance. Your task is to detect if at any point the balance of account fallls below zero, and\n# at that point function should return True. Otherwise it should return False.\n# >>> HumanEval.below_zero([1, 2, 3])\n# false\n# >>> HumanEval.below_zero([1, 2, -4, 5])\n# true\n\ndefmodule HumanEval do\n def candidate(operations), do: below_zero(operations)\n def below_zero(operations) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_3_below_zero.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'below_zero' do\n assert false == HumanEval.candidate([])\n assert false == HumanEval.candidate([1, 2, -3, 1, 2, -3])\n assert true == HumanEval.candidate([1, 2, -4, 5, 6])\n assert false == HumanEval.candidate([1, -1, 2, -2, 5, -5, 4, -4])\n assert true == HumanEval.candidate([1, -1, 2, -2, 5, -5, 4, -5])\n assert true == HumanEval.candidate([1, -2, 2, -2, 5, -5, 4, -4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_40_triples_sum_to_zero", "language": "elixir", "prompt": "# triples_sum_to_zero takes a list of integers as an input.\n# it returns True if there are three distinct elements in the list that\n# sum to zero, and False otherwise.\n# >>> HumanEval.triples_sum_to_zero([1, 3, 5, 0])\n# false\n# >>> HumanEval.triples_sum_to_zero([1, 3, -2, 1])\n# true\n# >>> HumanEval.triples_sum_to_zero([1, 2, 3, 7])\n# false\n# >>> HumanEval.triples_sum_to_zero([2, 4, -5, 3, 9, 7])\n# true\n# >>> HumanEval.triples_sum_to_zero([1])\n# false\n\ndefmodule HumanEval do\n def candidate(l), do: triples_sum_to_zero(l)\n def triples_sum_to_zero(l) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_40_triples_sum_to_zero.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'triples_sum_to_zero' do\n assert false == HumanEval.candidate([1, 3, 5, 0])\n assert false == HumanEval.candidate([1, 3, 5, -1])\n assert true == HumanEval.candidate([1, 3, -2, 1])\n assert false == HumanEval.candidate([1, 2, 3, 7])\n assert false == HumanEval.candidate([1, 2, 5, 7])\n assert true == HumanEval.candidate([2, 4, -5, 3, 9, 7])\n assert false == HumanEval.candidate([1])\n assert false == HumanEval.candidate([1, 3, 5, -100])\n assert false == HumanEval.candidate([100, 3, 5, -100])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_41_car_race_collision", "language": "elixir", "prompt": "# Imagine a road that's a perfectly straight infinitely long line.\n# n cars are driving left to right; simultaneously, a different set of n cars\n# are driving right to left. The two sets of cars start out being very far from\n# each other. All cars move in the same speed. Two cars are said to collide\n# when a car that's moving left to right hits a car that's moving right to left.\n# However, the cars are infinitely sturdy and strong; as a result, they continue moving\n# in their trajectory as if they did not collide.\n# This function outputs the number of such collisions.\n\ndefmodule HumanEval do\n def candidate(n), do: car_race_collision(n)\n def car_race_collision(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_41_car_race_collision.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'car_race_collision' do\n assert 4 == HumanEval.candidate(2)\n assert 9 == HumanEval.candidate(3)\n assert 16 == HumanEval.candidate(4)\n assert 64 == HumanEval.candidate(8)\n assert 100 == HumanEval.candidate(10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_42_incr_list", "language": "elixir", "prompt": "# Return list with elements incremented by 1.\n# >>> HumanEval.incr_list([1, 2, 3])\n# [2, 3, 4]\n# >>> HumanEval.incr_list([5, 3, 5, 2, 3, 3, 9, 0, 123])\n# [6, 4, 6, 3, 4, 4, 10, 1, 124]\n\ndefmodule HumanEval do\n def candidate(l), do: incr_list(l)\n def incr_list(l) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_42_incr_list.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'incr_list' do\n assert [] == HumanEval.candidate([])\n assert [4, 3, 2] == HumanEval.candidate([3, 2, 1])\n assert [6, 3, 6, 3, 4, 4, 10, 1, 124] == HumanEval.candidate([5, 2, 5, 2, 3, 3, 9, 0, 123])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_43_pairs_sum_to_zero", "language": "elixir", "prompt": "# pairs_sum_to_zero takes a list of integers as an input.\n# it returns True if there are two distinct elements in the list that\n# sum to zero, and False otherwise.\n# >>> HumanEval.pairs_sum_to_zero([1, 3, 5, 0])\n# false\n# >>> HumanEval.pairs_sum_to_zero([1, 3, -2, 1])\n# false\n# >>> HumanEval.pairs_sum_to_zero([1, 2, 3, 7])\n# false\n# >>> HumanEval.pairs_sum_to_zero([2, 4, -5, 3, 5, 7])\n# true\n# >>> HumanEval.pairs_sum_to_zero([1])\n# false\n\ndefmodule HumanEval do\n def candidate(l), do: pairs_sum_to_zero(l)\n def pairs_sum_to_zero(l) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_43_pairs_sum_to_zero.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'pairs_sum_to_zero' do\n assert false == HumanEval.candidate([1, 3, 5, 0])\n assert false == HumanEval.candidate([1, 3, -2, 1])\n assert false == HumanEval.candidate([1, 2, 3, 7])\n assert true == HumanEval.candidate([2, 4, -5, 3, 5, 7])\n assert false == HumanEval.candidate([1])\n assert true == HumanEval.candidate([-3, 9, -1, 3, 2, 30])\n assert true == HumanEval.candidate([-3, 9, -1, 3, 2, 31])\n assert false == HumanEval.candidate([-3, 9, -1, 4, 2, 30])\n assert false == HumanEval.candidate([-3, 9, -1, 4, 2, 31])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_44_change_base", "language": "elixir", "prompt": "# Change numerical base of input number x to base.\n# return string representation after the conversion.\n# base numbers are less than 10.\n# >>> HumanEval.change_base(8, 3)\n# \"22\"\n# >>> HumanEval.change_base(8, 2)\n# \"1000\"\n# >>> HumanEval.change_base(7, 2)\n# \"111\"\n\ndefmodule HumanEval do\n def candidate(x, base), do: change_base(x, base)\n def change_base(x, base) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_44_change_base.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'change_base' do\n assert \"22\" == HumanEval.candidate(8, 3)\n assert \"100\" == HumanEval.candidate(9, 3)\n assert \"11101010\" == HumanEval.candidate(234, 2)\n assert \"10000\" == HumanEval.candidate(16, 2)\n assert \"1000\" == HumanEval.candidate(8, 2)\n assert \"111\" == HumanEval.candidate(7, 2)\n assert \"2\" == HumanEval.candidate(2, 3)\n assert \"3\" == HumanEval.candidate(3, 4)\n assert \"4\" == HumanEval.candidate(4, 5)\n assert \"5\" == HumanEval.candidate(5, 6)\n assert \"6\" == HumanEval.candidate(6, 7)\n assert \"7\" == HumanEval.candidate(7, 8)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_45_triangle_area", "language": "elixir", "prompt": "# Given length of a side and high return area for a triangle.\n# >>> HumanEval.triangle_area(5, 3)\n# 7.5\n\ndefmodule HumanEval do\n def candidate(a, h), do: triangle_area(a, h)\n def triangle_area(a, h) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_45_triangle_area.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'triangle_area' do\n assert 7.5 == HumanEval.candidate(5, 3)\n assert 2.0 == HumanEval.candidate(2, 2)\n assert 40.0 == HumanEval.candidate(10, 8)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_46_fib4", "language": "elixir", "prompt": "# The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:\n# fib4(0) -> 0\n# fib4(1) -> 0\n# fib4(2) -> 2\n# fib4(3) -> 0\n# fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).\n# Please write a function to efficiently compute the n-th element of the fib4 number sequence. Do not use recursion.\n# >>> HumanEval.fib4(5)\n# 4\n# >>> HumanEval.fib4(6)\n# 8\n# >>> HumanEval.fib4(7)\n# 14\n\ndefmodule HumanEval do\n def candidate(n), do: fib4(n)\n def fib4(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_46_fib4.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fib4' do\n assert 4 == HumanEval.candidate(5)\n assert 28 == HumanEval.candidate(8)\n assert 104 == HumanEval.candidate(10)\n assert 386 == HumanEval.candidate(12)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_47_median", "language": "elixir", "prompt": "# Return median of elements in the list l.\n# >>> HumanEval.median([3, 1, 2, 4, 5])\n# 3\n# >>> HumanEval.median([-10, 4, 6, 1000, 10, 20])\n# 15.0\n\ndefmodule HumanEval do\n def candidate(l), do: median(l)\n def median(l) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_47_median.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'median' do\n assert 3 == HumanEval.candidate([3, 1, 2, 4, 5])\n assert 8.0 == HumanEval.candidate([-10, 4, 6, 1000, 10, 20])\n assert 5 == HumanEval.candidate([5])\n assert 5.5 == HumanEval.candidate([6, 5])\n assert 7 == HumanEval.candidate([8, 1, 3, 9, 9, 2, 7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_48_is_palindrome", "language": "elixir", "prompt": "# Checks if given string is a palindrome\n# >>> HumanEval.is_palindrome(\"\")\n# true\n# >>> HumanEval.is_palindrome(\"aba\")\n# true\n# >>> HumanEval.is_palindrome(\"aaaaa\")\n# true\n# >>> HumanEval.is_palindrome(\"zbcd\")\n# false\n\ndefmodule HumanEval do\n def candidate(text), do: is_palindrome(text)\n def is_palindrome(text) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_48_is_palindrome.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_palindrome' do\n assert true == HumanEval.candidate(\"\")\n assert true == HumanEval.candidate(\"aba\")\n assert true == HumanEval.candidate(\"aaaaa\")\n assert false == HumanEval.candidate(\"zbcd\")\n assert true == HumanEval.candidate(\"xywyx\")\n assert false == HumanEval.candidate(\"xywyz\")\n assert false == HumanEval.candidate(\"xywzx\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_49_modp", "language": "elixir", "prompt": "# Return 2^n modulo p (be aware of numerics).\n# >>> HumanEval.modp(3, 5)\n# 3\n# >>> HumanEval.modp(1101, 101)\n# 2\n# >>> HumanEval.modp(0, 101)\n# 1\n# >>> HumanEval.modp(3, 11)\n# 8\n# >>> HumanEval.modp(100, 101)\n# 1\n\ndefmodule HumanEval do\n def candidate(n, p), do: modp(n, p)\n def modp(n, p) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_49_modp.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'modp' do\n assert 3 == HumanEval.candidate(3, 5)\n assert 2 == HumanEval.candidate(1101, 101)\n assert 1 == HumanEval.candidate(0, 101)\n assert 8 == HumanEval.candidate(3, 11)\n assert 1 == HumanEval.candidate(100, 101)\n assert 4 == HumanEval.candidate(30, 5)\n assert 3 == HumanEval.candidate(31, 5)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_4_mean_absolute_deviation", "language": "elixir", "prompt": "# For a given list of input numbers, calculate Mean Absolute Deviation\n# around the mean of this dataset.\n# Mean Absolute Deviation is the average absolute difference between each\n# element and a centerpoint (mean in this case):\n# MAD = average | x - x_mean |\n# >>> HumanEval.mean_absolute_deviation([1.0, 2.0, 3.0, 4.0])\n# 1.0\n\ndefmodule HumanEval do\n def candidate(numbers), do: mean_absolute_deviation(numbers)\n def mean_absolute_deviation(numbers) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_4_mean_absolute_deviation.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'mean_absolute_deviation' do\n assert 0.5 == HumanEval.candidate([1.0, 2.0])\n assert 1.0 == HumanEval.candidate([1.0, 2.0, 3.0, 4.0])\n assert 1.2 == HumanEval.candidate([1.0, 2.0, 3.0, 4.0, 5.0])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_51_remove_vowels", "language": "elixir", "prompt": "# remove_vowels is a function that takes string and returns string without vowels.\n# >>> HumanEval.remove_vowels(\"\")\n# \"\"\n# >>> HumanEval.remove_vowels(\"abcdef\")\n# \"bcdf\"\n# >>> HumanEval.remove_vowels(\"aaaaa\")\n# \"\"\n# >>> HumanEval.remove_vowels(\"aaBAA\")\n# \"B\"\n# >>> HumanEval.remove_vowels(\"zbcd\")\n# \"zbcd\"\n\ndefmodule HumanEval do\n def candidate(text), do: remove_vowels(text)\n def remove_vowels(text) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_51_remove_vowels.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'remove_vowels' do\n assert \"\" == HumanEval.candidate(\"\")\n assert \"bcdf\nghjklm\" == HumanEval.candidate(\"abcdef\nghijklm\")\n assert \"fdcb\" == HumanEval.candidate(\"fedcba\")\n assert \"\" == HumanEval.candidate(\"eeeee\")\n assert \"cB\" == HumanEval.candidate(\"acBAA\")\n assert \"cB\" == HumanEval.candidate(\"EcBOO\")\n assert \"ybcd\" == HumanEval.candidate(\"ybcd\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_52_below_threshold", "language": "elixir", "prompt": "# Return True if all numbers in the list l are below threshold t.\n# >>> HumanEval.below_threshold([1, 2, 4, 10], 100)\n# true\n# >>> HumanEval.below_threshold([1, 20, 4, 10], 5)\n# false\n\ndefmodule HumanEval do\n def candidate(l, t), do: below_threshold(l, t)\n def below_threshold(l, t) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_52_below_threshold.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'below_threshold' do\n assert true == HumanEval.candidate([1, 2, 4, 10], 100)\n assert false == HumanEval.candidate([1, 20, 4, 10], 5)\n assert true == HumanEval.candidate([1, 20, 4, 10], 21)\n assert true == HumanEval.candidate([1, 20, 4, 10], 22)\n assert true == HumanEval.candidate([1, 8, 4, 10], 11)\n assert false == HumanEval.candidate([1, 8, 4, 10], 10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_53_add", "language": "elixir", "prompt": "# Add two numbers x and y\n# >>> HumanEval.add(2, 3)\n# 5\n# >>> HumanEval.add(5, 7)\n# 12\n\ndefmodule HumanEval do\n def candidate(x, y), do: add(x, y)\n def add(x, y) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_53_add.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'add' do\n assert 1 == HumanEval.candidate(0, 1)\n assert 1 == HumanEval.candidate(1, 0)\n assert 5 == HumanEval.candidate(2, 3)\n assert 12 == HumanEval.candidate(5, 7)\n assert 12 == HumanEval.candidate(7, 5)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_54_same_chars", "language": "elixir", "prompt": "# Check if two words have the same characters.\n# >>> HumanEval.same_chars(\"eabcdzzzz\", \"dddzzzzzzzddeddabc\")\n# true\n# >>> HumanEval.same_chars(\"abcd\", \"dddddddabc\")\n# true\n# >>> HumanEval.same_chars(\"dddddddabc\", \"abcd\")\n# true\n# >>> HumanEval.same_chars(\"eabcd\", \"dddddddabc\")\n# false\n# >>> HumanEval.same_chars(\"abcd\", \"dddddddabce\")\n# false\n# >>> HumanEval.same_chars(\"eabcdzzzz\", \"dddzzzzzzzddddabc\")\n# false\n\ndefmodule HumanEval do\n def candidate(s0, s1), do: same_chars(s0, s1)\n def same_chars(s0, s1) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_54_same_chars.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'same_chars' do\n assert true == HumanEval.candidate(\"eabcdzzzz\", \"dddzzzzzzzddeddabc\")\n assert true == HumanEval.candidate(\"abcd\", \"dddddddabc\")\n assert true == HumanEval.candidate(\"dddddddabc\", \"abcd\")\n assert false == HumanEval.candidate(\"eabcd\", \"dddddddabc\")\n assert false == HumanEval.candidate(\"abcd\", \"dddddddabcf\")\n assert false == HumanEval.candidate(\"eabcdzzzz\", \"dddzzzzzzzddddabc\")\n assert false == HumanEval.candidate(\"aabb\", \"aaccc\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_55_fib", "language": "elixir", "prompt": "# Return n-th Fibonacci number.\n# >>> HumanEval.fib(10)\n# 55\n# >>> HumanEval.fib(1)\n# 1\n# >>> HumanEval.fib(8)\n# 21\n\ndefmodule HumanEval do\n def candidate(n), do: fib(n)\n def fib(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_55_fib.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fib' do\n assert 55 == HumanEval.candidate(10)\n assert 1 == HumanEval.candidate(1)\n assert 21 == HumanEval.candidate(8)\n assert 89 == HumanEval.candidate(11)\n assert 144 == HumanEval.candidate(12)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_56_correct_bracketing", "language": "elixir", "prompt": "# brackets is a string of \"<\" and \">\".\n# return True if every opening bracket has a corresponding closing bracket.\n# >>> HumanEval.correct_bracketing(\"<\")\n# false\n# >>> HumanEval.correct_bracketing(\"<>\")\n# true\n# >>> HumanEval.correct_bracketing(\"<<><>>\")\n# true\n# >>> HumanEval.correct_bracketing(\"><<>\")\n# false\n\ndefmodule HumanEval do\n def candidate(brackets), do: correct_bracketing(brackets)\n def correct_bracketing(brackets) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_56_correct_bracketing.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'correct_bracketing' do\n assert true == HumanEval.candidate(\"<>\")\n assert true == HumanEval.candidate(\"<<><>>\")\n assert true == HumanEval.candidate(\"<><><<><>><>\")\n assert true == HumanEval.candidate(\"<><><<<><><>><>><<><><<>>>\")\n assert false == HumanEval.candidate(\"<<<><>>>>\")\n assert false == HumanEval.candidate(\"><<>\")\n assert false == HumanEval.candidate(\"<\")\n assert false == HumanEval.candidate(\"<<<<\")\n assert false == HumanEval.candidate(\">\")\n assert false == HumanEval.candidate(\"<<>\")\n assert false == HumanEval.candidate(\"<><><<><>><>><<>\")\n assert false == HumanEval.candidate(\"<><><<><>><>>><>\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_57_monotonic", "language": "elixir", "prompt": "# Return True is list elements are monotonically increasing or decreasing.\n# >>> HumanEval.monotonic([1, 2, 4, 20])\n# true\n# >>> HumanEval.monotonic([1, 20, 4, 10])\n# false\n# >>> HumanEval.monotonic([4, 1, 0, -10])\n# true\n\ndefmodule HumanEval do\n def candidate(l), do: monotonic(l)\n def monotonic(l) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_57_monotonic.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'monotonic' do\n assert true == HumanEval.candidate([1, 2, 4, 10])\n assert true == HumanEval.candidate([1, 2, 4, 20])\n assert false == HumanEval.candidate([1, 20, 4, 10])\n assert true == HumanEval.candidate([4, 1, 0, -10])\n assert true == HumanEval.candidate([4, 1, 1, 0])\n assert false == HumanEval.candidate([1, 2, 3, 2, 5, 60])\n assert true == HumanEval.candidate([1, 2, 3, 4, 5, 60])\n assert true == HumanEval.candidate([9, 9, 9, 9])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_58_common", "language": "elixir", "prompt": "# Return sorted unique common elements for two lists.\n# >>> HumanEval.common([1, 4, 3, 34, 653, 2, 5], [5, 7, 1, 5, 9, 653, 121])\n# [1, 5, 653]\n# >>> HumanEval.common([5, 3, 2, 8], [3, 2])\n# [2, 3]\n\ndefmodule HumanEval do\n def candidate(l1, l2), do: common(l1, l2)\n def common(l1, l2) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_58_common.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'common' do\n assert [1, 5, 653] == HumanEval.candidate([1, 4, 3, 34, 653, 2, 5], [5, 7, 1, 5, 9, 653, 121])\n assert [2, 3] == HumanEval.candidate([5, 3, 2, 8], [3, 2])\n assert [2, 3, 4] == HumanEval.candidate([4, 3, 2, 8], [3, 2, 4])\n assert [] == HumanEval.candidate([4, 3, 2, 8], [])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_59_largest_prime_factor", "language": "elixir", "prompt": "# Return the largest prime factor of n. Assume n > 1 and is not a prime.\n# >>> HumanEval.largest_prime_factor(13195)\n# 29\n# >>> HumanEval.largest_prime_factor(2048)\n# 2\n\ndefmodule HumanEval do\n def candidate(n), do: largest_prime_factor(n)\n def largest_prime_factor(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_59_largest_prime_factor.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'largest_prime_factor' do\n assert 5 == HumanEval.candidate(15)\n assert 3 == HumanEval.candidate(27)\n assert 7 == HumanEval.candidate(63)\n assert 11 == HumanEval.candidate(330)\n assert 29 == HumanEval.candidate(13195)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_5_intersperse", "language": "elixir", "prompt": "# Insert a number 'delimeter' between every two consecutive elements of input list `numbers'\n# >>> HumanEval.intersperse([], 4)\n# []\n# >>> HumanEval.intersperse([1, 2, 3], 4)\n# [1, 4, 2, 4, 3]\n\ndefmodule HumanEval do\n def candidate(numbers, delimeter), do: intersperse(numbers, delimeter)\n def intersperse(numbers, delimeter) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_5_intersperse.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'intersperse' do\n assert [] == HumanEval.candidate([], 7)\n assert [5, 8, 6, 8, 3, 8, 2] == HumanEval.candidate([5, 6, 3, 2], 8)\n assert [2, 2, 2, 2, 2] == HumanEval.candidate([2, 2, 2], 2)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_60_sum_to_n", "language": "elixir", "prompt": "# sum_to_n is a function that sums numbers from 1 to n.\n# >>> HumanEval.sum_to_n(30)\n# 465\n# >>> HumanEval.sum_to_n(100)\n# 5050\n# >>> HumanEval.sum_to_n(5)\n# 15\n# >>> HumanEval.sum_to_n(10)\n# 55\n# >>> HumanEval.sum_to_n(1)\n# 1\n\ndefmodule HumanEval do\n def candidate(n), do: sum_to_n(n)\n def sum_to_n(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_60_sum_to_n.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sum_to_n' do\n assert 1 == HumanEval.candidate(1)\n assert 21 == HumanEval.candidate(6)\n assert 66 == HumanEval.candidate(11)\n assert 465 == HumanEval.candidate(30)\n assert 5050 == HumanEval.candidate(100)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_61_correct_bracketing", "language": "elixir", "prompt": "# brackets is a string of \"(\" and \")\".\n# return True if every opening bracket has a corresponding closing bracket.\n# >>> HumanEval.correct_bracketing(\"(\")\n# false\n# >>> HumanEval.correct_bracketing(\"()\")\n# true\n# >>> HumanEval.correct_bracketing(\"(()())\")\n# true\n# >>> HumanEval.correct_bracketing(\")(()\")\n# false\n\ndefmodule HumanEval do\n def candidate(brackets), do: correct_bracketing(brackets)\n def correct_bracketing(brackets) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_61_correct_bracketing.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'correct_bracketing' do\n assert true == HumanEval.candidate(\"()\")\n assert true == HumanEval.candidate(\"(()())\")\n assert true == HumanEval.candidate(\"()()(()())()\")\n assert true == HumanEval.candidate(\"()()((()()())())(()()(()))\")\n assert false == HumanEval.candidate(\"((()())))\")\n assert false == HumanEval.candidate(\")(()\")\n assert false == HumanEval.candidate(\"(\")\n assert false == HumanEval.candidate(\"((((\")\n assert false == HumanEval.candidate(\")\")\n assert false == HumanEval.candidate(\"(()\")\n assert false == HumanEval.candidate(\"()()(()())())(()\")\n assert false == HumanEval.candidate(\"()()(()())()))()\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_62_derivative", "language": "elixir", "prompt": "# xs represent coefficients of a polynomial.\n# xs[0] + xs[1] * x + xs[2] * x^2 + ....\n# Return derivative of this polynomial in the same form.\n# >>> HumanEval.derivative([3, 1, 2, 4, 5])\n# [1, 4, 12, 20]\n# >>> HumanEval.derivative([1, 2, 3])\n# [2, 6]\n\ndefmodule HumanEval do\n def candidate(xs), do: derivative(xs)\n def derivative(xs) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_62_derivative.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'derivative' do\n assert [1, 4, 12, 20] == HumanEval.candidate([3, 1, 2, 4, 5])\n assert [2, 6] == HumanEval.candidate([1, 2, 3])\n assert [2, 2] == HumanEval.candidate([3, 2, 1])\n assert [2, 2, 0, 16] == HumanEval.candidate([3, 2, 1, 0, 4])\n assert [] == HumanEval.candidate([1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_63_fibfib", "language": "elixir", "prompt": "# The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:\n# fibfib(0) == 0\n# fibfib(1) == 0\n# fibfib(2) == 1\n# fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).\n# Please write a function to efficiently compute the n-th element of the fibfib number sequence.\n# >>> HumanEval.fibfib(1)\n# 0\n# >>> HumanEval.fibfib(5)\n# 4\n# >>> HumanEval.fibfib(8)\n# 24\n\ndefmodule HumanEval do\n def candidate(n), do: fibfib(n)\n def fibfib(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_63_fibfib.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fibfib' do\n assert 1 == HumanEval.candidate(2)\n assert 0 == HumanEval.candidate(1)\n assert 4 == HumanEval.candidate(5)\n assert 24 == HumanEval.candidate(8)\n assert 81 == HumanEval.candidate(10)\n assert 274 == HumanEval.candidate(12)\n assert 927 == HumanEval.candidate(14)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_64_vowels_count", "language": "elixir", "prompt": "# Write a function vowels_count which takes a string representing\n# a word as input and returns the number of vowels in the string.\n# Vowels in this case are 'a', 'e', 'i', 'o', 'u'. Here, 'y' is also a\n# vowel, but only when it is at the end of the given word.\n# Example:\n# >>> HumanEval.vowels_count(\"abcde\")\n# 2\n# >>> HumanEval.vowels_count(\"ACEDY\")\n# 3\n\ndefmodule HumanEval do\n def candidate(s), do: vowels_count(s)\n def vowels_count(s) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_64_vowels_count.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'vowels_count' do\n assert 2 == HumanEval.candidate(\"abcde\")\n assert 3 == HumanEval.candidate(\"Alone\")\n assert 2 == HumanEval.candidate(\"key\")\n assert 1 == HumanEval.candidate(\"bye\")\n assert 2 == HumanEval.candidate(\"keY\")\n assert 1 == HumanEval.candidate(\"bYe\")\n assert 3 == HumanEval.candidate(\"ACEDY\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_65_circular_shift", "language": "elixir", "prompt": "# Circular shift the digits of the integer x, shift the digits right by shift\n# and return the result as a string.\n# If shift > number of digits, return digits reversed.\n# >>> HumanEval.circular_shift(12, 1)\n# \"21\"\n# >>> HumanEval.circular_shift(12, 2)\n# \"12\"\n\ndefmodule HumanEval do\n def candidate(x, shift), do: circular_shift(x, shift)\n def circular_shift(x, shift) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_65_circular_shift.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'circular_shift' do\n assert \"001\" == HumanEval.candidate(100, 2)\n assert \"12\" == HumanEval.candidate(12, 2)\n assert \"79\" == HumanEval.candidate(97, 8)\n assert \"21\" == HumanEval.candidate(12, 1)\n assert \"11\" == HumanEval.candidate(11, 101)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_66_digitSum", "language": "elixir", "prompt": "# Task\n# Write a function that takes a string as input and returns the sum of the upper characters only'\n# ASCII codes.\n# Examples:\n# >>> HumanEval.digitSum(\"\")\n# 0\n# >>> HumanEval.digitSum(\"abAB\")\n# 131\n# >>> HumanEval.digitSum(\"abcCd\")\n# 67\n# >>> HumanEval.digitSum(\"helloE\")\n# 69\n# >>> HumanEval.digitSum(\"woArBld\")\n# 131\n# >>> HumanEval.digitSum(\"aAaaaXa\")\n# 153\n\ndefmodule HumanEval do\n def candidate(s), do: digitSum(s)\n def digitSum(s) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_66_digitSum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'digitSum' do\n assert 0 == HumanEval.candidate(\"\")\n assert 131 == HumanEval.candidate(\"abAB\")\n assert 67 == HumanEval.candidate(\"abcCd\")\n assert 69 == HumanEval.candidate(\"helloE\")\n assert 131 == HumanEval.candidate(\"woArBld\")\n assert 153 == HumanEval.candidate(\"aAaaaXa\")\n assert 151 == HumanEval.candidate(\" How are yOu?\")\n assert 327 == HumanEval.candidate(\"You arE Very Smart\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_67_fruit_distribution", "language": "elixir", "prompt": "# In this task, you will be given a string that represents a number of apples and oranges \n# that are distributed in a basket of fruit this basket contains \n# apples, oranges, and mango fruits. Given the string that represents the total number of \n# the oranges and apples and an integer that represent the total number of the fruits \n# in the basket return the number of the mango fruits in the basket.\n# for examble:\n# >>> HumanEval.fruit_distribution(\"5 apples and 6 oranges\", 19)\n# 8\n# >>> HumanEval.fruit_distribution(\"0 apples and 1 oranges\", 3)\n# 2\n# >>> HumanEval.fruit_distribution(\"2 apples and 3 oranges\", 100)\n# 95\n# >>> HumanEval.fruit_distribution(\"100 apples and 1 oranges\", 120)\n# 19\n\ndefmodule HumanEval do\n def candidate(s, n), do: fruit_distribution(s, n)\n def fruit_distribution(s, n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_67_fruit_distribution.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'fruit_distribution' do\n assert 8 == HumanEval.candidate(\"5 apples and 6 oranges\", 19)\n assert 10 == HumanEval.candidate(\"5 apples and 6 oranges\", 21)\n assert 2 == HumanEval.candidate(\"0 apples and 1 oranges\", 3)\n assert 2 == HumanEval.candidate(\"1 apples and 0 oranges\", 3)\n assert 95 == HumanEval.candidate(\"2 apples and 3 oranges\", 100)\n assert 0 == HumanEval.candidate(\"2 apples and 3 oranges\", 5)\n assert 19 == HumanEval.candidate(\"1 apples and 100 oranges\", 120)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_68_pluck", "language": "elixir", "prompt": "# \"Given an array representing a branch of a tree that has non-negative integer nodes\n# your task is to pluck one of the nodes and return it.\n# The plucked node should be the node with the smallest even value.\n# If multiple nodes with the same smallest even value are found return the node that has smallest index.\n# The plucked node should be returned in a list, [ smalest_value, its index ],\n# If there are no even values or the given array is empty, return [].\n# Example 1:\n# >>> HumanEval.pluck([4, 2, 3])\n# [2, 1]\n# Explanation: 2 has the smallest even value, and 2 has the smallest index.\n# Example 2:\n# >>> HumanEval.pluck([1, 2, 3])\n# [2, 1]\n# Explanation: 2 has the smallest even value, and 2 has the smallest index.\n# Example 3:\n# >>> HumanEval.pluck([])\n# []\n# Example 4:\n# >>> HumanEval.pluck([5, 0, 3, 0, 4, 2])\n# [0, 1]\n# Explanation: 0 is the smallest value, but there are two zeros,\n# so we will choose the first zero, which has the smallest index.\n# Constraints:\n# * 1 <= nodes.length <= 10000\n# * 0 <= node.value\n\ndefmodule HumanEval do\n def candidate(arr), do: pluck(arr)\n def pluck(arr) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_68_pluck.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'pluck' do\n assert [2, 1] == HumanEval.candidate([4, 2, 3])\n assert [2, 1] == HumanEval.candidate([1, 2, 3])\n assert [] == HumanEval.candidate([])\n assert [0, 1] == HumanEval.candidate([5, 0, 3, 0, 4, 2])\n assert [0, 3] == HumanEval.candidate([1, 2, 3, 0, 5, 3])\n assert [4, 1] == HumanEval.candidate([5, 4, 8, 4, 8])\n assert [6, 1] == HumanEval.candidate([7, 6, 7, 1])\n assert [] == HumanEval.candidate([7, 9, 7, 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_69_search", "language": "elixir", "prompt": "# You are given a non-empty list of positive integers. Return the greatest integer that is greater than \n# zero, and has a frequency greater than or equal to the value of the integer itself. \n# The frequency of an integer is the number of times it appears in the list.\n# If no such a value exist, return -1.\n# Examples:\n# >>> HumanEval.search([4, 1, 2, 2, 3, 1])\n# 2\n# >>> HumanEval.search([1, 2, 2, 3, 3, 3, 4, 4, 4])\n# 3\n# >>> HumanEval.search([5, 5, 4, 4, 4])\n# -1\n\ndefmodule HumanEval do\n def candidate(lst), do: search(lst)\n def search(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_69_search.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'search' do\n assert 1 == HumanEval.candidate([5, 5, 5, 5, 1])\n assert 4 == HumanEval.candidate([4, 1, 4, 1, 4, 4])\n assert -1 == HumanEval.candidate([3, 3])\n assert 8 == HumanEval.candidate([8, 8, 8, 8, 8, 8, 8, 8])\n assert 2 == HumanEval.candidate([2, 3, 3, 2, 2])\n assert 1 == HumanEval.candidate([2, 7, 8, 8, 4, 8, 7, 3, 9, 6, 5, 10, 4, 3, 6, 7, 1, 7, 4, 10, 8, 1])\n assert 2 == HumanEval.candidate([3, 2, 8, 2])\n assert 1 == HumanEval.candidate([6, 7, 1, 8, 8, 10, 5, 8, 5, 3, 10])\n assert -1 == HumanEval.candidate([8, 8, 3, 6, 5, 6, 4])\n assert 1 == HumanEval.candidate([6, 9, 6, 7, 1, 4, 7, 1, 8, 8, 9, 8, 10, 10, 8, 4, 10, 4, 10, 1, 2, 9, 5, 7, 9])\n assert 1 == HumanEval.candidate([1, 9, 10, 1, 3])\n assert 5 == HumanEval.candidate([6, 9, 7, 5, 8, 7, 5, 3, 7, 5, 10, 10, 3, 6, 10, 2, 8, 6, 5, 4, 9, 5, 3, 10])\n assert 1 == HumanEval.candidate([1])\n assert 4 == HumanEval.candidate([8, 8, 10, 6, 4, 3, 5, 8, 2, 4, 2, 8, 4, 6, 10, 4, 2, 1, 10, 2, 1, 1, 5])\n assert 2 == HumanEval.candidate([2, 10, 4, 8, 2, 10, 5, 1, 2, 9, 5, 5, 6, 3, 8, 6, 4, 10])\n assert 1 == HumanEval.candidate([1, 6, 10, 1, 6, 9, 10, 8, 6, 8, 7, 3])\n assert 4 == HumanEval.candidate([9, 2, 4, 1, 5, 1, 5, 2, 5, 7, 7, 7, 3, 10, 1, 5, 4, 2, 8, 4, 1, 9, 10, 7, 10, 2, 8, 10, 9, 4])\n assert 4 == HumanEval.candidate([2, 6, 4, 2, 8, 7, 5, 6, 4, 10, 4, 6, 3, 7, 8, 8, 3, 1, 4, 2, 2, 10, 7])\n assert 2 == HumanEval.candidate([9, 8, 6, 10, 2, 6, 10, 2, 7, 8, 10, 3, 8, 2, 6, 2, 3, 1])\n assert -1 == HumanEval.candidate([5, 5, 3, 9, 5, 6, 3, 2, 8, 5, 6, 10, 10, 6, 8, 4, 10, 7, 7, 10, 8])\n assert -1 == HumanEval.candidate([10])\n assert 2 == HumanEval.candidate([9, 7, 7, 2, 4, 7, 2, 10, 9, 7, 5, 7, 2])\n assert 1 == HumanEval.candidate([5, 4, 10, 2, 1, 1, 10, 3, 6, 1, 8])\n assert 1 == HumanEval.candidate([7, 9, 9, 9, 3, 4, 1, 5, 9, 1, 2, 1, 1, 10, 7, 5, 6, 7, 6, 7, 7, 6])\n assert -1 == HumanEval.candidate([3, 10, 10, 9, 2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_6_parse_nested_parens", "language": "elixir", "prompt": "# Input to this function is a string represented multiple groups for nested parentheses separated by spaces.\n# For each of the group, output the deepest level of nesting of parentheses.\n# E.g. (()()) has maximum two levels of nesting while ((())) has three.\n# >>> HumanEval.parse_nested_parens(\"(()()) ((())) () ((())()())\")\n# [2, 3, 1, 3]\n\ndefmodule HumanEval do\n def candidate(paren_string), do: parse_nested_parens(paren_string)\n def parse_nested_parens(paren_string) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_6_parse_nested_parens.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'parse_nested_parens' do\n assert [2, 3, 1, 3] == HumanEval.candidate(\"(()()) ((())) () ((())()())\")\n assert [1, 2, 3, 4] == HumanEval.candidate(\"() (()) ((())) (((())))\")\n assert [4] == HumanEval.candidate(\"(()(())((())))\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_70_strange_sort_list", "language": "elixir", "prompt": "# Given list of integers, return list in strange order.\n# Strange sorting, is when you start with the minimum value,\n# then maximum of the remaining integers, then minimum and so on.\n# Examples:\n# >>> HumanEval.strange_sort_list([1, 2, 3, 4])\n# [1, 4, 2, 3]\n# >>> HumanEval.strange_sort_list([5, 5, 5, 5])\n# [5, 5, 5, 5]\n# >>> HumanEval.strange_sort_list([])\n# []\n\ndefmodule HumanEval do\n def candidate(lst), do: strange_sort_list(lst)\n def strange_sort_list(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_70_strange_sort_list.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'strange_sort_list' do\n assert [1, 4, 2, 3] == HumanEval.candidate([1, 2, 3, 4])\n assert [5, 9, 6, 8, 7] == HumanEval.candidate([5, 6, 7, 8, 9])\n assert [1, 5, 2, 4, 3] == HumanEval.candidate([1, 2, 3, 4, 5])\n assert [1, 9, 5, 8, 6, 7] == HumanEval.candidate([5, 6, 7, 8, 9, 1])\n assert [5, 5, 5, 5] == HumanEval.candidate([5, 5, 5, 5])\n assert [] == HumanEval.candidate([])\n assert [1, 8, 2, 7, 3, 6, 4, 5] == HumanEval.candidate([1, 2, 3, 4, 5, 6, 7, 8])\n assert [-5, 5, -5, 5, 0, 2, 2, 2] == HumanEval.candidate([0, 2, 2, 2, 5, 5, -5, -5])\n assert [111111] == HumanEval.candidate([111111])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_71_triangle_area", "language": "elixir", "prompt": "# Given the lengths of the three sides of a triangle. Return the area of\n# the triangle rounded to 2 decimal points if the three sides form a valid triangle. \n# Otherwise return -1\n# Three sides make a valid triangle when the sum of any two sides is greater \n# than the third side.\n# Example:\n# >>> HumanEval.triangle_area(3, 4, 5)\n# 6.0\n# >>> HumanEval.triangle_area(1, 2, 10)\n# -1\n\ndefmodule HumanEval do\n def candidate(a, b, c), do: triangle_area(a, b, c)\n def triangle_area(a, b, c) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_71_triangle_area.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'triangle_area' do\n assert 6.0 == HumanEval.candidate(3, 4, 5)\n assert -1 == HumanEval.candidate(1, 2, 10)\n assert 8.18 == HumanEval.candidate(4, 8, 5)\n assert 1.73 == HumanEval.candidate(2, 2, 2)\n assert -1 == HumanEval.candidate(1, 2, 3)\n assert 16.25 == HumanEval.candidate(10, 5, 7)\n assert -1 == HumanEval.candidate(2, 6, 3)\n assert 0.43 == HumanEval.candidate(1, 1, 1)\n assert -1 == HumanEval.candidate(2, 2, 10)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_72_will_it_fly", "language": "elixir", "prompt": "# Write a function that returns True if the object q will fly, and False otherwise.\n# The object q will fly if it's balanced (it is a palindromic list) and the sum of its elements is less than or equal the maximum possible weight w.\n# Example:\n# >>> HumanEval.will_it_fly([1, 2], 5)\n# false\n# # 1+2 is less than the maximum possible weight, but it's unbalanced.\n# >>> HumanEval.will_it_fly([3, 2, 3], 1)\n# false\n# # it's balanced, but 3+2+3 is more than the maximum possible weight.\n# >>> HumanEval.will_it_fly([3, 2, 3], 9)\n# true\n# # 3+2+3 is less than the maximum possible weight, and it's balanced.\n# >>> HumanEval.will_it_fly([3], 5)\n# true\n# # 3 is less than the maximum possible weight, and it's balanced.\n\ndefmodule HumanEval do\n def candidate(q, w), do: will_it_fly(q, w)\n def will_it_fly(q, w) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_72_will_it_fly.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'will_it_fly' do\n assert true == HumanEval.candidate([3, 2, 3], 9)\n assert false == HumanEval.candidate([1, 2], 5)\n assert true == HumanEval.candidate([3], 5)\n assert false == HumanEval.candidate([3, 2, 3], 1)\n assert false == HumanEval.candidate([1, 2, 3], 6)\n assert true == HumanEval.candidate([5], 5)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_73_smallest_change", "language": "elixir", "prompt": "# Given an array arr of integers, find the minimum number of elements that\n# need to be changed to make the array palindromic. A palindromic array is an array that\n# is read the same backwards and forwards. In one change, you can change one element to any other element.\n# For example:\n# >>> HumanEval.smallest_change([1, 2, 3, 5, 4, 7, 9, 6])\n# 4\n# >>> HumanEval.smallest_change([1, 2, 3, 4, 3, 2, 2])\n# 1\n# >>> HumanEval.smallest_change([1, 2, 3, 2, 1])\n# 0\n\ndefmodule HumanEval do\n def candidate(arr), do: smallest_change(arr)\n def smallest_change(arr) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_73_smallest_change.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'smallest_change' do\n assert 4 == HumanEval.candidate([1, 2, 3, 5, 4, 7, 9, 6])\n assert 1 == HumanEval.candidate([1, 2, 3, 4, 3, 2, 2])\n assert 1 == HumanEval.candidate([1, 4, 2])\n assert 1 == HumanEval.candidate([1, 4, 4, 2])\n assert 0 == HumanEval.candidate([1, 2, 3, 2, 1])\n assert 0 == HumanEval.candidate([3, 1, 1, 3])\n assert 0 == HumanEval.candidate([1])\n assert 1 == HumanEval.candidate([0, 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_74_total_match", "language": "elixir", "prompt": "# Write a function that accepts two lists of strings and returns the list that has \n# total number of chars in the all strings of the list less than the other list.\n# if the two lists have the same number of chars, return the first list.\n# Examples\n# >>> HumanEval.total_match([], [])\n# []\n# >>> HumanEval.total_match([\"hi\", \"admin\"], [\"hI\", \"Hi\"])\n# [\"hI\", \"Hi\"]\n# >>> HumanEval.total_match([\"hi\", \"admin\"], [\"hi\", \"hi\", \"admin\", \"project\"])\n# [\"hi\", \"admin\"]\n# >>> HumanEval.total_match([\"hi\", \"admin\"], [\"hI\", \"hi\", \"hi\"])\n# [\"hI\", \"hi\", \"hi\"]\n# >>> HumanEval.total_match([\"4\"], [\"1\", \"2\", \"3\", \"4\", \"5\"])\n# [\"4\"]\n\ndefmodule HumanEval do\n def candidate(lst1, lst2), do: total_match(lst1, lst2)\n def total_match(lst1, lst2) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_74_total_match.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'total_match' do\n assert [] == HumanEval.candidate([], [])\n assert [\"hi\", \"hi\"] == HumanEval.candidate([\"hi\", \"admin\"], [\"hi\", \"hi\"])\n assert [\"hi\", \"admin\"] == HumanEval.candidate([\"hi\", \"admin\"], [\"hi\", \"hi\", \"admin\", \"project\"])\n assert [\"4\"] == HumanEval.candidate([\"4\"], [\"1\", \"2\", \"3\", \"4\", \"5\"])\n assert [\"hI\", \"Hi\"] == HumanEval.candidate([\"hi\", \"admin\"], [\"hI\", \"Hi\"])\n assert [\"hI\", \"hi\", \"hi\"] == HumanEval.candidate([\"hi\", \"admin\"], [\"hI\", \"hi\", \"hi\"])\n assert [\"hi\", \"admin\"] == HumanEval.candidate([\"hi\", \"admin\"], [\"hI\", \"hi\", \"hii\"])\n assert [] == HumanEval.candidate([], [\"this\"])\n assert [] == HumanEval.candidate([\"this\"], [])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_75_is_multiply_prime", "language": "elixir", "prompt": "# Write a function that returns true if the given number is the multiplication of 3 prime numbers\n# and false otherwise.\n# Knowing that (a) is less then 100. \n# Example:\n# >>> HumanEval.is_multiply_prime(30)\n# true\n# 30 = 2 * 3 * 5\n\ndefmodule HumanEval do\n def candidate(a), do: is_multiply_prime(a)\n def is_multiply_prime(a) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_75_is_multiply_prime.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_multiply_prime' do\n assert false == HumanEval.candidate(5)\n assert true == HumanEval.candidate(30)\n assert true == HumanEval.candidate(8)\n assert false == HumanEval.candidate(10)\n assert true == HumanEval.candidate(125)\n assert true == HumanEval.candidate(105)\n assert false == HumanEval.candidate(126)\n assert false == HumanEval.candidate(729)\n assert false == HumanEval.candidate(891)\n assert true == HumanEval.candidate(1001)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_76_is_simple_power", "language": "elixir", "prompt": "# Your task is to write a function that returns true if a number x is a simple\n# power of n and false in other cases.\n# x is a simple power of n if n**int=x\n# For example:\n# >>> HumanEval.is_simple_power(1, 4)\n# true\n# >>> HumanEval.is_simple_power(2, 2)\n# true\n# >>> HumanEval.is_simple_power(8, 2)\n# true\n# >>> HumanEval.is_simple_power(3, 2)\n# false\n# >>> HumanEval.is_simple_power(3, 1)\n# false\n# >>> HumanEval.is_simple_power(5, 3)\n# false\n\ndefmodule HumanEval do\n def candidate(x, n), do: is_simple_power(x, n)\n def is_simple_power(x, n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_76_is_simple_power.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_simple_power' do\n assert true == HumanEval.candidate(16, 2)\n assert false == HumanEval.candidate(143214, 16)\n assert true == HumanEval.candidate(4, 2)\n assert true == HumanEval.candidate(9, 3)\n assert true == HumanEval.candidate(16, 4)\n assert false == HumanEval.candidate(24, 2)\n assert false == HumanEval.candidate(128, 4)\n assert false == HumanEval.candidate(12, 6)\n assert true == HumanEval.candidate(1, 1)\n assert true == HumanEval.candidate(1, 12)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_77_iscube", "language": "elixir", "prompt": "# Write a function that takes an integer a and returns True \n# if this ingeger is a cube of some integer number.\n# Note: you may assume the input is always valid.\n# Examples:\n# >>> HumanEval.iscube(1)\n# true\n# >>> HumanEval.iscube(2)\n# false\n# >>> HumanEval.iscube(-1)\n# true\n# >>> HumanEval.iscube(64)\n# true\n# >>> HumanEval.iscube(0)\n# true\n# >>> HumanEval.iscube(180)\n# false\n\ndefmodule HumanEval do\n def candidate(a), do: iscube(a)\n def iscube(a) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_77_iscube.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'iscube' do\n assert true == HumanEval.candidate(1)\n assert false == HumanEval.candidate(2)\n assert true == HumanEval.candidate(-1)\n assert true == HumanEval.candidate(64)\n assert false == HumanEval.candidate(180)\n assert true == HumanEval.candidate(1000)\n assert true == HumanEval.candidate(0)\n assert false == HumanEval.candidate(1729)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_78_hex_key", "language": "elixir", "prompt": "# You have been tasked to write a function that receives \n# a hexadecimal number as a string and counts the number of hexadecimal \n# digits that are primes (prime number, or a prime, is a natural number \n# greater than 1 that is not a product of two smaller natural numbers).\n# Hexadecimal digits are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.\n# Prime numbers are 2, 3, 5, 7, 11, 13, 17,...\n# So you have to determine a number of the following digits: 2, 3, 5, 7, \n# B (=decimal 11), D (=decimal 13).\n# Note: you may assume the input is always correct or empty string, \n# and symbols A,B,C,D,E,F are always uppercase.\n# Examples:\n# >>> HumanEval.hex_key(\"AB\")\n# 1\n# >>> HumanEval.hex_key(\"1077E\")\n# 2\n# >>> HumanEval.hex_key(\"ABED1A33\")\n# 4\n# >>> HumanEval.hex_key(\"123456789ABCDEF0\")\n# 6\n# >>> HumanEval.hex_key(\"2020\")\n# 2\n\ndefmodule HumanEval do\n def candidate(num), do: hex_key(num)\n def hex_key(num) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_78_hex_key.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'hex_key' do\n assert 1 == HumanEval.candidate(\"AB\")\n assert 2 == HumanEval.candidate(\"1077E\")\n assert 4 == HumanEval.candidate(\"ABED1A33\")\n assert 2 == HumanEval.candidate(\"2020\")\n assert 6 == HumanEval.candidate(\"123456789ABCDEF0\")\n assert 12 == HumanEval.candidate(\"112233445566778899AABBCCDDEEFF00\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_79_decimal_to_binary", "language": "elixir", "prompt": "# You will be given a number in decimal form and your task is to convert it to\n# binary format. The function should return a string, with each character representing a binary\n# number. Each character in the string will be '0' or '1'.\n# There will be an extra couple of characters 'db' at the beginning and at the end of the string.\n# The extra characters are there to help with the format.\n# Examples:\n# >>> HumanEval.decimal_to_binary(15)\n# \"db1111db\"\n# >>> HumanEval.decimal_to_binary(32)\n# \"db100000db\"\n\ndefmodule HumanEval do\n def candidate(decimal), do: decimal_to_binary(decimal)\n def decimal_to_binary(decimal) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_79_decimal_to_binary.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'decimal_to_binary' do\n assert \"db0db\" == HumanEval.candidate(0)\n assert \"db100000db\" == HumanEval.candidate(32)\n assert \"db1100111db\" == HumanEval.candidate(103)\n assert \"db1111db\" == HumanEval.candidate(15)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_7_filter_by_substring", "language": "elixir", "prompt": "# Filter an input list of strings only for ones that contain given substring\n# >>> HumanEval.filter_by_substring([], \"a\")\n# []\n# >>> HumanEval.filter_by_substring([\"abc\", \"bacd\", \"cde\", \"array\"], \"a\")\n# [\"abc\", \"bacd\", \"array\"]\n\ndefmodule HumanEval do\n def candidate(strings, substring), do: filter_by_substring(strings, substring)\n def filter_by_substring(strings, substring) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_7_filter_by_substring.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'filter_by_substring' do\n assert [] == HumanEval.candidate([], \"john\")\n assert [\"xxx\", \"xxxAAA\", \"xxx\"] == HumanEval.candidate([\"xxx\", \"asd\", \"xxy\", \"john doe\", \"xxxAAA\", \"xxx\"], \"xxx\")\n assert [\"xxx\", \"aaaxxy\", \"xxxAAA\", \"xxx\"] == HumanEval.candidate([\"xxx\", \"asd\", \"aaaxxy\", \"john doe\", \"xxxAAA\", \"xxx\"], \"xx\")\n assert [\"grunt\", \"prune\"] == HumanEval.candidate([\"grunt\", \"trumpet\", \"prune\", \"gruesome\"], \"run\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_80_is_happy", "language": "elixir", "prompt": "# You are given a string s.\n# Your task is to check if the string is happy or not.\n# A string is happy if its length is at least 3 and every 3 consecutive letters are distinct\n# For example:\n# >>> HumanEval.is_happy(\"a\")\n# false\n# >>> HumanEval.is_happy(\"aa\")\n# false\n# >>> HumanEval.is_happy(\"abcd\")\n# true\n# >>> HumanEval.is_happy(\"aabb\")\n# false\n# >>> HumanEval.is_happy(\"adb\")\n# true\n# >>> HumanEval.is_happy(\"xyy\")\n# false\n\ndefmodule HumanEval do\n def candidate(s), do: is_happy(s)\n def is_happy(s) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_80_is_happy.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_happy' do\n assert false == HumanEval.candidate(\"a\")\n assert false == HumanEval.candidate(\"aa\")\n assert true == HumanEval.candidate(\"abcd\")\n assert false == HumanEval.candidate(\"aabb\")\n assert true == HumanEval.candidate(\"adb\")\n assert false == HumanEval.candidate(\"xyy\")\n assert true == HumanEval.candidate(\"iopaxpoi\")\n assert false == HumanEval.candidate(\"iopaxioi\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_81_numerical_letter_grade", "language": "elixir", "prompt": "# It is the last week of the semester and the teacher has to give the grades\n# to students. The teacher has been making her own algorithm for grading.\n# The only problem is, she has lost the code she used for grading.\n# She has given you a list of GPAs for some students and you have to write \n# a function that can output a list of letter grades using the following table:\n# GPA | Letter grade\n# 4.0 A+\n# > 3.7 A \n# > 3.3 A- \n# > 3.0 B+\n# > 2.7 B \n# > 2.3 B-\n# > 2.0 C+\n# > 1.7 C\n# > 1.3 C-\n# > 1.0 D+ \n# > 0.7 D \n# > 0.0 D-\n# 0.0 E\n# Example:\n# >>> HumanEval.grade_equation([4.0, 3, 1.7, 2, 3.5])\n# [\"A+\", \"B\", \"C-\", \"C\", \"A-\"]\n\ndefmodule HumanEval do\n def candidate(grades), do: numerical_letter_grade(grades)\n def numerical_letter_grade(grades) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_81_numerical_letter_grade.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'numerical_letter_grade' do\n assert [\"A+\", \"B\", \"C-\", \"C\", \"A-\"] == HumanEval.candidate([4.0, 3, 1.7, 2, 3.5])\n assert [\"D+\"] == HumanEval.candidate([1.2])\n assert [\"D-\"] == HumanEval.candidate([0.5])\n assert [\"E\"] == HumanEval.candidate([0.0])\n assert [\"D\", \"D-\", \"C-\", \"B\", \"B+\"] == HumanEval.candidate([1.0, 0.3, 1.5, 2.8, 3.3])\n assert [\"E\", \"D-\"] == HumanEval.candidate([0.0, 0.7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_82_prime_length", "language": "elixir", "prompt": "# Write a function that takes a string and returns True if the string\n# length is a prime number or False otherwise\n# Examples\n# >>> HumanEval.prime_length(\"Hello\")\n# true\n# >>> HumanEval.prime_length(\"abcdcba\")\n# true\n# >>> HumanEval.prime_length(\"kittens\")\n# true\n# >>> HumanEval.prime_length(\"orange\")\n# false\n\ndefmodule HumanEval do\n def candidate(string), do: prime_length(string)\n def prime_length(string) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_82_prime_length.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'prime_length' do\n assert true == HumanEval.candidate(\"Hello\")\n assert true == HumanEval.candidate(\"abcdcba\")\n assert true == HumanEval.candidate(\"kittens\")\n assert false == HumanEval.candidate(\"orange\")\n assert true == HumanEval.candidate(\"wow\")\n assert true == HumanEval.candidate(\"world\")\n assert true == HumanEval.candidate(\"MadaM\")\n assert true == HumanEval.candidate(\"Wow\")\n assert false == HumanEval.candidate(\"\")\n assert true == HumanEval.candidate(\"HI\")\n assert true == HumanEval.candidate(\"go\")\n assert false == HumanEval.candidate(\"gogo\")\n assert false == HumanEval.candidate(\"aaaaaaaaaaaaaaa\")\n assert true == HumanEval.candidate(\"Madam\")\n assert false == HumanEval.candidate(\"M\")\n assert false == HumanEval.candidate(\"0\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_83_starts_one_ends", "language": "elixir", "prompt": "# Given a positive integer n, return the count of the numbers of n-digit\n# positive integers that start or end with 1.\n\ndefmodule HumanEval do\n def candidate(n), do: starts_one_ends(n)\n def starts_one_ends(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_83_starts_one_ends.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'starts_one_ends' do\n assert 1 == HumanEval.candidate(1)\n assert 18 == HumanEval.candidate(2)\n assert 180 == HumanEval.candidate(3)\n assert 1800 == HumanEval.candidate(4)\n assert 18000 == HumanEval.candidate(5)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_84_solve", "language": "elixir", "prompt": "# Given a positive integer N, return the total sum of its digits in binary.\n# Example\n# >>> HumanEval.solve(1000)\n# \"1\"\n# >>> HumanEval.solve(150)\n# \"110\"\n# >>> HumanEval.solve(147)\n# \"1100\"\n# Variables:\n# @N integer\n# Constraints: 0 \u2264 N \u2264 10000.\n# Output:\n# a string of binary number\n\ndefmodule HumanEval do\n def candidate(N), do: solve(N)\n def solve(N) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_84_solve.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'solve' do\n assert \"1\" == HumanEval.candidate(1000)\n assert \"110\" == HumanEval.candidate(150)\n assert \"1100\" == HumanEval.candidate(147)\n assert \"1001\" == HumanEval.candidate(333)\n assert \"10010\" == HumanEval.candidate(963)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_85_add", "language": "elixir", "prompt": "# Given a non-empty list of integers lst. add the even elements that are at odd indices..\n# Examples:\n# >>> HumanEval.add([4, 2, 6, 7])\n# 2\n\ndefmodule HumanEval do\n def candidate(lst), do: add(lst)\n def add(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_85_add.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'add' do\n assert 88 == HumanEval.candidate([4, 88])\n assert 122 == HumanEval.candidate([4, 5, 6, 7, 2, 122])\n assert 0 == HumanEval.candidate([4, 0, 6, 7])\n assert 12 == HumanEval.candidate([4, 4, 6, 8])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_86_anti_shuffle", "language": "elixir", "prompt": "# Write a function that takes a string and returns an ordered version of it.\n# Ordered version of string, is a string where all words (separated by space)\n# are replaced by a new word where all the characters arranged in\n# ascending order based on ascii value.\n# Note: You should keep the order of words and blank spaces in the sentence.\n# For example:\n# >>> HumanEval.anti_shuffle(\"Hi\")\n# \"Hi\"\n# >>> HumanEval.anti_shuffle(\"hello\")\n# \"ehllo\"\n# >>> HumanEval.anti_shuffle(\"Hello World!!!\")\n# \"Hello !!!Wdlor\"\n\ndefmodule HumanEval do\n def candidate(s), do: anti_shuffle(s)\n def anti_shuffle(s) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_86_anti_shuffle.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'anti_shuffle' do\n assert \"Hi\" == HumanEval.candidate(\"Hi\")\n assert \"ehllo\" == HumanEval.candidate(\"hello\")\n assert \"bemnru\" == HumanEval.candidate(\"number\")\n assert \"abcd\" == HumanEval.candidate(\"abcd\")\n assert \"Hello !!!Wdlor\" == HumanEval.candidate(\"Hello World!!!\")\n assert \"\" == HumanEval.candidate(\"\")\n assert \".Hi My aemn is Meirst .Rboot How aer ?ouy\" == HumanEval.candidate(\"Hi. My name is Mister Robot. How are you?\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_87_get_row", "language": "elixir", "prompt": "# You are given a 2 dimensional data, as a nested lists,\n# which is similar to matrix, however, unlike matrices,\n# each row may contain a different number of columns.\n# Given lst, and integer x, find integers x in the list,\n# and return list of tuples, [(x1, y1), (x2, y2) ...] such that\n# each tuple is a coordinate - (row, columns), starting with 0.\n# Sort coordinates initially by rows in ascending order.\n# Also, sort coordinates of the row by columns in descending order.\n# Examples:\n# >>> HumanEval.get_row([[1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 1, 6], [1, 2, 3, 4, 5, 1]], 1)\n# [{0, 0}, {1, 4}, {1, 0}, {2, 5}, {2, 0}]\n# >>> HumanEval.get_row([], 1)\n# []\n# >>> HumanEval.get_row([[], [1], [1, 2, 3]], 3)\n# [{2, 2}]\n\ndefmodule HumanEval do\n def candidate(lst, x), do: get_row(lst, x)\n def get_row(lst, x) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_87_get_row.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'get_row' do\n assert [{0, 0}, {1, 4}, {1, 0}, {2, 5}, {2, 0}] == HumanEval.candidate([[1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 1, 6], [1, 2, 3, 4, 5, 1]], 1)\n assert [{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}] == HumanEval.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], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6]], 2)\n assert [{0, 0}, {1, 0}, {2, 1}, {2, 0}, {3, 2}, {3, 0}, {4, 3}, {4, 0}, {5, 4}, {5, 0}, {6, 5}, {6, 0}] == HumanEval.candidate([[1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6], [1, 1, 3, 4, 5, 6], [1, 2, 1, 4, 5, 6], [1, 2, 3, 1, 5, 6], [1, 2, 3, 4, 1, 6], [1, 2, 3, 4, 5, 1]], 1)\n assert [] == HumanEval.candidate([], 1)\n assert [] == HumanEval.candidate([[1]], 2)\n assert [{2, 2}] == HumanEval.candidate([[], [1], [1, 2, 3]], 3)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_88_sort_array", "language": "elixir", "prompt": "# Given an array of non-negative integers, return a copy of the given array after sorting,\n# you will sort the given array in ascending order if the sum( first index value, last index value) is odd,\n# or sort it in descending order if the sum( first index value, last index value) is even.\n# Note:\n# * don't change the given array.\n# Examples:\n# >>> HumanEval.sort_array([])\n# []\n# >>> HumanEval.sort_array([5])\n# [5]\n# >>> HumanEval.sort_array([2, 4, 3, 0, 1, 5])\n# [0, 1, 2, 3, 4, 5]\n# >>> HumanEval.sort_array([2, 4, 3, 0, 1, 5, 6])\n# [6, 5, 4, 3, 2, 1, 0]\n\ndefmodule HumanEval do\n def candidate(array), do: sort_array(array)\n def sort_array(array) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_88_sort_array.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sort_array' do\n assert [] == HumanEval.candidate([])\n assert [5] == HumanEval.candidate([5])\n assert [0, 1, 2, 3, 4, 5] == HumanEval.candidate([2, 4, 3, 0, 1, 5])\n assert [6, 5, 4, 3, 2, 1, 0] == HumanEval.candidate([2, 4, 3, 0, 1, 5, 6])\n assert [1, 2] == HumanEval.candidate([2, 1])\n assert [0, 11, 15, 32, 42, 87] == HumanEval.candidate([15, 42, 87, 32, 11, 0])\n assert [23, 21, 14, 11] == HumanEval.candidate([21, 14, 23, 11])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_89_encrypt", "language": "elixir", "prompt": "# Create a function encrypt that takes a string as an argument and\n# returns a string encrypted with the alphabet being rotated. \n# The alphabet should be rotated in a manner such that the letters \n# shift down by two multiplied to two places.\n# For example:\n# >>> HumanEval.encrypt(\"hi\")\n# \"lm\"\n# >>> HumanEval.encrypt(\"asdfghjkl\")\n# \"ewhjklnop\"\n# >>> HumanEval.encrypt(\"gf\")\n# \"kj\"\n# >>> HumanEval.encrypt(\"et\")\n# \"ix\"\n\ndefmodule HumanEval do\n def candidate(s), do: encrypt(s)\n def encrypt(s) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_89_encrypt.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'encrypt' do\n assert \"lm\" == HumanEval.candidate(\"hi\")\n assert \"ewhjklnop\" == HumanEval.candidate(\"asdfghjkl\")\n assert \"kj\" == HumanEval.candidate(\"gf\")\n assert \"ix\" == HumanEval.candidate(\"et\")\n assert \"jeiajeaijeiak\" == HumanEval.candidate(\"faewfawefaewg\")\n assert \"lippsqcjvmirh\" == HumanEval.candidate(\"hellomyfriend\")\n assert \"hbdhpqrmpjylqmpyjlpmlyjrqpmqryjlpmqryjljygyjl\" == HumanEval.candidate(\"dxzdlmnilfuhmilufhlihufnmlimnufhlimnufhfucufh\")\n assert \"e\" == HumanEval.candidate(\"a\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_8_sum_product", "language": "elixir", "prompt": "# For a given list of integers, return a tuple consisting of a sum and a product of all the integers in a list.\n# Empty sum should be equal to 0 and empty product should be equal to 1.\n# >>> HumanEval.sum_product([])\n# {0, 1}\n# >>> HumanEval.sum_product([1, 2, 3, 4])\n# {10, 24}\n\ndefmodule HumanEval do\n def candidate(numbers), do: sum_product(numbers)\n def sum_product(numbers) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_8_sum_product.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'sum_product' do\n assert {0, 1} == HumanEval.candidate([])\n assert {3, 1} == HumanEval.candidate([1, 1, 1])\n assert {100, 0} == HumanEval.candidate([100, 0])\n assert {15, 105} == HumanEval.candidate([3, 5, 7])\n assert {10, 10} == HumanEval.candidate([10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_90_next_smallest", "language": "elixir", "prompt": "# You are given a list of integers.\n# Write a function next_smallest() that returns the 2nd smallest element of the list.\n# Return None if there is no such element.\n# >>> HumanEval.next_smallest([1, 2, 3, 4, 5])\n# 2\n# >>> HumanEval.next_smallest([5, 1, 4, 3, 2])\n# 2\n# >>> HumanEval.next_smallest([])\n# nil\n# >>> HumanEval.next_smallest([1, 1])\n# nil\n\ndefmodule HumanEval do\n def candidate(lst), do: next_smallest(lst)\n def next_smallest(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_90_next_smallest.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'next_smallest' do\n assert 2 == HumanEval.candidate([1, 2, 3, 4, 5])\n assert 2 == HumanEval.candidate([5, 1, 4, 3, 2])\n assert nil == HumanEval.candidate([])\n assert nil == HumanEval.candidate([1, 1])\n assert 1 == HumanEval.candidate([1, 1, 1, 1, 0])\n assert nil == HumanEval.candidate([1, 1])\n assert -35 == HumanEval.candidate([-35, 34, 12, -45])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_91_is_bored", "language": "elixir", "prompt": "# You'll be given a string of words, and your task is to count the number\n# of boredoms. A boredom is a sentence that starts with the word \"I\".\n# Sentences are delimited by '.', '?' or '!'.\n# For example:\n# >>> HumanEval.is_bored(\"Hello world\")\n# 0\n# >>> HumanEval.is_bored(\"The sky is blue. The sun is shining. I love this weather\")\n# 1\n\ndefmodule HumanEval do\n def candidate(S), do: is_bored(S)\n def is_bored(S) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_91_is_bored.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'is_bored' do\n assert 0 == HumanEval.candidate(\"Hello world\")\n assert 0 == HumanEval.candidate(\"Is the sky blue?\")\n assert 1 == HumanEval.candidate(\"I love It !\")\n assert 0 == HumanEval.candidate(\"bIt\")\n assert 2 == HumanEval.candidate(\"I feel good today. I will be productive. will kill It\")\n assert 0 == HumanEval.candidate(\"You and I are going for a walk\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_92_any_int", "language": "elixir", "prompt": "# Create a function that takes 3 numbers.\n# Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.\n# Returns false in any other cases.\n# Examples\n# >>> HumanEval.any_int(5, 2, 7)\n# true\n# >>> HumanEval.any_int(3, 2, 2)\n# false\n# >>> HumanEval.any_int(3, -2, 1)\n# true\n# >>> HumanEval.any_int(3.6, -2.2, 2)\n# false\n\ndefmodule HumanEval do\n def candidate(x, y, z), do: any_int(x, y, z)\n def any_int(x, y, z) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_92_any_int.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'any_int' do\n assert true == HumanEval.candidate(2, 3, 1)\n assert false == HumanEval.candidate(2.5, 2, 3)\n assert false == HumanEval.candidate(1.5, 5, 3.5)\n assert false == HumanEval.candidate(2, 6, 2)\n assert true == HumanEval.candidate(4, 2, 2)\n assert false == HumanEval.candidate(2.2, 2.2, 2.2)\n assert true == HumanEval.candidate(-4, 6, 2)\n assert true == HumanEval.candidate(2, 1, 1)\n assert true == HumanEval.candidate(3, 4, 7)\n assert false == HumanEval.candidate(3.0, 4, 7)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_93_encode", "language": "elixir", "prompt": "# Write a function that takes a message, and encodes in such a \n# way that it swaps case of all letters, replaces all vowels in \n# the message with the letter that appears 2 places ahead of that \n# vowel in the english alphabet. \n# Assume only letters. \n# Examples:\n# >>> HumanEval.encode(\"test\")\n# \"TGST\"\n# >>> HumanEval.encode(\"This is a message\")\n# \"tHKS KS C MGSSCGG\"\n\ndefmodule HumanEval do\n def candidate(message), do: encode(message)\n def encode(message) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_93_encode.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'encode' do\n assert \"tgst\" == HumanEval.candidate(\"TEST\")\n assert \"mWDCSKR\" == HumanEval.candidate(\"Mudasir\")\n assert \"ygs\" == HumanEval.candidate(\"YES\")\n assert \"tHKS KS C MGSSCGG\" == HumanEval.candidate(\"This is a message\")\n assert \"k dQnT kNqW wHcT Tq wRkTg\" == HumanEval.candidate(\"I DoNt KnOw WhAt tO WrItE\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_94_skjkasdkd", "language": "elixir", "prompt": "# You are given a list of integers.\n# You need to find the largest prime value and return the sum of its digits.\n# Examples:\n# >>> HumanEval.skjkasdkd([0, 3, 2, 1, 3, 5, 7, 4, 5, 5, 5, 2, 181, 32, 4, 32, 3, 2, 32, 324, 4, 3])\n# 10\n# >>> HumanEval.skjkasdkd([1, 0, 1, 8, 2, 4597, 2, 1, 3, 40, 1, 2, 1, 2, 4, 2, 5, 1])\n# 25\n# >>> HumanEval.skjkasdkd([1, 3, 1, 32, 5107, 34, 83278, 109, 163, 23, 2323, 32, 30, 1, 9, 3])\n# 13\n# >>> HumanEval.skjkasdkd([0, 724, 32, 71, 99, 32, 6, 0, 5, 91, 83, 0, 5, 6])\n# 11\n# >>> HumanEval.skjkasdkd([0, 81, 12, 3, 1, 21])\n# 3\n# >>> HumanEval.skjkasdkd([0, 8, 1, 2, 1, 7])\n# 7\n\ndefmodule HumanEval do\n def candidate(lst), do: skjkasdkd(lst)\n def skjkasdkd(lst) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_94_skjkasdkd.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'skjkasdkd' do\n assert 10 == HumanEval.candidate([0, 3, 2, 1, 3, 5, 7, 4, 5, 5, 5, 2, 181, 32, 4, 32, 3, 2, 32, 324, 4, 3])\n assert 25 == HumanEval.candidate([1, 0, 1, 8, 2, 4597, 2, 1, 3, 40, 1, 2, 1, 2, 4, 2, 5, 1])\n assert 13 == HumanEval.candidate([1, 3, 1, 32, 5107, 34, 83278, 109, 163, 23, 2323, 32, 30, 1, 9, 3])\n assert 11 == HumanEval.candidate([0, 724, 32, 71, 99, 32, 6, 0, 5, 91, 83, 0, 5, 6])\n assert 3 == HumanEval.candidate([0, 81, 12, 3, 1, 21])\n assert 7 == HumanEval.candidate([0, 8, 1, 2, 1, 7])\n assert 19 == HumanEval.candidate([8191])\n assert 19 == HumanEval.candidate([8191, 123456, 127, 7])\n assert 10 == HumanEval.candidate([127, 97, 8192])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_95_check_dict_case", "language": "elixir", "prompt": "# Given a dictionary, return True if all keys are strings in lower \n# case or all keys are strings in upper case, else return False.\n# The function should return False is the given dictionary is empty.\n# Examples:\n# >>> HumanEval.check_dict_case(%{\"a\" => \"apple\", \"b\" => \"banana\"})\n# true\n# >>> HumanEval.check_dict_case(%{\"a\" => \"apple\", \"A\" => \"banana\", \"B\" => \"banana\"})\n# false\n# >>> HumanEval.check_dict_case(%{\"a\" => \"apple\", 8 => \"banana\", \"a\" => \"apple\"})\n# false\n# >>> HumanEval.check_dict_case(%{\"Name\" => \"John\", \"Age\" => \"36\", \"City\" => \"Houston\"})\n# false\n# >>> HumanEval.check_dict_case(%{\"STATE\" => \"NC\", \"ZIP\" => \"12345\"})\n# true\n\ndefmodule HumanEval do\n def candidate(dict), do: check_dict_case(dict)\n def check_dict_case(dict) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_95_check_dict_case.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'check_dict_case' do\n assert true == HumanEval.candidate(%{\"p\" => \"pineapple\", \"b\" => \"banana\"})\n assert false == HumanEval.candidate(%{\"p\" => \"pineapple\", \"A\" => \"banana\", \"B\" => \"banana\"})\n assert false == HumanEval.candidate(%{\"p\" => \"pineapple\", \"5\" => \"banana\", \"a\" => \"apple\"})\n assert false == HumanEval.candidate(%{\"Name\" => \"John\", \"Age\" => \"36\", \"City\" => \"Houston\"})\n assert true == HumanEval.candidate(%{\"STATE\" => \"NC\", \"ZIP\" => \"12345\"})\n assert true == HumanEval.candidate(%{\"fruit\" => \"Orange\", \"taste\" => \"Sweet\"})\n assert false == HumanEval.candidate(%{})\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_96_count_up_to", "language": "elixir", "prompt": "# Implement a function that takes an non-negative integer and returns an array of the first n\n# integers that are prime numbers and less than n.\n# for example:\n# >>> HumanEval.count_up_to(5)\n# [2, 3]\n# >>> HumanEval.count_up_to(11)\n# [2, 3, 5, 7]\n# >>> HumanEval.count_up_to(0)\n# []\n# >>> HumanEval.count_up_to(20)\n# [2, 3, 5, 7, 11, 13, 17, 19]\n# >>> HumanEval.count_up_to(1)\n# []\n# >>> HumanEval.count_up_to(18)\n# [2, 3, 5, 7, 11, 13, 17]\n\ndefmodule HumanEval do\n def candidate(n), do: count_up_to(n)\n def count_up_to(n) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_96_count_up_to.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'count_up_to' do\n assert [2, 3] == HumanEval.candidate(5)\n assert [2, 3, 5] == HumanEval.candidate(6)\n assert [2, 3, 5] == HumanEval.candidate(7)\n assert [2, 3, 5, 7] == HumanEval.candidate(10)\n assert [] == HumanEval.candidate(0)\n assert [2, 3, 5, 7, 11, 13, 17, 19] == HumanEval.candidate(22)\n assert [] == HumanEval.candidate(1)\n assert [2, 3, 5, 7, 11, 13, 17] == HumanEval.candidate(18)\n assert [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43] == HumanEval.candidate(47)\n assert [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97] == HumanEval.candidate(101)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_97_multiply", "language": "elixir", "prompt": "# Complete the function that takes two integers and returns \n# the product of their unit digits.\n# Assume the input is always valid.\n# Examples:\n# >>> HumanEval.multiply(148, 412)\n# 16\n# >>> HumanEval.multiply(19, 28)\n# 72\n# >>> HumanEval.multiply(2020, 1851)\n# 0\n# >>> HumanEval.multiply(14, -15)\n# 20\n\ndefmodule HumanEval do\n def candidate(a, b), do: multiply(a, b)\n def multiply(a, b) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_97_multiply.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'multiply' do\n assert 16 == HumanEval.candidate(148, 412)\n assert 72 == HumanEval.candidate(19, 28)\n assert 0 == HumanEval.candidate(2020, 1851)\n assert 20 == HumanEval.candidate(14, -15)\n assert 42 == HumanEval.candidate(76, 67)\n assert 49 == HumanEval.candidate(17, 27)\n assert 0 == HumanEval.candidate(0, 1)\n assert 0 == HumanEval.candidate(0, 0)\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_98_count_upper", "language": "elixir", "prompt": "# Given a string s, count the number of uppercase vowels in even indices.\n# For example:\n# >>> HumanEval.count_upper(\"aBCdEf\")\n# 1\n# >>> HumanEval.count_upper(\"abcdefg\")\n# 0\n# >>> HumanEval.count_upper(\"dBBE\")\n# 0\n\ndefmodule HumanEval do\n def candidate(s), do: count_upper(s)\n def count_upper(s) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_98_count_upper.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'count_upper' do\n assert 1 == HumanEval.candidate(\"aBCdEf\")\n assert 0 == HumanEval.candidate(\"abcdefg\")\n assert 0 == HumanEval.candidate(\"dBBE\")\n assert 0 == HumanEval.candidate(\"B\")\n assert 1 == HumanEval.candidate(\"U\")\n assert 0 == HumanEval.candidate(\"\")\n assert 2 == HumanEval.candidate(\"EEEE\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_99_closest_integer", "language": "elixir", "prompt": "# Create a function that takes a value (string) representing a number\n# and returns the closest integer to it. If the number is equidistant\n# from two integers, round it away from zero.\n# Examples\n# >>> HumanEval.closest_integer(\"10\")\n# 10\n# >>> HumanEval.closest_integer(\"15.3\")\n# 15\n# Note:\n# Rounding away from zero means that if the given number is equidistant\n# from two integers, the one you should return is the one that is the\n# farthest from zero. For example closest_integer(\"14.5\") should\n# return 15 and closest_integer(\"-14.5\") should return -15.\n\ndefmodule HumanEval do\n def candidate(value), do: closest_integer(value)\n def closest_integer(value) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_99_closest_integer.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'closest_integer' do\n assert 10 == HumanEval.candidate(\"10\")\n assert 15 == HumanEval.candidate(\"14.5\")\n assert -16 == HumanEval.candidate(\"-15.5\")\n assert 15 == HumanEval.candidate(\"15.3\")\n assert 0 == HumanEval.candidate(\"0\")\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "HumanEval_9_rolling_max", "language": "elixir", "prompt": "# From a given list of integers, generate a list of rolling maximum element found until given moment\n# in the sequence.\n# >>> HumanEval.rolling_max([1, 2, 3, 2, 3, 4, 2])\n# [1, 2, 3, 3, 3, 4, 4]\n\ndefmodule HumanEval do\n def candidate(numbers), do: rolling_max(numbers)\n def rolling_max(numbers) do\n ", "doctests": "transform", "original": "/home/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_9_rolling_max.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test 'rolling_max' do\n assert [] == HumanEval.candidate([])\n assert [1, 2, 3, 4] == HumanEval.candidate([1, 2, 3, 4])\n assert [4, 4, 4, 4] == HumanEval.candidate([4, 3, 2, 1])\n assert [3, 3, 3, 100, 100] == HumanEval.candidate([3, 2, 3, 100, 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} diff --git a/prompts/mbpp-elixir-keep.jsonl b/prompts/mbpp-elixir-keep.jsonl new file mode 100644 index 0000000000..632489bc86 --- /dev/null +++ b/prompts/mbpp-elixir-keep.jsonl @@ -0,0 +1,397 @@ +{"name": "mbpp_100_next_smallest_palindrome", "language": "elixir", "prompt": "# Write a function to find the next smallest palindrome of a specified integer, returned as an integer.\n\n\ndefmodule HumanEval do\n def next_smallest_palindrome(n, u, m) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_100_next_smallest_palindrome.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"next_smallest_palindrome\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :next_smallest_palindrome end)\n candidate = fn args -> apply(HumanEval, next_smallest_palindrome, args) end\n assert 101 == candidate.([99])\n assert 1331 == candidate.([1221])\n assert 121 == candidate.([120])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_101_kth_element", "language": "elixir", "prompt": "# Write a function to find the kth element in the given array using 1-based indexing.\n\n\ndefmodule HumanEval do\n def kth_element(a, r, r, ,, , k) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_101_kth_element.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"kth_element\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :kth_element end)\n candidate = fn args -> apply(HumanEval, kth_element, args) end\n assert 3 == candidate.([[12, 3, 5, 7, 19], 2])\n assert 8 == candidate.([[17, 24, 8, 23], 3])\n assert 36 == candidate.([[16, 21, 25, 36, 4], 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_102_snake_to_camel", "language": "elixir", "prompt": "# Write a function to convert a snake case string to camel case string.\n\n\ndefmodule HumanEval do\n def snake_to_camel(w, o, r, d) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_102_snake_to_camel.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"snake_to_camel\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :snake_to_camel end)\n candidate = fn args -> apply(HumanEval, snake_to_camel, args) end\n assert \"PythonProgram\" == candidate.([\"python_program\"])\n assert \"PythonLanguage\" == candidate.([\"python_language\"])\n assert \"ProgrammingLanguage\" == candidate.([\"programming_language\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_103_eulerian_num", "language": "elixir", "prompt": "# Write a function to find the Eulerian number a(n, m).\n\n\ndefmodule HumanEval do\n def eulerian_num(n, ,, , m) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_103_eulerian_num.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"eulerian_num\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :eulerian_num end)\n candidate = fn args -> apply(HumanEval, eulerian_num, args) end\n assert 4 == candidate.([3, 1])\n assert 11 == candidate.([4, 1])\n assert 26 == candidate.([5, 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_104_sort_sublists", "language": "elixir", "prompt": "# Write a function to sort each sublist of strings in a given list of lists.\n\n\ndefmodule HumanEval do\n def sort_sublists(i, n, p, u, t, _, l, i, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_104_sort_sublists.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sort_sublists\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sort_sublists end)\n candidate = fn args -> apply(HumanEval, sort_sublists, args) end\n assert [[\"green\", \"orange\"], [\"black\", \"white\"], [\"black\", \"orange\", \"white\"]] == candidate.([[[\"green\", \"orange\"], [\"black\", \"white\"], [\"white\", \"black\", \"orange\"]]])\n assert [[\" red \", \"green\"], [\" black\", \"blue \"], [\" orange\", \"brown\"]] == candidate.([[[\" red \", \"green\"], [\"blue \", \" black\"], [\" orange\", \"brown\"]]])\n assert [[\"gold\", \"zilver\"], [\"aluminium\", \"magnesium\"], [\"bronze\", \"steel\"]] == candidate.([[[\"zilver\", \"gold\"], [\"magnesium\", \"aluminium\"], [\"steel\", \"bronze\"]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_105_count", "language": "elixir", "prompt": "# Write a python function to count true booleans in the given list.\n\n\ndefmodule HumanEval do\n def count(l, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_105_count.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count end)\n candidate = fn args -> apply(HumanEval, count, args) end\n assert 2 == candidate.([[true, false, true]])\n assert 0 == candidate.([[false, false]])\n assert 3 == candidate.([[true, true, true]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_106_add_lists", "language": "elixir", "prompt": "# Write a function to append the given list to the given tuples.\n\n\ndefmodule HumanEval do\n def add_lists(t, e, s, t, _, l, i, s, t, ,, , t, e, s, t, _, t, u, p) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_106_add_lists.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"add_lists\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :add_lists end)\n candidate = fn args -> apply(HumanEval, add_lists, args) end\n assert {9, 10, 5, 6, 7} == candidate.([[5, 6, 7], {9, 10}])\n assert {10, 11, 6, 7, 8} == candidate.([[6, 7, 8], {10, 11}])\n assert {11, 12, 7, 8, 9} == candidate.([[7, 8, 9], {11, 12}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_108_merge_sorted_list", "language": "elixir", "prompt": "# Write a function to merge three lists into a single sorted list.\n\n\ndefmodule HumanEval do\n def merge_sorted_list(n, u, m, 1, ,, , n, u, m, 2, ,, , n, u, m, 3) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_108_merge_sorted_list.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"merge_sorted_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :merge_sorted_list end)\n candidate = fn args -> apply(HumanEval, merge_sorted_list, args) end\n assert [4, 5, 11, 15, 19, 20, 24, 24, 25, 25, 26, 29, 48, 54, 56, 110, 154, 233] == candidate.([[25, 24, 15, 4, 5, 29, 110], [19, 20, 11, 56, 25, 233, 154], [24, 26, 54, 48]])\n assert [1, 1, 2, 3, 4, 5, 5, 6, 7, 7, 8, 8, 9, 11, 12] == candidate.([[1, 3, 5, 6, 8, 9], [2, 5, 7, 11], [1, 4, 7, 8, 12]])\n assert [1, 2, 3, 4, 7, 8, 9, 9, 9, 10, 12, 14, 14, 18, 22, 25, 25, 35, 41, 50, 58, 61, 65, 74, 75, 85] == candidate.([[18, 14, 10, 9, 8, 7, 9, 3, 2, 4, 1], [25, 35, 22, 85, 14, 65, 75, 25, 58], [12, 74, 9, 50, 61, 41]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_109_odd_Equivalent", "language": "elixir", "prompt": "# Write a python function to find the number of numbers with an odd value when rotating a binary string the given number of times.\n\n\ndefmodule HumanEval do\n def odd_Equivalent(s, ,, , n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_109_odd_Equivalent.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"odd_Equivalent\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :odd_Equivalent end)\n candidate = fn args -> apply(HumanEval, odd_Equivalent, args) end\n assert 3 == candidate.([\"011001\", 6])\n assert 4 == candidate.([\"11011\", 5])\n assert 2 == candidate.([\"1010\", 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_113_check_integer", "language": "elixir", "prompt": "# Write a function to check if a string represents an integer or not.\n\n\ndefmodule HumanEval do\n def check_integer(t, e, x, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_113_check_integer.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_integer\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_integer end)\n candidate = fn args -> apply(HumanEval, check_integer, args) end\n assert false == candidate.([\"python\"])\n assert true == candidate.([\"1\"])\n assert true == candidate.([\"12345\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_116_tuple_to_int", "language": "elixir", "prompt": "# Write a function to convert a given tuple of positive integers into a single integer.\n\n\ndefmodule HumanEval do\n def tuple_to_int(n, u, m, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_116_tuple_to_int.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"tuple_to_int\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :tuple_to_int end)\n candidate = fn args -> apply(HumanEval, tuple_to_int, args) end\n assert 123 == candidate.([{1, 2, 3}])\n assert 456 == candidate.([{4, 5, 6}])\n assert 567 == candidate.([{5, 6, 7}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_117_list_to_float", "language": "elixir", "prompt": "# Write a function to convert all possible convertible elements in a list of lists to floats.\n\n\ndefmodule HumanEval do\n def list_to_float(t, e, s, t, _, l, i, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_117_list_to_float.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"list_to_float\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :list_to_float end)\n candidate = fn args -> apply(HumanEval, list_to_float, args) end\n assert [{3.0, 4.0}, {1.0, 26.45}, {7.32, 8.0}, {4.0, 8.0}] == candidate.([[{\"3\", \"4\"}, {\"1\", \"26.45\"}, {\"7.32\", \"8\"}, {\"4\", \"8\"}]])\n assert [{4.0, 4.0}, {2.0, 27.0}, {4.12, 9.0}, {7.0, 11.0}] == candidate.([[{\"4\", \"4\"}, {\"2\", \"27\"}, {\"4.12\", \"9\"}, {\"7\", \"11\"}]])\n assert [{6.0, 78.0}, {5.0, 26.45}, {1.33, 4.0}, {82.0, 13.0}] == candidate.([[{\"6\", \"78\"}, {\"5\", \"26.45\"}, {\"1.33\", \"4\"}, {\"82\", \"13\"}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_118_string_to_list", "language": "elixir", "prompt": "# Write a function to convert a string to a list of strings split on the space character.\n\n\ndefmodule HumanEval do\n def string_to_list(s, t, r, i, n, g) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_118_string_to_list.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"string_to_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :string_to_list end)\n candidate = fn args -> apply(HumanEval, string_to_list, args) end\n assert [\"python\", \"programming\"] == candidate.([\"python programming\"])\n assert [\"lists\", \"tuples\", \"strings\"] == candidate.([\"lists tuples strings\"])\n assert [\"write\", \"a\", \"program\"] == candidate.([\"write a program\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_119_search", "language": "elixir", "prompt": "# Write a python function to find the element that appears only once in a sorted array.\n\n\ndefmodule HumanEval do\n def search(a, r, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_119_search.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"search\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :search end)\n candidate = fn args -> apply(HumanEval, search, args) end\n assert 3 == candidate.([[1, 1, 2, 2, 3]])\n assert 8 == candidate.([[1, 1, 3, 3, 4, 4, 5, 5, 7, 7, 8]])\n assert 1 == candidate.([[1, 2, 2, 3, 3, 4, 4]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_11_remove_Occ", "language": "elixir", "prompt": "# Write a python function to remove first and last occurrence of a given character from the string.\n\n\ndefmodule HumanEval do\n def remove_Occ(s, ,, , c, h) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_11_remove_Occ.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_Occ\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_Occ end)\n candidate = fn args -> apply(HumanEval, remove_Occ, args) end\n assert \"heo\" == candidate.([\"hello\", \"l\"])\n assert \"bcd\" == candidate.([\"abcda\", \"a\"])\n assert \"H\" == candidate.([\"PHP\", \"P\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_120_max_product_tuple", "language": "elixir", "prompt": "# Write a function to find the maximum absolute product between numbers in pairs of tuples within a given list.\n\n\ndefmodule HumanEval do\n def max_product_tuple(l, i, s, t, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_120_max_product_tuple.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_product_tuple\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_product_tuple end)\n candidate = fn args -> apply(HumanEval, max_product_tuple, args) end\n assert 36 == candidate.([[{2, 7}, {2, 6}, {1, 8}, {4, 9}]])\n assert 200 == candidate.([[{10, 20}, {15, 2}, {5, 10}]])\n assert 484 == candidate.([[{11, 44}, {10, 15}, {20, 5}, {12, 9}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_123_amicable_numbers_sum", "language": "elixir", "prompt": "# Write a function to sum all amicable numbers from 1 to a specified number.\n\n\ndefmodule HumanEval do\n def amicable_numbers_sum(l, i, m, i, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_123_amicable_numbers_sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"amicable_numbers_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :amicable_numbers_sum end)\n candidate = fn args -> apply(HumanEval, amicable_numbers_sum, args) end\n assert 504 == candidate.([999])\n assert 31626 == candidate.([9999])\n assert 0 == candidate.([99])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_125_find_length", "language": "elixir", "prompt": "# Write a function to find the maximum difference between the number of 0s and number of 1s in any sub-string of the given binary string.\n\n\ndefmodule HumanEval do\n def find_length(s, t, r, i, n, g) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_125_find_length.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_length\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_length end)\n candidate = fn args -> apply(HumanEval, find_length, args) end\n assert 6 == candidate.([\"11000010001\"])\n assert 1 == candidate.([\"10111\"])\n assert 2 == candidate.([\"11011101100101\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_126_sum", "language": "elixir", "prompt": "# Write a python function to find the sum of common divisors of two given numbers.\n\n\ndefmodule HumanEval do\n def sum(a, ,, , b) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_126_sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum end)\n candidate = fn args -> apply(HumanEval, sum, args) end\n assert 6 == candidate.([10, 15])\n assert 93 == candidate.([100, 150])\n assert 3 == candidate.([4, 6])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_127_multiply_int", "language": "elixir", "prompt": "# Write a function to multiply two integers.\n\n\ndefmodule HumanEval do\n def multiply_int(x, ,, , y) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_127_multiply_int.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"multiply_int\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :multiply_int end)\n candidate = fn args -> apply(HumanEval, multiply_int, args) end\n assert 200 == candidate.([10, 20])\n assert 50 == candidate.([5, 10])\n assert 32 == candidate.([4, 8])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_128_long_words", "language": "elixir", "prompt": "# Write a function to find words that are longer than n characters from a given list of words.\n\n\ndefmodule HumanEval do\n def long_words(n, ,, , s, t, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_128_long_words.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"long_words\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :long_words end)\n candidate = fn args -> apply(HumanEval, long_words, args) end\n assert [\"python\", \"programming\", \"language\"] == candidate.([3, \"python is a programming language\"])\n assert [\"writing\", \"program\"] == candidate.([2, \"writing a program\"])\n assert [\"sorting\"] == candidate.([5, \"sorting list\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_129_magic_square_test", "language": "elixir", "prompt": "# Write a function to calculate whether the matrix is a magic square.\n\n\ndefmodule HumanEval do\n def magic_square_test(m, y, _, m, a, t, r, i, x) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_129_magic_square_test.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"magic_square_test\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :magic_square_test end)\n candidate = fn args -> apply(HumanEval, magic_square_test, args) end\n assert true == candidate.([[[7, 12, 1, 14], [2, 13, 8, 11], [16, 3, 10, 5], [9, 6, 15, 4]]])\n assert true == candidate.([[[2, 7, 6], [9, 5, 1], [4, 3, 8]]])\n assert false == candidate.([[[2, 7, 6], [9, 5, 1], [4, 3, 7]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_12_sort_matrix", "language": "elixir", "prompt": "# Write a function to sort a given matrix in ascending order according to the sum of its rows.\n\n\ndefmodule HumanEval do\n def sort_matrix(M) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_12_sort_matrix.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sort_matrix\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sort_matrix end)\n candidate = fn args -> apply(HumanEval, sort_matrix, args) end\n assert [[1, 1, 1], [1, 2, 3], [2, 4, 5]] == candidate.([[[1, 2, 3], [2, 4, 5], [1, 1, 1]]])\n assert [[-2, 4, -5], [1, -1, 1], [1, 2, 3]] == candidate.([[[1, 2, 3], [-2, 4, -5], [1, -1, 1]]])\n assert [[2, 1, 4], [6, 4, 3], [5, 8, 9]] == candidate.([[[5, 8, 9], [6, 4, 3], [2, 1, 4]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_130_max_occurrences", "language": "elixir", "prompt": "# Write a function to find the item with maximum frequency in a given list.\n\n\ndefmodule HumanEval do\n def max_occurrences(n, u, m, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_130_max_occurrences.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_occurrences\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_occurrences end)\n candidate = fn args -> apply(HumanEval, max_occurrences, args) end\n assert 2 == candidate.([[2, 3, 8, 4, 7, 9, 8, 2, 6, 5, 1, 6, 1, 2, 3, 2, 4, 6, 9, 1, 2]])\n assert 8 == candidate.([[2, 3, 8, 4, 7, 9, 8, 7, 9, 15, 14, 10, 12, 13, 16, 18]])\n assert 20 == candidate.([[10, 20, 20, 30, 40, 90, 80, 50, 30, 20, 50, 10]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_131_reverse_vowels", "language": "elixir", "prompt": "# Write a python function to reverse only the vowels of a given string (where y is not a vowel).\n\n\ndefmodule HumanEval do\n def reverse_vowels(s, t, r, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_131_reverse_vowels.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"reverse_vowels\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :reverse_vowels end)\n candidate = fn args -> apply(HumanEval, reverse_vowels, args) end\n assert \"Python\" == candidate.([\"Python\"])\n assert \"ASU\" == candidate.([\"USA\"])\n assert \"ab\" == candidate.([\"ab\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_132_tup_string", "language": "elixir", "prompt": "# Write a function to convert a list to a string.\n\n\ndefmodule HumanEval do\n def tup_string(t, u, p, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_132_tup_string.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"tup_string\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :tup_string end)\n candidate = fn args -> apply(HumanEval, tup_string, args) end\n assert \"exercises\" == candidate.([[\"e\", \"x\", \"e\", \"r\", \"c\", \"i\", \"s\", \"e\", \"s\"]])\n assert \"python\" == candidate.([[\"p\", \"y\", \"t\", \"h\", \"o\", \"n\"]])\n assert \"program\" == candidate.([[\"p\", \"r\", \"o\", \"g\", \"r\", \"a\", \"m\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_133_sum_negativenum", "language": "elixir", "prompt": "# Write a function to calculate the sum of the negative numbers of a given list of numbers.\n\n\ndefmodule HumanEval do\n def sum_negativenum(n, u, m, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_133_sum_negativenum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_negativenum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_negativenum end)\n candidate = fn args -> apply(HumanEval, sum_negativenum, args) end\n assert -32 == candidate.([[2, 4, -6, -9, 11, -12, 14, -5, 17]])\n assert -52 == candidate.([[10, 15, -14, 13, -18, 12, -20]])\n assert -894 == candidate.([[19, -65, 57, 39, 152, -639, 121, 44, 90, -190]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_135_hexagonal_num", "language": "elixir", "prompt": "# Write a function to find the nth hexagonal number.\n\n\ndefmodule HumanEval do\n def hexagonal_num(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_135_hexagonal_num.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"hexagonal_num\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :hexagonal_num end)\n candidate = fn args -> apply(HumanEval, hexagonal_num, args) end\n assert 190 == candidate.([10])\n assert 45 == candidate.([5])\n assert 91 == candidate.([7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_138_is_Sum_Of_Powers_Of_Two", "language": "elixir", "prompt": "# Write a python function to check whether the given number can be represented as sum of non-zero powers of 2 or not.\n\n\ndefmodule HumanEval do\n def is_Sum_Of_Powers_Of_Two(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_138_is_Sum_Of_Powers_Of_Two.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_Sum_Of_Powers_Of_Two\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_Sum_Of_Powers_Of_Two end)\n candidate = fn args -> apply(HumanEval, is_Sum_Of_Powers_Of_Two, args) end\n assert true == candidate.([10])\n assert false == candidate.([7])\n assert true == candidate.([14])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_141_pancake_sort", "language": "elixir", "prompt": "# Write a function to sort a list of elements.\n\n\ndefmodule HumanEval do\n def pancake_sort(n, u, m, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_141_pancake_sort.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"pancake_sort\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :pancake_sort end)\n candidate = fn args -> apply(HumanEval, pancake_sort, args) end\n assert [15, 25, 38, 69, 79] == candidate.([[15, 79, 25, 38, 69]])\n assert [12, 36, 54, 85, 98] == candidate.([[98, 12, 54, 36, 85]])\n assert [12, 23, 32, 41, 42] == candidate.([[41, 42, 32, 12, 23]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_142_count_samepair", "language": "elixir", "prompt": "# Write a function to count number items that are identical in the same position of three given lists.\n\n\ndefmodule HumanEval do\n def count_samepair(l, i, s, t, 1, ,, , l, i, s, t, 2, ,, , l, i, s, t, 3) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_142_count_samepair.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_samepair\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_samepair end)\n candidate = fn args -> apply(HumanEval, count_samepair, args) end\n assert 3 == candidate.([[1, 2, 3, 4, 5, 6, 7, 8], [2, 2, 3, 1, 2, 6, 7, 9], [2, 1, 3, 1, 2, 6, 7, 9]])\n assert 4 == candidate.([[1, 2, 3, 4, 5, 6, 7, 8], [2, 2, 3, 1, 2, 6, 7, 8], [2, 1, 3, 1, 2, 6, 7, 8]])\n assert 5 == candidate.([[1, 2, 3, 4, 2, 6, 7, 8], [2, 2, 3, 1, 2, 6, 7, 8], [2, 1, 3, 1, 2, 6, 7, 8]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_143_find_lists", "language": "elixir", "prompt": "# Write a function to find number of lists present in the given list.\n\n\ndefmodule HumanEval do\n def find_lists(I, n, p, u, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_143_find_lists.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_lists\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_lists end)\n candidate = fn args -> apply(HumanEval, find_lists, args) end\n assert 2 == candidate.([[[1, 2, 3, 4], [5, 6, 7, 8]]])\n assert 3 == candidate.([[[1, 2], [3, 4], [5, 6]]])\n assert 1 == candidate.([[9, 8, 7, 6, 5, 4, 3, 2, 1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_145_max_Abs_Diff", "language": "elixir", "prompt": "# Write a python function to find the maximum difference between any two elements in a given array.\n\n\ndefmodule HumanEval do\n def max_Abs_Diff(a, r, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_145_max_Abs_Diff.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_Abs_Diff\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_Abs_Diff end)\n candidate = fn args -> apply(HumanEval, max_Abs_Diff, args) end\n assert 4 == candidate.([[2, 1, 5, 3]])\n assert 8 == candidate.([[9, 3, 2, 5, 1]])\n assert 2 == candidate.([[3, 2, 1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_14_find_Volume", "language": "elixir", "prompt": "# Write a python function to find the volume of a triangular prism.\n\n\ndefmodule HumanEval do\n def find_Volume(l, ,, , b, ,, , h) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_14_find_Volume.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_Volume\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_Volume end)\n candidate = fn args -> apply(HumanEval, find_Volume, args) end\n assert 240 == candidate.([10, 8, 6])\n assert 6 == candidate.([3, 2, 2])\n assert 1 == candidate.([1, 2, 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_160_find_solution", "language": "elixir", "prompt": "# Write a function that returns integers x and y that satisfy ax + by = n as a tuple, or return None if no solution exists.\n\n\ndefmodule HumanEval do\n def find_solution(a, ,, , b, ,, , n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_160_find_solution.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_solution\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_solution end)\n candidate = fn args -> apply(HumanEval, find_solution, args) end\n assert {2, 1} == candidate.([2, 3, 7])\n assert nil == candidate.([4, 2, 7])\n assert {4, 1} == candidate.([1, 13, 17])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_161_remove_elements", "language": "elixir", "prompt": "# Write a function to remove all elements from a given list present in another list.\n\n\ndefmodule HumanEval do\n def remove_elements(l, i, s, t, 1, ,, , l, i, s, t, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_161_remove_elements.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_elements\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_elements end)\n candidate = fn args -> apply(HumanEval, remove_elements, args) end\n assert [1, 3, 5, 7, 9, 10] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [2, 4, 6, 8]])\n assert [2, 4, 6, 8, 9, 10] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 3, 5, 7]])\n assert [1, 2, 3, 4, 6, 8, 9, 10] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [5, 7]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_162_sum_series", "language": "elixir", "prompt": "# Write a function to calculate the sum (n - 2*i) from i=0 to n // 2, for instance n + (n-2) + (n-4)... (until n-x =< 0).\n\n\ndefmodule HumanEval do\n def sum_series(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_162_sum_series.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_series\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_series end)\n candidate = fn args -> apply(HumanEval, sum_series, args) end\n assert 12 == candidate.([6])\n assert 30 == candidate.([10])\n assert 25 == candidate.([9])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_164_are_equivalent", "language": "elixir", "prompt": "# Write a function to determine if the sum of the divisors of two integers are the same.\n\n\ndefmodule HumanEval do\n def are_equivalent(n, u, m, 1, ,, , n, u, m, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_164_are_equivalent.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"are_equivalent\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :are_equivalent end)\n candidate = fn args -> apply(HumanEval, are_equivalent, args) end\n assert false == candidate.([36, 57])\n assert false == candidate.([2, 4])\n assert true == candidate.([23, 47])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_165_count_char_position", "language": "elixir", "prompt": "# Write a function to count the number of characters in a string that occur at the same position in the string as in the English alphabet (case insensitive).\n\n\ndefmodule HumanEval do\n def count_char_position(s, t, r, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_165_count_char_position.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_char_position\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_char_position end)\n candidate = fn args -> apply(HumanEval, count_char_position, args) end\n assert 2 == candidate.([\"xbcefg\"])\n assert 3 == candidate.([\"ABcED\"])\n assert 5 == candidate.([\"AbgdeF\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_166_find_even_pair", "language": "elixir", "prompt": "# Write a function that counts the number of pairs of integers in a list that xor to an even number.\n\n\ndefmodule HumanEval do\n def find_even_pair(A) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_166_find_even_pair.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_even_pair\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_even_pair end)\n candidate = fn args -> apply(HumanEval, find_even_pair, args) end\n assert 4 == candidate.([[5, 4, 7, 2, 1]])\n assert 9 == candidate.([[7, 2, 8, 1, 0, 5, 11]])\n assert 1 == candidate.([[1, 2, 3]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_167_next_power_of_2", "language": "elixir", "prompt": "# Write a python function to find the smallest power of 2 greater than or equal to n.\n\n\ndefmodule HumanEval do\n def next_power_of_2(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_167_next_power_of_2.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"next_power_of_2\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :next_power_of_2 end)\n candidate = fn args -> apply(HumanEval, next_power_of_2, args) end\n assert 1 == candidate.([0])\n assert 8 == candidate.([5])\n assert 32 == candidate.([17])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_168_frequency", "language": "elixir", "prompt": "# Write a function to count the number of occurrences of a number in a given list.\n\n\ndefmodule HumanEval do\n def frequency(a, ,, , x) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_168_frequency.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"frequency\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :frequency end)\n candidate = fn args -> apply(HumanEval, frequency, args) end\n assert 0 == candidate.([[1, 2, 3], 4])\n assert 3 == candidate.([[1, 2, 2, 3, 3, 3, 4], 3])\n assert 2 == candidate.([[0, 1, 2, 3, 1, 2], 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_16_text_lowercase_underscore", "language": "elixir", "prompt": "# Write a function to that returns true if the input string contains sequences of lowercase letters joined with an underscore and false otherwise.\n\n\ndefmodule HumanEval do\n def text_lowercase_underscore(t, e, x, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_16_text_lowercase_underscore.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"text_lowercase_underscore\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :text_lowercase_underscore end)\n candidate = fn args -> apply(HumanEval, text_lowercase_underscore, args) end\n assert true == candidate.([\"aab_cbbbc\"])\n assert false == candidate.([\"aab_Abbbc\"])\n assert false == candidate.([\"Aaab_abbbc\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_170_sum_range_list", "language": "elixir", "prompt": "# Write a function to find the sum of numbers in a list within a range specified by two indices.\n\n\ndefmodule HumanEval do\n def sum_range_list(l, i, s, t, 1, ,, , m, ,, , n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_170_sum_range_list.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_range_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_range_list end)\n candidate = fn args -> apply(HumanEval, sum_range_list, args) end\n assert 29 == candidate.([[2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12], 8, 10])\n assert 16 == candidate.([[2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12], 5, 7])\n assert 38 == candidate.([[2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12], 7, 10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_171_perimeter_pentagon", "language": "elixir", "prompt": "# Write a function to find the perimeter of a regular pentagon from the length of its sides.\n\n\ndefmodule HumanEval do\n def perimeter_pentagon(a) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_171_perimeter_pentagon.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"perimeter_pentagon\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :perimeter_pentagon end)\n candidate = fn args -> apply(HumanEval, perimeter_pentagon, args) end\n assert 25 == candidate.([5])\n assert 50 == candidate.([10])\n assert 75 == candidate.([15])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_172_count_occurance", "language": "elixir", "prompt": "# Write a function to count the number of occurence of the string 'std' in a given string.\n\n\ndefmodule HumanEval do\n def count_occurance(s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_172_count_occurance.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_occurance\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_occurance end)\n candidate = fn args -> apply(HumanEval, count_occurance, args) end\n assert 3 == candidate.([\"letstdlenstdporstd\"])\n assert 1 == candidate.([\"truststdsolensporsd\"])\n assert 2 == candidate.([\"makestdsostdworthit\"])\n assert 1 == candidate.([\"stds\"])\n assert 0 == candidate.([\"\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_17_square_perimeter", "language": "elixir", "prompt": "# Write a function that returns the perimeter of a square given its side length as input.\n\n\ndefmodule HumanEval do\n def square_perimeter(a) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_17_square_perimeter.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"square_perimeter\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :square_perimeter end)\n candidate = fn args -> apply(HumanEval, square_perimeter, args) end\n assert 40 == candidate.([10])\n assert 20 == candidate.([5])\n assert 16 == candidate.([4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_18_remove_dirty_chars", "language": "elixir", "prompt": "# Write a function to remove characters from the first string which are present in the second string.\n\n\ndefmodule HumanEval do\n def remove_dirty_chars(s, t, r, i, n, g, ,, , s, e, c, o, n, d, _, s, t, r, i, n, g) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_18_remove_dirty_chars.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_dirty_chars\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_dirty_chars end)\n candidate = fn args -> apply(HumanEval, remove_dirty_chars, args) end\n assert \"bacuve\" == candidate.([\"probasscurve\", \"pros\"])\n assert \"digiidi\" == candidate.([\"digitalindia\", \"talent\"])\n assert \"emles\" == candidate.([\"exoticmiles\", \"toxic\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_19_test_duplicate", "language": "elixir", "prompt": "# Write a function to find whether a given array of integers contains any duplicate element.\n\n\ndefmodule HumanEval do\n def test_duplicate(a, r, r, a, y, n, u, m, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_19_test_duplicate.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"test_duplicate\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :test_duplicate end)\n candidate = fn args -> apply(HumanEval, test_duplicate, args) end\n assert false == candidate.([[1, 2, 3, 4, 5]])\n assert true == candidate.([[1, 2, 3, 4, 4]])\n assert true == candidate.([[1, 1, 2, 2, 3, 3, 4, 4, 5]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_20_is_woodall", "language": "elixir", "prompt": "# Write a function to check if the given number is woodball or not.\n\n\ndefmodule HumanEval do\n def is_woodall(x) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_20_is_woodall.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_woodall\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_woodall end)\n candidate = fn args -> apply(HumanEval, is_woodall, args) end\n assert true == candidate.([383])\n assert false == candidate.([254])\n assert false == candidate.([200])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_222_check_type", "language": "elixir", "prompt": "# Write a function to check if all the elements in tuple have same data type or not.\n\n\ndefmodule HumanEval do\n def check_type(t, e, s, t, _, t, u, p, l, e) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_222_check_type.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_type\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_type end)\n candidate = fn args -> apply(HumanEval, check_type, args) end\n assert true == candidate.([{5, 6, 7, 3, 5, 6}])\n assert false == candidate.([{1, 2, \"4\"}])\n assert true == candidate.([{3, 2, 1, 4, 5}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_223_is_majority", "language": "elixir", "prompt": "# Write a function that takes in a sorted array, its length (n), and an element and returns whether the element is the majority element in the given sorted array. (The majority element is the element that occurs more than n/2 times.)\n\n\ndefmodule HumanEval do\n def is_majority(a, r, r, ,, , n, ,, , x) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_223_is_majority.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_majority\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_majority end)\n candidate = fn args -> apply(HumanEval, is_majority, args) end\n assert true == candidate.([[1, 2, 3, 3, 3, 3, 10], 7, 3])\n assert false == candidate.([[1, 1, 2, 4, 4, 4, 6, 6], 8, 4])\n assert true == candidate.([[1, 1, 1, 2, 2], 5, 1])\n assert false == candidate.([[1, 1, 2, 2], 5, 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_224_count_Set_Bits", "language": "elixir", "prompt": "# Write a python function to count the number of set bits (binary digits with value 1) in a given number.\n\n\ndefmodule HumanEval do\n def count_Set_Bits(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_224_count_Set_Bits.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_Set_Bits\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_Set_Bits end)\n candidate = fn args -> apply(HumanEval, count_Set_Bits, args) end\n assert 1 == candidate.([2])\n assert 1 == candidate.([4])\n assert 2 == candidate.([6])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_226_odd_values_string", "language": "elixir", "prompt": "# Write a python function to remove the characters which have odd index values of a given string.\n\n\ndefmodule HumanEval do\n def odd_values_string(s, t, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_226_odd_values_string.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"odd_values_string\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :odd_values_string end)\n candidate = fn args -> apply(HumanEval, odd_values_string, args) end\n assert \"ace\" == candidate.([\"abcdef\"])\n assert \"pto\" == candidate.([\"python\"])\n assert \"dt\" == candidate.([\"data\"])\n assert \"lms\" == candidate.([\"lambs\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_227_min_of_three", "language": "elixir", "prompt": "# Write a function to find minimum of three numbers.\n\n\ndefmodule HumanEval do\n def min_of_three(a, ,, , b, ,, , c) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_227_min_of_three.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"min_of_three\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :min_of_three end)\n candidate = fn args -> apply(HumanEval, min_of_three, args) end\n assert 0 == candidate.([10, 20, 0])\n assert 15 == candidate.([19, 15, 18])\n assert -30 == candidate.([-10, -20, -30])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_228_all_Bits_Set_In_The_Given_Range", "language": "elixir", "prompt": "# Write a python function to check whether all the bits are unset in the given range or not.\n\n\ndefmodule HumanEval do\n def all_Bits_Set_In_The_Given_Range(n, ,, , l, ,, , r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_228_all_Bits_Set_In_The_Given_Range.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"all_Bits_Set_In_The_Given_Range\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :all_Bits_Set_In_The_Given_Range end)\n candidate = fn args -> apply(HumanEval, all_Bits_Set_In_The_Given_Range, args) end\n assert true == candidate.([4, 1, 2])\n assert true == candidate.([17, 2, 4])\n assert false == candidate.([39, 4, 6])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_229_re_arrange_array", "language": "elixir", "prompt": "# Write a function that takes in an array and an integer n, and re-arranges the first n elements of the given array so that all negative elements appear before positive ones, and where the relative order among negative and positive elements is preserved.\n\n\ndefmodule HumanEval do\n def re_arrange_array(a, r, r, ,, , n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_229_re_arrange_array.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"re_arrange_array\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :re_arrange_array end)\n candidate = fn args -> apply(HumanEval, re_arrange_array, args) end\n assert [-1, -3, -7, 4, 5, 6, 2, 8, 9] == candidate.([[-1, 2, -3, 4, 5, 6, -7, 8, 9], 9])\n assert [-14, -26, 12, 13, 15] == candidate.([[12, -14, -26, 13, 15], 5])\n assert [-42, -39, -78, 10, 24, 36, 85] == candidate.([[10, 24, 36, -42, -39, -78, 85], 7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_230_replace_blank", "language": "elixir", "prompt": "# Write a function that takes in a string and character, replaces blank spaces in the string with the character, and returns the string.\n\n\ndefmodule HumanEval do\n def replace_blank(s, t, r, 1, ,, , c, h, a, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_230_replace_blank.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"replace_blank\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :replace_blank end)\n candidate = fn args -> apply(HumanEval, replace_blank, args) end\n assert \"hello@people\" == candidate.([\"hello people\", \"@\"])\n assert \"python$program$language\" == candidate.([\"python program language\", \"$\"])\n assert \"blank-space\" == candidate.([\"blank space\", \"-\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_234_volume_cube", "language": "elixir", "prompt": "# Write a function to find the volume of a cube given its side length.\n\n\ndefmodule HumanEval do\n def volume_cube(l) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_234_volume_cube.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"volume_cube\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :volume_cube end)\n candidate = fn args -> apply(HumanEval, volume_cube, args) end\n assert 27 == candidate.([3])\n assert 8 == candidate.([2])\n assert 125 == candidate.([5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_237_check_occurences", "language": "elixir", "prompt": "# Write a function that takes in a list of tuples and returns a dictionary mapping each unique tuple to the number of times it occurs in the list.\n\n\ndefmodule HumanEval do\n def check_occurences(t, e, s, t, _, l, i, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_237_check_occurences.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_occurences\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_occurences end)\n candidate = fn args -> apply(HumanEval, check_occurences, args) end\n assert %{{1, 3} => 2, {2, 5} => 2, {3, 6} => 1} == candidate.([[{3, 1}, {1, 3}, {2, 5}, {5, 2}, {6, 3}]])\n assert %{{2, 4} => 2, {3, 6} => 2, {4, 7} => 1} == candidate.([[{4, 2}, {2, 4}, {3, 6}, {6, 3}, {7, 4}]])\n assert %{{2, 13} => 1, {11, 23} => 1, {12, 25} => 2, {16, 23} => 1} == candidate.([[{13, 2}, {11, 23}, {12, 25}, {25, 12}, {16, 23}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_238_number_of_substrings", "language": "elixir", "prompt": "# Write a python function to count the number of non-empty substrings of a given string.\n\n\ndefmodule HumanEval do\n def number_of_substrings(s, t, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_238_number_of_substrings.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"number_of_substrings\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :number_of_substrings end)\n candidate = fn args -> apply(HumanEval, number_of_substrings, args) end\n assert 6 == candidate.([\"abc\"])\n assert 10 == candidate.([\"abcd\"])\n assert 15 == candidate.([\"abcde\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_239_get_total_number_of_sequences", "language": "elixir", "prompt": "# Write a function that takes in positive integers m and n and finds the number of possible sequences of length n, such that each element is a positive integer and is greater than or equal to twice the previous element but less than or equal to m.\n\n\ndefmodule HumanEval do\n def get_total_number_of_sequences(m, ,, , n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_239_get_total_number_of_sequences.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"get_total_number_of_sequences\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :get_total_number_of_sequences end)\n candidate = fn args -> apply(HumanEval, get_total_number_of_sequences, args) end\n assert 4 == candidate.([10, 4])\n assert 6 == candidate.([5, 2])\n assert 84 == candidate.([16, 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_240_replace_list", "language": "elixir", "prompt": "# Write a function that takes in two lists and replaces the last element of the first list with the elements of the second list.\n\n\ndefmodule HumanEval do\n def replace_list(l, i, s, t, 1, ,, , l, i, s, t, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_240_replace_list.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"replace_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :replace_list end)\n candidate = fn args -> apply(HumanEval, replace_list, args) end\n assert [1, 3, 5, 7, 9, 2, 4, 6, 8] == candidate.([[1, 3, 5, 7, 9, 10], [2, 4, 6, 8]])\n assert [1, 2, 3, 4, 5, 6, 7, 8] == candidate.([[1, 2, 3, 4, 5], [5, 6, 7, 8]])\n assert [\"red\", \"blue\", \"yellow\"] == candidate.([[\"red\", \"blue\", \"green\"], [\"yellow\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_242_count_charac", "language": "elixir", "prompt": "# Write a function to count the total number of characters in a string.\n\n\ndefmodule HumanEval do\n def count_charac(s, t, r, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_242_count_charac.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_charac\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_charac end)\n candidate = fn args -> apply(HumanEval, count_charac, args) end\n assert 18 == candidate.([\"python programming\"])\n assert 8 == candidate.([\"language\"])\n assert 5 == candidate.([\"words\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_244_next_Perfect_Square", "language": "elixir", "prompt": "# Write a python function to find the next perfect square greater than a given number.\n\n\ndefmodule HumanEval do\n def next_Perfect_Square(N) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_244_next_Perfect_Square.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"next_Perfect_Square\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :next_Perfect_Square end)\n candidate = fn args -> apply(HumanEval, next_Perfect_Square, args) end\n assert 36 == candidate.([35])\n assert 9 == candidate.([6])\n assert 16 == candidate.([9])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_245_max_sum", "language": "elixir", "prompt": "# Write a function that takes an array and finds the maximum sum of a bitonic subsequence for the given array, where a sequence is bitonic if it is first increasing and then decreasing.\n\n\ndefmodule HumanEval do\n def max_sum(a, r, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_245_max_sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_sum end)\n candidate = fn args -> apply(HumanEval, max_sum, args) end\n assert 194 == candidate.([[1, 15, 51, 45, 33, 100, 12, 18, 9]])\n assert 210 == candidate.([[80, 60, 30, 40, 20, 10]])\n assert 138 == candidate.([[2, 3, 14, 16, 21, 23, 29, 30]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_247_lps", "language": "elixir", "prompt": "# Write a function to find the length of the longest palindromic subsequence in the given string.\n\n\ndefmodule HumanEval do\n def lps(s, t, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_247_lps.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"lps\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :lps end)\n candidate = fn args -> apply(HumanEval, lps, args) end\n assert 5 == candidate.([\"TENS FOR TENS\"])\n assert 7 == candidate.([\"CARDIO FOR CARDS\"])\n assert 9 == candidate.([\"PART OF THE JOURNEY IS PART\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_249_intersection_array", "language": "elixir", "prompt": "# Write a function to find the intersection of two arrays.\n\n\ndefmodule HumanEval do\n def intersection_array(a, r, r, a, y, _, n, u, m, s, 1, ,, , a, r, r, a, y, _, n, u, m, s, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_249_intersection_array.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"intersection_array\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :intersection_array end)\n candidate = fn args -> apply(HumanEval, intersection_array, args) end\n assert [1, 2, 8, 9] == candidate.([[1, 2, 3, 5, 7, 8, 9, 10], [1, 2, 4, 8, 9]])\n assert [3, 5, 7, 9] == candidate.([[1, 2, 3, 5, 7, 8, 9, 10], [3, 5, 7, 9]])\n assert [10] == candidate.([[1, 2, 3, 5, 7, 8, 9, 10], [10, 20, 30, 40]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_250_count_X", "language": "elixir", "prompt": "# Write a python function that takes in a tuple and an element and counts the occcurences of the element in the list.\n\n\ndefmodule HumanEval do\n def count_X(t, u, p, ,, , x) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_250_count_X.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_X\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_X end)\n candidate = fn args -> apply(HumanEval, count_X, args) end\n assert 0 == candidate.([[10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2], 4])\n assert 3 == candidate.([[10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2], 10])\n assert 4 == candidate.([[10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2], 8])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_251_insert_element", "language": "elixir", "prompt": "# Write a function that takes in a list and an element and inserts the element before each element in the list, and returns the resulting list.\n\n\ndefmodule HumanEval do\n def insert_element(l, i, s, t, ,, , e, l, e, m, e, n, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_251_insert_element.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"insert_element\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :insert_element end)\n candidate = fn args -> apply(HumanEval, insert_element, args) end\n assert [\"c\", \"Red\", \"c\", \"Green\", \"c\", \"Black\"] == candidate.([[\"Red\", \"Green\", \"Black\"], \"c\"])\n assert [\"program\", \"python\", \"program\", \"java\"] == candidate.([[\"python\", \"java\"], \"program\"])\n assert [\"laugh\", \"happy\", \"laugh\", \"sad\"] == candidate.([[\"happy\", \"sad\"], \"laugh\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_252_convert", "language": "elixir", "prompt": "# Write a python function to convert complex numbers to polar coordinates.\n\n\ndefmodule HumanEval do\n def convert(n, u, m, b, e, r, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_252_convert.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"convert\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :convert end)\n candidate = fn args -> apply(HumanEval, convert, args) end\n assert {1.0, 0.0} == candidate.([1])\n assert {4.0, 0.0} == candidate.([4])\n assert {5.0, 0.0} == candidate.([5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_253_count_integer", "language": "elixir", "prompt": "# Write a python function that returns the number of integer elements in a given list.\n\n\ndefmodule HumanEval do\n def count_integer(l, i, s, t, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_253_count_integer.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_integer\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_integer end)\n candidate = fn args -> apply(HumanEval, count_integer, args) end\n assert 2 == candidate.([[1, 2, \"abc\", 1.2]])\n assert 3 == candidate.([[1, 2, 3]])\n assert 2 == candidate.([[1, 1.2, 4, 5.1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_255_combinations_colors", "language": "elixir", "prompt": "# Write a function that takes in a list and length n, and generates all combinations (with repetition) of the elements of the list and returns a list with a list for each combination.\n\n\ndefmodule HumanEval do\n def combinations_colors(l, ,, , n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_255_combinations_colors.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"combinations_colors\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :combinations_colors end)\n candidate = fn args -> apply(HumanEval, combinations_colors, args) end\n assert [[\"Red\"], [\"Green\"], [\"Blue\"]] == candidate.([[\"Red\", \"Green\", \"Blue\"], 1])\n assert [[\"Red\", \"Red\"], [\"Red\", \"Green\"], [\"Red\", \"Blue\"], [\"Green\", \"Green\"], [\"Green\", \"Blue\"], [\"Blue\", \"Blue\"]] == candidate.([[\"Red\", \"Green\", \"Blue\"], 2])\n assert [[\"Red\", \"Red\", \"Red\"], [\"Red\", \"Red\", \"Green\"], [\"Red\", \"Red\", \"Blue\"], [\"Red\", \"Green\", \"Green\"], [\"Red\", \"Green\", \"Blue\"], [\"Red\", \"Blue\", \"Blue\"], [\"Green\", \"Green\", \"Green\"], [\"Green\", \"Green\", \"Blue\"], [\"Green\", \"Blue\", \"Blue\"], [\"Blue\", \"Blue\", \"Blue\"]] == candidate.([[\"Red\", \"Green\", \"Blue\"], 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_256_count_Primes_nums", "language": "elixir", "prompt": "# Write a python function that takes in a non-negative number and returns the number of prime numbers less than the given non-negative number.\n\n\ndefmodule HumanEval do\n def count_Primes_nums(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_256_count_Primes_nums.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_Primes_nums\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_Primes_nums end)\n candidate = fn args -> apply(HumanEval, count_Primes_nums, args) end\n assert 2 == candidate.([5])\n assert 4 == candidate.([10])\n assert 25 == candidate.([100])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_257_swap_numbers", "language": "elixir", "prompt": "# Write a function that takes in two numbers and returns a list with the second number and then the first number.\n\n\ndefmodule HumanEval do\n def swap_numbers(a, ,, , b) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_257_swap_numbers.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"swap_numbers\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :swap_numbers end)\n candidate = fn args -> apply(HumanEval, swap_numbers, args) end\n assert [20, 10] == candidate.([10, 20])\n assert [17, 15] == candidate.([15, 17])\n assert [200, 100] == candidate.([100, 200])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_259_maximize_elements", "language": "elixir", "prompt": "# Write a function to maximize the given two lists.\n\n\ndefmodule HumanEval do\n def maximize_elements(t, e, s, t, _, t, u, p, 1, ,, , t, e, s, t, _, t, u, p, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_259_maximize_elements.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"maximize_elements\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :maximize_elements end)\n candidate = fn args -> apply(HumanEval, maximize_elements, args) end\n assert [[6, 7], [4, 9], [2, 9], [7, 10]] == candidate.([[[1, 3], [4, 5], [2, 9], [1, 10]], [[6, 7], [3, 9], [1, 1], [7, 3]]])\n assert [[7, 8], [5, 10], [3, 10], [8, 11]] == candidate.([[[2, 4], [5, 6], [3, 10], [2, 11]], [[7, 8], [4, 10], [2, 2], [8, 4]]])\n assert [[8, 9], [6, 11], [4, 11], [9, 12]] == candidate.([[[3, 5], [6, 7], [4, 11], [3, 12]], [[8, 9], [5, 11], [3, 3], [9, 5]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_260_newman_prime", "language": "elixir", "prompt": "# Write a function to find the nth newman\u2013shanks\u2013williams prime number.\n\n\ndefmodule HumanEval do\n def newman_prime(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_260_newman_prime.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"newman_prime\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :newman_prime end)\n candidate = fn args -> apply(HumanEval, newman_prime, args) end\n assert 7 == candidate.([3])\n assert 17 == candidate.([4])\n assert 41 == candidate.([5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_261_division_elements", "language": "elixir", "prompt": "# Write a function that takes in two tuples and performs mathematical division operation element-wise across the given tuples.\n\n\ndefmodule HumanEval do\n def division_elements(t, e, s, t, _, t, u, p, 1, ,, , t, e, s, t, _, t, u, p, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_261_division_elements.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"division_elements\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :division_elements end)\n candidate = fn args -> apply(HumanEval, division_elements, args) end\n assert {2, 2, 2, 3} == candidate.([{10, 4, 6, 9}, {5, 2, 3, 3}])\n assert {2, 2, 2, 4} == candidate.([{12, 6, 8, 16}, {6, 3, 4, 4}])\n assert {4, 2, 6, 2} == candidate.([{20, 14, 36, 18}, {5, 7, 6, 9}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_262_split_two_parts", "language": "elixir", "prompt": "# Write a function that takes in a list and an integer L and splits the given list into two parts where the length of the first part of the list is L, and returns the resulting lists in a tuple.\n\n\ndefmodule HumanEval do\n def split_two_parts(l, i, s, t, 1, ,, , L) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_262_split_two_parts.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"split_two_parts\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :split_two_parts end)\n candidate = fn args -> apply(HumanEval, split_two_parts, args) end\n assert {[1, 1, 2], [3, 4, 4, 5, 1]} == candidate.([[1, 1, 2, 3, 4, 4, 5, 1], 3])\n assert {[\"a\", \"b\"], [\"c\", \"d\"]} == candidate.([[\"a\", \"b\", \"c\", \"d\"], 2])\n assert {[\"p\", \"y\", \"t\", \"h\"], [\"o\", \"n\"]} == candidate.([[\"p\", \"y\", \"t\", \"h\", \"o\", \"n\"], 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_264_dog_age", "language": "elixir", "prompt": "# Write a function to calculate a dog's age in dog's years.\n\n\ndefmodule HumanEval do\n def dog_age(h, _, a, g, e) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_264_dog_age.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"dog_age\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :dog_age end)\n candidate = fn args -> apply(HumanEval, dog_age, args) end\n assert 61 == candidate.([12])\n assert 73 == candidate.([15])\n assert 109 == candidate.([24])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_265_list_split", "language": "elixir", "prompt": "# Write a function that takes in a list and an integer n and splits a list for every nth element, returning a list of the resulting lists.\n\n\ndefmodule HumanEval do\n def list_split(S, ,, , s, t, e, p) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_265_list_split.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"list_split\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :list_split end)\n candidate = fn args -> apply(HumanEval, list_split, args) end\n assert [[\"a\", \"d\", \"g\", \"j\", \"m\"], [\"b\", \"e\", \"h\", \"k\", \"n\"], [\"c\", \"f\", \"i\", \"l\"]] == candidate.([[\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\"], 3])\n assert [[1, 4, 7, 10, 13], [2, 5, 8, 11, 14], [3, 6, 9, 12]] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], 3])\n assert [[\"python\", \"C\", \"DBMS\"], [\"java\", \"C++\", \"SQL\"]] == candidate.([[\"python\", \"java\", \"C\", \"C++\", \"DBMS\", \"SQL\"], 2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_266_lateralsurface_cube", "language": "elixir", "prompt": "# Write a function to find the lateral surface area of a cube given its side length.\n\n\ndefmodule HumanEval do\n def lateralsurface_cube(l) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_266_lateralsurface_cube.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"lateralsurface_cube\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :lateralsurface_cube end)\n candidate = fn args -> apply(HumanEval, lateralsurface_cube, args) end\n assert 100 == candidate.([5])\n assert 324 == candidate.([9])\n assert 400 == candidate.([10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_267_square_Sum", "language": "elixir", "prompt": "# Write a python function that takes in an integer n and returns the sum of the squares of the first n odd natural numbers.\n\n\ndefmodule HumanEval do\n def square_Sum(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_267_square_Sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"square_Sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :square_Sum end)\n candidate = fn args -> apply(HumanEval, square_Sum, args) end\n assert 10 == candidate.([2])\n assert 35 == candidate.([3])\n assert 84 == candidate.([4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_268_find_star_num", "language": "elixir", "prompt": "# Write a function to find the n'th star number.\n\n\ndefmodule HumanEval do\n def find_star_num(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_268_find_star_num.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_star_num\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_star_num end)\n candidate = fn args -> apply(HumanEval, find_star_num, args) end\n assert 37 == candidate.([3])\n assert 73 == candidate.([4])\n assert 121 == candidate.([5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_269_ascii_value", "language": "elixir", "prompt": "# Write a function to find the ascii value of a character.\n\n\ndefmodule HumanEval do\n def ascii_value(k) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_269_ascii_value.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"ascii_value\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :ascii_value end)\n candidate = fn args -> apply(HumanEval, ascii_value, args) end\n assert 65 == candidate.([\"A\"])\n assert 82 == candidate.([\"R\"])\n assert 83 == candidate.([\"S\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_270_sum_even_and_even_index", "language": "elixir", "prompt": "# Write a python function to find the sum of even numbers at even positions of a list.\n\n\ndefmodule HumanEval do\n def sum_even_and_even_index(a, r, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_270_sum_even_and_even_index.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_even_and_even_index\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_even_and_even_index end)\n candidate = fn args -> apply(HumanEval, sum_even_and_even_index, args) end\n assert 30 == candidate.([[5, 6, 12, 1, 18, 8]])\n assert 26 == candidate.([[3, 20, 17, 9, 2, 10, 18, 13, 6, 18]])\n assert 12 == candidate.([[5, 6, 12, 1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_271_even_Power_Sum", "language": "elixir", "prompt": "# Write a python function that takes in an integer n and finds the sum of the first n even natural numbers that are raised to the fifth power.\n\n\ndefmodule HumanEval do\n def even_Power_Sum(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_271_even_Power_Sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"even_Power_Sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :even_Power_Sum end)\n candidate = fn args -> apply(HumanEval, even_Power_Sum, args) end\n assert 1056 == candidate.([2])\n assert 8832 == candidate.([3])\n assert 32 == candidate.([1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_272_rear_extract", "language": "elixir", "prompt": "# Write a function that takes in a list of tuples and returns a list containing the rear element of each tuple.\n\n\ndefmodule HumanEval do\n def rear_extract(t, e, s, t, _, l, i, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_272_rear_extract.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"rear_extract\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :rear_extract end)\n candidate = fn args -> apply(HumanEval, rear_extract, args) end\n assert [21, 20, 19] == candidate.([[{1, \"Rash\", 21}, {2, \"Varsha\", 20}, {3, \"Kil\", 19}]])\n assert [36, 25, 45] == candidate.([[{1, \"Sai\", 36}, {2, \"Ayesha\", 25}, {3, \"Salman\", 45}]])\n assert [14, 36, 56] == candidate.([[{1, \"Sudeep\", 14}, {2, \"Vandana\", 36}, {3, \"Dawood\", 56}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_273_substract_elements", "language": "elixir", "prompt": "# Write a function that takes in two tuples and subtracts the elements of the first tuple by the elements of the second tuple with the same index.\n\n\ndefmodule HumanEval do\n def substract_elements(t, e, s, t, _, t, u, p, 1, ,, , t, e, s, t, _, t, u, p, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_273_substract_elements.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"substract_elements\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :substract_elements end)\n candidate = fn args -> apply(HumanEval, substract_elements, args) end\n assert {8, -1, -13} == candidate.([{10, 4, 5}, {2, 5, 18}])\n assert {-13, -43, -13} == candidate.([{11, 2, 3}, {24, 45, 16}])\n assert {-3, 7, -3} == candidate.([{7, 18, 9}, {10, 11, 12}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_274_even_binomial_Coeff_Sum", "language": "elixir", "prompt": "# Write a python function that takes in a positive integer n and finds the sum of even index binomial coefficients.\n\n\ndefmodule HumanEval do\n def even_binomial_Coeff_Sum(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_274_even_binomial_Coeff_Sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"even_binomial_Coeff_Sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :even_binomial_Coeff_Sum end)\n candidate = fn args -> apply(HumanEval, even_binomial_Coeff_Sum, args) end\n assert 8 == candidate.([4])\n assert 32 == candidate.([6])\n assert 2 == candidate.([2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_277_dict_filter", "language": "elixir", "prompt": "# Write a function that takes in a dictionary and integer n and filters the dictionary to only include entries with values greater than or equal to n.\n\n\ndefmodule HumanEval do\n def dict_filter(d, i, c, t, ,, , n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_277_dict_filter.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"dict_filter\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :dict_filter end)\n candidate = fn args -> apply(HumanEval, dict_filter, args) end\n assert %{\"Cierra Vega\" => 175, \"Alden Cantrell\" => 180, \"Pierre Cox\" => 190} == candidate.([%{\"Cierra Vega\" => 175, \"Alden Cantrell\" => 180, \"Kierra Gentry\" => 165, \"Pierre Cox\" => 190}, 170])\n assert %{\"Alden Cantrell\" => 180, \"Pierre Cox\" => 190} == candidate.([%{\"Cierra Vega\" => 175, \"Alden Cantrell\" => 180, \"Kierra Gentry\" => 165, \"Pierre Cox\" => 190}, 180])\n assert %{\"Pierre Cox\" => 190} == candidate.([%{\"Cierra Vega\" => 175, \"Alden Cantrell\" => 180, \"Kierra Gentry\" => 165, \"Pierre Cox\" => 190}, 190])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_278_count_first_elements", "language": "elixir", "prompt": "# Write a function to find the number of elements that occurs before the list element in the given tuple.\n\n\ndefmodule HumanEval do\n def count_first_elements(t, e, s, t, _, t, u, p) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_278_count_first_elements.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_first_elements\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_first_elements end)\n candidate = fn args -> apply(HumanEval, count_first_elements, args) end\n assert 3 == candidate.([[1, 5, 7, {4, 6}, 10]])\n assert 2 == candidate.([[2, 9, {5, 7}, 11]])\n assert 4 == candidate.([[11, 15, 5, 8, {2, 3}, 8]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_279_is_num_decagonal", "language": "elixir", "prompt": "# Write a function to find the nth decagonal number.\n\n\ndefmodule HumanEval do\n def is_num_decagonal(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_279_is_num_decagonal.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_num_decagonal\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_num_decagonal end)\n candidate = fn args -> apply(HumanEval, is_num_decagonal, args) end\n assert 27 == candidate.([3])\n assert 175 == candidate.([7])\n assert 370 == candidate.([10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_280_sequential_search", "language": "elixir", "prompt": "# Write a function that takes in an array and element and returns a tuple containing a boolean that indicates if the element is in the array and the index position of the element (or -1 if the element is not found).\n\n\ndefmodule HumanEval do\n def sequential_search(d, l, i, s, t, ,, , i, t, e, m) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_280_sequential_search.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sequential_search\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sequential_search end)\n candidate = fn args -> apply(HumanEval, sequential_search, args) end\n assert {true, 3} == candidate.([[11, 23, 58, 31, 56, 77, 43, 12, 65, 19], 31])\n assert {true, 7} == candidate.([[12, 32, 45, 62, 35, 47, 44, 61], 61])\n assert {true, 6} == candidate.([[9, 10, 17, 19, 22, 39, 48, 56], 48])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_281_all_unique", "language": "elixir", "prompt": "# Write a python function to check if the elements of a given list are unique or not.\n\n\ndefmodule HumanEval do\n def all_unique(t, e, s, t, _, l, i, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_281_all_unique.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"all_unique\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :all_unique end)\n candidate = fn args -> apply(HumanEval, all_unique, args) end\n assert true == candidate.([[1, 2, 3]])\n assert false == candidate.([[1, 2, 1, 2]])\n assert true == candidate.([[1, 2, 3, 4, 5]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_282_sub_list", "language": "elixir", "prompt": "# Write a function to subtract two lists element-wise.\n\n\ndefmodule HumanEval do\n def sub_list(n, u, m, s, 1, ,, , n, u, m, s, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_282_sub_list.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sub_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sub_list end)\n candidate = fn args -> apply(HumanEval, sub_list, args) end\n assert [-3, -3, -3] == candidate.([[1, 2, 3], [4, 5, 6]])\n assert [-2, -2] == candidate.([[1, 2], [3, 4]])\n assert [40, 50] == candidate.([[90, 120], [50, 70]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_283_validate", "language": "elixir", "prompt": "# Write a python function takes in an integer and check whether the frequency of each digit in the integer is less than or equal to the digit itself.\n\n\ndefmodule HumanEval do\n def validate(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_283_validate.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"validate\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :validate end)\n candidate = fn args -> apply(HumanEval, validate, args) end\n assert true == candidate.([1234])\n assert false == candidate.([51241])\n assert true == candidate.([321])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_284_check_element", "language": "elixir", "prompt": "# Write a function that takes in a list and element and checks whether all items in the list are equal to the given element.\n\n\ndefmodule HumanEval do\n def check_element(l, i, s, t, ,, , e, l, e, m, e, n, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_284_check_element.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_element\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_element end)\n candidate = fn args -> apply(HumanEval, check_element, args) end\n assert false == candidate.([[\"green\", \"orange\", \"black\", \"white\"], \"blue\"])\n assert false == candidate.([[1, 2, 3, 4], 7])\n assert true == candidate.([[\"green\", \"green\", \"green\", \"green\"], \"green\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_285_text_match_two_three", "language": "elixir", "prompt": "# Write a function that checks whether a string contains the 'a' character followed by two or three 'b' characters.\n\n\ndefmodule HumanEval do\n def text_match_two_three(t, e, x, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_285_text_match_two_three.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"text_match_two_three\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :text_match_two_three end)\n candidate = fn args -> apply(HumanEval, text_match_two_three, args) end\n assert false == candidate.([\"ac\"])\n assert false == candidate.([\"dc\"])\n assert true == candidate.([\"abbbba\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_286_max_sub_array_sum_repeated", "language": "elixir", "prompt": "# Write a function to find the largest sum of a contiguous array in the modified array which is formed by repeating the given array k times.\n\n\ndefmodule HumanEval do\n def max_sub_array_sum_repeated(a, ,, , n, ,, , k) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_286_max_sub_array_sum_repeated.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_sub_array_sum_repeated\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_sub_array_sum_repeated end)\n candidate = fn args -> apply(HumanEval, max_sub_array_sum_repeated, args) end\n assert 30 == candidate.([[10, 20, -30, -1], 4, 3])\n assert 59 == candidate.([[-1, 10, 20], 3, 2])\n assert -1 == candidate.([[-1, -2, -3], 3, 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_287_square_Sum", "language": "elixir", "prompt": "# Write a python function takes in an integer n and returns the sum of squares of first n even natural numbers.\n\n\ndefmodule HumanEval do\n def square_Sum(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_287_square_Sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"square_Sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :square_Sum end)\n candidate = fn args -> apply(HumanEval, square_Sum, args) end\n assert 20 == candidate.([2])\n assert 56 == candidate.([3])\n assert 120 == candidate.([4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_290_max_length", "language": "elixir", "prompt": "# Write a function to find the list of maximum length in a list of lists.\n\n\ndefmodule HumanEval do\n def max_length(l, i, s, t, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_290_max_length.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_length\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_length end)\n candidate = fn args -> apply(HumanEval, max_length, args) end\n assert {3, [13, 15, 17]} == candidate.([[[0], [1, 3], [5, 7], [9, 11], [13, 15, 17]]])\n assert {4, [10, 12, 14, 15]} == candidate.([[[1], [5, 7], [10, 12, 14, 15]]])\n assert {3, [15, 20, 25]} == candidate.([[[5], [15, 20, 25]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_291_count_no_of_ways", "language": "elixir", "prompt": "# Write a function to find out the number of ways of painting the fence such that at most 2 adjacent posts have the same color for the given fence with n posts and k colors.\n\n\ndefmodule HumanEval do\n def count_no_of_ways(n, ,, , k) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_291_count_no_of_ways.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_no_of_ways\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_no_of_ways end)\n candidate = fn args -> apply(HumanEval, count_no_of_ways, args) end\n assert 16 == candidate.([2, 4])\n assert 6 == candidate.([3, 2])\n assert 228 == candidate.([4, 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_292_find", "language": "elixir", "prompt": "# Write a python function to find quotient of two numbers (rounded down to the nearest integer).\n\n\ndefmodule HumanEval do\n def find(n, ,, , m) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_292_find.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find end)\n candidate = fn args -> apply(HumanEval, find, args) end\n assert 3 == candidate.([10, 3])\n assert 2 == candidate.([4, 2])\n assert 4 == candidate.([20, 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_293_otherside_rightangle", "language": "elixir", "prompt": "# Write a function to find the third side of a right angled triangle.\n\n\ndefmodule HumanEval do\n def otherside_rightangle(w, ,, , h) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_293_otherside_rightangle.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"otherside_rightangle\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :otherside_rightangle end)\n candidate = fn args -> apply(HumanEval, otherside_rightangle, args) end\n assert 10.63014581273465 == candidate.([7, 8])\n assert 5 == candidate.([3, 4])\n assert 16.55294535724685 == candidate.([7, 15])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_294_max_val", "language": "elixir", "prompt": "# Write a function to find the maximum value in a given heterogeneous list.\n\n\ndefmodule HumanEval do\n def max_val(l, i, s, t, v, a, l) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_294_max_val.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_val\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_val end)\n candidate = fn args -> apply(HumanEval, max_val, args) end\n assert 5 == candidate.([[\"Python\", 3, 2, 4, 5, \"version\"]])\n assert 25 == candidate.([[\"Python\", 15, 20, 25]])\n assert 50 == candidate.([[\"Python\", 30, 20, 40, 50, \"version\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_295_sum_div", "language": "elixir", "prompt": "# Write a function to return the sum of all divisors of a number.\n\n\ndefmodule HumanEval do\n def sum_div(n, u, m, b, e, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_295_sum_div.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_div\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_div end)\n candidate = fn args -> apply(HumanEval, sum_div, args) end\n assert 7 == candidate.([8])\n assert 16 == candidate.([12])\n assert 1 == candidate.([7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_296_get_Inv_Count", "language": "elixir", "prompt": "# Write a python function to count inversions in an array.\n\n\ndefmodule HumanEval do\n def get_Inv_Count(a, r, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_296_get_Inv_Count.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"get_Inv_Count\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :get_Inv_Count end)\n candidate = fn args -> apply(HumanEval, get_Inv_Count, args) end\n assert 5 == candidate.([[1, 20, 6, 4, 5]])\n assert 1 == candidate.([[1, 2, 1]])\n assert 3 == candidate.([[1, 2, 5, 6, 1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_297_flatten_list", "language": "elixir", "prompt": "# Write a function to flatten a given nested list structure.\n\n\ndefmodule HumanEval do\n def flatten_list(l, i, s, t, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_297_flatten_list.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"flatten_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :flatten_list end)\n candidate = fn args -> apply(HumanEval, flatten_list, args) end\n assert [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120] == candidate.([[0, 10, [20, 30], 40, 50, [60, 70, 80], [90, 100, 110, 120]]])\n assert [10, 20, 40, 30, 56, 25, 10, 20, 33, 40] == candidate.([[[10, 20], [40], [30, 56, 25], [10, 20], [33], [40]]])\n assert [1, 2, 3, 4, 5, 6, 10, 11, 12, 7, 8, 9] == candidate.([[[1, 2, 3], [4, 5, 6], [10, 11, 12], [7, 8, 9]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_299_max_aggregate", "language": "elixir", "prompt": "# Write a function to calculate the maximum aggregate from the list of tuples.\n\n\ndefmodule HumanEval do\n def max_aggregate(s, t, d, a, t, a) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_299_max_aggregate.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_aggregate\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_aggregate end)\n candidate = fn args -> apply(HumanEval, max_aggregate, args) end\n assert {\"Juan Whelan\", 212} == candidate.([[{\"Juan Whelan\", 90}, {\"Sabah Colley\", 88}, {\"Peter Nichols\", 7}, {\"Juan Whelan\", 122}, {\"Sabah Colley\", 84}]])\n assert {\"Juan Whelan\", 72} == candidate.([[{\"Juan Whelan\", 50}, {\"Sabah Colley\", 48}, {\"Peter Nichols\", 37}, {\"Juan Whelan\", 22}, {\"Sabah Colley\", 14}]])\n assert {\"Sabah Colley\", 70} == candidate.([[{\"Juan Whelan\", 10}, {\"Sabah Colley\", 20}, {\"Peter Nichols\", 30}, {\"Juan Whelan\", 40}, {\"Sabah Colley\", 50}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_304_find_Element", "language": "elixir", "prompt": "# Write a python function to find element at a given index after number of rotations.\n\n\ndefmodule HumanEval do\n def find_Element(a, r, r, ,, , r, a, n, g, e, s, ,, , r, o, t, a, t, i, o, n, s, ,, , i, n, d, e, x) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_304_find_Element.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_Element\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_Element end)\n candidate = fn args -> apply(HumanEval, find_Element, args) end\n assert 3 == candidate.([[1, 2, 3, 4, 5], [[0, 2], [0, 3]], 2, 1])\n assert 3 == candidate.([[1, 2, 3, 4], [[0, 1], [0, 2]], 1, 2])\n assert 1 == candidate.([[1, 2, 3, 4, 5, 6], [[0, 1], [0, 2]], 1, 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_305_start_withp", "language": "elixir", "prompt": "# Write a function to return two words from a list of words starting with letter 'p'.\n\n\ndefmodule HumanEval do\n def start_withp(w, o, r, d, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_305_start_withp.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"start_withp\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :start_withp end)\n candidate = fn args -> apply(HumanEval, start_withp, args) end\n assert {\"Python\", \"PHP\"} == candidate.([[\"Python PHP\", \"Java JavaScript\", \"c c++\"]])\n assert {\"Python\", \"Programming\"} == candidate.([[\"Python Programming\", \"Java Programming\"]])\n assert {\"Pqrst\", \"Pqr\"} == candidate.([[\"Pqrst Pqr\", \"qrstuv\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_306_max_sum_increasing_subseq", "language": "elixir", "prompt": "# Write a function to find the maximum sum of increasing subsequence from prefix until ith index and also including a given kth element which is after i, i.e., k > i .\n\n\ndefmodule HumanEval do\n def max_sum_increasing_subseq(a, ,, , n, ,, , i, n, d, e, x, ,, , k) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_306_max_sum_increasing_subseq.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_sum_increasing_subseq\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_sum_increasing_subseq end)\n candidate = fn args -> apply(HumanEval, max_sum_increasing_subseq, args) end\n assert 11 == candidate.([[1, 101, 2, 3, 100, 4, 5], 7, 4, 6])\n assert 7 == candidate.([[1, 101, 2, 3, 100, 4, 5], 7, 2, 5])\n assert 71 == candidate.([[11, 15, 19, 21, 26, 28, 31], 7, 2, 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_308_large_product", "language": "elixir", "prompt": "# Write a function to find the specified number of largest products from two given lists, selecting one factor from each list.\n\n\ndefmodule HumanEval do\n def large_product(n, u, m, s, 1, ,, , n, u, m, s, 2, ,, , N) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_308_large_product.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"large_product\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :large_product end)\n candidate = fn args -> apply(HumanEval, large_product, args) end\n assert [60, 54, 50] == candidate.([[1, 2, 3, 4, 5, 6], [3, 6, 8, 9, 10, 6], 3])\n assert [60, 54, 50, 48] == candidate.([[1, 2, 3, 4, 5, 6], [3, 6, 8, 9, 10, 6], 4])\n assert [60, 54, 50, 48, 45] == candidate.([[1, 2, 3, 4, 5, 6], [3, 6, 8, 9, 10, 6], 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_309_maximum", "language": "elixir", "prompt": "# Write a python function to find the maximum of two numbers.\n\n\ndefmodule HumanEval do\n def maximum(a, ,, , b) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_309_maximum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"maximum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :maximum end)\n candidate = fn args -> apply(HumanEval, maximum, args) end\n assert 10 == candidate.([5, 10])\n assert -1 == candidate.([-1, -2])\n assert 9 == candidate.([9, 7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_310_string_to_tuple", "language": "elixir", "prompt": "# Write a function to convert a given string to a list of characters.\n\n\ndefmodule HumanEval do\n def string_to_tuple(s, t, r, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_310_string_to_tuple.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"string_to_tuple\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :string_to_tuple end)\n candidate = fn args -> apply(HumanEval, string_to_tuple, args) end\n assert [\"p\", \"y\", \"t\", \"h\", \"o\", \"n\", \"3\", \".\", \"0\"] == candidate.([\"python 3.0\"])\n assert [\"i\", \"t\", \"e\", \"m\", \"1\"] == candidate.([\"item1\"])\n assert [\"1\", \"5\", \".\", \"1\", \"0\"] == candidate.([\"15.10\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_388_highest_Power_of_2", "language": "elixir", "prompt": "# Write a python function to find the highest power of 2 that is less than or equal to n.\n\n\ndefmodule HumanEval do\n def highest_Power_of_2(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_388_highest_Power_of_2.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"highest_Power_of_2\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :highest_Power_of_2 end)\n candidate = fn args -> apply(HumanEval, highest_Power_of_2, args) end\n assert 8 == candidate.([10])\n assert 16 == candidate.([19])\n assert 32 == candidate.([32])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_389_find_lucas", "language": "elixir", "prompt": "# Write a function to find the n'th lucas number.\n\n\ndefmodule HumanEval do\n def find_lucas(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_389_find_lucas.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_lucas\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_lucas end)\n candidate = fn args -> apply(HumanEval, find_lucas, args) end\n assert 76 == candidate.([9])\n assert 7 == candidate.([4])\n assert 4 == candidate.([3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_390_add_string", "language": "elixir", "prompt": "# Write a function to apply a given format string to all of the elements in a list.\n\n\ndefmodule HumanEval do\n def add_string(l, i, s, t, _, ,, , s, t, r, i, n, g) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_390_add_string.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"add_string\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :add_string end)\n candidate = fn args -> apply(HumanEval, add_string, args) end\n assert [\"temp1\", \"temp2\", \"temp3\", \"temp4\"] == candidate.([[1, 2, 3, 4], \"temp{0}\"])\n assert [\"pythona\", \"pythonb\", \"pythonc\", \"pythond\"] == candidate.([[\"a\", \"b\", \"c\", \"d\"], \"python{0}\"])\n assert [\"string5\", \"string6\", \"string7\", \"string8\"] == candidate.([[5, 6, 7, 8], \"string{0}\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_391_convert_list_dictionary", "language": "elixir", "prompt": "# Write a function to convert more than one list to nested dictionary.\n\n\ndefmodule HumanEval do\n def convert_list_dictionary(l, 1, ,, , l, 2, ,, , l, 3) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_391_convert_list_dictionary.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"convert_list_dictionary\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :convert_list_dictionary end)\n candidate = fn args -> apply(HumanEval, convert_list_dictionary, args) end\n assert [%{\"S001\" => %{\"Adina Park\" => 85}}, %{\"S002\" => %{\"Leyton Marsh\" => 98}}, %{\"S003\" => %{\"Duncan Boyle\" => 89}}, %{\"S004\" => %{\"Saim Richards\" => 92}}] == candidate.([[\"S001\", \"S002\", \"S003\", \"S004\"], [\"Adina Park\", \"Leyton Marsh\", \"Duncan Boyle\", \"Saim Richards\"], [85, 98, 89, 92]])\n assert [%{\"abc\" => %{\"python\" => 100}}, %{\"def\" => %{\"program\" => 200}}, %{\"ghi\" => %{\"language\" => 300}}, %{\"jkl\" => %{\"programs\" => 400}}] == candidate.([[\"abc\", \"def\", \"ghi\", \"jkl\"], [\"python\", \"program\", \"language\", \"programs\"], [100, 200, 300, 400]])\n assert [%{\"A1\" => %{\"java\" => 10}}, %{\"A2\" => %{\"C\" => 20}}, %{\"A3\" => %{\"C++\" => 30}}, %{\"A4\" => %{\"DBMS\" => 40}}] == candidate.([[\"A1\", \"A2\", \"A3\", \"A4\"], [\"java\", \"C\", \"C++\", \"DBMS\"], [10, 20, 30, 40]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_392_get_max_sum", "language": "elixir", "prompt": "# Write a function to find the maximum sum possible by using the given equation f(n) = max( (f(n/2) + f(n/3) + f(n/4) + f(n/5)), n).\n\n\ndefmodule HumanEval do\n def get_max_sum(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_392_get_max_sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"get_max_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :get_max_sum end)\n candidate = fn args -> apply(HumanEval, get_max_sum, args) end\n assert 106 == candidate.([60])\n assert 12 == candidate.([10])\n assert 2 == candidate.([2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_393_max_length_list", "language": "elixir", "prompt": "# Write a function to find the list with maximum length.\n\n\ndefmodule HumanEval do\n def max_length_list(i, n, p, u, t, _, l, i, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_393_max_length_list.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_length_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_length_list end)\n candidate = fn args -> apply(HumanEval, max_length_list, args) end\n assert {3, [13, 15, 17]} == candidate.([[[0], [1, 3], [5, 7], [9, 11], [13, 15, 17]]])\n assert {5, [1, 2, 3, 4, 5]} == candidate.([[[1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3], [1, 2], [1]]])\n assert {4, [6, 7, 8, 9]} == candidate.([[[3, 4, 5], [6, 7, 8, 9], [10, 11, 12]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_394_check_distinct", "language": "elixir", "prompt": "# Write a function to check if given list contains no duplicates.\n\n\ndefmodule HumanEval do\n def check_distinct(t, e, s, t, _, t, u, p) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_394_check_distinct.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_distinct\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_distinct end)\n candidate = fn args -> apply(HumanEval, check_distinct, args) end\n assert false == candidate.([[1, 4, 5, 6, 1, 4]])\n assert true == candidate.([[1, 4, 5, 6]])\n assert true == candidate.([[2, 3, 4, 5, 6]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_395_first_non_repeating_character", "language": "elixir", "prompt": "# Write a python function to find the first non-repeated character in a given string.\n\n\ndefmodule HumanEval do\n def first_non_repeating_character(s, t, r, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_395_first_non_repeating_character.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"first_non_repeating_character\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :first_non_repeating_character end)\n candidate = fn args -> apply(HumanEval, first_non_repeating_character, args) end\n assert nil == candidate.([\"abcabc\"])\n assert \"a\" == candidate.([\"abc\"])\n assert \"c\" == candidate.([\"ababc\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_396_check_char", "language": "elixir", "prompt": "# Write a function to check whether the given string starts and ends with the same character or not.\n\n\ndefmodule HumanEval do\n def check_char(s, t, r, i, n, g) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_396_check_char.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_char\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_char end)\n candidate = fn args -> apply(HumanEval, check_char, args) end\n assert \"Valid\" == candidate.([\"abba\"])\n assert \"Valid\" == candidate.([\"a\"])\n assert \"Invalid\" == candidate.([\"abcd\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_397_median_numbers", "language": "elixir", "prompt": "# Write a function to find the median of three numbers.\n\n\ndefmodule HumanEval do\n def median_numbers(a, ,, , b, ,, , c) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_397_median_numbers.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"median_numbers\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :median_numbers end)\n candidate = fn args -> apply(HumanEval, median_numbers, args) end\n assert 55.0 == candidate.([25, 55, 65])\n assert 20.0 == candidate.([20, 10, 30])\n assert 45.0 == candidate.([15, 45, 75])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_398_sum_of_digits", "language": "elixir", "prompt": "# Write a function to compute the sum of digits of each number of a given list.\n\n\ndefmodule HumanEval do\n def sum_of_digits(n, u, m, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_398_sum_of_digits.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_of_digits\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_of_digits end)\n candidate = fn args -> apply(HumanEval, sum_of_digits, args) end\n assert 14 == candidate.([[10, 2, 56]])\n assert 19 == candidate.([[[10, 20, 4, 5, \"b\", 70, \"a\"]]])\n assert 19 == candidate.([[10, 20, -4, 5, -70]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_399_bitwise_xor", "language": "elixir", "prompt": "# Write a function to perform the mathematical bitwise xor operation across the given tuples.\n\n\ndefmodule HumanEval do\n def bitwise_xor(t, e, s, t, _, t, u, p, 1, ,, , t, e, s, t, _, t, u, p, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_399_bitwise_xor.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"bitwise_xor\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :bitwise_xor end)\n candidate = fn args -> apply(HumanEval, bitwise_xor, args) end\n assert {15, 6, 5, 10} == candidate.([{10, 4, 6, 9}, {5, 2, 3, 3}])\n assert {13, 6, 3, 14} == candidate.([{11, 5, 7, 10}, {6, 3, 4, 4}])\n assert {11, 2, 13, 13} == candidate.([{12, 6, 8, 11}, {7, 4, 5, 6}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_3_is_not_prime", "language": "elixir", "prompt": "# Write a python function to identify non-prime numbers.\n\n\ndefmodule HumanEval do\n def is_not_prime(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_3_is_not_prime.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_not_prime\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_not_prime end)\n candidate = fn args -> apply(HumanEval, is_not_prime, args) end\n assert false == candidate.([2])\n assert true == candidate.([10])\n assert true == candidate.([35])\n assert false == candidate.([37])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_400_extract_freq", "language": "elixir", "prompt": "# Write a function to extract the number of unique tuples in the given list.\n\n\ndefmodule HumanEval do\n def extract_freq(t, e, s, t, _, l, i, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_400_extract_freq.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"extract_freq\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :extract_freq end)\n candidate = fn args -> apply(HumanEval, extract_freq, args) end\n assert 3 == candidate.([[{3, 4}, {1, 2}, {4, 3}, {5, 6}]])\n assert 4 == candidate.([[{4, 15}, {2, 3}, {5, 4}, {6, 7}]])\n assert 4 == candidate.([[{5, 16}, {2, 3}, {6, 5}, {6, 9}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_401_add_nested_tuples", "language": "elixir", "prompt": "# Write a function to perform index wise addition of list elements in the given two nested lists.\n\n\ndefmodule HumanEval do\n def add_nested_tuples(t, e, s, t, _, t, u, p, 1, ,, , t, e, s, t, _, t, u, p, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_401_add_nested_tuples.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"add_nested_tuples\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :add_nested_tuples end)\n candidate = fn args -> apply(HumanEval, add_nested_tuples, args) end\n assert [[7, 10], [7, 14], [3, 10], [8, 13]] == candidate.([[[1, 3], [4, 5], [2, 9], [1, 10]], [[6, 7], [3, 9], [1, 1], [7, 3]]])\n assert [[9, 12], [9, 16], [5, 12], [10, 15]] == candidate.([[[2, 4], [5, 6], [3, 10], [2, 11]], [[7, 8], [4, 10], [2, 2], [8, 4]]])\n assert [[11, 14], [11, 18], [7, 14], [12, 17]] == candidate.([[[3, 5], [6, 7], [4, 11], [3, 12]], [[8, 9], [5, 11], [3, 3], [9, 5]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_404_minimum", "language": "elixir", "prompt": "# Write a python function to find the minimum of two numbers.\n\n\ndefmodule HumanEval do\n def minimum(a, ,, , b) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_404_minimum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"minimum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :minimum end)\n candidate = fn args -> apply(HumanEval, minimum, args) end\n assert 1 == candidate.([1, 2])\n assert -5 == candidate.([-5, -4])\n assert 0 == candidate.([0, 0])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_405_check_tuplex", "language": "elixir", "prompt": "# Write a function to check whether an element exists within a tuple.\n\n\ndefmodule HumanEval do\n def check_tuplex(t, u, p, l, e, x, ,, , t, u, p, l, e, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_405_check_tuplex.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_tuplex\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_tuplex end)\n candidate = fn args -> apply(HumanEval, check_tuplex, args) end\n assert true == candidate.([[\"w\", 3, \"r\", \"e\", \"s\", \"o\", \"u\", \"r\", \"c\", \"e\"], \"r\"])\n assert false == candidate.([[\"w\", 3, \"r\", \"e\", \"s\", \"o\", \"u\", \"r\", \"c\", \"e\"], \"5\"])\n assert true == candidate.([[\"w\", 3, \"r\", \"e\", \"s\", \"o\", \"u\", \"r\", \"c\", \"e\"], 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_406_find_Parity", "language": "elixir", "prompt": "# Write a python function to find whether the parity of a given number is odd.\n\n\ndefmodule HumanEval do\n def find_Parity(x) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_406_find_Parity.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_Parity\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_Parity end)\n candidate = fn args -> apply(HumanEval, find_Parity, args) end\n assert false == candidate.([12])\n assert true == candidate.([7])\n assert false == candidate.([10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_407_rearrange_bigger", "language": "elixir", "prompt": "# Write a function to create the next bigger number by rearranging the digits of a given number.\n\n\ndefmodule HumanEval do\n def rearrange_bigger(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_407_rearrange_bigger.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"rearrange_bigger\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :rearrange_bigger end)\n candidate = fn args -> apply(HumanEval, rearrange_bigger, args) end\n assert 21 == candidate.([12])\n assert false == candidate.([10])\n assert 120 == candidate.([102])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_408_k_smallest_pairs", "language": "elixir", "prompt": "# Write a function to find k number of smallest pairs which consist of one element from the first array and one element from the second array.\n\n\ndefmodule HumanEval do\n def k_smallest_pairs(n, u, m, s, 1, ,, , n, u, m, s, 2, ,, , k) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_408_k_smallest_pairs.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"k_smallest_pairs\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :k_smallest_pairs end)\n candidate = fn args -> apply(HumanEval, k_smallest_pairs, args) end\n assert [[1, 2], [1, 4]] == candidate.([[1, 3, 7], [2, 4, 6], 2])\n assert [[1, 2]] == candidate.([[1, 3, 7], [2, 4, 6], 1])\n assert [[1, 2], [1, 4], [3, 2], [1, 6], [3, 4], [3, 6], [7, 2]] == candidate.([[1, 3, 7], [2, 4, 6], 7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_409_min_product_tuple", "language": "elixir", "prompt": "# Write a function to find the minimum product from the pairs of tuples within a given list.\n\n\ndefmodule HumanEval do\n def min_product_tuple(l, i, s, t, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_409_min_product_tuple.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"min_product_tuple\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :min_product_tuple end)\n candidate = fn args -> apply(HumanEval, min_product_tuple, args) end\n assert 8 == candidate.([[{2, 7}, {2, 6}, {1, 8}, {4, 9}]])\n assert 30 == candidate.([[{10, 20}, {15, 2}, {5, 10}]])\n assert 100 == candidate.([[{11, 44}, {10, 15}, {20, 5}, {12, 9}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_410_min_val", "language": "elixir", "prompt": "# Write a function to find the minimum value in a given heterogeneous list.\n\n\ndefmodule HumanEval do\n def min_val(l, i, s, t, v, a, l) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_410_min_val.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"min_val\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :min_val end)\n candidate = fn args -> apply(HumanEval, min_val, args) end\n assert 2 == candidate.([[\"Python\", 3, 2, 4, 5, \"version\"]])\n assert 15 == candidate.([[\"Python\", 15, 20, 25]])\n assert 20 == candidate.([[\"Python\", 30, 20, 40, 50, \"version\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_411_snake_to_camel", "language": "elixir", "prompt": "# Write a function to convert the given snake case string to camel case string.\n\n\ndefmodule HumanEval do\n def snake_to_camel(w, o, r, d) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_411_snake_to_camel.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"snake_to_camel\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :snake_to_camel end)\n candidate = fn args -> apply(HumanEval, snake_to_camel, args) end\n assert \"AndroidTv\" == candidate.([\"android_tv\"])\n assert \"GooglePixel\" == candidate.([\"google_pixel\"])\n assert \"AppleWatch\" == candidate.([\"apple_watch\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_412_remove_odd", "language": "elixir", "prompt": "# Write a python function to remove odd numbers from a given list.\n\n\ndefmodule HumanEval do\n def remove_odd(l) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_412_remove_odd.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_odd\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_odd end)\n candidate = fn args -> apply(HumanEval, remove_odd, args) end\n assert [2] == candidate.([[1, 2, 3]])\n assert [2, 4, 6] == candidate.([[2, 4, 6]])\n assert [10, 20] == candidate.([[10, 20, 3]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_413_extract_nth_element", "language": "elixir", "prompt": "# Write a function to extract the nth element from a given list of tuples.\n\n\ndefmodule HumanEval do\n def extract_nth_element(l, i, s, t, 1, ,, , n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_413_extract_nth_element.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"extract_nth_element\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :extract_nth_element end)\n candidate = fn args -> apply(HumanEval, extract_nth_element, args) end\n assert [\"Greyson Fulton\", \"Brady Kent\", \"Wyatt Knott\", \"Beau Turnbull\"] == candidate.([[{\"Greyson Fulton\", 98, 99}, {\"Brady Kent\", 97, 96}, {\"Wyatt Knott\", 91, 94}, {\"Beau Turnbull\", 94, 98}], 0])\n assert [99, 96, 94, 98] == candidate.([[{\"Greyson Fulton\", 98, 99}, {\"Brady Kent\", 97, 96}, {\"Wyatt Knott\", 91, 94}, {\"Beau Turnbull\", 94, 98}], 2])\n assert [98, 97, 91, 94] == candidate.([[{\"Greyson Fulton\", 98, 99}, {\"Brady Kent\", 97, 96}, {\"Wyatt Knott\", 91, 94}, {\"Beau Turnbull\", 94, 98}], 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_414_overlapping", "language": "elixir", "prompt": "# Write a python function to check whether any value in a sequence exists in a sequence or not.\n\n\ndefmodule HumanEval do\n def overlapping(l, i, s, t, 1, ,, , l, i, s, t, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_414_overlapping.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"overlapping\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :overlapping end)\n candidate = fn args -> apply(HumanEval, overlapping, args) end\n assert false == candidate.([[1, 2, 3, 4, 5], [6, 7, 8, 9]])\n assert false == candidate.([[1, 2, 3], [4, 5, 6]])\n assert true == candidate.([[1, 4, 5], [1, 4, 5]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_415_max_Product", "language": "elixir", "prompt": "# Write a python function to find a pair with highest product from a given array of integers.\n\n\ndefmodule HumanEval do\n def max_Product(a, r, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_415_max_Product.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_Product\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_Product end)\n candidate = fn args -> apply(HumanEval, max_Product, args) end\n assert {7, 8} == candidate.([[1, 2, 3, 4, 7, 0, 8, 4]])\n assert {-4, -6} == candidate.([[0, -1, -2, -4, 5, 0, -6]])\n assert {2, 3} == candidate.([[1, 2, 3]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_417_group_tuples", "language": "elixir", "prompt": "# Write a function to find common first element in given list of lists.\n\n\ndefmodule HumanEval do\n def group_tuples(I, n, p, u, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_417_group_tuples.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"group_tuples\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :group_tuples end)\n candidate = fn args -> apply(HumanEval, group_tuples, args) end\n assert [[\"x\", \"y\", \"z\"], [\"w\", \"t\"]] == candidate.([[[\"x\", \"y\"], [\"x\", \"z\"], [\"w\", \"t\"]]])\n assert [[\"a\", \"b\", \"c\"], [\"d\", \"e\"]] == candidate.([[[\"a\", \"b\"], [\"a\", \"c\"], [\"d\", \"e\"]]])\n assert [[\"f\", \"g\", \"g\"], [\"h\", \"i\"]] == candidate.([[[\"f\", \"g\"], [\"f\", \"g\"], [\"h\", \"i\"]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_418_Find_Max", "language": "elixir", "prompt": "# Write a python function to find the element of a list having maximum length.\n\n\ndefmodule HumanEval do\n def Find_Max(l, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_418_Find_Max.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"Find_Max\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :Find_Max end)\n candidate = fn args -> apply(HumanEval, Find_Max, args) end\n assert [\"A\", \"B\", \"C\"] == candidate.([[[\"A\"], [\"A\", \"B\"], [\"A\", \"B\", \"C\"]]])\n assert [1, 2, 3] == candidate.([[[1], [1, 2], [1, 2, 3]]])\n assert [1, 5, 6, 1] == candidate.([[[1, 1], [1, 2, 3], [1, 5, 6, 1]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_419_round_and_sum", "language": "elixir", "prompt": "# Write a function to round every number of a given list of numbers and print the total sum multiplied by the length of the list.\n\n\ndefmodule HumanEval do\n def round_and_sum(l, i, s, t, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_419_round_and_sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"round_and_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :round_and_sum end)\n candidate = fn args -> apply(HumanEval, round_and_sum, args) end\n assert 243 == candidate.([[22.4, 4.0, -16.22, -9.1, 11.0, -12.22, 14.2, -5.2, 17.5]])\n assert 345 == candidate.([[5, 2, 9, 24.3, 29]])\n assert 513 == candidate.([[25.0, 56.7, 89.2]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_420_cube_Sum", "language": "elixir", "prompt": "# Write a python function to find the cube sum of first n even natural numbers.\n\n\ndefmodule HumanEval do\n def cube_Sum(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_420_cube_Sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"cube_Sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :cube_Sum end)\n candidate = fn args -> apply(HumanEval, cube_Sum, args) end\n assert 72 == candidate.([2])\n assert 288 == candidate.([3])\n assert 800 == candidate.([4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_421_concatenate_tuple", "language": "elixir", "prompt": "# Write a function to concatenate each element of tuple by the delimiter.\n\n\ndefmodule HumanEval do\n def concatenate_tuple(t, e, s, t, _, t, u, p) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_421_concatenate_tuple.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"concatenate_tuple\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :concatenate_tuple end)\n candidate = fn args -> apply(HumanEval, concatenate_tuple, args) end\n assert \"ID-is-4-UTS\" == candidate.([{\"ID\", \"is\", 4, \"UTS\"}])\n assert \"QWE-is-4-RTY\" == candidate.([{\"QWE\", \"is\", 4, \"RTY\"}])\n assert \"ZEN-is-4-OP\" == candidate.([{\"ZEN\", \"is\", 4, \"OP\"}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_422_find_Average_Of_Cube", "language": "elixir", "prompt": "# Write a python function to find the average of cubes of first n natural numbers.\n\n\ndefmodule HumanEval do\n def find_Average_Of_Cube(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_422_find_Average_Of_Cube.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_Average_Of_Cube\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_Average_Of_Cube end)\n candidate = fn args -> apply(HumanEval, find_Average_Of_Cube, args) end\n assert 4.5 == candidate.([2])\n assert 12 == candidate.([3])\n assert 1 == candidate.([1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_424_extract_rear", "language": "elixir", "prompt": "# Write a function to extract only the rear index element of each string in the given tuple.\n\n\ndefmodule HumanEval do\n def extract_rear(t, e, s, t, _, t, u, p, l, e) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_424_extract_rear.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"extract_rear\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :extract_rear end)\n candidate = fn args -> apply(HumanEval, extract_rear, args) end\n assert [\"s\", \"r\", \"s\"] == candidate.([{\"Mers\", \"for\", \"Vers\"}])\n assert [\"e\", \"r\", \"e\"] == candidate.([{\"Avenge\", \"for\", \"People\"}])\n assert [\"a\", \"t\", \"o\"] == candidate.([{\"Gotta\", \"get\", \"go\"}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_425_count_element_in_list", "language": "elixir", "prompt": "# Write a function to count the number of sublists containing a particular element.\n\n\ndefmodule HumanEval do\n def count_element_in_list(l, i, s, t, 1, ,, , x) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_425_count_element_in_list.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_element_in_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_element_in_list end)\n candidate = fn args -> apply(HumanEval, count_element_in_list, args) end\n assert 3 == candidate.([[[1, 3], [5, 7], [1, 11], [1, 15, 7]], 1])\n assert 3 == candidate.([[[\"A\", \"B\"], [\"A\", \"C\"], [\"A\", \"D\", \"E\"], [\"B\", \"C\", \"D\"]], \"A\"])\n assert 1 == candidate.([[[\"A\", \"B\"], [\"A\", \"C\"], [\"A\", \"D\", \"E\"], [\"B\", \"C\", \"D\"]], \"E\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_426_filter_oddnumbers", "language": "elixir", "prompt": "# Write a function to filter odd numbers.\n\n\ndefmodule HumanEval do\n def filter_oddnumbers(n, u, m, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_426_filter_oddnumbers.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"filter_oddnumbers\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :filter_oddnumbers end)\n candidate = fn args -> apply(HumanEval, filter_oddnumbers, args) end\n assert [1, 3, 5, 7, 9] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]])\n assert [45, 67, 93] == candidate.([[10, 20, 45, 67, 84, 93]])\n assert [5, 7, 9, 3] == candidate.([[5, 7, 9, 8, 6, 4, 3]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_427_change_date_format", "language": "elixir", "prompt": "# Write a function to convert a date of yyyy-mm-dd format to dd-mm-yyyy format.\n\n\ndefmodule HumanEval do\n def change_date_format(d, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_427_change_date_format.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"change_date_format\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :change_date_format end)\n candidate = fn args -> apply(HumanEval, change_date_format, args) end\n assert \"02-01-2026\" == candidate.([\"2026-01-02\"])\n assert \"13-11-2020\" == candidate.([\"2020-11-13\"])\n assert \"26-04-2021\" == candidate.([\"2021-04-26\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_428_shell_sort", "language": "elixir", "prompt": "# Write a function to sort the given array by using shell sort.\n\n\ndefmodule HumanEval do\n def shell_sort(m, y, _, l, i, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_428_shell_sort.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"shell_sort\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :shell_sort end)\n candidate = fn args -> apply(HumanEval, shell_sort, args) end\n assert [2, 3, 4, 5, 12, 12, 23, 56, 81, 95] == candidate.([[12, 23, 4, 5, 3, 2, 12, 81, 56, 95]])\n assert [22, 24, 34, 39, 68, 73, 87] == candidate.([[24, 22, 39, 34, 87, 73, 68]])\n assert [16, 30, 32, 74, 82, 83, 96] == candidate.([[32, 30, 16, 96, 82, 83, 74]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_429_and_tuples", "language": "elixir", "prompt": "# Write a function to extract the elementwise and tuples from the given two tuples.\n\n\ndefmodule HumanEval do\n def and_tuples(t, e, s, t, _, t, u, p, 1, ,, , t, e, s, t, _, t, u, p, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_429_and_tuples.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"and_tuples\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :and_tuples end)\n candidate = fn args -> apply(HumanEval, and_tuples, args) end\n assert {0, 0, 2, 1} == candidate.([{10, 4, 6, 9}, {5, 2, 3, 3}])\n assert {1, 2, 3, 0} == candidate.([{1, 2, 3, 4}, {5, 6, 7, 8}])\n assert {0, 9, 10, 0} == candidate.([{8, 9, 11, 12}, {7, 13, 14, 17}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_430_parabola_directrix", "language": "elixir", "prompt": "# Write a function to find the directrix of a parabola.\n\n\ndefmodule HumanEval do\n def parabola_directrix(a, ,, , b, ,, , c) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_430_parabola_directrix.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"parabola_directrix\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :parabola_directrix end)\n candidate = fn args -> apply(HumanEval, parabola_directrix, args) end\n assert -198 == candidate.([5, 3, 2])\n assert -2336 == candidate.([9, 8, 4])\n assert -130 == candidate.([2, 4, 6])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_431_common_element", "language": "elixir", "prompt": "# Write a function that takes two lists and returns true if they have at least one common element.\n\n\ndefmodule HumanEval do\n def common_element(l, i, s, t, 1, ,, , l, i, s, t, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_431_common_element.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"common_element\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :common_element end)\n candidate = fn args -> apply(HumanEval, common_element, args) end\n assert true == candidate.([[1, 2, 3, 4, 5], [5, 6, 7, 8, 9]])\n assert nil == candidate.([[1, 2, 3, 4, 5], [6, 7, 8, 9]])\n assert true == candidate.([[\"a\", \"b\", \"c\"], [\"d\", \"b\", \"e\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_432_median_trapezium", "language": "elixir", "prompt": "# Write a function to find the median length of a trapezium.\n\n\ndefmodule HumanEval do\n def median_trapezium(b, a, s, e, 1, ,, , b, a, s, e, 2, ,, , h, e, i, g, h, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_432_median_trapezium.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"median_trapezium\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :median_trapezium end)\n candidate = fn args -> apply(HumanEval, median_trapezium, args) end\n assert 20 == candidate.([15, 25, 35])\n assert 15 == candidate.([10, 20, 30])\n assert 7.5 == candidate.([6, 9, 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_433_check_greater", "language": "elixir", "prompt": "# Write a function to check whether the entered number is greater than the elements of the given array.\n\n\ndefmodule HumanEval do\n def check_greater(a, r, r, ,, , n, u, m, b, e, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_433_check_greater.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_greater\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_greater end)\n candidate = fn args -> apply(HumanEval, check_greater, args) end\n assert false == candidate.([[1, 2, 3, 4, 5], 4])\n assert true == candidate.([[2, 3, 4, 5, 6], 8])\n assert true == candidate.([[9, 7, 4, 8, 6, 1], 11])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_434_text_match_one", "language": "elixir", "prompt": "# Write a function that matches a string that has an a followed by one or more b's.\n\n\ndefmodule HumanEval do\n def text_match_one(t, e, x, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_434_text_match_one.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"text_match_one\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :text_match_one end)\n candidate = fn args -> apply(HumanEval, text_match_one, args) end\n assert false == candidate.([\"ac\"])\n assert false == candidate.([\"dc\"])\n assert true == candidate.([\"abba\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_435_last_Digit", "language": "elixir", "prompt": "# Write a python function to find the last digit of a given number.\n\n\ndefmodule HumanEval do\n def last_Digit(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_435_last_Digit.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"last_Digit\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :last_Digit end)\n candidate = fn args -> apply(HumanEval, last_Digit, args) end\n assert 3 == candidate.([123])\n assert 5 == candidate.([25])\n assert 0 == candidate.([30])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_436_neg_nos", "language": "elixir", "prompt": "# Write a python function to return the negative numbers in a list.\n\n\ndefmodule HumanEval do\n def neg_nos(l, i, s, t, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_436_neg_nos.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"neg_nos\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :neg_nos end)\n candidate = fn args -> apply(HumanEval, neg_nos, args) end\n assert [-1, -6] == candidate.([[-1, 4, 5, -6]])\n assert [-1, -2] == candidate.([[-1, -2, 3, 4]])\n assert [-7, -6] == candidate.([[-7, -6, 8, 9]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_437_remove_odd", "language": "elixir", "prompt": "# Write a function to remove odd characters in a string.\n\n\ndefmodule HumanEval do\n def remove_odd(s, t, r, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_437_remove_odd.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_odd\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_odd end)\n candidate = fn args -> apply(HumanEval, remove_odd, args) end\n assert \"yhn\" == candidate.([\"python\"])\n assert \"rga\" == candidate.([\"program\"])\n assert \"agae\" == candidate.([\"language\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_438_count_bidirectional", "language": "elixir", "prompt": "# Write a function to count bidirectional tuple pairs.\n\n\ndefmodule HumanEval do\n def count_bidirectional(t, e, s, t, _, l, i, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_438_count_bidirectional.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_bidirectional\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_bidirectional end)\n candidate = fn args -> apply(HumanEval, count_bidirectional, args) end\n assert 3 == candidate.([[{5, 6}, {1, 2}, {6, 5}, {9, 1}, {6, 5}, {2, 1}]])\n assert 2 == candidate.([[{5, 6}, {1, 3}, {6, 5}, {9, 1}, {6, 5}, {2, 1}]])\n assert 4 == candidate.([[{5, 6}, {1, 2}, {6, 5}, {9, 2}, {6, 5}, {2, 1}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_439_multiple_to_single", "language": "elixir", "prompt": "# Write a function to join a list of multiple integers into a single integer.\n\n\ndefmodule HumanEval do\n def multiple_to_single(L) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_439_multiple_to_single.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"multiple_to_single\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :multiple_to_single end)\n candidate = fn args -> apply(HumanEval, multiple_to_single, args) end\n assert 113350 == candidate.([[11, 33, 50]])\n assert -123456 == candidate.([[-1, 2, 3, 4, 5, 6]])\n assert 10152025 == candidate.([[10, 15, 20, 25]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_440_find_adverb_position", "language": "elixir", "prompt": "# Write a function to find the first adverb and their positions in a given sentence.\n\n\ndefmodule HumanEval do\n def find_adverb_position(t, e, x, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_440_find_adverb_position.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_adverb_position\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_adverb_position end)\n candidate = fn args -> apply(HumanEval, find_adverb_position, args) end\n assert {0, 7, \"clearly\"} == candidate.([\"clearly!! we can see the sky\"])\n assert {0, 9, \"seriously\"} == candidate.([\"seriously!! there are many roses\"])\n assert {0, 13, \"unfortunately\"} == candidate.([\"unfortunately!! sita is going to home\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_441_surfacearea_cube", "language": "elixir", "prompt": "# Write a function to find the surface area of a cube of a given size.\n\n\ndefmodule HumanEval do\n def surfacearea_cube(l) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_441_surfacearea_cube.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"surfacearea_cube\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :surfacearea_cube end)\n candidate = fn args -> apply(HumanEval, surfacearea_cube, args) end\n assert 150 == candidate.([5])\n assert 54 == candidate.([3])\n assert 600 == candidate.([10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_442_positive_count", "language": "elixir", "prompt": "# Write a function to find the ration of positive numbers in an array of integers.\n\n\ndefmodule HumanEval do\n def positive_count(n, u, m, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_442_positive_count.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"positive_count\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :positive_count end)\n candidate = fn args -> apply(HumanEval, positive_count, args) end\n assert 0.54 == candidate.([[0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8]])\n assert 0.69 == candidate.([[2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8]])\n assert 0.56 == candidate.([[2, 4, -6, -9, 11, -12, 14, -5, 17]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_443_largest_neg", "language": "elixir", "prompt": "# Write a python function to find the largest negative number from the given list.\n\n\ndefmodule HumanEval do\n def largest_neg(l, i, s, t, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_443_largest_neg.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"largest_neg\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :largest_neg end)\n candidate = fn args -> apply(HumanEval, largest_neg, args) end\n assert -6 == candidate.([[1, 2, 3, -4, -6]])\n assert -9 == candidate.([[1, 2, 3, -8, -9]])\n assert -1 == candidate.([[1, 2, 3, 4, -1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_444_trim_tuple", "language": "elixir", "prompt": "# Write a function to trim each list by k in the given lists.\n\n\ndefmodule HumanEval do\n def trim_tuple(t, e, s, t, _, l, i, s, t, ,, , K) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_444_trim_tuple.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"trim_tuple\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :trim_tuple end)\n candidate = fn args -> apply(HumanEval, trim_tuple, args) end\n assert [[2], [9], [2], [2]] == candidate.([[[5, 3, 2, 1, 4], [3, 4, 9, 2, 1], [9, 1, 2, 3, 5], [4, 8, 2, 1, 7]], 2])\n assert [[3, 2, 1], [4, 9, 2], [1, 2, 3], [8, 2, 1]] == candidate.([[[5, 3, 2, 1, 4], [3, 4, 9, 2, 1], [9, 1, 2, 3, 5], [4, 8, 2, 1, 7]], 1])\n assert [[8, 4], [8, 12], [1, 7], [6, 9]] == candidate.([[[7, 8, 4, 9], [11, 8, 12, 4], [4, 1, 7, 8], [3, 6, 9, 7]], 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_445_index_multiplication", "language": "elixir", "prompt": "# Write a function to perform index wise multiplication of list elements in the given two lists.\n\n\ndefmodule HumanEval do\n def index_multiplication(t, e, s, t, _, t, u, p, 1, ,, , t, e, s, t, _, t, u, p, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_445_index_multiplication.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"index_multiplication\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :index_multiplication end)\n candidate = fn args -> apply(HumanEval, index_multiplication, args) end\n assert [[6, 21], [12, 45], [2, 9], [7, 30]] == candidate.([[[1, 3], [4, 5], [2, 9], [1, 10]], [[6, 7], [3, 9], [1, 1], [7, 3]]])\n assert [[14, 32], [20, 60], [6, 20], [16, 44]] == candidate.([[[2, 4], [5, 6], [3, 10], [2, 11]], [[7, 8], [4, 10], [2, 2], [8, 4]]])\n assert [[24, 45], [30, 77], [12, 33], [27, 60]] == candidate.([[[3, 5], [6, 7], [4, 11], [3, 12]], [[8, 9], [5, 11], [3, 3], [9, 5]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_446_count_Occurrence", "language": "elixir", "prompt": "# Write a python function to count the occurence of all elements of list in a tuple.\n\n\ndefmodule HumanEval do\n def count_Occurrence(t, u, p, ,, , l, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_446_count_Occurrence.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_Occurrence\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_Occurrence end)\n candidate = fn args -> apply(HumanEval, count_Occurrence, args) end\n assert 3 == candidate.([{\"a\", \"a\", \"c\", \"b\", \"d\"}, [\"a\", \"b\"]])\n assert 6 == candidate.([{1, 2, 3, 1, 4, 6, 7, 1, 4}, [1, 4, 7]])\n assert 2 == candidate.([{1, 2, 3, 4, 5, 6}, [1, 2]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_447_cube_nums", "language": "elixir", "prompt": "# Write a function to find cubes of individual elements in a list.\n\n\ndefmodule HumanEval do\n def cube_nums(n, u, m, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_447_cube_nums.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"cube_nums\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :cube_nums end)\n candidate = fn args -> apply(HumanEval, cube_nums, args) end\n assert [1, 8, 27, 64, 125, 216, 343, 512, 729, 1000] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]])\n assert [1000, 8000, 27000] == candidate.([[10, 20, 30]])\n assert [1728, 3375] == candidate.([[12, 15]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_448_cal_sum", "language": "elixir", "prompt": "# Write a function to calculate the sum of perrin numbers.\n\n\ndefmodule HumanEval do\n def cal_sum(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_448_cal_sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"cal_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :cal_sum end)\n candidate = fn args -> apply(HumanEval, cal_sum, args) end\n assert 49 == candidate.([9])\n assert 66 == candidate.([10])\n assert 88 == candidate.([11])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_450_extract_string", "language": "elixir", "prompt": "# Write a function to extract specified size of strings from a given list of string values.\n\n\ndefmodule HumanEval do\n def extract_string(s, t, r, ,, , l) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_450_extract_string.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"extract_string\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :extract_string end)\n candidate = fn args -> apply(HumanEval, extract_string, args) end\n assert [\"practice\", \"solution\"] == candidate.([[\"Python\", \"list\", \"exercises\", \"practice\", \"solution\"], 8])\n assert [\"Python\"] == candidate.([[\"Python\", \"list\", \"exercises\", \"practice\", \"solution\"], 6])\n assert [\"exercises\"] == candidate.([[\"Python\", \"list\", \"exercises\", \"practice\", \"solution\"], 9])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_451_remove_whitespaces", "language": "elixir", "prompt": "# Write a function to remove all whitespaces from the given string.\n\n\ndefmodule HumanEval do\n def remove_whitespaces(t, e, x, t, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_451_remove_whitespaces.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_whitespaces\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_whitespaces end)\n candidate = fn args -> apply(HumanEval, remove_whitespaces, args) end\n assert \"GoogleFlutter\" == candidate.([\" Google Flutter \"])\n assert \"GoogleDart\" == candidate.([\" Google Dart \"])\n assert \"iOSSwift\" == candidate.([\" iOS Swift \"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_452_loss_amount", "language": "elixir", "prompt": "# Write a function that gives loss amount on a sale if the given amount has loss else return 0.\n\n\ndefmodule HumanEval do\n def loss_amount(a, c, t, u, a, l, _, c, o, s, t, ,, , s, a, l, e, _, a, m, o, u, n, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_452_loss_amount.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"loss_amount\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :loss_amount end)\n candidate = fn args -> apply(HumanEval, loss_amount, args) end\n assert 0 == candidate.([1500, 1200])\n assert 100 == candidate.([100, 200])\n assert 3000 == candidate.([2000, 5000])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_453_sumofFactors", "language": "elixir", "prompt": "# Write a python function to find the sum of even factors of a number.\n\n\ndefmodule HumanEval do\n def sumofFactors(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_453_sumofFactors.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sumofFactors\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sumofFactors end)\n candidate = fn args -> apply(HumanEval, sumofFactors, args) end\n assert 26 == candidate.([18])\n assert 48 == candidate.([30])\n assert 8 == candidate.([6])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_454_text_match_wordz", "language": "elixir", "prompt": "# Write a function that matches a word containing 'z'.\n\n\ndefmodule HumanEval do\n def text_match_wordz(t, e, x, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_454_text_match_wordz.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"text_match_wordz\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :text_match_wordz end)\n candidate = fn args -> apply(HumanEval, text_match_wordz, args) end\n assert true == candidate.([\"pythonz.\"])\n assert true == candidate.([\"xyz.\"])\n assert false == candidate.([\" lang .\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_455_check_monthnumb_number", "language": "elixir", "prompt": "# Write a function to check whether the given month number contains 31 days or not.\n\n\ndefmodule HumanEval do\n def check_monthnumb_number(m, o, n, t, h, n, u, m, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_455_check_monthnumb_number.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_monthnumb_number\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_monthnumb_number end)\n candidate = fn args -> apply(HumanEval, check_monthnumb_number, args) end\n assert true == candidate.([5])\n assert false == candidate.([2])\n assert false == candidate.([6])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_456_reverse_string_list", "language": "elixir", "prompt": "# Write a function to reverse each string in a given list of string values.\n\n\ndefmodule HumanEval do\n def reverse_string_list(s, t, r, i, n, g, l, i, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_456_reverse_string_list.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"reverse_string_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :reverse_string_list end)\n candidate = fn args -> apply(HumanEval, reverse_string_list, args) end\n assert [\"deR\", \"neerG\", \"eulB\", \"etihW\", \"kcalB\"] == candidate.([[\"Red\", \"Green\", \"Blue\", \"White\", \"Black\"]])\n assert [\"nhoj\", \"lama\", \"leoj\", \"egroeg\"] == candidate.([[\"john\", \"amal\", \"joel\", \"george\"]])\n assert [\"kcaj\", \"nhoj\", \"yram\"] == candidate.([[\"jack\", \"john\", \"mary\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_457_Find_Min", "language": "elixir", "prompt": "# Write a python function to find the sublist having minimum length.\n\n\ndefmodule HumanEval do\n def Find_Min(l, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_457_Find_Min.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"Find_Min\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :Find_Min end)\n candidate = fn args -> apply(HumanEval, Find_Min, args) end\n assert [1] == candidate.([[[1], [1, 2], [1, 2, 3]]])\n assert [1, 1] == candidate.([[[1, 1], [1, 1, 1], [1, 2, 7, 8]]])\n assert [\"x\"] == candidate.([[[\"x\"], [\"x\", \"y\"], [\"x\", \"y\", \"z\"]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_458_rectangle_area", "language": "elixir", "prompt": "# Write a function to find the area of a rectangle.\n\n\ndefmodule HumanEval do\n def rectangle_area(l, ,, , b) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_458_rectangle_area.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"rectangle_area\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :rectangle_area end)\n candidate = fn args -> apply(HumanEval, rectangle_area, args) end\n assert 200 == candidate.([10, 20])\n assert 50 == candidate.([10, 5])\n assert 8 == candidate.([4, 2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_459_remove_uppercase", "language": "elixir", "prompt": "# Write a function to remove uppercase substrings from a given string.\n\n\ndefmodule HumanEval do\n def remove_uppercase(s, t, r, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_459_remove_uppercase.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_uppercase\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_uppercase end)\n candidate = fn args -> apply(HumanEval, remove_uppercase, args) end\n assert \"cstyoravoitshos\" == candidate.([\"cAstyoUrFavoRitETVshoWs\"])\n assert \"wtchheinerntrdo\" == candidate.([\"wAtchTheinTernEtrAdIo\"])\n assert \"oiceachndreomendaion\" == candidate.([\"VoicESeaRchAndreComMendaTionS\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_460_Extract", "language": "elixir", "prompt": "# Write a python function to get the first element of each sublist.\n\n\ndefmodule HumanEval do\n def Extract(l, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_460_Extract.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"Extract\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :Extract end)\n candidate = fn args -> apply(HumanEval, Extract, args) end\n assert [1, 3, 6] == candidate.([[[1, 2], [3, 4, 5], [6, 7, 8, 9]]])\n assert [1, 4] == candidate.([[[1, 2, 3], [4, 5]]])\n assert [9, 1] == candidate.([[[9, 8, 1], [1, 2]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_461_upper_ctr", "language": "elixir", "prompt": "# Write a python function to count the upper case characters in a given string.\n\n\ndefmodule HumanEval do\n def upper_ctr(s, t, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_461_upper_ctr.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"upper_ctr\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :upper_ctr end)\n candidate = fn args -> apply(HumanEval, upper_ctr, args) end\n assert 1 == candidate.([\"PYthon\"])\n assert 1 == candidate.([\"BigData\"])\n assert 0 == candidate.([\"program\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_462_combinations_list", "language": "elixir", "prompt": "# Write a function to find all possible combinations of the elements of a given list.\n\n\ndefmodule HumanEval do\n def combinations_list(l, i, s, t, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_462_combinations_list.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"combinations_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :combinations_list end)\n candidate = fn args -> apply(HumanEval, combinations_list, args) end\n assert [[], [\"orange\"], [\"red\"], [\"red\", \"orange\"], [\"green\"], [\"green\", \"orange\"], [\"green\", \"red\"], [\"green\", \"red\", \"orange\"], [\"blue\"], [\"blue\", \"orange\"], [\"blue\", \"red\"], [\"blue\", \"red\", \"orange\"], [\"blue\", \"green\"], [\"blue\", \"green\", \"orange\"], [\"blue\", \"green\", \"red\"], [\"blue\", \"green\", \"red\", \"orange\"]] == candidate.([[\"orange\", \"red\", \"green\", \"blue\"]])\n assert [[], [\"red\"], [\"green\"], [\"green\", \"red\"], [\"blue\"], [\"blue\", \"red\"], [\"blue\", \"green\"], [\"blue\", \"green\", \"red\"], [\"white\"], [\"white\", \"red\"], [\"white\", \"green\"], [\"white\", \"green\", \"red\"], [\"white\", \"blue\"], [\"white\", \"blue\", \"red\"], [\"white\", \"blue\", \"green\"], [\"white\", \"blue\", \"green\", \"red\"], [\"black\"], [\"black\", \"red\"], [\"black\", \"green\"], [\"black\", \"green\", \"red\"], [\"black\", \"blue\"], [\"black\", \"blue\", \"red\"], [\"black\", \"blue\", \"green\"], [\"black\", \"blue\", \"green\", \"red\"], [\"black\", \"white\"], [\"black\", \"white\", \"red\"], [\"black\", \"white\", \"green\"], [\"black\", \"white\", \"green\", \"red\"], [\"black\", \"white\", \"blue\"], [\"black\", \"white\", \"blue\", \"red\"], [\"black\", \"white\", \"blue\", \"green\"], [\"black\", \"white\", \"blue\", \"green\", \"red\"], [\"orange\"], [\"orange\", \"red\"], [\"orange\", \"green\"], [\"orange\", \"green\", \"red\"], [\"orange\", \"blue\"], [\"orange\", \"blue\", \"red\"], [\"orange\", \"blue\", \"green\"], [\"orange\", \"blue\", \"green\", \"red\"], [\"orange\", \"white\"], [\"orange\", \"white\", \"red\"], [\"orange\", \"white\", \"green\"], [\"orange\", \"white\", \"green\", \"red\"], [\"orange\", \"white\", \"blue\"], [\"orange\", \"white\", \"blue\", \"red\"], [\"orange\", \"white\", \"blue\", \"green\"], [\"orange\", \"white\", \"blue\", \"green\", \"red\"], [\"orange\", \"black\"], [\"orange\", \"black\", \"red\"], [\"orange\", \"black\", \"green\"], [\"orange\", \"black\", \"green\", \"red\"], [\"orange\", \"black\", \"blue\"], [\"orange\", \"black\", \"blue\", \"red\"], [\"orange\", \"black\", \"blue\", \"green\"], [\"orange\", \"black\", \"blue\", \"green\", \"red\"], [\"orange\", \"black\", \"white\"], [\"orange\", \"black\", \"white\", \"red\"], [\"orange\", \"black\", \"white\", \"green\"], [\"orange\", \"black\", \"white\", \"green\", \"red\"], [\"orange\", \"black\", \"white\", \"blue\"], [\"orange\", \"black\", \"white\", \"blue\", \"red\"], [\"orange\", \"black\", \"white\", \"blue\", \"green\"], [\"orange\", \"black\", \"white\", \"blue\", \"green\", \"red\"]] == candidate.([[\"red\", \"green\", \"blue\", \"white\", \"black\", \"orange\"]])\n assert [[], [\"red\"], [\"green\"], [\"green\", \"red\"], [\"black\"], [\"black\", \"red\"], [\"black\", \"green\"], [\"black\", \"green\", \"red\"], [\"orange\"], [\"orange\", \"red\"], [\"orange\", \"green\"], [\"orange\", \"green\", \"red\"], [\"orange\", \"black\"], [\"orange\", \"black\", \"red\"], [\"orange\", \"black\", \"green\"], [\"orange\", \"black\", \"green\", \"red\"]] == candidate.([[\"red\", \"green\", \"black\", \"orange\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_463_max_subarray_product", "language": "elixir", "prompt": "# Write a function to find the maximum product subarray of the given array.\n\n\ndefmodule HumanEval do\n def max_subarray_product(a, r, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_463_max_subarray_product.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_subarray_product\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_subarray_product end)\n candidate = fn args -> apply(HumanEval, max_subarray_product, args) end\n assert 112 == candidate.([[1, -2, -3, 0, 7, -8, -2]])\n assert 180 == candidate.([[6, -3, -10, 0, 2]])\n assert 80 == candidate.([[-2, -40, 0, -2, -3]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_464_check_value", "language": "elixir", "prompt": "# Write a function to check if all values are same in a dictionary.\n\n\ndefmodule HumanEval do\n def check_value(d, i, c, t, ,, , n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_464_check_value.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_value\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_value end)\n candidate = fn args -> apply(HumanEval, check_value, args) end\n assert false == candidate.([%{\"Cierra Vega\" => 12, \"Alden Cantrell\" => 12, \"Kierra Gentry\" => 12, \"Pierre Cox\" => 12}, 10])\n assert true == candidate.([%{\"Cierra Vega\" => 12, \"Alden Cantrell\" => 12, \"Kierra Gentry\" => 12, \"Pierre Cox\" => 12}, 12])\n assert false == candidate.([%{\"Cierra Vega\" => 12, \"Alden Cantrell\" => 12, \"Kierra Gentry\" => 12, \"Pierre Cox\" => 12}, 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_465_drop_empty", "language": "elixir", "prompt": "# Write a function to drop empty items from a given dictionary.\n\n\ndefmodule HumanEval do\n def drop_empty(d, i, c, t, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_465_drop_empty.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"drop_empty\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :drop_empty end)\n candidate = fn args -> apply(HumanEval, drop_empty, args) end\n assert %{\"c1\" => \"Red\", \"c2\" => \"Green\"} == candidate.([%{\"c1\" => \"Red\", \"c2\" => \"Green\", \"c3\" => nil}])\n assert %{\"c1\" => \"Red\"} == candidate.([%{\"c1\" => \"Red\", \"c2\" => nil, \"c3\" => nil}])\n assert %{\"c2\" => \"Green\"} == candidate.([%{\"c1\" => nil, \"c2\" => \"Green\", \"c3\" => nil}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_468_max_product", "language": "elixir", "prompt": "# Write a function to find the maximum product formed by multiplying numbers of an increasing subsequence of that array.\n\n\ndefmodule HumanEval do\n def max_product(a, r, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_468_max_product.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_product\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_product end)\n candidate = fn args -> apply(HumanEval, max_product, args) end\n assert 3000 == candidate.([[3, 100, 4, 5, 150, 6]])\n assert 50265600 == candidate.([[4, 42, 55, 68, 80]])\n assert 2460 == candidate.([[10, 22, 9, 33, 21, 50, 41, 60]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_470_add_pairwise", "language": "elixir", "prompt": "# Write a function to find the pairwise addition of the neighboring elements of the given tuple.\n\n\ndefmodule HumanEval do\n def add_pairwise(t, e, s, t, _, t, u, p) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_470_add_pairwise.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"add_pairwise\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :add_pairwise end)\n candidate = fn args -> apply(HumanEval, add_pairwise, args) end\n assert {6, 12, 15, 18} == candidate.([{1, 5, 7, 8, 10}])\n assert {8, 14, 17, 20} == candidate.([{2, 6, 8, 9, 11}])\n assert {10, 16, 19, 22} == candidate.([{3, 7, 9, 10, 12}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_471_find_remainder", "language": "elixir", "prompt": "# Write a python function to find the product of the array multiplication modulo n.\n\n\ndefmodule HumanEval do\n def find_remainder(a, r, r, ,, , n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_471_find_remainder.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_remainder\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_remainder end)\n candidate = fn args -> apply(HumanEval, find_remainder, args) end\n assert 9 == candidate.([[100, 10, 5, 25, 35, 14], 11])\n assert 0 == candidate.([[1, 1, 1], 1])\n assert 0 == candidate.([[1, 2, 1], 2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_472_check_Consecutive", "language": "elixir", "prompt": "# Write a python function to check whether the given list contains consecutive numbers or not.\n\n\ndefmodule HumanEval do\n def check_Consecutive(l) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_472_check_Consecutive.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_Consecutive\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_Consecutive end)\n candidate = fn args -> apply(HumanEval, check_Consecutive, args) end\n assert true == candidate.([[1, 2, 3, 4, 5]])\n assert false == candidate.([[1, 2, 3, 5, 6]])\n assert false == candidate.([[1, 2, 1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_474_replace_char", "language": "elixir", "prompt": "# Write a function to replace characters in a string.\n\n\ndefmodule HumanEval do\n def replace_char(s, t, r, 1, ,, , c, h, ,, , n, e, w, c, h) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_474_replace_char.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"replace_char\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :replace_char end)\n candidate = fn args -> apply(HumanEval, replace_char, args) end\n assert \"pollgon\" == candidate.([\"polygon\", \"y\", \"l\"])\n assert \"aharaater\" == candidate.([\"character\", \"c\", \"a\"])\n assert \"python\" == candidate.([\"python\", \"l\", \"a\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_475_sort_counter", "language": "elixir", "prompt": "# Write a function to sort a dictionary by value.\n\n\ndefmodule HumanEval do\n def sort_counter(d, i, c, t, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_475_sort_counter.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sort_counter\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sort_counter end)\n candidate = fn args -> apply(HumanEval, sort_counter, args) end\n assert [{\"Chemistry\", 87}, {\"Physics\", 83}, {\"Math\", 81}] == candidate.([%{\"Math\" => 81, \"Physics\" => 83, \"Chemistry\" => 87}])\n assert [{\"Math\", 400}, {\"Physics\", 300}, {\"Chemistry\", 250}] == candidate.([%{\"Math\" => 400, \"Physics\" => 300, \"Chemistry\" => 250}])\n assert [{\"Chemistry\", 1250}, {\"Physics\", 1000}, {\"Math\", 900}] == candidate.([%{\"Math\" => 900, \"Physics\" => 1000, \"Chemistry\" => 1250}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_476_big_sum", "language": "elixir", "prompt": "# Write a python function to find the sum of the largest and smallest value in a given array.\n\n\ndefmodule HumanEval do\n def big_sum(n, u, m, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_476_big_sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"big_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :big_sum end)\n candidate = fn args -> apply(HumanEval, big_sum, args) end\n assert 4 == candidate.([[1, 2, 3]])\n assert 3 == candidate.([[-1, 2, 3, 4]])\n assert 8 == candidate.([[2, 3, 6]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_477_is_lower", "language": "elixir", "prompt": "# Write a python function to convert the given string to lower case.\n\n\ndefmodule HumanEval do\n def is_lower(s, t, r, i, n, g) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_477_is_lower.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_lower\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_lower end)\n candidate = fn args -> apply(HumanEval, is_lower, args) end\n assert \"invalid\" == candidate.([\"InValid\"])\n assert \"true\" == candidate.([\"TruE\"])\n assert \"sentence\" == candidate.([\"SenTenCE\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_478_remove_lowercase", "language": "elixir", "prompt": "# Write a function to remove lowercase substrings from a given string.\n\n\ndefmodule HumanEval do\n def remove_lowercase(s, t, r, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_478_remove_lowercase.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_lowercase\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_lowercase end)\n candidate = fn args -> apply(HumanEval, remove_lowercase, args) end\n assert \"PYTH\" == candidate.([\"PYTHon\"])\n assert \"FID\" == candidate.([\"FInD\"])\n assert \"STRG\" == candidate.([\"STRinG\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_479_first_Digit", "language": "elixir", "prompt": "# Write a python function to find the first digit of a given number.\n\n\ndefmodule HumanEval do\n def first_Digit(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_479_first_Digit.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"first_Digit\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :first_Digit end)\n candidate = fn args -> apply(HumanEval, first_Digit, args) end\n assert 1 == candidate.([123])\n assert 4 == candidate.([456])\n assert 1 == candidate.([12])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_4_heap_queue_largest", "language": "elixir", "prompt": "# Write a function to find the n largest integers from a given list of numbers, returned in descending order.\n\n\ndefmodule HumanEval do\n def heap_queue_largest(n, u, m, s, ,, , n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_4_heap_queue_largest.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"heap_queue_largest\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :heap_queue_largest end)\n candidate = fn args -> apply(HumanEval, heap_queue_largest, args) end\n assert [85, 75, 65] == candidate.([[25, 35, 22, 85, 14, 65, 75, 22, 58], 3])\n assert [85, 75] == candidate.([[25, 35, 22, 85, 14, 65, 75, 22, 58], 2])\n assert [85, 75, 65, 58, 35] == candidate.([[25, 35, 22, 85, 14, 65, 75, 22, 58], 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_554_Split", "language": "elixir", "prompt": "# Write a python function which takes a list of integers and only returns the odd ones.\n\n\ndefmodule HumanEval do\n def Split(l, i, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_554_Split.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"Split\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :Split end)\n candidate = fn args -> apply(HumanEval, Split, args) end\n assert [1, 3, 5] == candidate.([[1, 2, 3, 4, 5, 6]])\n assert [11, 13] == candidate.([[10, 11, 12, 13]])\n assert [7, 9, 1] == candidate.([[7, 8, 9, 1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_555_difference", "language": "elixir", "prompt": "# Write a python function to find the difference between the sum of cubes of the first n natural numbers and the sum of the first n natural numbers.\n\n\ndefmodule HumanEval do\n def difference(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_555_difference.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"difference\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :difference end)\n candidate = fn args -> apply(HumanEval, difference, args) end\n assert 30 == candidate.([3])\n assert 210 == candidate.([5])\n assert 6 == candidate.([2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_556_find_Odd_Pair", "language": "elixir", "prompt": "# Write a python function to count the number of pairs whose xor value is odd.\n\n\ndefmodule HumanEval do\n def find_Odd_Pair(A, ,, , N) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_556_find_Odd_Pair.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_Odd_Pair\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_Odd_Pair end)\n candidate = fn args -> apply(HumanEval, find_Odd_Pair, args) end\n assert 6 == candidate.([[5, 4, 7, 2, 1], 5])\n assert 12 == candidate.([[7, 2, 8, 1, 0, 5, 11], 7])\n assert 2 == candidate.([[1, 2, 3], 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_557_toggle_string", "language": "elixir", "prompt": "# Write a function to toggle the case of all characters in a string.\n\n\ndefmodule HumanEval do\n def toggle_string(s, t, r, i, n, g) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_557_toggle_string.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"toggle_string\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :toggle_string end)\n candidate = fn args -> apply(HumanEval, toggle_string, args) end\n assert \"pYTHON\" == candidate.([\"Python\"])\n assert \"pANGRAM\" == candidate.([\"Pangram\"])\n assert \"liTTle\" == candidate.([\"LIttLE\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_558_digit_distance_nums", "language": "elixir", "prompt": "# Write a python function to find the sum of the per-digit difference between two integers.\n\n\ndefmodule HumanEval do\n def digit_distance_nums(n, 1, ,, , n, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_558_digit_distance_nums.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"digit_distance_nums\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :digit_distance_nums end)\n candidate = fn args -> apply(HumanEval, digit_distance_nums, args) end\n assert 1 == candidate.([1, 2])\n assert 6 == candidate.([23, 56])\n assert 7 == candidate.([123, 256])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_559_max_sub_array_sum", "language": "elixir", "prompt": "# Write a function to find the sum of the largest contiguous sublist in the given list.\n\n\ndefmodule HumanEval do\n def max_sub_array_sum(a, ,, , s, i, z, e) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_559_max_sub_array_sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_sub_array_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_sub_array_sum end)\n candidate = fn args -> apply(HumanEval, max_sub_array_sum, args) end\n assert 7 == candidate.([[-2, -3, 4, -1, -2, 1, 5, -3], 8])\n assert 8 == candidate.([[-3, -4, 5, -2, -3, 2, 6, -4], 8])\n assert 10 == candidate.([[-4, -5, 6, -3, -4, 3, 7, -5], 8])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_560_union_elements", "language": "elixir", "prompt": "# Write a function to find the union of the elements of two given lists and output them in sorted order.\n\n\ndefmodule HumanEval do\n def union_elements(t, e, s, t, _, t, u, p, 1, ,, , t, e, s, t, _, t, u, p, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_560_union_elements.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"union_elements\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :union_elements end)\n candidate = fn args -> apply(HumanEval, union_elements, args) end\n assert [3, 4, 5, 6, 7, 10] == candidate.([[3, 4, 5, 6], [5, 7, 4, 10]])\n assert [1, 2, 3, 4, 5, 6] == candidate.([[1, 2, 3, 4], [3, 4, 5, 6]])\n assert [11, 12, 13, 14, 15, 16, 17] == candidate.([[11, 12, 13, 14], [13, 15, 16, 17]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_562_Find_Max_Length", "language": "elixir", "prompt": "# Write a python function to find the length of the longest sublists.\n\n\ndefmodule HumanEval do\n def Find_Max_Length(l, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_562_Find_Max_Length.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"Find_Max_Length\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :Find_Max_Length end)\n candidate = fn args -> apply(HumanEval, Find_Max_Length, args) end\n assert 4 == candidate.([[[1], [1, 4], [5, 6, 7, 8]]])\n assert 3 == candidate.([[[0, 1], [2, 2], [3, 2, 1]]])\n assert 5 == candidate.([[[7], [22, 23], [13, 14, 15], [10, 20, 30, 40, 50]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_563_extract_values", "language": "elixir", "prompt": "# Write a function to extract values between quotation marks from a string.\n\n\ndefmodule HumanEval do\n def extract_values(t, e, x, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_563_extract_values.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"extract_values\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :extract_values end)\n candidate = fn args -> apply(HumanEval, extract_values, args) end\n assert [\"Python\", \"PHP\", \"Java\"] == candidate.([\"\"Python\", \"PHP\", \"Java\"\"])\n assert [\"python\", \"program\", \"language\"] == candidate.([\"\"python\",\"program\",\"language\"\"])\n assert [\"red\", \"blue\", \"green\", \"yellow\"] == candidate.([\"\"red\",\"blue\",\"green\",\"yellow\"\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_564_count_Pairs", "language": "elixir", "prompt": "# Write a python function which takes a list of integers and counts the number of possible unordered pairs where both elements are unequal.\n\n\ndefmodule HumanEval do\n def count_Pairs(a, r, r, ,, , n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_564_count_Pairs.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_Pairs\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_Pairs end)\n candidate = fn args -> apply(HumanEval, count_Pairs, args) end\n assert 2 == candidate.([[1, 2, 1], 3])\n assert 0 == candidate.([[1, 1, 1, 1], 4])\n assert 10 == candidate.([[1, 2, 3, 4, 5], 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_565_split", "language": "elixir", "prompt": "# Write a python function to split a string into characters.\n\n\ndefmodule HumanEval do\n def split(w, o, r, d) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_565_split.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"split\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :split end)\n candidate = fn args -> apply(HumanEval, split, args) end\n assert [\"p\", \"y\", \"t\", \"h\", \"o\", \"n\"] == candidate.([\"python\"])\n assert [\"N\", \"a\", \"m\", \"e\"] == candidate.([\"Name\"])\n assert [\"p\", \"r\", \"o\", \"g\", \"r\", \"a\", \"m\"] == candidate.([\"program\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_566_sum_digits", "language": "elixir", "prompt": "# Write a function to get the sum of the digits of a non-negative integer.\n\n\ndefmodule HumanEval do\n def sum_digits(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_566_sum_digits.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_digits\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_digits end)\n candidate = fn args -> apply(HumanEval, sum_digits, args) end\n assert 12 == candidate.([345])\n assert 3 == candidate.([12])\n assert 16 == candidate.([97])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_567_issort_list", "language": "elixir", "prompt": "# Write a function to check whether a specified list is sorted or not.\n\n\ndefmodule HumanEval do\n def issort_list(l, i, s, t, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_567_issort_list.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"issort_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :issort_list end)\n candidate = fn args -> apply(HumanEval, issort_list, args) end\n assert true == candidate.([[1, 2, 4, 6, 8, 10, 12, 14, 16, 17]])\n assert false == candidate.([[1, 2, 4, 6, 8, 10, 12, 14, 20, 17]])\n assert false == candidate.([[1, 2, 4, 6, 8, 10, 15, 14, 20]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_568_empty_list", "language": "elixir", "prompt": "# Write a function to create a list of N empty dictionaries.\n\n\ndefmodule HumanEval do\n def empty_list(l, e, n, g, t, h) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_568_empty_list.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"empty_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :empty_list end)\n candidate = fn args -> apply(HumanEval, empty_list, args) end\n assert [%{}, %{}, %{}, %{}, %{}] == candidate.([5])\n assert [%{}, %{}, %{}, %{}, %{}, %{}] == candidate.([6])\n assert [%{}, %{}, %{}, %{}, %{}, %{}, %{}] == candidate.([7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_569_sort_sublists", "language": "elixir", "prompt": "# Write a function to sort each sublist of strings in a given list of lists.\n\n\ndefmodule HumanEval do\n def sort_sublists(l, i, s, t, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_569_sort_sublists.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sort_sublists\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sort_sublists end)\n candidate = fn args -> apply(HumanEval, sort_sublists, args) end\n assert [[\"green\", \"orange\"], [\"black\", \"white\"], [\"black\", \"orange\", \"white\"]] == candidate.([[[\"green\", \"orange\"], [\"black\", \"white\"], [\"white\", \"black\", \"orange\"]]])\n assert [[\"green\", \"orange\"], [\"black\"], [\"green\", \"orange\"], [\"white\"]] == candidate.([[[\"green\", \"orange\"], [\"black\"], [\"green\", \"orange\"], [\"white\"]]])\n assert [[\"a\", \"b\"], [\"c\", \"d\"], [\"g\", \"h\"], [\"e\", \"f\"]] == candidate.([[[\"a\", \"b\"], [\"d\", \"c\"], [\"g\", \"h\"], [\"f\", \"e\"]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_56_checks", "language": "elixir", "prompt": "# Write a python function to check if a given number is one less than twice its reverse.\n\n\ndefmodule HumanEval do\n def checks(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_56_checks.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"checks\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :checks end)\n candidate = fn args -> apply(HumanEval, checks, args) end\n assert false == candidate.([70])\n assert false == candidate.([23])\n assert true == candidate.([73])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_572_two_unique_nums", "language": "elixir", "prompt": "# Write a python function to remove duplicate numbers from a given number of lists.\n\n\ndefmodule HumanEval do\n def two_unique_nums(n, u, m, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_572_two_unique_nums.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"two_unique_nums\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :two_unique_nums end)\n candidate = fn args -> apply(HumanEval, two_unique_nums, args) end\n assert [1, 4, 5] == candidate.([[1, 2, 3, 2, 3, 4, 5]])\n assert [1, 3, 4, 5] == candidate.([[1, 2, 3, 2, 4, 5]])\n assert [1, 2, 3, 4, 5] == candidate.([[1, 2, 3, 4, 5]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_573_unique_product", "language": "elixir", "prompt": "# Write a python function to calculate the product of the unique numbers in a given list.\n\n\ndefmodule HumanEval do\n def unique_product(l, i, s, t, _, d, a, t, a) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_573_unique_product.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"unique_product\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :unique_product end)\n candidate = fn args -> apply(HumanEval, unique_product, args) end\n assert 720000000 == candidate.([[10, 20, 30, 40, 20, 50, 60, 40]])\n assert 6 == candidate.([[1, 2, 3, 1]])\n assert 0 == candidate.([[7, 8, 9, 0, 1, 1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_574_surfacearea_cylinder", "language": "elixir", "prompt": "# Write a function to find the surface area of a cylinder.\n\n\ndefmodule HumanEval do\n def surfacearea_cylinder(r, ,, , h) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_574_surfacearea_cylinder.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"surfacearea_cylinder\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :surfacearea_cylinder end)\n candidate = fn args -> apply(HumanEval, surfacearea_cylinder, args) end\n assert 942.45 == candidate.([10, 5])\n assert 226.18800000000002 == candidate.([4, 5])\n assert 351.848 == candidate.([4, 10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_576_is_Sub_Array", "language": "elixir", "prompt": "# Write a python function to check whether a list is sublist of another or not.\n\n\ndefmodule HumanEval do\n def is_Sub_Array(A, ,, , B) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_576_is_Sub_Array.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_Sub_Array\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_Sub_Array end)\n candidate = fn args -> apply(HumanEval, is_Sub_Array, args) end\n assert false == candidate.([[1, 4, 3, 5], [1, 2]])\n assert true == candidate.([[1, 2, 1], [1, 2, 1]])\n assert false == candidate.([[1, 0, 2, 2], [2, 2, 0]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_577_last_Digit_Factorial", "language": "elixir", "prompt": "# Write a python function to find the last digit in factorial of a given number.\n\n\ndefmodule HumanEval do\n def last_Digit_Factorial(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_577_last_Digit_Factorial.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"last_Digit_Factorial\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :last_Digit_Factorial end)\n candidate = fn args -> apply(HumanEval, last_Digit_Factorial, args) end\n assert 4 == candidate.([4])\n assert 0 == candidate.([21])\n assert 0 == candidate.([30])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_578_interleave_lists", "language": "elixir", "prompt": "# Write a function to interleave 3 lists of the same length into a single flat list.\n\n\ndefmodule HumanEval do\n def interleave_lists(l, i, s, t, 1, ,, , l, i, s, t, 2, ,, , l, i, s, t, 3) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_578_interleave_lists.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"interleave_lists\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :interleave_lists end)\n candidate = fn args -> apply(HumanEval, interleave_lists, args) end\n assert [1, 10, 100, 2, 20, 200, 3, 30, 300, 4, 40, 400, 5, 50, 500, 6, 60, 600, 7, 70, 700] == candidate.([[1, 2, 3, 4, 5, 6, 7], [10, 20, 30, 40, 50, 60, 70], [100, 200, 300, 400, 500, 600, 700]])\n assert [10, 15, 5, 20, 2, 10] == candidate.([[10, 20], [15, 2], [5, 10]])\n assert [11, 10, 20, 44, 15, 5] == candidate.([[11, 44], [10, 15], [20, 5]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_579_find_dissimilar", "language": "elixir", "prompt": "# Write a function to find the dissimilar elements in the given two tuples.\n\n\ndefmodule HumanEval do\n def find_dissimilar(t, e, s, t, _, t, u, p, 1, ,, , t, e, s, t, _, t, u, p, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_579_find_dissimilar.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_dissimilar\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_dissimilar end)\n candidate = fn args -> apply(HumanEval, find_dissimilar, args) end\n assert {3, 6, 7, 10} == candidate.([{3, 4, 5, 6}, {5, 7, 4, 10}])\n assert {1, 4, 7, 9} == candidate.([{1, 2, 3, 4}, {7, 2, 3, 9}])\n assert {34, 36, 11, 25} == candidate.([{21, 11, 25, 26}, {26, 34, 21, 36}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_57_find_Max_Num", "language": "elixir", "prompt": "# Write a python function to find the largest number that can be formed with the given list of digits.\n\n\ndefmodule HumanEval do\n def find_Max_Num(a, r, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_57_find_Max_Num.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_Max_Num\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_Max_Num end)\n candidate = fn args -> apply(HumanEval, find_Max_Num, args) end\n assert 321 == candidate.([[1, 2, 3]])\n assert 6541 == candidate.([[4, 5, 6, 1]])\n assert 9321 == candidate.([[1, 2, 3, 9]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_580_extract_even", "language": "elixir", "prompt": "# Write a function to remove uneven elements in the nested mixed tuple.\n\n\ndefmodule HumanEval do\n def extract_even(t, e, s, t, _, t, u, p, l, e) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_580_extract_even.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"extract_even\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :extract_even end)\n candidate = fn args -> apply(HumanEval, extract_even, args) end\n assert {4, {6, {2, 4}}, 6, 8} == candidate.([{4, 5, {7, 6, {2, 4}}, 6, 8}])\n assert {6, {8, {4, 8}}} == candidate.([{5, 6, {8, 7, {4, 8}}, 7, 9}])\n assert {6, {8, {4, 6}}, 8, 10} == candidate.([{5, 6, {9, 8, {4, 6}}, 8, 10}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_581_surface_Area", "language": "elixir", "prompt": "# Write a python function to find the surface area of a square pyramid with a given base edge and height.\n\n\ndefmodule HumanEval do\n def surface_Area(b, ,, , s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_581_surface_Area.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"surface_Area\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :surface_Area end)\n candidate = fn args -> apply(HumanEval, surface_Area, args) end\n assert 33 == candidate.([3, 4])\n assert 56 == candidate.([4, 5])\n assert 5 == candidate.([1, 2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_583_catalan_number", "language": "elixir", "prompt": "# Write a function which returns nth catalan number.\n\n\ndefmodule HumanEval do\n def catalan_number(n, u, m) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_583_catalan_number.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"catalan_number\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :catalan_number end)\n candidate = fn args -> apply(HumanEval, catalan_number, args) end\n assert 16796 == candidate.([10])\n assert 4862 == candidate.([9])\n assert 429 == candidate.([7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_584_find_adverbs", "language": "elixir", "prompt": "# Write a function to find the first adverb ending with ly and its positions in a given string.\n\n\ndefmodule HumanEval do\n def find_adverbs(t, e, x, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_584_find_adverbs.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_adverbs\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_adverbs end)\n candidate = fn args -> apply(HumanEval, find_adverbs, args) end\n assert \"0-7: Clearly\" == candidate.([\"Clearly, he has no excuse for such behavior.\"])\n assert \"28-36: carefuly\" == candidate.([\"Please handle the situation carefuly\"])\n assert \"18-25: quickly\" == candidate.([\"Complete the task quickly\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_585_expensive_items", "language": "elixir", "prompt": "# Write a function to find the n most expensive items in a given dataset.\n\n\ndefmodule HumanEval do\n def expensive_items(i, t, e, m, s, ,, , n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_585_expensive_items.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"expensive_items\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :expensive_items end)\n candidate = fn args -> apply(HumanEval, expensive_items, args) end\n assert [%{\"name\" => \"Item-2\", \"price\" => 555.22}] == candidate.([[%{\"name\" => \"Item-1\", \"price\" => 101.1}, %{\"name\" => \"Item-2\", \"price\" => 555.22}], 1])\n assert [%{\"name\" => \"Item-2\", \"price\" => 555.22}, %{\"name\" => \"Item-1\", \"price\" => 101.1}] == candidate.([[%{\"name\" => \"Item-1\", \"price\" => 101.1}, %{\"name\" => \"Item-2\", \"price\" => 555.22}, %{\"name\" => \"Item-3\", \"price\" => 45.09}], 2])\n assert [%{\"name\" => \"Item-2\", \"price\" => 555.22}] == candidate.([[%{\"name\" => \"Item-1\", \"price\" => 101.1}, %{\"name\" => \"Item-2\", \"price\" => 555.22}, %{\"name\" => \"Item-3\", \"price\" => 45.09}, %{\"name\" => \"Item-4\", \"price\" => 22.75}], 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_586_split_Arr", "language": "elixir", "prompt": "# Write a python function to split a list at the nth eelment and add the first part to the end.\n\n\ndefmodule HumanEval do\n def split_Arr(l, ,, , n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_586_split_Arr.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"split_Arr\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :split_Arr end)\n candidate = fn args -> apply(HumanEval, split_Arr, args) end\n assert [5, 6, 52, 36, 12, 10] == candidate.([[12, 10, 5, 6, 52, 36], 2])\n assert [2, 3, 4, 1] == candidate.([[1, 2, 3, 4], 1])\n assert [3, 4, 5, 6, 7, 0, 1, 2] == candidate.([[0, 1, 2, 3, 4, 5, 6, 7], 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_587_list_tuple", "language": "elixir", "prompt": "# Write a function to convert a list to a tuple.\n\n\ndefmodule HumanEval do\n def list_tuple(l, i, s, t, x) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_587_list_tuple.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"list_tuple\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :list_tuple end)\n candidate = fn args -> apply(HumanEval, list_tuple, args) end\n assert {5, 10, 7, 4, 15, 3} == candidate.([[5, 10, 7, 4, 15, 3]])\n assert {2, 4, 5, 6, 2, 3, 4, 4, 7} == candidate.([[2, 4, 5, 6, 2, 3, 4, 4, 7]])\n assert {58, 44, 56} == candidate.([[58, 44, 56]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_588_big_diff", "language": "elixir", "prompt": "# Write a python function to find the difference between largest and smallest value in a given list.\n\n\ndefmodule HumanEval do\n def big_diff(n, u, m, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_588_big_diff.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"big_diff\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :big_diff end)\n candidate = fn args -> apply(HumanEval, big_diff, args) end\n assert 3 == candidate.([[1, 2, 3, 4]])\n assert 8 == candidate.([[4, 5, 12]])\n assert 7 == candidate.([[9, 2, 3]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_589_perfect_squares", "language": "elixir", "prompt": "# Write a function to find perfect squares between two given numbers.\n\n\ndefmodule HumanEval do\n def perfect_squares(a, ,, , b) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_589_perfect_squares.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"perfect_squares\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :perfect_squares end)\n candidate = fn args -> apply(HumanEval, perfect_squares, args) end\n assert [1, 4, 9, 16, 25] == candidate.([1, 30])\n assert [64, 81, 100] == candidate.([50, 100])\n assert [100, 121, 144, 169, 196] == candidate.([100, 200])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_58_opposite_Signs", "language": "elixir", "prompt": "# Write a python function to check whether the given two integers have opposite sign or not.\n\n\ndefmodule HumanEval do\n def opposite_Signs(x, ,, , y) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_58_opposite_Signs.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"opposite_Signs\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :opposite_Signs end)\n candidate = fn args -> apply(HumanEval, opposite_Signs, args) end\n assert true == candidate.([1, -2])\n assert false == candidate.([3, 2])\n assert false == candidate.([-10, -10])\n assert true == candidate.([-2, 2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_591_swap_List", "language": "elixir", "prompt": "# Write a python function to interchange the first and last elements in a list.\n\n\ndefmodule HumanEval do\n def swap_List(n, e, w, L, i, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_591_swap_List.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"swap_List\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :swap_List end)\n candidate = fn args -> apply(HumanEval, swap_List, args) end\n assert [24, 35, 9, 56, 12] == candidate.([[12, 35, 9, 56, 24]])\n assert [3, 2, 1] == candidate.([[1, 2, 3]])\n assert [6, 5, 4] == candidate.([[4, 5, 6]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_592_sum_Of_product", "language": "elixir", "prompt": "# Write a python function to find the sum of the product of consecutive binomial co-efficients.\n\n\ndefmodule HumanEval do\n def sum_Of_product(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_592_sum_Of_product.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_Of_product\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_Of_product end)\n candidate = fn args -> apply(HumanEval, sum_Of_product, args) end\n assert 15 == candidate.([3])\n assert 56 == candidate.([4])\n assert 1 == candidate.([1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_593_removezero_ip", "language": "elixir", "prompt": "# Write a function to remove leading zeroes from an ip address.\n\n\ndefmodule HumanEval do\n def removezero_ip(i, p) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_593_removezero_ip.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"removezero_ip\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :removezero_ip end)\n candidate = fn args -> apply(HumanEval, removezero_ip, args) end\n assert \"216.8.94.196\" == candidate.([\"216.08.094.196\"])\n assert \"12.1.24\" == candidate.([\"12.01.024\"])\n assert \"216.8.94.196\" == candidate.([\"216.08.094.0196\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_594_diff_even_odd", "language": "elixir", "prompt": "# Write a function to find the difference of the first even and first odd number of a given list.\n\n\ndefmodule HumanEval do\n def diff_even_odd(l, i, s, t, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_594_diff_even_odd.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"diff_even_odd\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :diff_even_odd end)\n candidate = fn args -> apply(HumanEval, diff_even_odd, args) end\n assert 3 == candidate.([[1, 3, 5, 7, 4, 1, 6, 8]])\n assert 1 == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]])\n assert 9 == candidate.([[1, 5, 7, 9, 10]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_595_min_Swaps", "language": "elixir", "prompt": "# Write a python function to count minimum number of swaps required to convert one binary number represented as a string to another.\n\n\ndefmodule HumanEval do\n def min_Swaps(s, t, r, 1, ,, , s, t, r, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_595_min_Swaps.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"min_Swaps\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :min_Swaps end)\n candidate = fn args -> apply(HumanEval, min_Swaps, args) end\n assert 1 == candidate.([\"1101\", \"1110\"])\n assert \"Not Possible\" == candidate.([\"111\", \"000\"])\n assert \"Not Possible\" == candidate.([\"111\", \"110\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_597_find_kth", "language": "elixir", "prompt": "# Write a function to find kth element from the given two sorted arrays.\n\n\ndefmodule HumanEval do\n def find_kth(a, r, r, 1, ,, , a, r, r, 2, ,, , k) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_597_find_kth.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_kth\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_kth end)\n candidate = fn args -> apply(HumanEval, find_kth, args) end\n assert 6 == candidate.([[2, 3, 6, 7, 9], [1, 4, 8, 10], 5])\n assert 256 == candidate.([[100, 112, 256, 349, 770], [72, 86, 113, 119, 265, 445, 892], 7])\n assert 8 == candidate.([[3, 4, 7, 8, 10], [2, 5, 9, 11], 6])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_598_armstrong_number", "language": "elixir", "prompt": "# Write a function to check whether the given number is armstrong or not.\n\n\ndefmodule HumanEval do\n def armstrong_number(n, u, m, b, e, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_598_armstrong_number.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"armstrong_number\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :armstrong_number end)\n candidate = fn args -> apply(HumanEval, armstrong_number, args) end\n assert true == candidate.([153])\n assert false == candidate.([259])\n assert false == candidate.([4458])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_599_sum_average", "language": "elixir", "prompt": "# Write a function to find sum and average of first n natural numbers.\n\n\ndefmodule HumanEval do\n def sum_average(n, u, m, b, e, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_599_sum_average.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_average\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_average end)\n candidate = fn args -> apply(HumanEval, sum_average, args) end\n assert {55, 5.5} == candidate.([10])\n assert {120, 8.0} == candidate.([15])\n assert {210, 10.5} == candidate.([20])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_59_is_octagonal", "language": "elixir", "prompt": "# Write a function to find the nth octagonal number.\n\n\ndefmodule HumanEval do\n def is_octagonal(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_59_is_octagonal.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_octagonal\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_octagonal end)\n candidate = fn args -> apply(HumanEval, is_octagonal, args) end\n assert 65 == candidate.([5])\n assert 280 == candidate.([10])\n assert 645 == candidate.([15])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_600_is_Even", "language": "elixir", "prompt": "# Write a python function to check whether the given number is even or not.\n\n\ndefmodule HumanEval do\n def is_Even(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_600_is_Even.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_Even\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_Even end)\n candidate = fn args -> apply(HumanEval, is_Even, args) end\n assert false == candidate.([1])\n assert true == candidate.([2])\n assert false == candidate.([3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_602_first_repeated_char", "language": "elixir", "prompt": "# Write a python function to find the first repeated character in a given string.\n\n\ndefmodule HumanEval do\n def first_repeated_char(s, t, r, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_602_first_repeated_char.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"first_repeated_char\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :first_repeated_char end)\n candidate = fn args -> apply(HumanEval, first_repeated_char, args) end\n assert \"a\" == candidate.([\"abcabc\"])\n assert nil == candidate.([\"abc\"])\n assert \"1\" == candidate.([\"123123\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_603_get_ludic", "language": "elixir", "prompt": "# Write a function to get all lucid numbers smaller than or equal to a given integer.\n\n\ndefmodule HumanEval do\n def get_ludic(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_603_get_ludic.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"get_ludic\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :get_ludic end)\n candidate = fn args -> apply(HumanEval, get_ludic, args) end\n assert [1, 2, 3, 5, 7] == candidate.([10])\n assert [1, 2, 3, 5, 7, 11, 13, 17, 23, 25] == candidate.([25])\n assert [1, 2, 3, 5, 7, 11, 13, 17, 23, 25, 29, 37, 41, 43] == candidate.([45])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_604_reverse_words", "language": "elixir", "prompt": "# Write a function to reverse words seperated by spaces in a given string.\n\n\ndefmodule HumanEval do\n def reverse_words(s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_604_reverse_words.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"reverse_words\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :reverse_words end)\n candidate = fn args -> apply(HumanEval, reverse_words, args) end\n assert \"program python\" == candidate.([\"python program\"])\n assert \"language java\" == candidate.([\"java language\"])\n assert \"man indian\" == candidate.([\"indian man\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_605_prime_num", "language": "elixir", "prompt": "# Write a function to check if the given integer is a prime number.\n\n\ndefmodule HumanEval do\n def prime_num(n, u, m) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_605_prime_num.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"prime_num\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :prime_num end)\n candidate = fn args -> apply(HumanEval, prime_num, args) end\n assert true == candidate.([13])\n assert true == candidate.([7])\n assert false == candidate.([-1010])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_606_radian_degree", "language": "elixir", "prompt": "# Write a function to convert degrees to radians.\n\n\ndefmodule HumanEval do\n def radian_degree(d, e, g, r, e, e) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_606_radian_degree.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"radian_degree\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :radian_degree end)\n candidate = fn args -> apply(HumanEval, radian_degree, args) end\n assert 1.5707963267948966 == candidate.([90])\n assert 1.0471975511965976 == candidate.([60])\n assert 2.0943951023931953 == candidate.([120])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_607_find_literals", "language": "elixir", "prompt": "# Write a function to search a string for a regex pattern. The function should return the matching subtring, a start index and an end index.\n\n\ndefmodule HumanEval do\n def find_literals(t, e, x, t, ,, , p, a, t, t, e, r, n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_607_find_literals.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_literals\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_literals end)\n candidate = fn args -> apply(HumanEval, find_literals, args) end\n assert {\"fox\", 16, 19} == candidate.([\"The quick brown fox jumps over the lazy dog.\", \"fox\"])\n assert {\"crazy\", 16, 21} == candidate.([\"Its been a very crazy procedure right\", \"crazy\"])\n assert {\"will\", 35, 39} == candidate.([\"Hardest choices required strongest will\", \"will\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_608_bell_Number", "language": "elixir", "prompt": "# Write a python function to find nth bell number.\n\n\ndefmodule HumanEval do\n def bell_Number(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_608_bell_Number.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"bell_Number\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :bell_Number end)\n candidate = fn args -> apply(HumanEval, bell_Number, args) end\n assert 2 == candidate.([2])\n assert 5 == candidate.([3])\n assert 15 == candidate.([4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_610_remove_kth_element", "language": "elixir", "prompt": "# Write a python function which takes a list and returns a list with the same elements, but the k'th element removed.\n\n\ndefmodule HumanEval do\n def remove_kth_element(l, i, s, t, 1, ,, , L) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_610_remove_kth_element.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_kth_element\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_kth_element end)\n candidate = fn args -> apply(HumanEval, remove_kth_element, args) end\n assert [1, 1, 3, 4, 4, 5, 1] == candidate.([[1, 1, 2, 3, 4, 4, 5, 1], 3])\n assert [0, 0, 1, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4] == candidate.([[0, 0, 1, 2, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4], 4])\n assert [10, 10, 15, 19, 18, 17, 26, 26, 17, 18, 10] == candidate.([[10, 10, 15, 19, 18, 18, 17, 26, 26, 17, 18, 10], 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_611_max_of_nth", "language": "elixir", "prompt": "# Write a function which given a matrix represented as a list of lists returns the max of the n'th column.\n\n\ndefmodule HumanEval do\n def max_of_nth(t, e, s, t, _, l, i, s, t, ,, , N) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_611_max_of_nth.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_of_nth\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_of_nth end)\n candidate = fn args -> apply(HumanEval, max_of_nth, args) end\n assert 19 == candidate.([[[5, 6, 7], [1, 3, 5], [8, 9, 19]], 2])\n assert 10 == candidate.([[[6, 7, 8], [2, 4, 6], [9, 10, 20]], 1])\n assert 11 == candidate.([[[7, 8, 9], [3, 5, 7], [10, 11, 21]], 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_612_merge", "language": "elixir", "prompt": "# Write a python function which takes a list of lists, where each sublist has two elements, and returns a list of two lists where the first list has the first element of each sublist and the second one has the second.\n\n\ndefmodule HumanEval do\n def merge(l, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_612_merge.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"merge\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :merge end)\n candidate = fn args -> apply(HumanEval, merge, args) end\n assert [[\"x\", \"a\", \"m\"], [\"y\", \"b\", \"n\"]] == candidate.([[[\"x\", \"y\"], [\"a\", \"b\"], [\"m\", \"n\"]]])\n assert [[1, 3, 5, 7], [2, 4, 6, 8]] == candidate.([[[1, 2], [3, 4], [5, 6], [7, 8]]])\n assert [[\"x\", \"a\", \"m\"], [\"y\", \"b\", \"n\"], [\"z\", \"c\", \"o\"]] == candidate.([[[\"x\", \"y\", \"z\"], [\"a\", \"b\", \"c\"], [\"m\", \"n\", \"o\"]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_614_cummulative_sum", "language": "elixir", "prompt": "# Write a function to find the cumulative sum of all the values that are present in the given list of lists.\n\n\ndefmodule HumanEval do\n def cummulative_sum(t, e, s, t, _, l, i, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_614_cummulative_sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"cummulative_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :cummulative_sum end)\n candidate = fn args -> apply(HumanEval, cummulative_sum, args) end\n assert 30 == candidate.([[[1, 3], [5, 6, 7], [2, 6]]])\n assert 37 == candidate.([[[2, 4], [6, 7, 8], [3, 7]]])\n assert 44 == candidate.([[[3, 5], [7, 8, 9], [4, 8]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_615_average_tuple", "language": "elixir", "prompt": "# Write a function which takes a lists of lists and returns the average value for each sublist as a list.\n\n\ndefmodule HumanEval do\n def average_tuple(n, u, m, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_615_average_tuple.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"average_tuple\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :average_tuple end)\n candidate = fn args -> apply(HumanEval, average_tuple, args) end\n assert [30.5, 34.25, 27.0, 23.25] == candidate.([[[10, 10, 10, 12], [30, 45, 56, 45], [81, 80, 39, 32], [1, 2, 3, 4]]])\n assert [25.5, -18.0, 3.75] == candidate.([[[1, 1, -5], [30, -15, 56], [81, -60, -39], [-10, 2, 3]]])\n assert [305.0, 342.5, 270.0, 232.5] == candidate.([[[100, 100, 100, 120], [300, 450, 560, 450], [810, 800, 390, 320], [10, 20, 30, 40]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_616_tuple_modulo", "language": "elixir", "prompt": "# Write a function which takes two tuples of the same length and performs the element wise modulo.\n\n\ndefmodule HumanEval do\n def tuple_modulo(t, e, s, t, _, t, u, p, 1, ,, , t, e, s, t, _, t, u, p, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_616_tuple_modulo.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"tuple_modulo\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :tuple_modulo end)\n candidate = fn args -> apply(HumanEval, tuple_modulo, args) end\n assert {0, 4, 5, 1} == candidate.([{10, 4, 5, 6}, {5, 6, 7, 5}])\n assert {5, 5, 6, 1} == candidate.([{11, 5, 6, 7}, {6, 7, 8, 6}])\n assert {5, 6, 7, 1} == candidate.([{12, 6, 7, 8}, {7, 8, 9, 7}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_617_min_Jumps", "language": "elixir", "prompt": "# Write a function to check for the number of jumps required of given length to reach a point of form (d, 0) from origin in a 2d plane.\n\n\ndefmodule HumanEval do\n def min_Jumps(s, t, e, p, s, ,, , d) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_617_min_Jumps.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"min_Jumps\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :min_Jumps end)\n candidate = fn args -> apply(HumanEval, min_Jumps, args) end\n assert 3.5 == candidate.([{3, 4}, 11])\n assert 0 == candidate.([{3, 4}, 0])\n assert 1 == candidate.([{11, 14}, 11])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_618_div_list", "language": "elixir", "prompt": "# Write a function to divide two lists element wise.\n\n\ndefmodule HumanEval do\n def div_list(n, u, m, s, 1, ,, , n, u, m, s, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_618_div_list.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"div_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :div_list end)\n candidate = fn args -> apply(HumanEval, div_list, args) end\n assert [4.0, 2.5, 2.0] == candidate.([[4, 5, 6], [1, 2, 3]])\n assert [3.0, 0.5] == candidate.([[3, 2], [1, 4]])\n assert [1.8, 1.7142857142857142] == candidate.([[90, 120], [50, 70]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_619_move_num", "language": "elixir", "prompt": "# Write a function to move all the numbers to the end of the given string.\n\n\ndefmodule HumanEval do\n def move_num(t, e, s, t, _, s, t, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_619_move_num.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"move_num\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :move_num end)\n candidate = fn args -> apply(HumanEval, move_num, args) end\n assert \"Iloveyouthreethousand1143553000\" == candidate.([\"I1love143you55three3000thousand\"])\n assert \"AvengersAssemble124\" == candidate.([\"Avengers124Assemble\"])\n assert \"Itsourpathtoseethingsdothings11121314151617\" == candidate.([\"Its11our12path13to14see15things16do17things\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_61_count_Substrings", "language": "elixir", "prompt": "# Write a python function to count the number of substrings with the sum of digits equal to their length.\n\n\ndefmodule HumanEval do\n def count_Substrings(s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_61_count_Substrings.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_Substrings\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_Substrings end)\n candidate = fn args -> apply(HumanEval, count_Substrings, args) end\n assert 6 == candidate.([\"112112\"])\n assert 6 == candidate.([\"111\"])\n assert 12 == candidate.([\"1101112\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_622_get_median", "language": "elixir", "prompt": "# Write a function to find the median of two sorted lists of same size.\n\n\ndefmodule HumanEval do\n def get_median(a, r, r, 1, ,, , a, r, r, 2, ,, , n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_622_get_median.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"get_median\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :get_median end)\n candidate = fn args -> apply(HumanEval, get_median, args) end\n assert 16.0 == candidate.([[1, 12, 15, 26, 38], [2, 13, 17, 30, 45], 5])\n assert 8.5 == candidate.([[2, 4, 8, 9], [7, 13, 19, 28], 4])\n assert 25.0 == candidate.([[3, 6, 14, 23, 36, 42], [2, 18, 27, 39, 49, 55], 6])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_623_nth_nums", "language": "elixir", "prompt": "# Write a function to compute the n-th power of each number in a list.\n\n\ndefmodule HumanEval do\n def nth_nums(n, u, m, s, ,, , n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_623_nth_nums.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"nth_nums\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :nth_nums end)\n candidate = fn args -> apply(HumanEval, nth_nums, args) end\n assert [1, 4, 9, 16, 25, 36, 49, 64, 81, 100] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 2])\n assert [1000, 8000, 27000] == candidate.([[10, 20, 30], 3])\n assert [248832, 759375] == candidate.([[12, 15], 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_624_is_upper", "language": "elixir", "prompt": "# Write a python function to convert a given string to uppercase.\n\n\ndefmodule HumanEval do\n def is_upper(s, t, r, i, n, g) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_624_is_upper.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_upper\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_upper end)\n candidate = fn args -> apply(HumanEval, is_upper, args) end\n assert \"PERSON\" == candidate.([\"person\"])\n assert \"FINAL\" == candidate.([\"final\"])\n assert \"VALID\" == candidate.([\"Valid\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_625_swap_List", "language": "elixir", "prompt": "# Write a python function to interchange the first and last element in a given list.\n\n\ndefmodule HumanEval do\n def swap_List(n, e, w, L, i, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_625_swap_List.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"swap_List\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :swap_List end)\n candidate = fn args -> apply(HumanEval, swap_List, args) end\n assert [3, 2, 1] == candidate.([[1, 2, 3]])\n assert [4, 2, 3, 4, 1] == candidate.([[1, 2, 3, 4, 4]])\n assert [6, 5, 4] == candidate.([[4, 5, 6]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_626_triangle_area", "language": "elixir", "prompt": "# Write a python function to find the area of the largest triangle that can be inscribed in a semicircle with a given radius.\n\n\ndefmodule HumanEval do\n def triangle_area(r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_626_triangle_area.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"triangle_area\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :triangle_area end)\n candidate = fn args -> apply(HumanEval, triangle_area, args) end\n assert nil == candidate.([-1])\n assert 0 == candidate.([0])\n assert 4 == candidate.([2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_627_find_First_Missing", "language": "elixir", "prompt": "# Write a python function to find the smallest missing number from a sorted list of natural numbers.\n\n\ndefmodule HumanEval do\n def find_First_Missing(a, r, r, a, y) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_627_find_First_Missing.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_First_Missing\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_First_Missing end)\n candidate = fn args -> apply(HumanEval, find_First_Missing, args) end\n assert 4 == candidate.([[0, 1, 2, 3]])\n assert 3 == candidate.([[0, 1, 2, 6, 9]])\n assert 0 == candidate.([[2, 3, 5, 8, 9]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_628_replace_spaces", "language": "elixir", "prompt": "# Write a function to replace all spaces in the given string with '%20'.\n\n\ndefmodule HumanEval do\n def replace_spaces(s, t, r, i, n, g) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_628_replace_spaces.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"replace_spaces\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :replace_spaces end)\n candidate = fn args -> apply(HumanEval, replace_spaces, args) end\n assert \"My%20Name%20is%20Dawood\" == candidate.([\"My Name is Dawood\"])\n assert \"I%20am%20a%20Programmer\" == candidate.([\"I am a Programmer\"])\n assert \"I%20love%20Coding\" == candidate.([\"I love Coding\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_629_Split", "language": "elixir", "prompt": "# Write a python function to find even numbers from a list of numbers.\n\n\ndefmodule HumanEval do\n def Split(l, i, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_629_Split.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"Split\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :Split end)\n candidate = fn args -> apply(HumanEval, Split, args) end\n assert [2, 4] == candidate.([[1, 2, 3, 4, 5]])\n assert [4, 6, 8, 0] == candidate.([[4, 5, 6, 7, 8, 0, 1]])\n assert [8, 12] == candidate.([[8, 12, 15, 19]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_62_smallest_num", "language": "elixir", "prompt": "# Write a python function to find smallest number in a list.\n\n\ndefmodule HumanEval do\n def smallest_num(x, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_62_smallest_num.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"smallest_num\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :smallest_num end)\n candidate = fn args -> apply(HumanEval, smallest_num, args) end\n assert 1 == candidate.([[10, 20, 1, 45, 99]])\n assert 1 == candidate.([[1, 2, 3]])\n assert 45 == candidate.([[45, 46, 50, 60]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_630_get_coordinates", "language": "elixir", "prompt": "# Write a function to extract all the adjacent coordinates of the given coordinate tuple.\n\n\ndefmodule HumanEval do\n def get_coordinates(t, e, s, t, _, t, u, p) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_630_get_coordinates.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"get_coordinates\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :get_coordinates end)\n candidate = fn args -> apply(HumanEval, get_coordinates, args) end\n assert [[2, 3], [2, 4], [2, 5], [3, 3], [3, 4], [3, 5], [4, 3], [4, 4], [4, 5]] == candidate.([{3, 4}])\n assert [[3, 4], [3, 5], [3, 6], [4, 4], [4, 5], [4, 6], [5, 4], [5, 5], [5, 6]] == candidate.([{4, 5}])\n assert [[4, 5], [4, 6], [4, 7], [5, 5], [5, 6], [5, 7], [6, 5], [6, 6], [6, 7]] == candidate.([{5, 6}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_631_replace_spaces", "language": "elixir", "prompt": "# Write a function to replace whitespaces with an underscore and vice versa in a given string.\n\n\ndefmodule HumanEval do\n def replace_spaces(t, e, x, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_631_replace_spaces.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"replace_spaces\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :replace_spaces end)\n candidate = fn args -> apply(HumanEval, replace_spaces, args) end\n assert \"Jumanji_The_Jungle\" == candidate.([\"Jumanji The Jungle\"])\n assert \"The Avengers\" == candidate.([\"The_Avengers\"])\n assert \"Fast_and_Furious\" == candidate.([\"Fast and Furious\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_632_move_zero", "language": "elixir", "prompt": "# Write a python function to move all zeroes to the end of the given list.\n\n\ndefmodule HumanEval do\n def move_zero(n, u, m, _, l, i, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_632_move_zero.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"move_zero\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :move_zero end)\n candidate = fn args -> apply(HumanEval, move_zero, args) end\n assert [1, 2, 3, 4, 0, 0] == candidate.([[1, 0, 2, 0, 3, 4]])\n assert [2, 3, 2, 4, 5, 0, 0, 0, 0] == candidate.([[2, 3, 2, 0, 0, 4, 0, 5, 0]])\n assert [1, 1, 1, 0, 0] == candidate.([[0, 1, 0, 1, 1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_633_pair_xor_Sum", "language": "elixir", "prompt": "# Write a python function to find the sum of xor of all pairs of numbers in the given list.\n\n\ndefmodule HumanEval do\n def pair_xor_Sum(a, r, r, ,, , n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_633_pair_xor_Sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"pair_xor_Sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :pair_xor_Sum end)\n candidate = fn args -> apply(HumanEval, pair_xor_Sum, args) end\n assert 47 == candidate.([[5, 9, 7, 6], 4])\n assert 12 == candidate.([[7, 3, 5], 3])\n assert 4 == candidate.([[7, 3], 2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_635_heap_sort", "language": "elixir", "prompt": "# Write a function to sort the given list.\n\n\ndefmodule HumanEval do\n def heap_sort(i, t, e, r, a, b, l, e) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_635_heap_sort.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"heap_sort\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :heap_sort end)\n candidate = fn args -> apply(HumanEval, heap_sort, args) end\n assert [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] == candidate.([[1, 3, 5, 7, 9, 2, 4, 6, 8, 0]])\n assert [14, 22, 25, 25, 35, 58, 65, 75, 85] == candidate.([[25, 35, 22, 85, 14, 65, 75, 25, 58]])\n assert [1, 5, 7, 9] == candidate.([[7, 1, 9, 5]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_637_noprofit_noloss", "language": "elixir", "prompt": "# Write a function to check whether the given amount has no profit and no loss\n\n\ndefmodule HumanEval do\n def noprofit_noloss(a, c, t, u, a, l, _, c, o, s, t, ,, , s, a, l, e, _, a, m, o, u, n, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_637_noprofit_noloss.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"noprofit_noloss\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :noprofit_noloss end)\n candidate = fn args -> apply(HumanEval, noprofit_noloss, args) end\n assert false == candidate.([1500, 1200])\n assert true == candidate.([100, 100])\n assert false == candidate.([2000, 5000])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_638_wind_chill", "language": "elixir", "prompt": "# Write a function to calculate the wind chill index rounded to the next integer given the wind velocity in km/h and a temperature in celsius.\n\n\ndefmodule HumanEval do\n def wind_chill(v, ,, , t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_638_wind_chill.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"wind_chill\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :wind_chill end)\n candidate = fn args -> apply(HumanEval, wind_chill, args) end\n assert 40 == candidate.([120, 35])\n assert 19 == candidate.([40, 20])\n assert 6 == candidate.([10, 8])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_639_sample_nam", "language": "elixir", "prompt": "# Write a function to sum the length of the names of a given list of names after removing the names that start with a lowercase letter.\n\n\ndefmodule HumanEval do\n def sample_nam(s, a, m, p, l, e, _, n, a, m, e, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_639_sample_nam.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sample_nam\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sample_nam end)\n candidate = fn args -> apply(HumanEval, sample_nam, args) end\n assert 16 == candidate.([[\"sally\", \"Dylan\", \"rebecca\", \"Diana\", \"Joanne\", \"keith\"]])\n assert 10 == candidate.([[\"php\", \"res\", \"Python\", \"abcd\", \"Java\", \"aaa\"]])\n assert 6 == candidate.([[\"abcd\", \"Python\", \"abba\", \"aba\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_63_max_difference", "language": "elixir", "prompt": "# Write a function to find the maximum difference between available pairs in the given tuple list.\n\n\ndefmodule HumanEval do\n def max_difference(t, e, s, t, _, l, i, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_63_max_difference.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_difference\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_difference end)\n candidate = fn args -> apply(HumanEval, max_difference, args) end\n assert 7 == candidate.([[{3, 5}, {1, 7}, {10, 3}, {1, 2}]])\n assert 15 == candidate.([[{4, 6}, {2, 17}, {9, 13}, {11, 12}]])\n assert 23 == candidate.([[{12, 35}, {21, 27}, {13, 23}, {41, 22}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_640_remove_parenthesis", "language": "elixir", "prompt": "# Write a function to remove the parenthesis and what is inbetween them from a string.\n\n\ndefmodule HumanEval do\n def remove_parenthesis(i, t, e, m, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_640_remove_parenthesis.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_parenthesis\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_parenthesis end)\n candidate = fn args -> apply(HumanEval, remove_parenthesis, args) end\n assert \"python\" == candidate.([[\"python (chrome)\"]])\n assert \"string\" == candidate.([[\"string(.abc)\"]])\n assert \"alpha\" == candidate.([[\"alpha(num)\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_641_is_nonagonal", "language": "elixir", "prompt": "# Write a function to find the nth nonagonal number.\n\n\ndefmodule HumanEval do\n def is_nonagonal(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_641_is_nonagonal.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_nonagonal\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_nonagonal end)\n candidate = fn args -> apply(HumanEval, is_nonagonal, args) end\n assert 325 == candidate.([10])\n assert 750 == candidate.([15])\n assert 1089 == candidate.([18])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_643_text_match_wordz_middle", "language": "elixir", "prompt": "# Write a function that checks if a strings contains 'z', except at the start and end of the word.\n\n\ndefmodule HumanEval do\n def text_match_wordz_middle(t, e, x, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_643_text_match_wordz_middle.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"text_match_wordz_middle\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :text_match_wordz_middle end)\n candidate = fn args -> apply(HumanEval, text_match_wordz_middle, args) end\n assert true == candidate.([\"pythonzabc.\"])\n assert false == candidate.([\"zxyabc.\"])\n assert false == candidate.([\" lang .\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_644_reverse_Array_Upto_K", "language": "elixir", "prompt": "# Write a python function to reverse an array upto a given position.\n\n\ndefmodule HumanEval do\n def reverse_Array_Upto_K(i, n, p, u, t, ,, , k) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_644_reverse_Array_Upto_K.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"reverse_Array_Upto_K\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :reverse_Array_Upto_K end)\n candidate = fn args -> apply(HumanEval, reverse_Array_Upto_K, args) end\n assert [4, 3, 2, 1, 5, 6] == candidate.([[1, 2, 3, 4, 5, 6], 4])\n assert [5, 4, 6, 7] == candidate.([[4, 5, 6, 7], 2])\n assert [7, 8, 9, 6, 5] == candidate.([[9, 8, 7, 6, 5], 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_64_subject_marks", "language": "elixir", "prompt": "# Write a function to sort a list of tuples using the second value of each tuple.\n\n\ndefmodule HumanEval do\n def subject_marks(s, u, b, j, e, c, t, m, a, r, k, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_64_subject_marks.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"subject_marks\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :subject_marks end)\n candidate = fn args -> apply(HumanEval, subject_marks, args) end\n assert [{\"Social sciences\", 82}, {\"English\", 88}, {\"Science\", 90}, {\"Maths\", 97}] == candidate.([[{\"English\", 88}, {\"Science\", 90}, {\"Maths\", 97}, {\"Social sciences\", 82}]])\n assert [{\"Social\", 33}, {\"Telugu\", 49}, {\"Hindhi\", 54}] == candidate.([[{\"Telugu\", 49}, {\"Hindhi\", 54}, {\"Social\", 33}]])\n assert [{\"Biology\", 45}, {\"Physics\", 96}, {\"Chemistry\", 97}] == candidate.([[{\"Physics\", 96}, {\"Chemistry\", 97}, {\"Biology\", 45}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_65_recursive_list_sum", "language": "elixir", "prompt": "# Write a function to flatten a list and sum all of its elements.\n\n\ndefmodule HumanEval do\n def recursive_list_sum(d, a, t, a, _, l, i, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_65_recursive_list_sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"recursive_list_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :recursive_list_sum end)\n candidate = fn args -> apply(HumanEval, recursive_list_sum, args) end\n assert 21 == candidate.([[1, 2, [3, 4], [5, 6]]])\n assert 106 == candidate.([[7, 10, [15, 14], [19, 41]]])\n assert 210 == candidate.([[10, 20, [30, 40], [50, 60]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_66_pos_count", "language": "elixir", "prompt": "# Write a python function to count the number of positive numbers in a list.\n\n\ndefmodule HumanEval do\n def pos_count(l, i, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_66_pos_count.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"pos_count\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :pos_count end)\n candidate = fn args -> apply(HumanEval, pos_count, args) end\n assert 2 == candidate.([[1, -2, 3, -4]])\n assert 3 == candidate.([[3, 4, 5, -1]])\n assert 4 == candidate.([[1, 2, 3, 4]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_67_bell_number", "language": "elixir", "prompt": "# Write a function to find the number of ways to partition a set of Bell numbers.\n\n\ndefmodule HumanEval do\n def bell_number(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_67_bell_number.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"bell_number\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :bell_number end)\n candidate = fn args -> apply(HumanEval, bell_number, args) end\n assert 2 == candidate.([2])\n assert 115975 == candidate.([10])\n assert 6775685320645824322581483068371419745979053216268760300 == candidate.([56])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_68_is_Monotonic", "language": "elixir", "prompt": "# Write a python function to check whether the given array is monotonic or not.\n\n\ndefmodule HumanEval do\n def is_Monotonic(A) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_68_is_Monotonic.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_Monotonic\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_Monotonic end)\n candidate = fn args -> apply(HumanEval, is_Monotonic, args) end\n assert true == candidate.([[6, 5, 4, 4]])\n assert true == candidate.([[1, 2, 2, 3]])\n assert false == candidate.([[1, 3, 2]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_69_is_sublist", "language": "elixir", "prompt": "# Write a function to check whether a list contains the given sublist or not.\n\n\ndefmodule HumanEval do\n def is_sublist(l, ,, , s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_69_is_sublist.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_sublist\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_sublist end)\n candidate = fn args -> apply(HumanEval, is_sublist, args) end\n assert false == candidate.([[2, 4, 3, 5, 7], [3, 7]])\n assert true == candidate.([[2, 4, 3, 5, 7], [4, 3]])\n assert false == candidate.([[2, 4, 3, 5, 7], [1, 6]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_6_differ_At_One_Bit_Pos", "language": "elixir", "prompt": "# Write a python function to check whether the two numbers differ at one bit position only or not.\n\n\ndefmodule HumanEval do\n def differ_At_One_Bit_Pos(a, ,, , b) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_6_differ_At_One_Bit_Pos.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"differ_At_One_Bit_Pos\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :differ_At_One_Bit_Pos end)\n candidate = fn args -> apply(HumanEval, differ_At_One_Bit_Pos, args) end\n assert true == candidate.([13, 9])\n assert false == candidate.([15, 8])\n assert false == candidate.([2, 4])\n assert true == candidate.([2, 3])\n assert true == candidate.([5, 1])\n assert true == candidate.([1, 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_70_get_equal", "language": "elixir", "prompt": "# Write a function to find whether all the given lists have equal length or not.\n\n\ndefmodule HumanEval do\n def get_equal(I, n, p, u, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_70_get_equal.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"get_equal\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :get_equal end)\n candidate = fn args -> apply(HumanEval, get_equal, args) end\n assert true == candidate.([[[11, 22, 33], [44, 55, 66]]])\n assert false == candidate.([[[1, 2, 3], [4, 5, 6, 7]]])\n assert true == candidate.([[[1, 2], [3, 4]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_71_comb_sort", "language": "elixir", "prompt": "# Write a function to sort a list of elements.\n\n\ndefmodule HumanEval do\n def comb_sort(n, u, m, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_71_comb_sort.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"comb_sort\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :comb_sort end)\n candidate = fn args -> apply(HumanEval, comb_sort, args) end\n assert [5, 15, 25, 37, 79] == candidate.([[5, 15, 37, 25, 79]])\n assert [15, 19, 22, 32, 41] == candidate.([[41, 32, 15, 19, 22]])\n assert [13, 15, 47, 99] == candidate.([[99, 15, 13, 47]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_720_add_dict_to_tuple", "language": "elixir", "prompt": "# Write a function to add a dictionary to the tuple. The output should be a tuple.\n\n\ndefmodule HumanEval do\n def add_dict_to_tuple(t, e, s, t, _, t, u, p, ,, , t, e, s, t, _, d, i, c, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_720_add_dict_to_tuple.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"add_dict_to_tuple\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :add_dict_to_tuple end)\n candidate = fn args -> apply(HumanEval, add_dict_to_tuple, args) end\n assert {4, 5, 6, %{\"MSAM\" => 1, \"is\" => 2, \"best\" => 3}} == candidate.([{4, 5, 6}, %{\"MSAM\" => 1, \"is\" => 2, \"best\" => 3}])\n assert {1, 2, 3, %{\"UTS\" => 2, \"is\" => 3, \"Worst\" => 4}} == candidate.([{1, 2, 3}, %{\"UTS\" => 2, \"is\" => 3, \"Worst\" => 4}])\n assert {8, 9, 10, %{\"POS\" => 3, \"is\" => 4, \"Okay\" => 5}} == candidate.([{8, 9, 10}, %{\"POS\" => 3, \"is\" => 4, \"Okay\" => 5}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_721_maxAverageOfPath", "language": "elixir", "prompt": "# Given a square matrix of size N*N given as a list of lists, where each cell is associated with a specific cost. A path is defined as a specific sequence of cells that starts from the top-left cell move only right or down and ends on bottom right cell. We want to find a path with the maximum average over all existing paths. Average is computed as total cost divided by the number of cells visited in the path.\n\n\ndefmodule HumanEval do\n def maxAverageOfPath(c, o, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_721_maxAverageOfPath.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"maxAverageOfPath\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :maxAverageOfPath end)\n candidate = fn args -> apply(HumanEval, maxAverageOfPath, args) end\n assert 5.2 == candidate.([[[1, 2, 3], [6, 5, 4], [7, 3, 9]]])\n assert 6.2 == candidate.([[[2, 3, 4], [7, 6, 5], [8, 4, 10]]])\n assert 7.2 == candidate.([[[3, 4, 5], [8, 7, 6], [9, 5, 11]]])\n assert 5.8 == candidate.([[[1, 2, 3], [4, 5, 6], [7, 8, 9]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_722_filter_data", "language": "elixir", "prompt": "# The input is given as - a dictionary with a student name as a key and a tuple of float (student_height, student_weight) as a value, - minimal height, - minimal weight. Write a function to filter students that have height and weight above the minimum.\n\n\ndefmodule HumanEval do\n def filter_data(s, t, u, d, e, n, t, s, ,, , h, ,, , w) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_722_filter_data.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"filter_data\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :filter_data end)\n candidate = fn args -> apply(HumanEval, filter_data, args) end\n assert %{\"Cierra Vega\" => {6.2, 70}} == candidate.([%{\"Cierra Vega\" => {6.2, 70}, \"Alden Cantrell\" => {5.9, 65}, \"Kierra Gentry\" => {6.0, 68}, \"Pierre Cox\" => {5.8, 66}}, 6.0, 70])\n assert %{\"Cierra Vega\" => {6.2, 70}, \"Kierra Gentry\" => {6.0, 68}} == candidate.([%{\"Cierra Vega\" => {6.2, 70}, \"Alden Cantrell\" => {5.9, 65}, \"Kierra Gentry\" => {6.0, 68}, \"Pierre Cox\" => {5.8, 66}}, 5.9, 67])\n assert %{\"Cierra Vega\" => {6.2, 70}, \"Alden Cantrell\" => {5.9, 65}, \"Kierra Gentry\" => {6.0, 68}, \"Pierre Cox\" => {5.8, 66}} == candidate.([%{\"Cierra Vega\" => {6.2, 70}, \"Alden Cantrell\" => {5.9, 65}, \"Kierra Gentry\" => {6.0, 68}, \"Pierre Cox\" => {5.8, 66}}, 5.7, 64])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_723_count_same_pair", "language": "elixir", "prompt": "# The input is defined as two lists of the same length. Write a function to count indices where the lists have the same values.\n\n\ndefmodule HumanEval do\n def count_same_pair(n, u, m, s, 1, ,, , n, u, m, s, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_723_count_same_pair.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_same_pair\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_same_pair end)\n candidate = fn args -> apply(HumanEval, count_same_pair, args) end\n assert 4 == candidate.([[1, 2, 3, 4, 5, 6, 7, 8], [2, 2, 3, 1, 2, 6, 7, 9]])\n assert 11 == candidate.([[0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8], [2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8]])\n assert 1 == candidate.([[2, 4, -6, -9, 11, -12, 14, -5, 17], [2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8]])\n assert 3 == candidate.([[0, 1, 1, 2], [0, 1, 2, 2]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_724_power_base_sum", "language": "elixir", "prompt": "# Write a function that takes base and power as arguments and calculate the sum of all digits of the base to the specified power.\n\n\ndefmodule HumanEval do\n def power_base_sum(b, a, s, e, ,, , p, o, w, e, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_724_power_base_sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"power_base_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :power_base_sum end)\n candidate = fn args -> apply(HumanEval, power_base_sum, args) end\n assert 115 == candidate.([2, 100])\n assert 37 == candidate.([8, 10])\n assert 62 == candidate.([8, 15])\n assert 9 == candidate.([3, 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_725_extract_quotation", "language": "elixir", "prompt": "# Write a function to extract values between quotation marks \" \" of the given string.\n\n\ndefmodule HumanEval do\n def extract_quotation(t, e, x, t, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_725_extract_quotation.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"extract_quotation\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :extract_quotation end)\n candidate = fn args -> apply(HumanEval, extract_quotation, args) end\n assert [\"A53\", \"multi\", \"Processor\"] == candidate.([\"Cortex \"A53\" Based \"multi\" tasking \"Processor\"\"])\n assert [\"favorite\", \"apps\"] == candidate.([\"Cast your \"favorite\" entertainment \"apps\"\"])\n assert [\"4k Ultra HD\", \"HDR 10\"] == candidate.([\"Watch content \"4k Ultra HD\" resolution with \"HDR 10\" Support\"])\n assert [] == candidate.([\"Watch content '4k Ultra HD' resolution with 'HDR 10' Support\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_726_multiply_elements", "language": "elixir", "prompt": "# Write a function that takes as input a list of numbers (t_1,...,t_{N+1}) and returns a list of length N where the i-th element of the tuple is equal to t_i * t_{i+1}.\n\n\ndefmodule HumanEval do\n def multiply_elements(t, e, s, t, _, t, u, p) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_726_multiply_elements.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"multiply_elements\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :multiply_elements end)\n candidate = fn args -> apply(HumanEval, multiply_elements, args) end\n assert [5, 35, 56, 80] == candidate.([[1, 5, 7, 8, 10]])\n assert [8, 20, 30, 42] == candidate.([[2, 4, 5, 6, 7]])\n assert [156, 182, 126, 135] == candidate.([[12, 13, 14, 9, 15]])\n assert [] == candidate.([[12]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_728_sum_list", "language": "elixir", "prompt": "# Write a function takes as input two lists [a_1,...,a_n], [b_1,...,b_n] and returns [a_1+b_1,...,a_n+b_n].\n\n\ndefmodule HumanEval do\n def sum_list(l, s, t, 1, ,, , l, s, t, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_728_sum_list.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_list end)\n candidate = fn args -> apply(HumanEval, sum_list, args) end\n assert [25, 45, 65] == candidate.([[10, 20, 30], [15, 25, 35]])\n assert [6, 8, 10] == candidate.([[1, 2, 3], [5, 6, 7]])\n assert [30, 65, 105] == candidate.([[15, 20, 30], [15, 45, 75]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_72_dif_Square", "language": "elixir", "prompt": "# Write a python function to check whether the given number can be represented as the difference of two squares or not.\n\n\ndefmodule HumanEval do\n def dif_Square(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_72_dif_Square.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"dif_Square\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :dif_Square end)\n candidate = fn args -> apply(HumanEval, dif_Square, args) end\n assert true == candidate.([5])\n assert false == candidate.([10])\n assert true == candidate.([15])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_730_consecutive_duplicates", "language": "elixir", "prompt": "# Write a function to remove consecutive duplicates of a given list.\n\n\ndefmodule HumanEval do\n def consecutive_duplicates(n, u, m, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_730_consecutive_duplicates.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"consecutive_duplicates\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :consecutive_duplicates end)\n candidate = fn args -> apply(HumanEval, consecutive_duplicates, args) end\n assert [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 4] == candidate.([[0, 0, 1, 2, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4]])\n assert [10, 15, 19, 18, 17, 26, 17, 18, 10] == candidate.([[10, 10, 15, 19, 18, 18, 17, 26, 26, 17, 18, 10]])\n assert [\"a\", \"b\", \"c\", \"d\"] == candidate.([[\"a\", \"a\", \"b\", \"c\", \"d\", \"d\"]])\n assert [\"a\", \"b\", \"c\", \"d\", \"a\"] == candidate.([[\"a\", \"a\", \"b\", \"c\", \"d\", \"d\", \"a\", \"a\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_731_lateralsurface_cone", "language": "elixir", "prompt": "# Write a function to find the lateral surface area of a cone given radius r and the height h.\n\n\ndefmodule HumanEval do\n def lateralsurface_cone(r, ,, , h) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_731_lateralsurface_cone.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"lateralsurface_cone\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :lateralsurface_cone end)\n candidate = fn args -> apply(HumanEval, lateralsurface_cone, args) end\n assert 204.20352248333654 == candidate.([5, 12])\n assert 566.3586699569488 == candidate.([10, 15])\n assert 1521.8090132193388 == candidate.([19, 17])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_732_replace_specialchar", "language": "elixir", "prompt": "# Write a function to replace all occurrences of spaces, commas, or dots with a colon.\n\n\ndefmodule HumanEval do\n def replace_specialchar(t, e, x, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_732_replace_specialchar.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"replace_specialchar\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :replace_specialchar end)\n candidate = fn args -> apply(HumanEval, replace_specialchar, args) end\n assert \"Python:language::Programming:language:\" == candidate.([\"Python language, Programming language.\"])\n assert \"a:b:c:d:e:f\" == candidate.([\"a b c,d e f\"])\n assert \"ram:reshma:ram:rahim\" == candidate.([\"ram reshma,ram rahim\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_733_find_first_occurrence", "language": "elixir", "prompt": "# Write a function to find the index of the first occurrence of a given number in a sorted array.\n\n\ndefmodule HumanEval do\n def find_first_occurrence(A, ,, , x) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_733_find_first_occurrence.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_first_occurrence\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_first_occurrence end)\n candidate = fn args -> apply(HumanEval, find_first_occurrence, args) end\n assert 1 == candidate.([[2, 5, 5, 5, 6, 6, 8, 9, 9, 9], 5])\n assert 2 == candidate.([[2, 3, 5, 5, 6, 6, 8, 9, 9, 9], 5])\n assert 4 == candidate.([[2, 4, 1, 5, 6, 6, 8, 9, 9, 9], 6])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_734_sum_Of_Subarray_Prod", "language": "elixir", "prompt": "# Write a python function to find sum of products of all possible sublists of a given list. https://www.geeksforgeeks.org/sum-of-products-of-all-possible-subarrays/\n\n\ndefmodule HumanEval do\n def sum_Of_Subarray_Prod(a, r, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_734_sum_Of_Subarray_Prod.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_Of_Subarray_Prod\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_Of_Subarray_Prod end)\n candidate = fn args -> apply(HumanEval, sum_Of_Subarray_Prod, args) end\n assert 20 == candidate.([[1, 2, 3]])\n assert 5 == candidate.([[1, 2]])\n assert 84 == candidate.([[1, 2, 3, 4]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_735_toggle_middle_bits", "language": "elixir", "prompt": "# Write a python function to toggle bits of the number except the first and the last bit. https://www.geeksforgeeks.org/toggle-bits-number-expect-first-last-bits/\n\n\ndefmodule HumanEval do\n def toggle_middle_bits(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_735_toggle_middle_bits.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"toggle_middle_bits\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :toggle_middle_bits end)\n candidate = fn args -> apply(HumanEval, toggle_middle_bits, args) end\n assert 15 == candidate.([9])\n assert 12 == candidate.([10])\n assert 13 == candidate.([11])\n assert 127 == candidate.([65])\n assert 115 == candidate.([77])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_736_left_insertion", "language": "elixir", "prompt": "# Write a function to locate the left insertion point for a specified value in sorted order. https://www.w3resource.com/python-exercises/data-structures-and-algorithms/python-data-structure-exercise-24.php\n\n\ndefmodule HumanEval do\n def left_insertion(a, ,, , x) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_736_left_insertion.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"left_insertion\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :left_insertion end)\n candidate = fn args -> apply(HumanEval, left_insertion, args) end\n assert 4 == candidate.([[1, 2, 4, 5], 6])\n assert 2 == candidate.([[1, 2, 4, 5], 3])\n assert 4 == candidate.([[1, 2, 4, 5], 7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_737_check_str", "language": "elixir", "prompt": "# Write a function to check whether the given string is starting with a vowel or not using regex.\n\n\ndefmodule HumanEval do\n def check_str(s, t, r, i, n, g) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_737_check_str.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_str\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_str end)\n candidate = fn args -> apply(HumanEval, check_str, args) end\n assert true == candidate.([\"annie\"])\n assert false == candidate.([\"dawood\"])\n assert true == candidate.([\"Else\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_738_geometric_sum", "language": "elixir", "prompt": "# Write a function to calculate the geometric sum of n-1. https://www.w3resource.com/python-exercises/data-structures-and-algorithms/python-recursion-exercise-9.php\n\n\ndefmodule HumanEval do\n def geometric_sum(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_738_geometric_sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"geometric_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :geometric_sum end)\n candidate = fn args -> apply(HumanEval, geometric_sum, args) end\n assert 1.9921875 == candidate.([7])\n assert 1.9375 == candidate.([4])\n assert 1.99609375 == candidate.([8])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_739_find_Index", "language": "elixir", "prompt": "# Write a python function to find the index of smallest triangular number with n digits. https://www.geeksforgeeks.org/index-of-smallest-triangular-number-with-n-digits/\n\n\ndefmodule HumanEval do\n def find_Index(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_739_find_Index.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_Index\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_Index end)\n candidate = fn args -> apply(HumanEval, find_Index, args) end\n assert 4 == candidate.([2])\n assert 14 == candidate.([3])\n assert 45 == candidate.([4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_740_tuple_to_dict", "language": "elixir", "prompt": "# Write a function to convert the given tuple to a key-value dictionary using adjacent elements. https://www.geeksforgeeks.org/python-convert-tuple-to-adjacent-pair-dictionary/\n\n\ndefmodule HumanEval do\n def tuple_to_dict(t, e, s, t, _, t, u, p) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_740_tuple_to_dict.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"tuple_to_dict\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :tuple_to_dict end)\n candidate = fn args -> apply(HumanEval, tuple_to_dict, args) end\n assert %{1 => 5, 7 => 10, 13 => 5} == candidate.([{1, 5, 7, 10, 13, 5}])\n assert %{1 => 2, 3 => 4, 5 => 6} == candidate.([{1, 2, 3, 4, 5, 6}])\n assert %{7 => 8, 9 => 10, 11 => 12} == candidate.([{7, 8, 9, 10, 11, 12}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_741_all_Characters_Same", "language": "elixir", "prompt": "# Write a python function to check whether all the characters are same or not.\n\n\ndefmodule HumanEval do\n def all_Characters_Same(s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_741_all_Characters_Same.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"all_Characters_Same\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :all_Characters_Same end)\n candidate = fn args -> apply(HumanEval, all_Characters_Same, args) end\n assert false == candidate.([\"python\"])\n assert true == candidate.([\"aaa\"])\n assert false == candidate.([\"data\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_742_area_tetrahedron", "language": "elixir", "prompt": "# Write a function to caluclate the area of a tetrahedron.\n\n\ndefmodule HumanEval do\n def area_tetrahedron(s, i, d, e) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_742_area_tetrahedron.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"area_tetrahedron\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :area_tetrahedron end)\n candidate = fn args -> apply(HumanEval, area_tetrahedron, args) end\n assert 15.588457268119894 == candidate.([3])\n assert 692.8203230275509 == candidate.([20])\n assert 173.20508075688772 == candidate.([10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_743_rotate_right", "language": "elixir", "prompt": "# Write a function to rotate a given list by specified number of items to the right direction. https://www.geeksforgeeks.org/python-program-right-rotate-list-n/\n\n\ndefmodule HumanEval do\n def rotate_right(l, i, s, t, ,, , m) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_743_rotate_right.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"rotate_right\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :rotate_right end)\n candidate = fn args -> apply(HumanEval, rotate_right, args) end\n assert [8, 9, 10, 1, 2, 3, 4, 5, 6, 7] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 3])\n assert [9, 10, 1, 2, 3, 4, 5, 6, 7, 8] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 2])\n assert [6, 7, 8, 9, 10, 1, 2, 3, 4, 5] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_744_check_none", "language": "elixir", "prompt": "# Write a function to check if the given tuple has any none value or not.\n\n\ndefmodule HumanEval do\n def check_none(t, e, s, t, _, t, u, p) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_744_check_none.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_none\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_none end)\n candidate = fn args -> apply(HumanEval, check_none, args) end\n assert true == candidate.([{10, 4, 5, 6, nil}])\n assert false == candidate.([{7, 8, 9, 11, 14}])\n assert true == candidate.([{1, 2, 3, 4, nil}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_745_divisible_by_digits", "language": "elixir", "prompt": "# Write a function to find numbers within a given range from startnum ti endnum where every number is divisible by every digit it contains. https://www.w3resource.com/python-exercises/lambda/python-lambda-exercise-24.php\n\n\ndefmodule HumanEval do\n def divisible_by_digits(s, t, a, r, t, n, u, m, ,, , e, n, d, n, u, m) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_745_divisible_by_digits.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"divisible_by_digits\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :divisible_by_digits end)\n candidate = fn args -> apply(HumanEval, divisible_by_digits, args) end\n assert [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 22] == candidate.([1, 22])\n assert [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15] == candidate.([1, 15])\n assert [22, 24] == candidate.([20, 25])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_746_sector_area", "language": "elixir", "prompt": "# Write a function to find area of a sector. The function takes the radius and angle as inputs. Function should return None if the angle is larger than 360 degrees.\n\n\ndefmodule HumanEval do\n def sector_area(r, ,, , a) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_746_sector_area.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sector_area\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sector_area end)\n candidate = fn args -> apply(HumanEval, sector_area, args) end\n assert 6.283185307179586 == candidate.([4, 45])\n assert 31.808625617596654 == candidate.([9, 45])\n assert nil == candidate.([9, 361])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_747_lcs_of_three", "language": "elixir", "prompt": "# Write a function to find the longest common subsequence for the given three string sequence. https://www.geeksforgeeks.org/lcs-longest-common-subsequence-three-strings/\n\n\ndefmodule HumanEval do\n def lcs_of_three(X, ,, , Y, ,, , Z) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_747_lcs_of_three.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"lcs_of_three\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :lcs_of_three end)\n candidate = fn args -> apply(HumanEval, lcs_of_three, args) end\n assert 2 == candidate.([\"AGGT12\", \"12TXAYB\", \"12XBA\"])\n assert 5 == candidate.([\"Reels\", \"Reelsfor\", \"ReelsforReels\"])\n assert 3 == candidate.([\"abcd1e2\", \"bc12ea\", \"bd1ea\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_748_capital_words_spaces", "language": "elixir", "prompt": "# Write a function to put spaces between words starting with capital letters in a given string.\n\n\ndefmodule HumanEval do\n def capital_words_spaces(s, t, r, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_748_capital_words_spaces.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"capital_words_spaces\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :capital_words_spaces end)\n candidate = fn args -> apply(HumanEval, capital_words_spaces, args) end\n assert \"Python\" == candidate.([\"Python\"])\n assert \"Python Programming Examples\" == candidate.([\"PythonProgrammingExamples\"])\n assert \"Get Ready To Be Coding Freak\" == candidate.([\"GetReadyToBeCodingFreak\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_749_sort_numeric_strings", "language": "elixir", "prompt": "# Write a function to sort a given list of strings of numbers numerically. https://www.geeksforgeeks.org/python-sort-numeric-strings-in-a-list/\n\n\ndefmodule HumanEval do\n def sort_numeric_strings(n, u, m, s, _, s, t, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_749_sort_numeric_strings.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sort_numeric_strings\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sort_numeric_strings end)\n candidate = fn args -> apply(HumanEval, sort_numeric_strings, args) end\n assert [-500, -12, 0, 4, 7, 12, 45, 100, 200] == candidate.([[\"4\", \"12\", \"45\", \"7\", \"0\", \"100\", \"200\", \"-12\", \"-500\"]])\n assert [1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 4, 5, 6, 6, 6, 7, 8, 8, 9, 9] == candidate.([[\"2\", \"3\", \"8\", \"4\", \"7\", \"9\", \"8\", \"2\", \"6\", \"5\", \"1\", \"6\", \"1\", \"2\", \"3\", \"4\", \"6\", \"9\", \"1\", \"2\"]])\n assert [1, 1, 1, 3, 3, 5, 5, 7, 7, 9, 11, 13, 15, 17] == candidate.([[\"1\", \"3\", \"5\", \"7\", \"1\", \"3\", \"13\", \"15\", \"17\", \"5\", \"7 \", \"9\", \"1\", \"11\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_74_is_samepatterns", "language": "elixir", "prompt": "# Write a function to check whether it follows the sequence given in the patterns array.\n\n\ndefmodule HumanEval do\n def is_samepatterns(c, o, l, o, r, s, ,, , p, a, t, t, e, r, n, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_74_is_samepatterns.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_samepatterns\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_samepatterns end)\n candidate = fn args -> apply(HumanEval, is_samepatterns, args) end\n assert true == candidate.([[\"red\", \"green\", \"green\"], [\"a\", \"b\", \"b\"]])\n assert false == candidate.([[\"red\", \"green\", \"greenn\"], [\"a\", \"b\", \"b\"]])\n assert false == candidate.([[\"red\", \"green\", \"greenn\"], [\"a\", \"b\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_750_add_tuple", "language": "elixir", "prompt": "# Write a function to add the given tuple to the given list.\n\n\ndefmodule HumanEval do\n def add_tuple(t, e, s, t, _, l, i, s, t, ,, , t, e, s, t, _, t, u, p) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_750_add_tuple.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"add_tuple\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :add_tuple end)\n candidate = fn args -> apply(HumanEval, add_tuple, args) end\n assert [5, 6, 7, 9, 10] == candidate.([[5, 6, 7], {9, 10}])\n assert [6, 7, 8, 10, 11] == candidate.([[6, 7, 8], {10, 11}])\n assert [7, 8, 9, 11, 12] == candidate.([[7, 8, 9], {11, 12}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_751_check_min_heap", "language": "elixir", "prompt": "# Write a function to check if the given array represents min heap or not. https://www.geeksforgeeks.org/how-to-check-if-a-given-array-represents-a-binary-heap/\n\n\ndefmodule HumanEval do\n def check_min_heap(a, r, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_751_check_min_heap.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_min_heap\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_min_heap end)\n candidate = fn args -> apply(HumanEval, check_min_heap, args) end\n assert true == candidate.([[1, 2, 3, 4, 5, 6]])\n assert true == candidate.([[2, 3, 4, 5, 10, 15]])\n assert false == candidate.([[2, 10, 4, 5, 3, 15]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_752_jacobsthal_num", "language": "elixir", "prompt": "# Write a function to find the nth jacobsthal number. https://www.geeksforgeeks.org/jacobsthal-and-jacobsthal-lucas-numbers/ 0, 1, 1, 3, 5, 11, 21, 43, 85, 171, 341, 683, 1365, 2731, ...\n\n\ndefmodule HumanEval do\n def jacobsthal_num(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_752_jacobsthal_num.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"jacobsthal_num\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :jacobsthal_num end)\n candidate = fn args -> apply(HumanEval, jacobsthal_num, args) end\n assert 11 == candidate.([5])\n assert 1 == candidate.([2])\n assert 5 == candidate.([4])\n assert 2731 == candidate.([13])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_753_min_k", "language": "elixir", "prompt": "# Write a function to find minimum k records from tuple list. https://www.geeksforgeeks.org/python-find-minimum-k-records-from-tuple-list/ - in this case a verbatim copy of test cases\n\n\ndefmodule HumanEval do\n def min_k(t, e, s, t, _, l, i, s, t, ,, , K) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_753_min_k.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"min_k\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :min_k end)\n candidate = fn args -> apply(HumanEval, min_k, args) end\n assert [{\"Akash\", 2}, {\"Akshat\", 4}] == candidate.([[{\"Manjeet\", 10}, {\"Akshat\", 4}, {\"Akash\", 2}, {\"Nikhil\", 8}], 2])\n assert [{\"Akash\", 3}, {\"Angat\", 5}, {\"Nepin\", 9}] == candidate.([[{\"Sanjeev\", 11}, {\"Angat\", 5}, {\"Akash\", 3}, {\"Nepin\", 9}], 3])\n assert [{\"Ayesha\", 9}] == candidate.([[{\"tanmay\", 14}, {\"Amer\", 11}, {\"Ayesha\", 9}, {\"SKD\", 16}], 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_754_extract_index_list", "language": "elixir", "prompt": "# We say that an element is common for lists l1, l2, l3 if it appears in all three lists under the same index. Write a function to find common elements from three lists. The function should return a list.\n\n\ndefmodule HumanEval do\n def extract_index_list(l, 1, ,, , l, 2, ,, , l, 3) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_754_extract_index_list.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"extract_index_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :extract_index_list end)\n candidate = fn args -> apply(HumanEval, extract_index_list, args) end\n assert [1, 7] == candidate.([[1, 1, 3, 4, 5, 6, 7], [0, 1, 2, 3, 4, 5, 7], [0, 1, 2, 3, 4, 5, 7]])\n assert [1, 6] == candidate.([[1, 1, 3, 4, 5, 6, 7], [0, 1, 2, 3, 4, 6, 5], [0, 1, 2, 3, 4, 6, 7]])\n assert [1, 5] == candidate.([[1, 1, 3, 4, 6, 5, 6], [0, 1, 2, 3, 4, 5, 7], [0, 1, 2, 3, 4, 5, 7]])\n assert [] == candidate.([[1, 2, 3, 4, 6, 6, 6], [0, 1, 2, 3, 4, 5, 7], [0, 1, 2, 3, 4, 5, 7]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_755_second_smallest", "language": "elixir", "prompt": "# Write a function to find the second smallest number in a list.\n\n\ndefmodule HumanEval do\n def second_smallest(n, u, m, b, e, r, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_755_second_smallest.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"second_smallest\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :second_smallest end)\n candidate = fn args -> apply(HumanEval, second_smallest, args) end\n assert -2 == candidate.([[1, 2, -8, -2, 0, -2]])\n assert -0.5 == candidate.([[1, 1, -0.5, 0, 2, -2, -2]])\n assert nil == candidate.([[2, 2]])\n assert nil == candidate.([[2, 2, 2]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_756_text_match_zero_one", "language": "elixir", "prompt": "# Write a function that matches a string that has an 'a' followed by one or more 'b's. https://www.w3resource.com/python-exercises/re/python-re-exercise-3.php\n\n\ndefmodule HumanEval do\n def text_match_zero_one(t, e, x, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_756_text_match_zero_one.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"text_match_zero_one\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :text_match_zero_one end)\n candidate = fn args -> apply(HumanEval, text_match_zero_one, args) end\n assert false == candidate.([\"ac\"])\n assert false == candidate.([\"dc\"])\n assert true == candidate.([\"abbbba\"])\n assert true == candidate.([\"dsabbbba\"])\n assert false == candidate.([\"asbbbba\"])\n assert true == candidate.([\"abaaa\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_757_count_reverse_pairs", "language": "elixir", "prompt": "# Write a function to count the pairs of reverse strings in the given string list. https://www.geeksforgeeks.org/python-program-to-count-the-pairs-of-reverse-strings/\n\n\ndefmodule HumanEval do\n def count_reverse_pairs(t, e, s, t, _, l, i, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_757_count_reverse_pairs.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_reverse_pairs\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_reverse_pairs end)\n candidate = fn args -> apply(HumanEval, count_reverse_pairs, args) end\n assert 2 == candidate.([[\"julia\", \"best\", \"tseb\", \"for\", \"ailuj\"]])\n assert 1 == candidate.([[\"geeks\", \"best\", \"for\", \"skeeg\"]])\n assert 2 == candidate.([[\"makes\", \"best\", \"sekam\", \"for\", \"rof\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_759_is_decimal", "language": "elixir", "prompt": "# Write a function to check whether a given string is a decimal number with a precision of 2.\n\n\ndefmodule HumanEval do\n def is_decimal(n, u, m) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_759_is_decimal.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_decimal\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_decimal end)\n candidate = fn args -> apply(HumanEval, is_decimal, args) end\n assert true == candidate.([\"123.11\"])\n assert false == candidate.([\"e666.86\"])\n assert false == candidate.([\"3.124587\"])\n assert true == candidate.([\"1.11\"])\n assert false == candidate.([\"1.1.11\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_75_find_tuples", "language": "elixir", "prompt": "# Write a function to find tuples which have all elements divisible by k from the given list of tuples.\n\n\ndefmodule HumanEval do\n def find_tuples(t, e, s, t, _, l, i, s, t, ,, , K) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_75_find_tuples.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_tuples\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_tuples end)\n candidate = fn args -> apply(HumanEval, find_tuples, args) end\n assert [{6, 24, 12}] == candidate.([[{6, 24, 12}, {7, 9, 6}, {12, 18, 21}], 6])\n assert [{5, 25, 30}] == candidate.([[{5, 25, 30}, {4, 2, 3}, {7, 8, 9}], 5])\n assert [{8, 16, 4}] == candidate.([[{7, 9, 16}, {8, 16, 4}, {19, 17, 18}], 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_760_unique_Element", "language": "elixir", "prompt": "# Write a python function to check whether a list of numbers contains only one distinct element or not.\n\n\ndefmodule HumanEval do\n def unique_Element(a, r, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_760_unique_Element.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"unique_Element\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :unique_Element end)\n candidate = fn args -> apply(HumanEval, unique_Element, args) end\n assert true == candidate.([[1, 1, 1]])\n assert false == candidate.([[1, 2, 1, 2]])\n assert false == candidate.([[1, 2, 3, 4, 5]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_762_check_monthnumber_number", "language": "elixir", "prompt": "# Write a function to check whether the given month number contains 30 days or not. Months are given as number from 1 to 12.\n\n\ndefmodule HumanEval do\n def check_monthnumber_number(m, o, n, t, h, n, u, m, 3) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_762_check_monthnumber_number.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_monthnumber_number\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_monthnumber_number end)\n candidate = fn args -> apply(HumanEval, check_monthnumber_number, args) end\n assert true == candidate.([6])\n assert false == candidate.([2])\n assert false == candidate.([12])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_763_find_min_diff", "language": "elixir", "prompt": "# Write a python function to find the minimum difference between any two elements in a given array. https://www.geeksforgeeks.org/find-minimum-difference-pair/\n\n\ndefmodule HumanEval do\n def find_min_diff(a, r, r, ,, , n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_763_find_min_diff.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_min_diff\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_min_diff end)\n candidate = fn args -> apply(HumanEval, find_min_diff, args) end\n assert 1 == candidate.([[1, 5, 3, 19, 18, 25], 6])\n assert 1 == candidate.([[4, 3, 2, 6], 4])\n assert 4 == candidate.([[30, 5, 20, 9], 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_764_number_ctr", "language": "elixir", "prompt": "# Write a python function to count number of digits in a given string.\n\n\ndefmodule HumanEval do\n def number_ctr(s, t, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_764_number_ctr.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"number_ctr\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :number_ctr end)\n candidate = fn args -> apply(HumanEval, number_ctr, args) end\n assert 1 == candidate.([\"program2bedone\"])\n assert 1 == candidate.([\"3wonders\"])\n assert 3 == candidate.([\"123\"])\n assert 3 == candidate.([\"3wond-1ers2\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_765_is_polite", "language": "elixir", "prompt": "# Write a function to find nth polite number. geeksforgeeks.org/n-th-polite-number/\n\n\ndefmodule HumanEval do\n def is_polite(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_765_is_polite.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_polite\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_polite end)\n candidate = fn args -> apply(HumanEval, is_polite, args) end\n assert 11 == candidate.([7])\n assert 7 == candidate.([4])\n assert 13 == candidate.([9])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_766_pair_wise", "language": "elixir", "prompt": "# Write a function to return a list of all pairs of consecutive items in a given list.\n\n\ndefmodule HumanEval do\n def pair_wise(l, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_766_pair_wise.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"pair_wise\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :pair_wise end)\n candidate = fn args -> apply(HumanEval, pair_wise, args) end\n assert [{1, 1}, {1, 2}, {2, 3}, {3, 3}, {3, 4}, {4, 4}, {4, 5}] == candidate.([[1, 1, 2, 3, 3, 4, 4, 5]])\n assert [{1, 5}, {5, 7}, {7, 9}, {9, 10}] == candidate.([[1, 5, 7, 9, 10]])\n assert [{5, 1}, {1, 9}, {9, 7}, {7, 10}] == candidate.([[5, 1, 9, 7, 10]])\n assert [{1, 2}, {2, 3}, {3, 4}, {4, 5}, {5, 6}, {6, 7}, {7, 8}, {8, 9}, {9, 10}] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_767_get_pairs_count", "language": "elixir", "prompt": "# Write a python function to count the number of pairs whose sum is equal to \u2018sum\u2019. The funtion gets as input a list of numbers and the sum,\n\n\ndefmodule HumanEval do\n def get_pairs_count(a, r, r, ,, , s, u, m) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_767_get_pairs_count.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"get_pairs_count\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :get_pairs_count end)\n candidate = fn args -> apply(HumanEval, get_pairs_count, args) end\n assert 6 == candidate.([[1, 1, 1, 1], 2])\n assert 3 == candidate.([[1, 5, 7, -1, 5], 6])\n assert 1 == candidate.([[1, -2, 3], 1])\n assert 1 == candidate.([[-1, -2, 3], -3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_769_Diff", "language": "elixir", "prompt": "# Write a python function to get the difference between two lists.\n\n\ndefmodule HumanEval do\n def Diff(l, i, 1, ,, , l, i, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_769_Diff.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"Diff\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :Diff end)\n candidate = fn args -> apply(HumanEval, Diff, args) end\n assert [10, 20, 30, 15] == candidate.([[10, 15, 20, 25, 30, 35, 40], [25, 40, 35]])\n assert [2, 3, 4, 5, 6, 7] == candidate.([[1, 2, 3, 4, 5], [6, 7, 1]])\n assert [2, 3, 6, 7] == candidate.([[1, 2, 3], [6, 7, 1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_770_odd_num_sum", "language": "elixir", "prompt": "# Write a python function to find the sum of fourth power of first n odd natural numbers.\n\n\ndefmodule HumanEval do\n def odd_num_sum(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_770_odd_num_sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"odd_num_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :odd_num_sum end)\n candidate = fn args -> apply(HumanEval, odd_num_sum, args) end\n assert 82 == candidate.([2])\n assert 707 == candidate.([3])\n assert 3108 == candidate.([4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_771_check_expression", "language": "elixir", "prompt": "# Write a function to check if the given expression is balanced or not. https://www.geeksforgeeks.org/check-for-balanced-parentheses-in-an-expression/\n\n\ndefmodule HumanEval do\n def check_expression(e, x, p) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_771_check_expression.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_expression\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_expression end)\n candidate = fn args -> apply(HumanEval, check_expression, args) end\n assert true == candidate.([\"{()}[{}]\"])\n assert false == candidate.([\"{()}[{]\"])\n assert true == candidate.([\"{()}[{}][]({})\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_772_remove_length", "language": "elixir", "prompt": "# Write a function to remove all the words with k length in the given string.\n\n\ndefmodule HumanEval do\n def remove_length(t, e, s, t, _, s, t, r, ,, , K) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_772_remove_length.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_length\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_length end)\n candidate = fn args -> apply(HumanEval, remove_length, args) end\n assert \"person is most value\" == candidate.([\"The person is most value tet\", 3])\n assert \"If you me about ok\" == candidate.([\"If you told me about this ok\", 4])\n assert \"Forces of darkeness is the\" == candidate.([\"Forces of darkeness is come into the play\", 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_773_occurance_substring", "language": "elixir", "prompt": "# Write a function to find the occurrence and position of the substrings within a string. Return None if there is no match.\n\n\ndefmodule HumanEval do\n def occurance_substring(t, e, x, t, ,, , p, a, t, t, e, r, n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_773_occurance_substring.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"occurance_substring\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :occurance_substring end)\n candidate = fn args -> apply(HumanEval, occurance_substring, args) end\n assert {\"python\", 0, 6} == candidate.([\"python programming, python language\", \"python\"])\n assert {\"programming\", 7, 18} == candidate.([\"python programming,programming language\", \"programming\"])\n assert {\"language\", 31, 39} == candidate.([\"python programming,programming language\", \"language\"])\n assert nil == candidate.([\"c++ programming, c++ language\", \"python\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_775_odd_position", "language": "elixir", "prompt": "# Write a python function to check whether every odd index contains odd numbers of a given list.\n\n\ndefmodule HumanEval do\n def odd_position(n, u, m, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_775_odd_position.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"odd_position\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :odd_position end)\n candidate = fn args -> apply(HumanEval, odd_position, args) end\n assert true == candidate.([[2, 1, 4, 3, 6, 7, 6, 3]])\n assert true == candidate.([[4, 1, 2]])\n assert false == candidate.([[1, 2, 3]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_776_count_vowels", "language": "elixir", "prompt": "# Write a function to count those characters which have vowels as their neighbors in the given string.\n\n\ndefmodule HumanEval do\n def count_vowels(t, e, s, t, _, s, t, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_776_count_vowels.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_vowels\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_vowels end)\n candidate = fn args -> apply(HumanEval, count_vowels, args) end\n assert 7 == candidate.([\"bestinstareels\"])\n assert 12 == candidate.([\"partofthejourneyistheend\"])\n assert 5 == candidate.([\"amazonprime\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_777_find_sum", "language": "elixir", "prompt": "# Write a python function to find the sum of non-repeated elements in a given list.\n\n\ndefmodule HumanEval do\n def find_sum(a, r, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_777_find_sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_sum end)\n candidate = fn args -> apply(HumanEval, find_sum, args) end\n assert 21 == candidate.([[1, 2, 3, 1, 1, 4, 5, 6]])\n assert 71 == candidate.([[1, 10, 9, 4, 2, 10, 10, 45, 4]])\n assert 78 == candidate.([[12, 10, 9, 45, 2, 10, 10, 45, 10]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_778_pack_consecutive_duplicates", "language": "elixir", "prompt": "# Write a function to pack consecutive duplicates of a given list elements into sublists.\n\n\ndefmodule HumanEval do\n def pack_consecutive_duplicates(l, i, s, t, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_778_pack_consecutive_duplicates.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"pack_consecutive_duplicates\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :pack_consecutive_duplicates end)\n candidate = fn args -> apply(HumanEval, pack_consecutive_duplicates, args) end\n assert [[0, 0], [1], [2], [3], [4, 4], [5], [6, 6, 6], [7], [8], [9], [4, 4]] == candidate.([[0, 0, 1, 2, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4]])\n assert [[10, 10], [15], [19], [18, 18], [17], [26, 26], [17], [18], [10]] == candidate.([[10, 10, 15, 19, 18, 18, 17, 26, 26, 17, 18, 10]])\n assert [[\"a\", \"a\"], [\"b\"], [\"c\"], [\"d\", \"d\"]] == candidate.([[\"a\", \"a\", \"b\", \"c\", \"d\", \"d\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_77_is_Diff", "language": "elixir", "prompt": "# Write a python function to find whether a number is divisible by 11.\n\n\ndefmodule HumanEval do\n def is_Diff(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_77_is_Diff.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_Diff\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_Diff end)\n candidate = fn args -> apply(HumanEval, is_Diff, args) end\n assert false == candidate.([12345])\n assert true == candidate.([1212112])\n assert false == candidate.([1212])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_780_find_combinations", "language": "elixir", "prompt": "# Write a function to find the combinations of sums with tuples in the given tuple list. https://www.geeksforgeeks.org/python-combinations-of-sum-with-tuples-in-tuple-list/\n\n\ndefmodule HumanEval do\n def find_combinations(t, e, s, t, _, l, i, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_780_find_combinations.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_combinations\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_combinations end)\n candidate = fn args -> apply(HumanEval, find_combinations, args) end\n assert [{8, 11}, {7, 5}, {8, 14}, {11, 8}, {12, 17}, {11, 11}] == candidate.([[{2, 4}, {6, 7}, {5, 1}, {6, 10}]])\n assert [{10, 13}, {9, 7}, {10, 16}, {13, 10}, {14, 19}, {13, 13}] == candidate.([[{3, 5}, {7, 8}, {6, 2}, {7, 11}]])\n assert [{12, 15}, {11, 9}, {12, 18}, {15, 12}, {16, 21}, {15, 15}] == candidate.([[{4, 6}, {8, 9}, {7, 3}, {8, 12}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_781_count_divisors", "language": "elixir", "prompt": "# Write a python function to check whether the count of divisors is even. https://www.w3resource.com/python-exercises/basic/python-basic-1-exercise-24.php\n\n\ndefmodule HumanEval do\n def count_divisors(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_781_count_divisors.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_divisors\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_divisors end)\n candidate = fn args -> apply(HumanEval, count_divisors, args) end\n assert true == candidate.([10])\n assert false == candidate.([100])\n assert true == candidate.([125])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_782_odd_length_sum", "language": "elixir", "prompt": "# Write a python function to find the sum of all odd length subarrays. https://www.geeksforgeeks.org/sum-of-all-odd-length-subarrays/\n\n\ndefmodule HumanEval do\n def odd_length_sum(a, r, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_782_odd_length_sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"odd_length_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :odd_length_sum end)\n candidate = fn args -> apply(HumanEval, odd_length_sum, args) end\n assert 14 == candidate.([[1, 2, 4]])\n assert 15 == candidate.([[1, 2, 1, 2]])\n assert 8 == candidate.([[1, 7]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_783_rgb_to_hsv", "language": "elixir", "prompt": "# Write a function to convert rgb color to hsv color. https://www.geeksforgeeks.org/program-change-rgb-color-model-hsv-color-model/\n\n\ndefmodule HumanEval do\n def rgb_to_hsv(r, ,, , g, ,, , b) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_783_rgb_to_hsv.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"rgb_to_hsv\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :rgb_to_hsv end)\n candidate = fn args -> apply(HumanEval, rgb_to_hsv, args) end\n assert [0.0, 0.0, 100.0] == candidate.([255, 255, 255])\n assert [120.0, 100.0, 84.31372549019608] == candidate.([0, 215, 0])\n assert [149.26829268292684, 95.34883720930233, 84.31372549019608] == candidate.([10, 215, 110])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_784_mul_even_odd", "language": "elixir", "prompt": "# Write a function to find the product of first even and odd number of a given list.\n\n\ndefmodule HumanEval do\n def mul_even_odd(l, i, s, t, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_784_mul_even_odd.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"mul_even_odd\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :mul_even_odd end)\n candidate = fn args -> apply(HumanEval, mul_even_odd, args) end\n assert 4 == candidate.([[1, 3, 5, 7, 4, 1, 6, 8]])\n assert 2 == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]])\n assert 10 == candidate.([[1, 5, 7, 9, 10]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_785_tuple_str_int", "language": "elixir", "prompt": "# Write a function to convert tuple string to integer tuple.\n\n\ndefmodule HumanEval do\n def tuple_str_int(t, e, s, t, _, s, t, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_785_tuple_str_int.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"tuple_str_int\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :tuple_str_int end)\n candidate = fn args -> apply(HumanEval, tuple_str_int, args) end\n assert {7, 8, 9} == candidate.([\"(7, 8, 9)\"])\n assert {1, 2, 3} == candidate.([\"(1, 2, 3)\"])\n assert {4, 5, 6} == candidate.([\"(4, 5, 6)\"])\n assert {7, 81, 19} == candidate.([\"(7, 81, 19)\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_786_right_insertion", "language": "elixir", "prompt": "# Write a function to locate the right insertion point for a specified value in sorted order.\n\n\ndefmodule HumanEval do\n def right_insertion(a, ,, , x) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_786_right_insertion.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"right_insertion\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :right_insertion end)\n candidate = fn args -> apply(HumanEval, right_insertion, args) end\n assert 4 == candidate.([[1, 2, 4, 5], 6])\n assert 2 == candidate.([[1, 2, 4, 5], 3])\n assert 4 == candidate.([[1, 2, 4, 5], 7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_787_text_match_three", "language": "elixir", "prompt": "# Write a function that matches a string that has an a followed by three 'b'.\n\n\ndefmodule HumanEval do\n def text_match_three(t, e, x, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_787_text_match_three.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"text_match_three\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :text_match_three end)\n candidate = fn args -> apply(HumanEval, text_match_three, args) end\n assert false == candidate.([\"ac\"])\n assert false == candidate.([\"dc\"])\n assert true == candidate.([\"abbbba\"])\n assert true == candidate.([\"caacabbbba\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_788_new_tuple", "language": "elixir", "prompt": "# Write a function to create a new tuple from the given string and list.\n\n\ndefmodule HumanEval do\n def new_tuple(t, e, s, t, _, l, i, s, t, ,, , t, e, s, t, _, s, t, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_788_new_tuple.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"new_tuple\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :new_tuple end)\n candidate = fn args -> apply(HumanEval, new_tuple, args) end\n assert {\"WEB\", \"is\", \"best\"} == candidate.([[\"WEB\", \"is\"], \"best\"])\n assert {\"We\", \"are\", \"Developers\"} == candidate.([[\"We\", \"are\"], \"Developers\"])\n assert {\"Part\", \"is\", \"Wrong\"} == candidate.([[\"Part\", \"is\"], \"Wrong\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_790_even_position", "language": "elixir", "prompt": "# Write a python function to check whether every even index contains even numbers of a given list.\n\n\ndefmodule HumanEval do\n def even_position(n, u, m, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_790_even_position.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"even_position\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :even_position end)\n candidate = fn args -> apply(HumanEval, even_position, args) end\n assert false == candidate.([[3, 2, 1]])\n assert false == candidate.([[1, 2, 3]])\n assert true == candidate.([[2, 1, 4]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_791_remove_nested", "language": "elixir", "prompt": "# Write a function to remove tuples from the given tuple.\n\n\ndefmodule HumanEval do\n def remove_nested(t, e, s, t, _, t, u, p) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_791_remove_nested.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_nested\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_nested end)\n candidate = fn args -> apply(HumanEval, remove_nested, args) end\n assert {1, 5, 7, 10} == candidate.([{1, 5, 7, {4, 6}, 10}])\n assert {2, 6, 8, 11} == candidate.([{2, 6, 8, {5, 7}, 11}])\n assert {3, 7, 9, 12} == candidate.([{3, 7, 9, {6, 8}, 12}])\n assert {3, 7, 9, 12} == candidate.([{3, 7, 9, {6, 8}, {5, 12}, 12}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_792_count_list", "language": "elixir", "prompt": "# Write a python function to count the number of lists in a given number of lists.\n\n\ndefmodule HumanEval do\n def count_list(i, n, p, u, t, _, l, i, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_792_count_list.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_list end)\n candidate = fn args -> apply(HumanEval, count_list, args) end\n assert 4 == candidate.([[[1, 3], [5, 7], [9, 11], [13, 15, 17]]])\n assert 3 == candidate.([[[1, 2], [2, 3], [4, 5]]])\n assert 2 == candidate.([[[1, 0], [2, 0]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_793_last", "language": "elixir", "prompt": "# Write a python function to find the last position of an element in a sorted array.\n\n\ndefmodule HumanEval do\n def last(a, r, r, ,, , x) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_793_last.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"last\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :last end)\n candidate = fn args -> apply(HumanEval, last, args) end\n assert 0 == candidate.([[1, 2, 3], 1])\n assert 2 == candidate.([[1, 1, 1, 2, 3, 4], 1])\n assert 3 == candidate.([[2, 3, 2, 3, 6, 8, 9], 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_794_text_starta_endb", "language": "elixir", "prompt": "# Write a function that matches a string that has an 'a' followed by anything, ending in 'b'.\n\n\ndefmodule HumanEval do\n def text_starta_endb(t, e, x, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_794_text_starta_endb.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"text_starta_endb\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :text_starta_endb end)\n candidate = fn args -> apply(HumanEval, text_starta_endb, args) end\n assert true == candidate.([\"aabbbb\"])\n assert false == candidate.([\"aabAbbbc\"])\n assert false == candidate.([\"accddbbjjj\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_796_return_sum", "language": "elixir", "prompt": "# Write function to find the sum of all items in the given dictionary.\n\n\ndefmodule HumanEval do\n def return_sum(d, i, c, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_796_return_sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"return_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :return_sum end)\n candidate = fn args -> apply(HumanEval, return_sum, args) end\n assert 600 == candidate.([%{\"a\" => 100, \"b\" => 200, \"c\" => 300}])\n assert 88 == candidate.([%{\"a\" => 25, \"b\" => 18, \"c\" => 45}])\n assert 124 == candidate.([%{\"a\" => 36, \"b\" => 39, \"c\" => 49}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_797_sum_in_range", "language": "elixir", "prompt": "# Write a python function to find the sum of all odd natural numbers within the range l and r.\n\n\ndefmodule HumanEval do\n def sum_in_range(l, ,, , r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_797_sum_in_range.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_in_range\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_in_range end)\n candidate = fn args -> apply(HumanEval, sum_in_range, args) end\n assert 8 == candidate.([2, 5])\n assert 12 == candidate.([5, 7])\n assert 40 == candidate.([7, 13])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_798__sum", "language": "elixir", "prompt": "# Write a python function to find the sum of an array.\n\n\ndefmodule HumanEval do\n def _sum(a, r, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_798__sum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :_sum end)\n candidate = fn args -> apply(HumanEval, _sum, args) end\n assert 6 == candidate.([[1, 2, 3]])\n assert 50 == candidate.([[15, 12, 13, 10]])\n assert 3 == candidate.([[0, 1, 2]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_799_left_rotate", "language": "elixir", "prompt": "# Write a function to that rotate left bits by d bits a given number. We assume that the number is 32 bit.\n\n\ndefmodule HumanEval do\n def left_rotate(n, ,, , d) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_799_left_rotate.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"left_rotate\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :left_rotate end)\n candidate = fn args -> apply(HumanEval, left_rotate, args) end\n assert 64 == candidate.([16, 2])\n assert 40 == candidate.([10, 2])\n assert 792 == candidate.([99, 3])\n assert 792 == candidate.([99, 3])\n assert 8 == candidate.([1, 3])\n assert 40 == candidate.([5, 3])\n assert 232 == candidate.([29, 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_79_word_len", "language": "elixir", "prompt": "# Write a python function to check whether the length of the word is odd or not.\n\n\ndefmodule HumanEval do\n def word_len(s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_79_word_len.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"word_len\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :word_len end)\n candidate = fn args -> apply(HumanEval, word_len, args) end\n assert false == candidate.([\"Hadoop\"])\n assert true == candidate.([\"great\"])\n assert true == candidate.([\"structure\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_800_remove_all_spaces", "language": "elixir", "prompt": "# Write a function to remove all whitespaces from a string.\n\n\ndefmodule HumanEval do\n def remove_all_spaces(t, e, x, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_800_remove_all_spaces.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_all_spaces\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_all_spaces end)\n candidate = fn args -> apply(HumanEval, remove_all_spaces, args) end\n assert \"pythonprogram\" == candidate.([\"python program\"])\n assert \"pythonprogramminglanguage\" == candidate.([\"python programming language\"])\n assert \"pythonprogram\" == candidate.([\"python program\"])\n assert \"pythonprogram\" == candidate.([\" python program\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_801_test_three_equal", "language": "elixir", "prompt": "# Write a python function to count the number of equal numbers from three given integers.\n\n\ndefmodule HumanEval do\n def test_three_equal(x, ,, , y, ,, , z) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_801_test_three_equal.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"test_three_equal\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :test_three_equal end)\n candidate = fn args -> apply(HumanEval, test_three_equal, args) end\n assert 3 == candidate.([1, 1, 1])\n assert 0 == candidate.([-1, -2, -3])\n assert 2 == candidate.([1, 2, 2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_802_count_rotation", "language": "elixir", "prompt": "# Write a python function to count the number of rotations required to generate a sorted array. https://www.geeksforgeeks.org/count-of-rotations-required-to-generate-a-sorted-array/\n\n\ndefmodule HumanEval do\n def count_rotation(a, r, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_802_count_rotation.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_rotation\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_rotation end)\n candidate = fn args -> apply(HumanEval, count_rotation, args) end\n assert 1 == candidate.([[3, 2, 1]])\n assert 2 == candidate.([[4, 5, 1, 2, 3]])\n assert 3 == candidate.([[7, 8, 9, 1, 2, 3]])\n assert 0 == candidate.([[1, 2, 3]])\n assert 2 == candidate.([[1, 3, 2]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_803_is_perfect_square", "language": "elixir", "prompt": "# Write a function to check whether the given number is a perfect square or not. https://www.geeksforgeeks.org/check-if-given-number-is-perfect-square-in-cpp/\n\n\ndefmodule HumanEval do\n def is_perfect_square(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_803_is_perfect_square.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_perfect_square\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_perfect_square end)\n candidate = fn args -> apply(HumanEval, is_perfect_square, args) end\n assert false == candidate.([10])\n assert true == candidate.([36])\n assert false == candidate.([14])\n assert true == candidate.([196])\n assert false == candidate.([125])\n assert true == candidate.([15625])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_804_is_product_even", "language": "elixir", "prompt": "# Write a function to check whether the product of numbers in a list is even or not.\n\n\ndefmodule HumanEval do\n def is_product_even(a, r, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_804_is_product_even.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_product_even\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_product_even end)\n candidate = fn args -> apply(HumanEval, is_product_even, args) end\n assert true == candidate.([[1, 2, 3]])\n assert true == candidate.([[1, 2, 1, 4]])\n assert false == candidate.([[1, 1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_805_max_sum_list", "language": "elixir", "prompt": "# Write a function that returns the list in a list of lists whose sum of elements is the highest.\n\n\ndefmodule HumanEval do\n def max_sum_list(l, i, s, t, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_805_max_sum_list.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_sum_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_sum_list end)\n candidate = fn args -> apply(HumanEval, max_sum_list, args) end\n assert [10, 11, 12] == candidate.([[[1, 2, 3], [4, 5, 6], [10, 11, 12], [7, 8, 9]]])\n assert [12, 11, 10] == candidate.([[[3, 2, 1], [6, 5, 4], [12, 11, 10]]])\n assert [2, 3, 1] == candidate.([[[2, 3, 1]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_806_max_run_uppercase", "language": "elixir", "prompt": "# Write a function to find maximum run of uppercase characters in the given string.\n\n\ndefmodule HumanEval do\n def max_run_uppercase(t, e, s, t, _, s, t, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_806_max_run_uppercase.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_run_uppercase\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_run_uppercase end)\n candidate = fn args -> apply(HumanEval, max_run_uppercase, args) end\n assert 5 == candidate.([\"GeMKSForGERksISBESt\"])\n assert 6 == candidate.([\"PrECIOusMOVemENTSYT\"])\n assert 4 == candidate.([\"GooGLEFluTTER\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_807_first_odd", "language": "elixir", "prompt": "# Write a python function to find the first odd number in a given list of numbers.\n\n\ndefmodule HumanEval do\n def first_odd(n, u, m, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_807_first_odd.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"first_odd\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :first_odd end)\n candidate = fn args -> apply(HumanEval, first_odd, args) end\n assert 1 == candidate.([[1, 3, 5]])\n assert 1 == candidate.([[2, 4, 1, 3]])\n assert 9 == candidate.([[8, 9, 1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_808_check_K", "language": "elixir", "prompt": "# Write a function to check if the given tuples contain the k or not.\n\n\ndefmodule HumanEval do\n def check_K(t, e, s, t, _, t, u, p, ,, , K) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_808_check_K.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_K\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_K end)\n candidate = fn args -> apply(HumanEval, check_K, args) end\n assert true == candidate.([[10, 4, 5, 6, 8], 6])\n assert false == candidate.([[1, 2, 3, 4, 5, 6], 7])\n assert true == candidate.([[7, 8, 9, 44, 11, 12], 11])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_809_check_smaller", "language": "elixir", "prompt": "# Write a function to check if each element of second tuple is smaller than its corresponding element in the first tuple.\n\n\ndefmodule HumanEval do\n def check_smaller(t, e, s, t, _, t, u, p, 1, ,, , t, e, s, t, _, t, u, p, 2) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_809_check_smaller.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_smaller\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_smaller end)\n candidate = fn args -> apply(HumanEval, check_smaller, args) end\n assert false == candidate.([{1, 2, 3}, {2, 3, 4}])\n assert true == candidate.([{4, 5, 6}, {3, 4, 5}])\n assert true == candidate.([{11, 12, 13}, {10, 11, 12}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_80_tetrahedral_number", "language": "elixir", "prompt": "# Write a function to find the nth tetrahedral number.\n\n\ndefmodule HumanEval do\n def tetrahedral_number(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_80_tetrahedral_number.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"tetrahedral_number\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :tetrahedral_number end)\n candidate = fn args -> apply(HumanEval, tetrahedral_number, args) end\n assert 35 == candidate.([5])\n assert 56 == candidate.([6])\n assert 84 == candidate.([7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_83_get_Char", "language": "elixir", "prompt": "# Write a python function to find the character made by adding the ASCII value of all the characters of the given string modulo 26.\n\n\ndefmodule HumanEval do\n def get_Char(s, t, r, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_83_get_Char.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"get_Char\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :get_Char end)\n candidate = fn args -> apply(HumanEval, get_Char, args) end\n assert \"f\" == candidate.([\"abc\"])\n assert \"t\" == candidate.([\"gfg\"])\n assert \"c\" == candidate.([\"ab\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_84_sequence", "language": "elixir", "prompt": "# Write a function to find the nth number in the newman conway sequence.\n\n\ndefmodule HumanEval do\n def sequence(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_84_sequence.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sequence\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sequence end)\n candidate = fn args -> apply(HumanEval, sequence, args) end\n assert 6 == candidate.([10])\n assert 1 == candidate.([2])\n assert 2 == candidate.([3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_86_centered_hexagonal_number", "language": "elixir", "prompt": "# Write a function to find nth centered hexagonal number.\n\n\ndefmodule HumanEval do\n def centered_hexagonal_number(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_86_centered_hexagonal_number.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"centered_hexagonal_number\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :centered_hexagonal_number end)\n candidate = fn args -> apply(HumanEval, centered_hexagonal_number, args) end\n assert 271 == candidate.([10])\n assert 7 == candidate.([2])\n assert 217 == candidate.([9])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_87_merge_dictionaries_three", "language": "elixir", "prompt": "# Write a function to merge three dictionaries into a single dictionary.\n\n\ndefmodule HumanEval do\n def merge_dictionaries_three(d, i, c, t, 1, ,, , d, i, c, t, 2, ,, , d, i, c, t, 3) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_87_merge_dictionaries_three.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"merge_dictionaries_three\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :merge_dictionaries_three end)\n candidate = fn args -> apply(HumanEval, merge_dictionaries_three, args) end\n assert %{\"B\" => \"Black\", \"R\" => \"Red\", \"P\" => \"Pink\", \"G\" => \"Green\", \"W\" => \"White\", \"O\" => \"Orange\"} == candidate.([%{\"R\" => \"Red\", \"B\" => \"Black\", \"P\" => \"Pink\"}, %{\"G\" => \"Green\", \"W\" => \"White\"}, %{\"O\" => \"Orange\", \"W\" => \"White\", \"B\" => \"Black\"}])\n assert %{\"W\" => \"White\", \"P\" => \"Pink\", \"B\" => \"Black\", \"R\" => \"Red\", \"G\" => \"Green\", \"L\" => \"lavender\"} == candidate.([%{\"R\" => \"Red\", \"B\" => \"Black\", \"P\" => \"Pink\"}, %{\"G\" => \"Green\", \"W\" => \"White\"}, %{\"L\" => \"lavender\", \"B\" => \"Blue\"}])\n assert %{\"B\" => \"Black\", \"P\" => \"Pink\", \"R\" => \"Red\", \"G\" => \"Green\", \"L\" => \"lavender\", \"W\" => \"White\"} == candidate.([%{\"R\" => \"Red\", \"B\" => \"Black\", \"P\" => \"Pink\"}, %{\"L\" => \"lavender\", \"B\" => \"Blue\"}, %{\"G\" => \"Green\", \"W\" => \"White\"}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_88_freq_count", "language": "elixir", "prompt": "# Write a function to get the frequency of all the elements in a list, returned as a dictionary.\n\n\ndefmodule HumanEval do\n def freq_count(l, i, s, t, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_88_freq_count.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"freq_count\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :freq_count end)\n candidate = fn args -> apply(HumanEval, freq_count, args) end\n assert %{10 => 4, 20 => 4, 40 => 2, 50 => 2, 30 => 1} == candidate.([[10, 10, 10, 10, 20, 20, 20, 20, 40, 40, 50, 50, 30]])\n assert %{1 => 3, 2 => 2, 3 => 3, 4 => 3} == candidate.([[1, 2, 3, 4, 3, 2, 4, 1, 3, 1, 4]])\n assert %{10 => 1, 5 => 3, 6 => 2, 7 => 2, 4 => 2, 9 => 2} == candidate.([[5, 6, 7, 4, 9, 10, 4, 5, 6, 7, 9, 5]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_89_closest_num", "language": "elixir", "prompt": "# Write a function to find the closest smaller number than n.\n\n\ndefmodule HumanEval do\n def closest_num(N) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_89_closest_num.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"closest_num\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :closest_num end)\n candidate = fn args -> apply(HumanEval, closest_num, args) end\n assert 10 == candidate.([11])\n assert 6 == candidate.([7])\n assert 11 == candidate.([12])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_8_square_nums", "language": "elixir", "prompt": "# Write a function to find squares of individual elements in a list.\n\n\ndefmodule HumanEval do\n def square_nums(n, u, m, s) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_8_square_nums.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"square_nums\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :square_nums end)\n candidate = fn args -> apply(HumanEval, square_nums, args) end\n assert [1, 4, 9, 16, 25, 36, 49, 64, 81, 100] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]])\n assert [100, 400, 900] == candidate.([[10, 20, 30]])\n assert [144, 225] == candidate.([[12, 15]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_90_len_log", "language": "elixir", "prompt": "# Write a python function to find the length of the longest word.\n\n\ndefmodule HumanEval do\n def len_log(l, i, s, t, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_90_len_log.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"len_log\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :len_log end)\n candidate = fn args -> apply(HumanEval, len_log, args) end\n assert 7 == candidate.([[\"python\", \"PHP\", \"bigdata\"]])\n assert 3 == candidate.([[\"a\", \"ab\", \"abc\"]])\n assert 5 == candidate.([[\"small\", \"big\", \"tall\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_91_find_substring", "language": "elixir", "prompt": "# Write a function to check if a string is present as a substring in a given list of string values.\n\n\ndefmodule HumanEval do\n def find_substring(s, t, r, 1, ,, , s, u, b, _, s, t, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_91_find_substring.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_substring\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_substring end)\n candidate = fn args -> apply(HumanEval, find_substring, args) end\n assert true == candidate.([[\"red\", \"black\", \"white\", \"green\", \"orange\"], \"ack\"])\n assert false == candidate.([[\"red\", \"black\", \"white\", \"green\", \"orange\"], \"abc\"])\n assert true == candidate.([[\"red\", \"black\", \"white\", \"green\", \"orange\"], \"ange\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_92_is_undulating", "language": "elixir", "prompt": "# Write a function to check whether the given number is undulating or not.\n\n\ndefmodule HumanEval do\n def is_undulating(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_92_is_undulating.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_undulating\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_undulating end)\n candidate = fn args -> apply(HumanEval, is_undulating, args) end\n assert true == candidate.([1212121])\n assert false == candidate.([1991])\n assert true == candidate.([121])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_93_power", "language": "elixir", "prompt": "# Write a function to calculate the value of 'a' to the power 'b'.\n\n\ndefmodule HumanEval do\n def power(a, ,, , b) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_93_power.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"power\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :power end)\n candidate = fn args -> apply(HumanEval, power, args) end\n assert 81 == candidate.([3, 4])\n assert 8 == candidate.([2, 3])\n assert 3125 == candidate.([5, 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_94_index_minimum", "language": "elixir", "prompt": "# Given a list of tuples, write a function that returns the first value of the tuple with the smallest second value.\n\n\ndefmodule HumanEval do\n def index_minimum(t, e, s, t, _, l, i, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_94_index_minimum.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"index_minimum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :index_minimum end)\n candidate = fn args -> apply(HumanEval, index_minimum, args) end\n assert \"Varsha\" == candidate.([[{\"Rash\", 143}, {\"Manjeet\", 200}, {\"Varsha\", 100}]])\n assert \"Dawood\" == candidate.([[{\"Yash\", 185}, {\"Dawood\", 125}, {\"Sanya\", 175}]])\n assert \"Ayesha\" == candidate.([[{\"Sai\", 345}, {\"Salman\", 145}, {\"Ayesha\", 96}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_95_Find_Min_Length", "language": "elixir", "prompt": "# Write a python function to find the length of the smallest list in a list of lists.\n\n\ndefmodule HumanEval do\n def Find_Min_Length(l, s, t) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_95_Find_Min_Length.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"Find_Min_Length\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :Find_Min_Length end)\n candidate = fn args -> apply(HumanEval, Find_Min_Length, args) end\n assert 1 == candidate.([[[1], [1, 2]]])\n assert 2 == candidate.([[[1, 2], [1, 2, 3], [1, 2, 3, 4]]])\n assert 3 == candidate.([[[3, 3, 3], [4, 4, 4, 4]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_96_divisor", "language": "elixir", "prompt": "# Write a python function to find the number of divisors of a given integer.\n\n\ndefmodule HumanEval do\n def divisor(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_96_divisor.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"divisor\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :divisor end)\n candidate = fn args -> apply(HumanEval, divisor, args) end\n assert 4 == candidate.([15])\n assert 6 == candidate.([12])\n assert 3 == candidate.([9])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_97_frequency_lists", "language": "elixir", "prompt": "# Write a function to find frequency of each element in a flattened list of lists, returned in a dictionary.\n\n\ndefmodule HumanEval do\n def frequency_lists(l, i, s, t, 1) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_97_frequency_lists.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"frequency_lists\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :frequency_lists end)\n candidate = fn args -> apply(HumanEval, frequency_lists, args) end\n assert %{1 => 1, 2 => 3, 3 => 1, 4 => 1, 5 => 2, 6 => 1, 7 => 1, 8 => 1, 9 => 1} == candidate.([[[1, 2, 3, 2], [4, 5, 6, 2], [7, 8, 9, 5]]])\n assert %{1 => 1, 2 => 1, 3 => 1, 4 => 1, 5 => 1, 6 => 1, 7 => 1, 8 => 1, 9 => 1, 10 => 1, 11 => 1, 12 => 1} == candidate.([[[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]])\n assert %{20 => 2, 30 => 2, 40 => 2, 17 => 1, 18 => 1, 16 => 1, 14 => 1, 13 => 1, 10 => 1} == candidate.([[[20, 30, 40, 17], [18, 16, 14, 13], [10, 20, 30, 40]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_99_decimal_to_binary", "language": "elixir", "prompt": "# Write a function to convert the given decimal number to its binary equivalent, represented as a string with no leading zeros.\n\n\ndefmodule HumanEval do\n def decimal_to_binary(n) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_99_decimal_to_binary.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"decimal_to_binary\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :decimal_to_binary end)\n candidate = fn args -> apply(HumanEval, decimal_to_binary, args) end\n assert \"1000\" == candidate.([8])\n assert \"10010\" == candidate.([18])\n assert \"111\" == candidate.([7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_9_find_Rotations", "language": "elixir", "prompt": "# Write a python function to find the minimum number of rotations (greater than 0) required to get the same string.\n\n\ndefmodule HumanEval do\n def find_Rotations(s, t, r) do", "doctests": "keep", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_9_find_Rotations.py", "prompt_terminology": "verbatim", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_Rotations\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_Rotations end)\n candidate = fn args -> apply(HumanEval, find_Rotations, args) end\n assert 1 == candidate.([\"aaaa\"])\n assert 2 == candidate.([\"ab\"])\n assert 3 == candidate.([\"abc\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} diff --git a/prompts/mbpp-elixir-reworded.jsonl b/prompts/mbpp-elixir-reworded.jsonl new file mode 100644 index 0000000000..d4d0bbfecb --- /dev/null +++ b/prompts/mbpp-elixir-reworded.jsonl @@ -0,0 +1,397 @@ +{"name": "mbpp_100_next_smallest_palindrome", "language": "elixir", "prompt": "# Write a function to find the next smallest palindrome of a specified integer, returned as an integer.\n\n\ndefmodule HumanEval do\n def next_smallest_palindrome(n, u, m) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_100_next_smallest_palindrome.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"next_smallest_palindrome\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :next_smallest_palindrome end)\n candidate = fn args -> apply(HumanEval, next_smallest_palindrome, args) end\n assert 101 == candidate.([99])\n assert 1331 == candidate.([1221])\n assert 121 == candidate.([120])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_101_kth_element", "language": "elixir", "prompt": "# Write a function to find the kth element in the given list using 1-based indexing.\n\n\ndefmodule HumanEval do\n def kth_element(a, r, r, ,, , k) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_101_kth_element.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"kth_element\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :kth_element end)\n candidate = fn args -> apply(HumanEval, kth_element, args) end\n assert 3 == candidate.([[12, 3, 5, 7, 19], 2])\n assert 8 == candidate.([[17, 24, 8, 23], 3])\n assert 36 == candidate.([[16, 21, 25, 36, 4], 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_102_snake_to_camel", "language": "elixir", "prompt": "# Write a function to convert a snake case string to camel case string.\n\n\ndefmodule HumanEval do\n def snake_to_camel(w, o, r, d) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_102_snake_to_camel.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"snake_to_camel\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :snake_to_camel end)\n candidate = fn args -> apply(HumanEval, snake_to_camel, args) end\n assert \"PythonProgram\" == candidate.([\"python_program\"])\n assert \"PythonLanguage\" == candidate.([\"python_language\"])\n assert \"ProgrammingLanguage\" == candidate.([\"programming_language\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_103_eulerian_num", "language": "elixir", "prompt": "# Write a function to find the Eulerian number a(n, m).\n\n\ndefmodule HumanEval do\n def eulerian_num(n, ,, , m) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_103_eulerian_num.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"eulerian_num\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :eulerian_num end)\n candidate = fn args -> apply(HumanEval, eulerian_num, args) end\n assert 4 == candidate.([3, 1])\n assert 11 == candidate.([4, 1])\n assert 26 == candidate.([5, 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_104_sort_sublists", "language": "elixir", "prompt": "# Write a function to sort each sublist of strings in a given list of lists.\n\n\ndefmodule HumanEval do\n def sort_sublists(i, n, p, u, t, _, l, i, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_104_sort_sublists.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sort_sublists\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sort_sublists end)\n candidate = fn args -> apply(HumanEval, sort_sublists, args) end\n assert [[\"green\", \"orange\"], [\"black\", \"white\"], [\"black\", \"orange\", \"white\"]] == candidate.([[[\"green\", \"orange\"], [\"black\", \"white\"], [\"white\", \"black\", \"orange\"]]])\n assert [[\" red \", \"green\"], [\" black\", \"blue \"], [\" orange\", \"brown\"]] == candidate.([[[\" red \", \"green\"], [\"blue \", \" black\"], [\" orange\", \"brown\"]]])\n assert [[\"gold\", \"zilver\"], [\"aluminium\", \"magnesium\"], [\"bronze\", \"steel\"]] == candidate.([[[\"zilver\", \"gold\"], [\"magnesium\", \"aluminium\"], [\"steel\", \"bronze\"]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_105_count", "language": "elixir", "prompt": "# Write an elixirthon function to count true booleans in the given list.\n\n\ndefmodule HumanEval do\n def count(l, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_105_count.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count end)\n candidate = fn args -> apply(HumanEval, count, args) end\n assert 2 == candidate.([[true, false, true]])\n assert 0 == candidate.([[false, false]])\n assert 3 == candidate.([[true, true, true]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_106_add_lists", "language": "elixir", "prompt": "# Write a function to append the given list to the given tuples.\n\n\ndefmodule HumanEval do\n def add_lists(t, e, s, t, _, l, i, s, t, ,, , t, e, s, t, _, t, u, p) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_106_add_lists.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"add_lists\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :add_lists end)\n candidate = fn args -> apply(HumanEval, add_lists, args) end\n assert {9, 10, 5, 6, 7} == candidate.([[5, 6, 7], {9, 10}])\n assert {10, 11, 6, 7, 8} == candidate.([[6, 7, 8], {10, 11}])\n assert {11, 12, 7, 8, 9} == candidate.([[7, 8, 9], {11, 12}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_108_merge_sorted_list", "language": "elixir", "prompt": "# Write a function to merge three lists into a single sorted list.\n\n\ndefmodule HumanEval do\n def merge_sorted_list(n, u, m, 1, ,, , n, u, m, 2, ,, , n, u, m, 3) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_108_merge_sorted_list.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"merge_sorted_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :merge_sorted_list end)\n candidate = fn args -> apply(HumanEval, merge_sorted_list, args) end\n assert [4, 5, 11, 15, 19, 20, 24, 24, 25, 25, 26, 29, 48, 54, 56, 110, 154, 233] == candidate.([[25, 24, 15, 4, 5, 29, 110], [19, 20, 11, 56, 25, 233, 154], [24, 26, 54, 48]])\n assert [1, 1, 2, 3, 4, 5, 5, 6, 7, 7, 8, 8, 9, 11, 12] == candidate.([[1, 3, 5, 6, 8, 9], [2, 5, 7, 11], [1, 4, 7, 8, 12]])\n assert [1, 2, 3, 4, 7, 8, 9, 9, 9, 10, 12, 14, 14, 18, 22, 25, 25, 35, 41, 50, 58, 61, 65, 74, 75, 85] == candidate.([[18, 14, 10, 9, 8, 7, 9, 3, 2, 4, 1], [25, 35, 22, 85, 14, 65, 75, 25, 58], [12, 74, 9, 50, 61, 41]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_109_odd_Equivalent", "language": "elixir", "prompt": "# Write an elixirthon function to find the number of numbers with an odd value when rotating a binary string the given number of times.\n\n\ndefmodule HumanEval do\n def odd_Equivalent(s, ,, , n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_109_odd_Equivalent.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"odd_Equivalent\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :odd_Equivalent end)\n candidate = fn args -> apply(HumanEval, odd_Equivalent, args) end\n assert 3 == candidate.([\"011001\", 6])\n assert 4 == candidate.([\"11011\", 5])\n assert 2 == candidate.([\"1010\", 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_113_check_integer", "language": "elixir", "prompt": "# Write a function to check if a string represents an integer or not.\n\n\ndefmodule HumanEval do\n def check_integer(t, e, x, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_113_check_integer.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_integer\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_integer end)\n candidate = fn args -> apply(HumanEval, check_integer, args) end\n assert false == candidate.([\"python\"])\n assert true == candidate.([\"1\"])\n assert true == candidate.([\"12345\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_116_tuple_to_int", "language": "elixir", "prompt": "# Write a function to convert a given tuple of positive integers into a single integer.\n\n\ndefmodule HumanEval do\n def tuple_to_int(n, u, m, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_116_tuple_to_int.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"tuple_to_int\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :tuple_to_int end)\n candidate = fn args -> apply(HumanEval, tuple_to_int, args) end\n assert 123 == candidate.([{1, 2, 3}])\n assert 456 == candidate.([{4, 5, 6}])\n assert 567 == candidate.([{5, 6, 7}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_117_list_to_float", "language": "elixir", "prompt": "# Write a function to convert all possible convertible elements in a list of lists to floats.\n\n\ndefmodule HumanEval do\n def list_to_float(t, e, s, t, _, l, i, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_117_list_to_float.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"list_to_float\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :list_to_float end)\n candidate = fn args -> apply(HumanEval, list_to_float, args) end\n assert [{3.0, 4.0}, {1.0, 26.45}, {7.32, 8.0}, {4.0, 8.0}] == candidate.([[{\"3\", \"4\"}, {\"1\", \"26.45\"}, {\"7.32\", \"8\"}, {\"4\", \"8\"}]])\n assert [{4.0, 4.0}, {2.0, 27.0}, {4.12, 9.0}, {7.0, 11.0}] == candidate.([[{\"4\", \"4\"}, {\"2\", \"27\"}, {\"4.12\", \"9\"}, {\"7\", \"11\"}]])\n assert [{6.0, 78.0}, {5.0, 26.45}, {1.33, 4.0}, {82.0, 13.0}] == candidate.([[{\"6\", \"78\"}, {\"5\", \"26.45\"}, {\"1.33\", \"4\"}, {\"82\", \"13\"}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_118_string_to_list", "language": "elixir", "prompt": "# Write a function to convert a string to a list of strings split on the space character.\n\n\ndefmodule HumanEval do\n def string_to_list(s, t, r, i, n, g) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_118_string_to_list.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"string_to_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :string_to_list end)\n candidate = fn args -> apply(HumanEval, string_to_list, args) end\n assert [\"python\", \"programming\"] == candidate.([\"python programming\"])\n assert [\"lists\", \"tuples\", \"strings\"] == candidate.([\"lists tuples strings\"])\n assert [\"write\", \"a\", \"program\"] == candidate.([\"write a program\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_119_search", "language": "elixir", "prompt": "# Write an elixirthon function to find the element that appears only once in a sorted list.\n\n\ndefmodule HumanEval do\n def search(a, r, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_119_search.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"search\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :search end)\n candidate = fn args -> apply(HumanEval, search, args) end\n assert 3 == candidate.([[1, 1, 2, 2, 3]])\n assert 8 == candidate.([[1, 1, 3, 3, 4, 4, 5, 5, 7, 7, 8]])\n assert 1 == candidate.([[1, 2, 2, 3, 3, 4, 4]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_11_remove_Occ", "language": "elixir", "prompt": "# Write an elixirthon function to remove first and last occurrence of a given character from the string.\n\n\ndefmodule HumanEval do\n def remove_Occ(s, ,, , c, h) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_11_remove_Occ.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_Occ\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_Occ end)\n candidate = fn args -> apply(HumanEval, remove_Occ, args) end\n assert \"heo\" == candidate.([\"hello\", \"l\"])\n assert \"bcd\" == candidate.([\"abcda\", \"a\"])\n assert \"H\" == candidate.([\"PHP\", \"P\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_120_max_product_tuple", "language": "elixir", "prompt": "# Write a function to find the maximum absolute product between numbers in pairs of tuples within a given list.\n\n\ndefmodule HumanEval do\n def max_product_tuple(l, i, s, t, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_120_max_product_tuple.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_product_tuple\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_product_tuple end)\n candidate = fn args -> apply(HumanEval, max_product_tuple, args) end\n assert 36 == candidate.([[{2, 7}, {2, 6}, {1, 8}, {4, 9}]])\n assert 200 == candidate.([[{10, 20}, {15, 2}, {5, 10}]])\n assert 484 == candidate.([[{11, 44}, {10, 15}, {20, 5}, {12, 9}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_123_amicable_numbers_sum", "language": "elixir", "prompt": "# Write a function to sum all amicable numbers from 1 to a specified number.\n\n\ndefmodule HumanEval do\n def amicable_numbers_sum(l, i, m, i, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_123_amicable_numbers_sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"amicable_numbers_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :amicable_numbers_sum end)\n candidate = fn args -> apply(HumanEval, amicable_numbers_sum, args) end\n assert 504 == candidate.([999])\n assert 31626 == candidate.([9999])\n assert 0 == candidate.([99])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_125_find_length", "language": "elixir", "prompt": "# Write a function to find the maximum difference between the number of 0s and number of 1s in any sub-string of the given binary string.\n\n\ndefmodule HumanEval do\n def find_length(s, t, r, i, n, g) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_125_find_length.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_length\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_length end)\n candidate = fn args -> apply(HumanEval, find_length, args) end\n assert 6 == candidate.([\"11000010001\"])\n assert 1 == candidate.([\"10111\"])\n assert 2 == candidate.([\"11011101100101\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_126_sum", "language": "elixir", "prompt": "# Write an elixirthon function to find the sum of common divisors of two given numbers.\n\n\ndefmodule HumanEval do\n def sum(a, ,, , b) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_126_sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum end)\n candidate = fn args -> apply(HumanEval, sum, args) end\n assert 6 == candidate.([10, 15])\n assert 93 == candidate.([100, 150])\n assert 3 == candidate.([4, 6])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_127_multiply_int", "language": "elixir", "prompt": "# Write a function to multiply two integers.\n\n\ndefmodule HumanEval do\n def multiply_int(x, ,, , y) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_127_multiply_int.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"multiply_int\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :multiply_int end)\n candidate = fn args -> apply(HumanEval, multiply_int, args) end\n assert 200 == candidate.([10, 20])\n assert 50 == candidate.([5, 10])\n assert 32 == candidate.([4, 8])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_128_long_words", "language": "elixir", "prompt": "# Write a function to find words that are longer than n characters from a given list of words.\n\n\ndefmodule HumanEval do\n def long_words(n, ,, , s, t, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_128_long_words.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"long_words\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :long_words end)\n candidate = fn args -> apply(HumanEval, long_words, args) end\n assert [\"python\", \"programming\", \"language\"] == candidate.([3, \"python is a programming language\"])\n assert [\"writing\", \"program\"] == candidate.([2, \"writing a program\"])\n assert [\"sorting\"] == candidate.([5, \"sorting list\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_129_magic_square_test", "language": "elixir", "prompt": "# Write a function to calculate whether the matrix is a magic square.\n\n\ndefmodule HumanEval do\n def magic_square_test(m, y, _, m, a, t, r, i, x) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_129_magic_square_test.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"magic_square_test\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :magic_square_test end)\n candidate = fn args -> apply(HumanEval, magic_square_test, args) end\n assert true == candidate.([[[7, 12, 1, 14], [2, 13, 8, 11], [16, 3, 10, 5], [9, 6, 15, 4]]])\n assert true == candidate.([[[2, 7, 6], [9, 5, 1], [4, 3, 8]]])\n assert false == candidate.([[[2, 7, 6], [9, 5, 1], [4, 3, 7]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_12_sort_matrix", "language": "elixir", "prompt": "# Write a function to sort a given matrix in ascending order according to the sum of its rows.\n\n\ndefmodule HumanEval do\n def sort_matrix(M) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_12_sort_matrix.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sort_matrix\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sort_matrix end)\n candidate = fn args -> apply(HumanEval, sort_matrix, args) end\n assert [[1, 1, 1], [1, 2, 3], [2, 4, 5]] == candidate.([[[1, 2, 3], [2, 4, 5], [1, 1, 1]]])\n assert [[-2, 4, -5], [1, -1, 1], [1, 2, 3]] == candidate.([[[1, 2, 3], [-2, 4, -5], [1, -1, 1]]])\n assert [[2, 1, 4], [6, 4, 3], [5, 8, 9]] == candidate.([[[5, 8, 9], [6, 4, 3], [2, 1, 4]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_130_max_occurrences", "language": "elixir", "prompt": "# Write a function to find the item with maximum frequency in a given list.\n\n\ndefmodule HumanEval do\n def max_occurrences(n, u, m, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_130_max_occurrences.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_occurrences\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_occurrences end)\n candidate = fn args -> apply(HumanEval, max_occurrences, args) end\n assert 2 == candidate.([[2, 3, 8, 4, 7, 9, 8, 2, 6, 5, 1, 6, 1, 2, 3, 2, 4, 6, 9, 1, 2]])\n assert 8 == candidate.([[2, 3, 8, 4, 7, 9, 8, 7, 9, 15, 14, 10, 12, 13, 16, 18]])\n assert 20 == candidate.([[10, 20, 20, 30, 40, 90, 80, 50, 30, 20, 50, 10]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_131_reverse_vowels", "language": "elixir", "prompt": "# Write an elixirthon function to reverse only the vowels of a given string (where y is not a vowel).\n\n\ndefmodule HumanEval do\n def reverse_vowels(s, t, r, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_131_reverse_vowels.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"reverse_vowels\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :reverse_vowels end)\n candidate = fn args -> apply(HumanEval, reverse_vowels, args) end\n assert \"Python\" == candidate.([\"Python\"])\n assert \"ASU\" == candidate.([\"USA\"])\n assert \"ab\" == candidate.([\"ab\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_132_tup_string", "language": "elixir", "prompt": "# Write a function to convert a list to a string.\n\n\ndefmodule HumanEval do\n def tup_string(t, u, p, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_132_tup_string.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"tup_string\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :tup_string end)\n candidate = fn args -> apply(HumanEval, tup_string, args) end\n assert \"exercises\" == candidate.([[\"e\", \"x\", \"e\", \"r\", \"c\", \"i\", \"s\", \"e\", \"s\"]])\n assert \"python\" == candidate.([[\"p\", \"y\", \"t\", \"h\", \"o\", \"n\"]])\n assert \"program\" == candidate.([[\"p\", \"r\", \"o\", \"g\", \"r\", \"a\", \"m\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_133_sum_negativenum", "language": "elixir", "prompt": "# Write a function to calculate the sum of the negative numbers of a given list of numbers.\n\n\ndefmodule HumanEval do\n def sum_negativenum(n, u, m, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_133_sum_negativenum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_negativenum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_negativenum end)\n candidate = fn args -> apply(HumanEval, sum_negativenum, args) end\n assert -32 == candidate.([[2, 4, -6, -9, 11, -12, 14, -5, 17]])\n assert -52 == candidate.([[10, 15, -14, 13, -18, 12, -20]])\n assert -894 == candidate.([[19, -65, 57, 39, 152, -639, 121, 44, 90, -190]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_135_hexagonal_num", "language": "elixir", "prompt": "# Write a function to find the nth hexagonal number.\n\n\ndefmodule HumanEval do\n def hexagonal_num(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_135_hexagonal_num.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"hexagonal_num\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :hexagonal_num end)\n candidate = fn args -> apply(HumanEval, hexagonal_num, args) end\n assert 190 == candidate.([10])\n assert 45 == candidate.([5])\n assert 91 == candidate.([7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_138_is_Sum_Of_Powers_Of_Two", "language": "elixir", "prompt": "# Write an elixirthon function to check whether the given number can be represented as sum of non-zero powers of 2 or not.\n\n\ndefmodule HumanEval do\n def is_Sum_Of_Powers_Of_Two(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_138_is_Sum_Of_Powers_Of_Two.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_Sum_Of_Powers_Of_Two\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_Sum_Of_Powers_Of_Two end)\n candidate = fn args -> apply(HumanEval, is_Sum_Of_Powers_Of_Two, args) end\n assert true == candidate.([10])\n assert false == candidate.([7])\n assert true == candidate.([14])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_141_pancake_sort", "language": "elixir", "prompt": "# Write a function to sort a list of elements.\n\n\ndefmodule HumanEval do\n def pancake_sort(n, u, m, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_141_pancake_sort.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"pancake_sort\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :pancake_sort end)\n candidate = fn args -> apply(HumanEval, pancake_sort, args) end\n assert [15, 25, 38, 69, 79] == candidate.([[15, 79, 25, 38, 69]])\n assert [12, 36, 54, 85, 98] == candidate.([[98, 12, 54, 36, 85]])\n assert [12, 23, 32, 41, 42] == candidate.([[41, 42, 32, 12, 23]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_142_count_samepair", "language": "elixir", "prompt": "# Write a function to count number items that are identical in the same position of three given lists.\n\n\ndefmodule HumanEval do\n def count_samepair(l, i, s, t, 1, ,, , l, i, s, t, 2, ,, , l, i, s, t, 3) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_142_count_samepair.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_samepair\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_samepair end)\n candidate = fn args -> apply(HumanEval, count_samepair, args) end\n assert 3 == candidate.([[1, 2, 3, 4, 5, 6, 7, 8], [2, 2, 3, 1, 2, 6, 7, 9], [2, 1, 3, 1, 2, 6, 7, 9]])\n assert 4 == candidate.([[1, 2, 3, 4, 5, 6, 7, 8], [2, 2, 3, 1, 2, 6, 7, 8], [2, 1, 3, 1, 2, 6, 7, 8]])\n assert 5 == candidate.([[1, 2, 3, 4, 2, 6, 7, 8], [2, 2, 3, 1, 2, 6, 7, 8], [2, 1, 3, 1, 2, 6, 7, 8]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_143_find_lists", "language": "elixir", "prompt": "# Write a function to find number of lists present in the given list.\n\n\ndefmodule HumanEval do\n def find_lists(I, n, p, u, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_143_find_lists.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_lists\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_lists end)\n candidate = fn args -> apply(HumanEval, find_lists, args) end\n assert 2 == candidate.([[[1, 2, 3, 4], [5, 6, 7, 8]]])\n assert 3 == candidate.([[[1, 2], [3, 4], [5, 6]]])\n assert 1 == candidate.([[9, 8, 7, 6, 5, 4, 3, 2, 1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_145_max_Abs_Diff", "language": "elixir", "prompt": "# Write an elixirthon function to find the maximum difference between any two elements in a given list.\n\n\ndefmodule HumanEval do\n def max_Abs_Diff(a, r, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_145_max_Abs_Diff.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_Abs_Diff\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_Abs_Diff end)\n candidate = fn args -> apply(HumanEval, max_Abs_Diff, args) end\n assert 4 == candidate.([[2, 1, 5, 3]])\n assert 8 == candidate.([[9, 3, 2, 5, 1]])\n assert 2 == candidate.([[3, 2, 1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_14_find_Volume", "language": "elixir", "prompt": "# Write an elixirthon function to find the volume of a triangular prism.\n\n\ndefmodule HumanEval do\n def find_Volume(l, ,, , b, ,, , h) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_14_find_Volume.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_Volume\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_Volume end)\n candidate = fn args -> apply(HumanEval, find_Volume, args) end\n assert 240 == candidate.([10, 8, 6])\n assert 6 == candidate.([3, 2, 2])\n assert 1 == candidate.([1, 2, 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_160_find_solution", "language": "elixir", "prompt": "# Write a function that returns integers x and y that satisfy ax + by = n as a tuple, or return nil if no solution exists.\n\n\ndefmodule HumanEval do\n def find_solution(a, ,, , b, ,, , n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_160_find_solution.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_solution\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_solution end)\n candidate = fn args -> apply(HumanEval, find_solution, args) end\n assert {2, 1} == candidate.([2, 3, 7])\n assert nil == candidate.([4, 2, 7])\n assert {4, 1} == candidate.([1, 13, 17])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_161_remove_elements", "language": "elixir", "prompt": "# Write a function to remove all elements from a given list present in another list.\n\n\ndefmodule HumanEval do\n def remove_elements(l, i, s, t, 1, ,, , l, i, s, t, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_161_remove_elements.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_elements\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_elements end)\n candidate = fn args -> apply(HumanEval, remove_elements, args) end\n assert [1, 3, 5, 7, 9, 10] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [2, 4, 6, 8]])\n assert [2, 4, 6, 8, 9, 10] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 3, 5, 7]])\n assert [1, 2, 3, 4, 6, 8, 9, 10] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [5, 7]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_162_sum_series", "language": "elixir", "prompt": "# Write a function to calculate the sum (n - 2*i) from i=0 to n // 2, for instance n + (n-2) + (n-4)... (until n-x =< 0).\n\n\ndefmodule HumanEval do\n def sum_series(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_162_sum_series.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_series\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_series end)\n candidate = fn args -> apply(HumanEval, sum_series, args) end\n assert 12 == candidate.([6])\n assert 30 == candidate.([10])\n assert 25 == candidate.([9])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_164_are_equivalent", "language": "elixir", "prompt": "# Write a function to determine if the sum of the divisors of two integers are the same.\n\n\ndefmodule HumanEval do\n def are_equivalent(n, u, m, 1, ,, , n, u, m, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_164_are_equivalent.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"are_equivalent\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :are_equivalent end)\n candidate = fn args -> apply(HumanEval, are_equivalent, args) end\n assert false == candidate.([36, 57])\n assert false == candidate.([2, 4])\n assert true == candidate.([23, 47])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_165_count_char_position", "language": "elixir", "prompt": "# Write a function to count the number of characters in a string that occur at the same position in the string as in the English alphabet (case insensitive).\n\n\ndefmodule HumanEval do\n def count_char_position(s, t, r, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_165_count_char_position.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_char_position\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_char_position end)\n candidate = fn args -> apply(HumanEval, count_char_position, args) end\n assert 2 == candidate.([\"xbcefg\"])\n assert 3 == candidate.([\"ABcED\"])\n assert 5 == candidate.([\"AbgdeF\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_166_find_even_pair", "language": "elixir", "prompt": "# Write a function that counts the number of pairs of integers in a list that xor to an even number.\n\n\ndefmodule HumanEval do\n def find_even_pair(A) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_166_find_even_pair.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_even_pair\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_even_pair end)\n candidate = fn args -> apply(HumanEval, find_even_pair, args) end\n assert 4 == candidate.([[5, 4, 7, 2, 1]])\n assert 9 == candidate.([[7, 2, 8, 1, 0, 5, 11]])\n assert 1 == candidate.([[1, 2, 3]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_167_next_power_of_2", "language": "elixir", "prompt": "# Write an elixirthon function to find the smallest power of 2 greater than or equal to n.\n\n\ndefmodule HumanEval do\n def next_power_of_2(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_167_next_power_of_2.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"next_power_of_2\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :next_power_of_2 end)\n candidate = fn args -> apply(HumanEval, next_power_of_2, args) end\n assert 1 == candidate.([0])\n assert 8 == candidate.([5])\n assert 32 == candidate.([17])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_168_frequency", "language": "elixir", "prompt": "# Write a function to count the number of occurrences of a number in a given list.\n\n\ndefmodule HumanEval do\n def frequency(a, ,, , x) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_168_frequency.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"frequency\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :frequency end)\n candidate = fn args -> apply(HumanEval, frequency, args) end\n assert 0 == candidate.([[1, 2, 3], 4])\n assert 3 == candidate.([[1, 2, 2, 3, 3, 3, 4], 3])\n assert 2 == candidate.([[0, 1, 2, 3, 1, 2], 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_16_text_lowercase_underscore", "language": "elixir", "prompt": "# Write a function to that returns true if the input string contains sequences of lowercase letters joined with an underscore and false otherwise.\n\n\ndefmodule HumanEval do\n def text_lowercase_underscore(t, e, x, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_16_text_lowercase_underscore.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"text_lowercase_underscore\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :text_lowercase_underscore end)\n candidate = fn args -> apply(HumanEval, text_lowercase_underscore, args) end\n assert true == candidate.([\"aab_cbbbc\"])\n assert false == candidate.([\"aab_Abbbc\"])\n assert false == candidate.([\"Aaab_abbbc\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_170_sum_range_list", "language": "elixir", "prompt": "# Write a function to find the sum of numbers in a list within a range specified by two indices.\n\n\ndefmodule HumanEval do\n def sum_range_list(l, i, s, t, 1, ,, , m, ,, , n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_170_sum_range_list.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_range_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_range_list end)\n candidate = fn args -> apply(HumanEval, sum_range_list, args) end\n assert 29 == candidate.([[2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12], 8, 10])\n assert 16 == candidate.([[2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12], 5, 7])\n assert 38 == candidate.([[2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12], 7, 10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_171_perimeter_pentagon", "language": "elixir", "prompt": "# Write a function to find the perimeter of a regular pentagon from the length of its sides.\n\n\ndefmodule HumanEval do\n def perimeter_pentagon(a) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_171_perimeter_pentagon.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"perimeter_pentagon\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :perimeter_pentagon end)\n candidate = fn args -> apply(HumanEval, perimeter_pentagon, args) end\n assert 25 == candidate.([5])\n assert 50 == candidate.([10])\n assert 75 == candidate.([15])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_172_count_occurance", "language": "elixir", "prompt": "# Write a function to count the number of occurence of the string 'std' in a given string.\n\n\ndefmodule HumanEval do\n def count_occurance(s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_172_count_occurance.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_occurance\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_occurance end)\n candidate = fn args -> apply(HumanEval, count_occurance, args) end\n assert 3 == candidate.([\"letstdlenstdporstd\"])\n assert 1 == candidate.([\"truststdsolensporsd\"])\n assert 2 == candidate.([\"makestdsostdworthit\"])\n assert 1 == candidate.([\"stds\"])\n assert 0 == candidate.([\"\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_17_square_perimeter", "language": "elixir", "prompt": "# Write a function that returns the perimeter of a square given its side length as input.\n\n\ndefmodule HumanEval do\n def square_perimeter(a) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_17_square_perimeter.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"square_perimeter\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :square_perimeter end)\n candidate = fn args -> apply(HumanEval, square_perimeter, args) end\n assert 40 == candidate.([10])\n assert 20 == candidate.([5])\n assert 16 == candidate.([4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_18_remove_dirty_chars", "language": "elixir", "prompt": "# Write a function to remove characters from the first string which are present in the second string.\n\n\ndefmodule HumanEval do\n def remove_dirty_chars(s, t, r, i, n, g, ,, , s, e, c, o, n, d, _, s, t, r, i, n, g) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_18_remove_dirty_chars.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_dirty_chars\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_dirty_chars end)\n candidate = fn args -> apply(HumanEval, remove_dirty_chars, args) end\n assert \"bacuve\" == candidate.([\"probasscurve\", \"pros\"])\n assert \"digiidi\" == candidate.([\"digitalindia\", \"talent\"])\n assert \"emles\" == candidate.([\"exoticmiles\", \"toxic\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_19_test_duplicate", "language": "elixir", "prompt": "# Write a function to find whether a given list of integers contains any duplicate element.\n\n\ndefmodule HumanEval do\n def test_duplicate(a, r, r, a, y, n, u, m, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_19_test_duplicate.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"test_duplicate\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :test_duplicate end)\n candidate = fn args -> apply(HumanEval, test_duplicate, args) end\n assert false == candidate.([[1, 2, 3, 4, 5]])\n assert true == candidate.([[1, 2, 3, 4, 4]])\n assert true == candidate.([[1, 1, 2, 2, 3, 3, 4, 4, 5]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_20_is_woodall", "language": "elixir", "prompt": "# Write a function to check if the given number is woodball or not.\n\n\ndefmodule HumanEval do\n def is_woodall(x) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_20_is_woodall.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_woodall\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_woodall end)\n candidate = fn args -> apply(HumanEval, is_woodall, args) end\n assert true == candidate.([383])\n assert false == candidate.([254])\n assert false == candidate.([200])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_222_check_type", "language": "elixir", "prompt": "# Write a function to check if all the elements in tuple have same data type or not.\n\n\ndefmodule HumanEval do\n def check_type(t, e, s, t, _, t, u, p, l, e) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_222_check_type.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_type\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_type end)\n candidate = fn args -> apply(HumanEval, check_type, args) end\n assert true == candidate.([{5, 6, 7, 3, 5, 6}])\n assert false == candidate.([{1, 2, \"4\"}])\n assert true == candidate.([{3, 2, 1, 4, 5}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_223_is_majority", "language": "elixir", "prompt": "# Write a function that takes in a sorted list, its length (n), and an element and returns whether the element is the majority element in the given sorted list. (The majority element is the element that occurs more than n/2 times.)\n\n\ndefmodule HumanEval do\n def is_majority(a, r, r, ,, , n, ,, , x) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_223_is_majority.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_majority\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_majority end)\n candidate = fn args -> apply(HumanEval, is_majority, args) end\n assert true == candidate.([[1, 2, 3, 3, 3, 3, 10], 7, 3])\n assert false == candidate.([[1, 1, 2, 4, 4, 4, 6, 6], 8, 4])\n assert true == candidate.([[1, 1, 1, 2, 2], 5, 1])\n assert false == candidate.([[1, 1, 2, 2], 5, 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_224_count_Set_Bits", "language": "elixir", "prompt": "# Write an elixirthon function to count the number of set bits (binary digits with value 1) in a given number.\n\n\ndefmodule HumanEval do\n def count_Set_Bits(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_224_count_Set_Bits.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_Set_Bits\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_Set_Bits end)\n candidate = fn args -> apply(HumanEval, count_Set_Bits, args) end\n assert 1 == candidate.([2])\n assert 1 == candidate.([4])\n assert 2 == candidate.([6])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_226_odd_values_string", "language": "elixir", "prompt": "# Write an elixirthon function to remove the characters which have odd index values of a given string.\n\n\ndefmodule HumanEval do\n def odd_values_string(s, t, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_226_odd_values_string.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"odd_values_string\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :odd_values_string end)\n candidate = fn args -> apply(HumanEval, odd_values_string, args) end\n assert \"ace\" == candidate.([\"abcdef\"])\n assert \"pto\" == candidate.([\"python\"])\n assert \"dt\" == candidate.([\"data\"])\n assert \"lms\" == candidate.([\"lambs\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_227_min_of_three", "language": "elixir", "prompt": "# Write a function to find minimum of three numbers.\n\n\ndefmodule HumanEval do\n def min_of_three(a, ,, , b, ,, , c) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_227_min_of_three.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"min_of_three\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :min_of_three end)\n candidate = fn args -> apply(HumanEval, min_of_three, args) end\n assert 0 == candidate.([10, 20, 0])\n assert 15 == candidate.([19, 15, 18])\n assert -30 == candidate.([-10, -20, -30])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_228_all_Bits_Set_In_The_Given_Range", "language": "elixir", "prompt": "# Write an elixirthon function to check whether all the bits are unset in the given range or not.\n\n\ndefmodule HumanEval do\n def all_Bits_Set_In_The_Given_Range(n, ,, , l, ,, , r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_228_all_Bits_Set_In_The_Given_Range.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"all_Bits_Set_In_The_Given_Range\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :all_Bits_Set_In_The_Given_Range end)\n candidate = fn args -> apply(HumanEval, all_Bits_Set_In_The_Given_Range, args) end\n assert true == candidate.([4, 1, 2])\n assert true == candidate.([17, 2, 4])\n assert false == candidate.([39, 4, 6])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_229_re_arrange_array", "language": "elixir", "prompt": "# Write a function that takes in a list and an integer n, and re-arranges the first n elements of the given list so that all negative elements appear before positive ones, and where the relative order among negative and positive elements is preserved.\n\n\ndefmodule HumanEval do\n def re_arrange_array(a, r, r, ,, , n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_229_re_arrange_array.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"re_arrange_array\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :re_arrange_array end)\n candidate = fn args -> apply(HumanEval, re_arrange_array, args) end\n assert [-1, -3, -7, 4, 5, 6, 2, 8, 9] == candidate.([[-1, 2, -3, 4, 5, 6, -7, 8, 9], 9])\n assert [-14, -26, 12, 13, 15] == candidate.([[12, -14, -26, 13, 15], 5])\n assert [-42, -39, -78, 10, 24, 36, 85] == candidate.([[10, 24, 36, -42, -39, -78, 85], 7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_230_replace_blank", "language": "elixir", "prompt": "# Write a function that takes in a string and character, replaces blank spaces in the string with the character, and returns the string.\n\n\ndefmodule HumanEval do\n def replace_blank(s, t, r, 1, ,, , c, h, a, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_230_replace_blank.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"replace_blank\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :replace_blank end)\n candidate = fn args -> apply(HumanEval, replace_blank, args) end\n assert \"hello@people\" == candidate.([\"hello people\", \"@\"])\n assert \"python$program$language\" == candidate.([\"python program language\", \"$\"])\n assert \"blank-space\" == candidate.([\"blank space\", \"-\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_234_volume_cube", "language": "elixir", "prompt": "# Write a function to find the volume of a cube given its side length.\n\n\ndefmodule HumanEval do\n def volume_cube(l) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_234_volume_cube.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"volume_cube\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :volume_cube end)\n candidate = fn args -> apply(HumanEval, volume_cube, args) end\n assert 27 == candidate.([3])\n assert 8 == candidate.([2])\n assert 125 == candidate.([5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_237_check_occurences", "language": "elixir", "prompt": "# Write a function that takes in a list of tuples and returns a map mapping each unique tuple to the number of times it occurs in the list.\n\n\ndefmodule HumanEval do\n def check_occurences(t, e, s, t, _, l, i, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_237_check_occurences.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_occurences\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_occurences end)\n candidate = fn args -> apply(HumanEval, check_occurences, args) end\n assert %{{1, 3} => 2, {2, 5} => 2, {3, 6} => 1} == candidate.([[{3, 1}, {1, 3}, {2, 5}, {5, 2}, {6, 3}]])\n assert %{{2, 4} => 2, {3, 6} => 2, {4, 7} => 1} == candidate.([[{4, 2}, {2, 4}, {3, 6}, {6, 3}, {7, 4}]])\n assert %{{2, 13} => 1, {11, 23} => 1, {12, 25} => 2, {16, 23} => 1} == candidate.([[{13, 2}, {11, 23}, {12, 25}, {25, 12}, {16, 23}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_238_number_of_substrings", "language": "elixir", "prompt": "# Write an elixirthon function to count the number of non-empty substrings of a given string.\n\n\ndefmodule HumanEval do\n def number_of_substrings(s, t, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_238_number_of_substrings.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"number_of_substrings\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :number_of_substrings end)\n candidate = fn args -> apply(HumanEval, number_of_substrings, args) end\n assert 6 == candidate.([\"abc\"])\n assert 10 == candidate.([\"abcd\"])\n assert 15 == candidate.([\"abcde\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_239_get_total_number_of_sequences", "language": "elixir", "prompt": "# Write a function that takes in positive integers m and n and finds the number of possible sequences of length n, such that each element is a positive integer and is greater than or equal to twice the previous element but less than or equal to m.\n\n\ndefmodule HumanEval do\n def get_total_number_of_sequences(m, ,, , n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_239_get_total_number_of_sequences.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"get_total_number_of_sequences\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :get_total_number_of_sequences end)\n candidate = fn args -> apply(HumanEval, get_total_number_of_sequences, args) end\n assert 4 == candidate.([10, 4])\n assert 6 == candidate.([5, 2])\n assert 84 == candidate.([16, 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_240_replace_list", "language": "elixir", "prompt": "# Write a function that takes in two lists and replaces the last element of the first list with the elements of the second list.\n\n\ndefmodule HumanEval do\n def replace_list(l, i, s, t, 1, ,, , l, i, s, t, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_240_replace_list.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"replace_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :replace_list end)\n candidate = fn args -> apply(HumanEval, replace_list, args) end\n assert [1, 3, 5, 7, 9, 2, 4, 6, 8] == candidate.([[1, 3, 5, 7, 9, 10], [2, 4, 6, 8]])\n assert [1, 2, 3, 4, 5, 6, 7, 8] == candidate.([[1, 2, 3, 4, 5], [5, 6, 7, 8]])\n assert [\"red\", \"blue\", \"yellow\"] == candidate.([[\"red\", \"blue\", \"green\"], [\"yellow\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_242_count_charac", "language": "elixir", "prompt": "# Write a function to count the total number of characters in a string.\n\n\ndefmodule HumanEval do\n def count_charac(s, t, r, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_242_count_charac.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_charac\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_charac end)\n candidate = fn args -> apply(HumanEval, count_charac, args) end\n assert 18 == candidate.([\"python programming\"])\n assert 8 == candidate.([\"language\"])\n assert 5 == candidate.([\"words\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_244_next_Perfect_Square", "language": "elixir", "prompt": "# Write an elixirthon function to find the next perfect square greater than a given number.\n\n\ndefmodule HumanEval do\n def next_Perfect_Square(N) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_244_next_Perfect_Square.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"next_Perfect_Square\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :next_Perfect_Square end)\n candidate = fn args -> apply(HumanEval, next_Perfect_Square, args) end\n assert 36 == candidate.([35])\n assert 9 == candidate.([6])\n assert 16 == candidate.([9])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_245_max_sum", "language": "elixir", "prompt": "# Write a function that takes a list and finds the maximum sum of a bitonic subsequence for the given list, where a sequence is bitonic if it is first increasing and then decreasing.\n\n\ndefmodule HumanEval do\n def max_sum(a, r, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_245_max_sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_sum end)\n candidate = fn args -> apply(HumanEval, max_sum, args) end\n assert 194 == candidate.([[1, 15, 51, 45, 33, 100, 12, 18, 9]])\n assert 210 == candidate.([[80, 60, 30, 40, 20, 10]])\n assert 138 == candidate.([[2, 3, 14, 16, 21, 23, 29, 30]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_247_lps", "language": "elixir", "prompt": "# Write a function to find the length of the longest palindromic subsequence in the given string.\n\n\ndefmodule HumanEval do\n def lps(s, t, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_247_lps.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"lps\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :lps end)\n candidate = fn args -> apply(HumanEval, lps, args) end\n assert 5 == candidate.([\"TENS FOR TENS\"])\n assert 7 == candidate.([\"CARDIO FOR CARDS\"])\n assert 9 == candidate.([\"PART OF THE JOURNEY IS PART\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_249_intersection_array", "language": "elixir", "prompt": "# Write a function to find the intersection of two lists.\n\n\ndefmodule HumanEval do\n def intersection_array(a, r, r, a, y, _, n, u, m, s, 1, ,, , a, r, r, a, y, _, n, u, m, s, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_249_intersection_array.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"intersection_array\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :intersection_array end)\n candidate = fn args -> apply(HumanEval, intersection_array, args) end\n assert [1, 2, 8, 9] == candidate.([[1, 2, 3, 5, 7, 8, 9, 10], [1, 2, 4, 8, 9]])\n assert [3, 5, 7, 9] == candidate.([[1, 2, 3, 5, 7, 8, 9, 10], [3, 5, 7, 9]])\n assert [10] == candidate.([[1, 2, 3, 5, 7, 8, 9, 10], [10, 20, 30, 40]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_250_count_X", "language": "elixir", "prompt": "# Write an elixirthon function that takes in a tuple and an element and counts the occcurences of the element in the list.\n\n\ndefmodule HumanEval do\n def count_X(t, u, p, ,, , x) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_250_count_X.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_X\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_X end)\n candidate = fn args -> apply(HumanEval, count_X, args) end\n assert 0 == candidate.([[10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2], 4])\n assert 3 == candidate.([[10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2], 10])\n assert 4 == candidate.([[10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2], 8])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_251_insert_element", "language": "elixir", "prompt": "# Write a function that takes in a list and an element and inserts the element before each element in the list, and returns the resulting list.\n\n\ndefmodule HumanEval do\n def insert_element(l, i, s, t, ,, , e, l, e, m, e, n, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_251_insert_element.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"insert_element\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :insert_element end)\n candidate = fn args -> apply(HumanEval, insert_element, args) end\n assert [\"c\", \"Red\", \"c\", \"Green\", \"c\", \"Black\"] == candidate.([[\"Red\", \"Green\", \"Black\"], \"c\"])\n assert [\"program\", \"python\", \"program\", \"java\"] == candidate.([[\"python\", \"java\"], \"program\"])\n assert [\"laugh\", \"happy\", \"laugh\", \"sad\"] == candidate.([[\"happy\", \"sad\"], \"laugh\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_252_convert", "language": "elixir", "prompt": "# Write an elixirthon function to convert complex numbers to polar coordinates.\n\n\ndefmodule HumanEval do\n def convert(n, u, m, b, e, r, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_252_convert.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"convert\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :convert end)\n candidate = fn args -> apply(HumanEval, convert, args) end\n assert {1.0, 0.0} == candidate.([1])\n assert {4.0, 0.0} == candidate.([4])\n assert {5.0, 0.0} == candidate.([5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_253_count_integer", "language": "elixir", "prompt": "# Write an elixirthon function that returns the number of integer elements in a given list.\n\n\ndefmodule HumanEval do\n def count_integer(l, i, s, t, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_253_count_integer.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_integer\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_integer end)\n candidate = fn args -> apply(HumanEval, count_integer, args) end\n assert 2 == candidate.([[1, 2, \"abc\", 1.2]])\n assert 3 == candidate.([[1, 2, 3]])\n assert 2 == candidate.([[1, 1.2, 4, 5.1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_255_combinations_colors", "language": "elixir", "prompt": "# Write a function that takes in a list and length n, and generates all combinations (with repetition) of the elements of the list and returns a list with a list for each combination.\n\n\ndefmodule HumanEval do\n def combinations_colors(l, ,, , n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_255_combinations_colors.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"combinations_colors\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :combinations_colors end)\n candidate = fn args -> apply(HumanEval, combinations_colors, args) end\n assert [[\"Red\"], [\"Green\"], [\"Blue\"]] == candidate.([[\"Red\", \"Green\", \"Blue\"], 1])\n assert [[\"Red\", \"Red\"], [\"Red\", \"Green\"], [\"Red\", \"Blue\"], [\"Green\", \"Green\"], [\"Green\", \"Blue\"], [\"Blue\", \"Blue\"]] == candidate.([[\"Red\", \"Green\", \"Blue\"], 2])\n assert [[\"Red\", \"Red\", \"Red\"], [\"Red\", \"Red\", \"Green\"], [\"Red\", \"Red\", \"Blue\"], [\"Red\", \"Green\", \"Green\"], [\"Red\", \"Green\", \"Blue\"], [\"Red\", \"Blue\", \"Blue\"], [\"Green\", \"Green\", \"Green\"], [\"Green\", \"Green\", \"Blue\"], [\"Green\", \"Blue\", \"Blue\"], [\"Blue\", \"Blue\", \"Blue\"]] == candidate.([[\"Red\", \"Green\", \"Blue\"], 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_256_count_Primes_nums", "language": "elixir", "prompt": "# Write an elixirthon function that takes in a non-negative number and returns the number of prime numbers less than the given non-negative number.\n\n\ndefmodule HumanEval do\n def count_Primes_nums(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_256_count_Primes_nums.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_Primes_nums\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_Primes_nums end)\n candidate = fn args -> apply(HumanEval, count_Primes_nums, args) end\n assert 2 == candidate.([5])\n assert 4 == candidate.([10])\n assert 25 == candidate.([100])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_257_swap_numbers", "language": "elixir", "prompt": "# Write a function that takes in two numbers and returns a list with the second number and then the first number.\n\n\ndefmodule HumanEval do\n def swap_numbers(a, ,, , b) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_257_swap_numbers.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"swap_numbers\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :swap_numbers end)\n candidate = fn args -> apply(HumanEval, swap_numbers, args) end\n assert [20, 10] == candidate.([10, 20])\n assert [17, 15] == candidate.([15, 17])\n assert [200, 100] == candidate.([100, 200])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_259_maximize_elements", "language": "elixir", "prompt": "# Write a function to maximize the given two lists.\n\n\ndefmodule HumanEval do\n def maximize_elements(t, e, s, t, _, t, u, p, 1, ,, , t, e, s, t, _, t, u, p, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_259_maximize_elements.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"maximize_elements\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :maximize_elements end)\n candidate = fn args -> apply(HumanEval, maximize_elements, args) end\n assert [[6, 7], [4, 9], [2, 9], [7, 10]] == candidate.([[[1, 3], [4, 5], [2, 9], [1, 10]], [[6, 7], [3, 9], [1, 1], [7, 3]]])\n assert [[7, 8], [5, 10], [3, 10], [8, 11]] == candidate.([[[2, 4], [5, 6], [3, 10], [2, 11]], [[7, 8], [4, 10], [2, 2], [8, 4]]])\n assert [[8, 9], [6, 11], [4, 11], [9, 12]] == candidate.([[[3, 5], [6, 7], [4, 11], [3, 12]], [[8, 9], [5, 11], [3, 3], [9, 5]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_260_newman_prime", "language": "elixir", "prompt": "# Write a function to find the nth newman\u2013shanks\u2013williams prime number.\n\n\ndefmodule HumanEval do\n def newman_prime(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_260_newman_prime.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"newman_prime\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :newman_prime end)\n candidate = fn args -> apply(HumanEval, newman_prime, args) end\n assert 7 == candidate.([3])\n assert 17 == candidate.([4])\n assert 41 == candidate.([5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_261_division_elements", "language": "elixir", "prompt": "# Write a function that takes in two tuples and performs mathematical division operation element-wise across the given tuples.\n\n\ndefmodule HumanEval do\n def division_elements(t, e, s, t, _, t, u, p, 1, ,, , t, e, s, t, _, t, u, p, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_261_division_elements.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"division_elements\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :division_elements end)\n candidate = fn args -> apply(HumanEval, division_elements, args) end\n assert {2, 2, 2, 3} == candidate.([{10, 4, 6, 9}, {5, 2, 3, 3}])\n assert {2, 2, 2, 4} == candidate.([{12, 6, 8, 16}, {6, 3, 4, 4}])\n assert {4, 2, 6, 2} == candidate.([{20, 14, 36, 18}, {5, 7, 6, 9}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_262_split_two_parts", "language": "elixir", "prompt": "# Write a function that takes in a list and an integer L and splits the given list into two parts where the length of the first part of the list is L, and returns the resulting lists in a tuple.\n\n\ndefmodule HumanEval do\n def split_two_parts(l, i, s, t, 1, ,, , L) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_262_split_two_parts.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"split_two_parts\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :split_two_parts end)\n candidate = fn args -> apply(HumanEval, split_two_parts, args) end\n assert {[1, 1, 2], [3, 4, 4, 5, 1]} == candidate.([[1, 1, 2, 3, 4, 4, 5, 1], 3])\n assert {[\"a\", \"b\"], [\"c\", \"d\"]} == candidate.([[\"a\", \"b\", \"c\", \"d\"], 2])\n assert {[\"p\", \"y\", \"t\", \"h\"], [\"o\", \"n\"]} == candidate.([[\"p\", \"y\", \"t\", \"h\", \"o\", \"n\"], 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_264_dog_age", "language": "elixir", "prompt": "# Write a function to calculate a dog's age in dog's years.\n\n\ndefmodule HumanEval do\n def dog_age(h, _, a, g, e) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_264_dog_age.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"dog_age\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :dog_age end)\n candidate = fn args -> apply(HumanEval, dog_age, args) end\n assert 61 == candidate.([12])\n assert 73 == candidate.([15])\n assert 109 == candidate.([24])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_265_list_split", "language": "elixir", "prompt": "# Write a function that takes in a list and an integer n and splits a list for every nth element, returning a list of the resulting lists.\n\n\ndefmodule HumanEval do\n def list_split(S, ,, , s, t, e, p) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_265_list_split.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"list_split\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :list_split end)\n candidate = fn args -> apply(HumanEval, list_split, args) end\n assert [[\"a\", \"d\", \"g\", \"j\", \"m\"], [\"b\", \"e\", \"h\", \"k\", \"n\"], [\"c\", \"f\", \"i\", \"l\"]] == candidate.([[\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\"], 3])\n assert [[1, 4, 7, 10, 13], [2, 5, 8, 11, 14], [3, 6, 9, 12]] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], 3])\n assert [[\"python\", \"C\", \"DBMS\"], [\"java\", \"C++\", \"SQL\"]] == candidate.([[\"python\", \"java\", \"C\", \"C++\", \"DBMS\", \"SQL\"], 2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_266_lateralsurface_cube", "language": "elixir", "prompt": "# Write a function to find the lateral surface area of a cube given its side length.\n\n\ndefmodule HumanEval do\n def lateralsurface_cube(l) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_266_lateralsurface_cube.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"lateralsurface_cube\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :lateralsurface_cube end)\n candidate = fn args -> apply(HumanEval, lateralsurface_cube, args) end\n assert 100 == candidate.([5])\n assert 324 == candidate.([9])\n assert 400 == candidate.([10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_267_square_Sum", "language": "elixir", "prompt": "# Write an elixirthon function that takes in an integer n and returns the sum of the squares of the first n odd natural numbers.\n\n\ndefmodule HumanEval do\n def square_Sum(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_267_square_Sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"square_Sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :square_Sum end)\n candidate = fn args -> apply(HumanEval, square_Sum, args) end\n assert 10 == candidate.([2])\n assert 35 == candidate.([3])\n assert 84 == candidate.([4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_268_find_star_num", "language": "elixir", "prompt": "# Write a function to find the n'th star number.\n\n\ndefmodule HumanEval do\n def find_star_num(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_268_find_star_num.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_star_num\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_star_num end)\n candidate = fn args -> apply(HumanEval, find_star_num, args) end\n assert 37 == candidate.([3])\n assert 73 == candidate.([4])\n assert 121 == candidate.([5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_269_ascii_value", "language": "elixir", "prompt": "# Write a function to find the ascii value of a character.\n\n\ndefmodule HumanEval do\n def ascii_value(k) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_269_ascii_value.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"ascii_value\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :ascii_value end)\n candidate = fn args -> apply(HumanEval, ascii_value, args) end\n assert 65 == candidate.([\"A\"])\n assert 82 == candidate.([\"R\"])\n assert 83 == candidate.([\"S\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_270_sum_even_and_even_index", "language": "elixir", "prompt": "# Write an elixirthon function to find the sum of even numbers at even positions of a list.\n\n\ndefmodule HumanEval do\n def sum_even_and_even_index(a, r, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_270_sum_even_and_even_index.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_even_and_even_index\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_even_and_even_index end)\n candidate = fn args -> apply(HumanEval, sum_even_and_even_index, args) end\n assert 30 == candidate.([[5, 6, 12, 1, 18, 8]])\n assert 26 == candidate.([[3, 20, 17, 9, 2, 10, 18, 13, 6, 18]])\n assert 12 == candidate.([[5, 6, 12, 1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_271_even_Power_Sum", "language": "elixir", "prompt": "# Write an elixirthon function that takes in an integer n and finds the sum of the first n even natural numbers that are raised to the fifth power.\n\n\ndefmodule HumanEval do\n def even_Power_Sum(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_271_even_Power_Sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"even_Power_Sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :even_Power_Sum end)\n candidate = fn args -> apply(HumanEval, even_Power_Sum, args) end\n assert 1056 == candidate.([2])\n assert 8832 == candidate.([3])\n assert 32 == candidate.([1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_272_rear_extract", "language": "elixir", "prompt": "# Write a function that takes in a list of tuples and returns a list containing the rear element of each tuple.\n\n\ndefmodule HumanEval do\n def rear_extract(t, e, s, t, _, l, i, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_272_rear_extract.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"rear_extract\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :rear_extract end)\n candidate = fn args -> apply(HumanEval, rear_extract, args) end\n assert [21, 20, 19] == candidate.([[{1, \"Rash\", 21}, {2, \"Varsha\", 20}, {3, \"Kil\", 19}]])\n assert [36, 25, 45] == candidate.([[{1, \"Sai\", 36}, {2, \"Ayesha\", 25}, {3, \"Salman\", 45}]])\n assert [14, 36, 56] == candidate.([[{1, \"Sudeep\", 14}, {2, \"Vandana\", 36}, {3, \"Dawood\", 56}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_273_substract_elements", "language": "elixir", "prompt": "# Write a function that takes in two tuples and subtracts the elements of the first tuple by the elements of the second tuple with the same index.\n\n\ndefmodule HumanEval do\n def substract_elements(t, e, s, t, _, t, u, p, 1, ,, , t, e, s, t, _, t, u, p, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_273_substract_elements.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"substract_elements\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :substract_elements end)\n candidate = fn args -> apply(HumanEval, substract_elements, args) end\n assert {8, -1, -13} == candidate.([{10, 4, 5}, {2, 5, 18}])\n assert {-13, -43, -13} == candidate.([{11, 2, 3}, {24, 45, 16}])\n assert {-3, 7, -3} == candidate.([{7, 18, 9}, {10, 11, 12}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_274_even_binomial_Coeff_Sum", "language": "elixir", "prompt": "# Write an elixirthon function that takes in a positive integer n and finds the sum of even index binomial coefficients.\n\n\ndefmodule HumanEval do\n def even_binomial_Coeff_Sum(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_274_even_binomial_Coeff_Sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"even_binomial_Coeff_Sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :even_binomial_Coeff_Sum end)\n candidate = fn args -> apply(HumanEval, even_binomial_Coeff_Sum, args) end\n assert 8 == candidate.([4])\n assert 32 == candidate.([6])\n assert 2 == candidate.([2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_277_dict_filter", "language": "elixir", "prompt": "# Write a function that takes in a map and integer n and filters the map to only include entries with values greater than or equal to n.\n\n\ndefmodule HumanEval do\n def dict_filter(d, i, c, t, ,, , n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_277_dict_filter.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"dict_filter\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :dict_filter end)\n candidate = fn args -> apply(HumanEval, dict_filter, args) end\n assert %{\"Cierra Vega\" => 175, \"Alden Cantrell\" => 180, \"Pierre Cox\" => 190} == candidate.([%{\"Cierra Vega\" => 175, \"Alden Cantrell\" => 180, \"Kierra Gentry\" => 165, \"Pierre Cox\" => 190}, 170])\n assert %{\"Alden Cantrell\" => 180, \"Pierre Cox\" => 190} == candidate.([%{\"Cierra Vega\" => 175, \"Alden Cantrell\" => 180, \"Kierra Gentry\" => 165, \"Pierre Cox\" => 190}, 180])\n assert %{\"Pierre Cox\" => 190} == candidate.([%{\"Cierra Vega\" => 175, \"Alden Cantrell\" => 180, \"Kierra Gentry\" => 165, \"Pierre Cox\" => 190}, 190])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_278_count_first_elements", "language": "elixir", "prompt": "# Write a function to find the number of elements that occurs before the list element in the given tuple.\n\n\ndefmodule HumanEval do\n def count_first_elements(t, e, s, t, _, t, u, p) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_278_count_first_elements.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_first_elements\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_first_elements end)\n candidate = fn args -> apply(HumanEval, count_first_elements, args) end\n assert 3 == candidate.([[1, 5, 7, {4, 6}, 10]])\n assert 2 == candidate.([[2, 9, {5, 7}, 11]])\n assert 4 == candidate.([[11, 15, 5, 8, {2, 3}, 8]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_279_is_num_decagonal", "language": "elixir", "prompt": "# Write a function to find the nth decagonal number.\n\n\ndefmodule HumanEval do\n def is_num_decagonal(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_279_is_num_decagonal.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_num_decagonal\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_num_decagonal end)\n candidate = fn args -> apply(HumanEval, is_num_decagonal, args) end\n assert 27 == candidate.([3])\n assert 175 == candidate.([7])\n assert 370 == candidate.([10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_280_sequential_search", "language": "elixir", "prompt": "# Write a function that takes in a list and element and returns a tuple containing a boolean that indicates if the element is in the list and the index position of the element (or -1 if the element is not found).\n\n\ndefmodule HumanEval do\n def sequential_search(d, l, i, s, t, ,, , i, t, e, m) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_280_sequential_search.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sequential_search\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sequential_search end)\n candidate = fn args -> apply(HumanEval, sequential_search, args) end\n assert {true, 3} == candidate.([[11, 23, 58, 31, 56, 77, 43, 12, 65, 19], 31])\n assert {true, 7} == candidate.([[12, 32, 45, 62, 35, 47, 44, 61], 61])\n assert {true, 6} == candidate.([[9, 10, 17, 19, 22, 39, 48, 56], 48])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_281_all_unique", "language": "elixir", "prompt": "# Write an elixirthon function to check if the elements of a given list are unique or not.\n\n\ndefmodule HumanEval do\n def all_unique(t, e, s, t, _, l, i, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_281_all_unique.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"all_unique\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :all_unique end)\n candidate = fn args -> apply(HumanEval, all_unique, args) end\n assert true == candidate.([[1, 2, 3]])\n assert false == candidate.([[1, 2, 1, 2]])\n assert true == candidate.([[1, 2, 3, 4, 5]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_282_sub_list", "language": "elixir", "prompt": "# Write a function to subtract two lists element-wise.\n\n\ndefmodule HumanEval do\n def sub_list(n, u, m, s, 1, ,, , n, u, m, s, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_282_sub_list.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sub_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sub_list end)\n candidate = fn args -> apply(HumanEval, sub_list, args) end\n assert [-3, -3, -3] == candidate.([[1, 2, 3], [4, 5, 6]])\n assert [-2, -2] == candidate.([[1, 2], [3, 4]])\n assert [40, 50] == candidate.([[90, 120], [50, 70]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_283_validate", "language": "elixir", "prompt": "# Write an elixirthon function takes in an integer and check whether the frequency of each digit in the integer is less than or equal to the digit itself.\n\n\ndefmodule HumanEval do\n def validate(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_283_validate.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"validate\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :validate end)\n candidate = fn args -> apply(HumanEval, validate, args) end\n assert true == candidate.([1234])\n assert false == candidate.([51241])\n assert true == candidate.([321])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_284_check_element", "language": "elixir", "prompt": "# Write a function that takes in a list and element and checks whether all items in the list are equal to the given element.\n\n\ndefmodule HumanEval do\n def check_element(l, i, s, t, ,, , e, l, e, m, e, n, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_284_check_element.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_element\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_element end)\n candidate = fn args -> apply(HumanEval, check_element, args) end\n assert false == candidate.([[\"green\", \"orange\", \"black\", \"white\"], \"blue\"])\n assert false == candidate.([[1, 2, 3, 4], 7])\n assert true == candidate.([[\"green\", \"green\", \"green\", \"green\"], \"green\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_285_text_match_two_three", "language": "elixir", "prompt": "# Write a function that checks whether a string contains the 'a' character followed by two or three 'b' characters.\n\n\ndefmodule HumanEval do\n def text_match_two_three(t, e, x, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_285_text_match_two_three.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"text_match_two_three\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :text_match_two_three end)\n candidate = fn args -> apply(HumanEval, text_match_two_three, args) end\n assert false == candidate.([\"ac\"])\n assert false == candidate.([\"dc\"])\n assert true == candidate.([\"abbbba\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_286_max_sub_array_sum_repeated", "language": "elixir", "prompt": "# Write a function to find the largest sum of a contiguous list in the modified list which is formed by repeating the given list k times.\n\n\ndefmodule HumanEval do\n def max_sub_array_sum_repeated(a, ,, , n, ,, , k) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_286_max_sub_array_sum_repeated.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_sub_array_sum_repeated\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_sub_array_sum_repeated end)\n candidate = fn args -> apply(HumanEval, max_sub_array_sum_repeated, args) end\n assert 30 == candidate.([[10, 20, -30, -1], 4, 3])\n assert 59 == candidate.([[-1, 10, 20], 3, 2])\n assert -1 == candidate.([[-1, -2, -3], 3, 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_287_square_Sum", "language": "elixir", "prompt": "# Write an elixirthon function takes in an integer n and returns the sum of squares of first n even natural numbers.\n\n\ndefmodule HumanEval do\n def square_Sum(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_287_square_Sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"square_Sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :square_Sum end)\n candidate = fn args -> apply(HumanEval, square_Sum, args) end\n assert 20 == candidate.([2])\n assert 56 == candidate.([3])\n assert 120 == candidate.([4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_290_max_length", "language": "elixir", "prompt": "# Write a function to find the list of maximum length in a list of lists.\n\n\ndefmodule HumanEval do\n def max_length(l, i, s, t, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_290_max_length.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_length\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_length end)\n candidate = fn args -> apply(HumanEval, max_length, args) end\n assert {3, [13, 15, 17]} == candidate.([[[0], [1, 3], [5, 7], [9, 11], [13, 15, 17]]])\n assert {4, [10, 12, 14, 15]} == candidate.([[[1], [5, 7], [10, 12, 14, 15]]])\n assert {3, [15, 20, 25]} == candidate.([[[5], [15, 20, 25]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_291_count_no_of_ways", "language": "elixir", "prompt": "# Write a function to find out the number of ways of painting the fence such that at most 2 adjacent posts have the same color for the given fence with n posts and k colors.\n\n\ndefmodule HumanEval do\n def count_no_of_ways(n, ,, , k) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_291_count_no_of_ways.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_no_of_ways\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_no_of_ways end)\n candidate = fn args -> apply(HumanEval, count_no_of_ways, args) end\n assert 16 == candidate.([2, 4])\n assert 6 == candidate.([3, 2])\n assert 228 == candidate.([4, 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_292_find", "language": "elixir", "prompt": "# Write an elixirthon function to find quotient of two numbers (rounded down to the nearest integer).\n\n\ndefmodule HumanEval do\n def find(n, ,, , m) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_292_find.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find end)\n candidate = fn args -> apply(HumanEval, find, args) end\n assert 3 == candidate.([10, 3])\n assert 2 == candidate.([4, 2])\n assert 4 == candidate.([20, 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_293_otherside_rightangle", "language": "elixir", "prompt": "# Write a function to find the third side of a right angled triangle.\n\n\ndefmodule HumanEval do\n def otherside_rightangle(w, ,, , h) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_293_otherside_rightangle.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"otherside_rightangle\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :otherside_rightangle end)\n candidate = fn args -> apply(HumanEval, otherside_rightangle, args) end\n assert 10.63014581273465 == candidate.([7, 8])\n assert 5 == candidate.([3, 4])\n assert 16.55294535724685 == candidate.([7, 15])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_294_max_val", "language": "elixir", "prompt": "# Write a function to find the maximum value in a given heterogeneous list.\n\n\ndefmodule HumanEval do\n def max_val(l, i, s, t, v, a, l) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_294_max_val.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_val\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_val end)\n candidate = fn args -> apply(HumanEval, max_val, args) end\n assert 5 == candidate.([[\"Python\", 3, 2, 4, 5, \"version\"]])\n assert 25 == candidate.([[\"Python\", 15, 20, 25]])\n assert 50 == candidate.([[\"Python\", 30, 20, 40, 50, \"version\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_295_sum_div", "language": "elixir", "prompt": "# Write a function to return the sum of all divisors of a number.\n\n\ndefmodule HumanEval do\n def sum_div(n, u, m, b, e, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_295_sum_div.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_div\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_div end)\n candidate = fn args -> apply(HumanEval, sum_div, args) end\n assert 7 == candidate.([8])\n assert 16 == candidate.([12])\n assert 1 == candidate.([7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_296_get_Inv_Count", "language": "elixir", "prompt": "# Write an elixirthon function to count inversions in a list.\n\n\ndefmodule HumanEval do\n def get_Inv_Count(a, r, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_296_get_Inv_Count.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"get_Inv_Count\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :get_Inv_Count end)\n candidate = fn args -> apply(HumanEval, get_Inv_Count, args) end\n assert 5 == candidate.([[1, 20, 6, 4, 5]])\n assert 1 == candidate.([[1, 2, 1]])\n assert 3 == candidate.([[1, 2, 5, 6, 1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_297_flatten_list", "language": "elixir", "prompt": "# Write a function to flatten a given nested list structure.\n\n\ndefmodule HumanEval do\n def flatten_list(l, i, s, t, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_297_flatten_list.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"flatten_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :flatten_list end)\n candidate = fn args -> apply(HumanEval, flatten_list, args) end\n assert [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120] == candidate.([[0, 10, [20, 30], 40, 50, [60, 70, 80], [90, 100, 110, 120]]])\n assert [10, 20, 40, 30, 56, 25, 10, 20, 33, 40] == candidate.([[[10, 20], [40], [30, 56, 25], [10, 20], [33], [40]]])\n assert [1, 2, 3, 4, 5, 6, 10, 11, 12, 7, 8, 9] == candidate.([[[1, 2, 3], [4, 5, 6], [10, 11, 12], [7, 8, 9]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_299_max_aggregate", "language": "elixir", "prompt": "# Write a function to calculate the maximum aggregate from the list of tuples.\n\n\ndefmodule HumanEval do\n def max_aggregate(s, t, d, a, t, a) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_299_max_aggregate.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_aggregate\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_aggregate end)\n candidate = fn args -> apply(HumanEval, max_aggregate, args) end\n assert {\"Juan Whelan\", 212} == candidate.([[{\"Juan Whelan\", 90}, {\"Sabah Colley\", 88}, {\"Peter Nichols\", 7}, {\"Juan Whelan\", 122}, {\"Sabah Colley\", 84}]])\n assert {\"Juan Whelan\", 72} == candidate.([[{\"Juan Whelan\", 50}, {\"Sabah Colley\", 48}, {\"Peter Nichols\", 37}, {\"Juan Whelan\", 22}, {\"Sabah Colley\", 14}]])\n assert {\"Sabah Colley\", 70} == candidate.([[{\"Juan Whelan\", 10}, {\"Sabah Colley\", 20}, {\"Peter Nichols\", 30}, {\"Juan Whelan\", 40}, {\"Sabah Colley\", 50}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_304_find_Element", "language": "elixir", "prompt": "# Write an elixirthon function to find element at a given index after number of rotations.\n\n\ndefmodule HumanEval do\n def find_Element(a, r, r, ,, , r, a, n, g, e, s, ,, , r, o, t, a, t, i, o, n, s, ,, , i, n, d, e, x) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_304_find_Element.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_Element\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_Element end)\n candidate = fn args -> apply(HumanEval, find_Element, args) end\n assert 3 == candidate.([[1, 2, 3, 4, 5], [[0, 2], [0, 3]], 2, 1])\n assert 3 == candidate.([[1, 2, 3, 4], [[0, 1], [0, 2]], 1, 2])\n assert 1 == candidate.([[1, 2, 3, 4, 5, 6], [[0, 1], [0, 2]], 1, 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_305_start_withp", "language": "elixir", "prompt": "# Write a function to return two words from a list of words starting with letter 'p'.\n\n\ndefmodule HumanEval do\n def start_withp(w, o, r, d, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_305_start_withp.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"start_withp\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :start_withp end)\n candidate = fn args -> apply(HumanEval, start_withp, args) end\n assert {\"Python\", \"PHP\"} == candidate.([[\"Python PHP\", \"Java JavaScript\", \"c c++\"]])\n assert {\"Python\", \"Programming\"} == candidate.([[\"Python Programming\", \"Java Programming\"]])\n assert {\"Pqrst\", \"Pqr\"} == candidate.([[\"Pqrst Pqr\", \"qrstuv\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_306_max_sum_increasing_subseq", "language": "elixir", "prompt": "# Write a function to find the maximum sum of increasing subsequence from prefix until ith index and also including a given kth element which is after i, i.e., k > i .\n\n\ndefmodule HumanEval do\n def max_sum_increasing_subseq(a, ,, , n, ,, , i, n, d, e, x, ,, , k) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_306_max_sum_increasing_subseq.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_sum_increasing_subseq\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_sum_increasing_subseq end)\n candidate = fn args -> apply(HumanEval, max_sum_increasing_subseq, args) end\n assert 11 == candidate.([[1, 101, 2, 3, 100, 4, 5], 7, 4, 6])\n assert 7 == candidate.([[1, 101, 2, 3, 100, 4, 5], 7, 2, 5])\n assert 71 == candidate.([[11, 15, 19, 21, 26, 28, 31], 7, 2, 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_308_large_product", "language": "elixir", "prompt": "# Write a function to find the specified number of largest products from two given lists, selecting one factor from each list.\n\n\ndefmodule HumanEval do\n def large_product(n, u, m, s, 1, ,, , n, u, m, s, 2, ,, , N) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_308_large_product.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"large_product\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :large_product end)\n candidate = fn args -> apply(HumanEval, large_product, args) end\n assert [60, 54, 50] == candidate.([[1, 2, 3, 4, 5, 6], [3, 6, 8, 9, 10, 6], 3])\n assert [60, 54, 50, 48] == candidate.([[1, 2, 3, 4, 5, 6], [3, 6, 8, 9, 10, 6], 4])\n assert [60, 54, 50, 48, 45] == candidate.([[1, 2, 3, 4, 5, 6], [3, 6, 8, 9, 10, 6], 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_309_maximum", "language": "elixir", "prompt": "# Write an elixirthon function to find the maximum of two numbers.\n\n\ndefmodule HumanEval do\n def maximum(a, ,, , b) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_309_maximum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"maximum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :maximum end)\n candidate = fn args -> apply(HumanEval, maximum, args) end\n assert 10 == candidate.([5, 10])\n assert -1 == candidate.([-1, -2])\n assert 9 == candidate.([9, 7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_310_string_to_tuple", "language": "elixir", "prompt": "# Write a function to convert a given string to a list of characters.\n\n\ndefmodule HumanEval do\n def string_to_tuple(s, t, r, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_310_string_to_tuple.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"string_to_tuple\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :string_to_tuple end)\n candidate = fn args -> apply(HumanEval, string_to_tuple, args) end\n assert [\"p\", \"y\", \"t\", \"h\", \"o\", \"n\", \"3\", \".\", \"0\"] == candidate.([\"python 3.0\"])\n assert [\"i\", \"t\", \"e\", \"m\", \"1\"] == candidate.([\"item1\"])\n assert [\"1\", \"5\", \".\", \"1\", \"0\"] == candidate.([\"15.10\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_388_highest_Power_of_2", "language": "elixir", "prompt": "# Write an elixirthon function to find the highest power of 2 that is less than or equal to n.\n\n\ndefmodule HumanEval do\n def highest_Power_of_2(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_388_highest_Power_of_2.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"highest_Power_of_2\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :highest_Power_of_2 end)\n candidate = fn args -> apply(HumanEval, highest_Power_of_2, args) end\n assert 8 == candidate.([10])\n assert 16 == candidate.([19])\n assert 32 == candidate.([32])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_389_find_lucas", "language": "elixir", "prompt": "# Write a function to find the n'th lucas number.\n\n\ndefmodule HumanEval do\n def find_lucas(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_389_find_lucas.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_lucas\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_lucas end)\n candidate = fn args -> apply(HumanEval, find_lucas, args) end\n assert 76 == candidate.([9])\n assert 7 == candidate.([4])\n assert 4 == candidate.([3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_390_add_string", "language": "elixir", "prompt": "# Write a function to apply a given format string to all of the elements in a list.\n\n\ndefmodule HumanEval do\n def add_string(l, i, s, t, _, ,, , s, t, r, i, n, g) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_390_add_string.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"add_string\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :add_string end)\n candidate = fn args -> apply(HumanEval, add_string, args) end\n assert [\"temp1\", \"temp2\", \"temp3\", \"temp4\"] == candidate.([[1, 2, 3, 4], \"temp{0}\"])\n assert [\"pythona\", \"pythonb\", \"pythonc\", \"pythond\"] == candidate.([[\"a\", \"b\", \"c\", \"d\"], \"python{0}\"])\n assert [\"string5\", \"string6\", \"string7\", \"string8\"] == candidate.([[5, 6, 7, 8], \"string{0}\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_391_convert_list_dictionary", "language": "elixir", "prompt": "# Write a function to convert more than one list to nested map.\n\n\ndefmodule HumanEval do\n def convert_list_dictionary(l, 1, ,, , l, 2, ,, , l, 3) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_391_convert_list_dictionary.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"convert_list_dictionary\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :convert_list_dictionary end)\n candidate = fn args -> apply(HumanEval, convert_list_dictionary, args) end\n assert [%{\"S001\" => %{\"Adina Park\" => 85}}, %{\"S002\" => %{\"Leyton Marsh\" => 98}}, %{\"S003\" => %{\"Duncan Boyle\" => 89}}, %{\"S004\" => %{\"Saim Richards\" => 92}}] == candidate.([[\"S001\", \"S002\", \"S003\", \"S004\"], [\"Adina Park\", \"Leyton Marsh\", \"Duncan Boyle\", \"Saim Richards\"], [85, 98, 89, 92]])\n assert [%{\"abc\" => %{\"python\" => 100}}, %{\"def\" => %{\"program\" => 200}}, %{\"ghi\" => %{\"language\" => 300}}, %{\"jkl\" => %{\"programs\" => 400}}] == candidate.([[\"abc\", \"def\", \"ghi\", \"jkl\"], [\"python\", \"program\", \"language\", \"programs\"], [100, 200, 300, 400]])\n assert [%{\"A1\" => %{\"java\" => 10}}, %{\"A2\" => %{\"C\" => 20}}, %{\"A3\" => %{\"C++\" => 30}}, %{\"A4\" => %{\"DBMS\" => 40}}] == candidate.([[\"A1\", \"A2\", \"A3\", \"A4\"], [\"java\", \"C\", \"C++\", \"DBMS\"], [10, 20, 30, 40]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_392_get_max_sum", "language": "elixir", "prompt": "# Write a function to find the maximum sum possible by using the given equation f(n) = max( (f(n/2) + f(n/3) + f(n/4) + f(n/5)), n).\n\n\ndefmodule HumanEval do\n def get_max_sum(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_392_get_max_sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"get_max_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :get_max_sum end)\n candidate = fn args -> apply(HumanEval, get_max_sum, args) end\n assert 106 == candidate.([60])\n assert 12 == candidate.([10])\n assert 2 == candidate.([2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_393_max_length_list", "language": "elixir", "prompt": "# Write a function to find the list with maximum length.\n\n\ndefmodule HumanEval do\n def max_length_list(i, n, p, u, t, _, l, i, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_393_max_length_list.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_length_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_length_list end)\n candidate = fn args -> apply(HumanEval, max_length_list, args) end\n assert {3, [13, 15, 17]} == candidate.([[[0], [1, 3], [5, 7], [9, 11], [13, 15, 17]]])\n assert {5, [1, 2, 3, 4, 5]} == candidate.([[[1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3], [1, 2], [1]]])\n assert {4, [6, 7, 8, 9]} == candidate.([[[3, 4, 5], [6, 7, 8, 9], [10, 11, 12]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_394_check_distinct", "language": "elixir", "prompt": "# Write a function to check if given list contains no duplicates.\n\n\ndefmodule HumanEval do\n def check_distinct(t, e, s, t, _, t, u, p) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_394_check_distinct.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_distinct\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_distinct end)\n candidate = fn args -> apply(HumanEval, check_distinct, args) end\n assert false == candidate.([[1, 4, 5, 6, 1, 4]])\n assert true == candidate.([[1, 4, 5, 6]])\n assert true == candidate.([[2, 3, 4, 5, 6]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_395_first_non_repeating_character", "language": "elixir", "prompt": "# Write an elixirthon function to find the first non-repeated character in a given string.\n\n\ndefmodule HumanEval do\n def first_non_repeating_character(s, t, r, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_395_first_non_repeating_character.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"first_non_repeating_character\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :first_non_repeating_character end)\n candidate = fn args -> apply(HumanEval, first_non_repeating_character, args) end\n assert nil == candidate.([\"abcabc\"])\n assert \"a\" == candidate.([\"abc\"])\n assert \"c\" == candidate.([\"ababc\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_396_check_char", "language": "elixir", "prompt": "# Write a function to check whether the given string starts and ends with the same character or not.\n\n\ndefmodule HumanEval do\n def check_char(s, t, r, i, n, g) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_396_check_char.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_char\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_char end)\n candidate = fn args -> apply(HumanEval, check_char, args) end\n assert \"Valid\" == candidate.([\"abba\"])\n assert \"Valid\" == candidate.([\"a\"])\n assert \"Invalid\" == candidate.([\"abcd\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_397_median_numbers", "language": "elixir", "prompt": "# Write a function to find the median of three numbers.\n\n\ndefmodule HumanEval do\n def median_numbers(a, ,, , b, ,, , c) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_397_median_numbers.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"median_numbers\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :median_numbers end)\n candidate = fn args -> apply(HumanEval, median_numbers, args) end\n assert 55.0 == candidate.([25, 55, 65])\n assert 20.0 == candidate.([20, 10, 30])\n assert 45.0 == candidate.([15, 45, 75])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_398_sum_of_digits", "language": "elixir", "prompt": "# Write a function to compute the sum of digits of each number of a given list.\n\n\ndefmodule HumanEval do\n def sum_of_digits(n, u, m, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_398_sum_of_digits.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_of_digits\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_of_digits end)\n candidate = fn args -> apply(HumanEval, sum_of_digits, args) end\n assert 14 == candidate.([[10, 2, 56]])\n assert 19 == candidate.([[[10, 20, 4, 5, \"b\", 70, \"a\"]]])\n assert 19 == candidate.([[10, 20, -4, 5, -70]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_399_bitwise_xor", "language": "elixir", "prompt": "# Write a function to perform the mathematical bitwise xor operation across the given tuples.\n\n\ndefmodule HumanEval do\n def bitwise_xor(t, e, s, t, _, t, u, p, 1, ,, , t, e, s, t, _, t, u, p, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_399_bitwise_xor.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"bitwise_xor\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :bitwise_xor end)\n candidate = fn args -> apply(HumanEval, bitwise_xor, args) end\n assert {15, 6, 5, 10} == candidate.([{10, 4, 6, 9}, {5, 2, 3, 3}])\n assert {13, 6, 3, 14} == candidate.([{11, 5, 7, 10}, {6, 3, 4, 4}])\n assert {11, 2, 13, 13} == candidate.([{12, 6, 8, 11}, {7, 4, 5, 6}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_3_is_not_prime", "language": "elixir", "prompt": "# Write an elixirthon function to identify non-prime numbers.\n\n\ndefmodule HumanEval do\n def is_not_prime(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_3_is_not_prime.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_not_prime\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_not_prime end)\n candidate = fn args -> apply(HumanEval, is_not_prime, args) end\n assert false == candidate.([2])\n assert true == candidate.([10])\n assert true == candidate.([35])\n assert false == candidate.([37])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_400_extract_freq", "language": "elixir", "prompt": "# Write a function to extract the number of unique tuples in the given list.\n\n\ndefmodule HumanEval do\n def extract_freq(t, e, s, t, _, l, i, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_400_extract_freq.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"extract_freq\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :extract_freq end)\n candidate = fn args -> apply(HumanEval, extract_freq, args) end\n assert 3 == candidate.([[{3, 4}, {1, 2}, {4, 3}, {5, 6}]])\n assert 4 == candidate.([[{4, 15}, {2, 3}, {5, 4}, {6, 7}]])\n assert 4 == candidate.([[{5, 16}, {2, 3}, {6, 5}, {6, 9}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_401_add_nested_tuples", "language": "elixir", "prompt": "# Write a function to perform index wise addition of list elements in the given two nested lists.\n\n\ndefmodule HumanEval do\n def add_nested_tuples(t, e, s, t, _, t, u, p, 1, ,, , t, e, s, t, _, t, u, p, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_401_add_nested_tuples.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"add_nested_tuples\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :add_nested_tuples end)\n candidate = fn args -> apply(HumanEval, add_nested_tuples, args) end\n assert [[7, 10], [7, 14], [3, 10], [8, 13]] == candidate.([[[1, 3], [4, 5], [2, 9], [1, 10]], [[6, 7], [3, 9], [1, 1], [7, 3]]])\n assert [[9, 12], [9, 16], [5, 12], [10, 15]] == candidate.([[[2, 4], [5, 6], [3, 10], [2, 11]], [[7, 8], [4, 10], [2, 2], [8, 4]]])\n assert [[11, 14], [11, 18], [7, 14], [12, 17]] == candidate.([[[3, 5], [6, 7], [4, 11], [3, 12]], [[8, 9], [5, 11], [3, 3], [9, 5]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_404_minimum", "language": "elixir", "prompt": "# Write an elixirthon function to find the minimum of two numbers.\n\n\ndefmodule HumanEval do\n def minimum(a, ,, , b) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_404_minimum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"minimum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :minimum end)\n candidate = fn args -> apply(HumanEval, minimum, args) end\n assert 1 == candidate.([1, 2])\n assert -5 == candidate.([-5, -4])\n assert 0 == candidate.([0, 0])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_405_check_tuplex", "language": "elixir", "prompt": "# Write a function to check whether an element exists within a tuple.\n\n\ndefmodule HumanEval do\n def check_tuplex(t, u, p, l, e, x, ,, , t, u, p, l, e, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_405_check_tuplex.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_tuplex\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_tuplex end)\n candidate = fn args -> apply(HumanEval, check_tuplex, args) end\n assert true == candidate.([[\"w\", 3, \"r\", \"e\", \"s\", \"o\", \"u\", \"r\", \"c\", \"e\"], \"r\"])\n assert false == candidate.([[\"w\", 3, \"r\", \"e\", \"s\", \"o\", \"u\", \"r\", \"c\", \"e\"], \"5\"])\n assert true == candidate.([[\"w\", 3, \"r\", \"e\", \"s\", \"o\", \"u\", \"r\", \"c\", \"e\"], 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_406_find_Parity", "language": "elixir", "prompt": "# Write an elixirthon function to find whether the parity of a given number is odd.\n\n\ndefmodule HumanEval do\n def find_Parity(x) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_406_find_Parity.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_Parity\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_Parity end)\n candidate = fn args -> apply(HumanEval, find_Parity, args) end\n assert false == candidate.([12])\n assert true == candidate.([7])\n assert false == candidate.([10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_407_rearrange_bigger", "language": "elixir", "prompt": "# Write a function to create the next bigger number by rearranging the digits of a given number.\n\n\ndefmodule HumanEval do\n def rearrange_bigger(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_407_rearrange_bigger.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"rearrange_bigger\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :rearrange_bigger end)\n candidate = fn args -> apply(HumanEval, rearrange_bigger, args) end\n assert 21 == candidate.([12])\n assert false == candidate.([10])\n assert 120 == candidate.([102])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_408_k_smallest_pairs", "language": "elixir", "prompt": "# Write a function to find k number of smallest pairs which consist of one element from the first list and one element from the second list.\n\n\ndefmodule HumanEval do\n def k_smallest_pairs(n, u, m, s, 1, ,, , n, u, m, s, 2, ,, , k) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_408_k_smallest_pairs.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"k_smallest_pairs\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :k_smallest_pairs end)\n candidate = fn args -> apply(HumanEval, k_smallest_pairs, args) end\n assert [[1, 2], [1, 4]] == candidate.([[1, 3, 7], [2, 4, 6], 2])\n assert [[1, 2]] == candidate.([[1, 3, 7], [2, 4, 6], 1])\n assert [[1, 2], [1, 4], [3, 2], [1, 6], [3, 4], [3, 6], [7, 2]] == candidate.([[1, 3, 7], [2, 4, 6], 7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_409_min_product_tuple", "language": "elixir", "prompt": "# Write a function to find the minimum product from the pairs of tuples within a given list.\n\n\ndefmodule HumanEval do\n def min_product_tuple(l, i, s, t, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_409_min_product_tuple.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"min_product_tuple\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :min_product_tuple end)\n candidate = fn args -> apply(HumanEval, min_product_tuple, args) end\n assert 8 == candidate.([[{2, 7}, {2, 6}, {1, 8}, {4, 9}]])\n assert 30 == candidate.([[{10, 20}, {15, 2}, {5, 10}]])\n assert 100 == candidate.([[{11, 44}, {10, 15}, {20, 5}, {12, 9}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_410_min_val", "language": "elixir", "prompt": "# Write a function to find the minimum value in a given heterogeneous list.\n\n\ndefmodule HumanEval do\n def min_val(l, i, s, t, v, a, l) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_410_min_val.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"min_val\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :min_val end)\n candidate = fn args -> apply(HumanEval, min_val, args) end\n assert 2 == candidate.([[\"Python\", 3, 2, 4, 5, \"version\"]])\n assert 15 == candidate.([[\"Python\", 15, 20, 25]])\n assert 20 == candidate.([[\"Python\", 30, 20, 40, 50, \"version\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_411_snake_to_camel", "language": "elixir", "prompt": "# Write a function to convert the given snake case string to camel case string.\n\n\ndefmodule HumanEval do\n def snake_to_camel(w, o, r, d) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_411_snake_to_camel.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"snake_to_camel\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :snake_to_camel end)\n candidate = fn args -> apply(HumanEval, snake_to_camel, args) end\n assert \"AndroidTv\" == candidate.([\"android_tv\"])\n assert \"GooglePixel\" == candidate.([\"google_pixel\"])\n assert \"AppleWatch\" == candidate.([\"apple_watch\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_412_remove_odd", "language": "elixir", "prompt": "# Write an elixirthon function to remove odd numbers from a given list.\n\n\ndefmodule HumanEval do\n def remove_odd(l) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_412_remove_odd.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_odd\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_odd end)\n candidate = fn args -> apply(HumanEval, remove_odd, args) end\n assert [2] == candidate.([[1, 2, 3]])\n assert [2, 4, 6] == candidate.([[2, 4, 6]])\n assert [10, 20] == candidate.([[10, 20, 3]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_413_extract_nth_element", "language": "elixir", "prompt": "# Write a function to extract the nth element from a given list of tuples.\n\n\ndefmodule HumanEval do\n def extract_nth_element(l, i, s, t, 1, ,, , n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_413_extract_nth_element.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"extract_nth_element\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :extract_nth_element end)\n candidate = fn args -> apply(HumanEval, extract_nth_element, args) end\n assert [\"Greyson Fulton\", \"Brady Kent\", \"Wyatt Knott\", \"Beau Turnbull\"] == candidate.([[{\"Greyson Fulton\", 98, 99}, {\"Brady Kent\", 97, 96}, {\"Wyatt Knott\", 91, 94}, {\"Beau Turnbull\", 94, 98}], 0])\n assert [99, 96, 94, 98] == candidate.([[{\"Greyson Fulton\", 98, 99}, {\"Brady Kent\", 97, 96}, {\"Wyatt Knott\", 91, 94}, {\"Beau Turnbull\", 94, 98}], 2])\n assert [98, 97, 91, 94] == candidate.([[{\"Greyson Fulton\", 98, 99}, {\"Brady Kent\", 97, 96}, {\"Wyatt Knott\", 91, 94}, {\"Beau Turnbull\", 94, 98}], 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_414_overlapping", "language": "elixir", "prompt": "# Write an elixirthon function to check whether any value in a sequence exists in a sequence or not.\n\n\ndefmodule HumanEval do\n def overlapping(l, i, s, t, 1, ,, , l, i, s, t, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_414_overlapping.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"overlapping\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :overlapping end)\n candidate = fn args -> apply(HumanEval, overlapping, args) end\n assert false == candidate.([[1, 2, 3, 4, 5], [6, 7, 8, 9]])\n assert false == candidate.([[1, 2, 3], [4, 5, 6]])\n assert true == candidate.([[1, 4, 5], [1, 4, 5]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_415_max_Product", "language": "elixir", "prompt": "# Write an elixirthon function to find a pair with highest product from a given list of integers.\n\n\ndefmodule HumanEval do\n def max_Product(a, r, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_415_max_Product.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_Product\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_Product end)\n candidate = fn args -> apply(HumanEval, max_Product, args) end\n assert {7, 8} == candidate.([[1, 2, 3, 4, 7, 0, 8, 4]])\n assert {-4, -6} == candidate.([[0, -1, -2, -4, 5, 0, -6]])\n assert {2, 3} == candidate.([[1, 2, 3]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_417_group_tuples", "language": "elixir", "prompt": "# Write a function to find common first element in given list of lists.\n\n\ndefmodule HumanEval do\n def group_tuples(I, n, p, u, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_417_group_tuples.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"group_tuples\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :group_tuples end)\n candidate = fn args -> apply(HumanEval, group_tuples, args) end\n assert [[\"x\", \"y\", \"z\"], [\"w\", \"t\"]] == candidate.([[[\"x\", \"y\"], [\"x\", \"z\"], [\"w\", \"t\"]]])\n assert [[\"a\", \"b\", \"c\"], [\"d\", \"e\"]] == candidate.([[[\"a\", \"b\"], [\"a\", \"c\"], [\"d\", \"e\"]]])\n assert [[\"f\", \"g\", \"g\"], [\"h\", \"i\"]] == candidate.([[[\"f\", \"g\"], [\"f\", \"g\"], [\"h\", \"i\"]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_418_Find_Max", "language": "elixir", "prompt": "# Write an elixirthon function to find the element of a list having maximum length.\n\n\ndefmodule HumanEval do\n def Find_Max(l, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_418_Find_Max.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"Find_Max\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :Find_Max end)\n candidate = fn args -> apply(HumanEval, Find_Max, args) end\n assert [\"A\", \"B\", \"C\"] == candidate.([[[\"A\"], [\"A\", \"B\"], [\"A\", \"B\", \"C\"]]])\n assert [1, 2, 3] == candidate.([[[1], [1, 2], [1, 2, 3]]])\n assert [1, 5, 6, 1] == candidate.([[[1, 1], [1, 2, 3], [1, 5, 6, 1]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_419_round_and_sum", "language": "elixir", "prompt": "# Write a function to round every number of a given list of numbers and print the total sum multiplied by the length of the list.\n\n\ndefmodule HumanEval do\n def round_and_sum(l, i, s, t, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_419_round_and_sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"round_and_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :round_and_sum end)\n candidate = fn args -> apply(HumanEval, round_and_sum, args) end\n assert 243 == candidate.([[22.4, 4.0, -16.22, -9.1, 11.0, -12.22, 14.2, -5.2, 17.5]])\n assert 345 == candidate.([[5, 2, 9, 24.3, 29]])\n assert 513 == candidate.([[25.0, 56.7, 89.2]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_420_cube_Sum", "language": "elixir", "prompt": "# Write an elixirthon function to find the cube sum of first n even natural numbers.\n\n\ndefmodule HumanEval do\n def cube_Sum(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_420_cube_Sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"cube_Sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :cube_Sum end)\n candidate = fn args -> apply(HumanEval, cube_Sum, args) end\n assert 72 == candidate.([2])\n assert 288 == candidate.([3])\n assert 800 == candidate.([4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_421_concatenate_tuple", "language": "elixir", "prompt": "# Write a function to concatenate each element of tuple by the delimiter.\n\n\ndefmodule HumanEval do\n def concatenate_tuple(t, e, s, t, _, t, u, p) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_421_concatenate_tuple.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"concatenate_tuple\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :concatenate_tuple end)\n candidate = fn args -> apply(HumanEval, concatenate_tuple, args) end\n assert \"ID-is-4-UTS\" == candidate.([{\"ID\", \"is\", 4, \"UTS\"}])\n assert \"QWE-is-4-RTY\" == candidate.([{\"QWE\", \"is\", 4, \"RTY\"}])\n assert \"ZEN-is-4-OP\" == candidate.([{\"ZEN\", \"is\", 4, \"OP\"}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_422_find_Average_Of_Cube", "language": "elixir", "prompt": "# Write an elixirthon function to find the average of cubes of first n natural numbers.\n\n\ndefmodule HumanEval do\n def find_Average_Of_Cube(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_422_find_Average_Of_Cube.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_Average_Of_Cube\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_Average_Of_Cube end)\n candidate = fn args -> apply(HumanEval, find_Average_Of_Cube, args) end\n assert 4.5 == candidate.([2])\n assert 12 == candidate.([3])\n assert 1 == candidate.([1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_424_extract_rear", "language": "elixir", "prompt": "# Write a function to extract only the rear index element of each string in the given tuple.\n\n\ndefmodule HumanEval do\n def extract_rear(t, e, s, t, _, t, u, p, l, e) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_424_extract_rear.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"extract_rear\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :extract_rear end)\n candidate = fn args -> apply(HumanEval, extract_rear, args) end\n assert [\"s\", \"r\", \"s\"] == candidate.([{\"Mers\", \"for\", \"Vers\"}])\n assert [\"e\", \"r\", \"e\"] == candidate.([{\"Avenge\", \"for\", \"People\"}])\n assert [\"a\", \"t\", \"o\"] == candidate.([{\"Gotta\", \"get\", \"go\"}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_425_count_element_in_list", "language": "elixir", "prompt": "# Write a function to count the number of sublists containing a particular element.\n\n\ndefmodule HumanEval do\n def count_element_in_list(l, i, s, t, 1, ,, , x) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_425_count_element_in_list.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_element_in_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_element_in_list end)\n candidate = fn args -> apply(HumanEval, count_element_in_list, args) end\n assert 3 == candidate.([[[1, 3], [5, 7], [1, 11], [1, 15, 7]], 1])\n assert 3 == candidate.([[[\"A\", \"B\"], [\"A\", \"C\"], [\"A\", \"D\", \"E\"], [\"B\", \"C\", \"D\"]], \"A\"])\n assert 1 == candidate.([[[\"A\", \"B\"], [\"A\", \"C\"], [\"A\", \"D\", \"E\"], [\"B\", \"C\", \"D\"]], \"E\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_426_filter_oddnumbers", "language": "elixir", "prompt": "# Write a function to filter odd numbers.\n\n\ndefmodule HumanEval do\n def filter_oddnumbers(n, u, m, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_426_filter_oddnumbers.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"filter_oddnumbers\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :filter_oddnumbers end)\n candidate = fn args -> apply(HumanEval, filter_oddnumbers, args) end\n assert [1, 3, 5, 7, 9] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]])\n assert [45, 67, 93] == candidate.([[10, 20, 45, 67, 84, 93]])\n assert [5, 7, 9, 3] == candidate.([[5, 7, 9, 8, 6, 4, 3]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_427_change_date_format", "language": "elixir", "prompt": "# Write a function to convert a date of yyyy-mm-dd format to dd-mm-yyyy format.\n\n\ndefmodule HumanEval do\n def change_date_format(d, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_427_change_date_format.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"change_date_format\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :change_date_format end)\n candidate = fn args -> apply(HumanEval, change_date_format, args) end\n assert \"02-01-2026\" == candidate.([\"2026-01-02\"])\n assert \"13-11-2020\" == candidate.([\"2020-11-13\"])\n assert \"26-04-2021\" == candidate.([\"2021-04-26\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_428_shell_sort", "language": "elixir", "prompt": "# Write a function to sort the given list by using shell sort.\n\n\ndefmodule HumanEval do\n def shell_sort(m, y, _, l, i, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_428_shell_sort.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"shell_sort\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :shell_sort end)\n candidate = fn args -> apply(HumanEval, shell_sort, args) end\n assert [2, 3, 4, 5, 12, 12, 23, 56, 81, 95] == candidate.([[12, 23, 4, 5, 3, 2, 12, 81, 56, 95]])\n assert [22, 24, 34, 39, 68, 73, 87] == candidate.([[24, 22, 39, 34, 87, 73, 68]])\n assert [16, 30, 32, 74, 82, 83, 96] == candidate.([[32, 30, 16, 96, 82, 83, 74]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_429_and_tuples", "language": "elixir", "prompt": "# Write a function to extract the elementwise and tuples from the given two tuples.\n\n\ndefmodule HumanEval do\n def and_tuples(t, e, s, t, _, t, u, p, 1, ,, , t, e, s, t, _, t, u, p, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_429_and_tuples.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"and_tuples\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :and_tuples end)\n candidate = fn args -> apply(HumanEval, and_tuples, args) end\n assert {0, 0, 2, 1} == candidate.([{10, 4, 6, 9}, {5, 2, 3, 3}])\n assert {1, 2, 3, 0} == candidate.([{1, 2, 3, 4}, {5, 6, 7, 8}])\n assert {0, 9, 10, 0} == candidate.([{8, 9, 11, 12}, {7, 13, 14, 17}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_430_parabola_directrix", "language": "elixir", "prompt": "# Write a function to find the directrix of a parabola.\n\n\ndefmodule HumanEval do\n def parabola_directrix(a, ,, , b, ,, , c) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_430_parabola_directrix.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"parabola_directrix\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :parabola_directrix end)\n candidate = fn args -> apply(HumanEval, parabola_directrix, args) end\n assert -198 == candidate.([5, 3, 2])\n assert -2336 == candidate.([9, 8, 4])\n assert -130 == candidate.([2, 4, 6])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_431_common_element", "language": "elixir", "prompt": "# Write a function that takes two lists and returns true if they have at least one common element.\n\n\ndefmodule HumanEval do\n def common_element(l, i, s, t, 1, ,, , l, i, s, t, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_431_common_element.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"common_element\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :common_element end)\n candidate = fn args -> apply(HumanEval, common_element, args) end\n assert true == candidate.([[1, 2, 3, 4, 5], [5, 6, 7, 8, 9]])\n assert nil == candidate.([[1, 2, 3, 4, 5], [6, 7, 8, 9]])\n assert true == candidate.([[\"a\", \"b\", \"c\"], [\"d\", \"b\", \"e\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_432_median_trapezium", "language": "elixir", "prompt": "# Write a function to find the median length of a trapezium.\n\n\ndefmodule HumanEval do\n def median_trapezium(b, a, s, e, 1, ,, , b, a, s, e, 2, ,, , h, e, i, g, h, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_432_median_trapezium.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"median_trapezium\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :median_trapezium end)\n candidate = fn args -> apply(HumanEval, median_trapezium, args) end\n assert 20 == candidate.([15, 25, 35])\n assert 15 == candidate.([10, 20, 30])\n assert 7.5 == candidate.([6, 9, 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_433_check_greater", "language": "elixir", "prompt": "# Write a function to check whether the entered number is greater than the elements of the given list.\n\n\ndefmodule HumanEval do\n def check_greater(a, r, r, ,, , n, u, m, b, e, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_433_check_greater.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_greater\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_greater end)\n candidate = fn args -> apply(HumanEval, check_greater, args) end\n assert false == candidate.([[1, 2, 3, 4, 5], 4])\n assert true == candidate.([[2, 3, 4, 5, 6], 8])\n assert true == candidate.([[9, 7, 4, 8, 6, 1], 11])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_434_text_match_one", "language": "elixir", "prompt": "# Write a function that matches a string that has an a followed by one or more b's.\n\n\ndefmodule HumanEval do\n def text_match_one(t, e, x, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_434_text_match_one.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"text_match_one\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :text_match_one end)\n candidate = fn args -> apply(HumanEval, text_match_one, args) end\n assert false == candidate.([\"ac\"])\n assert false == candidate.([\"dc\"])\n assert true == candidate.([\"abba\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_435_last_Digit", "language": "elixir", "prompt": "# Write an elixirthon function to find the last digit of a given number.\n\n\ndefmodule HumanEval do\n def last_Digit(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_435_last_Digit.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"last_Digit\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :last_Digit end)\n candidate = fn args -> apply(HumanEval, last_Digit, args) end\n assert 3 == candidate.([123])\n assert 5 == candidate.([25])\n assert 0 == candidate.([30])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_436_neg_nos", "language": "elixir", "prompt": "# Write an elixirthon function to return the negative numbers in a list.\n\n\ndefmodule HumanEval do\n def neg_nos(l, i, s, t, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_436_neg_nos.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"neg_nos\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :neg_nos end)\n candidate = fn args -> apply(HumanEval, neg_nos, args) end\n assert [-1, -6] == candidate.([[-1, 4, 5, -6]])\n assert [-1, -2] == candidate.([[-1, -2, 3, 4]])\n assert [-7, -6] == candidate.([[-7, -6, 8, 9]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_437_remove_odd", "language": "elixir", "prompt": "# Write a function to remove odd characters in a string.\n\n\ndefmodule HumanEval do\n def remove_odd(s, t, r, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_437_remove_odd.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_odd\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_odd end)\n candidate = fn args -> apply(HumanEval, remove_odd, args) end\n assert \"yhn\" == candidate.([\"python\"])\n assert \"rga\" == candidate.([\"program\"])\n assert \"agae\" == candidate.([\"language\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_438_count_bidirectional", "language": "elixir", "prompt": "# Write a function to count bidirectional tuple pairs.\n\n\ndefmodule HumanEval do\n def count_bidirectional(t, e, s, t, _, l, i, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_438_count_bidirectional.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_bidirectional\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_bidirectional end)\n candidate = fn args -> apply(HumanEval, count_bidirectional, args) end\n assert 3 == candidate.([[{5, 6}, {1, 2}, {6, 5}, {9, 1}, {6, 5}, {2, 1}]])\n assert 2 == candidate.([[{5, 6}, {1, 3}, {6, 5}, {9, 1}, {6, 5}, {2, 1}]])\n assert 4 == candidate.([[{5, 6}, {1, 2}, {6, 5}, {9, 2}, {6, 5}, {2, 1}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_439_multiple_to_single", "language": "elixir", "prompt": "# Write a function to join a list of multiple integers into a single integer.\n\n\ndefmodule HumanEval do\n def multiple_to_single(L) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_439_multiple_to_single.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"multiple_to_single\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :multiple_to_single end)\n candidate = fn args -> apply(HumanEval, multiple_to_single, args) end\n assert 113350 == candidate.([[11, 33, 50]])\n assert -123456 == candidate.([[-1, 2, 3, 4, 5, 6]])\n assert 10152025 == candidate.([[10, 15, 20, 25]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_440_find_adverb_position", "language": "elixir", "prompt": "# Write a function to find the first adverb and their positions in a given sentence.\n\n\ndefmodule HumanEval do\n def find_adverb_position(t, e, x, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_440_find_adverb_position.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_adverb_position\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_adverb_position end)\n candidate = fn args -> apply(HumanEval, find_adverb_position, args) end\n assert {0, 7, \"clearly\"} == candidate.([\"clearly!! we can see the sky\"])\n assert {0, 9, \"seriously\"} == candidate.([\"seriously!! there are many roses\"])\n assert {0, 13, \"unfortunately\"} == candidate.([\"unfortunately!! sita is going to home\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_441_surfacearea_cube", "language": "elixir", "prompt": "# Write a function to find the surface area of a cube of a given size.\n\n\ndefmodule HumanEval do\n def surfacearea_cube(l) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_441_surfacearea_cube.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"surfacearea_cube\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :surfacearea_cube end)\n candidate = fn args -> apply(HumanEval, surfacearea_cube, args) end\n assert 150 == candidate.([5])\n assert 54 == candidate.([3])\n assert 600 == candidate.([10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_442_positive_count", "language": "elixir", "prompt": "# Write a function to find the ration of positive numbers in a list of integers.\n\n\ndefmodule HumanEval do\n def positive_count(n, u, m, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_442_positive_count.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"positive_count\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :positive_count end)\n candidate = fn args -> apply(HumanEval, positive_count, args) end\n assert 0.54 == candidate.([[0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8]])\n assert 0.69 == candidate.([[2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8]])\n assert 0.56 == candidate.([[2, 4, -6, -9, 11, -12, 14, -5, 17]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_443_largest_neg", "language": "elixir", "prompt": "# Write an elixirthon function to find the largest negative number from the given list.\n\n\ndefmodule HumanEval do\n def largest_neg(l, i, s, t, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_443_largest_neg.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"largest_neg\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :largest_neg end)\n candidate = fn args -> apply(HumanEval, largest_neg, args) end\n assert -6 == candidate.([[1, 2, 3, -4, -6]])\n assert -9 == candidate.([[1, 2, 3, -8, -9]])\n assert -1 == candidate.([[1, 2, 3, 4, -1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_444_trim_tuple", "language": "elixir", "prompt": "# Write a function to trim each list by k in the given lists.\n\n\ndefmodule HumanEval do\n def trim_tuple(t, e, s, t, _, l, i, s, t, ,, , K) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_444_trim_tuple.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"trim_tuple\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :trim_tuple end)\n candidate = fn args -> apply(HumanEval, trim_tuple, args) end\n assert [[2], [9], [2], [2]] == candidate.([[[5, 3, 2, 1, 4], [3, 4, 9, 2, 1], [9, 1, 2, 3, 5], [4, 8, 2, 1, 7]], 2])\n assert [[3, 2, 1], [4, 9, 2], [1, 2, 3], [8, 2, 1]] == candidate.([[[5, 3, 2, 1, 4], [3, 4, 9, 2, 1], [9, 1, 2, 3, 5], [4, 8, 2, 1, 7]], 1])\n assert [[8, 4], [8, 12], [1, 7], [6, 9]] == candidate.([[[7, 8, 4, 9], [11, 8, 12, 4], [4, 1, 7, 8], [3, 6, 9, 7]], 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_445_index_multiplication", "language": "elixir", "prompt": "# Write a function to perform index wise multiplication of list elements in the given two lists.\n\n\ndefmodule HumanEval do\n def index_multiplication(t, e, s, t, _, t, u, p, 1, ,, , t, e, s, t, _, t, u, p, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_445_index_multiplication.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"index_multiplication\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :index_multiplication end)\n candidate = fn args -> apply(HumanEval, index_multiplication, args) end\n assert [[6, 21], [12, 45], [2, 9], [7, 30]] == candidate.([[[1, 3], [4, 5], [2, 9], [1, 10]], [[6, 7], [3, 9], [1, 1], [7, 3]]])\n assert [[14, 32], [20, 60], [6, 20], [16, 44]] == candidate.([[[2, 4], [5, 6], [3, 10], [2, 11]], [[7, 8], [4, 10], [2, 2], [8, 4]]])\n assert [[24, 45], [30, 77], [12, 33], [27, 60]] == candidate.([[[3, 5], [6, 7], [4, 11], [3, 12]], [[8, 9], [5, 11], [3, 3], [9, 5]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_446_count_Occurrence", "language": "elixir", "prompt": "# Write an elixirthon function to count the occurence of all elements of list in a tuple.\n\n\ndefmodule HumanEval do\n def count_Occurrence(t, u, p, ,, , l, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_446_count_Occurrence.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_Occurrence\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_Occurrence end)\n candidate = fn args -> apply(HumanEval, count_Occurrence, args) end\n assert 3 == candidate.([{\"a\", \"a\", \"c\", \"b\", \"d\"}, [\"a\", \"b\"]])\n assert 6 == candidate.([{1, 2, 3, 1, 4, 6, 7, 1, 4}, [1, 4, 7]])\n assert 2 == candidate.([{1, 2, 3, 4, 5, 6}, [1, 2]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_447_cube_nums", "language": "elixir", "prompt": "# Write a function to find cubes of individual elements in a list.\n\n\ndefmodule HumanEval do\n def cube_nums(n, u, m, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_447_cube_nums.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"cube_nums\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :cube_nums end)\n candidate = fn args -> apply(HumanEval, cube_nums, args) end\n assert [1, 8, 27, 64, 125, 216, 343, 512, 729, 1000] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]])\n assert [1000, 8000, 27000] == candidate.([[10, 20, 30]])\n assert [1728, 3375] == candidate.([[12, 15]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_448_cal_sum", "language": "elixir", "prompt": "# Write a function to calculate the sum of perrin numbers.\n\n\ndefmodule HumanEval do\n def cal_sum(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_448_cal_sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"cal_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :cal_sum end)\n candidate = fn args -> apply(HumanEval, cal_sum, args) end\n assert 49 == candidate.([9])\n assert 66 == candidate.([10])\n assert 88 == candidate.([11])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_450_extract_string", "language": "elixir", "prompt": "# Write a function to extract specified size of strings from a given list of string values.\n\n\ndefmodule HumanEval do\n def extract_string(s, t, r, ,, , l) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_450_extract_string.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"extract_string\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :extract_string end)\n candidate = fn args -> apply(HumanEval, extract_string, args) end\n assert [\"practice\", \"solution\"] == candidate.([[\"Python\", \"list\", \"exercises\", \"practice\", \"solution\"], 8])\n assert [\"Python\"] == candidate.([[\"Python\", \"list\", \"exercises\", \"practice\", \"solution\"], 6])\n assert [\"exercises\"] == candidate.([[\"Python\", \"list\", \"exercises\", \"practice\", \"solution\"], 9])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_451_remove_whitespaces", "language": "elixir", "prompt": "# Write a function to remove all whitespaces from the given string.\n\n\ndefmodule HumanEval do\n def remove_whitespaces(t, e, x, t, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_451_remove_whitespaces.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_whitespaces\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_whitespaces end)\n candidate = fn args -> apply(HumanEval, remove_whitespaces, args) end\n assert \"GoogleFlutter\" == candidate.([\" Google Flutter \"])\n assert \"GoogleDart\" == candidate.([\" Google Dart \"])\n assert \"iOSSwift\" == candidate.([\" iOS Swift \"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_452_loss_amount", "language": "elixir", "prompt": "# Write a function that gives loss amount on a sale if the given amount has loss else return 0.\n\n\ndefmodule HumanEval do\n def loss_amount(a, c, t, u, a, l, _, c, o, s, t, ,, , s, a, l, e, _, a, m, o, u, n, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_452_loss_amount.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"loss_amount\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :loss_amount end)\n candidate = fn args -> apply(HumanEval, loss_amount, args) end\n assert 0 == candidate.([1500, 1200])\n assert 100 == candidate.([100, 200])\n assert 3000 == candidate.([2000, 5000])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_453_sumofFactors", "language": "elixir", "prompt": "# Write an elixirthon function to find the sum of even factors of a number.\n\n\ndefmodule HumanEval do\n def sumofFactors(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_453_sumofFactors.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sumofFactors\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sumofFactors end)\n candidate = fn args -> apply(HumanEval, sumofFactors, args) end\n assert 26 == candidate.([18])\n assert 48 == candidate.([30])\n assert 8 == candidate.([6])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_454_text_match_wordz", "language": "elixir", "prompt": "# Write a function that matches a word containing 'z'.\n\n\ndefmodule HumanEval do\n def text_match_wordz(t, e, x, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_454_text_match_wordz.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"text_match_wordz\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :text_match_wordz end)\n candidate = fn args -> apply(HumanEval, text_match_wordz, args) end\n assert true == candidate.([\"pythonz.\"])\n assert true == candidate.([\"xyz.\"])\n assert false == candidate.([\" lang .\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_455_check_monthnumb_number", "language": "elixir", "prompt": "# Write a function to check whether the given month number contains 31 days or not.\n\n\ndefmodule HumanEval do\n def check_monthnumb_number(m, o, n, t, h, n, u, m, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_455_check_monthnumb_number.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_monthnumb_number\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_monthnumb_number end)\n candidate = fn args -> apply(HumanEval, check_monthnumb_number, args) end\n assert true == candidate.([5])\n assert false == candidate.([2])\n assert false == candidate.([6])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_456_reverse_string_list", "language": "elixir", "prompt": "# Write a function to reverse each string in a given list of string values.\n\n\ndefmodule HumanEval do\n def reverse_string_list(s, t, r, i, n, g, l, i, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_456_reverse_string_list.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"reverse_string_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :reverse_string_list end)\n candidate = fn args -> apply(HumanEval, reverse_string_list, args) end\n assert [\"deR\", \"neerG\", \"eulB\", \"etihW\", \"kcalB\"] == candidate.([[\"Red\", \"Green\", \"Blue\", \"White\", \"Black\"]])\n assert [\"nhoj\", \"lama\", \"leoj\", \"egroeg\"] == candidate.([[\"john\", \"amal\", \"joel\", \"george\"]])\n assert [\"kcaj\", \"nhoj\", \"yram\"] == candidate.([[\"jack\", \"john\", \"mary\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_457_Find_Min", "language": "elixir", "prompt": "# Write an elixirthon function to find the sublist having minimum length.\n\n\ndefmodule HumanEval do\n def Find_Min(l, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_457_Find_Min.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"Find_Min\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :Find_Min end)\n candidate = fn args -> apply(HumanEval, Find_Min, args) end\n assert [1] == candidate.([[[1], [1, 2], [1, 2, 3]]])\n assert [1, 1] == candidate.([[[1, 1], [1, 1, 1], [1, 2, 7, 8]]])\n assert [\"x\"] == candidate.([[[\"x\"], [\"x\", \"y\"], [\"x\", \"y\", \"z\"]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_458_rectangle_area", "language": "elixir", "prompt": "# Write a function to find the area of a rectangle.\n\n\ndefmodule HumanEval do\n def rectangle_area(l, ,, , b) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_458_rectangle_area.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"rectangle_area\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :rectangle_area end)\n candidate = fn args -> apply(HumanEval, rectangle_area, args) end\n assert 200 == candidate.([10, 20])\n assert 50 == candidate.([10, 5])\n assert 8 == candidate.([4, 2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_459_remove_uppercase", "language": "elixir", "prompt": "# Write a function to remove uppercase substrings from a given string.\n\n\ndefmodule HumanEval do\n def remove_uppercase(s, t, r, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_459_remove_uppercase.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_uppercase\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_uppercase end)\n candidate = fn args -> apply(HumanEval, remove_uppercase, args) end\n assert \"cstyoravoitshos\" == candidate.([\"cAstyoUrFavoRitETVshoWs\"])\n assert \"wtchheinerntrdo\" == candidate.([\"wAtchTheinTernEtrAdIo\"])\n assert \"oiceachndreomendaion\" == candidate.([\"VoicESeaRchAndreComMendaTionS\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_460_Extract", "language": "elixir", "prompt": "# Write an elixirthon function to get the first element of each sublist.\n\n\ndefmodule HumanEval do\n def Extract(l, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_460_Extract.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"Extract\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :Extract end)\n candidate = fn args -> apply(HumanEval, Extract, args) end\n assert [1, 3, 6] == candidate.([[[1, 2], [3, 4, 5], [6, 7, 8, 9]]])\n assert [1, 4] == candidate.([[[1, 2, 3], [4, 5]]])\n assert [9, 1] == candidate.([[[9, 8, 1], [1, 2]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_461_upper_ctr", "language": "elixir", "prompt": "# Write an elixirthon function to count the upper case characters in a given string.\n\n\ndefmodule HumanEval do\n def upper_ctr(s, t, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_461_upper_ctr.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"upper_ctr\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :upper_ctr end)\n candidate = fn args -> apply(HumanEval, upper_ctr, args) end\n assert 1 == candidate.([\"PYthon\"])\n assert 1 == candidate.([\"BigData\"])\n assert 0 == candidate.([\"program\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_462_combinations_list", "language": "elixir", "prompt": "# Write a function to find all possible combinations of the elements of a given list.\n\n\ndefmodule HumanEval do\n def combinations_list(l, i, s, t, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_462_combinations_list.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"combinations_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :combinations_list end)\n candidate = fn args -> apply(HumanEval, combinations_list, args) end\n assert [[], [\"orange\"], [\"red\"], [\"red\", \"orange\"], [\"green\"], [\"green\", \"orange\"], [\"green\", \"red\"], [\"green\", \"red\", \"orange\"], [\"blue\"], [\"blue\", \"orange\"], [\"blue\", \"red\"], [\"blue\", \"red\", \"orange\"], [\"blue\", \"green\"], [\"blue\", \"green\", \"orange\"], [\"blue\", \"green\", \"red\"], [\"blue\", \"green\", \"red\", \"orange\"]] == candidate.([[\"orange\", \"red\", \"green\", \"blue\"]])\n assert [[], [\"red\"], [\"green\"], [\"green\", \"red\"], [\"blue\"], [\"blue\", \"red\"], [\"blue\", \"green\"], [\"blue\", \"green\", \"red\"], [\"white\"], [\"white\", \"red\"], [\"white\", \"green\"], [\"white\", \"green\", \"red\"], [\"white\", \"blue\"], [\"white\", \"blue\", \"red\"], [\"white\", \"blue\", \"green\"], [\"white\", \"blue\", \"green\", \"red\"], [\"black\"], [\"black\", \"red\"], [\"black\", \"green\"], [\"black\", \"green\", \"red\"], [\"black\", \"blue\"], [\"black\", \"blue\", \"red\"], [\"black\", \"blue\", \"green\"], [\"black\", \"blue\", \"green\", \"red\"], [\"black\", \"white\"], [\"black\", \"white\", \"red\"], [\"black\", \"white\", \"green\"], [\"black\", \"white\", \"green\", \"red\"], [\"black\", \"white\", \"blue\"], [\"black\", \"white\", \"blue\", \"red\"], [\"black\", \"white\", \"blue\", \"green\"], [\"black\", \"white\", \"blue\", \"green\", \"red\"], [\"orange\"], [\"orange\", \"red\"], [\"orange\", \"green\"], [\"orange\", \"green\", \"red\"], [\"orange\", \"blue\"], [\"orange\", \"blue\", \"red\"], [\"orange\", \"blue\", \"green\"], [\"orange\", \"blue\", \"green\", \"red\"], [\"orange\", \"white\"], [\"orange\", \"white\", \"red\"], [\"orange\", \"white\", \"green\"], [\"orange\", \"white\", \"green\", \"red\"], [\"orange\", \"white\", \"blue\"], [\"orange\", \"white\", \"blue\", \"red\"], [\"orange\", \"white\", \"blue\", \"green\"], [\"orange\", \"white\", \"blue\", \"green\", \"red\"], [\"orange\", \"black\"], [\"orange\", \"black\", \"red\"], [\"orange\", \"black\", \"green\"], [\"orange\", \"black\", \"green\", \"red\"], [\"orange\", \"black\", \"blue\"], [\"orange\", \"black\", \"blue\", \"red\"], [\"orange\", \"black\", \"blue\", \"green\"], [\"orange\", \"black\", \"blue\", \"green\", \"red\"], [\"orange\", \"black\", \"white\"], [\"orange\", \"black\", \"white\", \"red\"], [\"orange\", \"black\", \"white\", \"green\"], [\"orange\", \"black\", \"white\", \"green\", \"red\"], [\"orange\", \"black\", \"white\", \"blue\"], [\"orange\", \"black\", \"white\", \"blue\", \"red\"], [\"orange\", \"black\", \"white\", \"blue\", \"green\"], [\"orange\", \"black\", \"white\", \"blue\", \"green\", \"red\"]] == candidate.([[\"red\", \"green\", \"blue\", \"white\", \"black\", \"orange\"]])\n assert [[], [\"red\"], [\"green\"], [\"green\", \"red\"], [\"black\"], [\"black\", \"red\"], [\"black\", \"green\"], [\"black\", \"green\", \"red\"], [\"orange\"], [\"orange\", \"red\"], [\"orange\", \"green\"], [\"orange\", \"green\", \"red\"], [\"orange\", \"black\"], [\"orange\", \"black\", \"red\"], [\"orange\", \"black\", \"green\"], [\"orange\", \"black\", \"green\", \"red\"]] == candidate.([[\"red\", \"green\", \"black\", \"orange\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_463_max_subarray_product", "language": "elixir", "prompt": "# Write a function to find the maximum product sublist of the given list.\n\n\ndefmodule HumanEval do\n def max_subarray_product(a, r, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_463_max_subarray_product.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_subarray_product\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_subarray_product end)\n candidate = fn args -> apply(HumanEval, max_subarray_product, args) end\n assert 112 == candidate.([[1, -2, -3, 0, 7, -8, -2]])\n assert 180 == candidate.([[6, -3, -10, 0, 2]])\n assert 80 == candidate.([[-2, -40, 0, -2, -3]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_464_check_value", "language": "elixir", "prompt": "# Write a function to check if all values are same in a map.\n\n\ndefmodule HumanEval do\n def check_value(d, i, c, t, ,, , n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_464_check_value.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_value\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_value end)\n candidate = fn args -> apply(HumanEval, check_value, args) end\n assert false == candidate.([%{\"Cierra Vega\" => 12, \"Alden Cantrell\" => 12, \"Kierra Gentry\" => 12, \"Pierre Cox\" => 12}, 10])\n assert true == candidate.([%{\"Cierra Vega\" => 12, \"Alden Cantrell\" => 12, \"Kierra Gentry\" => 12, \"Pierre Cox\" => 12}, 12])\n assert false == candidate.([%{\"Cierra Vega\" => 12, \"Alden Cantrell\" => 12, \"Kierra Gentry\" => 12, \"Pierre Cox\" => 12}, 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_465_drop_empty", "language": "elixir", "prompt": "# Write a function to drop empty items from a given map.\n\n\ndefmodule HumanEval do\n def drop_empty(d, i, c, t, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_465_drop_empty.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"drop_empty\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :drop_empty end)\n candidate = fn args -> apply(HumanEval, drop_empty, args) end\n assert %{\"c1\" => \"Red\", \"c2\" => \"Green\"} == candidate.([%{\"c1\" => \"Red\", \"c2\" => \"Green\", \"c3\" => nil}])\n assert %{\"c1\" => \"Red\"} == candidate.([%{\"c1\" => \"Red\", \"c2\" => nil, \"c3\" => nil}])\n assert %{\"c2\" => \"Green\"} == candidate.([%{\"c1\" => nil, \"c2\" => \"Green\", \"c3\" => nil}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_468_max_product", "language": "elixir", "prompt": "# Write a function to find the maximum product formed by multiplying numbers of an increasing subsequence of that list.\n\n\ndefmodule HumanEval do\n def max_product(a, r, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_468_max_product.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_product\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_product end)\n candidate = fn args -> apply(HumanEval, max_product, args) end\n assert 3000 == candidate.([[3, 100, 4, 5, 150, 6]])\n assert 50265600 == candidate.([[4, 42, 55, 68, 80]])\n assert 2460 == candidate.([[10, 22, 9, 33, 21, 50, 41, 60]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_470_add_pairwise", "language": "elixir", "prompt": "# Write a function to find the pairwise addition of the neighboring elements of the given tuple.\n\n\ndefmodule HumanEval do\n def add_pairwise(t, e, s, t, _, t, u, p) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_470_add_pairwise.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"add_pairwise\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :add_pairwise end)\n candidate = fn args -> apply(HumanEval, add_pairwise, args) end\n assert {6, 12, 15, 18} == candidate.([{1, 5, 7, 8, 10}])\n assert {8, 14, 17, 20} == candidate.([{2, 6, 8, 9, 11}])\n assert {10, 16, 19, 22} == candidate.([{3, 7, 9, 10, 12}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_471_find_remainder", "language": "elixir", "prompt": "# Write an elixirthon function to find the product of the list multiplication modulo n.\n\n\ndefmodule HumanEval do\n def find_remainder(a, r, r, ,, , n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_471_find_remainder.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_remainder\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_remainder end)\n candidate = fn args -> apply(HumanEval, find_remainder, args) end\n assert 9 == candidate.([[100, 10, 5, 25, 35, 14], 11])\n assert 0 == candidate.([[1, 1, 1], 1])\n assert 0 == candidate.([[1, 2, 1], 2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_472_check_Consecutive", "language": "elixir", "prompt": "# Write an elixirthon function to check whether the given list contains consecutive numbers or not.\n\n\ndefmodule HumanEval do\n def check_Consecutive(l) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_472_check_Consecutive.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_Consecutive\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_Consecutive end)\n candidate = fn args -> apply(HumanEval, check_Consecutive, args) end\n assert true == candidate.([[1, 2, 3, 4, 5]])\n assert false == candidate.([[1, 2, 3, 5, 6]])\n assert false == candidate.([[1, 2, 1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_474_replace_char", "language": "elixir", "prompt": "# Write a function to replace characters in a string.\n\n\ndefmodule HumanEval do\n def replace_char(s, t, r, 1, ,, , c, h, ,, , n, e, w, c, h) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_474_replace_char.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"replace_char\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :replace_char end)\n candidate = fn args -> apply(HumanEval, replace_char, args) end\n assert \"pollgon\" == candidate.([\"polygon\", \"y\", \"l\"])\n assert \"aharaater\" == candidate.([\"character\", \"c\", \"a\"])\n assert \"python\" == candidate.([\"python\", \"l\", \"a\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_475_sort_counter", "language": "elixir", "prompt": "# Write a function to sort a map by value.\n\n\ndefmodule HumanEval do\n def sort_counter(d, i, c, t, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_475_sort_counter.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sort_counter\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sort_counter end)\n candidate = fn args -> apply(HumanEval, sort_counter, args) end\n assert [{\"Chemistry\", 87}, {\"Physics\", 83}, {\"Math\", 81}] == candidate.([%{\"Math\" => 81, \"Physics\" => 83, \"Chemistry\" => 87}])\n assert [{\"Math\", 400}, {\"Physics\", 300}, {\"Chemistry\", 250}] == candidate.([%{\"Math\" => 400, \"Physics\" => 300, \"Chemistry\" => 250}])\n assert [{\"Chemistry\", 1250}, {\"Physics\", 1000}, {\"Math\", 900}] == candidate.([%{\"Math\" => 900, \"Physics\" => 1000, \"Chemistry\" => 1250}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_476_big_sum", "language": "elixir", "prompt": "# Write an elixirthon function to find the sum of the largest and smallest value in a given list.\n\n\ndefmodule HumanEval do\n def big_sum(n, u, m, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_476_big_sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"big_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :big_sum end)\n candidate = fn args -> apply(HumanEval, big_sum, args) end\n assert 4 == candidate.([[1, 2, 3]])\n assert 3 == candidate.([[-1, 2, 3, 4]])\n assert 8 == candidate.([[2, 3, 6]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_477_is_lower", "language": "elixir", "prompt": "# Write an elixirthon function to convert the given string to lower case.\n\n\ndefmodule HumanEval do\n def is_lower(s, t, r, i, n, g) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_477_is_lower.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_lower\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_lower end)\n candidate = fn args -> apply(HumanEval, is_lower, args) end\n assert \"invalid\" == candidate.([\"InValid\"])\n assert \"true\" == candidate.([\"TruE\"])\n assert \"sentence\" == candidate.([\"SenTenCE\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_478_remove_lowercase", "language": "elixir", "prompt": "# Write a function to remove lowercase substrings from a given string.\n\n\ndefmodule HumanEval do\n def remove_lowercase(s, t, r, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_478_remove_lowercase.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_lowercase\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_lowercase end)\n candidate = fn args -> apply(HumanEval, remove_lowercase, args) end\n assert \"PYTH\" == candidate.([\"PYTHon\"])\n assert \"FID\" == candidate.([\"FInD\"])\n assert \"STRG\" == candidate.([\"STRinG\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_479_first_Digit", "language": "elixir", "prompt": "# Write an elixirthon function to find the first digit of a given number.\n\n\ndefmodule HumanEval do\n def first_Digit(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_479_first_Digit.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"first_Digit\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :first_Digit end)\n candidate = fn args -> apply(HumanEval, first_Digit, args) end\n assert 1 == candidate.([123])\n assert 4 == candidate.([456])\n assert 1 == candidate.([12])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_4_heap_queue_largest", "language": "elixir", "prompt": "# Write a function to find the n largest integers from a given list of numbers, returned in descending order.\n\n\ndefmodule HumanEval do\n def heap_queue_largest(n, u, m, s, ,, , n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_4_heap_queue_largest.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"heap_queue_largest\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :heap_queue_largest end)\n candidate = fn args -> apply(HumanEval, heap_queue_largest, args) end\n assert [85, 75, 65] == candidate.([[25, 35, 22, 85, 14, 65, 75, 22, 58], 3])\n assert [85, 75] == candidate.([[25, 35, 22, 85, 14, 65, 75, 22, 58], 2])\n assert [85, 75, 65, 58, 35] == candidate.([[25, 35, 22, 85, 14, 65, 75, 22, 58], 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_554_Split", "language": "elixir", "prompt": "# Write an elixirthon function which takes a list of integers and only returns the odd ones.\n\n\ndefmodule HumanEval do\n def Split(l, i, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_554_Split.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"Split\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :Split end)\n candidate = fn args -> apply(HumanEval, Split, args) end\n assert [1, 3, 5] == candidate.([[1, 2, 3, 4, 5, 6]])\n assert [11, 13] == candidate.([[10, 11, 12, 13]])\n assert [7, 9, 1] == candidate.([[7, 8, 9, 1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_555_difference", "language": "elixir", "prompt": "# Write an elixirthon function to find the difference between the sum of cubes of the first n natural numbers and the sum of the first n natural numbers.\n\n\ndefmodule HumanEval do\n def difference(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_555_difference.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"difference\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :difference end)\n candidate = fn args -> apply(HumanEval, difference, args) end\n assert 30 == candidate.([3])\n assert 210 == candidate.([5])\n assert 6 == candidate.([2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_556_find_Odd_Pair", "language": "elixir", "prompt": "# Write an elixirthon function to count the number of pairs whose xor value is odd.\n\n\ndefmodule HumanEval do\n def find_Odd_Pair(A, ,, , N) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_556_find_Odd_Pair.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_Odd_Pair\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_Odd_Pair end)\n candidate = fn args -> apply(HumanEval, find_Odd_Pair, args) end\n assert 6 == candidate.([[5, 4, 7, 2, 1], 5])\n assert 12 == candidate.([[7, 2, 8, 1, 0, 5, 11], 7])\n assert 2 == candidate.([[1, 2, 3], 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_557_toggle_string", "language": "elixir", "prompt": "# Write a function to toggle the case of all characters in a string.\n\n\ndefmodule HumanEval do\n def toggle_string(s, t, r, i, n, g) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_557_toggle_string.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"toggle_string\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :toggle_string end)\n candidate = fn args -> apply(HumanEval, toggle_string, args) end\n assert \"pYTHON\" == candidate.([\"Python\"])\n assert \"pANGRAM\" == candidate.([\"Pangram\"])\n assert \"liTTle\" == candidate.([\"LIttLE\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_558_digit_distance_nums", "language": "elixir", "prompt": "# Write an elixirthon function to find the sum of the per-digit difference between two integers.\n\n\ndefmodule HumanEval do\n def digit_distance_nums(n, 1, ,, , n, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_558_digit_distance_nums.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"digit_distance_nums\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :digit_distance_nums end)\n candidate = fn args -> apply(HumanEval, digit_distance_nums, args) end\n assert 1 == candidate.([1, 2])\n assert 6 == candidate.([23, 56])\n assert 7 == candidate.([123, 256])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_559_max_sub_array_sum", "language": "elixir", "prompt": "# Write a function to find the sum of the largest contiguous sublist in the given list.\n\n\ndefmodule HumanEval do\n def max_sub_array_sum(a, ,, , s, i, z, e) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_559_max_sub_array_sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_sub_array_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_sub_array_sum end)\n candidate = fn args -> apply(HumanEval, max_sub_array_sum, args) end\n assert 7 == candidate.([[-2, -3, 4, -1, -2, 1, 5, -3], 8])\n assert 8 == candidate.([[-3, -4, 5, -2, -3, 2, 6, -4], 8])\n assert 10 == candidate.([[-4, -5, 6, -3, -4, 3, 7, -5], 8])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_560_union_elements", "language": "elixir", "prompt": "# Write a function to find the union of the elements of two given lists and output them in sorted order.\n\n\ndefmodule HumanEval do\n def union_elements(t, e, s, t, _, t, u, p, 1, ,, , t, e, s, t, _, t, u, p, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_560_union_elements.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"union_elements\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :union_elements end)\n candidate = fn args -> apply(HumanEval, union_elements, args) end\n assert [3, 4, 5, 6, 7, 10] == candidate.([[3, 4, 5, 6], [5, 7, 4, 10]])\n assert [1, 2, 3, 4, 5, 6] == candidate.([[1, 2, 3, 4], [3, 4, 5, 6]])\n assert [11, 12, 13, 14, 15, 16, 17] == candidate.([[11, 12, 13, 14], [13, 15, 16, 17]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_562_Find_Max_Length", "language": "elixir", "prompt": "# Write an elixirthon function to find the length of the longest sublists.\n\n\ndefmodule HumanEval do\n def Find_Max_Length(l, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_562_Find_Max_Length.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"Find_Max_Length\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :Find_Max_Length end)\n candidate = fn args -> apply(HumanEval, Find_Max_Length, args) end\n assert 4 == candidate.([[[1], [1, 4], [5, 6, 7, 8]]])\n assert 3 == candidate.([[[0, 1], [2, 2], [3, 2, 1]]])\n assert 5 == candidate.([[[7], [22, 23], [13, 14, 15], [10, 20, 30, 40, 50]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_563_extract_values", "language": "elixir", "prompt": "# Write a function to extract values between quotation marks from a string.\n\n\ndefmodule HumanEval do\n def extract_values(t, e, x, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_563_extract_values.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"extract_values\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :extract_values end)\n candidate = fn args -> apply(HumanEval, extract_values, args) end\n assert [\"Python\", \"PHP\", \"Java\"] == candidate.([\"\"Python\", \"PHP\", \"Java\"\"])\n assert [\"python\", \"program\", \"language\"] == candidate.([\"\"python\",\"program\",\"language\"\"])\n assert [\"red\", \"blue\", \"green\", \"yellow\"] == candidate.([\"\"red\",\"blue\",\"green\",\"yellow\"\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_564_count_Pairs", "language": "elixir", "prompt": "# Write an elixirthon function which takes a list of integers and counts the number of possible unordered pairs where both elements are unequal.\n\n\ndefmodule HumanEval do\n def count_Pairs(a, r, r, ,, , n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_564_count_Pairs.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_Pairs\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_Pairs end)\n candidate = fn args -> apply(HumanEval, count_Pairs, args) end\n assert 2 == candidate.([[1, 2, 1], 3])\n assert 0 == candidate.([[1, 1, 1, 1], 4])\n assert 10 == candidate.([[1, 2, 3, 4, 5], 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_565_split", "language": "elixir", "prompt": "# Write an elixirthon function to split a string into characters.\n\n\ndefmodule HumanEval do\n def split(w, o, r, d) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_565_split.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"split\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :split end)\n candidate = fn args -> apply(HumanEval, split, args) end\n assert [\"p\", \"y\", \"t\", \"h\", \"o\", \"n\"] == candidate.([\"python\"])\n assert [\"N\", \"a\", \"m\", \"e\"] == candidate.([\"Name\"])\n assert [\"p\", \"r\", \"o\", \"g\", \"r\", \"a\", \"m\"] == candidate.([\"program\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_566_sum_digits", "language": "elixir", "prompt": "# Write a function to get the sum of the digits of a non-negative integer.\n\n\ndefmodule HumanEval do\n def sum_digits(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_566_sum_digits.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_digits\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_digits end)\n candidate = fn args -> apply(HumanEval, sum_digits, args) end\n assert 12 == candidate.([345])\n assert 3 == candidate.([12])\n assert 16 == candidate.([97])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_567_issort_list", "language": "elixir", "prompt": "# Write a function to check whether a specified list is sorted or not.\n\n\ndefmodule HumanEval do\n def issort_list(l, i, s, t, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_567_issort_list.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"issort_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :issort_list end)\n candidate = fn args -> apply(HumanEval, issort_list, args) end\n assert true == candidate.([[1, 2, 4, 6, 8, 10, 12, 14, 16, 17]])\n assert false == candidate.([[1, 2, 4, 6, 8, 10, 12, 14, 20, 17]])\n assert false == candidate.([[1, 2, 4, 6, 8, 10, 15, 14, 20]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_568_empty_list", "language": "elixir", "prompt": "# Write a function to create a list of N empty dictionaries.\n\n\ndefmodule HumanEval do\n def empty_list(l, e, n, g, t, h) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_568_empty_list.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"empty_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :empty_list end)\n candidate = fn args -> apply(HumanEval, empty_list, args) end\n assert [%{}, %{}, %{}, %{}, %{}] == candidate.([5])\n assert [%{}, %{}, %{}, %{}, %{}, %{}] == candidate.([6])\n assert [%{}, %{}, %{}, %{}, %{}, %{}, %{}] == candidate.([7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_569_sort_sublists", "language": "elixir", "prompt": "# Write a function to sort each sublist of strings in a given list of lists.\n\n\ndefmodule HumanEval do\n def sort_sublists(l, i, s, t, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_569_sort_sublists.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sort_sublists\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sort_sublists end)\n candidate = fn args -> apply(HumanEval, sort_sublists, args) end\n assert [[\"green\", \"orange\"], [\"black\", \"white\"], [\"black\", \"orange\", \"white\"]] == candidate.([[[\"green\", \"orange\"], [\"black\", \"white\"], [\"white\", \"black\", \"orange\"]]])\n assert [[\"green\", \"orange\"], [\"black\"], [\"green\", \"orange\"], [\"white\"]] == candidate.([[[\"green\", \"orange\"], [\"black\"], [\"green\", \"orange\"], [\"white\"]]])\n assert [[\"a\", \"b\"], [\"c\", \"d\"], [\"g\", \"h\"], [\"e\", \"f\"]] == candidate.([[[\"a\", \"b\"], [\"d\", \"c\"], [\"g\", \"h\"], [\"f\", \"e\"]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_56_checks", "language": "elixir", "prompt": "# Write an elixirthon function to check if a given number is one less than twice its reverse.\n\n\ndefmodule HumanEval do\n def checks(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_56_checks.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"checks\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :checks end)\n candidate = fn args -> apply(HumanEval, checks, args) end\n assert false == candidate.([70])\n assert false == candidate.([23])\n assert true == candidate.([73])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_572_two_unique_nums", "language": "elixir", "prompt": "# Write an elixirthon function to remove duplicate numbers from a given number of lists.\n\n\ndefmodule HumanEval do\n def two_unique_nums(n, u, m, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_572_two_unique_nums.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"two_unique_nums\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :two_unique_nums end)\n candidate = fn args -> apply(HumanEval, two_unique_nums, args) end\n assert [1, 4, 5] == candidate.([[1, 2, 3, 2, 3, 4, 5]])\n assert [1, 3, 4, 5] == candidate.([[1, 2, 3, 2, 4, 5]])\n assert [1, 2, 3, 4, 5] == candidate.([[1, 2, 3, 4, 5]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_573_unique_product", "language": "elixir", "prompt": "# Write an elixirthon function to calculate the product of the unique numbers in a given list.\n\n\ndefmodule HumanEval do\n def unique_product(l, i, s, t, _, d, a, t, a) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_573_unique_product.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"unique_product\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :unique_product end)\n candidate = fn args -> apply(HumanEval, unique_product, args) end\n assert 720000000 == candidate.([[10, 20, 30, 40, 20, 50, 60, 40]])\n assert 6 == candidate.([[1, 2, 3, 1]])\n assert 0 == candidate.([[7, 8, 9, 0, 1, 1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_574_surfacearea_cylinder", "language": "elixir", "prompt": "# Write a function to find the surface area of a cylinder.\n\n\ndefmodule HumanEval do\n def surfacearea_cylinder(r, ,, , h) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_574_surfacearea_cylinder.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"surfacearea_cylinder\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :surfacearea_cylinder end)\n candidate = fn args -> apply(HumanEval, surfacearea_cylinder, args) end\n assert 942.45 == candidate.([10, 5])\n assert 226.18800000000002 == candidate.([4, 5])\n assert 351.848 == candidate.([4, 10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_576_is_Sub_Array", "language": "elixir", "prompt": "# Write an elixirthon function to check whether a list is sublist of another or not.\n\n\ndefmodule HumanEval do\n def is_Sub_Array(A, ,, , B) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_576_is_Sub_Array.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_Sub_Array\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_Sub_Array end)\n candidate = fn args -> apply(HumanEval, is_Sub_Array, args) end\n assert false == candidate.([[1, 4, 3, 5], [1, 2]])\n assert true == candidate.([[1, 2, 1], [1, 2, 1]])\n assert false == candidate.([[1, 0, 2, 2], [2, 2, 0]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_577_last_Digit_Factorial", "language": "elixir", "prompt": "# Write an elixirthon function to find the last digit in factorial of a given number.\n\n\ndefmodule HumanEval do\n def last_Digit_Factorial(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_577_last_Digit_Factorial.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"last_Digit_Factorial\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :last_Digit_Factorial end)\n candidate = fn args -> apply(HumanEval, last_Digit_Factorial, args) end\n assert 4 == candidate.([4])\n assert 0 == candidate.([21])\n assert 0 == candidate.([30])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_578_interleave_lists", "language": "elixir", "prompt": "# Write a function to interleave 3 lists of the same length into a single flat list.\n\n\ndefmodule HumanEval do\n def interleave_lists(l, i, s, t, 1, ,, , l, i, s, t, 2, ,, , l, i, s, t, 3) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_578_interleave_lists.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"interleave_lists\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :interleave_lists end)\n candidate = fn args -> apply(HumanEval, interleave_lists, args) end\n assert [1, 10, 100, 2, 20, 200, 3, 30, 300, 4, 40, 400, 5, 50, 500, 6, 60, 600, 7, 70, 700] == candidate.([[1, 2, 3, 4, 5, 6, 7], [10, 20, 30, 40, 50, 60, 70], [100, 200, 300, 400, 500, 600, 700]])\n assert [10, 15, 5, 20, 2, 10] == candidate.([[10, 20], [15, 2], [5, 10]])\n assert [11, 10, 20, 44, 15, 5] == candidate.([[11, 44], [10, 15], [20, 5]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_579_find_dissimilar", "language": "elixir", "prompt": "# Write a function to find the dissimilar elements in the given two tuples.\n\n\ndefmodule HumanEval do\n def find_dissimilar(t, e, s, t, _, t, u, p, 1, ,, , t, e, s, t, _, t, u, p, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_579_find_dissimilar.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_dissimilar\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_dissimilar end)\n candidate = fn args -> apply(HumanEval, find_dissimilar, args) end\n assert {3, 6, 7, 10} == candidate.([{3, 4, 5, 6}, {5, 7, 4, 10}])\n assert {1, 4, 7, 9} == candidate.([{1, 2, 3, 4}, {7, 2, 3, 9}])\n assert {34, 36, 11, 25} == candidate.([{21, 11, 25, 26}, {26, 34, 21, 36}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_57_find_Max_Num", "language": "elixir", "prompt": "# Write an elixirthon function to find the largest number that can be formed with the given list of digits.\n\n\ndefmodule HumanEval do\n def find_Max_Num(a, r, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_57_find_Max_Num.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_Max_Num\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_Max_Num end)\n candidate = fn args -> apply(HumanEval, find_Max_Num, args) end\n assert 321 == candidate.([[1, 2, 3]])\n assert 6541 == candidate.([[4, 5, 6, 1]])\n assert 9321 == candidate.([[1, 2, 3, 9]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_580_extract_even", "language": "elixir", "prompt": "# Write a function to remove uneven elements in the nested mixed tuple.\n\n\ndefmodule HumanEval do\n def extract_even(t, e, s, t, _, t, u, p, l, e) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_580_extract_even.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"extract_even\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :extract_even end)\n candidate = fn args -> apply(HumanEval, extract_even, args) end\n assert {4, {6, {2, 4}}, 6, 8} == candidate.([{4, 5, {7, 6, {2, 4}}, 6, 8}])\n assert {6, {8, {4, 8}}} == candidate.([{5, 6, {8, 7, {4, 8}}, 7, 9}])\n assert {6, {8, {4, 6}}, 8, 10} == candidate.([{5, 6, {9, 8, {4, 6}}, 8, 10}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_581_surface_Area", "language": "elixir", "prompt": "# Write an elixirthon function to find the surface area of a square elixirramid with a given base edge and height.\n\n\ndefmodule HumanEval do\n def surface_Area(b, ,, , s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_581_surface_Area.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"surface_Area\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :surface_Area end)\n candidate = fn args -> apply(HumanEval, surface_Area, args) end\n assert 33 == candidate.([3, 4])\n assert 56 == candidate.([4, 5])\n assert 5 == candidate.([1, 2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_583_catalan_number", "language": "elixir", "prompt": "# Write a function which returns nth catalan number.\n\n\ndefmodule HumanEval do\n def catalan_number(n, u, m) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_583_catalan_number.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"catalan_number\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :catalan_number end)\n candidate = fn args -> apply(HumanEval, catalan_number, args) end\n assert 16796 == candidate.([10])\n assert 4862 == candidate.([9])\n assert 429 == candidate.([7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_584_find_adverbs", "language": "elixir", "prompt": "# Write a function to find the first adverb ending with ly and its positions in a given string.\n\n\ndefmodule HumanEval do\n def find_adverbs(t, e, x, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_584_find_adverbs.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_adverbs\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_adverbs end)\n candidate = fn args -> apply(HumanEval, find_adverbs, args) end\n assert \"0-7: Clearly\" == candidate.([\"Clearly, he has no excuse for such behavior.\"])\n assert \"28-36: carefuly\" == candidate.([\"Please handle the situation carefuly\"])\n assert \"18-25: quickly\" == candidate.([\"Complete the task quickly\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_585_expensive_items", "language": "elixir", "prompt": "# Write a function to find the n most expensive items in a given dataset.\n\n\ndefmodule HumanEval do\n def expensive_items(i, t, e, m, s, ,, , n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_585_expensive_items.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"expensive_items\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :expensive_items end)\n candidate = fn args -> apply(HumanEval, expensive_items, args) end\n assert [%{\"name\" => \"Item-2\", \"price\" => 555.22}] == candidate.([[%{\"name\" => \"Item-1\", \"price\" => 101.1}, %{\"name\" => \"Item-2\", \"price\" => 555.22}], 1])\n assert [%{\"name\" => \"Item-2\", \"price\" => 555.22}, %{\"name\" => \"Item-1\", \"price\" => 101.1}] == candidate.([[%{\"name\" => \"Item-1\", \"price\" => 101.1}, %{\"name\" => \"Item-2\", \"price\" => 555.22}, %{\"name\" => \"Item-3\", \"price\" => 45.09}], 2])\n assert [%{\"name\" => \"Item-2\", \"price\" => 555.22}] == candidate.([[%{\"name\" => \"Item-1\", \"price\" => 101.1}, %{\"name\" => \"Item-2\", \"price\" => 555.22}, %{\"name\" => \"Item-3\", \"price\" => 45.09}, %{\"name\" => \"Item-4\", \"price\" => 22.75}], 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_586_split_Arr", "language": "elixir", "prompt": "# Write an elixirthon function to split a list at the nth eelment and add the first part to the end.\n\n\ndefmodule HumanEval do\n def split_Arr(l, ,, , n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_586_split_Arr.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"split_Arr\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :split_Arr end)\n candidate = fn args -> apply(HumanEval, split_Arr, args) end\n assert [5, 6, 52, 36, 12, 10] == candidate.([[12, 10, 5, 6, 52, 36], 2])\n assert [2, 3, 4, 1] == candidate.([[1, 2, 3, 4], 1])\n assert [3, 4, 5, 6, 7, 0, 1, 2] == candidate.([[0, 1, 2, 3, 4, 5, 6, 7], 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_587_list_tuple", "language": "elixir", "prompt": "# Write a function to convert a list to a tuple.\n\n\ndefmodule HumanEval do\n def list_tuple(l, i, s, t, x) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_587_list_tuple.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"list_tuple\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :list_tuple end)\n candidate = fn args -> apply(HumanEval, list_tuple, args) end\n assert {5, 10, 7, 4, 15, 3} == candidate.([[5, 10, 7, 4, 15, 3]])\n assert {2, 4, 5, 6, 2, 3, 4, 4, 7} == candidate.([[2, 4, 5, 6, 2, 3, 4, 4, 7]])\n assert {58, 44, 56} == candidate.([[58, 44, 56]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_588_big_diff", "language": "elixir", "prompt": "# Write an elixirthon function to find the difference between largest and smallest value in a given list.\n\n\ndefmodule HumanEval do\n def big_diff(n, u, m, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_588_big_diff.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"big_diff\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :big_diff end)\n candidate = fn args -> apply(HumanEval, big_diff, args) end\n assert 3 == candidate.([[1, 2, 3, 4]])\n assert 8 == candidate.([[4, 5, 12]])\n assert 7 == candidate.([[9, 2, 3]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_589_perfect_squares", "language": "elixir", "prompt": "# Write a function to find perfect squares between two given numbers.\n\n\ndefmodule HumanEval do\n def perfect_squares(a, ,, , b) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_589_perfect_squares.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"perfect_squares\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :perfect_squares end)\n candidate = fn args -> apply(HumanEval, perfect_squares, args) end\n assert [1, 4, 9, 16, 25] == candidate.([1, 30])\n assert [64, 81, 100] == candidate.([50, 100])\n assert [100, 121, 144, 169, 196] == candidate.([100, 200])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_58_opposite_Signs", "language": "elixir", "prompt": "# Write an elixirthon function to check whether the given two integers have opposite sign or not.\n\n\ndefmodule HumanEval do\n def opposite_Signs(x, ,, , y) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_58_opposite_Signs.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"opposite_Signs\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :opposite_Signs end)\n candidate = fn args -> apply(HumanEval, opposite_Signs, args) end\n assert true == candidate.([1, -2])\n assert false == candidate.([3, 2])\n assert false == candidate.([-10, -10])\n assert true == candidate.([-2, 2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_591_swap_List", "language": "elixir", "prompt": "# Write an elixirthon function to interchange the first and last elements in a list.\n\n\ndefmodule HumanEval do\n def swap_List(n, e, w, L, i, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_591_swap_List.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"swap_List\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :swap_List end)\n candidate = fn args -> apply(HumanEval, swap_List, args) end\n assert [24, 35, 9, 56, 12] == candidate.([[12, 35, 9, 56, 24]])\n assert [3, 2, 1] == candidate.([[1, 2, 3]])\n assert [6, 5, 4] == candidate.([[4, 5, 6]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_592_sum_Of_product", "language": "elixir", "prompt": "# Write an elixirthon function to find the sum of the product of consecutive binomial co-efficients.\n\n\ndefmodule HumanEval do\n def sum_Of_product(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_592_sum_Of_product.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_Of_product\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_Of_product end)\n candidate = fn args -> apply(HumanEval, sum_Of_product, args) end\n assert 15 == candidate.([3])\n assert 56 == candidate.([4])\n assert 1 == candidate.([1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_593_removezero_ip", "language": "elixir", "prompt": "# Write a function to remove leading zeroes from an ip address.\n\n\ndefmodule HumanEval do\n def removezero_ip(i, p) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_593_removezero_ip.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"removezero_ip\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :removezero_ip end)\n candidate = fn args -> apply(HumanEval, removezero_ip, args) end\n assert \"216.8.94.196\" == candidate.([\"216.08.094.196\"])\n assert \"12.1.24\" == candidate.([\"12.01.024\"])\n assert \"216.8.94.196\" == candidate.([\"216.08.094.0196\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_594_diff_even_odd", "language": "elixir", "prompt": "# Write a function to find the difference of the first even and first odd number of a given list.\n\n\ndefmodule HumanEval do\n def diff_even_odd(l, i, s, t, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_594_diff_even_odd.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"diff_even_odd\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :diff_even_odd end)\n candidate = fn args -> apply(HumanEval, diff_even_odd, args) end\n assert 3 == candidate.([[1, 3, 5, 7, 4, 1, 6, 8]])\n assert 1 == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]])\n assert 9 == candidate.([[1, 5, 7, 9, 10]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_595_min_Swaps", "language": "elixir", "prompt": "# Write an elixirthon function to count minimum number of swaps required to convert one binary number represented as a string to another.\n\n\ndefmodule HumanEval do\n def min_Swaps(s, t, r, 1, ,, , s, t, r, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_595_min_Swaps.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"min_Swaps\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :min_Swaps end)\n candidate = fn args -> apply(HumanEval, min_Swaps, args) end\n assert 1 == candidate.([\"1101\", \"1110\"])\n assert \"Not Possible\" == candidate.([\"111\", \"000\"])\n assert \"Not Possible\" == candidate.([\"111\", \"110\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_597_find_kth", "language": "elixir", "prompt": "# Write a function to find kth element from the given two sorted lists.\n\n\ndefmodule HumanEval do\n def find_kth(a, r, r, 1, ,, , a, r, r, 2, ,, , k) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_597_find_kth.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_kth\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_kth end)\n candidate = fn args -> apply(HumanEval, find_kth, args) end\n assert 6 == candidate.([[2, 3, 6, 7, 9], [1, 4, 8, 10], 5])\n assert 256 == candidate.([[100, 112, 256, 349, 770], [72, 86, 113, 119, 265, 445, 892], 7])\n assert 8 == candidate.([[3, 4, 7, 8, 10], [2, 5, 9, 11], 6])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_598_armstrong_number", "language": "elixir", "prompt": "# Write a function to check whether the given number is armstrong or not.\n\n\ndefmodule HumanEval do\n def armstrong_number(n, u, m, b, e, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_598_armstrong_number.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"armstrong_number\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :armstrong_number end)\n candidate = fn args -> apply(HumanEval, armstrong_number, args) end\n assert true == candidate.([153])\n assert false == candidate.([259])\n assert false == candidate.([4458])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_599_sum_average", "language": "elixir", "prompt": "# Write a function to find sum and average of first n natural numbers.\n\n\ndefmodule HumanEval do\n def sum_average(n, u, m, b, e, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_599_sum_average.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_average\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_average end)\n candidate = fn args -> apply(HumanEval, sum_average, args) end\n assert {55, 5.5} == candidate.([10])\n assert {120, 8.0} == candidate.([15])\n assert {210, 10.5} == candidate.([20])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_59_is_octagonal", "language": "elixir", "prompt": "# Write a function to find the nth octagonal number.\n\n\ndefmodule HumanEval do\n def is_octagonal(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_59_is_octagonal.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_octagonal\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_octagonal end)\n candidate = fn args -> apply(HumanEval, is_octagonal, args) end\n assert 65 == candidate.([5])\n assert 280 == candidate.([10])\n assert 645 == candidate.([15])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_600_is_Even", "language": "elixir", "prompt": "# Write an elixirthon function to check whether the given number is even or not.\n\n\ndefmodule HumanEval do\n def is_Even(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_600_is_Even.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_Even\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_Even end)\n candidate = fn args -> apply(HumanEval, is_Even, args) end\n assert false == candidate.([1])\n assert true == candidate.([2])\n assert false == candidate.([3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_602_first_repeated_char", "language": "elixir", "prompt": "# Write an elixirthon function to find the first repeated character in a given string.\n\n\ndefmodule HumanEval do\n def first_repeated_char(s, t, r, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_602_first_repeated_char.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"first_repeated_char\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :first_repeated_char end)\n candidate = fn args -> apply(HumanEval, first_repeated_char, args) end\n assert \"a\" == candidate.([\"abcabc\"])\n assert nil == candidate.([\"abc\"])\n assert \"1\" == candidate.([\"123123\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_603_get_ludic", "language": "elixir", "prompt": "# Write a function to get all lucid numbers smaller than or equal to a given integer.\n\n\ndefmodule HumanEval do\n def get_ludic(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_603_get_ludic.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"get_ludic\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :get_ludic end)\n candidate = fn args -> apply(HumanEval, get_ludic, args) end\n assert [1, 2, 3, 5, 7] == candidate.([10])\n assert [1, 2, 3, 5, 7, 11, 13, 17, 23, 25] == candidate.([25])\n assert [1, 2, 3, 5, 7, 11, 13, 17, 23, 25, 29, 37, 41, 43] == candidate.([45])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_604_reverse_words", "language": "elixir", "prompt": "# Write a function to reverse words seperated by spaces in a given string.\n\n\ndefmodule HumanEval do\n def reverse_words(s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_604_reverse_words.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"reverse_words\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :reverse_words end)\n candidate = fn args -> apply(HumanEval, reverse_words, args) end\n assert \"program python\" == candidate.([\"python program\"])\n assert \"language java\" == candidate.([\"java language\"])\n assert \"man indian\" == candidate.([\"indian man\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_605_prime_num", "language": "elixir", "prompt": "# Write a function to check if the given integer is a prime number.\n\n\ndefmodule HumanEval do\n def prime_num(n, u, m) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_605_prime_num.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"prime_num\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :prime_num end)\n candidate = fn args -> apply(HumanEval, prime_num, args) end\n assert true == candidate.([13])\n assert true == candidate.([7])\n assert false == candidate.([-1010])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_606_radian_degree", "language": "elixir", "prompt": "# Write a function to convert degrees to radians.\n\n\ndefmodule HumanEval do\n def radian_degree(d, e, g, r, e, e) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_606_radian_degree.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"radian_degree\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :radian_degree end)\n candidate = fn args -> apply(HumanEval, radian_degree, args) end\n assert 1.5707963267948966 == candidate.([90])\n assert 1.0471975511965976 == candidate.([60])\n assert 2.0943951023931953 == candidate.([120])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_607_find_literals", "language": "elixir", "prompt": "# Write a function to search a string for a regex pattern. The function should return the matching subtring, a start index and an end index.\n\n\ndefmodule HumanEval do\n def find_literals(t, e, x, t, ,, , p, a, t, t, e, r, n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_607_find_literals.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_literals\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_literals end)\n candidate = fn args -> apply(HumanEval, find_literals, args) end\n assert {\"fox\", 16, 19} == candidate.([\"The quick brown fox jumps over the lazy dog.\", \"fox\"])\n assert {\"crazy\", 16, 21} == candidate.([\"Its been a very crazy procedure right\", \"crazy\"])\n assert {\"will\", 35, 39} == candidate.([\"Hardest choices required strongest will\", \"will\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_608_bell_Number", "language": "elixir", "prompt": "# Write an elixirthon function to find nth bell number.\n\n\ndefmodule HumanEval do\n def bell_Number(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_608_bell_Number.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"bell_Number\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :bell_Number end)\n candidate = fn args -> apply(HumanEval, bell_Number, args) end\n assert 2 == candidate.([2])\n assert 5 == candidate.([3])\n assert 15 == candidate.([4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_610_remove_kth_element", "language": "elixir", "prompt": "# Write an elixirthon function which takes a list and returns a list with the same elements, but the k'th element removed.\n\n\ndefmodule HumanEval do\n def remove_kth_element(l, i, s, t, 1, ,, , L) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_610_remove_kth_element.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_kth_element\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_kth_element end)\n candidate = fn args -> apply(HumanEval, remove_kth_element, args) end\n assert [1, 1, 3, 4, 4, 5, 1] == candidate.([[1, 1, 2, 3, 4, 4, 5, 1], 3])\n assert [0, 0, 1, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4] == candidate.([[0, 0, 1, 2, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4], 4])\n assert [10, 10, 15, 19, 18, 17, 26, 26, 17, 18, 10] == candidate.([[10, 10, 15, 19, 18, 18, 17, 26, 26, 17, 18, 10], 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_611_max_of_nth", "language": "elixir", "prompt": "# Write a function which given a matrix represented as a list of lists returns the max of the n'th column.\n\n\ndefmodule HumanEval do\n def max_of_nth(t, e, s, t, _, l, i, s, t, ,, , N) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_611_max_of_nth.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_of_nth\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_of_nth end)\n candidate = fn args -> apply(HumanEval, max_of_nth, args) end\n assert 19 == candidate.([[[5, 6, 7], [1, 3, 5], [8, 9, 19]], 2])\n assert 10 == candidate.([[[6, 7, 8], [2, 4, 6], [9, 10, 20]], 1])\n assert 11 == candidate.([[[7, 8, 9], [3, 5, 7], [10, 11, 21]], 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_612_merge", "language": "elixir", "prompt": "# Write an elixirthon function which takes a list of lists, where each sublist has two elements, and returns a list of two lists where the first list has the first element of each sublist and the second one has the second.\n\n\ndefmodule HumanEval do\n def merge(l, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_612_merge.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"merge\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :merge end)\n candidate = fn args -> apply(HumanEval, merge, args) end\n assert [[\"x\", \"a\", \"m\"], [\"y\", \"b\", \"n\"]] == candidate.([[[\"x\", \"y\"], [\"a\", \"b\"], [\"m\", \"n\"]]])\n assert [[1, 3, 5, 7], [2, 4, 6, 8]] == candidate.([[[1, 2], [3, 4], [5, 6], [7, 8]]])\n assert [[\"x\", \"a\", \"m\"], [\"y\", \"b\", \"n\"], [\"z\", \"c\", \"o\"]] == candidate.([[[\"x\", \"y\", \"z\"], [\"a\", \"b\", \"c\"], [\"m\", \"n\", \"o\"]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_614_cummulative_sum", "language": "elixir", "prompt": "# Write a function to find the cumulative sum of all the values that are present in the given list of lists.\n\n\ndefmodule HumanEval do\n def cummulative_sum(t, e, s, t, _, l, i, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_614_cummulative_sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"cummulative_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :cummulative_sum end)\n candidate = fn args -> apply(HumanEval, cummulative_sum, args) end\n assert 30 == candidate.([[[1, 3], [5, 6, 7], [2, 6]]])\n assert 37 == candidate.([[[2, 4], [6, 7, 8], [3, 7]]])\n assert 44 == candidate.([[[3, 5], [7, 8, 9], [4, 8]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_615_average_tuple", "language": "elixir", "prompt": "# Write a function which takes a lists of lists and returns the average value for each sublist as a list.\n\n\ndefmodule HumanEval do\n def average_tuple(n, u, m, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_615_average_tuple.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"average_tuple\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :average_tuple end)\n candidate = fn args -> apply(HumanEval, average_tuple, args) end\n assert [30.5, 34.25, 27.0, 23.25] == candidate.([[[10, 10, 10, 12], [30, 45, 56, 45], [81, 80, 39, 32], [1, 2, 3, 4]]])\n assert [25.5, -18.0, 3.75] == candidate.([[[1, 1, -5], [30, -15, 56], [81, -60, -39], [-10, 2, 3]]])\n assert [305.0, 342.5, 270.0, 232.5] == candidate.([[[100, 100, 100, 120], [300, 450, 560, 450], [810, 800, 390, 320], [10, 20, 30, 40]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_616_tuple_modulo", "language": "elixir", "prompt": "# Write a function which takes two tuples of the same length and performs the element wise modulo.\n\n\ndefmodule HumanEval do\n def tuple_modulo(t, e, s, t, _, t, u, p, 1, ,, , t, e, s, t, _, t, u, p, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_616_tuple_modulo.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"tuple_modulo\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :tuple_modulo end)\n candidate = fn args -> apply(HumanEval, tuple_modulo, args) end\n assert {0, 4, 5, 1} == candidate.([{10, 4, 5, 6}, {5, 6, 7, 5}])\n assert {5, 5, 6, 1} == candidate.([{11, 5, 6, 7}, {6, 7, 8, 6}])\n assert {5, 6, 7, 1} == candidate.([{12, 6, 7, 8}, {7, 8, 9, 7}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_617_min_Jumps", "language": "elixir", "prompt": "# Write a function to check for the number of jumps required of given length to reach a point of form (d, 0) from origin in a 2d plane.\n\n\ndefmodule HumanEval do\n def min_Jumps(s, t, e, p, s, ,, , d) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_617_min_Jumps.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"min_Jumps\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :min_Jumps end)\n candidate = fn args -> apply(HumanEval, min_Jumps, args) end\n assert 3.5 == candidate.([{3, 4}, 11])\n assert 0 == candidate.([{3, 4}, 0])\n assert 1 == candidate.([{11, 14}, 11])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_618_div_list", "language": "elixir", "prompt": "# Write a function to divide two lists element wise.\n\n\ndefmodule HumanEval do\n def div_list(n, u, m, s, 1, ,, , n, u, m, s, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_618_div_list.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"div_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :div_list end)\n candidate = fn args -> apply(HumanEval, div_list, args) end\n assert [4.0, 2.5, 2.0] == candidate.([[4, 5, 6], [1, 2, 3]])\n assert [3.0, 0.5] == candidate.([[3, 2], [1, 4]])\n assert [1.8, 1.7142857142857142] == candidate.([[90, 120], [50, 70]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_619_move_num", "language": "elixir", "prompt": "# Write a function to move all the numbers to the end of the given string.\n\n\ndefmodule HumanEval do\n def move_num(t, e, s, t, _, s, t, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_619_move_num.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"move_num\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :move_num end)\n candidate = fn args -> apply(HumanEval, move_num, args) end\n assert \"Iloveyouthreethousand1143553000\" == candidate.([\"I1love143you55three3000thousand\"])\n assert \"AvengersAssemble124\" == candidate.([\"Avengers124Assemble\"])\n assert \"Itsourpathtoseethingsdothings11121314151617\" == candidate.([\"Its11our12path13to14see15things16do17things\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_61_count_Substrings", "language": "elixir", "prompt": "# Write an elixirthon function to count the number of substrings with the sum of digits equal to their length.\n\n\ndefmodule HumanEval do\n def count_Substrings(s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_61_count_Substrings.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_Substrings\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_Substrings end)\n candidate = fn args -> apply(HumanEval, count_Substrings, args) end\n assert 6 == candidate.([\"112112\"])\n assert 6 == candidate.([\"111\"])\n assert 12 == candidate.([\"1101112\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_622_get_median", "language": "elixir", "prompt": "# Write a function to find the median of two sorted lists of same size.\n\n\ndefmodule HumanEval do\n def get_median(a, r, r, 1, ,, , a, r, r, 2, ,, , n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_622_get_median.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"get_median\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :get_median end)\n candidate = fn args -> apply(HumanEval, get_median, args) end\n assert 16.0 == candidate.([[1, 12, 15, 26, 38], [2, 13, 17, 30, 45], 5])\n assert 8.5 == candidate.([[2, 4, 8, 9], [7, 13, 19, 28], 4])\n assert 25.0 == candidate.([[3, 6, 14, 23, 36, 42], [2, 18, 27, 39, 49, 55], 6])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_623_nth_nums", "language": "elixir", "prompt": "# Write a function to compute the n-th power of each number in a list.\n\n\ndefmodule HumanEval do\n def nth_nums(n, u, m, s, ,, , n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_623_nth_nums.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"nth_nums\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :nth_nums end)\n candidate = fn args -> apply(HumanEval, nth_nums, args) end\n assert [1, 4, 9, 16, 25, 36, 49, 64, 81, 100] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 2])\n assert [1000, 8000, 27000] == candidate.([[10, 20, 30], 3])\n assert [248832, 759375] == candidate.([[12, 15], 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_624_is_upper", "language": "elixir", "prompt": "# Write an elixirthon function to convert a given string to uppercase.\n\n\ndefmodule HumanEval do\n def is_upper(s, t, r, i, n, g) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_624_is_upper.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_upper\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_upper end)\n candidate = fn args -> apply(HumanEval, is_upper, args) end\n assert \"PERSON\" == candidate.([\"person\"])\n assert \"FINAL\" == candidate.([\"final\"])\n assert \"VALID\" == candidate.([\"Valid\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_625_swap_List", "language": "elixir", "prompt": "# Write an elixirthon function to interchange the first and last element in a given list.\n\n\ndefmodule HumanEval do\n def swap_List(n, e, w, L, i, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_625_swap_List.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"swap_List\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :swap_List end)\n candidate = fn args -> apply(HumanEval, swap_List, args) end\n assert [3, 2, 1] == candidate.([[1, 2, 3]])\n assert [4, 2, 3, 4, 1] == candidate.([[1, 2, 3, 4, 4]])\n assert [6, 5, 4] == candidate.([[4, 5, 6]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_626_triangle_area", "language": "elixir", "prompt": "# Write an elixirthon function to find the area of the largest triangle that can be inscribed in a semicircle with a given radius.\n\n\ndefmodule HumanEval do\n def triangle_area(r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_626_triangle_area.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"triangle_area\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :triangle_area end)\n candidate = fn args -> apply(HumanEval, triangle_area, args) end\n assert nil == candidate.([-1])\n assert 0 == candidate.([0])\n assert 4 == candidate.([2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_627_find_First_Missing", "language": "elixir", "prompt": "# Write an elixirthon function to find the smallest missing number from a sorted list of natural numbers.\n\n\ndefmodule HumanEval do\n def find_First_Missing(a, r, r, a, y) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_627_find_First_Missing.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_First_Missing\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_First_Missing end)\n candidate = fn args -> apply(HumanEval, find_First_Missing, args) end\n assert 4 == candidate.([[0, 1, 2, 3]])\n assert 3 == candidate.([[0, 1, 2, 6, 9]])\n assert 0 == candidate.([[2, 3, 5, 8, 9]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_628_replace_spaces", "language": "elixir", "prompt": "# Write a function to replace all spaces in the given string with '%20'.\n\n\ndefmodule HumanEval do\n def replace_spaces(s, t, r, i, n, g) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_628_replace_spaces.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"replace_spaces\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :replace_spaces end)\n candidate = fn args -> apply(HumanEval, replace_spaces, args) end\n assert \"My%20Name%20is%20Dawood\" == candidate.([\"My Name is Dawood\"])\n assert \"I%20am%20a%20Programmer\" == candidate.([\"I am a Programmer\"])\n assert \"I%20love%20Coding\" == candidate.([\"I love Coding\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_629_Split", "language": "elixir", "prompt": "# Write an elixirthon function to find even numbers from a list of numbers.\n\n\ndefmodule HumanEval do\n def Split(l, i, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_629_Split.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"Split\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :Split end)\n candidate = fn args -> apply(HumanEval, Split, args) end\n assert [2, 4] == candidate.([[1, 2, 3, 4, 5]])\n assert [4, 6, 8, 0] == candidate.([[4, 5, 6, 7, 8, 0, 1]])\n assert [8, 12] == candidate.([[8, 12, 15, 19]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_62_smallest_num", "language": "elixir", "prompt": "# Write an elixirthon function to find smallest number in a list.\n\n\ndefmodule HumanEval do\n def smallest_num(x, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_62_smallest_num.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"smallest_num\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :smallest_num end)\n candidate = fn args -> apply(HumanEval, smallest_num, args) end\n assert 1 == candidate.([[10, 20, 1, 45, 99]])\n assert 1 == candidate.([[1, 2, 3]])\n assert 45 == candidate.([[45, 46, 50, 60]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_630_get_coordinates", "language": "elixir", "prompt": "# Write a function to extract all the adjacent coordinates of the given coordinate tuple.\n\n\ndefmodule HumanEval do\n def get_coordinates(t, e, s, t, _, t, u, p) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_630_get_coordinates.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"get_coordinates\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :get_coordinates end)\n candidate = fn args -> apply(HumanEval, get_coordinates, args) end\n assert [[2, 3], [2, 4], [2, 5], [3, 3], [3, 4], [3, 5], [4, 3], [4, 4], [4, 5]] == candidate.([{3, 4}])\n assert [[3, 4], [3, 5], [3, 6], [4, 4], [4, 5], [4, 6], [5, 4], [5, 5], [5, 6]] == candidate.([{4, 5}])\n assert [[4, 5], [4, 6], [4, 7], [5, 5], [5, 6], [5, 7], [6, 5], [6, 6], [6, 7]] == candidate.([{5, 6}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_631_replace_spaces", "language": "elixir", "prompt": "# Write a function to replace whitespaces with an underscore and vice versa in a given string.\n\n\ndefmodule HumanEval do\n def replace_spaces(t, e, x, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_631_replace_spaces.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"replace_spaces\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :replace_spaces end)\n candidate = fn args -> apply(HumanEval, replace_spaces, args) end\n assert \"Jumanji_The_Jungle\" == candidate.([\"Jumanji The Jungle\"])\n assert \"The Avengers\" == candidate.([\"The_Avengers\"])\n assert \"Fast_and_Furious\" == candidate.([\"Fast and Furious\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_632_move_zero", "language": "elixir", "prompt": "# Write an elixirthon function to move all zeroes to the end of the given list.\n\n\ndefmodule HumanEval do\n def move_zero(n, u, m, _, l, i, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_632_move_zero.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"move_zero\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :move_zero end)\n candidate = fn args -> apply(HumanEval, move_zero, args) end\n assert [1, 2, 3, 4, 0, 0] == candidate.([[1, 0, 2, 0, 3, 4]])\n assert [2, 3, 2, 4, 5, 0, 0, 0, 0] == candidate.([[2, 3, 2, 0, 0, 4, 0, 5, 0]])\n assert [1, 1, 1, 0, 0] == candidate.([[0, 1, 0, 1, 1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_633_pair_xor_Sum", "language": "elixir", "prompt": "# Write an elixirthon function to find the sum of xor of all pairs of numbers in the given list.\n\n\ndefmodule HumanEval do\n def pair_xor_Sum(a, r, r, ,, , n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_633_pair_xor_Sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"pair_xor_Sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :pair_xor_Sum end)\n candidate = fn args -> apply(HumanEval, pair_xor_Sum, args) end\n assert 47 == candidate.([[5, 9, 7, 6], 4])\n assert 12 == candidate.([[7, 3, 5], 3])\n assert 4 == candidate.([[7, 3], 2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_635_heap_sort", "language": "elixir", "prompt": "# Write a function to sort the given list.\n\n\ndefmodule HumanEval do\n def heap_sort(i, t, e, r, a, b, l, e) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_635_heap_sort.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"heap_sort\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :heap_sort end)\n candidate = fn args -> apply(HumanEval, heap_sort, args) end\n assert [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] == candidate.([[1, 3, 5, 7, 9, 2, 4, 6, 8, 0]])\n assert [14, 22, 25, 25, 35, 58, 65, 75, 85] == candidate.([[25, 35, 22, 85, 14, 65, 75, 25, 58]])\n assert [1, 5, 7, 9] == candidate.([[7, 1, 9, 5]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_637_noprofit_noloss", "language": "elixir", "prompt": "# Write a function to check whether the given amount has no profit and no loss\n\n\ndefmodule HumanEval do\n def noprofit_noloss(a, c, t, u, a, l, _, c, o, s, t, ,, , s, a, l, e, _, a, m, o, u, n, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_637_noprofit_noloss.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"noprofit_noloss\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :noprofit_noloss end)\n candidate = fn args -> apply(HumanEval, noprofit_noloss, args) end\n assert false == candidate.([1500, 1200])\n assert true == candidate.([100, 100])\n assert false == candidate.([2000, 5000])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_638_wind_chill", "language": "elixir", "prompt": "# Write a function to calculate the wind chill index rounded to the next integer given the wind velocity in km/h and a temperature in celsius.\n\n\ndefmodule HumanEval do\n def wind_chill(v, ,, , t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_638_wind_chill.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"wind_chill\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :wind_chill end)\n candidate = fn args -> apply(HumanEval, wind_chill, args) end\n assert 40 == candidate.([120, 35])\n assert 19 == candidate.([40, 20])\n assert 6 == candidate.([10, 8])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_639_sample_nam", "language": "elixir", "prompt": "# Write a function to sum the length of the names of a given list of names after removing the names that start with a lowercase letter.\n\n\ndefmodule HumanEval do\n def sample_nam(s, a, m, p, l, e, _, n, a, m, e, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_639_sample_nam.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sample_nam\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sample_nam end)\n candidate = fn args -> apply(HumanEval, sample_nam, args) end\n assert 16 == candidate.([[\"sally\", \"Dylan\", \"rebecca\", \"Diana\", \"Joanne\", \"keith\"]])\n assert 10 == candidate.([[\"php\", \"res\", \"Python\", \"abcd\", \"Java\", \"aaa\"]])\n assert 6 == candidate.([[\"abcd\", \"Python\", \"abba\", \"aba\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_63_max_difference", "language": "elixir", "prompt": "# Write a function to find the maximum difference between available pairs in the given tuple list.\n\n\ndefmodule HumanEval do\n def max_difference(t, e, s, t, _, l, i, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_63_max_difference.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_difference\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_difference end)\n candidate = fn args -> apply(HumanEval, max_difference, args) end\n assert 7 == candidate.([[{3, 5}, {1, 7}, {10, 3}, {1, 2}]])\n assert 15 == candidate.([[{4, 6}, {2, 17}, {9, 13}, {11, 12}]])\n assert 23 == candidate.([[{12, 35}, {21, 27}, {13, 23}, {41, 22}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_640_remove_parenthesis", "language": "elixir", "prompt": "# Write a function to remove the parenthesis and what is inbetween them from a string.\n\n\ndefmodule HumanEval do\n def remove_parenthesis(i, t, e, m, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_640_remove_parenthesis.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_parenthesis\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_parenthesis end)\n candidate = fn args -> apply(HumanEval, remove_parenthesis, args) end\n assert \"python\" == candidate.([[\"python (chrome)\"]])\n assert \"string\" == candidate.([[\"string(.abc)\"]])\n assert \"alpha\" == candidate.([[\"alpha(num)\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_641_is_nonagonal", "language": "elixir", "prompt": "# Write a function to find the nth nonagonal number.\n\n\ndefmodule HumanEval do\n def is_nonagonal(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_641_is_nonagonal.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_nonagonal\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_nonagonal end)\n candidate = fn args -> apply(HumanEval, is_nonagonal, args) end\n assert 325 == candidate.([10])\n assert 750 == candidate.([15])\n assert 1089 == candidate.([18])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_643_text_match_wordz_middle", "language": "elixir", "prompt": "# Write a function that checks if a strings contains 'z', except at the start and end of the word.\n\n\ndefmodule HumanEval do\n def text_match_wordz_middle(t, e, x, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_643_text_match_wordz_middle.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"text_match_wordz_middle\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :text_match_wordz_middle end)\n candidate = fn args -> apply(HumanEval, text_match_wordz_middle, args) end\n assert true == candidate.([\"pythonzabc.\"])\n assert false == candidate.([\"zxyabc.\"])\n assert false == candidate.([\" lang .\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_644_reverse_Array_Upto_K", "language": "elixir", "prompt": "# Write an elixirthon function to reverse a list upto a given position.\n\n\ndefmodule HumanEval do\n def reverse_Array_Upto_K(i, n, p, u, t, ,, , k) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_644_reverse_Array_Upto_K.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"reverse_Array_Upto_K\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :reverse_Array_Upto_K end)\n candidate = fn args -> apply(HumanEval, reverse_Array_Upto_K, args) end\n assert [4, 3, 2, 1, 5, 6] == candidate.([[1, 2, 3, 4, 5, 6], 4])\n assert [5, 4, 6, 7] == candidate.([[4, 5, 6, 7], 2])\n assert [7, 8, 9, 6, 5] == candidate.([[9, 8, 7, 6, 5], 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_64_subject_marks", "language": "elixir", "prompt": "# Write a function to sort a list of tuples using the second value of each tuple.\n\n\ndefmodule HumanEval do\n def subject_marks(s, u, b, j, e, c, t, m, a, r, k, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_64_subject_marks.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"subject_marks\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :subject_marks end)\n candidate = fn args -> apply(HumanEval, subject_marks, args) end\n assert [{\"Social sciences\", 82}, {\"English\", 88}, {\"Science\", 90}, {\"Maths\", 97}] == candidate.([[{\"English\", 88}, {\"Science\", 90}, {\"Maths\", 97}, {\"Social sciences\", 82}]])\n assert [{\"Social\", 33}, {\"Telugu\", 49}, {\"Hindhi\", 54}] == candidate.([[{\"Telugu\", 49}, {\"Hindhi\", 54}, {\"Social\", 33}]])\n assert [{\"Biology\", 45}, {\"Physics\", 96}, {\"Chemistry\", 97}] == candidate.([[{\"Physics\", 96}, {\"Chemistry\", 97}, {\"Biology\", 45}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_65_recursive_list_sum", "language": "elixir", "prompt": "# Write a function to flatten a list and sum all of its elements.\n\n\ndefmodule HumanEval do\n def recursive_list_sum(d, a, t, a, _, l, i, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_65_recursive_list_sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"recursive_list_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :recursive_list_sum end)\n candidate = fn args -> apply(HumanEval, recursive_list_sum, args) end\n assert 21 == candidate.([[1, 2, [3, 4], [5, 6]]])\n assert 106 == candidate.([[7, 10, [15, 14], [19, 41]]])\n assert 210 == candidate.([[10, 20, [30, 40], [50, 60]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_66_pos_count", "language": "elixir", "prompt": "# Write an elixirthon function to count the number of positive numbers in a list.\n\n\ndefmodule HumanEval do\n def pos_count(l, i, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_66_pos_count.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"pos_count\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :pos_count end)\n candidate = fn args -> apply(HumanEval, pos_count, args) end\n assert 2 == candidate.([[1, -2, 3, -4]])\n assert 3 == candidate.([[3, 4, 5, -1]])\n assert 4 == candidate.([[1, 2, 3, 4]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_67_bell_number", "language": "elixir", "prompt": "# Write a function to find the number of ways to partition a set of Bell numbers.\n\n\ndefmodule HumanEval do\n def bell_number(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_67_bell_number.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"bell_number\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :bell_number end)\n candidate = fn args -> apply(HumanEval, bell_number, args) end\n assert 2 == candidate.([2])\n assert 115975 == candidate.([10])\n assert 6775685320645824322581483068371419745979053216268760300 == candidate.([56])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_68_is_Monotonic", "language": "elixir", "prompt": "# Write an elixirthon function to check whether the given list is monotonic or not.\n\n\ndefmodule HumanEval do\n def is_Monotonic(A) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_68_is_Monotonic.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_Monotonic\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_Monotonic end)\n candidate = fn args -> apply(HumanEval, is_Monotonic, args) end\n assert true == candidate.([[6, 5, 4, 4]])\n assert true == candidate.([[1, 2, 2, 3]])\n assert false == candidate.([[1, 3, 2]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_69_is_sublist", "language": "elixir", "prompt": "# Write a function to check whether a list contains the given sublist or not.\n\n\ndefmodule HumanEval do\n def is_sublist(l, ,, , s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_69_is_sublist.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_sublist\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_sublist end)\n candidate = fn args -> apply(HumanEval, is_sublist, args) end\n assert false == candidate.([[2, 4, 3, 5, 7], [3, 7]])\n assert true == candidate.([[2, 4, 3, 5, 7], [4, 3]])\n assert false == candidate.([[2, 4, 3, 5, 7], [1, 6]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_6_differ_At_One_Bit_Pos", "language": "elixir", "prompt": "# Write an elixirthon function to check whether the two numbers differ at one bit position only or not.\n\n\ndefmodule HumanEval do\n def differ_At_One_Bit_Pos(a, ,, , b) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_6_differ_At_One_Bit_Pos.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"differ_At_One_Bit_Pos\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :differ_At_One_Bit_Pos end)\n candidate = fn args -> apply(HumanEval, differ_At_One_Bit_Pos, args) end\n assert true == candidate.([13, 9])\n assert false == candidate.([15, 8])\n assert false == candidate.([2, 4])\n assert true == candidate.([2, 3])\n assert true == candidate.([5, 1])\n assert true == candidate.([1, 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_70_get_equal", "language": "elixir", "prompt": "# Write a function to find whether all the given lists have equal length or not.\n\n\ndefmodule HumanEval do\n def get_equal(I, n, p, u, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_70_get_equal.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"get_equal\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :get_equal end)\n candidate = fn args -> apply(HumanEval, get_equal, args) end\n assert true == candidate.([[[11, 22, 33], [44, 55, 66]]])\n assert false == candidate.([[[1, 2, 3], [4, 5, 6, 7]]])\n assert true == candidate.([[[1, 2], [3, 4]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_71_comb_sort", "language": "elixir", "prompt": "# Write a function to sort a list of elements.\n\n\ndefmodule HumanEval do\n def comb_sort(n, u, m, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_71_comb_sort.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"comb_sort\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :comb_sort end)\n candidate = fn args -> apply(HumanEval, comb_sort, args) end\n assert [5, 15, 25, 37, 79] == candidate.([[5, 15, 37, 25, 79]])\n assert [15, 19, 22, 32, 41] == candidate.([[41, 32, 15, 19, 22]])\n assert [13, 15, 47, 99] == candidate.([[99, 15, 13, 47]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_720_add_dict_to_tuple", "language": "elixir", "prompt": "# Write a function to add a map to the tuple. The output should be a tuple.\n\n\ndefmodule HumanEval do\n def add_dict_to_tuple(t, e, s, t, _, t, u, p, ,, , t, e, s, t, _, d, i, c, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_720_add_dict_to_tuple.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"add_dict_to_tuple\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :add_dict_to_tuple end)\n candidate = fn args -> apply(HumanEval, add_dict_to_tuple, args) end\n assert {4, 5, 6, %{\"MSAM\" => 1, \"is\" => 2, \"best\" => 3}} == candidate.([{4, 5, 6}, %{\"MSAM\" => 1, \"is\" => 2, \"best\" => 3}])\n assert {1, 2, 3, %{\"UTS\" => 2, \"is\" => 3, \"Worst\" => 4}} == candidate.([{1, 2, 3}, %{\"UTS\" => 2, \"is\" => 3, \"Worst\" => 4}])\n assert {8, 9, 10, %{\"POS\" => 3, \"is\" => 4, \"Okay\" => 5}} == candidate.([{8, 9, 10}, %{\"POS\" => 3, \"is\" => 4, \"Okay\" => 5}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_721_maxAverageOfPath", "language": "elixir", "prompt": "# Given a square matrix of size N*N given as a list of lists, where each cell is associated with a specific cost. A path is defined as a specific sequence of cells that starts from the top-left cell move only right or down and ends on bottom right cell. We want to find a path with the maximum average over all existing paths. Average is computed as total cost divided by the number of cells visited in the path.\n\n\ndefmodule HumanEval do\n def maxAverageOfPath(c, o, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_721_maxAverageOfPath.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"maxAverageOfPath\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :maxAverageOfPath end)\n candidate = fn args -> apply(HumanEval, maxAverageOfPath, args) end\n assert 5.2 == candidate.([[[1, 2, 3], [6, 5, 4], [7, 3, 9]]])\n assert 6.2 == candidate.([[[2, 3, 4], [7, 6, 5], [8, 4, 10]]])\n assert 7.2 == candidate.([[[3, 4, 5], [8, 7, 6], [9, 5, 11]]])\n assert 5.8 == candidate.([[[1, 2, 3], [4, 5, 6], [7, 8, 9]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_722_filter_data", "language": "elixir", "prompt": "# The input is given as - a map with a student name as a key and a tuple of float (student_height, student_weight) as a value, - minimal height, - minimal weight. Write a function to filter students that have height and weight above the minimum.\n\n\ndefmodule HumanEval do\n def filter_data(s, t, u, d, e, n, t, s, ,, , h, ,, , w) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_722_filter_data.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"filter_data\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :filter_data end)\n candidate = fn args -> apply(HumanEval, filter_data, args) end\n assert %{\"Cierra Vega\" => {6.2, 70}} == candidate.([%{\"Cierra Vega\" => {6.2, 70}, \"Alden Cantrell\" => {5.9, 65}, \"Kierra Gentry\" => {6.0, 68}, \"Pierre Cox\" => {5.8, 66}}, 6.0, 70])\n assert %{\"Cierra Vega\" => {6.2, 70}, \"Kierra Gentry\" => {6.0, 68}} == candidate.([%{\"Cierra Vega\" => {6.2, 70}, \"Alden Cantrell\" => {5.9, 65}, \"Kierra Gentry\" => {6.0, 68}, \"Pierre Cox\" => {5.8, 66}}, 5.9, 67])\n assert %{\"Cierra Vega\" => {6.2, 70}, \"Alden Cantrell\" => {5.9, 65}, \"Kierra Gentry\" => {6.0, 68}, \"Pierre Cox\" => {5.8, 66}} == candidate.([%{\"Cierra Vega\" => {6.2, 70}, \"Alden Cantrell\" => {5.9, 65}, \"Kierra Gentry\" => {6.0, 68}, \"Pierre Cox\" => {5.8, 66}}, 5.7, 64])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_723_count_same_pair", "language": "elixir", "prompt": "# The input is defined as two lists of the same length. Write a function to count indices where the lists have the same values.\n\n\ndefmodule HumanEval do\n def count_same_pair(n, u, m, s, 1, ,, , n, u, m, s, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_723_count_same_pair.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_same_pair\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_same_pair end)\n candidate = fn args -> apply(HumanEval, count_same_pair, args) end\n assert 4 == candidate.([[1, 2, 3, 4, 5, 6, 7, 8], [2, 2, 3, 1, 2, 6, 7, 9]])\n assert 11 == candidate.([[0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8], [2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8]])\n assert 1 == candidate.([[2, 4, -6, -9, 11, -12, 14, -5, 17], [2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8]])\n assert 3 == candidate.([[0, 1, 1, 2], [0, 1, 2, 2]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_724_power_base_sum", "language": "elixir", "prompt": "# Write a function that takes base and power as arguments and calculate the sum of all digits of the base to the specified power.\n\n\ndefmodule HumanEval do\n def power_base_sum(b, a, s, e, ,, , p, o, w, e, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_724_power_base_sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"power_base_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :power_base_sum end)\n candidate = fn args -> apply(HumanEval, power_base_sum, args) end\n assert 115 == candidate.([2, 100])\n assert 37 == candidate.([8, 10])\n assert 62 == candidate.([8, 15])\n assert 9 == candidate.([3, 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_725_extract_quotation", "language": "elixir", "prompt": "# Write a function to extract values between quotation marks \" \" of the given string.\n\n\ndefmodule HumanEval do\n def extract_quotation(t, e, x, t, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_725_extract_quotation.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"extract_quotation\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :extract_quotation end)\n candidate = fn args -> apply(HumanEval, extract_quotation, args) end\n assert [\"A53\", \"multi\", \"Processor\"] == candidate.([\"Cortex \"A53\" Based \"multi\" tasking \"Processor\"\"])\n assert [\"favorite\", \"apps\"] == candidate.([\"Cast your \"favorite\" entertainment \"apps\"\"])\n assert [\"4k Ultra HD\", \"HDR 10\"] == candidate.([\"Watch content \"4k Ultra HD\" resolution with \"HDR 10\" Support\"])\n assert [] == candidate.([\"Watch content '4k Ultra HD' resolution with 'HDR 10' Support\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_726_multiply_elements", "language": "elixir", "prompt": "# Write a function that takes as input a list of numbers (t_1,...,t_{N+1}) and returns a list of length N where the i-th element of the tuple is equal to t_i * t_{i+1}.\n\n\ndefmodule HumanEval do\n def multiply_elements(t, e, s, t, _, t, u, p) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_726_multiply_elements.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"multiply_elements\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :multiply_elements end)\n candidate = fn args -> apply(HumanEval, multiply_elements, args) end\n assert [5, 35, 56, 80] == candidate.([[1, 5, 7, 8, 10]])\n assert [8, 20, 30, 42] == candidate.([[2, 4, 5, 6, 7]])\n assert [156, 182, 126, 135] == candidate.([[12, 13, 14, 9, 15]])\n assert [] == candidate.([[12]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_728_sum_list", "language": "elixir", "prompt": "# Write a function takes as input two lists [a_1,...,a_n], [b_1,...,b_n] and returns [a_1+b_1,...,a_n+b_n].\n\n\ndefmodule HumanEval do\n def sum_list(l, s, t, 1, ,, , l, s, t, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_728_sum_list.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_list end)\n candidate = fn args -> apply(HumanEval, sum_list, args) end\n assert [25, 45, 65] == candidate.([[10, 20, 30], [15, 25, 35]])\n assert [6, 8, 10] == candidate.([[1, 2, 3], [5, 6, 7]])\n assert [30, 65, 105] == candidate.([[15, 20, 30], [15, 45, 75]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_72_dif_Square", "language": "elixir", "prompt": "# Write an elixirthon function to check whether the given number can be represented as the difference of two squares or not.\n\n\ndefmodule HumanEval do\n def dif_Square(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_72_dif_Square.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"dif_Square\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :dif_Square end)\n candidate = fn args -> apply(HumanEval, dif_Square, args) end\n assert true == candidate.([5])\n assert false == candidate.([10])\n assert true == candidate.([15])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_730_consecutive_duplicates", "language": "elixir", "prompt": "# Write a function to remove consecutive duplicates of a given list.\n\n\ndefmodule HumanEval do\n def consecutive_duplicates(n, u, m, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_730_consecutive_duplicates.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"consecutive_duplicates\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :consecutive_duplicates end)\n candidate = fn args -> apply(HumanEval, consecutive_duplicates, args) end\n assert [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 4] == candidate.([[0, 0, 1, 2, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4]])\n assert [10, 15, 19, 18, 17, 26, 17, 18, 10] == candidate.([[10, 10, 15, 19, 18, 18, 17, 26, 26, 17, 18, 10]])\n assert [\"a\", \"b\", \"c\", \"d\"] == candidate.([[\"a\", \"a\", \"b\", \"c\", \"d\", \"d\"]])\n assert [\"a\", \"b\", \"c\", \"d\", \"a\"] == candidate.([[\"a\", \"a\", \"b\", \"c\", \"d\", \"d\", \"a\", \"a\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_731_lateralsurface_cone", "language": "elixir", "prompt": "# Write a function to find the lateral surface area of a cone given radius r and the height h.\n\n\ndefmodule HumanEval do\n def lateralsurface_cone(r, ,, , h) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_731_lateralsurface_cone.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"lateralsurface_cone\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :lateralsurface_cone end)\n candidate = fn args -> apply(HumanEval, lateralsurface_cone, args) end\n assert 204.20352248333654 == candidate.([5, 12])\n assert 566.3586699569488 == candidate.([10, 15])\n assert 1521.8090132193388 == candidate.([19, 17])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_732_replace_specialchar", "language": "elixir", "prompt": "# Write a function to replace all occurrences of spaces, commas, or dots with a colon.\n\n\ndefmodule HumanEval do\n def replace_specialchar(t, e, x, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_732_replace_specialchar.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"replace_specialchar\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :replace_specialchar end)\n candidate = fn args -> apply(HumanEval, replace_specialchar, args) end\n assert \"Python:language::Programming:language:\" == candidate.([\"Python language, Programming language.\"])\n assert \"a:b:c:d:e:f\" == candidate.([\"a b c,d e f\"])\n assert \"ram:reshma:ram:rahim\" == candidate.([\"ram reshma,ram rahim\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_733_find_first_occurrence", "language": "elixir", "prompt": "# Write a function to find the index of the first occurrence of a given number in a sorted list.\n\n\ndefmodule HumanEval do\n def find_first_occurrence(A, ,, , x) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_733_find_first_occurrence.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_first_occurrence\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_first_occurrence end)\n candidate = fn args -> apply(HumanEval, find_first_occurrence, args) end\n assert 1 == candidate.([[2, 5, 5, 5, 6, 6, 8, 9, 9, 9], 5])\n assert 2 == candidate.([[2, 3, 5, 5, 6, 6, 8, 9, 9, 9], 5])\n assert 4 == candidate.([[2, 4, 1, 5, 6, 6, 8, 9, 9, 9], 6])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_734_sum_Of_Subarray_Prod", "language": "elixir", "prompt": "# Write an elixirthon function to find sum of products of all possible sublists of a given list. https://www.geeksforgeeks.org/sum-of-products-of-all-possible-sublists/\n\n\ndefmodule HumanEval do\n def sum_Of_Subarray_Prod(a, r, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_734_sum_Of_Subarray_Prod.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_Of_Subarray_Prod\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_Of_Subarray_Prod end)\n candidate = fn args -> apply(HumanEval, sum_Of_Subarray_Prod, args) end\n assert 20 == candidate.([[1, 2, 3]])\n assert 5 == candidate.([[1, 2]])\n assert 84 == candidate.([[1, 2, 3, 4]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_735_toggle_middle_bits", "language": "elixir", "prompt": "# Write an elixirthon function to toggle bits of the number except the first and the last bit. https://www.geeksforgeeks.org/toggle-bits-number-expect-first-last-bits/\n\n\ndefmodule HumanEval do\n def toggle_middle_bits(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_735_toggle_middle_bits.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"toggle_middle_bits\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :toggle_middle_bits end)\n candidate = fn args -> apply(HumanEval, toggle_middle_bits, args) end\n assert 15 == candidate.([9])\n assert 12 == candidate.([10])\n assert 13 == candidate.([11])\n assert 127 == candidate.([65])\n assert 115 == candidate.([77])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_736_left_insertion", "language": "elixir", "prompt": "# Write a function to locate the left insertion point for a specified value in sorted order. https://www.w3resource.com/elixirthon-exercises/data-structures-and-algorithms/elixirthon-data-structure-exercise-24.php\n\n\ndefmodule HumanEval do\n def left_insertion(a, ,, , x) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_736_left_insertion.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"left_insertion\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :left_insertion end)\n candidate = fn args -> apply(HumanEval, left_insertion, args) end\n assert 4 == candidate.([[1, 2, 4, 5], 6])\n assert 2 == candidate.([[1, 2, 4, 5], 3])\n assert 4 == candidate.([[1, 2, 4, 5], 7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_737_check_str", "language": "elixir", "prompt": "# Write a function to check whether the given string is starting with a vowel or not using regex.\n\n\ndefmodule HumanEval do\n def check_str(s, t, r, i, n, g) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_737_check_str.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_str\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_str end)\n candidate = fn args -> apply(HumanEval, check_str, args) end\n assert true == candidate.([\"annie\"])\n assert false == candidate.([\"dawood\"])\n assert true == candidate.([\"Else\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_738_geometric_sum", "language": "elixir", "prompt": "# Write a function to calculate the geometric sum of n-1. https://www.w3resource.com/elixirthon-exercises/data-structures-and-algorithms/elixirthon-recursion-exercise-9.php\n\n\ndefmodule HumanEval do\n def geometric_sum(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_738_geometric_sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"geometric_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :geometric_sum end)\n candidate = fn args -> apply(HumanEval, geometric_sum, args) end\n assert 1.9921875 == candidate.([7])\n assert 1.9375 == candidate.([4])\n assert 1.99609375 == candidate.([8])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_739_find_Index", "language": "elixir", "prompt": "# Write an elixirthon function to find the index of smallest triangular number with n digits. https://www.geeksforgeeks.org/index-of-smallest-triangular-number-with-n-digits/\n\n\ndefmodule HumanEval do\n def find_Index(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_739_find_Index.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_Index\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_Index end)\n candidate = fn args -> apply(HumanEval, find_Index, args) end\n assert 4 == candidate.([2])\n assert 14 == candidate.([3])\n assert 45 == candidate.([4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_740_tuple_to_dict", "language": "elixir", "prompt": "# Write a function to convert the given tuple to a key-value map using adjacent elements. https://www.geeksforgeeks.org/elixirthon-convert-tuple-to-adjacent-pair-map/\n\n\ndefmodule HumanEval do\n def tuple_to_dict(t, e, s, t, _, t, u, p) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_740_tuple_to_dict.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"tuple_to_dict\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :tuple_to_dict end)\n candidate = fn args -> apply(HumanEval, tuple_to_dict, args) end\n assert %{1 => 5, 7 => 10, 13 => 5} == candidate.([{1, 5, 7, 10, 13, 5}])\n assert %{1 => 2, 3 => 4, 5 => 6} == candidate.([{1, 2, 3, 4, 5, 6}])\n assert %{7 => 8, 9 => 10, 11 => 12} == candidate.([{7, 8, 9, 10, 11, 12}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_741_all_Characters_Same", "language": "elixir", "prompt": "# Write an elixirthon function to check whether all the characters are same or not.\n\n\ndefmodule HumanEval do\n def all_Characters_Same(s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_741_all_Characters_Same.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"all_Characters_Same\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :all_Characters_Same end)\n candidate = fn args -> apply(HumanEval, all_Characters_Same, args) end\n assert false == candidate.([\"python\"])\n assert true == candidate.([\"aaa\"])\n assert false == candidate.([\"data\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_742_area_tetrahedron", "language": "elixir", "prompt": "# Write a function to caluclate the area of a tetrahedron.\n\n\ndefmodule HumanEval do\n def area_tetrahedron(s, i, d, e) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_742_area_tetrahedron.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"area_tetrahedron\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :area_tetrahedron end)\n candidate = fn args -> apply(HumanEval, area_tetrahedron, args) end\n assert 15.588457268119894 == candidate.([3])\n assert 692.8203230275509 == candidate.([20])\n assert 173.20508075688772 == candidate.([10])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_743_rotate_right", "language": "elixir", "prompt": "# Write a function to rotate a given list by specified number of items to the right direction. https://www.geeksforgeeks.org/elixirthon-program-right-rotate-list-n/\n\n\ndefmodule HumanEval do\n def rotate_right(l, i, s, t, ,, , m) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_743_rotate_right.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"rotate_right\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :rotate_right end)\n candidate = fn args -> apply(HumanEval, rotate_right, args) end\n assert [8, 9, 10, 1, 2, 3, 4, 5, 6, 7] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 3])\n assert [9, 10, 1, 2, 3, 4, 5, 6, 7, 8] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 2])\n assert [6, 7, 8, 9, 10, 1, 2, 3, 4, 5] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_744_check_none", "language": "elixir", "prompt": "# Write a function to check if the given tuple has any none value or not.\n\n\ndefmodule HumanEval do\n def check_none(t, e, s, t, _, t, u, p) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_744_check_none.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_none\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_none end)\n candidate = fn args -> apply(HumanEval, check_none, args) end\n assert true == candidate.([{10, 4, 5, 6, nil}])\n assert false == candidate.([{7, 8, 9, 11, 14}])\n assert true == candidate.([{1, 2, 3, 4, nil}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_745_divisible_by_digits", "language": "elixir", "prompt": "# Write a function to find numbers within a given range from startnum ti endnum where every number is divisible by every digit it contains. https://www.w3resource.com/elixirthon-exercises/lambda/elixirthon-lambda-exercise-24.php\n\n\ndefmodule HumanEval do\n def divisible_by_digits(s, t, a, r, t, n, u, m, ,, , e, n, d, n, u, m) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_745_divisible_by_digits.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"divisible_by_digits\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :divisible_by_digits end)\n candidate = fn args -> apply(HumanEval, divisible_by_digits, args) end\n assert [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 22] == candidate.([1, 22])\n assert [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15] == candidate.([1, 15])\n assert [22, 24] == candidate.([20, 25])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_746_sector_area", "language": "elixir", "prompt": "# Write a function to find area of a sector. The function takes the radius and angle as inputs. Function should return nil if the angle is larger than 360 degrees.\n\n\ndefmodule HumanEval do\n def sector_area(r, ,, , a) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_746_sector_area.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sector_area\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sector_area end)\n candidate = fn args -> apply(HumanEval, sector_area, args) end\n assert 6.283185307179586 == candidate.([4, 45])\n assert 31.808625617596654 == candidate.([9, 45])\n assert nil == candidate.([9, 361])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_747_lcs_of_three", "language": "elixir", "prompt": "# Write a function to find the longest common subsequence for the given three string sequence. https://www.geeksforgeeks.org/lcs-longest-common-subsequence-three-strings/\n\n\ndefmodule HumanEval do\n def lcs_of_three(X, ,, , Y, ,, , Z) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_747_lcs_of_three.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"lcs_of_three\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :lcs_of_three end)\n candidate = fn args -> apply(HumanEval, lcs_of_three, args) end\n assert 2 == candidate.([\"AGGT12\", \"12TXAYB\", \"12XBA\"])\n assert 5 == candidate.([\"Reels\", \"Reelsfor\", \"ReelsforReels\"])\n assert 3 == candidate.([\"abcd1e2\", \"bc12ea\", \"bd1ea\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_748_capital_words_spaces", "language": "elixir", "prompt": "# Write a function to put spaces between words starting with capital letters in a given string.\n\n\ndefmodule HumanEval do\n def capital_words_spaces(s, t, r, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_748_capital_words_spaces.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"capital_words_spaces\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :capital_words_spaces end)\n candidate = fn args -> apply(HumanEval, capital_words_spaces, args) end\n assert \"Python\" == candidate.([\"Python\"])\n assert \"Python Programming Examples\" == candidate.([\"PythonProgrammingExamples\"])\n assert \"Get Ready To Be Coding Freak\" == candidate.([\"GetReadyToBeCodingFreak\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_749_sort_numeric_strings", "language": "elixir", "prompt": "# Write a function to sort a given list of strings of numbers numerically. https://www.geeksforgeeks.org/elixirthon-sort-numeric-strings-in-a-list/\n\n\ndefmodule HumanEval do\n def sort_numeric_strings(n, u, m, s, _, s, t, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_749_sort_numeric_strings.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sort_numeric_strings\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sort_numeric_strings end)\n candidate = fn args -> apply(HumanEval, sort_numeric_strings, args) end\n assert [-500, -12, 0, 4, 7, 12, 45, 100, 200] == candidate.([[\"4\", \"12\", \"45\", \"7\", \"0\", \"100\", \"200\", \"-12\", \"-500\"]])\n assert [1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 4, 5, 6, 6, 6, 7, 8, 8, 9, 9] == candidate.([[\"2\", \"3\", \"8\", \"4\", \"7\", \"9\", \"8\", \"2\", \"6\", \"5\", \"1\", \"6\", \"1\", \"2\", \"3\", \"4\", \"6\", \"9\", \"1\", \"2\"]])\n assert [1, 1, 1, 3, 3, 5, 5, 7, 7, 9, 11, 13, 15, 17] == candidate.([[\"1\", \"3\", \"5\", \"7\", \"1\", \"3\", \"13\", \"15\", \"17\", \"5\", \"7 \", \"9\", \"1\", \"11\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_74_is_samepatterns", "language": "elixir", "prompt": "# Write a function to check whether it follows the sequence given in the patterns list.\n\n\ndefmodule HumanEval do\n def is_samepatterns(c, o, l, o, r, s, ,, , p, a, t, t, e, r, n, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_74_is_samepatterns.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_samepatterns\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_samepatterns end)\n candidate = fn args -> apply(HumanEval, is_samepatterns, args) end\n assert true == candidate.([[\"red\", \"green\", \"green\"], [\"a\", \"b\", \"b\"]])\n assert false == candidate.([[\"red\", \"green\", \"greenn\"], [\"a\", \"b\", \"b\"]])\n assert false == candidate.([[\"red\", \"green\", \"greenn\"], [\"a\", \"b\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_750_add_tuple", "language": "elixir", "prompt": "# Write a function to add the given tuple to the given list.\n\n\ndefmodule HumanEval do\n def add_tuple(t, e, s, t, _, l, i, s, t, ,, , t, e, s, t, _, t, u, p) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_750_add_tuple.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"add_tuple\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :add_tuple end)\n candidate = fn args -> apply(HumanEval, add_tuple, args) end\n assert [5, 6, 7, 9, 10] == candidate.([[5, 6, 7], {9, 10}])\n assert [6, 7, 8, 10, 11] == candidate.([[6, 7, 8], {10, 11}])\n assert [7, 8, 9, 11, 12] == candidate.([[7, 8, 9], {11, 12}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_751_check_min_heap", "language": "elixir", "prompt": "# Write a function to check if the given list represents min heap or not. https://www.geeksforgeeks.org/how-to-check-if-a-given-list-represents-a-binary-heap/\n\n\ndefmodule HumanEval do\n def check_min_heap(a, r, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_751_check_min_heap.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_min_heap\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_min_heap end)\n candidate = fn args -> apply(HumanEval, check_min_heap, args) end\n assert true == candidate.([[1, 2, 3, 4, 5, 6]])\n assert true == candidate.([[2, 3, 4, 5, 10, 15]])\n assert false == candidate.([[2, 10, 4, 5, 3, 15]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_752_jacobsthal_num", "language": "elixir", "prompt": "# Write a function to find the nth jacobsthal number. https://www.geeksforgeeks.org/jacobsthal-and-jacobsthal-lucas-numbers/ 0, 1, 1, 3, 5, 11, 21, 43, 85, 171, 341, 683, 1365, 2731, ...\n\n\ndefmodule HumanEval do\n def jacobsthal_num(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_752_jacobsthal_num.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"jacobsthal_num\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :jacobsthal_num end)\n candidate = fn args -> apply(HumanEval, jacobsthal_num, args) end\n assert 11 == candidate.([5])\n assert 1 == candidate.([2])\n assert 5 == candidate.([4])\n assert 2731 == candidate.([13])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_753_min_k", "language": "elixir", "prompt": "# Write a function to find minimum k records from tuple list. https://www.geeksforgeeks.org/elixirthon-find-minimum-k-records-from-tuple-list/ - in this case a verbatim coelixir of test cases\n\n\ndefmodule HumanEval do\n def min_k(t, e, s, t, _, l, i, s, t, ,, , K) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_753_min_k.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"min_k\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :min_k end)\n candidate = fn args -> apply(HumanEval, min_k, args) end\n assert [{\"Akash\", 2}, {\"Akshat\", 4}] == candidate.([[{\"Manjeet\", 10}, {\"Akshat\", 4}, {\"Akash\", 2}, {\"Nikhil\", 8}], 2])\n assert [{\"Akash\", 3}, {\"Angat\", 5}, {\"Nepin\", 9}] == candidate.([[{\"Sanjeev\", 11}, {\"Angat\", 5}, {\"Akash\", 3}, {\"Nepin\", 9}], 3])\n assert [{\"Ayesha\", 9}] == candidate.([[{\"tanmay\", 14}, {\"Amer\", 11}, {\"Ayesha\", 9}, {\"SKD\", 16}], 1])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_754_extract_index_list", "language": "elixir", "prompt": "# We say that an element is common for lists l1, l2, l3 if it appears in all three lists under the same index. Write a function to find common elements from three lists. The function should return a list.\n\n\ndefmodule HumanEval do\n def extract_index_list(l, 1, ,, , l, 2, ,, , l, 3) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_754_extract_index_list.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"extract_index_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :extract_index_list end)\n candidate = fn args -> apply(HumanEval, extract_index_list, args) end\n assert [1, 7] == candidate.([[1, 1, 3, 4, 5, 6, 7], [0, 1, 2, 3, 4, 5, 7], [0, 1, 2, 3, 4, 5, 7]])\n assert [1, 6] == candidate.([[1, 1, 3, 4, 5, 6, 7], [0, 1, 2, 3, 4, 6, 5], [0, 1, 2, 3, 4, 6, 7]])\n assert [1, 5] == candidate.([[1, 1, 3, 4, 6, 5, 6], [0, 1, 2, 3, 4, 5, 7], [0, 1, 2, 3, 4, 5, 7]])\n assert [] == candidate.([[1, 2, 3, 4, 6, 6, 6], [0, 1, 2, 3, 4, 5, 7], [0, 1, 2, 3, 4, 5, 7]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_755_second_smallest", "language": "elixir", "prompt": "# Write a function to find the second smallest number in a list.\n\n\ndefmodule HumanEval do\n def second_smallest(n, u, m, b, e, r, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_755_second_smallest.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"second_smallest\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :second_smallest end)\n candidate = fn args -> apply(HumanEval, second_smallest, args) end\n assert -2 == candidate.([[1, 2, -8, -2, 0, -2]])\n assert -0.5 == candidate.([[1, 1, -0.5, 0, 2, -2, -2]])\n assert nil == candidate.([[2, 2]])\n assert nil == candidate.([[2, 2, 2]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_756_text_match_zero_one", "language": "elixir", "prompt": "# Write a function that matches a string that has an 'a' followed by one or more 'b's. https://www.w3resource.com/elixirthon-exercises/re/elixirthon-re-exercise-3.php\n\n\ndefmodule HumanEval do\n def text_match_zero_one(t, e, x, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_756_text_match_zero_one.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"text_match_zero_one\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :text_match_zero_one end)\n candidate = fn args -> apply(HumanEval, text_match_zero_one, args) end\n assert false == candidate.([\"ac\"])\n assert false == candidate.([\"dc\"])\n assert true == candidate.([\"abbbba\"])\n assert true == candidate.([\"dsabbbba\"])\n assert false == candidate.([\"asbbbba\"])\n assert true == candidate.([\"abaaa\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_757_count_reverse_pairs", "language": "elixir", "prompt": "# Write a function to count the pairs of reverse strings in the given string list. https://www.geeksforgeeks.org/elixirthon-program-to-count-the-pairs-of-reverse-strings/\n\n\ndefmodule HumanEval do\n def count_reverse_pairs(t, e, s, t, _, l, i, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_757_count_reverse_pairs.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_reverse_pairs\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_reverse_pairs end)\n candidate = fn args -> apply(HumanEval, count_reverse_pairs, args) end\n assert 2 == candidate.([[\"julia\", \"best\", \"tseb\", \"for\", \"ailuj\"]])\n assert 1 == candidate.([[\"geeks\", \"best\", \"for\", \"skeeg\"]])\n assert 2 == candidate.([[\"makes\", \"best\", \"sekam\", \"for\", \"rof\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_759_is_decimal", "language": "elixir", "prompt": "# Write a function to check whether a given string is a decimal number with a precision of 2.\n\n\ndefmodule HumanEval do\n def is_decimal(n, u, m) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_759_is_decimal.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_decimal\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_decimal end)\n candidate = fn args -> apply(HumanEval, is_decimal, args) end\n assert true == candidate.([\"123.11\"])\n assert false == candidate.([\"e666.86\"])\n assert false == candidate.([\"3.124587\"])\n assert true == candidate.([\"1.11\"])\n assert false == candidate.([\"1.1.11\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_75_find_tuples", "language": "elixir", "prompt": "# Write a function to find tuples which have all elements divisible by k from the given list of tuples.\n\n\ndefmodule HumanEval do\n def find_tuples(t, e, s, t, _, l, i, s, t, ,, , K) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_75_find_tuples.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_tuples\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_tuples end)\n candidate = fn args -> apply(HumanEval, find_tuples, args) end\n assert [{6, 24, 12}] == candidate.([[{6, 24, 12}, {7, 9, 6}, {12, 18, 21}], 6])\n assert [{5, 25, 30}] == candidate.([[{5, 25, 30}, {4, 2, 3}, {7, 8, 9}], 5])\n assert [{8, 16, 4}] == candidate.([[{7, 9, 16}, {8, 16, 4}, {19, 17, 18}], 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_760_unique_Element", "language": "elixir", "prompt": "# Write an elixirthon function to check whether a list of numbers contains only one distinct element or not.\n\n\ndefmodule HumanEval do\n def unique_Element(a, r, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_760_unique_Element.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"unique_Element\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :unique_Element end)\n candidate = fn args -> apply(HumanEval, unique_Element, args) end\n assert true == candidate.([[1, 1, 1]])\n assert false == candidate.([[1, 2, 1, 2]])\n assert false == candidate.([[1, 2, 3, 4, 5]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_762_check_monthnumber_number", "language": "elixir", "prompt": "# Write a function to check whether the given month number contains 30 days or not. Months are given as number from 1 to 12.\n\n\ndefmodule HumanEval do\n def check_monthnumber_number(m, o, n, t, h, n, u, m, 3) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_762_check_monthnumber_number.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_monthnumber_number\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_monthnumber_number end)\n candidate = fn args -> apply(HumanEval, check_monthnumber_number, args) end\n assert true == candidate.([6])\n assert false == candidate.([2])\n assert false == candidate.([12])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_763_find_min_diff", "language": "elixir", "prompt": "# Write an elixirthon function to find the minimum difference between any two elements in a given list. https://www.geeksforgeeks.org/find-minimum-difference-pair/\n\n\ndefmodule HumanEval do\n def find_min_diff(a, r, r, ,, , n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_763_find_min_diff.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_min_diff\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_min_diff end)\n candidate = fn args -> apply(HumanEval, find_min_diff, args) end\n assert 1 == candidate.([[1, 5, 3, 19, 18, 25], 6])\n assert 1 == candidate.([[4, 3, 2, 6], 4])\n assert 4 == candidate.([[30, 5, 20, 9], 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_764_number_ctr", "language": "elixir", "prompt": "# Write an elixirthon function to count number of digits in a given string.\n\n\ndefmodule HumanEval do\n def number_ctr(s, t, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_764_number_ctr.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"number_ctr\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :number_ctr end)\n candidate = fn args -> apply(HumanEval, number_ctr, args) end\n assert 1 == candidate.([\"program2bedone\"])\n assert 1 == candidate.([\"3wonders\"])\n assert 3 == candidate.([\"123\"])\n assert 3 == candidate.([\"3wond-1ers2\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_765_is_polite", "language": "elixir", "prompt": "# Write a function to find nth polite number. geeksforgeeks.org/n-th-polite-number/\n\n\ndefmodule HumanEval do\n def is_polite(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_765_is_polite.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_polite\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_polite end)\n candidate = fn args -> apply(HumanEval, is_polite, args) end\n assert 11 == candidate.([7])\n assert 7 == candidate.([4])\n assert 13 == candidate.([9])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_766_pair_wise", "language": "elixir", "prompt": "# Write a function to return a list of all pairs of consecutive items in a given list.\n\n\ndefmodule HumanEval do\n def pair_wise(l, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_766_pair_wise.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"pair_wise\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :pair_wise end)\n candidate = fn args -> apply(HumanEval, pair_wise, args) end\n assert [{1, 1}, {1, 2}, {2, 3}, {3, 3}, {3, 4}, {4, 4}, {4, 5}] == candidate.([[1, 1, 2, 3, 3, 4, 4, 5]])\n assert [{1, 5}, {5, 7}, {7, 9}, {9, 10}] == candidate.([[1, 5, 7, 9, 10]])\n assert [{5, 1}, {1, 9}, {9, 7}, {7, 10}] == candidate.([[5, 1, 9, 7, 10]])\n assert [{1, 2}, {2, 3}, {3, 4}, {4, 5}, {5, 6}, {6, 7}, {7, 8}, {8, 9}, {9, 10}] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_767_get_pairs_count", "language": "elixir", "prompt": "# Write an elixirthon function to count the number of pairs whose sum is equal to \u2018sum\u2019. The funtion gets as input a list of numbers and the sum,\n\n\ndefmodule HumanEval do\n def get_pairs_count(a, r, r, ,, , s, u, m) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_767_get_pairs_count.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"get_pairs_count\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :get_pairs_count end)\n candidate = fn args -> apply(HumanEval, get_pairs_count, args) end\n assert 6 == candidate.([[1, 1, 1, 1], 2])\n assert 3 == candidate.([[1, 5, 7, -1, 5], 6])\n assert 1 == candidate.([[1, -2, 3], 1])\n assert 1 == candidate.([[-1, -2, 3], -3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_769_Diff", "language": "elixir", "prompt": "# Write an elixirthon function to get the difference between two lists.\n\n\ndefmodule HumanEval do\n def Diff(l, i, 1, ,, , l, i, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_769_Diff.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"Diff\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :Diff end)\n candidate = fn args -> apply(HumanEval, Diff, args) end\n assert [10, 20, 30, 15] == candidate.([[10, 15, 20, 25, 30, 35, 40], [25, 40, 35]])\n assert [2, 3, 4, 5, 6, 7] == candidate.([[1, 2, 3, 4, 5], [6, 7, 1]])\n assert [2, 3, 6, 7] == candidate.([[1, 2, 3], [6, 7, 1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_770_odd_num_sum", "language": "elixir", "prompt": "# Write an elixirthon function to find the sum of fourth power of first n odd natural numbers.\n\n\ndefmodule HumanEval do\n def odd_num_sum(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_770_odd_num_sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"odd_num_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :odd_num_sum end)\n candidate = fn args -> apply(HumanEval, odd_num_sum, args) end\n assert 82 == candidate.([2])\n assert 707 == candidate.([3])\n assert 3108 == candidate.([4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_771_check_expression", "language": "elixir", "prompt": "# Write a function to check if the given expression is balanced or not. https://www.geeksforgeeks.org/check-for-balanced-parentheses-in-an-expression/\n\n\ndefmodule HumanEval do\n def check_expression(e, x, p) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_771_check_expression.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_expression\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_expression end)\n candidate = fn args -> apply(HumanEval, check_expression, args) end\n assert true == candidate.([\"{()}[{}]\"])\n assert false == candidate.([\"{()}[{]\"])\n assert true == candidate.([\"{()}[{}][]({})\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_772_remove_length", "language": "elixir", "prompt": "# Write a function to remove all the words with k length in the given string.\n\n\ndefmodule HumanEval do\n def remove_length(t, e, s, t, _, s, t, r, ,, , K) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_772_remove_length.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_length\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_length end)\n candidate = fn args -> apply(HumanEval, remove_length, args) end\n assert \"person is most value\" == candidate.([\"The person is most value tet\", 3])\n assert \"If you me about ok\" == candidate.([\"If you told me about this ok\", 4])\n assert \"Forces of darkeness is the\" == candidate.([\"Forces of darkeness is come into the play\", 4])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_773_occurance_substring", "language": "elixir", "prompt": "# Write a function to find the occurrence and position of the substrings within a string. Return nil if there is no match.\n\n\ndefmodule HumanEval do\n def occurance_substring(t, e, x, t, ,, , p, a, t, t, e, r, n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_773_occurance_substring.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"occurance_substring\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :occurance_substring end)\n candidate = fn args -> apply(HumanEval, occurance_substring, args) end\n assert {\"python\", 0, 6} == candidate.([\"python programming, python language\", \"python\"])\n assert {\"programming\", 7, 18} == candidate.([\"python programming,programming language\", \"programming\"])\n assert {\"language\", 31, 39} == candidate.([\"python programming,programming language\", \"language\"])\n assert nil == candidate.([\"c++ programming, c++ language\", \"python\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_775_odd_position", "language": "elixir", "prompt": "# Write an elixirthon function to check whether every odd index contains odd numbers of a given list.\n\n\ndefmodule HumanEval do\n def odd_position(n, u, m, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_775_odd_position.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"odd_position\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :odd_position end)\n candidate = fn args -> apply(HumanEval, odd_position, args) end\n assert true == candidate.([[2, 1, 4, 3, 6, 7, 6, 3]])\n assert true == candidate.([[4, 1, 2]])\n assert false == candidate.([[1, 2, 3]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_776_count_vowels", "language": "elixir", "prompt": "# Write a function to count those characters which have vowels as their neighbors in the given string.\n\n\ndefmodule HumanEval do\n def count_vowels(t, e, s, t, _, s, t, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_776_count_vowels.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_vowels\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_vowels end)\n candidate = fn args -> apply(HumanEval, count_vowels, args) end\n assert 7 == candidate.([\"bestinstareels\"])\n assert 12 == candidate.([\"partofthejourneyistheend\"])\n assert 5 == candidate.([\"amazonprime\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_777_find_sum", "language": "elixir", "prompt": "# Write an elixirthon function to find the sum of non-repeated elements in a given list.\n\n\ndefmodule HumanEval do\n def find_sum(a, r, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_777_find_sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_sum end)\n candidate = fn args -> apply(HumanEval, find_sum, args) end\n assert 21 == candidate.([[1, 2, 3, 1, 1, 4, 5, 6]])\n assert 71 == candidate.([[1, 10, 9, 4, 2, 10, 10, 45, 4]])\n assert 78 == candidate.([[12, 10, 9, 45, 2, 10, 10, 45, 10]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_778_pack_consecutive_duplicates", "language": "elixir", "prompt": "# Write a function to pack consecutive duplicates of a given list elements into sublists.\n\n\ndefmodule HumanEval do\n def pack_consecutive_duplicates(l, i, s, t, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_778_pack_consecutive_duplicates.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"pack_consecutive_duplicates\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :pack_consecutive_duplicates end)\n candidate = fn args -> apply(HumanEval, pack_consecutive_duplicates, args) end\n assert [[0, 0], [1], [2], [3], [4, 4], [5], [6, 6, 6], [7], [8], [9], [4, 4]] == candidate.([[0, 0, 1, 2, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4]])\n assert [[10, 10], [15], [19], [18, 18], [17], [26, 26], [17], [18], [10]] == candidate.([[10, 10, 15, 19, 18, 18, 17, 26, 26, 17, 18, 10]])\n assert [[\"a\", \"a\"], [\"b\"], [\"c\"], [\"d\", \"d\"]] == candidate.([[\"a\", \"a\", \"b\", \"c\", \"d\", \"d\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_77_is_Diff", "language": "elixir", "prompt": "# Write an elixirthon function to find whether a number is divisible by 11.\n\n\ndefmodule HumanEval do\n def is_Diff(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_77_is_Diff.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_Diff\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_Diff end)\n candidate = fn args -> apply(HumanEval, is_Diff, args) end\n assert false == candidate.([12345])\n assert true == candidate.([1212112])\n assert false == candidate.([1212])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_780_find_combinations", "language": "elixir", "prompt": "# Write a function to find the combinations of sums with tuples in the given tuple list. https://www.geeksforgeeks.org/elixirthon-combinations-of-sum-with-tuples-in-tuple-list/\n\n\ndefmodule HumanEval do\n def find_combinations(t, e, s, t, _, l, i, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_780_find_combinations.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_combinations\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_combinations end)\n candidate = fn args -> apply(HumanEval, find_combinations, args) end\n assert [{8, 11}, {7, 5}, {8, 14}, {11, 8}, {12, 17}, {11, 11}] == candidate.([[{2, 4}, {6, 7}, {5, 1}, {6, 10}]])\n assert [{10, 13}, {9, 7}, {10, 16}, {13, 10}, {14, 19}, {13, 13}] == candidate.([[{3, 5}, {7, 8}, {6, 2}, {7, 11}]])\n assert [{12, 15}, {11, 9}, {12, 18}, {15, 12}, {16, 21}, {15, 15}] == candidate.([[{4, 6}, {8, 9}, {7, 3}, {8, 12}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_781_count_divisors", "language": "elixir", "prompt": "# Write an elixirthon function to check whether the count of divisors is even. https://www.w3resource.com/elixirthon-exercises/basic/elixirthon-basic-1-exercise-24.php\n\n\ndefmodule HumanEval do\n def count_divisors(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_781_count_divisors.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_divisors\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_divisors end)\n candidate = fn args -> apply(HumanEval, count_divisors, args) end\n assert true == candidate.([10])\n assert false == candidate.([100])\n assert true == candidate.([125])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_782_odd_length_sum", "language": "elixir", "prompt": "# Write an elixirthon function to find the sum of all odd length sublists. https://www.geeksforgeeks.org/sum-of-all-odd-length-sublists/\n\n\ndefmodule HumanEval do\n def odd_length_sum(a, r, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_782_odd_length_sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"odd_length_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :odd_length_sum end)\n candidate = fn args -> apply(HumanEval, odd_length_sum, args) end\n assert 14 == candidate.([[1, 2, 4]])\n assert 15 == candidate.([[1, 2, 1, 2]])\n assert 8 == candidate.([[1, 7]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_783_rgb_to_hsv", "language": "elixir", "prompt": "# Write a function to convert rgb color to hsv color. https://www.geeksforgeeks.org/program-change-rgb-color-model-hsv-color-model/\n\n\ndefmodule HumanEval do\n def rgb_to_hsv(r, ,, , g, ,, , b) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_783_rgb_to_hsv.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"rgb_to_hsv\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :rgb_to_hsv end)\n candidate = fn args -> apply(HumanEval, rgb_to_hsv, args) end\n assert [0.0, 0.0, 100.0] == candidate.([255, 255, 255])\n assert [120.0, 100.0, 84.31372549019608] == candidate.([0, 215, 0])\n assert [149.26829268292684, 95.34883720930233, 84.31372549019608] == candidate.([10, 215, 110])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_784_mul_even_odd", "language": "elixir", "prompt": "# Write a function to find the product of first even and odd number of a given list.\n\n\ndefmodule HumanEval do\n def mul_even_odd(l, i, s, t, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_784_mul_even_odd.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"mul_even_odd\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :mul_even_odd end)\n candidate = fn args -> apply(HumanEval, mul_even_odd, args) end\n assert 4 == candidate.([[1, 3, 5, 7, 4, 1, 6, 8]])\n assert 2 == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]])\n assert 10 == candidate.([[1, 5, 7, 9, 10]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_785_tuple_str_int", "language": "elixir", "prompt": "# Write a function to convert tuple string to integer tuple.\n\n\ndefmodule HumanEval do\n def tuple_str_int(t, e, s, t, _, s, t, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_785_tuple_str_int.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"tuple_str_int\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :tuple_str_int end)\n candidate = fn args -> apply(HumanEval, tuple_str_int, args) end\n assert {7, 8, 9} == candidate.([\"(7, 8, 9)\"])\n assert {1, 2, 3} == candidate.([\"(1, 2, 3)\"])\n assert {4, 5, 6} == candidate.([\"(4, 5, 6)\"])\n assert {7, 81, 19} == candidate.([\"(7, 81, 19)\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_786_right_insertion", "language": "elixir", "prompt": "# Write a function to locate the right insertion point for a specified value in sorted order.\n\n\ndefmodule HumanEval do\n def right_insertion(a, ,, , x) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_786_right_insertion.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"right_insertion\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :right_insertion end)\n candidate = fn args -> apply(HumanEval, right_insertion, args) end\n assert 4 == candidate.([[1, 2, 4, 5], 6])\n assert 2 == candidate.([[1, 2, 4, 5], 3])\n assert 4 == candidate.([[1, 2, 4, 5], 7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_787_text_match_three", "language": "elixir", "prompt": "# Write a function that matches a string that has an a followed by three 'b'.\n\n\ndefmodule HumanEval do\n def text_match_three(t, e, x, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_787_text_match_three.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"text_match_three\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :text_match_three end)\n candidate = fn args -> apply(HumanEval, text_match_three, args) end\n assert false == candidate.([\"ac\"])\n assert false == candidate.([\"dc\"])\n assert true == candidate.([\"abbbba\"])\n assert true == candidate.([\"caacabbbba\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_788_new_tuple", "language": "elixir", "prompt": "# Write a function to create a new tuple from the given string and list.\n\n\ndefmodule HumanEval do\n def new_tuple(t, e, s, t, _, l, i, s, t, ,, , t, e, s, t, _, s, t, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_788_new_tuple.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"new_tuple\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :new_tuple end)\n candidate = fn args -> apply(HumanEval, new_tuple, args) end\n assert {\"WEB\", \"is\", \"best\"} == candidate.([[\"WEB\", \"is\"], \"best\"])\n assert {\"We\", \"are\", \"Developers\"} == candidate.([[\"We\", \"are\"], \"Developers\"])\n assert {\"Part\", \"is\", \"Wrong\"} == candidate.([[\"Part\", \"is\"], \"Wrong\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_790_even_position", "language": "elixir", "prompt": "# Write an elixirthon function to check whether every even index contains even numbers of a given list.\n\n\ndefmodule HumanEval do\n def even_position(n, u, m, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_790_even_position.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"even_position\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :even_position end)\n candidate = fn args -> apply(HumanEval, even_position, args) end\n assert false == candidate.([[3, 2, 1]])\n assert false == candidate.([[1, 2, 3]])\n assert true == candidate.([[2, 1, 4]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_791_remove_nested", "language": "elixir", "prompt": "# Write a function to remove tuples from the given tuple.\n\n\ndefmodule HumanEval do\n def remove_nested(t, e, s, t, _, t, u, p) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_791_remove_nested.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_nested\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_nested end)\n candidate = fn args -> apply(HumanEval, remove_nested, args) end\n assert {1, 5, 7, 10} == candidate.([{1, 5, 7, {4, 6}, 10}])\n assert {2, 6, 8, 11} == candidate.([{2, 6, 8, {5, 7}, 11}])\n assert {3, 7, 9, 12} == candidate.([{3, 7, 9, {6, 8}, 12}])\n assert {3, 7, 9, 12} == candidate.([{3, 7, 9, {6, 8}, {5, 12}, 12}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_792_count_list", "language": "elixir", "prompt": "# Write an elixirthon function to count the number of lists in a given number of lists.\n\n\ndefmodule HumanEval do\n def count_list(i, n, p, u, t, _, l, i, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_792_count_list.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_list end)\n candidate = fn args -> apply(HumanEval, count_list, args) end\n assert 4 == candidate.([[[1, 3], [5, 7], [9, 11], [13, 15, 17]]])\n assert 3 == candidate.([[[1, 2], [2, 3], [4, 5]]])\n assert 2 == candidate.([[[1, 0], [2, 0]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_793_last", "language": "elixir", "prompt": "# Write an elixirthon function to find the last position of an element in a sorted list.\n\n\ndefmodule HumanEval do\n def last(a, r, r, ,, , x) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_793_last.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"last\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :last end)\n candidate = fn args -> apply(HumanEval, last, args) end\n assert 0 == candidate.([[1, 2, 3], 1])\n assert 2 == candidate.([[1, 1, 1, 2, 3, 4], 1])\n assert 3 == candidate.([[2, 3, 2, 3, 6, 8, 9], 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_794_text_starta_endb", "language": "elixir", "prompt": "# Write a function that matches a string that has an 'a' followed by anything, ending in 'b'.\n\n\ndefmodule HumanEval do\n def text_starta_endb(t, e, x, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_794_text_starta_endb.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"text_starta_endb\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :text_starta_endb end)\n candidate = fn args -> apply(HumanEval, text_starta_endb, args) end\n assert true == candidate.([\"aabbbb\"])\n assert false == candidate.([\"aabAbbbc\"])\n assert false == candidate.([\"accddbbjjj\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_796_return_sum", "language": "elixir", "prompt": "# Write function to find the sum of all items in the given map.\n\n\ndefmodule HumanEval do\n def return_sum(d, i, c, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_796_return_sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"return_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :return_sum end)\n candidate = fn args -> apply(HumanEval, return_sum, args) end\n assert 600 == candidate.([%{\"a\" => 100, \"b\" => 200, \"c\" => 300}])\n assert 88 == candidate.([%{\"a\" => 25, \"b\" => 18, \"c\" => 45}])\n assert 124 == candidate.([%{\"a\" => 36, \"b\" => 39, \"c\" => 49}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_797_sum_in_range", "language": "elixir", "prompt": "# Write an elixirthon function to find the sum of all odd natural numbers within the range l and r.\n\n\ndefmodule HumanEval do\n def sum_in_range(l, ,, , r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_797_sum_in_range.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sum_in_range\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sum_in_range end)\n candidate = fn args -> apply(HumanEval, sum_in_range, args) end\n assert 8 == candidate.([2, 5])\n assert 12 == candidate.([5, 7])\n assert 40 == candidate.([7, 13])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_798__sum", "language": "elixir", "prompt": "# Write an elixirthon function to find the sum of a list.\n\n\ndefmodule HumanEval do\n def _sum(a, r, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_798__sum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"_sum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :_sum end)\n candidate = fn args -> apply(HumanEval, _sum, args) end\n assert 6 == candidate.([[1, 2, 3]])\n assert 50 == candidate.([[15, 12, 13, 10]])\n assert 3 == candidate.([[0, 1, 2]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_799_left_rotate", "language": "elixir", "prompt": "# Write a function to that rotate left bits by d bits a given number. We assume that the number is 32 bit.\n\n\ndefmodule HumanEval do\n def left_rotate(n, ,, , d) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_799_left_rotate.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"left_rotate\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :left_rotate end)\n candidate = fn args -> apply(HumanEval, left_rotate, args) end\n assert 64 == candidate.([16, 2])\n assert 40 == candidate.([10, 2])\n assert 792 == candidate.([99, 3])\n assert 792 == candidate.([99, 3])\n assert 8 == candidate.([1, 3])\n assert 40 == candidate.([5, 3])\n assert 232 == candidate.([29, 3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_79_word_len", "language": "elixir", "prompt": "# Write an elixirthon function to check whether the length of the word is odd or not.\n\n\ndefmodule HumanEval do\n def word_len(s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_79_word_len.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"word_len\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :word_len end)\n candidate = fn args -> apply(HumanEval, word_len, args) end\n assert false == candidate.([\"Hadoop\"])\n assert true == candidate.([\"great\"])\n assert true == candidate.([\"structure\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_800_remove_all_spaces", "language": "elixir", "prompt": "# Write a function to remove all whitespaces from a string.\n\n\ndefmodule HumanEval do\n def remove_all_spaces(t, e, x, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_800_remove_all_spaces.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"remove_all_spaces\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :remove_all_spaces end)\n candidate = fn args -> apply(HumanEval, remove_all_spaces, args) end\n assert \"pythonprogram\" == candidate.([\"python program\"])\n assert \"pythonprogramminglanguage\" == candidate.([\"python programming language\"])\n assert \"pythonprogram\" == candidate.([\"python program\"])\n assert \"pythonprogram\" == candidate.([\" python program\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_801_test_three_equal", "language": "elixir", "prompt": "# Write an elixirthon function to count the number of equal numbers from three given integers.\n\n\ndefmodule HumanEval do\n def test_three_equal(x, ,, , y, ,, , z) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_801_test_three_equal.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"test_three_equal\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :test_three_equal end)\n candidate = fn args -> apply(HumanEval, test_three_equal, args) end\n assert 3 == candidate.([1, 1, 1])\n assert 0 == candidate.([-1, -2, -3])\n assert 2 == candidate.([1, 2, 2])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_802_count_rotation", "language": "elixir", "prompt": "# Write an elixirthon function to count the number of rotations required to generate a sorted list. https://www.geeksforgeeks.org/count-of-rotations-required-to-generate-a-sorted-list/\n\n\ndefmodule HumanEval do\n def count_rotation(a, r, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_802_count_rotation.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"count_rotation\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :count_rotation end)\n candidate = fn args -> apply(HumanEval, count_rotation, args) end\n assert 1 == candidate.([[3, 2, 1]])\n assert 2 == candidate.([[4, 5, 1, 2, 3]])\n assert 3 == candidate.([[7, 8, 9, 1, 2, 3]])\n assert 0 == candidate.([[1, 2, 3]])\n assert 2 == candidate.([[1, 3, 2]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_803_is_perfect_square", "language": "elixir", "prompt": "# Write a function to check whether the given number is a perfect square or not. https://www.geeksforgeeks.org/check-if-given-number-is-perfect-square-in-cpp/\n\n\ndefmodule HumanEval do\n def is_perfect_square(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_803_is_perfect_square.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_perfect_square\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_perfect_square end)\n candidate = fn args -> apply(HumanEval, is_perfect_square, args) end\n assert false == candidate.([10])\n assert true == candidate.([36])\n assert false == candidate.([14])\n assert true == candidate.([196])\n assert false == candidate.([125])\n assert true == candidate.([15625])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_804_is_product_even", "language": "elixir", "prompt": "# Write a function to check whether the product of numbers in a list is even or not.\n\n\ndefmodule HumanEval do\n def is_product_even(a, r, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_804_is_product_even.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_product_even\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_product_even end)\n candidate = fn args -> apply(HumanEval, is_product_even, args) end\n assert true == candidate.([[1, 2, 3]])\n assert true == candidate.([[1, 2, 1, 4]])\n assert false == candidate.([[1, 1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_805_max_sum_list", "language": "elixir", "prompt": "# Write a function that returns the list in a list of lists whose sum of elements is the highest.\n\n\ndefmodule HumanEval do\n def max_sum_list(l, i, s, t, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_805_max_sum_list.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_sum_list\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_sum_list end)\n candidate = fn args -> apply(HumanEval, max_sum_list, args) end\n assert [10, 11, 12] == candidate.([[[1, 2, 3], [4, 5, 6], [10, 11, 12], [7, 8, 9]]])\n assert [12, 11, 10] == candidate.([[[3, 2, 1], [6, 5, 4], [12, 11, 10]]])\n assert [2, 3, 1] == candidate.([[[2, 3, 1]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_806_max_run_uppercase", "language": "elixir", "prompt": "# Write a function to find maximum run of uppercase characters in the given string.\n\n\ndefmodule HumanEval do\n def max_run_uppercase(t, e, s, t, _, s, t, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_806_max_run_uppercase.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"max_run_uppercase\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :max_run_uppercase end)\n candidate = fn args -> apply(HumanEval, max_run_uppercase, args) end\n assert 5 == candidate.([\"GeMKSForGERksISBESt\"])\n assert 6 == candidate.([\"PrECIOusMOVemENTSYT\"])\n assert 4 == candidate.([\"GooGLEFluTTER\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_807_first_odd", "language": "elixir", "prompt": "# Write an elixirthon function to find the first odd number in a given list of numbers.\n\n\ndefmodule HumanEval do\n def first_odd(n, u, m, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_807_first_odd.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"first_odd\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :first_odd end)\n candidate = fn args -> apply(HumanEval, first_odd, args) end\n assert 1 == candidate.([[1, 3, 5]])\n assert 1 == candidate.([[2, 4, 1, 3]])\n assert 9 == candidate.([[8, 9, 1]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_808_check_K", "language": "elixir", "prompt": "# Write a function to check if the given tuples contain the k or not.\n\n\ndefmodule HumanEval do\n def check_K(t, e, s, t, _, t, u, p, ,, , K) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_808_check_K.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_K\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_K end)\n candidate = fn args -> apply(HumanEval, check_K, args) end\n assert true == candidate.([[10, 4, 5, 6, 8], 6])\n assert false == candidate.([[1, 2, 3, 4, 5, 6], 7])\n assert true == candidate.([[7, 8, 9, 44, 11, 12], 11])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_809_check_smaller", "language": "elixir", "prompt": "# Write a function to check if each element of second tuple is smaller than its corresponding element in the first tuple.\n\n\ndefmodule HumanEval do\n def check_smaller(t, e, s, t, _, t, u, p, 1, ,, , t, e, s, t, _, t, u, p, 2) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_809_check_smaller.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"check_smaller\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :check_smaller end)\n candidate = fn args -> apply(HumanEval, check_smaller, args) end\n assert false == candidate.([{1, 2, 3}, {2, 3, 4}])\n assert true == candidate.([{4, 5, 6}, {3, 4, 5}])\n assert true == candidate.([{11, 12, 13}, {10, 11, 12}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_80_tetrahedral_number", "language": "elixir", "prompt": "# Write a function to find the nth tetrahedral number.\n\n\ndefmodule HumanEval do\n def tetrahedral_number(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_80_tetrahedral_number.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"tetrahedral_number\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :tetrahedral_number end)\n candidate = fn args -> apply(HumanEval, tetrahedral_number, args) end\n assert 35 == candidate.([5])\n assert 56 == candidate.([6])\n assert 84 == candidate.([7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_83_get_Char", "language": "elixir", "prompt": "# Write an elixirthon function to find the character made by adding the ASCII value of all the characters of the given string modulo 26.\n\n\ndefmodule HumanEval do\n def get_Char(s, t, r, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_83_get_Char.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"get_Char\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :get_Char end)\n candidate = fn args -> apply(HumanEval, get_Char, args) end\n assert \"f\" == candidate.([\"abc\"])\n assert \"t\" == candidate.([\"gfg\"])\n assert \"c\" == candidate.([\"ab\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_84_sequence", "language": "elixir", "prompt": "# Write a function to find the nth number in the newman conway sequence.\n\n\ndefmodule HumanEval do\n def sequence(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_84_sequence.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"sequence\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :sequence end)\n candidate = fn args -> apply(HumanEval, sequence, args) end\n assert 6 == candidate.([10])\n assert 1 == candidate.([2])\n assert 2 == candidate.([3])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_86_centered_hexagonal_number", "language": "elixir", "prompt": "# Write a function to find nth centered hexagonal number.\n\n\ndefmodule HumanEval do\n def centered_hexagonal_number(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_86_centered_hexagonal_number.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"centered_hexagonal_number\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :centered_hexagonal_number end)\n candidate = fn args -> apply(HumanEval, centered_hexagonal_number, args) end\n assert 271 == candidate.([10])\n assert 7 == candidate.([2])\n assert 217 == candidate.([9])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_87_merge_dictionaries_three", "language": "elixir", "prompt": "# Write a function to merge three dictionaries into a single map.\n\n\ndefmodule HumanEval do\n def merge_dictionaries_three(d, i, c, t, 1, ,, , d, i, c, t, 2, ,, , d, i, c, t, 3) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_87_merge_dictionaries_three.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"merge_dictionaries_three\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :merge_dictionaries_three end)\n candidate = fn args -> apply(HumanEval, merge_dictionaries_three, args) end\n assert %{\"B\" => \"Black\", \"R\" => \"Red\", \"P\" => \"Pink\", \"G\" => \"Green\", \"W\" => \"White\", \"O\" => \"Orange\"} == candidate.([%{\"R\" => \"Red\", \"B\" => \"Black\", \"P\" => \"Pink\"}, %{\"G\" => \"Green\", \"W\" => \"White\"}, %{\"O\" => \"Orange\", \"W\" => \"White\", \"B\" => \"Black\"}])\n assert %{\"W\" => \"White\", \"P\" => \"Pink\", \"B\" => \"Black\", \"R\" => \"Red\", \"G\" => \"Green\", \"L\" => \"lavender\"} == candidate.([%{\"R\" => \"Red\", \"B\" => \"Black\", \"P\" => \"Pink\"}, %{\"G\" => \"Green\", \"W\" => \"White\"}, %{\"L\" => \"lavender\", \"B\" => \"Blue\"}])\n assert %{\"B\" => \"Black\", \"P\" => \"Pink\", \"R\" => \"Red\", \"G\" => \"Green\", \"L\" => \"lavender\", \"W\" => \"White\"} == candidate.([%{\"R\" => \"Red\", \"B\" => \"Black\", \"P\" => \"Pink\"}, %{\"L\" => \"lavender\", \"B\" => \"Blue\"}, %{\"G\" => \"Green\", \"W\" => \"White\"}])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_88_freq_count", "language": "elixir", "prompt": "# Write a function to get the frequency of all the elements in a list, returned as a map.\n\n\ndefmodule HumanEval do\n def freq_count(l, i, s, t, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_88_freq_count.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"freq_count\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :freq_count end)\n candidate = fn args -> apply(HumanEval, freq_count, args) end\n assert %{10 => 4, 20 => 4, 40 => 2, 50 => 2, 30 => 1} == candidate.([[10, 10, 10, 10, 20, 20, 20, 20, 40, 40, 50, 50, 30]])\n assert %{1 => 3, 2 => 2, 3 => 3, 4 => 3} == candidate.([[1, 2, 3, 4, 3, 2, 4, 1, 3, 1, 4]])\n assert %{10 => 1, 5 => 3, 6 => 2, 7 => 2, 4 => 2, 9 => 2} == candidate.([[5, 6, 7, 4, 9, 10, 4, 5, 6, 7, 9, 5]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_89_closest_num", "language": "elixir", "prompt": "# Write a function to find the closest smaller number than n.\n\n\ndefmodule HumanEval do\n def closest_num(N) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_89_closest_num.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"closest_num\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :closest_num end)\n candidate = fn args -> apply(HumanEval, closest_num, args) end\n assert 10 == candidate.([11])\n assert 6 == candidate.([7])\n assert 11 == candidate.([12])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_8_square_nums", "language": "elixir", "prompt": "# Write a function to find squares of individual elements in a list.\n\n\ndefmodule HumanEval do\n def square_nums(n, u, m, s) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_8_square_nums.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"square_nums\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :square_nums end)\n candidate = fn args -> apply(HumanEval, square_nums, args) end\n assert [1, 4, 9, 16, 25, 36, 49, 64, 81, 100] == candidate.([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]])\n assert [100, 400, 900] == candidate.([[10, 20, 30]])\n assert [144, 225] == candidate.([[12, 15]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_90_len_log", "language": "elixir", "prompt": "# Write an elixirthon function to find the length of the longest word.\n\n\ndefmodule HumanEval do\n def len_log(l, i, s, t, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_90_len_log.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"len_log\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :len_log end)\n candidate = fn args -> apply(HumanEval, len_log, args) end\n assert 7 == candidate.([[\"python\", \"PHP\", \"bigdata\"]])\n assert 3 == candidate.([[\"a\", \"ab\", \"abc\"]])\n assert 5 == candidate.([[\"small\", \"big\", \"tall\"]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_91_find_substring", "language": "elixir", "prompt": "# Write a function to check if a string is present as a substring in a given list of string values.\n\n\ndefmodule HumanEval do\n def find_substring(s, t, r, 1, ,, , s, u, b, _, s, t, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_91_find_substring.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_substring\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_substring end)\n candidate = fn args -> apply(HumanEval, find_substring, args) end\n assert true == candidate.([[\"red\", \"black\", \"white\", \"green\", \"orange\"], \"ack\"])\n assert false == candidate.([[\"red\", \"black\", \"white\", \"green\", \"orange\"], \"abc\"])\n assert true == candidate.([[\"red\", \"black\", \"white\", \"green\", \"orange\"], \"ange\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_92_is_undulating", "language": "elixir", "prompt": "# Write a function to check whether the given number is undulating or not.\n\n\ndefmodule HumanEval do\n def is_undulating(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_92_is_undulating.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"is_undulating\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :is_undulating end)\n candidate = fn args -> apply(HumanEval, is_undulating, args) end\n assert true == candidate.([1212121])\n assert false == candidate.([1991])\n assert true == candidate.([121])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_93_power", "language": "elixir", "prompt": "# Write a function to calculate the value of 'a' to the power 'b'.\n\n\ndefmodule HumanEval do\n def power(a, ,, , b) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_93_power.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"power\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :power end)\n candidate = fn args -> apply(HumanEval, power, args) end\n assert 81 == candidate.([3, 4])\n assert 8 == candidate.([2, 3])\n assert 3125 == candidate.([5, 5])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_94_index_minimum", "language": "elixir", "prompt": "# Given a list of tuples, write a function that returns the first value of the tuple with the smallest second value.\n\n\ndefmodule HumanEval do\n def index_minimum(t, e, s, t, _, l, i, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_94_index_minimum.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"index_minimum\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :index_minimum end)\n candidate = fn args -> apply(HumanEval, index_minimum, args) end\n assert \"Varsha\" == candidate.([[{\"Rash\", 143}, {\"Manjeet\", 200}, {\"Varsha\", 100}]])\n assert \"Dawood\" == candidate.([[{\"Yash\", 185}, {\"Dawood\", 125}, {\"Sanya\", 175}]])\n assert \"Ayesha\" == candidate.([[{\"Sai\", 345}, {\"Salman\", 145}, {\"Ayesha\", 96}]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_95_Find_Min_Length", "language": "elixir", "prompt": "# Write an elixirthon function to find the length of the smallest list in a list of lists.\n\n\ndefmodule HumanEval do\n def Find_Min_Length(l, s, t) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_95_Find_Min_Length.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"Find_Min_Length\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :Find_Min_Length end)\n candidate = fn args -> apply(HumanEval, Find_Min_Length, args) end\n assert 1 == candidate.([[[1], [1, 2]]])\n assert 2 == candidate.([[[1, 2], [1, 2, 3], [1, 2, 3, 4]]])\n assert 3 == candidate.([[[3, 3, 3], [4, 4, 4, 4]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_96_divisor", "language": "elixir", "prompt": "# Write an elixirthon function to find the number of divisors of a given integer.\n\n\ndefmodule HumanEval do\n def divisor(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_96_divisor.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"divisor\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :divisor end)\n candidate = fn args -> apply(HumanEval, divisor, args) end\n assert 4 == candidate.([15])\n assert 6 == candidate.([12])\n assert 3 == candidate.([9])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_97_frequency_lists", "language": "elixir", "prompt": "# Write a function to find frequency of each element in a flattened list of lists, returned in a map.\n\n\ndefmodule HumanEval do\n def frequency_lists(l, i, s, t, 1) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_97_frequency_lists.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"frequency_lists\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :frequency_lists end)\n candidate = fn args -> apply(HumanEval, frequency_lists, args) end\n assert %{1 => 1, 2 => 3, 3 => 1, 4 => 1, 5 => 2, 6 => 1, 7 => 1, 8 => 1, 9 => 1} == candidate.([[[1, 2, 3, 2], [4, 5, 6, 2], [7, 8, 9, 5]]])\n assert %{1 => 1, 2 => 1, 3 => 1, 4 => 1, 5 => 1, 6 => 1, 7 => 1, 8 => 1, 9 => 1, 10 => 1, 11 => 1, 12 => 1} == candidate.([[[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]])\n assert %{20 => 2, 30 => 2, 40 => 2, 17 => 1, 18 => 1, 16 => 1, 14 => 1, 13 => 1, 10 => 1} == candidate.([[[20, 30, 40, 17], [18, 16, 14, 13], [10, 20, 30, 40]]])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_99_decimal_to_binary", "language": "elixir", "prompt": "# Write a function to convert the given decimal number to its binary equivalent, represented as a string with no leading zeros.\n\n\ndefmodule HumanEval do\n def decimal_to_binary(n) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_99_decimal_to_binary.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"decimal_to_binary\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :decimal_to_binary end)\n candidate = fn args -> apply(HumanEval, decimal_to_binary, args) end\n assert \"1000\" == candidate.([8])\n assert \"10010\" == candidate.([18])\n assert \"111\" == candidate.([7])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]} +{"name": "mbpp_9_find_Rotations", "language": "elixir", "prompt": "# Write an elixirthon function to find the minimum number of rotations (greater than 0) required to get the same string.\n\n\ndefmodule HumanEval do\n def find_Rotations(s, t, r) do", "doctests": "transform", "original": "/Users/mvkvc/dev/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_9_find_Rotations.py", "prompt_terminology": "reworded", "tests": "ExUnit.start()\n\ndefmodule HumanEvalTest do\n use ExUnit.Case, async: true\n test \"find_Rotations\" do\n functions = HumanEval.__info__(:functions)\n {function_name, arity} = Enum.find(functions, fn {name, _arity} -> name == :find_Rotations end)\n candidate = fn args -> apply(HumanEval, find_Rotations, args) end\n assert 1 == candidate.([\"aaaa\"])\n assert 2 == candidate.([\"ab\"])\n assert 3 == candidate.([\"abc\"])\n end\nend\n", "stop_tokens": ["\ndefmodule", "\ndefp", "\ndef ", "\n#", "\n\n"]}