get fan information

@return void
973841
private function _fans()
    {
        $sname = '';
        foreach ($this->_lines as $line) {
            if ((trim($line) !== "") && (strpos($line, ':') === false)) {
                $sname = trim($line);
                if (preg_match('/^([^-]+)-/', $sname, $snamebuf)) {
                    $sname = ' ('.$snamebuf[1].')';
                } else {
                    $sname = '';
                }
            }
            $data = array();
            if (preg_match("/^(.+):(.+) RPM\s*\((.+)=(.+) RPM,(.+)=(.+)\)(.*)\)/", $line, $data)) {
                ;
            } elseif (preg_match("/^(.+):(.+) RPM\s*\((.+)=(.+) RPM,(.+)=(.+)\)(.*)/", $line, $data)) {
                ;
            } elseif (preg_match("/^(.+):(.+) RPM\s*\((.+)=(.+) RPM\)(.*)/", $line, $data)) {
                ;
            } elseif (preg_match("/^(.+):(.+) RPM\s*\(/", $line, $data)) {
                ;
            } else {
                preg_match("/^(.+):(.+) RPM$/", $line, $data);
            }
            if (count($data)>2) {
                 foreach ($data as $key=>$value) {
                    if (preg_match("/^\+?(-?[0-9\.]+).?$/", trim($value), $newvalue)) {
                        $data[$key] = 0+trim($newvalue[1]);
                    } else {
                        $data[$key] = trim($value);
                    }
                }
                $dev = new SensorDevice();
                $dev->setName($data[1].$sname);
                $dev->setValue(trim($data[2]));
                if (isset($data[4])) {
                    $dev->setMin(trim($data[4]));
                }
                if (preg_match("/\sALARM\s*$/", $line)) {
                    $dev->setEvent("Alarm");
                }
                $this->mbinfo->setMbFan($dev);
            }
        }
    }
