<commit_before><!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title>Typogrowl for HTML</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width">

        <link rel="stylesheet" href="css/bootstrap.min.css">
        <style>
            body {
                padding-top: 50px;
                padding-bottom: 20px;
            }
            table.mapping {
                font: 9px monospace;
            }
            div#result {
                overflow-y: scroll;
            }
            div#result, textarea#text {
                height: 500px;
            }
        </style>
        <link rel="stylesheet" href="css/bootstrap-theme.min.css">
        <link rel="stylesheet" href="css/main.css">

        <script src="js/vendor/modernizr-2.6.2-respond-1.1.0.min.js"></script>
        
        <script>
            function parseIt() {
              $.get( "/html/parse", { text: $('#text').val() } )
                .done(function( data ) {
                  $('#result').html (data)
                });
            }
            function deleteMappingKey(key) {
              $.ajax({
                url: '/html/mapping/' + key,
                type: 'DELETE',
                success: function(result) {
                  fillMapping();
                  parseIt();
                }
              });
            }
            function addMappingKey(section,key,value,enclosure) {
              $.ajax({
                url: '/html/mapping/' + section + '/' + key + '/' + value + '/' + enclosure,
                type: 'PUT',
                success: function(result) {
                  fillMapping();
                  parseIt();
                }
              });
            }
            function fillMapping() {
              $("#syntaxrules").empty();
              $("#syntaxrules").append("<br><div id='syntaxrulesdiv' class='tab-content'></div>");
              $.getJSON( "/html/mapping", { } )
                .done(function( data ) {
                  var tabs = ["<li class='active'><a href='#mapping-show-hide' data-toggle='tab'>extend syntax</a></li>"];
                  var control =
                    '<form id="newmapping" class="form-inline" role="form">' + 
                    '  <div class="form-group">' + 
                    '    <label class="sr-only" for="mapping-new-key">Key to add</label>' + 
                    '    <input class="form-control" id="mapping-new-key" name="key" placeholder="Key (e.g., “×”)">' + 
                    '  </div>' + 
                    '  <div class="form-group">' + 
                    '    <label class="sr-only" for="mapping-new-value">Value for key</label>' + 
                    '    <input class="form-control" id="mapping-new-value" name="value" placeholder="Value for key">' + 
                    '  </div>' + 
                    '  <div class="form-group">' + 
                    '    <label class="sr-only" for="mapping-new-enclosure">Enclosure for key</label>' + 
                    '    <input class="form-control" id="mapping-new-enclosure" name="enclosure" placeholder="Enclosure">' + 
                    '  </div>' + 
                    '  <div class="form-group">' + 
                    '    <select class="form-control" id="mapping-new-section" name="section">' + 
                    '      <option>' + 'flush' + '</option>' + 
                    '      <option>' + 'block' + '</option>' + 
                    '      <option>' + 'magnet' + '</option>' + 
                    '      <option>' + 'inplace' + '</option>' + 
                    '      <option>' + 'linewide' + '</option>' + 
                    '      <option>' + 'custom' + '</option>' + 
                    '    </select>' + 
                    '  </div>' + 
                    '  <div class="form-group">' + 
                    '    <button type="submit" class="btn btn-submit">Add!</button>' +
                    '  </div>' + 
                    '</form>';
                  var divs = ["<div class='tab-pane fade active in' id='mapping-show-hide'><br>" + control + "</div>"];
                  $.each( data, function( key, val ) {
                    tabs.push( "<li><a href='#" + key + "' data-toggle='tab'>" + key + "</a></li>" );
                    var div = "<div class='tab-pane fade' id='" + key + "'>" +
                          "<table class='table table-condensed table-striped mapping' id='" + key + "-table'>" +
                          "<thead><tr><td width='40%'>Key</td><td width='40%'>Value</td><td>Action</td></tr></thead><tbody>";
                    $.each( val, function( k, v ) {
                      v = v.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
                      delBtn = "<a href='javascript:deleteMappingKey(\"" + k + "\")' class='btn btn-primary btn-xs' role='button'>—</a>";
                      div += "<tr><td>" + k + "</td><td>" + v + "</td><td>" + delBtn + "</td></tr>"
                    });
                    div += "</tbody></table></div>";
                    divs.push(div)
                  });<commit_msg>Demo site: updated for handshakes.<commit_after><!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title>Typogrowl for HTML</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width">

        <link rel="stylesheet" href="css/bootstrap.min.css">
        <style>
            body {
                padding-top: 50px;
                padding-bottom: 20px;
            }
            table.mapping {
                font: 9px monospace;
            }
            table.mapping thead {
                font-size: 12px;
                font-weight: bold;
            }
            div#syntaxresultdiv {
                overflow-y: scroll;
                height: 150px;
            }
            div#result {
                overflow-y: scroll;
            }
            div#result, textarea#text {
                height: 500px;
            }
        </style>
        <link rel="stylesheet" href="css/bootstrap-theme.min.css">
        <link rel="stylesheet" href="css/main.css">

        <script src="js/vendor/modernizr-2.6.2-respond-1.1.0.min.js"></script>
        
        <script>
            function parseIt() {
              $.get( "/html/parse", { text: $('#text').val() } )
                .done(function( data ) {
                  $('#result').html (data)
                });
            }
            function deleteMappingKey(key) {
              $.ajax({
                url: '/html/mapping/' + key,
                type: 'DELETE',
                success: function(result) {
                  fillMapping();
                  parseIt();
                }
              });
            }
            function addMappingKey(section,key,value,enclosure) {
              $.ajax({
                url: '/html/mapping/' + section + '/' + key + '/' + value + '/' + enclosure,
                type: 'PUT',
                success: function(result) {
                  fillMapping();
                  parseIt();
                }
              });
            }
            function fillMapping() {
              $("#syntaxrules").empty();
              $("#syntaxrules").append("<br><div id='syntaxrulesdiv' class='tab-content'></div>");
              $.getJSON( "/html/mapping", { } )
                .done(function( data ) {
                  var tabs = ["<li class='active'><a href='#mapping-show-hide' data-toggle='tab'>extend syntax</a></li>"];
                  var control =
                    '<form id="newmapping" class="form-inline" role="form">' + 
                    '  <div class="form-group">' + 
                    '    <label class="sr-only" for="mapping-new-key">Key to add</label>' + 
                    '    <input class="form-control" id="mapping-new-key" name="key" placeholder="Key (e.g., “×”)">' + 
                    '  </div>' + 
                    '  <div class="form-group">' + 
                    '    <label class="sr-only" for="mapping-new-value">Value for key</label>' + 
                    '    <input class="form-control" id="mapping-new-value" name="value" placeholder="Value for key">' + 
                    '  </div>' + 
                    '  <div class="form-group">' + 
                    '    <label class="sr-only" for="mapping-new-enclosure">Enclosure for key</label>' + 
                    '    <input class="form-control" id="mapping-new-enclosure" name="enclosure" placeholder="Enclosure">' + 
                    '  </div>' + 
                    '  <div class="form-group">' + 
                    '    <select class="form-control" id="mapping-new-section" name="section">' + 
                    '      <option>' + 'flush' + '</option>' + 
                    '      <option>' + 'block' + '</option>' + 
                    '      <option>' + 'magnet' + '</option>' + 
                    '      <option>' + 'inplace' + '</option>' + 
                    '      <option>' + 'linewide' + '</option>' + 
                    '      <option>' + 'custom' + '</option>' + 
                    '    </select>' + 
                    '  </div>' + 
                    '  <div class="form-group">' + 
                    '    <button type="submit" class="btn btn-submit">Add!</button>' +
                    '  </div>' + 
                    '</form>';
                  var divs = ["<div class='tab-pane fade active in' id='mapping-show-hide'><br>" + control + "</div>"];
                  $.each( data, function( key, val ) {
                    tabs.push( "<li><a href='#" + key + "' data-toggle='tab'>" + key + "</a></li>" );
                    var div = "<div class='tab-pane fade' id='" + key + "'>" +
                          "<table class='table table-condensed table-striped mapping' id='" + key + "-table'>" +
                          "<thead><tr><td width='40%'>Key</td><td width='40%'>Value</td><td>Action</td></tr></thead><tbody>";
                    $.each( val, function( k, v ) {
                      if (!(typeof v === 'string')) {
                        v = JSON.stringify(v);
                      }
                      v = v.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
                      delBtn = "<a href='javascript:deleteMappingKey(\"" + k + "\")' class='btn btn-primary btn-xs' role='button'>—</a>";
                      div += "<tr><td>" + k + "</td><td>" + v + "</td><td>" + delBtn + "</td></tr>"
                    });
                    div += "</tbody></table></div>";
                    divs.push(div)
                  });
{'fraction_non_alphanumeric': 0.1892916997442004, 'fraction_numerical': 0.0057334391814412985, 'mean_word_length': 1.3205075726565698, 'pattern_counts': {'":': 0, '<': 219, '<?xml version=': 0, '>': 217, 'https://': 0, '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': '1327884', 'n_tokens_mistral': 3362, 'n_tokens_neox': 3109, 'n_words': 585}