<commit_before><!doctype html>
<!--
  Material Design Lite
  Copyright 2015 Google Inc. All rights reserved.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      https://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License
-->
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="A front-end template that helps you build fast, modern mobile web apps.">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>HomeLab Dashboard</title>

    <!-- Add to homescreen for Chrome on Android -->
    <meta name="mobile-web-app-capable" content="yes">
    <link rel="icon" sizes="192x192" href="images/android-desktop.png">

    <!-- Add to homescreen for Safari on iOS -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-title" content="Material Design Lite">
    <link rel="apple-touch-icon-precomposed" href="images/ios-desktop.png">

    <!-- Tile icon for Win8 (144x144 + tile color) -->
    <meta name="msapplication-TileImage" content="images/touch/ms-touch-icon-144x144-precomposed.png">
    <meta name="msapplication-TileColor" content="#3372DF">

    <link rel="shortcut icon" href="images/favicon.png">

    <!-- SEO: If your mobile URL is different from the desktop URL, add a canonical link to the desktop page https://developers.google.com/webmasters/smartphone-sites/feature-phones -->
    <!--
    <link rel="canonical" href="http://www.example.com/">
    -->

    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&amp;lang=en">
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
    <link rel="stylesheet" href="https://code.getmdl.io/1.1.1/material.cyan-light_blue.min.css">
    <link rel="stylesheet" href="styles.css">
    <style>
    #view-source {
      position: fixed;
      display: block;
      right: 0;
      bottom: 0;
      margin-right: 40px;
      margin-bottom: 40px;
      z-index: 900;
    }

    </style>
  </head>
  <body>

<?php
function GetServerStatus($site, $port)
{
$status = array("<span class='online'>Online</span>", "<span class='offline'>Offline</span>");
 $fp = @fsockopen($site, $port, $errno, $errstr, 2);
 if (!$fp) {
    return $status[1];
  } else  { return $status[0];}
 }
?>

<?php

/* get disk space free (in bytes) */
$df = disk_free_space("/");
/* and get disk space total (in bytes)  */
$dt = disk_total_space("/");
/* now we calculate the disk space used (in bytes) */
$du = $dt - $df;
/* percentage of disk used - this will be used to also set the width % of the progress bar */
$dp = sprintf('%.2f',($du / $dt) * 100);

/* and we formate the size from bytes to MB, GB, etc. */
$df = formatSize($df);
$du = formatSize($du);
$dt = formatSize($dt);

function formatSize( $bytes )
{
        $types = array( 'B', 'KB', 'MB', 'GB', 'TB' );
        for( $i = 0; $bytes >= 1024 && $i < ( count( $types ) -1 ); $bytes /= 1024, $i++ );
                return( round( $bytes, 2 ) . " " . $types[$i] );
}

?>

<style>

.online {
  padding: 2px 5px 2px 5px;
  margin: 0;
  display: inline;
  background: green;
  color: white;
}

.offline {
  padding: 2px 5px 2px 5px;
  margin: 0;
  display: inline;
  background: darkred;
  color: white;
}

.progress {
        border: 2px solid #5E96E4;
        height: 32px;
        width: 100%;
        margin: 30px auto;
}
.progress .prgbar {
        background: #A7C6FF;
        width: <?php echo $dp; ?>%;
        position: relative;
        height: 32px;
        z-index: 999;
}
.progress .prgtext {
        color: #286692;
        text-align: center;
        font-size: 13px;
        padding: 9px 0 0;
        width: 100%;
        position: absolute;
        z-index: 1000;
}
.progress .prginfo {
        margin: 3px 0;
}

