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