def setCPUArchitecture(self, arch): """getCPUArchitecture(arch: int|long) Sets the CPU architecture. 'arch' is the number of bits of the architecture """ util.assertType(arch, int, "Expected int value") self._cpu_arch = arch
def contains(name): assertType("activationfn.contains", "name", name, str) return name in fn_list
def add(name, fn): assertType("activationfn.add", "name", name, str) fn_list[name] = fn
def get(name): assertType("activationfn.get", "name", name, str) assert name in fn_list, "(activationfn) %s cannot be found." % name return fn_list[name]
def contains(name): assertType("errfn.contains", "name", name, str) return name in fn_list
def add(name, fn): assertType("errfn.add", "name", name, str) fn_list[name] = fn
def setFreeSwapMemory(self, mem): util.assertType(mem, (int, long), "Expected integer value") self._free_swap = mem
def setUsedSwapMemory(self, mem): util.assertType(mem, (int, long), "Expected integer value") self._used_swap = mem
def setTotalSwapMemory(self, mem): util.assertType(mem, (int, long), "Expected integer value") self._total_swap = mem
def setAvaliableVirtualMemory(self, mem): util.assertType(mem, (int, long), "Expected integer value") self._avaliable_mem = mem
def setUsedVirtualMemory(self, mem): util.assertType(mem, (int, long), "Expected integer value") self._used_mem = mem
def setTotalVirtualMemory(self, mem): util.assertType(mem, (int, long), "Expected integer value") self._total_mem = mem
def setOSVersion(self, os_version): util.assertType(os_version, str, "Expected string value") self._os_version = os_version
def setOSName(self, os_name): util.assertType(os_name, str, "Expected string value") self._os_name = os_name
def setMachineName(self, name): util.assertType(name, str, "Expected string value") self._machine_name = name
def setTimestamp(self, tstamp): util.assertType(tstamp, time.struct_time, "Expected struct_time") self._timestamp = tstamp