<commit_before>StatsGopher.PresenceMonitor = function PresenceMonitor (statsGopher) {
  this.initialize(statsGopher)
}

StatsGopher.PresenceMonitor.prototype = {
  initialize: function (statsGopher) {
    this.statsGopher = statsGopher;
    this.send = this.executeNextSend;
    this.paused = false;
  },
  log: function () {
    if (this.options.log) {
      console.log.apply(console, arguments);
    }
  },
  ignoreNextSend: function () {
  },
  queueNextSend: function () {
    this.request.done(function () {
      this.send()
    }.bind(this))
    this.send = this.ignoreNextSend
  },
  executeNextSend: function () {
    var executeNextSend = function () {
      this.send = this.executeNextSend
    }.bind(this);

    if (this.paused) return;

    this.request = this.statsGopher.send({
      code: this.code
    }).done(executeNextSend).fail(executeNextSend);

    this.send = this.queueNextSend<commit_msg>send messages with a key<commit_after>StatsGopher.PresenceMonitor = function PresenceMonitor (statsGopher) {
  this.initialize(statsGopher)
}

StatsGopher.PresenceMonitor.prototype = {
  initialize: function (opts) {
    this.statsGopher = opts.statsGopher;
    this.key = opts.key;
    this.send = this.executeNextSend;
    this.paused = false;
  },
  log: function () {
    if (this.options.log) {
      console.log.apply(console, arguments);
    }
  },
  ignoreNextSend: function () {
  },
  queueNextSend: function () {
    this.request.done(function () {
      this.send()
    }.bind(this))
    this.send = this.ignoreNextSend
  },
  executeNextSend: function () {
    var executeNextSend = function () {
      this.send = this.executeNextSend
    }.bind(this);

    if (this.paused) return;

    this.request = this.statsGopher.send({
      code: this.code,
      key: this.key
    }).done(executeNextSend).fail(executeNextSend);

    this.send = this.queueNextSend
{'fraction_non_alphanumeric': 0.13036565977742448, 'fraction_numerical': 0.0, 'mean_word_length': 3.1955555555555555, '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': '5433518', 'n_tokens_mistral': 613, 'n_tokens_neox': 598, 'n_words': 103}