<commit_before><!DOCTYPE html>
<html lang="en">
<head>
  <!-- bindinator.js Copyright ©2016-2018 <NAME> -->
  <meta charset="utf-8">
  <title>bindinator</title>
  <link rel="stylesheet" type="text/css" href="css/b8r.css">
  <link rel="stylesheet" type="text/css" href="icomoon/style.css">
  <script src="lib/require.js"></script>
  <script>
  /* global require */
  'use strict';
    require.autoPreload().
    then(() => {
      const b8r = require('source/b8r.js');
      // for convenience when debugging
      window.b8r = b8r;

      const {touch} = require('lib/windows.js');

      // if the # contains 'body=path/to/component' load that
      // othersize load 'components/documentation'
      const component_path = (window.location.hash.match(/\bbody=([^=&]+)/) || [])[1]
                             || 'components/documentation';
      const data_path = (window.location.hash.match(/\bdata=([^=&]+)/) || [])[1] || null;
      const div = b8r.create('div');
      b8r.styles(div, {
        position: 'absolute',
        top: 0,
        left: 0,
        width: '100vw',
        height: '100vh',
      });
      document.body.appendChild(div);
      b8r.component(component_path).
          then(c => {
            document.title = c.name;
            b8r.insertComponent(c, div);
          });

      // debug tools
      b8r.set('_b8r_.toggleDebug', () => {
        if (window.nw) {
          const win = window.nw.Window.get();
          // bizarrely, isDevToolsOpen requires the SDK build of nwjs but show/close does not
          const show_dev_tools = !(win.isDevToolsOpen && win.isDevToolsOpen());
          if (show_dev_tools) win.showDevTools(); else win.closeDevTools();
        } else if (require.electron_remote) {
          require.electron_remote.getCurrentWindow().toggleDevTools();
        }
      });
      b8r.onAny('keydown(alt-meta-I)', '_b8r_.toggleDebug');
    });
  </script>
</head>
<body>
</body>
</html>
<commit_msg>fix — index sometimes blows up when it executes before document is available.<commit_after><!DOCTYPE html>
<html lang="en">
<head>
  <!-- bindinator.js Copyright ©2016-2018 <NAME> -->
  <meta charset="utf-8">
  <title>bindinator</title>
  <link rel="stylesheet" type="text/css" href="css/b8r.css">
  <link rel="stylesheet" type="text/css" href="icomoon/style.css">
  <script src="lib/require.js"></script>
  <script>
  /* global require */
  'use strict';
    require.autoPreload().
    then(() => {
      const b8r = require('source/b8r.js');
      // for convenience when debugging
      window.b8r = b8r;

      const {touch} = require('lib/windows.js');

      // if the # contains 'body=path/to/component' load that
      // othersize load 'components/documentation'
      const component_path = (window.location.hash.match(/\bbody=([^=&]+)/) || [])[1]
                             || 'components/documentation';
      const data_path = (window.location.hash.match(/\bdata=([^=&]+)/) || [])[1] || null;
      const div = b8r.create('div');
      b8r.styles(div, {
        position: 'absolute',
        top: 0,
        left: 0,
        width: '100vw',
        height: '100vh',
      });

      requestAnimationFrame(() => {
        // sometimes document.body doesn't exist yet
        document.body.appendChild(div);
        b8r.component(component_path).
            then(c => {
              document.title = c.name;
              b8r.insertComponent(c, div);
            });
      });

      // debug tools
      b8r.set('_b8r_.toggleDebug', () => {
        if (window.nw) {
          const win = window.nw.Window.get();
          // bizarrely, isDevToolsOpen requires the SDK build of nwjs but show/close does not
          const show_dev_tools = !(win.isDevToolsOpen && win.isDevToolsOpen());
          if (show_dev_tools) win.showDevTools(); else win.closeDevTools();
        } else if (require.electron_remote) {
          require.electron_remote.getCurrentWindow().toggleDevTools();
        }
      });
      b8r.onAny('keydown(alt-meta-I)', '_b8r_.toggleDebug');
    });
  </script>
</head>
<body>
</body>
</html>

{'fraction_non_alphanumeric': 0.1714075527219225, 'fraction_numerical': 0.01569396763119176, 'mean_word_length': 2.4048414023372287, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 46, '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': '1712902', 'n_tokens_mistral': 1355, 'n_tokens_neox': 1292, 'n_words': 260}