<commit_before><!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">

  <title>Signal K consumer</title>
  <script src="/signalk/v1/stream/primus.js"></script>
</head>
<body>
  <pre>
    <div id="data"/>
  </pre>
</body>
<script>

var signalKStream = Primus.connect(window.location.hostname + "/signalk/v1/stream?stream=delta", {
  reconnect: {
    maxDelay: 15000,
    minDelay: 500,
    retries: Infinity
  }
});

var dataDiv = document.getElementById('data');
signalKStream.on('data', function(data) {
  dataDiv.innerHTML = JSON.stringify(data, null, 2);
});

</script>
</html><commit_msg>Make example server agnostic<commit_after><!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">

  <title>Signal K Sample Consumer</title>
  <script src="/signalk/v1/stream/primus.js"></script>
</head>
<body>
  <pre>
    <div id="data"/>
  </pre>
</body>

<script>
var ws = new WebSocket("ws://" + window.location.host + "/signalk/v1/stream?stream=delta");

ws.onopen = function() {
  console.log("ws open");
}

ws.onclose = function() {
  console.log("ws close");
}

var dataDiv = document.getElementById('data');
ws.onmessage = function(event) {
  dataDiv.innerHTML = JSON.stringify(JSON.parse(event.data), null, 2);
}

</script>
</html>
{'fraction_non_alphanumeric': 0.19851301115241635, 'fraction_numerical': 0.011895910780669145, 'mean_word_length': 4.493877551020408, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, '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': '7033718', 'n_tokens_mistral': 509, 'n_tokens_neox': 490, 'n_words': 94}