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_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... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_8_sum_product.py | reworded | }
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.
... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_90_next_smallest.py | reworded | }
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... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_91_is_bored.py | reworded | }
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... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_92_any_int.py | reworded | }
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... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_93_encode.py | reworded | }
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... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_94_skjkasdkd.py | reworded | }
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... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_95_check_dict_case.py | reworded | }
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 a list of the first n
// integers that are prime numbe... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_96_count_up_to.py | reworded | }
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... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_97_multiply.py | reworded | }
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:
// >>> CountUpper(("aBCdEf"))
... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_98_count_upper.py | reworded | }
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... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_99_closest_integer.py | reworded | }
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.
... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_9_rolling_max.py | reworded | }
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.
// >>> HasCloseEl... | transform | /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"
] |
HumanEval_100_make_a_pile | 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, you have to make a pile of n levels of stones.
// The first level has n stones.
// The num... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_100_make_a_pile.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(MakeAPile((3L)).Equals((new List<long>(new long[]{(long)3L, (long)5L, (long)7L}))));
Debug.Assert(MakeAPile((4L)).Equals((new List<long>(new long[]{(long)4L, (long)6L, (long)8L, (long)10L}))));
Debug.Assert(MakeAPile((5L)).Equals((new List<long... | [
"\n }\n"
] |
HumanEval_101_words_string | 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 string of words separated by commas or spaces. Your task is
// to split the string into words and retu... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_101_words_string.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(WordsString(("Hi, my name is John")).Equals((new List<string>(new string[]{(string)"Hi", (string)"my", (string)"name", (string)"is", (string)"John"}))));
Debug.Assert(WordsString(("One, two, three, four, five, six")).Equals((new List<string>(new st... | [
"\n }\n"
] |
HumanEval_102_choose_num | 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 two positive numbers x and y and returns the
// biggest even integer number that is in the range [x, y... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_102_choose_num.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(ChooseNum((12L), (15L)) == (14L));
Debug.Assert(ChooseNum((13L), (12L)) == (-1L));
Debug.Assert(ChooseNum((33L), (12354L)) == (12354L));
Debug.Assert(ChooseNum((5234L), (5233L)) == (-1L));
Debug.Assert(ChooseNum((6L), (29L)) == (28L));
... | [
"\n }\n"
] |
HumanEval_104_unique_digits | 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 list of positive integers x. return a sorted list of all
// elements that hasn't any even digit.
// Note: Ret... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_104_unique_digits.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(UniqueDigits((new List<long>(new long[]{(long)15L, (long)33L, (long)1422L, (long)1L}))).Equals((new List<long>(new long[]{(long)1L, (long)15L, (long)33L}))));
Debug.Assert(UniqueDigits((new List<long>(new long[]{(long)152L, (long)323L, (long)1422L,... | [
"\n }\n"
] |
HumanEval_105_by_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 {
// Given an array of integers, sort the integers that are between 1 and 9 inclusive,
// reverse the resulting array, and then... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_105_by_length.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(ByLength((new List<long>(new long[]{(long)2L, (long)1L, (long)1L, (long)4L, (long)5L, (long)8L, (long)2L, (long)3L}))).Equals((new List<string>(new string[]{(string)"Eight", (string)"Five", (string)"Four", (string)"Three", (string)"Two", (string)"Two",... | [
"\n }\n"
] |
HumanEval_106_f | 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 the function f that takes n as a parameter,
// and returns a list of size n, such that the value of the element ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_106_f.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(F((5L)).Equals((new List<long>(new long[]{(long)1L, (long)2L, (long)6L, (long)24L, (long)15L}))));
Debug.Assert(F((7L)).Equals((new List<long>(new long[]{(long)1L, (long)2L, (long)6L, (long)24L, (long)15L, (long)720L, (long)28L}))));
Debug.Asse... | [
"\n }\n"
] |
HumanEval_107_even_odd_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 {
// Given a positive integer n, return a tuple that has the number of even and odd
// integer palindromes that fall within the... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_107_even_odd_palindrome.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(EvenOddPalindrome((123L)).Equals((Tuple.Create(8L, 13L))));
Debug.Assert(EvenOddPalindrome((12L)).Equals((Tuple.Create(4L, 6L))));
Debug.Assert(EvenOddPalindrome((3L)).Equals((Tuple.Create(1L, 2L))));
Debug.Assert(EvenOddPalindrome((63L)).E... | [
"\n }\n"
] |
HumanEval_108_count_nums | 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 count_nums which takes an array of integers and returns
// the number of elements which has a sum of digi... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_108_count_nums.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(CountNums((new List<long>())) == (0L));
Debug.Assert(CountNums((new List<long>(new long[]{(long)-1L, (long)-2L, (long)0L}))) == (0L));
Debug.Assert(CountNums((new List<long>(new long[]{(long)1L, (long)1L, (long)2L, (long)-2L, (long)3L, (long)4L... | [
"\n }\n"
] |
HumanEval_109_move_one_ball | 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 {
// We have an array 'arr' of N integers arr[1], arr[2], ..., arr[N].The
// numbers in the array will be randomly ordered. You... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_109_move_one_ball.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(MoveOneBall((new List<long>(new long[]{(long)3L, (long)4L, (long)5L, (long)1L, (long)2L}))) == (true));
Debug.Assert(MoveOneBall((new List<long>(new long[]{(long)3L, (long)5L, (long)10L, (long)1L, (long)2L}))) == (true));
Debug.Assert(MoveOneBa... | [
"\n }\n"
] |
HumanEval_10_make_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 {
// Find the shortest palindrome that begins with a supplied string.
// Algorithm idea is simple:
// - Find the longest po... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_10_make_palindrome.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(MakePalindrome(("")).Equals(("")));
Debug.Assert(MakePalindrome(("x")).Equals(("x")));
Debug.Assert(MakePalindrome(("xyz")).Equals(("xyzyx")));
Debug.Assert(MakePalindrome(("xyx")).Equals(("xyx")));
Debug.Assert(MakePalindrome(("jerry")... | [
"\n }\n"
] |
HumanEval_110_exchange | 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 problem, you will implement a function that takes two lists of numbers,
// and determines whether it is possible t... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_110_exchange.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(Exchange((new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L})), (new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L}))).Equals(("YES")));
Debug.Assert(Exchange((new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (l... | [
"\n }\n"
] |
HumanEval_111_histogram | 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 representing a space separated lowercase letters, return a dictionary
// of the letter with the most repeti... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_111_histogram.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(Histogram(("a b b a")).Equals((new Dictionary<string,long>(){{"a", 2L}, {"b", 2L}})));
Debug.Assert(Histogram(("a b c a b")).Equals((new Dictionary<string,long>(){{"a", 2L}, {"b", 2L}})));
Debug.Assert(Histogram(("a b c d g")).Equals((new Dicti... | [
"\n }\n"
] |
HumanEval_112_reverse_delete | 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
// 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... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_112_reverse_delete.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(ReverseDelete(("abcde"), ("ae")).Equals((Tuple.Create("bcd", false))));
Debug.Assert(ReverseDelete(("abcdef"), ("b")).Equals((Tuple.Create("acdef", false))));
Debug.Assert(ReverseDelete(("abcdedcba"), ("ab")).Equals((Tuple.Create("cdedc", true)... | [
"\n }\n"
] |
HumanEval_113_odd_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 {
// Given a list of strings, where each string consists of only digits, return a list.
// Each element i of the output should ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_113_odd_count.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(OddCount((new List<string>(new string[]{(string)"1234567"}))).Equals((new List<string>(new string[]{(string)"the number of odd elements 4n the str4ng 4 of the 4nput."}))));
Debug.Assert(OddCount((new List<string>(new string[]{(string)"3", (string)"... | [
"\n }\n"
] |
HumanEval_114_minSubArraySum | 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 integers nums, find the minimum sum of any non-empty sub-array
// of nums.
// Example
// >>> Min... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_114_minSubArraySum.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(Minsubarraysum((new List<long>(new long[]{(long)2L, (long)3L, (long)4L, (long)1L, (long)2L, (long)4L}))) == (1L));
Debug.Assert(Minsubarraysum((new List<long>(new long[]{(long)-1L, (long)-2L, (long)-3L}))) == (-6L));
Debug.Assert(Minsubarraysum... | [
"\n }\n"
] |
HumanEval_115_max_fill | 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 rectangular grid of wells. Each row represents a single well,
// and each 1 in a row represents a single u... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_115_max_fill.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(MaxFill((new List<List<long>>(new List<long>[]{(List<long>)new List<long>(new long[]{(long)0L, (long)0L, (long)1L, (long)0L}), (List<long>)new List<long>(new long[]{(long)0L, (long)1L, (long)0L, (long)0L}), (List<long>)new List<long>(new long[]{(long)1... | [
"\n }\n"
] |
HumanEval_116_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 {
// In this Kata, you have to sort an array of non-negative integers according to
// number of ones in their binary representa... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_116_sort_array.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(SortArray((new List<long>(new long[]{(long)1L, (long)5L, (long)2L, (long)3L, (long)4L}))).Equals((new List<long>(new long[]{(long)1L, (long)2L, (long)4L, (long)3L, (long)5L}))));
Debug.Assert(SortArray((new List<long>(new long[]{(long)-2L, (long)-3... | [
"\n }\n"
] |
HumanEval_117_select_words | 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 and a natural number n, you have been tasked to implement
// a function that returns a list of all words... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_117_select_words.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(SelectWords(("Mary had a little lamb"), (4L)).Equals((new List<string>(new string[]{(string)"little"}))));
Debug.Assert(SelectWords(("Mary had a little lamb"), (3L)).Equals((new List<string>(new string[]{(string)"Mary", (string)"lamb"}))));
Deb... | [
"\n }\n"
] |
HumanEval_118_get_closest_vowel | 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 word. Your task is to find the closest vowel that stands between
// two consonants from the right side of... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_118_get_closest_vowel.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(GetClosestVowel(("yogurt")).Equals(("u")));
Debug.Assert(GetClosestVowel(("full")).Equals(("u")));
Debug.Assert(GetClosestVowel(("easy")).Equals(("")));
Debug.Assert(GetClosestVowel(("eAsy")).Equals(("")));
Debug.Assert(GetClosestVowel(... | [
"\n }\n"
] |
HumanEval_119_match_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 {
// You are given a list of two strings, both strings consist of open
// parentheses '(' or close parentheses ')' only.
//... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_119_match_parens.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(MatchParens((new List<string>(new string[]{(string)"()(", (string)")"}))).Equals(("Yes")));
Debug.Assert(MatchParens((new List<string>(new string[]{(string)")", (string)")"}))).Equals(("No")));
Debug.Assert(MatchParens((new List<string>(new str... | [
"\n }\n"
] |
HumanEval_11_string_xor | 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 are two strings a and b consisting only of 1s and 0s.
// Perform binary XOR on these inputs and return result also a... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_11_string_xor.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(StringXor(("111000"), ("101010")).Equals(("010010")));
Debug.Assert(StringXor(("1"), ("1")).Equals(("0")));
Debug.Assert(StringXor(("0101"), ("0000")).Equals(("0101")));
}
}
| [
"\n }\n"
] |
HumanEval_120_maximum | 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 and a positive integer k, return a sorted list
// of length k with the maximum k numbers i... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_120_maximum.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(Maximum((new List<long>(new long[]{(long)-3L, (long)-4L, (long)5L})), (3L)).Equals((new List<long>(new long[]{(long)-4L, (long)-3L, (long)5L}))));
Debug.Assert(Maximum((new List<long>(new long[]{(long)4L, (long)-4L, (long)4L})), (2L)).Equals((new L... | [
"\n }\n"
] |
HumanEval_121_solution | 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, return the sum of all of the odd elements that are in even positions.
// Examples
... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_121_solution.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(Solution((new List<long>(new long[]{(long)5L, (long)8L, (long)7L, (long)1L}))) == (12L));
Debug.Assert(Solution((new List<long>(new long[]{(long)3L, (long)3L, (long)3L, (long)3L, (long)3L}))) == (9L));
Debug.Assert(Solution((new List<long>(new ... | [
"\n }\n"
] |
HumanEval_122_add_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 {
// Given a non-empty array of integers arr and an integer k, return
// the sum of the elements with at most two digits from t... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_122_add_elements.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(AddElements((new List<long>(new long[]{(long)1L, (long)-2L, (long)-3L, (long)41L, (long)57L, (long)76L, (long)87L, (long)88L, (long)99L})), (3L)) == (-4L));
Debug.Assert(AddElements((new List<long>(new long[]{(long)111L, (long)121L, (long)3L, (long... | [
"\n }\n"
] |
HumanEval_123_get_odd_collatz | 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 a sorted list that has the odd numbers in collatz sequence.
// The Collatz conjecture i... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_123_get_odd_collatz.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(GetOddCollatz((14L)).Equals((new List<long>(new long[]{(long)1L, (long)5L, (long)7L, (long)11L, (long)13L, (long)17L}))));
Debug.Assert(GetOddCollatz((5L)).Equals((new List<long>(new long[]{(long)1L, (long)5L}))));
Debug.Assert(GetOddCollatz((1... | [
"\n }\n"
] |
HumanEval_124_valid_date | 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 to write a function which validates a given date string and
// returns True if the date is valid otherwise False.... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_124_valid_date.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(ValidDate(("03-11-2000")) == (true));
Debug.Assert(ValidDate(("15-01-2012")) == (false));
Debug.Assert(ValidDate(("04-0-2040")) == (false));
Debug.Assert(ValidDate(("06-04-2020")) == (true));
Debug.Assert(ValidDate(("01-01-2007")) == (t... | [
"\n }\n"
] |
HumanEval_126_is_sorted | 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 list of numbers, return whether or not they are sorted
// in ascending order. If list has more than 1 duplicate of... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_126_is_sorted.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(IsSorted((new List<long>(new long[]{(long)5L}))) == (true));
Debug.Assert(IsSorted((new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L, (long)5L}))) == (true));
Debug.Assert(IsSorted((new List<long>(new long[]{(long)1L, (long)3L, ... | [
"\n }\n"
] |
HumanEval_127_intersection | 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 two intervals,
// where each interval is a pair of integers. For example, interval = (start, end) = (1, 2).
... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_127_intersection.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(Intersection((Tuple.Create(1L, 2L)), (Tuple.Create(2L, 3L))).Equals(("NO")));
Debug.Assert(Intersection((Tuple.Create(-1L, 1L)), (Tuple.Create(0L, 4L))).Equals(("NO")));
Debug.Assert(Intersection((Tuple.Create(-3L, -1L)), (Tuple.Create(-5L, 5L)... | [
"\n }\n"
] |
HumanEval_128_prod_signs | 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 an array arr of integers and you need to return
// sum of magnitudes of integers multiplied by product of al... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_128_prod_signs.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(ProdSigns((new List<long>(new long[]{(long)1L, (long)2L, (long)2L, (long)-4L}))).Equals(-9L));
Debug.Assert(ProdSigns((new List<long>(new long[]{(long)0L, (long)1L}))).Equals(0L));
Debug.Assert(ProdSigns((new List<long>(new long[]{(long)1L, (lo... | [
"\n }\n"
] |
HumanEval_129_minPath | 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 grid with N rows and N columns (N >= 2) and a positive integer k,
// each cell of the grid contains a value. Ever... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_129_minPath.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(Minpath((new List<List<long>>(new List<long>[]{(List<long>)new List<long>(new long[]{(long)1L, (long)2L, (long)3L}), (List<long>)new List<long>(new long[]{(long)4L, (long)5L, (long)6L}), (List<long>)new List<long>(new long[]{(long)7L, (long)8L, (long)9... | [
"\n }\n"
] |
HumanEval_12_longest | 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 {
// Out of list of strings, return the longest one. Return the first one in case of multiple
// strings of the same length. Re... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_12_longest.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(Longest((new List<string>())).Equals(null));
Debug.Assert(Longest((new List<string>(new string[]{(string)"x", (string)"y", (string)"z"}))).Equals(("x")));
Debug.Assert(Longest((new List<string>(new string[]{(string)"x", (string)"yyy", (string)"... | [
"\n }\n"
] |
HumanEval_130_tri | 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 {
// Everyone knows Fibonacci sequence, it was studied deeply by mathematicians in
// the last couple centuries. However, what... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_130_tri.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(Tri((3L)).Equals((new List<long>(new long[]{(long)1L, (long)3L, (long)2L, (long)8L}))));
Debug.Assert(Tri((4L)).Equals((new List<long>(new long[]{(long)1L, (long)3L, (long)2L, (long)8L, (long)3L}))));
Debug.Assert(Tri((5L)).Equals((new List<lon... | [
"\n }\n"
] |
HumanEval_131_digits | 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 product of the odd digits.
// Return 0 if all digits are even.
// For example:
... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_131_digits.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(Digits((5L)) == (5L));
Debug.Assert(Digits((54L)) == (5L));
Debug.Assert(Digits((120L)) == (1L));
Debug.Assert(Digits((5014L)) == (5L));
Debug.Assert(Digits((98765L)) == (315L));
Debug.Assert(Digits((5576543L)) == (2625L));
Debu... | [
"\n }\n"
] |
HumanEval_132_is_nested | 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 string as input which contains only square brackets.
// The function should return True if ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_132_is_nested.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(IsNested(("[[]]")) == (true));
Debug.Assert(IsNested(("[]]]]]]][[[[[]")) == (false));
Debug.Assert(IsNested(("[][]")) == (false));
Debug.Assert(IsNested(("[]")) == (false));
Debug.Assert(IsNested(("[[[[]]]]")) == (true));
Debug.Asse... | [
"\n }\n"
] |
HumanEval_133_sum_squares | 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 numbers.
// You need to return the sum of squared numbers in the given list,
// round each ele... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_133_sum_squares.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(SumSquares((new List<float>(new float[]{(float)1.0f, (float)2.0f, (float)3.0f}))) == (14L));
Debug.Assert(SumSquares((new List<float>(new float[]{(float)1.0f, (float)2.0f, (float)3.0f}))) == (14L));
Debug.Assert(SumSquares((new List<float>(new ... | [
"\n }\n"
] |
HumanEval_134_check_if_last_char_is_a_letter | 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 returns True if the last character
// of a given string is an alphabetical character and is not
... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_134_check_if_last_char_is_a_letter.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(CheckIfLastCharIsALetter(("apple")) == (false));
Debug.Assert(CheckIfLastCharIsALetter(("apple pi e")) == (true));
Debug.Assert(CheckIfLastCharIsALetter(("eeeee")) == (false));
Debug.Assert(CheckIfLastCharIsALetter(("A")) == (true));
De... | [
"\n }\n"
] |
HumanEval_135_can_arrange | 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 which returns the largest index of an element which
// is not greater than or equal to the element immed... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_135_can_arrange.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(CanArrange((new List<long>(new long[]{(long)1L, (long)2L, (long)4L, (long)3L, (long)5L}))) == (3L));
Debug.Assert(CanArrange((new List<long>(new long[]{(long)1L, (long)2L, (long)4L, (long)5L}))) == (-1L));
Debug.Assert(CanArrange((new List<long... | [
"\n }\n"
] |
HumanEval_136_largest_smallest_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 {
// Create a function that returns a tuple (a, b), where 'a' is
// the largest of negative integers, and 'b' is the smallest
... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_136_largest_smallest_integers.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(LargestSmallestIntegers((new List<long>(new long[]{(long)2L, (long)4L, (long)1L, (long)3L, (long)5L, (long)7L}))).Equals(Tuple.Create((Nullable<long>)null, 1L)));
Debug.Assert(LargestSmallestIntegers((new List<long>(new long[]{(long)2L, (long)4L, (... | [
"\n }\n"
] |
HumanEval_138_is_equal_to_sum_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 {
// Evaluate whether the given number n can be written as the sum of exactly 4 positive even numbers
// Example
// >>> IsE... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_138_is_equal_to_sum_even.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(IsEqualToSumEven((4L)) == (false));
Debug.Assert(IsEqualToSumEven((6L)) == (false));
Debug.Assert(IsEqualToSumEven((8L)) == (true));
Debug.Assert(IsEqualToSumEven((10L)) == (true));
Debug.Assert(IsEqualToSumEven((11L)) == (false));
... | [
"\n }\n"
] |
HumanEval_139_special_factorial | 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 Brazilian factorial is defined as:
// brazilian_factorial(n) = n! * (n-1)! * (n-2)! * ... * 1!
// where n > 0
... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_139_special_factorial.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(SpecialFactorial((4L)) == (288L));
Debug.Assert(SpecialFactorial((5L)) == (34560L));
Debug.Assert(SpecialFactorial((7L)) == (125411328000L));
Debug.Assert(SpecialFactorial((1L)) == (1L));
}
}
| [
"\n }\n"
] |
HumanEval_13_greatest_common_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 {
// Return a greatest common divisor of two integers a and b
// >>> GreatestCommonDivisor((3L), (5L))
// (1L)
// >>> G... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_13_greatest_common_divisor.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(GreatestCommonDivisor((3L), (7L)) == (1L));
Debug.Assert(GreatestCommonDivisor((10L), (15L)) == (5L));
Debug.Assert(GreatestCommonDivisor((49L), (14L)) == (7L));
Debug.Assert(GreatestCommonDivisor((144L), (60L)) == (12L));
}
}
| [
"\n }\n"
] |
HumanEval_140_fix_spaces | 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, replace all spaces in it with underscores,
// and if a string has more than 2 consecutive spaces,
... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_140_fix_spaces.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(FixSpaces(("Example")).Equals(("Example")));
Debug.Assert(FixSpaces(("Mudasir Hanif ")).Equals(("Mudasir_Hanif_")));
Debug.Assert(FixSpaces(("Yellow Yellow Dirty Fellow")).Equals(("Yellow_Yellow__Dirty__Fellow")));
Debug.Assert(FixSpaces(... | [
"\n }\n"
] |
HumanEval_141_file_name_check | 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 which takes a string representing a file's name, and returns
// 'Yes' if the the file's name is valid, a... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_141_file_name_check.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(FileNameCheck(("example.txt")).Equals(("Yes")));
Debug.Assert(FileNameCheck(("1example.dll")).Equals(("No")));
Debug.Assert(FileNameCheck(("s1sdf3.asd")).Equals(("No")));
Debug.Assert(FileNameCheck(("K.dll")).Equals(("Yes")));
Debug.Ass... | [
"\n }\n"
] |
HumanEval_142_sum_squares | 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 will take a list of integers. For all entries in the list, the function shall square the integer entry ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_142_sum_squares.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(SumSquares((new List<long>(new long[]{(long)1L, (long)2L, (long)3L}))) == (6L));
Debug.Assert(SumSquares((new List<long>(new long[]{(long)1L, (long)4L, (long)9L}))) == (14L));
Debug.Assert(SumSquares((new List<long>())) == (0L));
Debug.Asse... | [
"\n }\n"
] |
HumanEval_143_words_in_sentence | 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 representing a sentence,
// the sentence contains some words separated by a space,
// and you h... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_143_words_in_sentence.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(WordsInSentence(("This is a test")).Equals(("is")));
Debug.Assert(WordsInSentence(("lets go for swimming")).Equals(("go for")));
Debug.Assert(WordsInSentence(("there is no place available here")).Equals(("there is no place")));
Debug.Assert... | [
"\n }\n"
] |
HumanEval_144_simplify | 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 implement a function that will simplify the expression
// x * n. The function returns True if x * n evalua... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_144_simplify.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(Simplify(("1/5"), ("5/1")) == (true));
Debug.Assert(Simplify(("1/6"), ("2/1")) == (false));
Debug.Assert(Simplify(("5/1"), ("3/1")) == (true));
Debug.Assert(Simplify(("7/10"), ("10/2")) == (false));
Debug.Assert(Simplify(("2/10"), ("50/... | [
"\n }\n"
] |
HumanEval_145_order_by_points | 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 which sorts the given list of integers
// in ascending order according to the sum of their digits.
//... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_145_order_by_points.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(OrderByPoints((new List<long>(new long[]{(long)1L, (long)11L, (long)-1L, (long)-11L, (long)-12L}))).Equals((new List<long>(new long[]{(long)-1L, (long)-11L, (long)1L, (long)-12L, (long)11L}))));
Debug.Assert(OrderByPoints((new List<long>(new long[]... | [
"\n }\n"
] |
HumanEval_146_specialFilter | 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 array of numbers as input and returns
// the number of elements in the array that are grea... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_146_specialFilter.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(Specialfilter((new List<long>(new long[]{(long)5L, (long)-2L, (long)1L, (long)-5L}))) == (0L));
Debug.Assert(Specialfilter((new List<long>(new long[]{(long)15L, (long)-73L, (long)14L, (long)-15L}))) == (1L));
Debug.Assert(Specialfilter((new Lis... | [
"\n }\n"
] |
HumanEval_147_get_max_triples | 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 positive integer n. You have to create an integer array a of length n.
// For each i (1 ≤ i ≤ n), the valu... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_147_get_max_triples.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(GetMaxTriples((5L)) == (1L));
Debug.Assert(GetMaxTriples((6L)) == (4L));
Debug.Assert(GetMaxTriples((10L)) == (36L));
Debug.Assert(GetMaxTriples((100L)) == (53361L));
}
}
| [
"\n }\n"
] |
HumanEval_148_bf | 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 {
// There are eight planets in our solar system: the closerst to the Sun
// is Mercury, the next one is Venus, then Earth, Ma... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_148_bf.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(Bf(("Jupiter"), ("Neptune")).Equals((new List<string>(new string[]{(string)"Saturn", (string)"Uranus"}))));
Debug.Assert(Bf(("Earth"), ("Mercury")).Equals((new List<string>(new string[]{(string)"Venus"}))));
Debug.Assert(Bf(("Mercury"), ("Uranu... | [
"\n }\n"
] |
HumanEval_149_sorted_list_sum | 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 as a parameter,
// deletes the strings that have odd lengths from it,
... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_149_sorted_list_sum.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(SortedListSum((new List<string>(new string[]{(string)"aa", (string)"a", (string)"aaa"}))).Equals((new List<string>(new string[]{(string)"aa"}))));
Debug.Assert(SortedListSum((new List<string>(new string[]{(string)"school", (string)"AI", (string)"as... | [
"\n }\n"
] |
HumanEval_14_all_prefixes | 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 all prefixes from shortest to longest of the input string
// >>> AllPrefixes(("abc"))
// (new List<stri... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_14_all_prefixes.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(AllPrefixes(("")).Equals((new List<string>())));
Debug.Assert(AllPrefixes(("asdfgh")).Equals((new List<string>(new string[]{(string)"a", (string)"as", (string)"asd", (string)"asdf", (string)"asdfg", (string)"asdfgh"}))));
Debug.Assert(AllPrefix... | [
"\n }\n"
] |
HumanEval_150_x_or_y | 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 {
// A simple program which should return the value of x if n is
// a prime number and should return the value of y otherwise.... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_150_x_or_y.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(XOrY((7L), (34L), (12L)) == (34L));
Debug.Assert(XOrY((15L), (8L), (5L)) == (5L));
Debug.Assert(XOrY((3L), (33L), (5212L)) == (33L));
Debug.Assert(XOrY((1259L), (3L), (52L)) == (3L));
Debug.Assert(XOrY((7919L), (-1L), (12L)) == (-1L));
... | [
"\n }\n"
] |
HumanEval_151_double_the_difference | 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 list of numbers, return the sum of squares of the numbers
// in the list that are odd. Ignore numbers that are neg... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_151_double_the_difference.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(DoubleTheDifference((new List<float>())) == (0L));
Debug.Assert(DoubleTheDifference((new List<float>(new float[]{(float)5.0f, (float)4.0f}))) == (25L));
Debug.Assert(DoubleTheDifference((new List<float>(new float[]{(float)0.1f, (float)0.2f, (fl... | [
"\n }\n"
] |
HumanEval_152_compare | 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 {
// I think we all remember that feeling when the result of some long-awaited
// event is finally known. The feelings and thou... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_152_compare.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(Compare((new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L, (long)5L, (long)1L})), (new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L, (long)2L, (long)-2L}))).Equals((new List<long>(new long[]{(long)0L, (long)0L, (long)0L,... | [
"\n }\n"
] |
HumanEval_153_Strongest_Extension | 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 the name of a class (a string) and a list of extensions.
// The extensions are to be used to load additi... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_153_Strongest_Extension.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(StrongestExtension(("Watashi"), (new List<string>(new string[]{(string)"tEN", (string)"niNE", (string)"eIGHt8OKe"}))).Equals(("Watashi.eIGHt8OKe")));
Debug.Assert(StrongestExtension(("Boku123"), (new List<string>(new string[]{(string)"nani", (strin... | [
"\n }\n"
] |
HumanEval_154_cycpattern_check | 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 2 words. You need to return True if the second word or any of its rotations is a substring in the first word
... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_154_cycpattern_check.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(CycpatternCheck(("xyzw"), ("xyw")) == (false));
Debug.Assert(CycpatternCheck(("yello"), ("ell")) == (true));
Debug.Assert(CycpatternCheck(("whattup"), ("ptut")) == (false));
Debug.Assert(CycpatternCheck(("efef"), ("fee")) == (true));
De... | [
"\n }\n"
] |
HumanEval_155_even_odd_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 {
// Given an integer. return a tuple that has the number of even and odd digits respectively.
// Example:
// >>> EvenOddCo... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_155_even_odd_count.py | verbatim | }
public static void Main(string[] args) {
Debug.Assert(EvenOddCount((7L)).Equals((Tuple.Create(0L, 1L))));
Debug.Assert(EvenOddCount((-78L)).Equals((Tuple.Create(1L, 1L))));
Debug.Assert(EvenOddCount((3452L)).Equals((Tuple.Create(2L, 2L))));
Debug.Assert(EvenOddCount((346211L)).Equals((Tuple.Cr... | [
"\n }\n"
] |
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... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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 ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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.
// >>> StringSequence((0L))
// ("... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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:
... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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
// >>> CountDistinctCharacte... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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.
// >>> HowManyTimes((""... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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', ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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 ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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
// >>> FilterIntegers((new List<object>(new string[]{(string)"a",... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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
// >>> StringLength((""))
// (0L)
// >>> StringLength(("abc"))
// (3L)
// ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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
// >>> LargestDivisor((15L))
// (5... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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 ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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.
// >>> FlipCase(("Hello"))
// (... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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((new List<string>()))
// ("")
// >>> Concatena... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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.
// >>> FilterByPrefix((new List<string>()), ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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 ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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.
// >>> GetPositive((new List<long>(new long[]{(long)-1L, (long)2L, (long)-4L, (l... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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.
// >>> IsPrime((6L))
// (false)
// >>> IsPrime((101L)... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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((new List<long>(new long[]{(long)5L, (long)3L, (long)5L, (long)2L, (... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/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"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.