Returns the architecture of the current machine
421976
public static function getCurrentArch(): string
    {
        $arch = php_uname('m');

        if ($arch === "x86_64") {
            $arch = "amd64";
        } elseif ($arch === "i386") {
            $arch = "386";
        } else {
            // TODO: Whats here?
            printf('ERROR: Unexpected, please contact the maintainer or provide a pull request :)%s', PHP_EOL);
            exit(1);
        }

        return $arch;
    }
442997
public static Env of() {
		return of(
			System.getProperty("os.name"),
			System.getProperty("os.version"),
			System.getProperty("os.arch"),
			System.getProperty("java.version"),
			System.getProperty("java.runtime.name"),
			System.getProperty("java.runtime.version"),
			System.getProperty("java.vm.name"),
			System.getProperty("java.vm.version")
		);
	}
1266568
private function _machine()
    {
        $machine = "";
        if ((CommonFunctions::rfts('/var/log/dmesg', $result, 0, 4096, false)
              && preg_match('/^[\s\[\]\.\d]*DMI:\s*(.*)/m', $result, $ar_buf))
           ||(CommonFunctions::executeProgram('dmesg', '', $result, false)
              && preg_match('/^[\s\[\]\.\d]*DMI:\s*(.*)/m', $result, $ar_buf))) {
            $machine = trim($ar_buf[1]);
        } else { //data from /sys/devices/virtual/dmi/id/
            $product = "";
            $board = "";
            $bios = "";
            if (CommonFunctions::rfts('/sys/devices/virtual/dmi/id/board_vendor', $buf, 1, 4096, false) && (trim($buf)!="")) {
                $machine = trim($buf);
            }
            if (CommonFunctions::rfts('/sys/devices/virtual/dmi/id/product_name', $buf, 1, 4096, false) && (trim($buf)!="")) {
                $product = trim($buf);
            }
            if (CommonFunctions::rfts('/sys/devices/virtual/dmi/id/board_name', $buf, 1, 4096, false) && (trim($buf)!="")) {
                $board = trim($buf);
            }
            if (CommonFunctions::rfts('/sys/devices/virtual/dmi/id/bios_version', $buf, 1, 4096, false) && (trim($buf)!="")) {
                $bios = trim($buf);
            }
            if (CommonFunctions::rfts('/sys/devices/virtual/dmi/id/bios_date', $buf, 1, 4096, false) && (trim($buf)!="")) {
                $bios = trim($bios." ".trim($buf));
            }
            if ($product != "") {
                $machine .= " ".$product;
            }
            if ($board != "") {
                $machine .= "/".$board;
            }
            if ($bios != "") {
                $machine .= ", BIOS ".$bios;
            }
        }

        if ($machine != "") {
            $machine = trim(preg_replace("/^\/,?/", "", preg_replace("/ ?(To be filled by O\.E\.M\.|System manufacturer|System Product Name|Not Specified) ?/i", "", $machine)));
        }

        if (CommonFunctions::fileexists($filename="/etc/config/uLinux.conf") // QNAP detection
           && CommonFunctions::rfts($filename, $buf, 0, 4096, false)
           && preg_match("/^Rsync\sModel\s*=\s*QNAP/m", $buf)
           && CommonFunctions::fileexists($filename="/etc/platform.conf") // Platform detection
           && CommonFunctions::rfts($filename, $buf, 0, 4096, false)
           && preg_match("/^DISPLAY_NAME\s*=\s*(\S+)/m", $buf, $mach_buf) && ($mach_buf[1]!=="")) {
            if ($machine != "") {
                $machine = "QNAP ".$mach_buf[1].' - '.$machine;
            } else {
                $machine = "QNAP ".$mach_buf[1];
            }
        }

        if ($machine != "") {
            $this->sys->setMachine($machine);
        }
    }
183636
def get_system_spec() -> Dict[str, str]:
    
    import pkg_resources
    import platform

    if sys.platform == 'darwin':
        system_info = 'macOS {} {}'.format(
            platform.mac_ver()[0],
            platform.architecture()[0],
        )
    else:
        system_info = '{} {} {}'.format(
            platform.system(),
            '_'.join(part for part in platform.architecture() if part),
            platform.release(),
        )

    try:
        version = pkg_resources.require(raiden.__name__)[0].version
    except (pkg_resources.VersionConflict, pkg_resources.DistributionNotFound):
        raise RuntimeError(
            'Cannot detect Raiden version. Did you do python setup.py?  '
            'Refer to https://raiden-network.readthedocs.io/en/latest/'
            'overview_and_guide.html#for-developers',
        )

    system_spec = {
        'raiden': version,
        'python_implementation': platform.python_implementation(),
        'python_version': platform.python_version(),
        'system': system_info,
        'architecture': platform.machine(),
        'distribution': 'bundled' if getattr(sys, 'frozen', False) else 'source',
    }
    return system_spec
