<commit_before>'use strict';

var socket = require('socket.io-client')('http://localhost:3000');

var sockets = {
  on(event, callback) {
    socket.on(event, (response) => {

        if(response._success === false) {
          window.alert('Error :' + response.message);
        } else {
            callback(response);
        }
      });
  },
  emit(event, data) {
    return socket.emit(event, data);
  },
  removeAllListeners(name) {
    socket.removeAllListeners(name);<commit_msg>Use serving url for sockets.<commit_after>'use strict';

var socket = require('socket.io-client')();

var sockets = {
  on(event, callback) {
    socket.on(event, (response) => {

        if(response._success === false) {
          window.alert('Error :' + response.message);
        } else {
            callback(response);
        }
      });
  },
  emit(event, data) {
    return socket.emit(event, data);
  },
  removeAllListeners(name) {
    socket.removeAllListeners(name);
{'fraction_non_alphanumeric': 0.16252587991718426, 'fraction_numerical': 0.004140786749482402, 'mean_word_length': 2.7192307692307693, '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': '2747025', 'n_tokens_mistral': 299, 'n_tokens_neox': 294, 'n_words': 51}