Download 117/solution/_reference.py from PRHW/loom-benchmark-mbpp: direct link, hf CLI and curl.
- Browser
- Download file 240 Bytes
-
https://huggingface.co/datasets/PRHW/loom-benchmark-mbpp/resolve/main/117/solution/_reference.py
- Command line
-
hf download hf://datasets/PRHW/loom-benchmark-mbpp/117/solution/_reference.py
-
curl -L -o _reference.py https://huggingface.co/datasets/PRHW/loom-benchmark-mbpp/resolve/main/117/solution/_reference.py
240 Bytes
| def list_to_float(test_list): | |
| res = [] | |
| for tup in test_list: | |
| temp = [] | |
| for ele in tup: | |
| if ele.isalpha(): | |
| temp.append(ele) | |
| else: | |
| temp.append(float(ele)) | |
| res.append((temp[0],temp[1])) | |
| return res |