</style>

    <div class="demo-layout mdl-layout mdl-js-layout mdl-layout--fixed-drawer mdl-layout--fixed-header">
      <header class="demo-header mdl-layout__header mdl-color--grey-100 mdl-color-text--grey-600">
        <div class="mdl-layout__header-row">
          <span class="mdl-layout-title">HomeLab Dashboard</span>
          <div class="mdl-layout-spacer"></div>
          <div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable">
          </div>
          <button class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon" id="hdrbtn">
            <i class="material-icons">more_vert</i>
          </button>
          <ul class="mdl-menu mdl-js-menu mdl-js-ripple-effect mdl-menu--bottom-right" for="hdrbtn">
            <a class="mdl-navigation__link" href=""><li class="mdl-menu__item">About</li>
            <a class="mdl-navigation__link" href=""><li class="mdl-menu__item">Contact</li>
          </ul>
        </div>
      </header>
      <div class="demo-drawer mdl-layout__drawer mdl-color--blue-grey-900 mdl-color-text--blue-grey-50">
        <header class="demo-drawer-header">
          <img src="images/user.jpg" class="demo-avatar">
          <div class="Resorce Links">
            <span>HomeLab</span>
            <div class="mdl-layout-spacer"></div>
          </div>
        </header>
        <nav class="demo-navigation mdl-navigation mdl-color--blue-grey-800">
          <a class="mdl-navigation__link" href="http://192.168.0.2"><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">storage</i>Unraid</a>
          <a class="mdl-navigation__link" href="http://192.168.0.2:32400/web/index.html"><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">play_circle_filled</i>Plex</a>
          <a class="mdl-navigation__link" href="http://192.168.0.2:8181"><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">visibility</i>PlexPy</a>
          <a class="mdl-navigation__link" href="http://192.168.0.3:8112"><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">swap_vertical_circle</i>Deluge</a>
          <a class="mdl-navigation__link" href="http://192.168.0.3:5050"><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">weekend</i>CouchPotato</a>
          <a class="mdl-navigation__link" href="http://192.168.0.3:8989"><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">fiber_dvr</i>Sonarr</a>
          <div class="mdl-layout-spacer"></div>
          <a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">help_outline</i><span class="visuallyhidden">Help</span></a>
        </nav>
      </div>
      <main class="mdl-layout__content mdl-color--grey-100">
        <div class="mdl-grid demo-content">
          <div class="demo-charts mdl-color--white mdl-shadow--2dp mdl-cell mdl-cell--12-col mdl-grid">
            <div class='progress'>
      		  <div class='prgtext'><?php echo $dp; ?>% Disk Used</div>
      		  <div class='prgbar'></div>
      		  <div class='prginfo'>
                <span style='float: left;'><?php echo "$du Used - $df Free - $dt Total"; ?></span>
                <span style='clear: both;'></span>
	</div>
	</div>
          </div>
          <div class="demo-graphs mdl-shadow--2dp mdl-color--white mdl-cell mdl-cell--8-col">
            <svg fill="currentColor" viewBox="0 0 500 250" class="demo-graph">
              <use xlink:href="#chart" />
            </svg>
            <svg fill="currentColor" viewBox="0 0 500 250" class="demo-graph">
              <use xlink:href="#chart" />
            </svg>
          </div>
          <div class="demo-cards mdl-cell mdl-cell--4-col mdl-cell--8-col-tablet mdl-grid mdl-grid--no-spacing">
            <div class="demo-updates mdl-card mdl-shadow--2dp mdl-cell mdl-cell--4-col mdl-cell--4-col-tablet mdl-cell--12-col-desktop">
              <div class="mdl-card__title mdl-card--expand mdl-color--teal-300">
                <h2 class="mdl-card__title-text">Services</h2>
              </div>
              <div class="mdl-card__supporting-text mdl-color-text--grey-600">
		 <div>Storage Server</div>
                 <div>UnRaid: <?php echo GetServerStatus('google.com',80); ?></div>
		 <div>Plex: <?php echo GetServerStatus('192.168.0.2',34200); ?></div>
		 <div>PlexPy: <?php echo GetServerStatus('192.168.0.2',8181); ?></div>
		 <div>SeedBox</div>
                 <div>Deluge: <?php echo GetServerStatus('192.168.0.3',8112); ?></div>
		 <div>Sonarr: <?php echo GetServerStatus('192.168.0.3',8989); ?></div>
		 <div>CouchPotato: <?php echo GetServerStatus('192.168.0.3',5050); ?></div>

              </div>
            </div>
            <div class="demo-separator mdl-cell--1-col"></div>
              <div class="mdl-card__title mdl-card--expand mdl-color--teal-300">
                <h2 class="mdl-card__title-text">Equipment</h2>
              </div>
              <div class="mdl-card__supporting-text mdl-color-text--grey-600">
		 <div>Storage Server</div>
                 <div>UnRaid: <?php echo GetServerStatus('google.com',80); ?></div>
		 <div>Plex: <?php echo GetServerStatus('192.168.0.2',34200); ?></div>
		 <div>PlexPy: <?php echo GetServerStatus('192.168.0.2',8181); ?></div>
		 <div>SeedBox</div>
                 <div>Deluge: <?php echo GetServerStatus('192.168.0.3',8112); ?></div>
		 <div>Sonarr: <?php echo GetServerStatus('192.168.0.3',8989); ?></div>
		 <div>CouchPotato: <?php echo GetServerStatus('192.168.0.3',5050); ?></div>

              </div>
            </div>

          </div><commit_msg>testing<commit_after><!doctype html>
<!--
  Material Design Lite
  Copyright 2015 Google Inc. All rights reserved.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      https://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License
