<commit_before>// Run this and then telnet to localhost:2000 and chat with the bot

var net             = require("net");
var superscript     = require("superscript");
var debug           = require("debug")("telnetserver");

var options = {};
var sockets = [];

var botHandle = function(err, bot) {
    
  var receiveData = function(socket, bot, data) {

    // Handle incoming messages.
    debug("Message", data.toString('hex',0,data.length));
    var message = "" + data;

    message = message.replace(/[\x0D\x0A]/g, "");

    if (message.indexOf("/quit") == 0 || data.toString('hex',0,data.length) === "fff4fffd06") {
      socket.end("Good-bye!\n");
      return;
    }

    bot.reply(socket.name, message.trim(), function(err, reply){

      // Find the right socket
      var i = sockets.indexOf(socket);
      var soc = sockets[i];

      soc.write("\nBot> " + reply + "\n");<commit_msg>Removed debug from telnet example breaing setup instructions<commit_after>// Run this and then telnet to localhost:2000 and chat with the bot

var net             = require("net");
var superscript     = require("superscript");

var options = {};
var sockets = [];

var botHandle = function(err, bot) {
    
  var receiveData = function(socket, bot, data) {
    // Handle incoming messages.
    var message = "" + data;

    message = message.replace(/[\x0D\x0A]/g, "");

    if (message.indexOf("/quit") == 0 || data.toString('hex',0,data.length) === "fff4fffd06") {
      socket.end("Good-bye!\n");
      return;
    }

    bot.reply(socket.name, message.trim(), function(err, reply){

      // Find the right socket
      var i = sockets.indexOf(socket);
      var soc = sockets[i];

      soc.write("\nBot> " + reply + "\n");
{'fraction_non_alphanumeric': 0.16705336426914152, 'fraction_numerical': 0.01334106728538283, 'mean_word_length': 2.8764044943820224, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4846824', 'n_tokens_mistral': 554, 'n_tokens_neox': 524, 'n_words': 139}