name
stringclasses
161 values
language
stringclasses
22 values
prompt
stringlengths
40
2.27k
doctests
stringclasses
3 values
original
stringclasses
956 values
prompt_terminology
stringclasses
2 values
tests
stringlengths
125
5.35k
stop_tokens
listlengths
1
7
HumanEval_156_int_to_mini_roman
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Given a positive integer, obtain its roman numeral equivalent as a string, // and return it in lowercase. // Restricti...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_156_int_to_mini_roman.py
verbatim
} public static void Main(string[] args) { Debug.Assert(IntToMiniRoman((19L)).Equals(("xix"))); Debug.Assert(IntToMiniRoman((152L)).Equals(("clii"))); Debug.Assert(IntToMiniRoman((251L)).Equals(("ccli"))); Debug.Assert(IntToMiniRoman((426L)).Equals(("cdxxvi"))); Debug.Assert(IntToMiniRoman((...
[ "\n }\n" ]
HumanEval_157_right_angle_triangle
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Given the lengths of the three sides of a triangle. Return True if the three // sides form a right-angled triangle, False ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_157_right_angle_triangle.py
verbatim
} public static void Main(string[] args) { Debug.Assert(RightAngleTriangle((3L), (4L), (5L)) == (true)); Debug.Assert(RightAngleTriangle((1L), (2L), (3L)) == (false)); Debug.Assert(RightAngleTriangle((10L), (6L), (8L)) == (true)); Debug.Assert(RightAngleTriangle((2L), (2L), (2L)) == (false)); ...
[ "\n }\n" ]
HumanEval_158_find_max
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Write a function that accepts a list of strings. // The list contains different words. Return the word with maximum number...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_158_find_max.py
verbatim
} public static void Main(string[] args) { Debug.Assert(FindMax((new List<string>(new string[]{(string)"name", (string)"of", (string)"string"}))).Equals(("string"))); Debug.Assert(FindMax((new List<string>(new string[]{(string)"name", (string)"enam", (string)"game"}))).Equals(("enam"))); Debug.Asser...
[ "\n }\n" ]
HumanEval_159_eat
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // You're a hungry rabbit, and you already have eaten a certain number of carrots, // but now you need to eat more carrots to...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_159_eat.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Eat((5L), (6L), (10L)).Equals((new List<long>(new long[]{(long)11L, (long)4L})))); Debug.Assert(Eat((4L), (8L), (9L)).Equals((new List<long>(new long[]{(long)12L, (long)1L})))); Debug.Assert(Eat((1L), (10L), (10L)).Equals((new List<long>(new lo...
[ "\n }\n" ]
HumanEval_15_string_sequence
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Return a string containing space-delimited numbers starting from 0 upto n inclusive. // >>> string_sequence(0) // '0' ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_15_string_sequence.py
verbatim
} public static void Main(string[] args) { Debug.Assert(StringSequence((0L)).Equals(("0"))); Debug.Assert(StringSequence((3L)).Equals(("0 1 2 3"))); Debug.Assert(StringSequence((10L)).Equals(("0 1 2 3 4 5 6 7 8 9 10"))); } }
[ "\n }\n" ]
HumanEval_160_do_algebra
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Given two lists operator, and operand. The first list has basic algebra operations, and // the second list is a list of i...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_160_do_algebra.py
verbatim
} public static void Main(string[] args) { Debug.Assert(DoAlgebra((new List<string>(new string[]{(string)"**", (string)"*", (string)"+"})), (new List<long>(new long[]{(long)2L, (long)3L, (long)4L, (long)5L}))) == (37L)); Debug.Assert(DoAlgebra((new List<string>(new string[]{(string)"+", (string)"*", (st...
[ "\n }\n" ]
HumanEval_161_solve
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // You are given a string s. // if s[i] is a letter, reverse its case from lower to upper or vise versa, // otherwise ke...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_161_solve.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Solve(("AsDf")).Equals(("aSdF"))); Debug.Assert(Solve(("1234")).Equals(("4321"))); Debug.Assert(Solve(("ab")).Equals(("AB"))); Debug.Assert(Solve(("#a@C")).Equals(("#A@c"))); Debug.Assert(Solve(("#AsdfW^45")).Equals(("#aSDFw^45"))); ...
[ "\n }\n" ]
HumanEval_162_string_to_md5
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Given a string 'text', return its md5 hash equivalent string. // If 'text' is an empty string, return None. // >>> str...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_162_string_to_md5.py
verbatim
} public static void Main(string[] args) { Debug.Assert(StringToMd5(("Hello world")).Equals(("3e25960a79dbc69b674cd4ec67a72c62"))); Debug.Assert(StringToMd5(("")).Equals(null)); Debug.Assert(StringToMd5(("A B C")).Equals(("0ef78513b0cb8cef12743f5aeb35f888"))); Debug.Assert(StringToMd5(("password...
[ "\n }\n" ]
HumanEval_163_generate_integers
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Given two positive integers a and b, return the even digits between a // and b, in ascending order. // For example: ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_163_generate_integers.py
verbatim
} public static void Main(string[] args) { Debug.Assert(GenerateIntegers((2L), (10L)).Equals((new List<long>(new long[]{(long)2L, (long)4L, (long)6L, (long)8L})))); Debug.Assert(GenerateIntegers((10L), (2L)).Equals((new List<long>(new long[]{(long)2L, (long)4L, (long)6L, (long)8L})))); Debug.Assert(...
[ "\n }\n" ]
HumanEval_16_count_distinct_characters
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Given a string, find out how many distinct characters (regardless of case) does it consist of // >>> count_distinct_charac...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_16_count_distinct_characters.py
verbatim
} public static void Main(string[] args) { Debug.Assert(CountDistinctCharacters(("")) == (0L)); Debug.Assert(CountDistinctCharacters(("abcde")) == (5L)); Debug.Assert(CountDistinctCharacters(("abcdecadeCADE")) == (5L)); Debug.Assert(CountDistinctCharacters(("aaaaAAAAaaaa")) == (1L)); Debug.A...
[ "\n }\n" ]
HumanEval_17_parse_music
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Input to this function is a string representing musical notes in a special ASCII format. // Your task is to parse this str...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_17_parse_music.py
verbatim
} public static void Main(string[] args) { Debug.Assert(ParseMusic(("")).Equals((new List<long>()))); Debug.Assert(ParseMusic(("o o o o")).Equals((new List<long>(new long[]{(long)4L, (long)4L, (long)4L, (long)4L})))); Debug.Assert(ParseMusic((".| .| .| .|")).Equals((new List<long>(new long[]{(long)1...
[ "\n }\n" ]
HumanEval_18_how_many_times
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Find how many times a given substring can be found in the original string. Count overlaping cases. // >>> how_many_times('...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_18_how_many_times.py
verbatim
} public static void Main(string[] args) { Debug.Assert(HowManyTimes((""), ("x")) == (0L)); Debug.Assert(HowManyTimes(("xyxyxyx"), ("x")) == (4L)); Debug.Assert(HowManyTimes(("cacacacac"), ("cac")) == (4L)); Debug.Assert(HowManyTimes(("john doe"), ("john")) == (1L)); } }
[ "\n }\n" ]
HumanEval_19_sort_numbers
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Input is a space-delimited string of numberals from 'zero' to 'nine'. // Valid choices are 'zero', 'one', 'two', 'three', ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_19_sort_numbers.py
verbatim
} public static void Main(string[] args) { Debug.Assert(SortNumbers(("")).Equals((""))); Debug.Assert(SortNumbers(("three")).Equals(("three"))); Debug.Assert(SortNumbers(("three five nine")).Equals(("three five nine"))); Debug.Assert(SortNumbers(("five zero four seven nine eight")).Equals(("zero...
[ "\n }\n" ]
HumanEval_1_separate_paren_groups
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Input to this function is a string containing multiple groups of nested parentheses. Your goal is to // separate those gro...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_1_separate_paren_groups.py
verbatim
} public static void Main(string[] args) { Debug.Assert(SeparateParenGroups(("(()()) ((())) () ((())()())")).Equals((new List<string>(new string[]{(string)"(()())", (string)"((()))", (string)"()", (string)"((())()())"})))); Debug.Assert(SeparateParenGroups(("() (()) ((())) (((())))")).Equals((new List<s...
[ "\n }\n" ]
HumanEval_20_find_closest_elements
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // From a supplied list of numbers (of length at least two) select and return two that are the closest to each // other and r...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_20_find_closest_elements.py
verbatim
} public static void Main(string[] args) { Debug.Assert(FindClosestElements((new List<float>(new float[]{(float)1.0f, (float)2.0f, (float)3.9f, (float)4.0f, (float)5.0f, (float)2.2f}))).Equals((Tuple.Create(3.9f, 4.0f)))); Debug.Assert(FindClosestElements((new List<float>(new float[]{(float)1.0f, (float...
[ "\n }\n" ]
HumanEval_21_rescale_to_unit
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Given list of numbers (of at least two elements), apply a linear transform to that list, // such that the smallest number ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_21_rescale_to_unit.py
verbatim
} public static void Main(string[] args) { Debug.Assert(RescaleToUnit((new List<float>(new float[]{(float)2.0f, (float)49.9f}))).Equals((new List<float>(new float[]{(float)0.0f, (float)1.0f})))); Debug.Assert(RescaleToUnit((new List<float>(new float[]{(float)100.0f, (float)49.9f}))).Equals((new List<flo...
[ "\n }\n" ]
HumanEval_22_filter_integers
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Filter given list of any python values only for integers // >>> filter_integers(['a', 3.14, 5]) // [5] // >>> filt...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_22_filter_integers.py
verbatim
} public static void Main(string[] args) { Debug.Assert(FilterIntegers((new List<object>())).Equals((new List<long>()))); Debug.Assert(FilterIntegers((new List<object>(new object[]{4L, new List<object>(), 23.2f, 9L, "adasd"}))).Equals((new List<long>(new long[]{(long)4L, (long)9L})))); Debug.Assert(...
[ "\n }\n" ]
HumanEval_23_strlen
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Return length of given string // >>> strlen('') // 0 // >>> strlen('abc') // 3 // public static long S...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_23_strlen.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Strlen(("")) == (0L)); Debug.Assert(Strlen(("x")) == (1L)); Debug.Assert(Strlen(("asdasnakj")) == (9L)); } }
[ "\n }\n" ]
HumanEval_24_largest_divisor
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // For a given number n, find the largest number that divides n evenly, smaller than n // >>> largest_divisor(15) // 5 ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_24_largest_divisor.py
verbatim
} public static void Main(string[] args) { Debug.Assert(LargestDivisor((3L)) == (1L)); Debug.Assert(LargestDivisor((7L)) == (1L)); Debug.Assert(LargestDivisor((10L)) == (5L)); Debug.Assert(LargestDivisor((100L)) == (50L)); Debug.Assert(LargestDivisor((49L)) == (7L)); } }
[ "\n }\n" ]
HumanEval_25_factorize
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Return list of prime factors of given integer in the order from smallest to largest. // Each of the factors should be list...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_25_factorize.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Factorize((2L)).Equals((new List<long>(new long[]{(long)2L})))); Debug.Assert(Factorize((4L)).Equals((new List<long>(new long[]{(long)2L, (long)2L})))); Debug.Assert(Factorize((8L)).Equals((new List<long>(new long[]{(long)2L, (long)2L, (long)2L...
[ "\n }\n" ]
HumanEval_26_remove_duplicates
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // From a list of integers, remove all elements that occur more than once. // Keep order of elements left the same as in the ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_26_remove_duplicates.py
verbatim
} public static void Main(string[] args) { Debug.Assert(RemoveDuplicates((new List<long>())).Equals((new List<long>()))); Debug.Assert(RemoveDuplicates((new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L}))).Equals((new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L})))); ...
[ "\n }\n" ]
HumanEval_27_flip_case
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // For a given string, flip lowercase characters to uppercase and uppercase to lowercase. // >>> flip_case('Hello') // 'h...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_27_flip_case.py
verbatim
} public static void Main(string[] args) { Debug.Assert(FlipCase(("")).Equals((""))); Debug.Assert(FlipCase(("Hello!")).Equals(("hELLO!"))); Debug.Assert(FlipCase(("These violent delights have violent ends")).Equals(("tHESE VIOLENT DELIGHTS HAVE VIOLENT ENDS"))); } }
[ "\n }\n" ]
HumanEval_28_concatenate
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Concatenate list of strings into a single string // >>> concatenate([]) // '' // >>> concatenate(['a', 'b', 'c']) ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_28_concatenate.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Concatenate((new List<string>())).Equals((""))); Debug.Assert(Concatenate((new List<string>(new string[]{(string)"x", (string)"y", (string)"z"}))).Equals(("xyz"))); Debug.Assert(Concatenate((new List<string>(new string[]{(string)"x", (string)"y...
[ "\n }\n" ]
HumanEval_29_filter_by_prefix
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Filter an input list of strings only for ones that start with a given prefix. // >>> filter_by_prefix([], 'a') // [] ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_29_filter_by_prefix.py
verbatim
} public static void Main(string[] args) { Debug.Assert(FilterByPrefix((new List<string>()), ("john")).Equals((new List<string>()))); Debug.Assert(FilterByPrefix((new List<string>(new string[]{(string)"xxx", (string)"asd", (string)"xxy", (string)"john doe", (string)"xxxAAA", (string)"xxx"})), ("xxx")).E...
[ "\n }\n" ]
HumanEval_2_truncate_number
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Given a positive floating point number, it can be decomposed into // and integer part (largest integer smaller than given ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_2_truncate_number.py
verbatim
} public static void Main(string[] args) { Debug.Assert(TruncateNumber((3.5f)) == (0.5f)); Debug.Assert(TruncateNumber((1.25f)) == (0.25f)); Debug.Assert(TruncateNumber((123.0f)) == (0.0f)); } }
[ "\n }\n" ]
HumanEval_30_get_positive
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Return only positive numbers in the list. // >>> get_positive([-1, 2, -4, 5, 6]) // [2, 5, 6] // >>> get_positive(...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_30_get_positive.py
verbatim
} public static void Main(string[] args) { Debug.Assert(GetPositive((new List<long>(new long[]{(long)-1L, (long)-2L, (long)4L, (long)5L, (long)6L}))).Equals((new List<long>(new long[]{(long)4L, (long)5L, (long)6L})))); Debug.Assert(GetPositive((new List<long>(new long[]{(long)5L, (long)3L, (long)-5L, (l...
[ "\n }\n" ]
HumanEval_31_is_prime
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Return true if a given number is prime, and false otherwise. // >>> is_prime(6) // False // >>> is_prime(101) ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_31_is_prime.py
verbatim
} public static void Main(string[] args) { Debug.Assert(IsPrime((6L)) == (false)); Debug.Assert(IsPrime((101L)) == (true)); Debug.Assert(IsPrime((11L)) == (true)); Debug.Assert(IsPrime((13441L)) == (true)); Debug.Assert(IsPrime((61L)) == (true)); Debug.Assert(IsPrime((4L)) == (false)); ...
[ "\n }\n" ]
HumanEval_33_sort_third
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // This function takes a list l and returns a list l' such that // l' is identical to l in the indicies that are not divisibl...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_33_sort_third.py
verbatim
} public static void Main(string[] args) { Debug.Assert(SortThird((new List<long>(new long[]{(long)5L, (long)6L, (long)3L, (long)4L, (long)8L, (long)9L, (long)2L}))).Equals((new List<long>(new long[]{(long)2L, (long)6L, (long)3L, (long)4L, (long)8L, (long)9L, (long)5L})))); Debug.Assert(SortThird((new L...
[ "\n }\n" ]
HumanEval_34_unique
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Return sorted unique elements in a list // >>> unique([5, 3, 5, 2, 3, 3, 9, 0, 123]) // [0, 2, 3, 5, 9, 123] // ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_34_unique.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Unique((new List<long>(new long[]{(long)5L, (long)3L, (long)5L, (long)2L, (long)3L, (long)3L, (long)9L, (long)0L, (long)123L}))).Equals((new List<long>(new long[]{(long)0L, (long)2L, (long)3L, (long)5L, (long)9L, (long)123L})))); } }
[ "\n }\n" ]
HumanEval_35_max_element
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Return maximum element in the list. // >>> max_element([1, 2, 3]) // 3 // >>> max_element([5, 3, -5, 2, -3, 3, 9, ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_35_max_element.py
verbatim
} public static void Main(string[] args) { Debug.Assert(MaxElement((new List<long>(new long[]{(long)1L, (long)2L, (long)3L}))) == (3L)); Debug.Assert(MaxElement((new List<long>(new long[]{(long)5L, (long)3L, (long)-5L, (long)2L, (long)-3L, (long)3L, (long)9L, (long)0L, (long)124L, (long)1L, (long)-10L})...
[ "\n }\n" ]
HumanEval_36_fizz_buzz
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13. // >>> fizz_buzz(5...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_36_fizz_buzz.py
verbatim
} public static void Main(string[] args) { Debug.Assert(FizzBuzz((50L)) == (0L)); Debug.Assert(FizzBuzz((78L)) == (2L)); Debug.Assert(FizzBuzz((79L)) == (3L)); Debug.Assert(FizzBuzz((100L)) == (3L)); Debug.Assert(FizzBuzz((200L)) == (6L)); Debug.Assert(FizzBuzz((4000L)) == (192L)); D...
[ "\n }\n" ]
HumanEval_37_sort_even
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // This function takes a list l and returns a list l' such that // l' is identical to l in the odd indicies, while its values...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_37_sort_even.py
verbatim
} public static void Main(string[] args) { Debug.Assert(SortEven((new List<long>(new long[]{(long)1L, (long)2L, (long)3L}))).Equals((new List<long>(new long[]{(long)1L, (long)2L, (long)3L})))); Debug.Assert(SortEven((new List<long>(new long[]{(long)5L, (long)3L, (long)-5L, (long)2L, (long)-3L, (long)3L,...
[ "\n }\n" ]
HumanEval_39_prime_fib
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // prime_fib returns n-th number that is a Fibonacci number and it's also prime. // >>> prime_fib(1) // 2 // >>> prim...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_39_prime_fib.py
verbatim
} public static void Main(string[] args) { Debug.Assert(PrimeFib((1L)) == (2L)); Debug.Assert(PrimeFib((2L)) == (3L)); Debug.Assert(PrimeFib((3L)) == (5L)); Debug.Assert(PrimeFib((4L)) == (13L)); Debug.Assert(PrimeFib((5L)) == (89L)); Debug.Assert(PrimeFib((6L)) == (233L)); Debug.Ass...
[ "\n }\n" ]
HumanEval_3_below_zero
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // You're given a list of deposit and withdrawal operations on a bank account that starts with // zero balance. Your task is ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_3_below_zero.py
verbatim
} public static void Main(string[] args) { Debug.Assert(BelowZero((new List<long>())) == (false)); Debug.Assert(BelowZero((new List<long>(new long[]{(long)1L, (long)2L, (long)-3L, (long)1L, (long)2L, (long)-3L}))) == (false)); Debug.Assert(BelowZero((new List<long>(new long[]{(long)1L, (long)2L, (lo...
[ "\n }\n" ]
HumanEval_40_triples_sum_to_zero
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // triples_sum_to_zero takes a list of integers as an input. // it returns True if there are three distinct elements in the l...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_40_triples_sum_to_zero.py
verbatim
} public static void Main(string[] args) { Debug.Assert(TriplesSumToZero((new List<long>(new long[]{(long)1L, (long)3L, (long)5L, (long)0L}))) == (false)); Debug.Assert(TriplesSumToZero((new List<long>(new long[]{(long)1L, (long)3L, (long)5L, (long)-1L}))) == (false)); Debug.Assert(TriplesSumToZero(...
[ "\n }\n" ]
HumanEval_41_car_race_collision
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Imagine a road that's a perfectly straight infinitely long line. // n cars are driving left to right; simultaneously, a d...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_41_car_race_collision.py
verbatim
} public static void Main(string[] args) { Debug.Assert(CarRaceCollision((2L)) == (4L)); Debug.Assert(CarRaceCollision((3L)) == (9L)); Debug.Assert(CarRaceCollision((4L)) == (16L)); Debug.Assert(CarRaceCollision((8L)) == (64L)); Debug.Assert(CarRaceCollision((10L)) == (100L)); } }
[ "\n }\n" ]
HumanEval_42_incr_list
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Return list with elements incremented by 1. // >>> incr_list([1, 2, 3]) // [2, 3, 4] // >>> incr_list([5, 3, 5, 2,...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_42_incr_list.py
verbatim
} public static void Main(string[] args) { Debug.Assert(IncrList((new List<long>())).Equals((new List<long>()))); Debug.Assert(IncrList((new List<long>(new long[]{(long)3L, (long)2L, (long)1L}))).Equals((new List<long>(new long[]{(long)4L, (long)3L, (long)2L})))); Debug.Assert(IncrList((new List<lon...
[ "\n }\n" ]
HumanEval_43_pairs_sum_to_zero
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // pairs_sum_to_zero takes a list of integers as an input. // it returns True if there are two distinct elements in the list ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_43_pairs_sum_to_zero.py
verbatim
} public static void Main(string[] args) { Debug.Assert(PairsSumToZero((new List<long>(new long[]{(long)1L, (long)3L, (long)5L, (long)0L}))) == (false)); Debug.Assert(PairsSumToZero((new List<long>(new long[]{(long)1L, (long)3L, (long)-2L, (long)1L}))) == (false)); Debug.Assert(PairsSumToZero((new L...
[ "\n }\n" ]
HumanEval_44_change_base
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Change numerical base of input number x to base. // return string representation after the conversion. // base numbers...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_44_change_base.py
verbatim
} public static void Main(string[] args) { Debug.Assert(ChangeBase((8L), (3L)).Equals(("22"))); Debug.Assert(ChangeBase((9L), (3L)).Equals(("100"))); Debug.Assert(ChangeBase((234L), (2L)).Equals(("11101010"))); Debug.Assert(ChangeBase((16L), (2L)).Equals(("10000"))); Debug.Assert(ChangeBase(...
[ "\n }\n" ]
HumanEval_45_triangle_area
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Given length of a side and high return area for a triangle. // >>> triangle_area(5, 3) // 7.5 // public static...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_45_triangle_area.py
verbatim
} public static void Main(string[] args) { Debug.Assert(TriangleArea((5L), (3L)) == (7.5f)); Debug.Assert(TriangleArea((2L), (2L)) == (2.0f)); Debug.Assert(TriangleArea((10L), (8L)) == (40.0f)); } }
[ "\n }\n" ]
HumanEval_46_fib4
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows: // fib4(0) -> 0 /...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_46_fib4.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Fib4((5L)) == (4L)); Debug.Assert(Fib4((8L)) == (28L)); Debug.Assert(Fib4((10L)) == (104L)); Debug.Assert(Fib4((12L)) == (386L)); } }
[ "\n }\n" ]
HumanEval_47_median
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Return median of elements in the list l. // >>> median([3, 1, 2, 4, 5]) // 3 // >>> median([-10, 4, 6, 1000, 10, 2...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_47_median.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Median((new List<long>(new long[]{(long)3L, (long)1L, (long)2L, (long)4L, (long)5L}))) == (float)3L); Debug.Assert(Median((new List<long>(new long[]{(long)-10L, (long)4L, (long)6L, (long)1000L, (long)10L, (long)20L}))) == (8.0f)); Debug.Assert(...
[ "\n }\n" ]
HumanEval_48_is_palindrome
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Checks if given string is a palindrome // >>> is_palindrome('') // True // >>> is_palindrome('aba') // True ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_48_is_palindrome.py
verbatim
} public static void Main(string[] args) { Debug.Assert(IsPalindrome(("")) == (true)); Debug.Assert(IsPalindrome(("aba")) == (true)); Debug.Assert(IsPalindrome(("aaaaa")) == (true)); Debug.Assert(IsPalindrome(("zbcd")) == (false)); Debug.Assert(IsPalindrome(("xywyx")) == (true)); Debug.A...
[ "\n }\n" ]
HumanEval_49_modp
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Return 2^n modulo p (be aware of numerics). // >>> modp(3, 5) // 3 // >>> modp(1101, 101) // 2 // >>> modp...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_49_modp.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Modp((3L), (5L)) == (3L)); Debug.Assert(Modp((1101L), (101L)) == (2L)); Debug.Assert(Modp((0L), (101L)) == (1L)); Debug.Assert(Modp((3L), (11L)) == (8L)); Debug.Assert(Modp((100L), (101L)) == (1L)); Debug.Assert(Modp((30L), (5L)) ==...
[ "\n }\n" ]
HumanEval_4_mean_absolute_deviation
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // For a given list of input numbers, calculate Mean Absolute Deviation // around the mean of this dataset. // Mean Absol...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_4_mean_absolute_deviation.py
verbatim
} public static void Main(string[] args) { Debug.Assert(MeanAbsoluteDeviation((new List<float>(new float[]{(float)1.0f, (float)2.0f}))) == (0.5f)); Debug.Assert(MeanAbsoluteDeviation((new List<float>(new float[]{(float)1.0f, (float)2.0f, (float)3.0f, (float)4.0f}))) == (1.0f)); Debug.Assert(MeanAbso...
[ "\n }\n" ]
HumanEval_51_remove_vowels
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // remove_vowels is a function that takes string and returns string without vowels. // >>> remove_vowels('') // '' //...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_51_remove_vowels.py
verbatim
} public static void Main(string[] args) { Debug.Assert(RemoveVowels(("")).Equals((""))); Debug.Assert(RemoveVowels(("abcdef\nghijklm")).Equals(("bcdf\nghjklm"))); Debug.Assert(RemoveVowels(("fedcba")).Equals(("fdcb"))); Debug.Assert(RemoveVowels(("eeeee")).Equals((""))); Debug.Assert(Remove...
[ "\n }\n" ]
HumanEval_52_below_threshold
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Return True if all numbers in the list l are below threshold t. // >>> below_threshold([1, 2, 4, 10], 100) // True ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_52_below_threshold.py
verbatim
} public static void Main(string[] args) { Debug.Assert(BelowThreshold((new List<long>(new long[]{(long)1L, (long)2L, (long)4L, (long)10L})), (100L)) == (true)); Debug.Assert(BelowThreshold((new List<long>(new long[]{(long)1L, (long)20L, (long)4L, (long)10L})), (5L)) == (false)); Debug.Assert(BelowT...
[ "\n }\n" ]
HumanEval_53_add
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Add two numbers x and y // >>> add(2, 3) // 5 // >>> add(5, 7) // 12 // public static long Add(long x,...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_53_add.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Add((0L), (1L)) == (1L)); Debug.Assert(Add((1L), (0L)) == (1L)); Debug.Assert(Add((2L), (3L)) == (5L)); Debug.Assert(Add((5L), (7L)) == (12L)); Debug.Assert(Add((7L), (5L)) == (12L)); } }
[ "\n }\n" ]
HumanEval_54_same_chars
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Check if two words have the same characters. // >>> same_chars('eabcdzzzz', 'dddzzzzzzzddeddabc') // True // >>> s...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_54_same_chars.py
verbatim
} public static void Main(string[] args) { Debug.Assert(SameChars(("eabcdzzzz"), ("dddzzzzzzzddeddabc")) == (true)); Debug.Assert(SameChars(("abcd"), ("dddddddabc")) == (true)); Debug.Assert(SameChars(("dddddddabc"), ("abcd")) == (true)); Debug.Assert(SameChars(("eabcd"), ("dddddddabc")) == (fal...
[ "\n }\n" ]
HumanEval_55_fib
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Return n-th Fibonacci number. // >>> fib(10) // 55 // >>> fib(1) // 1 // >>> fib(8) // 21 // p...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_55_fib.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Fib((10L)) == (55L)); Debug.Assert(Fib((1L)) == (1L)); Debug.Assert(Fib((8L)) == (21L)); Debug.Assert(Fib((11L)) == (89L)); Debug.Assert(Fib((12L)) == (144L)); } }
[ "\n }\n" ]
HumanEval_56_correct_bracketing
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // brackets is a string of "<" and ">". // return True if every opening bracket has a corresponding closing bracket. // >...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_56_correct_bracketing.py
verbatim
} public static void Main(string[] args) { Debug.Assert(CorrectBracketing(("<>")) == (true)); Debug.Assert(CorrectBracketing(("<<><>>")) == (true)); Debug.Assert(CorrectBracketing(("<><><<><>><>")) == (true)); Debug.Assert(CorrectBracketing(("<><><<<><><>><>><<><><<>>>")) == (true)); Debug.A...
[ "\n }\n" ]
HumanEval_57_monotonic
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Return True is list elements are monotonically increasing or decreasing. // >>> monotonic([1, 2, 4, 20]) // True /...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_57_monotonic.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Monotonic((new List<long>(new long[]{(long)1L, (long)2L, (long)4L, (long)10L}))) == (true)); Debug.Assert(Monotonic((new List<long>(new long[]{(long)1L, (long)2L, (long)4L, (long)20L}))) == (true)); Debug.Assert(Monotonic((new List<long>(new lo...
[ "\n }\n" ]
HumanEval_58_common
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Return sorted unique common elements for two lists. // >>> common([1, 4, 3, 34, 653, 2, 5], [5, 7, 1, 5, 9, 653, 121]) ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_58_common.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Common((new List<long>(new long[]{(long)1L, (long)4L, (long)3L, (long)34L, (long)653L, (long)2L, (long)5L})), (new List<long>(new long[]{(long)5L, (long)7L, (long)1L, (long)5L, (long)9L, (long)653L, (long)121L}))).Equals((new List<long>(new long[]{(lon...
[ "\n }\n" ]
HumanEval_59_largest_prime_factor
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Return the largest prime factor of n. Assume n > 1 and is not a prime. // >>> largest_prime_factor(13195) // 29 //...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_59_largest_prime_factor.py
verbatim
} public static void Main(string[] args) { Debug.Assert(LargestPrimeFactor((15L)) == (5L)); Debug.Assert(LargestPrimeFactor((27L)) == (3L)); Debug.Assert(LargestPrimeFactor((63L)) == (7L)); Debug.Assert(LargestPrimeFactor((330L)) == (11L)); Debug.Assert(LargestPrimeFactor((13195L)) == (29L))...
[ "\n }\n" ]
HumanEval_5_intersperse
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Insert a number 'delimeter' between every two consecutive elements of input list `numbers' // >>> intersperse([], 4) /...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_5_intersperse.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Intersperse((new List<long>()), (7L)).Equals((new List<long>()))); Debug.Assert(Intersperse((new List<long>(new long[]{(long)5L, (long)6L, (long)3L, (long)2L})), (8L)).Equals((new List<long>(new long[]{(long)5L, (long)8L, (long)6L, (long)8L, (long)...
[ "\n }\n" ]
HumanEval_60_sum_to_n
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // sum_to_n is a function that sums numbers from 1 to n. // >>> sum_to_n(30) // 465 // >>> sum_to_n(100) // 5050 ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_60_sum_to_n.py
verbatim
} public static void Main(string[] args) { Debug.Assert(SumToN((1L)) == (1L)); Debug.Assert(SumToN((6L)) == (21L)); Debug.Assert(SumToN((11L)) == (66L)); Debug.Assert(SumToN((30L)) == (465L)); Debug.Assert(SumToN((100L)) == (5050L)); } }
[ "\n }\n" ]
HumanEval_61_correct_bracketing
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // brackets is a string of "(" and ")". // return True if every opening bracket has a corresponding closing bracket. // >...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_61_correct_bracketing.py
verbatim
} public static void Main(string[] args) { Debug.Assert(CorrectBracketing(("()")) == (true)); Debug.Assert(CorrectBracketing(("(()())")) == (true)); Debug.Assert(CorrectBracketing(("()()(()())()")) == (true)); Debug.Assert(CorrectBracketing(("()()((()()())())(()()(()))")) == (true)); Debug.A...
[ "\n }\n" ]
HumanEval_62_derivative
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // xs represent coefficients of a polynomial. // xs[0] + xs[1] * x + xs[2] * x^2 + .... // Return derivative of this poly...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_62_derivative.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Derivative((new List<long>(new long[]{(long)3L, (long)1L, (long)2L, (long)4L, (long)5L}))).Equals((new List<long>(new long[]{(long)1L, (long)4L, (long)12L, (long)20L})))); Debug.Assert(Derivative((new List<long>(new long[]{(long)1L, (long)2L, (long...
[ "\n }\n" ]
HumanEval_63_fibfib
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows: // fibfib(0) == 0 ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_63_fibfib.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Fibfib((2L)) == (1L)); Debug.Assert(Fibfib((1L)) == (0L)); Debug.Assert(Fibfib((5L)) == (4L)); Debug.Assert(Fibfib((8L)) == (24L)); Debug.Assert(Fibfib((10L)) == (81L)); Debug.Assert(Fibfib((12L)) == (274L)); Debug.Assert(Fibfib...
[ "\n }\n" ]
HumanEval_64_vowels_count
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Write a function vowels_count which takes a string representing // a word as input and returns the number of vowels in the...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_64_vowels_count.py
verbatim
} public static void Main(string[] args) { Debug.Assert(VowelsCount(("abcde")) == (2L)); Debug.Assert(VowelsCount(("Alone")) == (3L)); Debug.Assert(VowelsCount(("key")) == (2L)); Debug.Assert(VowelsCount(("bye")) == (1L)); Debug.Assert(VowelsCount(("keY")) == (2L)); Debug.Assert(VowelsCo...
[ "\n }\n" ]
HumanEval_65_circular_shift
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Circular shift the digits of the integer x, shift the digits right by shift // and return the result as a string. // I...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_65_circular_shift.py
verbatim
} public static void Main(string[] args) { Debug.Assert(CircularShift((100L), (2L)).Equals(("001"))); Debug.Assert(CircularShift((12L), (2L)).Equals(("12"))); Debug.Assert(CircularShift((97L), (8L)).Equals(("79"))); Debug.Assert(CircularShift((12L), (1L)).Equals(("21"))); Debug.Assert(Circul...
[ "\n }\n" ]
HumanEval_66_digitSum
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Task // Write a function that takes a string as input and returns the sum of the upper characters only' // ASCII codes...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_66_digitSum.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Digitsum(("")) == (0L)); Debug.Assert(Digitsum(("abAB")) == (131L)); Debug.Assert(Digitsum(("abcCd")) == (67L)); Debug.Assert(Digitsum(("helloE")) == (69L)); Debug.Assert(Digitsum(("woArBld")) == (131L)); Debug.Assert(Digitsum(("aAa...
[ "\n }\n" ]
HumanEval_67_fruit_distribution
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // In this task, you will be given a string that represents a number of apples and oranges // that are distributed in a bask...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_67_fruit_distribution.py
verbatim
} public static void Main(string[] args) { Debug.Assert(FruitDistribution(("5 apples and 6 oranges"), (19L)) == (8L)); Debug.Assert(FruitDistribution(("5 apples and 6 oranges"), (21L)) == (10L)); Debug.Assert(FruitDistribution(("0 apples and 1 oranges"), (3L)) == (2L)); Debug.Assert(FruitDistrib...
[ "\n }\n" ]
HumanEval_68_pluck
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // "Given an array representing a branch of a tree that has non-negative integer nodes // your task is to pluck one of the no...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_68_pluck.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Pluck((new List<long>(new long[]{(long)4L, (long)2L, (long)3L}))).Equals((new List<long>(new long[]{(long)2L, (long)1L})))); Debug.Assert(Pluck((new List<long>(new long[]{(long)1L, (long)2L, (long)3L}))).Equals((new List<long>(new long[]{(long)2L, ...
[ "\n }\n" ]
HumanEval_69_search
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // You are given a non-empty list of positive integers. Return the greatest integer that is greater than // zero, and has a ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_69_search.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Search((new List<long>(new long[]{(long)5L, (long)5L, (long)5L, (long)5L, (long)1L}))) == (1L)); Debug.Assert(Search((new List<long>(new long[]{(long)4L, (long)1L, (long)4L, (long)1L, (long)4L, (long)4L}))) == (4L)); Debug.Assert(Search((new Li...
[ "\n }\n" ]
HumanEval_6_parse_nested_parens
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Input to this function is a string represented multiple groups for nested parentheses separated by spaces. // For each of ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_6_parse_nested_parens.py
verbatim
} public static void Main(string[] args) { Debug.Assert(ParseNestedParens(("(()()) ((())) () ((())()())")).Equals((new List<long>(new long[]{(long)2L, (long)3L, (long)1L, (long)3L})))); Debug.Assert(ParseNestedParens(("() (()) ((())) (((())))")).Equals((new List<long>(new long[]{(long)1L, (long)2L, (lon...
[ "\n }\n" ]
HumanEval_70_strange_sort_list
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Given list of integers, return list in strange order. // Strange sorting, is when you start with the minimum value, //...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_70_strange_sort_list.py
verbatim
} public static void Main(string[] args) { Debug.Assert(StrangeSortList((new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L}))).Equals((new List<long>(new long[]{(long)1L, (long)4L, (long)2L, (long)3L})))); Debug.Assert(StrangeSortList((new List<long>(new long[]{(long)5L, (long)6L, (long)7...
[ "\n }\n" ]
HumanEval_71_triangle_area
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Given the lengths of the three sides of a triangle. Return the area of // the triangle rounded to 2 decimal points if the ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_71_triangle_area.py
verbatim
} public static void Main(string[] args) { Debug.Assert(TriangleArea((3L), (4L), (5L)) == (6.0f)); Debug.Assert(TriangleArea((1L), (2L), (10L)) == (float)-1L); Debug.Assert(TriangleArea((4L), (8L), (5L)) == (8.18f)); Debug.Assert(TriangleArea((2L), (2L), (2L)) == (1.73f)); Debug.Assert(Trian...
[ "\n }\n" ]
HumanEval_72_will_it_fly
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Write a function that returns True if the object q will fly, and False otherwise. // The object q will fly if it's balance...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_72_will_it_fly.py
verbatim
} public static void Main(string[] args) { Debug.Assert(WillItFly((new List<long>(new long[]{(long)3L, (long)2L, (long)3L})), (9L)) == (true)); Debug.Assert(WillItFly((new List<long>(new long[]{(long)1L, (long)2L})), (5L)) == (false)); Debug.Assert(WillItFly((new List<long>(new long[]{(long)3L})), (...
[ "\n }\n" ]
HumanEval_73_smallest_change
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Given an array arr of integers, find the minimum number of elements that // need to be changed to make the array palindrom...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_73_smallest_change.py
verbatim
} public static void Main(string[] args) { Debug.Assert(SmallestChange((new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)5L, (long)4L, (long)7L, (long)9L, (long)6L}))) == (4L)); Debug.Assert(SmallestChange((new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L, (long)3L, (long)2L...
[ "\n }\n" ]
HumanEval_74_total_match
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Write a function that accepts two lists of strings and returns the list that has // total number of chars in the all stri...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_74_total_match.py
verbatim
} public static void Main(string[] args) { Debug.Assert(TotalMatch((new List<string>()), (new List<string>())).Equals((new List<string>()))); Debug.Assert(TotalMatch((new List<string>(new string[]{(string)"hi", (string)"admin"})), (new List<string>(new string[]{(string)"hi", (string)"hi"}))).Equals((new...
[ "\n }\n" ]
HumanEval_75_is_multiply_prime
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Write a function that returns true if the given number is the multiplication of 3 prime numbers // and false otherwise. ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_75_is_multiply_prime.py
verbatim
} public static void Main(string[] args) { Debug.Assert(IsMultiplyPrime((5L)) == (false)); Debug.Assert(IsMultiplyPrime((30L)) == (true)); Debug.Assert(IsMultiplyPrime((8L)) == (true)); Debug.Assert(IsMultiplyPrime((10L)) == (false)); Debug.Assert(IsMultiplyPrime((125L)) == (true)); Debu...
[ "\n }\n" ]
HumanEval_76_is_simple_power
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Your task is to write a function that returns true if a number x is a simple // power of n and false in other cases. /...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_76_is_simple_power.py
verbatim
} public static void Main(string[] args) { Debug.Assert(IsSimplePower((16L), (2L)) == (true)); Debug.Assert(IsSimplePower((143214L), (16L)) == (false)); Debug.Assert(IsSimplePower((4L), (2L)) == (true)); Debug.Assert(IsSimplePower((9L), (3L)) == (true)); Debug.Assert(IsSimplePower((16L), (4L...
[ "\n }\n" ]
HumanEval_77_iscube
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Write a function that takes an integer a and returns True // if this ingeger is a cube of some integer number. // Not...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_77_iscube.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Iscube((1L)) == (true)); Debug.Assert(Iscube((2L)) == (false)); Debug.Assert(Iscube((-1L)) == (true)); Debug.Assert(Iscube((64L)) == (true)); Debug.Assert(Iscube((180L)) == (false)); Debug.Assert(Iscube((1000L)) == (true)); Debu...
[ "\n }\n" ]
HumanEval_78_hex_key
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // You have been tasked to write a function that receives // a hexadecimal number as a string and counts the number of hexad...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_78_hex_key.py
verbatim
} public static void Main(string[] args) { Debug.Assert(HexKey(("AB")) == (1L)); Debug.Assert(HexKey(("1077E")) == (2L)); Debug.Assert(HexKey(("ABED1A33")) == (4L)); Debug.Assert(HexKey(("2020")) == (2L)); Debug.Assert(HexKey(("123456789ABCDEF0")) == (6L)); Debug.Assert(HexKey(("11223344...
[ "\n }\n" ]
HumanEval_79_decimal_to_binary
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // You will be given a number in decimal form and your task is to convert it to // binary format. The function should return ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_79_decimal_to_binary.py
verbatim
} public static void Main(string[] args) { Debug.Assert(DecimalToBinary((0L)).Equals(("db0db"))); Debug.Assert(DecimalToBinary((32L)).Equals(("db100000db"))); Debug.Assert(DecimalToBinary((103L)).Equals(("db1100111db"))); Debug.Assert(DecimalToBinary((15L)).Equals(("db1111db"))); } }
[ "\n }\n" ]
HumanEval_7_filter_by_substring
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Filter an input list of strings only for ones that contain given substring // >>> filter_by_substring([], 'a') // [] ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_7_filter_by_substring.py
verbatim
} public static void Main(string[] args) { Debug.Assert(FilterBySubstring((new List<string>()), ("john")).Equals((new List<string>()))); Debug.Assert(FilterBySubstring((new List<string>(new string[]{(string)"xxx", (string)"asd", (string)"xxy", (string)"john doe", (string)"xxxAAA", (string)"xxx"})), ("xx...
[ "\n }\n" ]
HumanEval_80_is_happy
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // You are given a string s. // Your task is to check if the string is happy or not. // A string is happy if its length i...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_80_is_happy.py
verbatim
} public static void Main(string[] args) { Debug.Assert(IsHappy(("a")) == (false)); Debug.Assert(IsHappy(("aa")) == (false)); Debug.Assert(IsHappy(("abcd")) == (true)); Debug.Assert(IsHappy(("aabb")) == (false)); Debug.Assert(IsHappy(("adb")) == (true)); Debug.Assert(IsHappy(("xyy")) == ...
[ "\n }\n" ]
HumanEval_81_numerical_letter_grade
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // It is the last week of the semester and the teacher has to give the grades // to students. The teacher has been making her...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_81_numerical_letter_grade.py
verbatim
} public static void Main(string[] args) { Debug.Assert(NumericalLetterGrade((new List<float>(new float[]{(float)4.0f, (float)3L, (float)1.7f, (float)2L, (float)3.5f}))).Equals((new List<string>(new string[]{(string)"A+", (string)"B", (string)"C-", (string)"C", (string)"A-"})))); Debug.Assert(NumericalL...
[ "\n }\n" ]
HumanEval_82_prime_length
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Write a function that takes a string and returns True if the string // length is a prime number or False otherwise // ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_82_prime_length.py
verbatim
} public static void Main(string[] args) { Debug.Assert(PrimeLength(("Hello")) == (true)); Debug.Assert(PrimeLength(("abcdcba")) == (true)); Debug.Assert(PrimeLength(("kittens")) == (true)); Debug.Assert(PrimeLength(("orange")) == (false)); Debug.Assert(PrimeLength(("wow")) == (true)); D...
[ "\n }\n" ]
HumanEval_83_starts_one_ends
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Given a positive integer n, return the count of the numbers of n-digit // positive integers that start or end with 1. ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_83_starts_one_ends.py
verbatim
} public static void Main(string[] args) { Debug.Assert(StartsOneEnds((1L)) == (1L)); Debug.Assert(StartsOneEnds((2L)) == (18L)); Debug.Assert(StartsOneEnds((3L)) == (180L)); Debug.Assert(StartsOneEnds((4L)) == (1800L)); Debug.Assert(StartsOneEnds((5L)) == (18000L)); } }
[ "\n }\n" ]
HumanEval_84_solve
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Given a positive integer N, return the total sum of its digits in binary. // Example // For N = 1000, the sum of digit...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_84_solve.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Solve((1000L)).Equals(("1"))); Debug.Assert(Solve((150L)).Equals(("110"))); Debug.Assert(Solve((147L)).Equals(("1100"))); Debug.Assert(Solve((333L)).Equals(("1001"))); Debug.Assert(Solve((963L)).Equals(("10010"))); } }
[ "\n }\n" ]
HumanEval_85_add
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Given a non-empty list of integers lst. add the even elements that are at odd indices.. // Examples: // add([4, 2, 6, ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_85_add.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Add((new List<long>(new long[]{(long)4L, (long)88L}))) == (88L)); Debug.Assert(Add((new List<long>(new long[]{(long)4L, (long)5L, (long)6L, (long)7L, (long)2L, (long)122L}))) == (122L)); Debug.Assert(Add((new List<long>(new long[]{(long)4L, (lo...
[ "\n }\n" ]
HumanEval_86_anti_shuffle
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Write a function that takes a string and returns an ordered version of it. // Ordered version of string, is a string where...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_86_anti_shuffle.py
verbatim
} public static void Main(string[] args) { Debug.Assert(AntiShuffle(("Hi")).Equals(("Hi"))); Debug.Assert(AntiShuffle(("hello")).Equals(("ehllo"))); Debug.Assert(AntiShuffle(("number")).Equals(("bemnru"))); Debug.Assert(AntiShuffle(("abcd")).Equals(("abcd"))); Debug.Assert(AntiShuffle(("Hell...
[ "\n }\n" ]
HumanEval_87_get_row
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // You are given a 2 dimensional data, as a nested lists, // which is similar to matrix, however, unlike matrices, // eac...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_87_get_row.py
verbatim
} public static void Main(string[] args) { Debug.Assert(GetRow((new List<List<long>>(new List<long>[]{(List<long>)new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L, (long)5L, (long)6L}), (List<long>)new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L, (long)1L, (long)6L}), (List<...
[ "\n }\n" ]
HumanEval_88_sort_array
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Given an array of non-negative integers, return a copy of the given array after sorting, // you will sort the given array ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_88_sort_array.py
verbatim
} public static void Main(string[] args) { Debug.Assert(SortArray((new List<long>())).Equals((new List<long>()))); Debug.Assert(SortArray((new List<long>(new long[]{(long)5L}))).Equals((new List<long>(new long[]{(long)5L})))); Debug.Assert(SortArray((new List<long>(new long[]{(long)2L, (long)4L, (lo...
[ "\n }\n" ]
HumanEval_89_encrypt
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Create a function encrypt that takes a string as an argument and // returns a string encrypted with the alphabet being rot...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_89_encrypt.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Encrypt(("hi")).Equals(("lm"))); Debug.Assert(Encrypt(("asdfghjkl")).Equals(("ewhjklnop"))); Debug.Assert(Encrypt(("gf")).Equals(("kj"))); Debug.Assert(Encrypt(("et")).Equals(("ix"))); Debug.Assert(Encrypt(("faewfawefaewg")).Equals(("je...
[ "\n }\n" ]
HumanEval_8_sum_product
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // For a given list of integers, return a tuple consisting of a sum and a product of all the integers in a list. // Empty sum...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_8_sum_product.py
verbatim
} public static void Main(string[] args) { Debug.Assert(SumProduct((new List<long>())).Equals((Tuple.Create(0L, 1L)))); Debug.Assert(SumProduct((new List<long>(new long[]{(long)1L, (long)1L, (long)1L}))).Equals((Tuple.Create(3L, 1L)))); Debug.Assert(SumProduct((new List<long>(new long[]{(long)100L, ...
[ "\n }\n" ]
HumanEval_90_next_smallest
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // You are given a list of integers. // Write a function next_smallest() that returns the 2nd smallest element of the list. ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_90_next_smallest.py
verbatim
} public static void Main(string[] args) { Debug.Assert(NextSmallest((new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L, (long)5L}))).Equals(2L)); Debug.Assert(NextSmallest((new List<long>(new long[]{(long)5L, (long)1L, (long)4L, (long)3L, (long)2L}))).Equals(2L)); Debug.Assert(NextSm...
[ "\n }\n" ]
HumanEval_91_is_bored
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // You'll be given a string of words, and your task is to count the number // of boredoms. A boredom is a sentence that start...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_91_is_bored.py
verbatim
} public static void Main(string[] args) { Debug.Assert(IsBored(("Hello world")) == (0L)); Debug.Assert(IsBored(("Is the sky blue?")) == (0L)); Debug.Assert(IsBored(("I love It !")) == (1L)); Debug.Assert(IsBored(("bIt")) == (0L)); Debug.Assert(IsBored(("I feel good today. I will be producti...
[ "\n }\n" ]
HumanEval_92_any_int
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Create a function that takes 3 numbers. // Returns true if one of the numbers is equal to the sum of the other two, and al...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_92_any_int.py
verbatim
} public static void Main(string[] args) { Debug.Assert(AnyInt((float)2L, (float)3L, (float)1L) == (true)); Debug.Assert(AnyInt((2.5f), (float)2L, (float)3L) == (false)); Debug.Assert(AnyInt((1.5f), (float)5L, (3.5f)) == (false)); Debug.Assert(AnyInt((float)2L, (float)6L, (float)2L) == (false));...
[ "\n }\n" ]
HumanEval_93_encode
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Write a function that takes a message, and encodes in such a // way that it swaps case of all letters, replaces all vowel...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_93_encode.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Encode(("TEST")).Equals(("tgst"))); Debug.Assert(Encode(("Mudasir")).Equals(("mWDCSKR"))); Debug.Assert(Encode(("YES")).Equals(("ygs"))); Debug.Assert(Encode(("This is a message")).Equals(("tHKS KS C MGSSCGG"))); Debug.Assert(Encode(("I...
[ "\n }\n" ]
HumanEval_94_skjkasdkd
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // You are given a list of integers. // You need to find the largest prime value and return the sum of its digits. // Exa...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_94_skjkasdkd.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Skjkasdkd((new List<long>(new long[]{(long)0L, (long)3L, (long)2L, (long)1L, (long)3L, (long)5L, (long)7L, (long)4L, (long)5L, (long)5L, (long)5L, (long)2L, (long)181L, (long)32L, (long)4L, (long)32L, (long)3L, (long)2L, (long)32L, (long)324L, (long)4L...
[ "\n }\n" ]
HumanEval_95_check_dict_case
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Given a dictionary, return True if all keys are strings in lower // case or all keys are strings in upper case, else retu...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_95_check_dict_case.py
verbatim
} public static void Main(string[] args) { Debug.Assert(CheckDictCase((new Dictionary<string,string>(){{"p", "pineapple"}, {"b", "banana"}})) == (true)); Debug.Assert(CheckDictCase((new Dictionary<string,string>(){{"p", "pineapple"}, {"A", "banana"}, {"B", "banana"}})) == (false)); Debug.Assert(Chec...
[ "\n }\n" ]
HumanEval_96_count_up_to
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Implement a function that takes an non-negative integer and returns an array of the first n // integers that are prime num...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_96_count_up_to.py
verbatim
} public static void Main(string[] args) { Debug.Assert(CountUpTo((5L)).Equals((new List<long>(new long[]{(long)2L, (long)3L})))); Debug.Assert(CountUpTo((6L)).Equals((new List<long>(new long[]{(long)2L, (long)3L, (long)5L})))); Debug.Assert(CountUpTo((7L)).Equals((new List<long>(new long[]{(long)2L...
[ "\n }\n" ]
HumanEval_97_multiply
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Complete the function that takes two integers and returns // the product of their unit digits. // Assume the input is...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_97_multiply.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Multiply((148L), (412L)) == (16L)); Debug.Assert(Multiply((19L), (28L)) == (72L)); Debug.Assert(Multiply((2020L), (1851L)) == (0L)); Debug.Assert(Multiply((14L), (-15L)) == (20L)); Debug.Assert(Multiply((76L), (67L)) == (42L)); Debu...
[ "\n }\n" ]
HumanEval_98_count_upper
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Given a string s, count the number of uppercase vowels in even indices. // For example: // count_upper('aBCdEf') retur...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_98_count_upper.py
verbatim
} public static void Main(string[] args) { Debug.Assert(CountUpper(("aBCdEf")) == (1L)); Debug.Assert(CountUpper(("abcdefg")) == (0L)); Debug.Assert(CountUpper(("dBBE")) == (0L)); Debug.Assert(CountUpper(("B")) == (0L)); Debug.Assert(CountUpper(("U")) == (1L)); Debug.Assert(CountUpper(("...
[ "\n }\n" ]
HumanEval_99_closest_integer
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Create a function that takes a value (string) representing a number // and returns the closest integer to it. If the numbe...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_99_closest_integer.py
verbatim
} public static void Main(string[] args) { Debug.Assert(ClosestInteger(("10")) == (10L)); Debug.Assert(ClosestInteger(("14.5")) == (15L)); Debug.Assert(ClosestInteger(("-15.5")) == (-16L)); Debug.Assert(ClosestInteger(("15.3")) == (15L)); Debug.Assert(ClosestInteger(("0")) == (0L)); } }...
[ "\n }\n" ]
HumanEval_9_rolling_max
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // From a given list of integers, generate a list of rolling maximum element found until given moment // in the sequence. ...
keep
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals/HumanEval_9_rolling_max.py
verbatim
} public static void Main(string[] args) { Debug.Assert(RollingMax((new List<long>())).Equals((new List<long>()))); Debug.Assert(RollingMax((new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L}))).Equals((new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L})))); Debug.Asser...
[ "\n }\n" ]
HumanEval_0_has_close_elements
cs
using System; using System.Numerics; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; class Problem { // Check if in given list of numbers, are any two numbers closer to each other than // given threshold. // public sta...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_0_has_close_elements.py
verbatim
} public static void Main(string[] args) { Debug.Assert(HasCloseElements((new List<float>(new float[]{(float)1.0f, (float)2.0f, (float)3.9f, (float)4.0f, (float)5.0f, (float)2.2f})), (0.3f)) == (true)); Debug.Assert(HasCloseElements((new List<float>(new float[]{(float)1.0f, (float)2.0f, (float)3.9f, (fl...
[ "\n }\n" ]