Download 137/solution/_reference.py from PRHW/loom-benchmark-mbpp: direct link, hf CLI and curl.
- Browser
- Download file 194 Bytes
-
https://huggingface.co/datasets/PRHW/loom-benchmark-mbpp/resolve/main/137/solution/_reference.py
- Command line
-
hf download hf://datasets/PRHW/loom-benchmark-mbpp/137/solution/_reference.py
-
curl -L -o _reference.py https://huggingface.co/datasets/PRHW/loom-benchmark-mbpp/resolve/main/137/solution/_reference.py
194 Bytes
| import math | |
| from array import array | |
| def zero_count(nums): | |
| n = len(nums) | |
| n1 = 0 | |
| for x in nums: | |
| if x == 0: | |
| n1 += 1 | |
| else: | |
| None | |
| return n1/(n-n1) |