<commit_before><!doctype html>
 
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>SANS data reader</title>
  <!-- <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />-->
  <link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/smoothness/jquery-ui.css" />
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> 
  <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
  <script>
    exports = {}; // compatibility with node scripts
  </script>
  <script src="js/jspack.js"></script>
  <script src="js/sansdata.js"></script>
  <script>
  $(function() {
    
    var EMPTY_TRAJ = "{'init': {}, 'loops': [{'vary': []}]}";
    
    set_data = function(raw) {
        data = new Uint8Array(raw);
        console.log(readNCNRData(data));
    }
    
    var loadData = function() {
        var file = document.getElementById('sansfile').files[0]; // only one file allowed
        datafilename = file.name;
        var result = null;
        var reader = new FileReader();
        reader.onload = function(e) {
            set_data(this.result);
        }
        reader.readAsArrayBuffer(file);
    }
    
    var fileinput = document.getElementById('sansfile');
    fileinput.onchange = loadData;  
  });
  </script>
</head>
<body>
Load trajectory (*.traj): <input type="file" multiple="false" id="sansfile" name="sansfile" />
</body>
</html><commit_msg>cleanup<commit_after><!doctype html>
 
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>SANS data reader</title>
  <!-- <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />-->
  <link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/smoothness/jquery-ui.css" />
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> 
  <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
  <script>
    exports = {}; // compatibility with node scripts
  </script>
  <script src="js/jspack.js"></script>
  <script src="js/sansdata.js"></script>
  <script>
  $(function() {
    
    var EMPTY_TRAJ = "{'init': {}, 'loops': [{'vary': []}]}";
    
    set_data = function(raw) {
        data = new Uint8Array(raw);
        console.log(readNCNRData(data));
    }
    
    var loadData = function() {
        var file = document.getElementById('sansfile').files[0]; // only one file allowed
        datafilename = file.name;
        var result = null;
        var reader = new FileReader();
        reader.onload = function(e) {
            set_data(this.result);
        }
        reader.readAsArrayBuffer(file);
    }
    
    var fileinput = document.getElementById('sansfile');
    fileinput.onchange = loadData;  
  });
  </script>
</head>
<body>
Load SANS data file: <input type="file" multiple="false" id="sansfile" name="sansfile" />
</body>
</html>
{'fraction_non_alphanumeric': 0.1901573485102109, 'fraction_numerical': 0.012721794442584533, 'mean_word_length': 2.9786950732356856, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, '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': '7013646', 'n_tokens_mistral': 1063, 'n_tokens_neox': 1020, 'n_words': 170}