Download utils.py from unitxt/data: direct link, hf CLI and curl.
- Browser
- Download file 246 Bytes
-
https://huggingface.co/datasets/unitxt/data/resolve/f0d0b28ffce3d2e9b3557cb63a66a8a2ce22094e/utils.py
- Command line
-
hf download hf://datasets/unitxt/data@f0d0b28ffce3d2e9b3557cb63a66a8a2ce22094e/utils.py
-
curl -L -o utils.py https://huggingface.co/datasets/unitxt/data/resolve/f0d0b28ffce3d2e9b3557cb63a66a8a2ce22094e/utils.py
246 Bytes
| import abc | |
| class Singleton(abc.ABC): | |
| _instances = {} | |
| def __new__(cls, *args, **kwargs): | |
| if cls not in cls._instances: | |
| cls._instances[cls] = super(Singleton, cls).__new__(cls) | |
| return cls._instances[cls] | |