<commit_before><!doctype html>
<title></title>
<style>
  html {
    background: #555;
  }

  h1 {
    margin-bottom: 20px;
    font: 20px/1.5 sans-serif;
  }

  .terminal {
    float: left;
    border: #000 solid 5px;
    font-family: "DejaVu Sans Mono", "Liberation Mono", monospace;
    font-size: 11px;
    color: #f0f0f0;
    background: #000;
  }

  .terminal-cursor {
    color: #000;
    background: #f0f0f0;
  }
</style>
<script src="term.min.js"></script>
<script>
;(function() {
  window.onload = function() {
    var server = "ws://"+document.location.host+"/ws"
    var websocket = new WebSocket(server);
    websocket.onopen = function() {
      var term = new Terminal({
        cols: 160,
        rows: 48,
        useStyle: true,
        screenKeys: true
      });

      websocket.onmessage = function (msg) {
        console.log(msg.data);
        term.write(msg.data);
      }

      term.on('data', function(data) {
        console.log(data)
        websocket.send(data)
      });

      term.on('title', function(title) {
        document.title = title;
      });

      term.open(document.body);
    };
    websocket.onclose = function(){
 		$('#error').empty().append("Lost Connection to websocket");
 	};
  };
}).call(this);
</script>
<div id="error"></div><commit_msg>Added  onerror to websocket<commit_after><!doctype html>
<title></title>
<style>
  html {
    background: #555;
  }

  h1 {
    margin-bottom: 20px;
    font: 20px/1.5 sans-serif;
  }

  .terminal {
    float: left;
    border: #000 solid 5px;
    font-family: "DejaVu Sans Mono", "Liberation Mono", monospace;
    font-size: 11px;
    color: #f0f0f0;
    background: #000;
  }

  .terminal-cursor {
    color: #000;
    background: #f0f0f0;
  }
</style>
<script src="term.min.js"></script>
<script>
;(function() {
  window.onload = function() {
    var server = "ws://"+document.location.host+"/ws"
    var websocket = new WebSocket(server);
    websocket.onopen = function() {
      var term = new Terminal({
        cols: 160,
        rows: 48,
        useStyle: true,
        screenKeys: true
      });

      websocket.onmessage = function (msg) {
        console.log(msg.data);
        term.write(msg.data);
      }

      term.on('data', function(data) {
        console.log(data)
        websocket.send(data)
      });

      term.on('title', function(title) {
        document.title = title;
      });

      term.open(document.body);
    };
    websocket.onclose = function(){
 		   $('#error').empty().append("Lost Connection to websocket");
 	  };
    websocket.onerror = function(){
       $('#error').empty().append("Lost Connection to websocket");
    };
  };
}).call(this);
</script>
<div id="error"></div>
{'fraction_non_alphanumeric': 0.1694290976058932, 'fraction_numerical': 0.02430939226519337, 'mean_word_length': 2.420654911838791, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '2049445', 'n_tokens_mistral': 999, 'n_tokens_neox': 921, 'n_words': 188}