Download utils.py from unitxt/data: direct link, hf CLI and curl.
- Browser
- Download file 246 Bytes
-
https://huggingface.co/datasets/unitxt/data/resolve/8f3bc41a2b4e73bfdabac7fc62352437da299391/utils.py
- Command line
-
hf download hf://datasets/unitxt/data@8f3bc41a2b4e73bfdabac7fc62352437da299391/utils.py
-
curl -L -o utils.py https://huggingface.co/datasets/unitxt/data/resolve/8f3bc41a2b4e73bfdabac7fc62352437da299391/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] | |