451900
def architecture(self):
        """"""
        arch = {'class': self.__class__,
                'n_in': self.n_in,
                'n_units': self.n_units,
                'activation_function': self.activation_function
                if hasattr(self, 'activation_function') else None}
        return arch
492406
public function getProcessor()
    {
        if (null === $this->processor) {
            if (null !== $this->width) {
                return self::PROCESSOR_FIXED;
            }

            return self::PROCESSOR_DYNAMIC;
        }

        return $this->processor;
    }
1116831
def get_current_instruction(self) -> Dict:
        

        instructions = self.environment.code.instruction_list
        return instructions[self.mstate.pc]
747858
def get_current_desktop(self):
        
        desktop = ctypes.c_long(0)
        _libxdo.xdo_get_current_desktop(self._xdo, ctypes.byref(desktop))
        return desktop.value
173270
public function arch()
    {
        $version = json_decode($this->version());

        $os = $version->Os;

        $arch = $version->Arch;

        return $os.$arch;
    }
810639
def get_cpu_props(cls, family, arch='x86'):
        

        cpus = cls.get_cpus_by_arch(arch)
        try:
            return cpus.xpath('model[@name="{0}"]'.format(family))[0]
        except IndexError:
            raise LagoException('No such CPU family: {0}'.format(family))
1170984
def get_active_state_machine(self):
        
        if self._active_state_machine_id in self._state_machines:
            return self._state_machines[self._active_state_machine_id]
        else:
            return None
337636
def _darwin_current_arch(self):
        """"""
        if sys.platform == "darwin":
            if sys.maxsize > 2 ** 32: # 64bits.
                return platform.mac_ver()[2] # Both Darwin and Python are 64bits.
            else: # Python 32 bits
                return platform.processor()
314731
private function getCurrentOS()
    {
        switch (true) {
            case mb_stristr(PHP_OS, 'DAR'): return self::systemMacOS;
            case mb_stristr(PHP_OS, 'WIN'): return self::systemWindows;
            default: return self::systemUnix;
        }
    }
332331
def get_current_platform():
    
    board_info_dir = '/sys/class/board-info/'

    if not os.path.exists(board_info_dir) or os.environ.get("FAKE_SYS"):
        return 'fake'

    for board in os.listdir(board_info_dir):
        uevent_filename = os.path.join(board_info_dir, board, 'uevent')

        if os.path.exists(uevent_filename):
            with open(uevent_filename, 'r') as fh:
                for line in fh.readlines():
                    (key, value) = line.strip().split('=')

                    if key == 'BOARD_INFO_MODEL':

                        if value == 'LEGO MINDSTORMS EV3':
                            return 'ev3'

                        elif value in ('FatcatLab EVB', 'QuestCape'):
                            return 'evb'

                        elif value == 'PiStorms':
                            return 'pistorms'

                        # This is the same for both BrickPi and BrickPi+.
                        # There is not a way to tell the difference.
                        elif value == 'Dexter Industries BrickPi':
                            return 'brickpi'

                        elif value == 'Dexter Industries BrickPi3':
                            return 'brickpi3'

                        elif value == 'FAKE-SYS':
                            return 'fake'

    return None
798064
public static SystemManager getCurrent()
  {
    SystemManager system = _systemLocal.get();

    if (system == null) {
      WeakReference<SystemManager> globalRef = _globalSystemRef;

      if (globalRef != null) {
        system = globalRef.get();
      }
    }

    return system;
  }
732484
def _get_os(self):
        '''
        
        '''
        return {
            'name': self._grain('os'),
            'family': self._grain('os_family'),
            'arch': self._grain('osarch'),
            'release': self._grain('osrelease'),
        }
1278526
public MachineType getMachineType() {
        long value = get(MACHINE);
        try {
            return MachineType.getForValue(value);
        } catch (IllegalArgumentException e) {
            logger.error("Unable to resolve machine type for value: " + value);
            return MachineType.UNKNOWN;
        }
    }