<commit_before>var net = require('net'),
    clients = [],
    _ = require('underscore');

net.createServer(function(socket){
  if (clients.indexOf(socket) === -1){
    clients.push(socket);
  }
  socket.on('data', function(d){
    var nonMe = _.filter(clients, function(e){
      return e !== socket;
    });
    _.each(nonMe, function(e){
      e.write(d.toString());
    });
  });
  socket.on('close', function(s){
    console.log(s);
  });
}).listen(8080);

<commit_msg>Splice out client socket on disconnect<commit_after>var net = require('net'),
    clients = [],
    _ = require('underscore');

net.createServer(function(socket){
  if (clients.indexOf(socket) === -1){
    clients.push(socket);
  }
  socket.on('data', function(d){
    var nonMe = _.filter(clients, function(e){
      return e !== socket;
    });
    _.each(nonMe, function(e){
      e.write(d.toString());
    });
  });
  socket.on('close', function(s){
    clients.splice(clients.indexOf(socket), 1);
  });
}).listen(process.env.PORT || 8080);


{'fraction_non_alphanumeric': 0.20568070519098922, 'fraction_numerical': 0.010773751224289911, 'mean_word_length': 3.4434782608695653, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4449371', 'n_tokens_mistral': 359, 'n_tokens_neox': 351, 'n_words': 59}