<commit_before><html>
<head>
  <script src="https://cdn.firebase.com/js/client/2.2.1/firebase.js"></script>
  <script src='https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js'></script>
  <link rel="stylesheet" type="text/css" href="robot.css">
</head>
<body>

<!-- CHAT MARKUP -->
<div class="example-chat l-demo-container">
  <header>Robotman Control</header>

  <div class='example-chat-toolbar'>
  </div>

  <ul id='example-messages' class="example-chat-messages"></ul>

  <footer>
    <input type='text' id='messageInput'  placeholder='Type a message...'>
  </footer>
</div>

<!-- eyes MARKUP -->
<div class="eye-table">
  <header>Eyes Control</header>

  <table id='eye-table'><tr valign='top'></tr></table>

  <footer>
  </footer>
</div>


<!-- CHAT JAVACRIPT -->
<script>
  // CREATE A REFERENCE TO FIREBASE
  var messagesRef = new Firebase('https://robotman.firebaseIO.com/control/');

  // REGISTER DOM ELEMENTS
  var messageField = $('#messageInput');
  var messageList = $('#example-messages');

  // LISTEN FOR KEYPRESS EVENT
  messageField.keypress(function (e) {
    if (e.keyCode == 13) {
      //FIELD VALUES
      var message = messageField.val();

      //SAVE DATA TO FIREBASE AND EMPTY FIELD
      var fd = messagesRef.push({text:message, ".priority": Date.now()});
      fd.setPriority(Date.now());
//  messagesRef.push({text:message, ".priority": Date.now()});
      messageField.val('');
    }
  });

  // Add a callback that is triggered for each chat message.
  messagesRef.limitToLast(10).on('child_added', function (snapshot) {
    //GET DATA
    var data = snapshot.val();
    var message = data.text;

    //CREATE ELEMENTS MESSAGE & SANITIZE TEXT
    var messageElement;
    var li = "<li id='" + snapshot.key() + "'";

    if (data.processed)
	li += " class='processed'>";
    li += ">";
    messageElement = $(li);

    messageElement.text(message);

    //ADD MESSAGE
    messageList.append(messageElement)

    //SCROLL TO BOTTOM OF MESSAGE LIST
    messageList[0].scrollTop = messageList[0].scrollHeight;
  });

messagesRef.on('child_changed', function(snapshot, prevChildKey) {
    var data = snapshot.val();
    var key = snapshot.key();
    if (data.processed) {
	$("#" + key).toggleClass('processed');
    }
});
</script>


<!-- eyes JAVACRIPT -->
<script>
  // CREATE A REFERENCE TO FIREBASE
  var eyesRef = new Firebase('https://robotman.firebaseIO.com/pixels/');

  // REGISTER DOM ELEMENTS
  var eyeRow = $('#eye-table tr');

  // Add a callback that is triggered for each eye
  eyesRef.limitToLast(10).on('child_added', function (snapshot) {
    //GET DATA
    var data = snapshot.val();

    //CREATE ELEMENTS
    var el;
    var li = "<td id='" + snapshot.key() + "'" + ">";
    el = $(li);

    var s = "";
    for (var i = 0; i < data.length; i++) {
	if (i % 8 == 0)
	    s += "\n";
	if (data[i] == "0")
	    s += " ";
	else
	    s += "&#9608;"
    }

    el.html("<pre>" + snapshot.key() + "\n" + s + "</pre>");

    //ADD to list
    eyeRow.append(el)
  });
</script>

</body>
</html><commit_msg>eye control<commit_after><html>
<head>
  <script src="https://cdn.firebase.com/js/client/2.2.1/firebase.js"></script>
  <script src='https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js'></script>
  <link rel="stylesheet" type="text/css" href="robot.css">
</head>
<body>

<!-- CHAT MARKUP -->
<div class="example-chat l-demo-container">
  <header>Robotman Control</header>

  <div class='example-chat-toolbar'>
  </div>

  <ul id='example-messages' class="example-chat-messages"></ul>

  <footer>
    <input type='text' id='messageInput'  placeholder='Type a message...'>
  </footer>
