<commit_before><html>
  <head>
    <script src="pnglib.js"></script>
    <script src="identicon.js"></script>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="<KEY>" crossorigin="anonymous">
  </head>

  <body>
    <div class="container-fluid">
      <h1>Identicon.js</h1>
      <div class="row">
        <div class="col-md-12">
          <h4>Basic Usage</h4>
          <p>Specify just a hash, use default background color, margins, and size.</p>
<pre>
  var hash = 'd6fe8c82fb0abac17a702fd2a94eff37';
  var data = new Identicon(hash).toString();
  document.write('&lt;img src="data:image/png;base64,' + data + '"&gt;');</pre>
            <script type="text/javascript">
              hashes = [
                {id: 'stewartlord', hash: 'd6fe8c82fb0abac17a702fd2a94eff37'},
                {id: 'jasonlong',   hash: '46384036044a604b6b3316fc167fc15f'},
                {id: 'infusion',    hash: '373ff2375be91ebc97501e67d24ccd4d'},
                {id: 'ppuleo',      hash: '001000101000000000000000099fff86'}
              ];

              var i,
              data;
              for (i = 0; i < hashes.length; i++) {
                data = new Identicon(hashes[i].hash).toString();
                document.write(
                  hashes[i].id + '<br><img src="data:image/png;base64,' + data + '"><br><br>'
                );
              }
            </script>
        </div>
      </div>

      <div class="row">
        <div class="col-md-12">
          <h4>SVG Output</h4>
          <p>To generate SVGs, set the 'format' option to 'svg'.</p>
<pre>
  var hash = 'd6fe8c82fb0abac17a702fd2a94eff37';
  var data = new Identicon(hash, {format: 'svg'}).toString();
  document.write('&lt;img src="data:image/svg+xml;base64,' + data + '"&gt;');</pre>
            <script type="text/javascript">
              hashes = [
                {id: 'stewartlord', hash: 'd6fe8c82fb0abac17a702fd2a94eff37'},
                {id: 'jasonlong',   hash: '46384036044a604b6b3316fc167fc15f'},
                {id: 'infusion',    hash: '373ff2375be91ebc97501e67d24ccd4d'},
                {id: 'ppuleo',      hash: '001000101000000000000000099fff86'}
              ];

              var i,
              data;
              for (i = 0; i < hashes.length; i++) {
                data = new Identicon(hashes[i].hash, {format: 'svg'}).toString();
                document.write(
                  hashes[i].id + '<br><img src="data:image/svg+xml;base64,' + data + '"><br><br>'
                );
              }
            </script>
        </div>
      </div>

      <div class="row">
        <div class="col-md-12">
          <h4>Options</h4>
          <p>Specify a hash and an options object to customize background color, margins, size and format.</p>
<pre>
  var hash = 'd6fe8c82fb0abac17a702fd2a94eff37';
  var options = {
    foreground: [255, 255, 255, 255],
    background: [0, 0, 0, 255],
    margin: 0.2,
    size: 128,
    format: 'svg'
  };
  var data1 = new Identicon(hash, options).toString();
  var data2 = new Identicon(hash, options).toString(true);
  document.write(
    '&lt;img src="data:image/svg+xml;base64,' + data1 + '"&gt;' +
    '&lt;img src="data:image/svg+xml;utf8,' + data2 + '"&gt;';
  );
</pre>
          <script type="text/javascript">

            var data1, data2,
            hash = 'd6fe8c82fb0abac17a702fd2a94eff37',
            options = {
              foreground: [255, 255, 255, 255],
              background: [0, 0, 0, 255],
              margin: 0.2,
              size: 128,
              format: 'svg'
            };
            // Default base64
            data1 = new Identicon(hash, options).toString();
            // Raw argument set to true outputs raw xml
            data2 = new Identicon(hash, options).toString(true);
            document.write(
              '<br>svg+xml;base64 (1280 bytes)<br><img src="data:image/svg+xml;base64,' + data1 + '"><br><br>' +
              '<br>svg+xml;utf8 (963 bytes)<br><img src="data:image/svg+xml;utf8,' + data2 + '"><br><br>'
            );
            </script>
        </div>
      </div>

      <div class="row">
        <div class="col-md-12">
          <h4>Time-based</h4>
          <p>Omit the hash to generate an identicon based on the current time.</p>
<pre>
  var data = new Identicon().toString();
  document.write('&lt;img src="data:image/png;base64,' + data + '"&gt;');</pre>
            <script type="text/javascript">

              var data = new Identicon().toString();
              document.write(
                '<br><img src="data:image/png;base64,' + data + '"><br><br>'
                );
              </script>
        </div>
      </div>
    </div>
  </body>
</html>
<commit_msg>separate options and raw examples in demo.html<commit_after><html>
  <head>
    <script src="pnglib.js"></script>
    <script src="identicon.js"></script>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="<KEY>" crossorigin="anonymous">
  </head>

  <body>
    <div class="container-fluid">
      <h1>Identicon.js</h1>
      <div class="row">
        <div class="col-md-12">
          <h4>Basic Usage</h4>
          <p>Specify just a hash, use default background color, margins, and size.</p>
