<commit_before><!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" type="text/css" href="style.css" />
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0.js"></script>
    <script type="text/javascript" src="../consonant.js"></script>
    <script type="text/javascript">
      $(document).ready(function () {
        // extract the service URL from the document URL
        var url = window.location.search.replace(/^\?url=/, '');
        if (!url) {
          url = 'http://localhost:8989';
        }

        // connect to the service
        var service = new Service(url);

        // display the service URL
        $('#url').text(service.url);

        // render refs by accessing their properties
        service.ref('master', function (ref) {
          $('#objects').append('<li><table>'
                   + '  <tr>'
                   + '    <td>url_aliases</td>'
                   + '    <td>' + ref.url_aliases.join(', ') + '</td>'
                   + '  </tr>'
                   + '  <tr>'
                   + '    <td>type</td>'
                   + '    <td>' + ref.type + '</td>'
                   + '  </tr>'
                   + '  <tr>'
                   + '    <td>head</td>'
                   + '    <td><pre>' + ref.head.json() + '</pre></td>'
                   + '  </tr>'
                   + '</table></li>');
        });

        // serialise refs to JSON
        service.ref('master', function (ref) {
          $('body').append('<pre>' + ref.json() + '</pre>');
        });
      });
    </script>
  </head>
  <body>
    <h1>Refs in Consonant service at <tt id="url"></tt></h1>
    <p class="note">Append <tt>?url=&langle;URL&rangle;</tt> to use the Consonant service at <tt>&langle;URL&rangle;</tt> instead of <tt>http://localhost:8989</tt>.</p>
    <h2>Objects</h2>
    <ul id="objects">
    </ul>
    <h2>JSON</h2>
    <ul id="json"><commit_msg>examples: Update headers in ref example<commit_after><!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" type="text/css" href="style.css" />
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0.js"></script>
    <script type="text/javascript" src="../consonant.js"></script>
    <script type="text/javascript">
      $(document).ready(function () {
        // extract the service URL from the document URL
        var url = window.location.search.replace(/^\?url=/, '');
        if (!url) {
          url = 'http://localhost:8989';
        }

        // connect to the service
        var service = new Service(url);

        // display the service URL
        $('#url').text(service.url);

        // render refs by accessing their properties
        service.ref('master', function (ref) {
          $('#objects').append('<li><table>'
                   + '  <tr>'
                   + '    <td>url_aliases</td>'
                   + '    <td>' + ref.url_aliases.join(', ') + '</td>'
                   + '  </tr>'
                   + '  <tr>'
                   + '    <td>type</td>'
                   + '    <td>' + ref.type + '</td>'
                   + '  </tr>'
                   + '  <tr>'
                   + '    <td>head</td>'
                   + '    <td><pre>' + ref.head.json() + '</pre></td>'
                   + '  </tr>'
                   + '</table></li>');
        });

        // serialise refs to JSON
        service.ref('master', function (ref) {
          $('body').append('<pre>' + ref.json() + '</pre>');
        });
      });
    </script>
  </head>
  <body>
    <h1>Ref "master" in Consonant service at <tt id="url"></tt></h1>
    <p class="note">Append <tt>?url=&langle;URL&rangle;</tt> to use the Consonant service at <tt>&langle;URL&rangle;</tt> instead of <tt>http://localhost:8989</tt>.</p>
    <h2>Object</h2>
    <ul id="objects">
    </ul>
    <h2>JSON</h2>
    <ul id="json">
{'fraction_non_alphanumeric': 0.20506852857512284, 'fraction_numerical': 0.009309542280837859, 'mean_word_length': 1.6438824333561175, 'pattern_counts': {'":': 0, '<': 117, '<?xml version=': 0, '>': 117, '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': '6048747', 'n_tokens_mistral': 1235, 'n_tokens_neox': 1183, 'n_words': 233}