<commit_before><!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
    <title>Nodesphere Demo</title>
    <link rel="stylesheet" type="text/css" href="styles/app.css">
  </head>
  <body>
    <div id="message"></div>
    <div><pre id="rawData"></pre></div>

    <script src="nodesphere.js"></script>

    <script defer="true">
      // to run from localhost, use http://localhost:8080
      // for another domain, create a new client ID here: https://console.developers.google.com/
      GDRIVE_CLIENT_ID = '240536525529-mgoi35jr7ead3ks85q1m5dr2jcsq0v3o.apps.googleusercontent.com'

      DEMO_GDRIVE_FOLDER = '0B3Va7rwgRKG2d3EwU0NFOURxUTg'
      folderId = window.location.hash.slice(1) || DEMO_GDRIVE_FOLDER

      url = 'https://drive.google.com/drive/u/0/folders/' + folderId
      message.innerHTML =
        'Fetching Google Drive folder from <a href="' + url + '">' + url + '</a>...'

      window.nodesphere_load_google_drive_folder = function () {
        GoogleDrive = Nodesphere.adaptors.GoogleDrive

        GoogleDrive.create({client_id: GDRIVE_CLIENT_ID})
        .then(function(source) {
          return source.fetch({
            rootNodeId: folderId
          })
        }).then (function(sphere) {
          message.innerHTML += '<br /><br />' +
            'Retrieved data, printing resulting nodesphere:'
          rawData.innerHTML = sphere.toJson({space: 4})
        }).catch (function(error) {
          console.error(error)
        })
      }
    </script>

    <script src="https://apis.google.com/js/client.js?onload=nodesphere_load_google_drive_folder"></script>

  </body>
</html><commit_msg>minor gdrive example tweaks<commit_after><!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
    <title>Nodesphere Demo</title>
    <link rel="stylesheet" type="text/css" href="styles/app.css">
  </head>
  <body>
    <div id="message"></div>
    <div><pre id="rawData"></pre></div>

    <script src="nodesphere.js"></script>

    <script defer="true">
      // to run from localhost, use http://localhost:8080
      // to run from another domain, create a new client ID here: https://console.developers.google.com/
      var GDRIVE_CLIENT_ID = '240536525529-mgoi35jr7ead3ks85q1m5dr2jcsq0v3o.apps.googleusercontent.com'

      var DEMO_GDRIVE_FOLDER = '0B3Va7rwgRKG2d3EwU0NFOURxUTg'
      var folderId = window.location.hash.slice(1) || DEMO_GDRIVE_FOLDER

      var url = 'https://drive.google.com/drive/u/0/folders/' + folderId
      message.innerHTML =
        'Fetching Google Drive folder from <a href="' + url + '">' + url + '</a>...'

      window.loadGoogleDriveFolder = function () {
        var GoogleDrive = Nodesphere.adaptors.GoogleDrive

        GoogleDrive.create({client_id: GDRIVE_CLIENT_ID})
        .then(function(source) {
          return source.fetch({
            rootNodeId: folderId
          })
        }).then (function(sphere) {
          message.innerHTML += '<br /><br />' +
            'Retrieved data, printing resulting nodesphere:'
          rawData.innerHTML = sphere.toJson({space: 4})
        }).catch (function(error) {
          console.error('ERROR: ' + error)
        })
      }
    </script>

    <script src="//apis.google.com/js/client.js?onload=loadGoogleDriveFolder"></script>

  </body>
</html>
{'fraction_non_alphanumeric': 0.15237278444825614, 'fraction_numerical': 0.023441966838193252, 'mean_word_length': 2.922645739910314, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 0, '>': 59, 'https://': 5, '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': '727245', 'n_tokens_mistral': 1226, 'n_tokens_neox': 1164, 'n_words': 204}