<pre>
  var hash = 'd6fe8c82fb0abac17a702fd2a94eff37';
  var data = new Identicon(hash).toString();
  document.write('&lt;img src="data:image/png;base64,' + data + '"&gt;');</pre>
            <script type="text/javascript">
              hashes = [
                {id: 'stewartlord', hash: 'd6fe8c82fb0abac17a702fd2a94eff37'},
                {id: 'jasonlong',   hash: '46384036044a604b6b3316fc167fc15f'},
                {id: 'infusion',    hash: '373ff2375be91ebc97501e67d24ccd4d'},
                {id: 'ppuleo',      hash: '001000101000000000000000099fff86'}
              ];

              var i,
              data;
              for (i = 0; i < hashes.length; i++) {
                data = new Identicon(hashes[i].hash).toString();
                document.write(
                  hashes[i].id + '<br><img src="data:image/png;base64,' + data + '"><br><br>'
                );
              }
            </script>
        </div>
      </div>

      <div class="row">
        <div class="col-md-12">
          <h4>SVG Output</h4>
          <p>To generate SVGs, set the 'format' option to 'svg'.</p>
<pre>
  var hash = 'd6fe8c82fb0abac17a702fd2a94eff37';
  var data = new Identicon(hash, {format: 'svg'}).toString();
  document.write('&lt;img src="data:image/svg+xml;base64,' + data + '"&gt;');</pre>
            <script type="text/javascript">
              hashes = [
                {id: 'stewartlord', hash: 'd6fe8c82fb0abac17a702fd2a94eff37'},
                {id: 'jasonlong',   hash: '46384036044a604b6b3316fc167fc15f'},
                {id: 'infusion',    hash: '373ff2375be91ebc97501e67d24ccd4d'},
                {id: 'ppuleo',      hash: '001000101000000000000000099fff86'}
              ];

              var i,
              data;
              for (i = 0; i < hashes.length; i++) {
                data = new Identicon(hashes[i].hash, {format: 'svg'}).toString();
                document.write(
                  hashes[i].id + '<br><img src="data:image/svg+xml;base64,' + data + '"><br><br>'
                );
              }
            </script>
        </div>
      </div>

      <div class="row">
        <div class="col-md-12">
          <h4>Options</h4>
          <p>Specify a hash and an options object to customize background color, margins, size and format.</p>
<pre>
  var hash = 'd6fe8c82fb0abac17a702fd2a94eff37';
  var options = {
    foreground: [255, 255, 255, 255],
    background: [0, 0, 0, 255],
    margin: 0.2,
    size: 128,
    format: 'svg'
  };
  var data = new Identicon(hash, options).toString();
  document.write(
    '&lt;img src="data:image/svg+xml;base64,' + data + '"&gt;'
  );
</pre>
          <script type="text/javascript">
            var data;
            hash = 'd6fe8c82fb0abac17a702fd2a94eff37',
            options = {
              foreground: [255, 255, 255, 255],
              background: [0, 0, 0, 255],
              margin: 0.2,
              size: 128,
              format: 'svg'
            };
            // Default base64
            data = new Identicon(hash, options).toString();
            document.write(
              '<br>svg+xml;base64 (1280 bytes)<br><img src="data:image/svg+xml;base64,' + data + '"><br><br>'
            );
            </script>
        </div>
      </div>

      <div class="row">
        <div class="col-md-12">
          <h4>Raw</h4>
          <p>Identicon toString method accepts a raw argument that when set to true returns a XML-based SVG element.</p>
<pre>
  // Raw argument set to true outputs raw xml
  var data = new Identicon(hash, options).toString(true);
  document.write(
    '&lt;img src="data:image/svg+xml;utf8,' + data + '"&gt;';
  );
</pre>
          <script type="text/javascript">
            var data;
            hash = 'd6fe8c82fb0abac17a702fd2a94eff37',
            options = {
              foreground: [255, 255, 255, 255],
              background: [0, 0, 0, 255],
              margin: 0.2,
              size: 128,
              format: 'svg'
            };
            // Raw argument set to true outputs raw xml
            data = new Identicon(hash, options).toString(true);
            document.write(
              '<br>svg+xml;utf8 (963 bytes)<br><img src="data:image/svg+xml;utf8,' + data + '"><br><br>'
            );
            </script>
        </div>
      </div>

      <div class="row">
        <div class="col-md-12">
          <h4>Time-based</h4>
          <p>Omit the hash to generate an identicon based on the current time.</p>
<pre>
  var data = new Identicon().toString();
  document.write('&lt;img src="data:image/png;base64,' + data + '"&gt;');</pre>
            <script type="text/javascript">

              var data = new Identicon().toString();
              document.write(
                '<br><img src="data:image/png;base64,' + data + '"><br><br>'
                );
              </script>
        </div>
      </div>
    </div>
  </body>
</html>

{'fraction_non_alphanumeric': 0.16304773082942098, 'fraction_numerical': 0.07022691705790297, 'mean_word_length': 1.913105413105413, 'pattern_counts': {'":': 0, '<': 191, '<?xml version=': 0, '>': 187, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 19}, 'pii_count': 0, 'substrings_counts': 4, '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': '5464528', 'n_tokens_mistral': 3843, 'n_tokens_neox': 3378, 'n_words': 703}