-->
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="A front-end template that helps you build fast, modern mobile web apps.">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>HomeLab Dashboard</title>

    <!-- Add to homescreen for Chrome on Android -->
    <meta name="mobile-web-app-capable" content="yes">
    <link rel="icon" sizes="192x192" href="images/android-desktop.png">

    <!-- Add to homescreen for Safari on iOS -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-title" content="Material Design Lite">
    <link rel="apple-touch-icon-precomposed" href="images/ios-desktop.png">

    <!-- Tile icon for Win8 (144x144 + tile color) -->
    <meta name="msapplication-TileImage" content="images/touch/ms-touch-icon-144x144-precomposed.png">
    <meta name="msapplication-TileColor" content="#3372DF">

    <link rel="shortcut icon" href="images/favicon.png">

    <!-- SEO: If your mobile URL is different from the desktop URL, add a canonical link to the desktop page https://developers.google.com/webmasters/smartphone-sites/feature-phones -->
    <!--
    <link rel="canonical" href="http://www.example.com/">
    -->

    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&amp;lang=en">
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
    <link rel="stylesheet" href="https://code.getmdl.io/1.1.1/material.cyan-light_blue.min.css">
    <link rel="stylesheet" href="styles.css">
    <style>
    #view-source {
      position: fixed;
      display: block;
      right: 0;
      bottom: 0;
      margin-right: 40px;
      margin-bottom: 40px;
      z-index: 900;
    }

    </style>
  </head>
  <body>

<?php
function GetServerStatus($site, $port)
{
$status = array("<span class='online'>Online</span>", "<span class='offline'>Offline</span>");
 $fp = @fsockopen($site, $port, $errno, $errstr, 2);
 if (!$fp) {
    return $status[1];
  } else  { return $status[0];}
 }
?>

<?php

/* get disk space free (in bytes) */
$df = disk_free_space("/");
/* and get disk space total (in bytes)  */
$dt = disk_total_space("/");
/* now we calculate the disk space used (in bytes) */
$du = $dt - $df;
/* percentage of disk used - this will be used to also set the width % of the progress bar */
$dp = sprintf('%.2f',($du / $dt) * 100);

/* and we formate the size from bytes to MB, GB, etc. */
$df = formatSize($df);
$du = formatSize($du);
$dt = formatSize($dt);

function formatSize( $bytes )
{
        $types = array( 'B', 'KB', 'MB', 'GB', 'TB' );
        for( $i = 0; $bytes >= 1024 && $i < ( count( $types ) -1 ); $bytes /= 1024, $i++ );
                return( round( $bytes, 2 ) . " " . $types[$i] );
}

?>

<style>

.online {
  padding: 2px 5px 2px 5px;
  margin: 0;
  display: inline;
  background: green;
  color: white;
}

.offline {
  padding: 2px 5px 2px 5px;
  margin: 0;
  display: inline;
  background: darkred;
  color: white;
}

.progress {
        border: 2px solid #5E96E4;
        height: 32px;
        width: 100%;
        margin: 30px auto;
}
.progress .prgbar {
        background: #A7C6FF;
        width: <?php echo $dp; ?>%;
        position: relative;
        height: 32px;
        z-index: 999;
}
.progress .prgtext {
        color: #286692;
        text-align: center;
        font-size: 13px;
        padding: 9px 0 0;
        width: 100%;
        position: absolute;
        z-index: 1000;
}
.progress .prginfo {
        margin: 3px 0;
}

