<commit_before><!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="<NAME>">

    <title>Adv Log</title>

    <link href="css/bootstrap.css" rel="stylesheet">
    <link href="css/pages.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>
    
   <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="index.php">Advertising Logging</a>
        </div>
        <div class="navbar-collapse collapse">
        </div><!--/.navbar-collapse -->
      </div>
    </div>

    <div class="jumbotron">
      <div class="container">
		<br>
		<table class='table'>
			<tr><th>Log entries</th><td><span id='entries'></span></td></tr>
			<tr><th>Log entries today</th><td><span id='entriesToday'></span></td></tr>
			<tr><th>Active users</th><td><span id='activeUsers'></span></td></tr>
		</table>
      </div>
    </div>

    <div class="container" style="height: 100%">
		<table class='table table-bordered table-condensed table-striped' id='apps'>
		</table>
		<!--
		<div class="panel panel-default">
		  <div class="panel-heading">Countries</div>
		  <div class="panel-body">
			<table class='table table-striped'>
				<tr><th>App</th><th>Countries</th></tr>

			</table>
		 </div>
		</div>-->
    </div>
	<br>

    <script src="js/jquery-1.10.2.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
	<script>
		var firstRun = true;
		var oldData = null;


		function valueDiff (old, cur)
		{
			if (cur > old)
				return cur+' <small><span class="label label-success">'+(cur-old)+'</span></small>';
			else if (cur < old)
				return cur+' <small><span class="label label-danger">'+(cur-old)+'</span></small>';
			else
				return cur;
		}

		function update ()
		{
			//http://sagregna.it/advlog/log_json.php
			$.getJSON ('log_json.php', {})
				.done (function (data) 
				{
					if (oldData == null)
					{
						oldData = data;
						return;
					}

					$('#entries').html (valueDiff (oldData.entries, data.entries));
					$('#entriesToday').html (valueDiff (oldData.entriesToday, data.entriesToday));
					$('#activeUsers').html (valueDiff (oldData.activeUsers, data.activeUsers));


					var apptab = '<tr><th>App</th><th>Imps</th><th>Clicks</th><th>TImp</th><th>TClick</th><th>Active</th></tr>';

					$.each(data.apps, function(i, item) 
					{
						apptab += '<tr>';
						apptab += '<td>'+item.name+'</td>';
						apptab += '<td>'+valueDiff(item.imp, data.apps[i].imp)+'</td>';
						apptab += '<td>'+valueDiff(item.click, data.apps[i].click)+'</td>';
						apptab += '<td>'+valueDiff(item.todayImp, data.apps[i].todayImp)+'</td>';
						apptab += '<td>'+valueDiff(item.todayClick, data.apps[i].todayClick)+'</td>';
						apptab += '<td>'+valueDiff(item.activeUsers, data.apps[i].activeUsers)+'</td>';
						apptab += '</tr>';
					});

					$('#apps').html (apptab);

					oldData = data;
				})
				.fail (function (jqxhr, textStatus, error) 
				{
					var err = textStatus + ", " + error;
					console.log( "Request Failed: " + err );
				});
		}
		
		window.setInterval(update, 5000);	
		update ();
		update ();
	</script>

  </body>
</html>
<commit_msg>clean<commit_after><!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="<NAME>">

    <title>Adv Log</title>

    <link href="css/bootstrap.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>
    
   <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="index.php">Advertising Logging</a>
        </div>
        <div class="navbar-collapse collapse">
        </div><!--/.navbar-collapse -->
      </div>
    </div>

    <div class="jumbotron">
      <div class="container">
		<br>
		<table class='table'>
			<tr><th>Log entries</th><td><span id='entries'></span></td></tr>
			<tr><th>Log entries today</th><td><span id='entriesToday'></span></td></tr>
			<tr><th>Active users</th><td><span id='activeUsers'></span></td></tr>
		</table>
      </div>
    </div>

    <div class="container" style="height: 100%">
		<table class='table table-bordered table-condensed table-striped' id='apps'>
		</table>
		<!--
		<div class="panel panel-default">
		  <div class="panel-heading">Countries</div>
		  <div class="panel-body">
			<table class='table table-striped'>
				<tr><th>App</th><th>Countries</th></tr>

			</table>
		 </div>
		</div>-->
    </div>
	<br>

    <script src="js/jquery-1.10.2.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
	<script>
		var firstRun = true;
		var oldData = null;

		function valueDiff (old, cur)
		{
			if (cur > old)
				return cur+' <small><span class="label label-success">'+(cur-old)+'</span></small>';
			else if (cur < old)
				return cur+' <small><span class="label label-danger">'+(cur-old)+'</span></small>';
			else
				return cur;
		}

		function update ()
		{
			$.getJSON ('log_json.php', {})
				.done (function (data) 
				{
					if (oldData == null)
					{
						oldData = data;
						return;
					}

					$('#entries').html (valueDiff (oldData.entries, data.entries));
					$('#entriesToday').html (valueDiff (oldData.entriesToday, data.entriesToday));
					$('#activeUsers').html (valueDiff (oldData.activeUsers, data.activeUsers));


					var apptab = '<tr><th>App</th><th>Imps</th><th>Clicks</th><th>TImp</th><th>TClick</th><th>Active</th></tr>';

					$.each(data.apps, function(i, item) 
					{
						apptab += '<tr>';
						apptab += '<td>'+item.name+'</td>';
						apptab += '<td>'+valueDiff(item.imp, data.apps[i].imp)+'</td>';
						apptab += '<td>'+valueDiff(item.click, data.apps[i].click)+'</td>';
						apptab += '<td>'+valueDiff(item.todayImp, data.apps[i].todayImp)+'</td>';
						apptab += '<td>'+valueDiff(item.todayClick, data.apps[i].todayClick)+'</td>';
						apptab += '<td>'+valueDiff(item.activeUsers, data.apps[i].activeUsers)+'</td>';
						apptab += '</tr>';
					});

					$('#apps').html (apptab);

					oldData = data;
				})
				.fail (function (jqxhr, textStatus, error) 
				{
					var err = textStatus + ", " + error;
					console.log( "Request Failed: " + err );
				});
		}

	
		window.setInterval(update, 10000);	
		update ();
		update ();
	</script>

  </body>
</html>

{'fraction_non_alphanumeric': 0.2200578107326882, 'fraction_numerical': 0.006660801809727284, 'mean_word_length': 3.0457549567869853, 'pattern_counts': {'":': 0, '<': 280, '<?xml version=': 0, '>': 280, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '6011227', 'n_tokens_mistral': 3227, 'n_tokens_neox': 2742, 'n_words': 486}