<commit_before><html>
<script src="/script.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>

<script>
$(function() {
  // socket = io.connect();
  sudp = new KadOH.transport.SimUDP();
  
  sudp.socket.on('clients-up', function(msg) {
    $('#form>select').empty().append('<option value="all">All</option>');
    for(ip in msg) {
      $('#form>select').append('	<option value="' + ip + '">' + ip + '</option>');
    }
  });

  sudp.listen( function(msg) {
    console.log(msg)
    $('#received').append('<p><b>' + msg.src + '</b> : ' + msg.msg + '</p');
  });
  
  $('#form').submit(function(event){
    try {
         var msg = $('#form > input[name=text]').val();
         var dst = $('#form>[name=dest]').val(); // IP:PORT
      
         sudp.send(dst, msg);
       } catch(e){console.log(e);}
  
    return false;

  });
});
</script>
<body>
<h2>Send message to node :</h2>
<form id='form'>
  <select name='dest'>
    <option value='all'>All</option>
  </select>
  <input type=text name='text'>
  <input type="submit" value="Send">
</form>
<h2>Messages received :</h2>
<div id='received'></div>
</body>
</html><commit_msg>SimUDP: add an example of whoami<commit_after><html>
<script src="/script.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>

<script>
$(function() {
  // socket = io.connect();
  sudp = new KadOH.transport.SimUDP();

  sudp._whoami(function(iam){
    $('#iam').empty().append(iam);
  });
  
  sudp.socket.on('clients-up', function(msg) {
    $('#form>select').empty().append('<option value="all">All</option>');
    for(ip in msg) {
      $('#form>select').append('	<option value="' + ip + '">' + ip + '</option>');
    }
  });

  sudp.listen( function(msg) {
    console.log(msg)
    $('#received').append('<p><b>' + msg.src + '</b> : ' + msg.msg + '</p');
  });
  
  $('#form').submit(function(event){
    try {
         var msg = $('#form > input[name=text]').val();
         var dst = $('#form>[name=dest]').val(); // IP:PORT
      
         sudp.send(dst, msg);
       } catch(e){console.log(e);}
  
    return false;

  });
});
</script>
<body>
<h2>Send message to node :</h2>
<p id='iam'>Waiting..</p>
<form id='form'>
  <select name='dest'>
    <option value='all'>All</option>
  </select>
  <input type=text name='text'>
  <input type="submit" value="Send">
</form>
<h2>Messages received :</h2>
<div id='received'></div>
</body>
</html>
{'fraction_non_alphanumeric': 0.2587949858471492, 'fraction_numerical': 0.004852405984634048, 'mean_word_length': 3.3556338028169015, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 75, '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': '221815', 'n_tokens_mistral': 919, 'n_tokens_neox': 915, 'n_words': 160}