</style>

    <div class="demo-layout mdl-layout mdl-js-layout mdl-layout--fixed-drawer mdl-layout--fixed-header">
      <header class="demo-header mdl-layout__header mdl-color--grey-100 mdl-color-text--grey-600">
        <div class="mdl-layout__header-row">
          <span class="mdl-layout-title">HomeLab Dashboard</span>
          <div class="mdl-layout-spacer"></div>
          <div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable">
          </div>
          <button class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon" id="hdrbtn">
            <i class="material-icons">more_vert</i>
          </button>
          <ul class="mdl-menu mdl-js-menu mdl-js-ripple-effect mdl-menu--bottom-right" for="hdrbtn">
            <a class="mdl-navigation__link" href=""><li class="mdl-menu__item">About</li>
            <a class="mdl-navigation__link" href=""><li class="mdl-menu__item">Contact</li>
          </ul>
        </div>
      </header>
      <div class="demo-drawer mdl-layout__drawer mdl-color--blue-grey-900 mdl-color-text--blue-grey-50">
        <header class="demo-drawer-header">
          <img src="images/user.jpg" class="demo-avatar">
          <div class="Resorce Links">
            <span>HomeLab</span>
            <div class="mdl-layout-spacer"></div>
          </div>
        </header>
        <nav class="demo-navigation mdl-navigation mdl-color--blue-grey-800">
          <a class="mdl-navigation__link" href="http://192.168.0.2"><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">storage</i>Unraid</a>
          <a class="mdl-navigation__link" href="http://192.168.0.2:32400/web/index.html"><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">play_circle_filled</i>Plex</a>
          <a class="mdl-navigation__link" href="http://192.168.0.2:8181"><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">visibility</i>PlexPy</a>
          <a class="mdl-navigation__link" href="http://192.168.0.3:8112"><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">swap_vertical_circle</i>Deluge</a>
          <a class="mdl-navigation__link" href="http://192.168.0.3:5050"><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">weekend</i>CouchPotato</a>
          <a class="mdl-navigation__link" href="http://192.168.0.3:8989"><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">fiber_dvr</i>Sonarr</a>
          <div class="mdl-layout-spacer"></div>
          <a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">help_outline</i><span class="visuallyhidden">Help</span></a>
        </nav>
      </div>
      <main class="mdl-layout__content mdl-color--grey-100">
        <div class="mdl-grid demo-content">
          <div class="demo-charts mdl-color--white mdl-shadow--2dp mdl-cell mdl-cell--12-col mdl-grid">
            <div class='progress'>
      		  <div class='prgtext'><?php echo $dp; ?>% Disk Used</div>
      		  <div class='prgbar'></div>
      		  <div class='prginfo'>
                <span style='float: left;'><?php echo "$du Used - $df Free - $dt Total"; ?></span>
                <span style='clear: both;'></span>
	</div>
	</div>
          </div>
          <div class="demo-graphs mdl-shadow--2dp mdl-color--white mdl-cell mdl-cell--8-col">
            <svg fill="currentColor" viewBox="0 0 500 250" class="demo-graph">
              <use xlink:href="#chart" />
            </svg>
            <svg fill="currentColor" viewBox="0 0 500 250" class="demo-graph">
              <use xlink:href="#chart" />
            </svg>
          </div>
          <div class="demo-cards mdl-cell mdl-cell--4-col mdl-cell--8-col-tablet mdl-grid mdl-grid--no-spacing">
            <div class="demo-updates mdl-card mdl-shadow--2dp mdl-cell mdl-cell--4-col mdl-cell--4-col-tablet mdl-cell--12-col-desktop">
              <div class="mdl-card__title mdl-card--expand mdl-color--teal-300">
                <h2 class="mdl-card__title-text">Services</h2>
              </div>
              <div class="mdl-card__supporting-text mdl-color-text--grey-600">
		 <div>Storage Server</div>
                 <div>UnRaid: <?php echo GetServerStatus('google.com',80); ?></div>
		 <div>Plex: <?php echo GetServerStatus('192.168.0.2',34200); ?></div>
		 <div>PlexPy: <?php echo GetServerStatus('192.168.0.2',8181); ?></div>
		 <div>SeedBox</div>
                 <div>Deluge: <?php echo GetServerStatus('192.168.0.3',8112); ?></div>
		 <div>Sonarr: <?php echo GetServerStatus('192.168.0.3',8989); ?></div>
		 <div>CouchPotato: <?php echo GetServerStatus('192.168.0.3',5050); ?></div>

              </div>
            </div>
            <div class="demo-separator mdl-cell--1-col"></div>
            <div class="demo-options mdl-card mdl-shadow--2dp mdl-cell mdl-cell--4-col mdl-cell--4-col-tablet mdl-cell--12-col-desktop">
              <div class="mdl-card__title mdl-card--expand mdl-color--teal-300">
                <h2 class="mdl-card__title-text">Equipment</h2>
              </div>
              <div class="mdl-card__supporting-text mdl-color-text--grey-600">
		 <div>Storage Server</div>
                 <div>UnRaid: <?php echo GetServerStatus('google.com',80); ?></div>
		 <div>Plex: <?php echo GetServerStatus('192.168.0.2',34200); ?></div>
		 <div>PlexPy: <?php echo GetServerStatus('192.168.0.2',8181); ?></div>
		 <div>SeedBox</div>
                 <div>Deluge: <?php echo GetServerStatus('192.168.0.3',8112); ?></div>
		 <div>Sonarr: <?php echo GetServerStatus('192.168.0.3',8989); ?></div>
		 <div>CouchPotato: <?php echo GetServerStatus('192.168.0.3',5050); ?></div>

              </div>
            </div>

          </div>
{'fraction_non_alphanumeric': 0.17721456449780149, 'fraction_numerical': 0.03878266884047231, 'mean_word_length': 2.8417156955779084, 'pattern_counts': {'":': 0, '<': 404, '<?xml version=': 0, '>': 404, 'https://': 10, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 32, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5024433', 'n_tokens_mistral': 7438, 'n_tokens_neox': 6799, 'n_words': 1439}