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