</div>

<!-- eyes MARKUP -->
<div class="eye-table">
  <header>Eyes Control: <span id='cur-eye'/></header>

  <table id='eye-table'><tr valign='top'></tr></table>

  <footer>
  </footer>
</div>


<!-- CHAT JAVACRIPT -->
<script>
  // CREATE A REFERENCE TO FIREBASE
  var messagesRef = new Firebase('https://robotman.firebaseIO.com/control/');

  // REGISTER DOM ELEMENTS
  var messageField = $('#messageInput');
  var messageList = $('#example-messages');

  // LISTEN FOR KEYPRESS EVENT
  messageField.keypress(function (e) {
    if (e.keyCode == 13) {
      //FIELD VALUES
      var message = messageField.val();

      //SAVE DATA TO FIREBASE AND EMPTY FIELD
      var fd = messagesRef.push({text:message, ".priority": Date.now()});
      fd.setPriority(Date.now());
//  messagesRef.push({text:message, ".priority": Date.now()});
      messageField.val('');
    }
  });

  // Add a callback that is triggered for each chat message.
  messagesRef.limitToLast(10).on('child_added', function (snapshot) {
    //GET DATA
    var data = snapshot.val();
    var message = data.text;

    //CREATE ELEMENTS MESSAGE & SANITIZE TEXT
    var messageElement;
    var li = "<li id='" + snapshot.key() + "'";

    if (data.processed)
	li += " class='processed'>";
    li += ">";
    messageElement = $(li);

    messageElement.text(message);

    //ADD MESSAGE
    messageList.append(messageElement)

    //SCROLL TO BOTTOM OF MESSAGE LIST
    messageList[0].scrollTop = messageList[0].scrollHeight;
  });

messagesRef.on('child_changed', function(snapshot, prevChildKey) {
    var data = snapshot.val();
    var key = snapshot.key();
    if (data.processed) {
	$("#" + key).toggleClass('processed');
    }
});
</script>


<!-- eyes JAVACRIPT -->
<script>
  // CREATE A REFERENCE TO FIREBASE
  var eyesRef = new Firebase('https://robotman.firebaseIO.com/pixels/');
  var curEyeRef = new Firebase('https://robotman.firebaseIO.com/state/eye');

  // REGISTER DOM ELEMENTS
  var eyeRow = $('#eye-table tr');

  // Add a callback that is triggered for each eye
  eyesRef.limitToLast(10).on('child_added', function (snapshot) {
    //GET DATA
    var data = snapshot.val();

    //CREATE ELEMENTS
    var el;
    var li = "<td id='" + snapshot.key() + "'" + ">";
    el = $(li);

    var s = "";
    for (var i = 0; i < data.length; i++) {
	if (i % 8 == 0)
	    s += "\n";
	if (data[i] == "0")
	    s += " ";
	else
	    s += "&#9608;"
    }

    var lnk = "<a href='#' id='set_eye_" + snapshot.key() + "'>" + snapshot.key() + "</a>";
    el.html(lnk + "<br><pre>" + s + "</pre>");

    //ADD to list
    eyeRow.append(el);

    $('#set_eye_' + snapshot.key()).click(function() {
	curEyeRef.set(snapshot.key());
    });
  });

  var curEyeEl = $('#cur-eye');
  curEyeRef.on('value', function (snapshot) {
      curEyeEl.text(snapshot.val());
  });
</script>

</body>
</html>
{'fraction_non_alphanumeric': 0.1963463309794289, 'fraction_numerical': 0.006754682222904513, 'mean_word_length': 3.059190031152648, 'pattern_counts': {'":': 4, '<': 97, '<?xml version=': 0, '>': 97, 'https://': 9, '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': '4378953', 'n_tokens_mistral': 2356, 'n_tokens_neox': 2241, 'n_words': 511}