883965
def _get_fans(shape):
    
    """
    if len(shape) == 2:
        fan_in = shape[0]
        fan_out = shape[1]
    elif len(shape) == 4 or len(shape) == 5:
        # assuming convolution kernels (2D or 3D).
        kernel_size = np.prod(shape[:2])
        fan_in = shape[-2] * kernel_size
        fan_out = shape[-1] * kernel_size
    else:
        # no specific assumptions
        fan_in = np.sqrt(np.prod(shape))
        fan_out = np.sqrt(np.prod(shape))
    return fan_in, fan_out
1259902
private function getAllInfo()
    {
        $data = [
            'id'               => $this->getId(),
            'name'             => $this->getName(),
            'image'            => $this->getImage(),
            'given_name'       => $this->getBiodata('Given name'),
            'family_name'      => $this->getBiodata('Family name'),
            'alternative_name' => $this->getBiodata('Alternate names'),
            'birthday'         => $this->getBiodata('Birthday'),
            'website'          => $this->getBiodata('Website'),
            'favorite'         => $this->getBiodata('Member Favorites'),
            'more'             => $this->getMore(),
            'va'               => $this->getVa(),
            'staff'            => $this->getStaff(),
            'published_manga'  => $this->getStaff(true),
        ];

        return $data;
    }
338464
private function _info()
    {
        foreach ($this->_output as $ups) {

            $dev = new UPSDevice();

            // General info
            if (preg_match('/^UPSNAME\s*:\s*(.*)$/m', $ups, $data)) {
                $dev->setName(trim($data[1]));
            }
            if (preg_match('/^MODEL\s*:\s*(.*)$/m', $ups, $data)) {
                $model = trim($data[1]);
                if (preg_match('/^APCMODEL\s*:\s*(.*)$/m', $ups, $data)) {
                    $dev->setModel($model.' ('.trim($data[1]).')');
                } else {
                    $dev->setModel($model);
                }
            }
            if (preg_match('/^UPSMODE\s*:\s*(.*)$/m', $ups, $data)) {
                $dev->setMode(trim($data[1]));
            }
            if (preg_match('/^STARTTIME\s*:\s*(.*)$/m', $ups, $data)) {
                $dev->setStartTime(trim($data[1]));
            }
            if (preg_match('/^STATUS\s*:\s*(.*)$/m', $ups, $data)) {
                $dev->setStatus(trim($data[1]));
            }
            if (preg_match('/^ITEMP\s*:\s*(.*)$/m', $ups, $data)) {
                $temperatur = trim($data[1]);
                if (($temperatur !== "-273.1 C") && ($temperatur !== "-273.1 C Internal")) {
                    $dev->setTemperatur($temperatur);
                }
            }
            // Outages
            if (preg_match('/^NUMXFERS\s*:\s*(.*)$/m', $ups, $data)) {
                $dev->setOutages(trim($data[1]));
            }
            if (preg_match('/^LASTXFER\s*:\s*(.*)$/m', $ups, $data)) {
                $dev->setLastOutage(trim($data[1]));
            }
            if (preg_match('/^XOFFBATT\s*:\s*(.*)$/m', $ups, $data)) {
                $dev->setLastOutageFinish(trim($data[1]));
            }
            // Line
            if (preg_match('/^LINEV\s*:\s*(\d*\.\d*)(.*)$/m', $ups, $data)) {
                $dev->setLineVoltage(trim($data[1]));
            }
            if (preg_match('/^LINEFREQ\s*:\s*(\d*\.\d*)(.*)$/m', $ups, $data)) {
                $dev->setLineFrequency(trim($data[1]));
            }
            if (preg_match('/^LOADPCT\s*:\s*(\d*\.\d*)(.*)$/m', $ups, $data)) {
                $dev->setLoad(trim($data[1]));
            }
            // Battery
            if (preg_match('/^BATTDATE\s*:\s*(.*)$/m', $ups, $data)) {
                $dev->setBatteryDate(trim($data[1]));
            }
            if (preg_match('/^BATTV\s*:\s*(\d*\.\d*)(.*)$/m', $ups, $data)) {
                $dev->setBatteryVoltage(trim($data[1]));
            }
            if (preg_match('/^BCHARGE\s*:\s*(\d*\.\d*)(.*)$/m', $ups, $data)) {
                $dev->setBatterCharge(trim($data[1]));
            }
            if (preg_match('/^TIMELEFT\s*:\s*(\d*\.\d*)(.*)$/m', $ups, $data)) {
                $dev->setTimeLeft(trim($data[1]));
            }
            $this->upsinfo->setUpsDevices($dev);
        }
    }
64145
protected function _cpuinfo()
    {
        if (CommonFunctions::rfts('/proc/cpuinfo', $bufr, 0, 4096, false)) {
            $processors = preg_split('/\s?\n\s?\n/', trim($bufr));
            foreach ($processors as $processor) {
                $_n = ""; $_f = ""; $_m = ""; $_s = "";
                $dev = new CpuDevice();
                $details = preg_split("/\n/", $processor, -1, PREG_SPLIT_NO_EMPTY);
                foreach ($details as $detail) {
                    $arrBuff = preg_split('/\s+:\s+/', trim($detail));
                    if (count($arrBuff) == 2) {
                        switch (strtolower($arrBuff[0])) {
                        case 'model name':
                            $_n = $arrBuff[1];
                            break;
                        case 'cpu mhz':
                            $dev->setCpuSpeed($arrBuff[1]);
                            break;
                        case 'cpu family':
                            $_f = $arrBuff[1];
                            break;
                        case 'model':
                            $_m = $arrBuff[1];
                            break;
                        case 'stepping':
                            $_s = $arrBuff[1];
                            break;
                        case 'flags':
                            if (preg_match("/ vmx/", $arrBuff[1])) {
                                $dev->setVirt("vmx");
                            } elseif (preg_match("/ svm/", $arrBuff[1])) {
                                $dev->setVirt("svm");
                            }
                        break;
                        }
                    }
                }
                if ($_n == "") $_n="CPU";
                if ($_f != "") $_n.=" Family ".$_f;
                if ($_m != "") $_n.=" Model ".$_m;
                if ($_s != "") $_n.=" Stepping ".$_s;
                $dev->SetModel($_n);
                $this->sys->setCpus($dev);
            }
        } else
        foreach ($this->readdmesg() as $line) {
            if (preg_match('/kernel: (CPU .*) freq (.*) MHz/', $line, $ar_buf)) {
                $dev = new CpuDevice();
                $dev->setModel($ar_buf[1]);
                $dev->setCpuSpeed($ar_buf[2]);
                $this->sys->setCpus($dev);
            }
        }
    }
685807
public function getUserInfo()
    {
        $userinfo = $this->getUser();

        $pass = $this->getPassword();
        if ('' != $pass) {
            $userinfo .= ":$pass";
        }

        return $userinfo;
    }
1040086
public function getAccountInformation() {
    $url = $this->url . self::$API_ROUTES['ACCOUNT_INFO'];
    $url .= '?apiVersion=' . $this->apiVersion;

    $result = $this->doGet($url, array(), false);

    if ($result !== null && is_object($result)) {
      $accountInfo = AccountInformation::getFromJson($result);

      if ($accountInfo != null) {
        return $accountInfo;
      }
    }

    return null;
  }
826992
public function getInfo() {
		$info = $this->createInfoset()
			->setName('Php engine')
			->setIcon('elephant');
		
		$this->createTitle($info);
		$this->engineInfo($info);
		$this->extensionsInfo($info);
		
		return $info;
	}
647684
public function collect()
    {
        return new Value\HardwareSystemInfo([
            'cpuType' => $this->ezcSystemInfo->cpuType,
            'cpuSpeed' => $this->ezcSystemInfo->cpuSpeed,
            'cpuCount' => $this->ezcSystemInfo->cpuCount,
            'memorySize' => $this->ezcSystemInfo->memorySize,
        ]);
    }
447063
public function getInfo()
    {
        $request = new GetGroupInfoRequest([$this->groupId]);
        $response = new GetGroupInfoResponse();
        return $this->client->sendRequest($request, $response);
    }
882508
public function getFans($limit=null, $filter = null)
    {
        if($this->oFans == null){
            $this->setFans(self::getManager()->findFans($this->id, $page=1, $filter, $limit));
        }

        return $this->oFans;
    }
42969
public static function getInfos(){
                
                
		//subfolder shall be detected as /SUBFLODERS/tao/install/index.php so we remove the "/extension/module/action" part:
        $subfolder = $_SERVER['REQUEST_URI'];
        $subfolder = preg_replace('/\/(([^\/]*)\/){2}([^\/]*)$/', '', $subfolder);
        $subfolder = preg_replace('/^\//', '', $subfolder);
        
        return array(
			'folder'	=> $subfolder,
			'host'		=> $_SERVER['HTTP_HOST'],
			'https'		=> ($_SERVER['SERVER_PORT'] == 443) 
		);
	}
1091950
public function getSystemLoadInfo()
    {
        $cpuMemDto = new CpuMemDto();

        $cpuMemDto = $this->getMemFree($cpuMemDto);
        $cpuMemDto = $this->getCpuIdle($cpuMemDto);

        return $cpuMemDto;
    }
1059753
public function getFileInfo()
    {
        $fullName = $this->getSetting('storeUrl') . '/' . str_replace('\\', '/', $this->fullName);
        return [
            "state" => $this->stateInfo,
            "url" => $fullName,
            "title" => $this->oriName,
            "original" => $this->oriName,
            "type" => $this->fileType,
            "size" => $this->fileSize
        ];
    }
512017
public function getData()
    {
        // Prepare the output array
        $output = [];
        
        // Get the customer groups
        $customerGroups = $this->customerGroup->toOptionArray();

        // Get users for each group
        foreach ($customerGroups as $customerGroup) {

            $collection = $this->customerCollectionFactory->create();
            $collection->addFieldToFilter('group_id', $customerGroup['value']);

            $options = [];
            foreach ($collection as $user) {
                $options[] = [
                    'label' => $user->getFirstname() . " " . $user->getLastname(),
                    'value' => $user->getEntityId()
                ];
            }

            // Add the options to the subgroup
            $subGroup = [
                'label' => $customerGroup['label'],
                'value' => $options
            ];

            // Add the subgroup to the stack
            $output[] = $subGroup;
        }

        return $output;
    }
1229880
private function getProjectInfo(){
		$pjInfo = array();

		$allData = $this->px2query(
			$this->page_path.'?PX=px2dthelper.get.all',
			array(
				"output" => "json"
			)
		);

		$pjInfo['conf'] = $allData->config;
		$pjInfo['pageInfo'] = $allData->page_info;
		$pjInfo['contRoot'] = $allData->path_controot;
		$pjInfo['documentRoot'] = $allData->realpath_docroot;
		$pjInfo['realpathFiles'] = $allData->realpath_files;
		$pjInfo['pathFiles'] = $allData->path_files;
		$pjInfo['realpathThemeCollectionDir'] = $allData->realpath_theme_collection_dir;
		$pjInfo['realpathDataDir'] = $allData->realpath_data_dir;
		$pjInfo['pathResourceDir'] = $allData->path_resource_dir;
		$pjInfo['realpath_homedir'] = $allData->realpath_homedir;

		// var_dump($pjInfo);
		return $pjInfo;
	}
170942
public function getInfo() {
		$info  = $this->createInfoset();
		$files = $this->getIncludedFiles();
		
		$info->setIcon('script')
		     ->setName('Included files')
		     ->setTitle(count($files) . ' Files');
		
		$this->createContent($info);
		
		return $info;
	}