KlaudiaTH commited on
Commit ·
301b108
1
Parent(s): fcf6b5e
Debugged dataset loading script.
Browse filesFiles changed (7)
- dataset_infos.jsonAdded+1
- tedrics_data.py+42-15
- tedrics_data_codefunctions.json+2-41
- tedrics_data_codefunctions_val.jsonAdded+42
- tedrics_data_tasks.json+1-1
- tedrics_data_testcases.json+1-126
- tedrics_data_testcases_val.jsonAdded+127
1{"tasks": {"description": "", "citation": "@misc{,\n title={ },\n author={},\n year={2022}\n}\n", "homepage": "", "license": "CC BY-SA", "features": {"task_id": {"dtype": "int32", "id": null, "_type": "Value"}, "mbpp_task_id": {"dtype": "int32", "id": null, "_type": "Value"}, "source": {"dtype": "string", "id": null, "_type": "Value"}, "licence": {"dtype": "string", "id": null, "_type": "Value"}, "task": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "te_dri_cs_data", "config_name": "tasks", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 3486, "num_examples": 20, "dataset_name": "te_dri_cs_data"}}, "download_checksums": {"tedrics_data_tasks.json": {"num_bytes": 5692, "checksum": "d58a1d89204b3529b7182daba3e3fdf0fa184a1127354f73ff2a9e0c404b562d"}}, "download_size": 5692, "post_processing_size": null, "dataset_size": 3486, "size_in_bytes": 9178}, "testcases": {"description": "", "citation": "@misc{,\n title={ },\n author={},\n year={2022}\n}\n", "homepage": "", "license": "CC BY-SA", "features": {"task_id": {"dtype": "int32", "id": null, "_type": "Value"}, "mbpp_task_id": {"dtype": "int32", "id": null, "_type": "Value"}, "task": {"dtype": "string", "id": null, "_type": "Value"}, "test_cases": {"feature": {"test_case_id": {"dtype": "int32", "id": null, "_type": "Value"}, "cot": {"dtype": "string", "id": null, "_type": "Value"}, "input": {"dtype": "string", "id": null, "_type": "Value"}, "output": {"dtype": "string", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "te_dri_cs_data", "config_name": "testcases", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 15460, "num_examples": 15, "dataset_name": "te_dri_cs_data"}, "validation": {"name": "validation", "num_bytes": 4987, "num_examples": 5, "dataset_name": "te_dri_cs_data"}}, "download_checksums": {"tedrics_data_testcases.json": {"num_bytes": 19781, "checksum": "64ed6c8c26cf527627c43499b6727ecc4e51bdab04bc019122b6ff36022fb512"}, "tedrics_data_testcases_val.json": {"num_bytes": 6420, "checksum": "cba90cde39ca5869e56c32eca517b28026ae8da56c2aadc7ff1f4af8b89f13b0"}}, "download_size": 26201, "post_processing_size": null, "dataset_size": 20447, "size_in_bytes": 46648}, "codefunctions": {"description": "", "citation": "@misc{,\n title={ },\n author={},\n year={2022}\n}\n", "homepage": "", "license": "CC BY-SA", "features": {"task_id": {"dtype": "int32", "id": null, "_type": "Value"}, "mbpp_task_id": {"dtype": "int32", "id": null, "_type": "Value"}, "description": {"dtype": "string", "id": null, "_type": "Value"}, "cot": {"dtype": "string", "id": null, "_type": "Value"}, "imports": {"dtype": "string", "id": null, "_type": "Value"}, "function_head": {"dtype": "string", "id": null, "_type": "Value"}, "function_body": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "te_dri_cs_data", "config_name": "codefunctions", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 11301, "num_examples": 15, "dataset_name": "te_dri_cs_data"}, "validation": {"name": "validation", "num_bytes": 3726, "num_examples": 5, "dataset_name": "te_dri_cs_data"}}, "download_checksums": {"tedrics_data_codefunctions.json": {"num_bytes": 13881, "checksum": "582586136d3ec42bcc870885bc46d5d358c54bca89463984b494186b704136e1"}, "tedrics_data_codefunctions_val.json": {"num_bytes": 4592, "checksum": "cc5d7a6d96e7966a14a9bd4cb4b9578e988b32f50072eadafc2c9a0d6b2970be"}}, "download_size": 18473, "post_processing_size": null, "dataset_size": 15027, "size_in_bytes": 33500}}14 unmodified lines151617181920212223242526272829303132331 unmodified line353637383940418 unmodified lines505152535455568 unmodified lines656667686970717 unmodified lines7980818283848586872 unmodified lines909192939495969798991001011021031041051061071081091101112 unmodified lines11411511611714 unmodified lines}"""_LICENSES = ['CC BY-SA', 'CC Attribution 4.0']_SUBSETS = ["tasks", "testcases", "codefunctions"]_DATA_URLS = {"tasks": {"train": ["tedrics_data_tasks.json"]},"testcases": {"train": ["tedrics_data_testcases.json"]},"codefunctions": {"train": ["tedrics_data_codefunctions.json"]}}1 unmodified lineBUILDER_CONFIGS = [datasets.BuilderConfig(name=f"{subset}",version=datasets.Version("1.0"),description=_DESCRIPTION,)for subset in _SUBSETS8 unmodified lines"task_id": datasets.Value("int32"),"mbpp_task_id": datasets.Value("int32"),"source": datasets.Value("string"),"licence": datasets.Sequence(datasets.Value("string")),"task": datasets.Value("string"),})8 unmodified lines{"test_case_id": datasets.Value("int32"),"cot": datasets.Value("string"),"input": datasets.Sequence(datasets.Value("string")),"output": datasets.Value("string")})7 unmodified lines"mbpp_task_id": datasets.Value("int32"),"description": datasets.Value("string"),"cot": datasets.Value("string"),"imports": datasets.Sequence(datasets.Value("string")),"function_head": datasets.Sequence(datasets.Value("string")),"function_body": datasets.Sequence(datasets.Value("string"))})2 unmodified linesfeatures=features,supervised_keys=None,homepage=_HOMEPAGE,license=_LICENSES,citation=_CITATION,)def _split_generators(self, dl_manager):urls = _DATA_URLS[self.config.name]data = dl_manager.download(urls)return [datasets.SplitGenerator(name=split,gen_kwargs={"files": data[split],},)for split in [datasets.Split.TRAIN]]def _generate_examples(self, filepath):2 unmodified linesid_ = 0for sample in data:yield id_, sampleid_ += 114 unmodified lines1516171819202122232425262728293031323334351 unmodified line373839404142438 unmodified lines525354555657588 unmodified lines676869707172737 unmodified lines8182838485868788892 unmodified lines92939495969798991001011021031041051061071081091101111121131141151161171181191201212 unmodified lines12412512612712812913013113213313413513613713813914014114214314414 unmodified lines}"""_LICENSE = 'CC BY-SA'_SUBSETS = ["tasks", "testcases", "codefunctions"]_DATA_URLS = {"tasks": {"train": "tedrics_data_tasks.json"},"testcases": {"train": "tedrics_data_testcases.json","validation": "tedrics_data_testcases_val.json"},"codefunctions": {"train": "tedrics_data_codefunctions.json","validation": "tedrics_data_codefunctions_val.json"}}1 unmodified lineBUILDER_CONFIGS = [datasets.BuilderConfig(name=f"{subset}",version=datasets.Version("1.1.0"),description=_DESCRIPTION,)for subset in _SUBSETS8 unmodified lines"task_id": datasets.Value("int32"),"mbpp_task_id": datasets.Value("int32"),"source": datasets.Value("string"),"licence": datasets.Value("string"),"task": datasets.Value("string"),})8 unmodified lines{"test_case_id": datasets.Value("int32"),"cot": datasets.Value("string"),"input": datasets.Value("string"),"output": datasets.Value("string")})7 unmodified lines"mbpp_task_id": datasets.Value("int32"),"description": datasets.Value("string"),"cot": datasets.Value("string"),"imports": datasets.Value("string"),"function_head": datasets.Value("string"),"function_body": datasets.Value("string")})2 unmodified linesfeatures=features,supervised_keys=None,homepage=_HOMEPAGE,license=_LICENSE,citation=_CITATION,)def _split_generators(self, dl_manager):urls = _DATA_URLS[self.config.name]data = dl_manager.download_and_extract(urls)splits = []if self.config.name == "tasks":splits = [datasets.Split.TRAIN]if self.config.name == "testcases" or self.config.name == "codefunctions":splits = [datasets.Split.TRAIN, datasets.Split.VALIDATION]return [datasets.SplitGenerator(name=split,gen_kwargs={"filepath": data[split],},)for split in splits]def _generate_examples(self, filepath):2 unmodified linesid_ = 0for sample in data:yield id_, sampleid_ += 1from datasets import load_datasetdef main():# Zum Testen der Implementierungdataset = load_dataset('C:\\Users\\klaud\\TeDriCSProj\\tedrics-data\\tedrics_data.py')print(dataset["train"])print(dataset["train"][0])#print(dataset["validation"])#print(dataset["validation"][0])# Zum Generieren der dataset_infos.json (im Terminal)# (hf-gptneox-cpu) PS C:\Users\klaud\TeDriCSProj\tedrics-data> datasets-cli test C:\Users\klaud\TeDriCSProj\tedrics-data\tedrics_data.py --save_infos --all_configsif __name__ == "__main__":main()
24 unmodified lines2526272829303144 unmodified lines76777879808136 unmodified lines11811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116224 unmodified lines"function_body": " n = len(arr)\n low = 0\n high = n - 1\n res = -1 \n while (low <= high):\n mid = (low + high) // 2 \n if arr[mid] > x:\n high = mid - 1\n elif arr[mid] < x:\n low = mid + 1\n else:\n res = mid\n low = mid + 1\n return res"}, {"task_id": 4,"mbpp_task_id": null,"description": "Write a Python function to lowercase the input text.","cot": "Given an input text. The function can be implemented with the lower() method, which returns a string in which all characters are lowercase. Symbols and Numbers are ignored.","imports": "",44 unmodified lines"mbpp_task_id": 784,"description": "Write a Python function to find the first even and odd number of a given list.","cot": "The function can be implemented using a generator expression and the next() function. Given a list l of numbers. Iterate over the list and find the first even number from the list, i.e. el%2==0. Then iterate over the list to find the first odd number from the list, i.e. el%2!=0. Return a tuple containing the first even and odd number. If there is no even or odd number on the list then return -1.","function_head": "def even_odd(l):\n","function_body": " first_even = next((el for el in l if el%2==0),-1)\n first_odd = next((el for el in l if el%2!=0),-1)\n return first_even, first_odd"}, {36 unmodified lines"imports": "","function_head": "def get_ludic(n):\n","function_body": " ludics = []\n for i in range(1, n + 1):\n ludics.append(i)\n index = 1\n while(index != len(ludics)):\n first_ludic = ludics[index]\n remove_index = index + first_ludic\n while(remove_index < len(ludics)):\n ludics.remove(ludics[remove_index])\n remove_index = remove_index + first_ludic - 1\n index += 1\n return ludics"}, {"task_id": 16,"mbpp_task_id": 760,"description": "Write a Python function to check whether a list of numbers contains only one distinct element or not.","cot":"Given is a list of numbers l. The check whether a list of numbers contains only one element or not can be realized using a set, since no repetitions are allowed in a set. Insert the elements of the list into the set. If there is only one element, the length of the set should be 1. In this case return True else False.","imports": "","function_head": "def unique_element(l):\n","function_body": " s = set(l)\n return len(s) == 1"}, {"task_id": 17,"mbpp_task_id": 744,"description": "Write a Python function to check if the given tuple has any none value or not.","cot":"Given a tuple t. To check if the given tuple has any none value or not can be implemented by using the functions any(), map() and lambda. The map() function iterates over each element of the given tuple and returns an iterable of the results after applying the lambda function to each item of the given tuple. The lambda function checks if an item is None. The any() function returns True if any of the elements of the returned map results are True else it returns False.","imports": "","function_head": "def check_none(test_tup):\n","function_body": " res = any(map(lambda ele: ele is None, test_tup))\n return res"}, {"task_id": 18,"mbpp_task_id": 772,"description": "Write a Python function to remove all the words with k length in the given string.","cot":"Given a string s and the length k. To remove k length words in the given string s can be realized using a list comprehension and the functions split(), join() and len(). The split() function splits a string into a list of strings after breaking the given string by the specified separator. If is not provided then any white space is a separator. Iterate over the splits with a list comprehension and omit all elements whose length differs from k, i.e. len(ele) != k. Then use the join() function to concatenate the elements of length k separated by the space character. The joined elements of length k are returned as a string.","imports": "","function_head": "def remove_length(s, k):\n","function_body": " temp = s.split()\n res = [ele for ele in temp if len(ele) != k]\n res = ' '.join(res)\n return (res)"}, {"task_id": 19,"mbpp_task_id": 775,"description": "Write a Python function to check whether every odd index contains odd numbers of a given list.","cot":"Given a list of integer numbers. To check whether every even index contains an even number and every odd index contains odd number of the input list num can be implemented using a generator expression and the modulo operator. Iterate over the indexes of the list and compare whether the index and the value stored under the index is an even or odd number. If each even index has an even value and each odd index has an odd value then return True otherwise False. Use the all() function for this. The all() function returns True if all items in an iterable are true, otherwise it returns False. If the iterable object is empty, the all() function also returns True.","imports": "","function_head": "def odd_position(nums):\n","function_body": " return all(nums[i]%2==i%2 for i in range(len(nums)))"}, {"task_id": 20,"mbpp_task_id": 597,"description": "Write a Python function to find kth element from the given two sorted arrays.","cot":"Given two sorted lists of size m and n respectively and a value k. Finding the k-th element from the given two lists of integers can be realized by using a technique based on while-loops to merge two lists. From the merged (and sorted) list the element from the k-th position can be easily determined.","imports": "","function_head": "def find_kth(arr1, arr2, k):\n","function_body": " m = len(arr1)\n n = len(arr2)\n sorted1 = [0] * (m + n)\n i = 0\n j = 0\n d = 0\n while (i < m and j < n):\n if (arr1[i] < arr2[j]):\n sorted1[d] = arr1[i]\n i += 1\n else:\n sorted1[d] = arr2[j]\n j += 1\n d += 1\n while (i < m):\n sorted1[d] = arr1[i]\n d += 1\n i += 1\n while (j < n):\n sorted1[d] = arr2[j]\n d += 1\n j += 1\n return sorted1[k - 1]"}]24 unmodified lines2526272829303144 unmodified lines7677787980818236 unmodified lines11912012112212324 unmodified lines"function_body": " n = len(arr)\n low = 0\n high = n - 1\n res = -1 \n while (low <= high):\n mid = (low + high) // 2 \n if arr[mid] > x:\n high = mid - 1\n elif arr[mid] < x:\n low = mid + 1\n else:\n res = mid\n low = mid + 1\n return res"}, {"task_id": 4,"mbpp_task_id": -1,"description": "Write a Python function to lowercase the input text.","cot": "Given an input text. The function can be implemented with the lower() method, which returns a string in which all characters are lowercase. Symbols and Numbers are ignored.","imports": "",44 unmodified lines"mbpp_task_id": 784,"description": "Write a Python function to find the first even and odd number of a given list.","cot": "The function can be implemented using a generator expression and the next() function. Given a list l of numbers. Iterate over the list and find the first even number from the list, i.e. el%2==0. Then iterate over the list to find the first odd number from the list, i.e. el%2!=0. Return a tuple containing the first even and odd number. If there is no even or odd number on the list then return -1.","imports": "","function_head": "def even_odd(l):\n","function_body": " first_even = next((el for el in l if el%2==0),-1)\n first_odd = next((el for el in l if el%2!=0),-1)\n return first_even, first_odd"}, {36 unmodified lines"imports": "","function_head": "def get_ludic(n):\n","function_body": " ludics = []\n for i in range(1, n + 1):\n ludics.append(i)\n index = 1\n while(index != len(ludics)):\n first_ludic = ludics[index]\n remove_index = index + first_ludic\n while(remove_index < len(ludics)):\n ludics.remove(ludics[remove_index])\n remove_index = remove_index + first_ludic - 1\n index += 1\n return ludics"}]
123456789101112131415161718192021222324252627282930313233343536373839404142[{ "task_id": 16, "mbpp_task_id": 760, "description": "Write a Python function to check whether a list of numbers contains only one distinct element or not.", "cot":"Given is a list of numbers l. The check whether a list of numbers contains only one element or not can be realized using a set, since no repetitions are allowed in a set. Insert the elements of the list into the set. If there is only one element, the length of the set should be 1. In this case return True else False.", "imports": "", "function_head": "def unique_element(l):\n", "function_body": " s = set(l)\n return len(s) == 1" }, { "task_id": 17, "mbpp_task_id": 744, "description": "Write a Python function to check if the given tuple has any none value or not.", "cot":"Given a tuple t. To check if the given tuple has any none value or not can be implemented by using the functions any(), map() and lambda. The map() function iterates over each element of the given tuple and returns an iterable of the results after applying the lambda function to each item of the given tuple. The lambda function checks if an item is None. The any() function returns True if any of the elements of the returned map results are True else it returns False.", "imports": "", "function_head": "def check_none(test_tup):\n", "function_body": " res = any(map(lambda ele: ele is None, test_tup))\n return res" }, { "task_id": 18, "mbpp_task_id": 772, "description": "Write a Python function to remove all the words with k length in the given string.", "cot":"Given a string s and the length k. To remove k length words in the given string s can be realized using a list comprehension and the functions split(), join() and len(). The split() function splits a string into a list of strings after breaking the given string by the specified separator. If is not provided then any white space is a separator. Iterate over the splits with a list comprehension and omit all elements whose length differs from k, i.e. len(ele) != k. Then use the join() function to concatenate the elements of length k separated by the space character. The joined elements of length k are returned as a string.", "imports": "", "function_head": "def remove_length(s, k):\n", "function_body": " temp = s.split()\n res = [ele for ele in temp if len(ele) != k]\n res = ' '.join(res)\n return (res)" }, { "task_id": 19, "mbpp_task_id": 775, "description": "Write a Python function to check whether every odd index contains odd numbers of a given list.", "cot":"Given a list of integer numbers. To check whether every even index contains an even number and every odd index contains odd number of the input list num can be implemented using a generator expression and the modulo operator. Iterate over the indexes of the list and compare whether the index and the value stored under the index is an even or odd number. If each even index has an even value and each odd index has an odd value then return True otherwise False. Use the all() function for this. The all() function returns True if all items in an iterable are true, otherwise it returns False. If the iterable object is empty, the all() function also returns True.", "imports": "", "function_head": "def odd_position(nums):\n", "function_body": " return all(nums[i]%2==i%2 for i in range(len(nums)))" }, { "task_id": 20, "mbpp_task_id": 597, "description": "Write a Python function to find kth element from the given two sorted arrays.", "cot":"Given two sorted lists of size m and n respectively and a value k. Finding the k-th element from the given two lists of integers can be realized by using a technique based on while-loops to merge two lists. From the merged (and sorted) list the element from the k-th position can be easily determined.", "imports": "", "function_head": "def find_kth(arr1, arr2, k):\n", "function_body": " m = len(arr1)\n n = len(arr2)\n sorted1 = [0] * (m + n)\n i = 0\n j = 0\n d = 0\n while (i < m and j < n):\n if (arr1[i] < arr2[j]):\n sorted1[d] = arr1[i]\n i += 1\n else:\n sorted1[d] = arr2[j]\n j += 1\n d += 1\n while (i < m):\n sorted1[d] = arr1[i]\n d += 1\n i += 1\n while (j < n):\n sorted1[d] = arr2[j]\n d += 1\n j += 1\n return sorted1[k - 1]" }]18 unmodified lines1920212223242518 unmodified lines"task": "Find the position of last occurrences of an element in a sorted array."}, {"task_id": 4,"mbpp_task_id": null,"source": "https://www.geeksforgeeks.org/text-preprocessing-in-python-set-1/","licence": "CC BY-SA","task": "Lowercase the given input text."18 unmodified lines1920212223242518 unmodified lines"task": "Find the position of last occurrences of an element in a sorted array."}, {"task_id": 4,"mbpp_task_id": -1,"source": "https://www.geeksforgeeks.org/text-preprocessing-in-python-set-1/","licence": "CC BY-SA","task": "Lowercase the given input text."
75 unmodified lines76777879808182290 unmodified lines37337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150275 unmodified lines},{"task_id": 4,"mbpp_task_id": null,"task": "Lowercase the given input text.","test_cases": [{290 unmodified lines"output": "[1, 2, 3, 5]"}]},{"task_id": 16,"mbpp_task_id": 760,"task": "Check whether a list of numbers contains only one distinct element or not.","test_cases": [{"test_case_id": 1,"cot": "Given a list of numbers l = [1,2,1,2]. The list consists of two distinct numbers, namely 1 and 2. The output is False.","input": "[[1,2,1,2]]","output": "False"},{"test_case_id": 2,"cot": "Given a list of numbers l = [1,2,3,4,5]. The list consists of five distinct numbers, namely 1, 2, 3, 4 and 5. The output is False.","input": "[[1,2,3,4,5]]","output": "False"},{"test_case_id": 3,"cot": "Given a list of numbers l = [1,1,1]. The list consists of one distinct numbers, namely 1. The output is True.","input": "[[1,1,1]]","output": "True"}]},{"task_id": 17,"mbpp_task_id": 744,"task": "Check if the given tuple has any none value or not.","test_cases": [{"test_case_id": 1,"cot": "Given a tuple t = (10, 4, 5, 6, None). The tuple has five elements, namely four numbers, 10, 4, 5 and 6, and one None element. The output is True.","input": "[(10, 4, 5, 6, None)]","output": "True"},{"test_case_id": 2,"cot": "Given a tuple t = (7, 8, 9, 11, 14). The tuple has five elements, namely the five numbers 7, 8, 9, 11 and 14, but no None element. The output is False.","input": "[(7, 8, 9, 11, 14)]","output": "False"},{"test_case_id": 3,"cot": "Given a tuple t = (1, 2, 3, 4, None). The tuple has five elements, namely the four numbers 1, 2, 3 and 4, and one None element. The output is True.","input": "[(1, 2, 3, 4, None)]","output": "True"}]},{"task_id": 18,"mbpp_task_id": 772,"task": "Remove all the words with k length in the given string.","test_cases": [{"test_case_id": 1,"cot": "Given a string s='The person is most value tet' and the length k=3. The strings 'person', 'is', 'most' and 'value' have lengths different from k, i.e. len('person') = 6 and 6!=3, len('is') = 2 and 6!=3, len('most') = 4 and 4!=3, len('value') = 5 and 5!=3. The strings 'The' and 'tet' have the length K=3 and are removed from the input string s. The output is 'person is most value'.","input": "['The person is most value tet', 3]","output": "'person is most value'"},{"test_case_id": 2,"cot": "Given a string s='If you told me about this ok' and the length k=4. The strings 'If', 'you', 'me', 'about' and 'ok' have lengths different from k, i.e. len('If') = 2 and 2!=4, len('you') = 3 and 3!=4, len('me') = 2 and 2!=4, len('about') = 5 and 5!=4, len('ok') = 2 and 2!=4. The strings 'told' and 'this' have the length K=4 and are removed from the input string s. The output is 'If you me about ok'.","input": "['If you told me about this ok', 4]","output": "'If you me about ok'"},{"test_case_id": 3,"cot": "Given a string s='Forces of darkeness' and the length k=4. The strings 'Forces', 'of' and 'darkeness' have lengths different from k, i.e. len('Forces') = 6 and 6!=4, len('of') = 2 and 2!=4, len('darkeness') = 9 and 9!=4. There are no strings that have the length K=4. The output is 'Forces of darkeness'.","input": "['Forces of darkeness', 4]","output": "'Forces of darkeness'"}]},{"task_id": 19,"mbpp_task_id": 775,"task": "Check whether every odd index contains odd numbers of a given list.","test_cases": [{"test_case_id": 1,"cot": "Given a list of integer numbers num=[2,1,4,3]. The index 0 is even and the value 2 stored under the index 0 is even, i.e. 2%2=0%2=0. The index 1 is odd and the value 1 stored under the index 1 is odd, i.e. 1%2=1%2=1. The index 4 is even and the value 4 stored under the index 2 is even, i.e. 4%2=2%2=0. The index 3 is odd and the value 3 stored under the index 3 is odd, i.e. 3%2=3%2=1. Each even index has an even value and each odd index has an odd value. The output is True.","input": "[[2,1,4,3]]","output": "True"},{"test_case_id": 2,"cot": "Given a list of integer numbers num=[4,1,2]. The index 0 is even and the value 4 stored under the index 0 is even, i.e. 4%2=0%2=0. The index 1 is odd and the value 1 stored under the index 1 is odd, i.e. 1%2=1%2=1. The index 2 is even and the value 2 stored under the index 2 is even, i.e. 2%2=2%2=0. Each even index has an even value and each odd index has an odd value. The output is True.","input": "[[4,1,2]]","output": "True"},{"test_case_id": 3,"cot": "Given a list of integer numbers num=[1,2,3]. The index 0 is even and the value 1 stored under the index 0 is odd, i.e. 1%2=1 and 0%2=0. The index 1 is odd and the value 2 stored under the index 1 is even, i.e. 2%2=0 and 1%2=1. The index 2 is even and the value 3 stored under the index 2 is odd, i.e. 3%2=1 and 2%2=0. No even index has an even value and no odd index has an odd value. The output is False.","input": "[[1,2,3]]","output": "False"}]},{"task_id": 20,"mbpp_task_id": 597,"task": "Find kth element from the given two sorted arrays.","test_cases": [{"test_case_id": 1,"cot": "Given two sorted lists of integer numbers [2, 3, 6, 7, 9] and [1, 4, 8, 10] and the value k = 5. The merged list of the two input lists is [1, 2, 3, 4, 6, 7, 8, 9, 10]. The 6-th element is 6. The output is 6.","input": "[[2, 3, 6, 7, 9], [1, 4, 8, 10], 5]","output": "6"},{"test_case_id": 2,"cot": "Given two sorted lists of integer numbers [100, 112, 256, 349, 770] and [72, 86, 113, 119, 265, 445, 892] and the value k = 7. The merged list of the two input lists is [72, 86, 100, 112, 113, 119, 256, 265, 349, 445, 892]. The 7-th element is 256. The output is 256.","input": "[[100, 112, 256, 349, 770], [72, 86, 113, 119, 265, 445, 892], 7]","output": "256"},{"test_case_id": 3,"cot": "Given two sorted lists of integer numbers [3, 4, 7, 8, 10] and [2, 5, 9, 11] and the value k = 6. The merged list of the two input lists is [2, 3, 4, 5, 7, 8, 9, 10, 11]. The 6-th element is 8. The output is 8.","input": "[[3, 4, 7, 8, 10], [2, 5, 9, 11], 6]","output": "8"}]}]75 unmodified lines76777879808182290 unmodified lines37337437537637775 unmodified lines},{"task_id": 4,"mbpp_task_id": -1,"task": "Lowercase the given input text.","test_cases": [{290 unmodified lines"output": "[1, 2, 3, 5]"}]}]
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127[ { "task_id": 16, "mbpp_task_id": 760, "task": "Check whether a list of numbers contains only one distinct element or not.", "test_cases": [ { "test_case_id": 1, "cot": "Given a list of numbers l = [1,2,1,2]. The list consists of two distinct numbers, namely 1 and 2. The output is False.", "input": "[[1,2,1,2]]", "output": "False" }, { "test_case_id": 2, "cot": "Given a list of numbers l = [1,2,3,4,5]. The list consists of five distinct numbers, namely 1, 2, 3, 4 and 5. The output is False.", "input": "[[1,2,3,4,5]]", "output": "False" }, { "test_case_id": 3, "cot": "Given a list of numbers l = [1,1,1]. The list consists of one distinct numbers, namely 1. The output is True.", "input": "[[1,1,1]]", "output": "True" } ] }, { "task_id": 17, "mbpp_task_id": 744, "task": "Check if the given tuple has any none value or not.", "test_cases": [ { "test_case_id": 1, "cot": "Given a tuple t = (10, 4, 5, 6, None). The tuple has five elements, namely four numbers, 10, 4, 5 and 6, and one None element. The output is True.", "input": "[(10, 4, 5, 6, None)]", "output": "True" }, { "test_case_id": 2, "cot": "Given a tuple t = (7, 8, 9, 11, 14). The tuple has five elements, namely the five numbers 7, 8, 9, 11 and 14, but no None element. The output is False.", "input": "[(7, 8, 9, 11, 14)]", "output": "False" }, { "test_case_id": 3, "cot": "Given a tuple t = (1, 2, 3, 4, None). The tuple has five elements, namely the four numbers 1, 2, 3 and 4, and one None element. The output is True.", "input": "[(1, 2, 3, 4, None)]", "output": "True" } ] }, { "task_id": 18, "mbpp_task_id": 772, "task": "Remove all the words with k length in the given string.", "test_cases": [ { "test_case_id": 1, "cot": "Given a string s='The person is most value tet' and the length k=3. The strings 'person', 'is', 'most' and 'value' have lengths different from k, i.e. len('person') = 6 and 6!=3, len('is') = 2 and 6!=3, len('most') = 4 and 4!=3, len('value') = 5 and 5!=3. The strings 'The' and 'tet' have the length K=3 and are removed from the input string s. The output is 'person is most value'.", "input": "['The person is most value tet', 3]", "output": "'person is most value'" }, { "test_case_id": 2, "cot": "Given a string s='If you told me about this ok' and the length k=4. The strings 'If', 'you', 'me', 'about' and 'ok' have lengths different from k, i.e. len('If') = 2 and 2!=4, len('you') = 3 and 3!=4, len('me') = 2 and 2!=4, len('about') = 5 and 5!=4, len('ok') = 2 and 2!=4. The strings 'told' and 'this' have the length K=4 and are removed from the input string s. The output is 'If you me about ok'.", "input": "['If you told me about this ok', 4]", "output": "'If you me about ok'" }, { "test_case_id": 3, "cot": "Given a string s='Forces of darkeness' and the length k=4. The strings 'Forces', 'of' and 'darkeness' have lengths different from k, i.e. len('Forces') = 6 and 6!=4, len('of') = 2 and 2!=4, len('darkeness') = 9 and 9!=4. There are no strings that have the length K=4. The output is 'Forces of darkeness'.", "input": "['Forces of darkeness', 4]", "output": "'Forces of darkeness'" } ] }, { "task_id": 19, "mbpp_task_id": 775, "task": "Check whether every odd index contains odd numbers of a given list.", "test_cases": [ { "test_case_id": 1, "cot": "Given a list of integer numbers num=[2,1,4,3]. The index 0 is even and the value 2 stored under the index 0 is even, i.e. 2%2=0%2=0. The index 1 is odd and the value 1 stored under the index 1 is odd, i.e. 1%2=1%2=1. The index 4 is even and the value 4 stored under the index 2 is even, i.e. 4%2=2%2=0. The index 3 is odd and the value 3 stored under the index 3 is odd, i.e. 3%2=3%2=1. Each even index has an even value and each odd index has an odd value. The output is True.", "input": "[[2,1,4,3]]", "output": "True" }, { "test_case_id": 2, "cot": "Given a list of integer numbers num=[4,1,2]. The index 0 is even and the value 4 stored under the index 0 is even, i.e. 4%2=0%2=0. The index 1 is odd and the value 1 stored under the index 1 is odd, i.e. 1%2=1%2=1. The index 2 is even and the value 2 stored under the index 2 is even, i.e. 2%2=2%2=0. Each even index has an even value and each odd index has an odd value. The output is True.", "input": "[[4,1,2]]", "output": "True" }, { "test_case_id": 3, "cot": "Given a list of integer numbers num=[1,2,3]. The index 0 is even and the value 1 stored under the index 0 is odd, i.e. 1%2=1 and 0%2=0. The index 1 is odd and the value 2 stored under the index 1 is even, i.e. 2%2=0 and 1%2=1. The index 2 is even and the value 3 stored under the index 2 is odd, i.e. 3%2=1 and 2%2=0. No even index has an even value and no odd index has an odd value. The output is False.", "input": "[[1,2,3]]", "output": "False" } ] }, { "task_id": 20, "mbpp_task_id": 597, "task": "Find kth element from the given two sorted arrays.", "test_cases": [ { "test_case_id": 1, "cot": "Given two sorted lists of integer numbers [2, 3, 6, 7, 9] and [1, 4, 8, 10] and the value k = 5. The merged list of the two input lists is [1, 2, 3, 4, 6, 7, 8, 9, 10]. The 6-th element is 6. The output is 6.", "input": "[[2, 3, 6, 7, 9], [1, 4, 8, 10], 5]", "output": "6" }, { "test_case_id": 2, "cot": "Given two sorted lists of integer numbers [100, 112, 256, 349, 770] and [72, 86, 113, 119, 265, 445, 892] and the value k = 7. The merged list of the two input lists is [72, 86, 100, 112, 113, 119, 256, 265, 349, 445, 892]. The 7-th element is 256. The output is 256.", "input": "[[100, 112, 256, 349, 770], [72, 86, 113, 119, 265, 445, 892], 7]", "output": "256" }, { "test_case_id": 3, "cot": "Given two sorted lists of integer numbers [3, 4, 7, 8, 10] and [2, 5, 9, 11] and the value k = 6. The merged list of the two input lists is [2, 3, 4, 5, 7, 8, 9, 10, 11]. The 6-th element is 8. The output is 8.", "input": "[[3, 4, 7, 8, 10], [2, 5, 9, 11], 6]", "output": "8" } ] }]dataset_infos.jsonAdded+1
tedrics_data.py+42-15
tedrics_data_codefunctions.json+2-41
tedrics_data_codefunctions_val.jsonAdded+42
tedrics_data_tasks.json+1-1
tedrics_data_testcases.json+1-126
tedrics_data_testcases_val.jsonAdded+127