Mac Terminal Setup
SetUp Mac OS Terminal sudo systemsetup -getcomputersleep sudo systemsetup -setcomputersleep 60 sudo pmset -a displaysleep 40 disksleep 60 sleep 600 1. Install brew If you do not have Xcode installed…
SetUp Mac OS Terminal sudo systemsetup -getcomputersleep sudo systemsetup -setcomputersleep 60 sudo pmset -a displaysleep 40 disksleep 60 sleep 600 1. Install brew If you do not have Xcode installed…
class Logger(object): _instance = None def __init__(self): raise RuntimeError('Error: Call instance() instead') @classmethod def instance(cls): if cls._instance is None: print('Creating new instance') cls._instance = cls.__new__(cls) return cls._instance def __str__(self): return…
class CompressionFactory: compression = {} def __new__(cls): cls.compression = {"rar": Rar(), "tar": Tar(), "zip": Zip()} return cls @classmethod def getCompression(cls, method): return cls.compression[method]import abcclass File(abc.ABC): def __init__(self, txt): self.txt =…