Download pool/shard004/Python/0035817_exsample.py from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 396 Bytes
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard004/Python/0035817_exsample.py
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard004/Python/0035817_exsample.py
-
curl -L -o 0035817_exsample.py https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard004/Python/0035817_exsample.py
396 Bytes
| # -*- coding: utf-8 -*- | |
| import random | |
| def main(): | |
| item = {'peach': '4', 'melon': '4', 'Cherry': '1', 'orange': '3', 'Grape': '4', 'persimmon': '3', 'strawberry': '3', | |
| 'watermelon': '7', 'pear': '4', 'grapefruit': '3', 'banana': '2', 'Apple': '5', 'pineapple': '6'} | |
| fruit, val = random.choice(list(item.items())) | |
| print(fruit, val) | |
| if __name__ == '__main__': | |
| main() | |