<commit_before><html>
  <head>
    <link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.2.1/pure-min.css">
    <link href='http://fonts.googleapis.com/css?family=Maven+Pro:400,500,700' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Give+You+Glory' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,400,600,300' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Esteban' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Flavors' rel='stylesheet' type='text/css'>
    <link href="css/regular/style.css" rel="stylesheet" type="text/css">
    <link href="css/global.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">
    
    function getLoadAndPaintShit() {
      $.ajax('/api/load', { dataType: 'json' }).done(function(response) {
        console.log(response);
        var loadTable = [];   
        loadTable[0] = ['Index', '1m', '5m', '15m'];
        if (response.l < 50) {
          for (var i = 0; i < 50 - response.l; i++) {
            loadEntry = [
              i,
              0.0,
              0.0,
              0.0
            ]
            loadTable.push(loadEntry);
          }
        }
        for (var i = 0; i < response.l; i++) {
          loadEntry = [
            i + (50 - response.l),
            response.load[i]['1min'],
            response.load[i]['5min'],
            response.load[i]['15min']
          ];

          loadTable.push(loadEntry);
        }

        var options = {
          curveType: 'function',
          fontName: 'maven pro',
          vAxis: {
            maxValue: 3.0,
            minValue: 0.0,
            gridlines: {
              count: 16,
              color: '#f6f6f6'
            }
          },
          hAxis: {
            gridlines: {
              color: '#f6f6f6'
            }
          },
          colors: ['#ff2d55', '#5ac8fa', '#4cd964']
        };
        var chartData = google.visualization.arrayToDataTable(loadTable);
        var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
        chart.draw(chartData, options);

        if (!refresh) {
          refresh = setInterval(getLoadAndPaintShit, 2000);
        }
        
      });
    };

    function getMemInfoAndBakePie() {
      $.ajax('/api/mem_info', { dataType: 'json' }).done(function(response) {
        console.log(response);
        var memTable = [];
        memTable[0] = ['Type', 'MB'];
        memTable[1] = ['Free', response.mem_info[response.l - 1]['free']];
        memTable[2] = ['Active', response.mem_info[response.l - 1]['active']]; 
        memTable[3] = ['Inactive', response.mem_info[response.l - 1]['inactive']]; 
        memTable[4] = ['Wired', response.mem_info[response.l - 1]['wired']]; 
        var pieData = google.visualization.arrayToDataTable(memTable);
        var options = {
          colors: ['#ff2d55', '#5ac8fa', '#4cd964', '#ffcc00'],
          pieSliceText: 'value',
          fontName: 'maven pro'
        };
        var chart = new google.visualization.PieChart(document.getElementById('memory_pie'));
        chart.draw(pieData, options);
        
        if (!pie_refresh) {
          pie_refresh = setInterval(getMemInfoAndBakePie, 3000); 
        }

      }); 
    }

    function getMemInfoAndPaintLayers() {
      $.ajax('/api/mem_info', { dataType: 'json' }).done(function(response) {
        var memTable = [];
        memTable[0] = ['Index', 'Wired', 'Active', 'Inactive', 'Free'];
        for (var i = 0; i < response.l; i++) {
          memEntry = [
            i,
            response.mem_info[i]['wired'],
            response.mem_info[i]['active'],
            response.mem_info[i]['inactive'],
            response.mem_info[i]['free']
          ];
          console.log("memEntry " + i + ": " + memEntry);
          memTable.push(memEntry);
        }<commit_msg>Piechart does a Linux ^ OSX check to paint the right stuff.<commit_after><html>
  <head>
    <link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.2.1/pure-min.css">
    <link href='http://fonts.googleapis.com/css?family=Maven+Pro:400,500,700' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Give+You+Glory' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,400,600,300' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Esteban' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Flavors' rel='stylesheet' type='text/css'>
    <link href="css/regular/style.css" rel="stylesheet" type="text/css">
    <link href="css/global.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">
    
    function getLoadAndPaintShit() {
      $.ajax('/api/load', { dataType: 'json' }).done(function(response) {
        console.log(response);
        var loadTable = [];   
        loadTable[0] = ['Index', '1m', '5m', '15m'];
        if (response.l < 50) {
          for (var i = 0; i < 50 - response.l; i++) {
            loadEntry = [
              i,
              0.0,
              0.0,
              0.0
            ]
            loadTable.push(loadEntry);
          }
        }
        for (var i = 0; i < response.l; i++) {
          loadEntry = [
            i + (50 - response.l),
            response.load[i]['1min'],
            response.load[i]['5min'],
            response.load[i]['15min']
          ];

          loadTable.push(loadEntry);
        }

        var options = {
          curveType: 'function',
          fontName: 'maven pro',
          vAxis: {
            maxValue: 3.0,
            minValue: 0.0,
            gridlines: {
              count: 16,
              color: '#f6f6f6'
            }
          },
          hAxis: {
            gridlines: {
              color: '#f6f6f6'
            }
          },
          colors: ['#ff2d55', '#5ac8fa', '#4cd964']
        };
        var chartData = google.visualization.arrayToDataTable(loadTable);
        var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
        chart.draw(chartData, options);

        if (!refresh) {
          refresh = setInterval(getLoadAndPaintShit, 2000);
        }
        
      });
    };

    function getMemInfoAndBakePie() {
      $.ajax('/api/mem_info', { dataType: 'json' }).done(function(response) {
        console.log(response);
        var memTable = [];
        memTable[0] = ['Type', 'MB'];
        if (response.mem_info[0].hasOwnProperty('cached')) {
          /* Linux. */
          memTable[1] = ['Free', response.mem_info[response.l - 1]['free']];
          memTable[2] = ['Used', response.mem_info[response.l - 1]['used']]; 
          memTable[3] = ['Cached', response.mem_info[response.l - 1]['cached']]; 
        } else {
          /* OSX */
          memTable[1] = ['Free', response.mem_info[response.l - 1]['free']];
          memTable[2] = ['Active', response.mem_info[response.l - 1]['active']]; 
          memTable[3] = ['Inactive', response.mem_info[response.l - 1]['inactive']]; 
          memTable[4] = ['Wired', response.mem_info[response.l - 1]['wired']]; 
        }
        var pieData = google.visualization.arrayToDataTable(memTable);
        var options = {
          colors: ['#ff2d55', '#5ac8fa', '#4cd964', '#ffcc00'],
          pieSliceText: 'value',
          fontName: 'maven pro'
        };
        var chart = new google.visualization.PieChart(document.getElementById('memory_pie'));
        chart.draw(pieData, options);
        
        if (!pie_refresh) {
          pie_refresh = setInterval(getMemInfoAndBakePie, 3000); 
        }

      }); 
    }

    function getMemInfoAndPaintLayers() {
      $.ajax('/api/mem_info', { dataType: 'json' }).done(function(response) {
        var memTable = [];
        memTable[0] = ['Index', 'Wired', 'Active', 'Inactive', 'Free'];
        for (var i = 0; i < response.l; i++) {
          memEntry = [
            i,
            response.mem_info[i]['wired'],
            response.mem_info[i]['active'],
            response.mem_info[i]['inactive'],
            response.mem_info[i]['free']
          ];
          console.log("memEntry " + i + ": " + memEntry);
          memTable.push(memEntry);
        }
{'fraction_non_alphanumeric': 0.1733742610277399, 'fraction_numerical': 0.023760800363801727, 'mean_word_length': 2.110678925035361, 'pattern_counts': {'":': 2, '<': 41, '<?xml version=': 0, '>': 33, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '329959', 'n_tokens_mistral': 2925, 'n_tokens_neox': 2755, 'n_words': 449}