Download pool/shard008/Python/0071441_webapp_extras.py from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 493 Bytes
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard008/Python/0071441_webapp_extras.py
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard008/Python/0071441_webapp_extras.py
-
curl -L -o 0071441_webapp_extras.py https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard008/Python/0071441_webapp_extras.py
493 Bytes
| from django import template | |
| import math | |
| import urllib | |
| register = template.Library() | |
| def multiply(value, arg): | |
| return int(value) * int(arg) | |
| def divide_rounding_up(value, arg): | |
| return int(math.ceil(float(value) / float(arg))) | |
| def get_range(value): | |
| return range(value) | |
| def get_item(i, arr): | |
| try: | |
| return arr[i] | |
| except: | |
| return '' | |
| def urlencode(value): | |
| return value[:5] + urllib.quote(value[5:]) |