<commit_before>function getMsgConsumers() {
  var msgConsumers = [];

  var topSenders = {
    name: "<NAME>",
    db: null,
    ssID: null,
    chart: null,
    initSpreadSheet: function () {
      var ss = SpreadsheetApp.openById(this.ssID);
      var sheet = ss.insertSheet(this.name);
      sheet.appendRow(["From", "Count"]);
    },
    msgFunction: function (msg) {
      var rawFrom = msg.getFrom();
      var from = extractEmailAddress(rawFrom);
      var rows = objDB.getRows(this.db, this.name, ['From','Count'], {From:from});
      if ( rows.length === 0) {
        objDB.insertRow(this.db, this.name, {From:from, Count:1} );
      } else {
        var newCount = rows[0].Count + 1;
        objDB.updateRow(this.db, this.name, {From:from, Count:newCount}, {From:from} );
      }
    },
    graphFunction: function () {
      var ss = SpreadsheetApp.openById(this.ssID);
      var sheetID = ss.getSheetByName(this.name).getSheetId();
      var encodedQuery = encodeURIComponent("select A,B order by B desc limit 10");
      var dataSourceURL = 'https://docs.google.com/spreadsheet/tq?key=' + this.ssID;
      dataSourceURL += '&tq=' + encodedQuery;
      dataSourceURL += '&gid=' + sheetID;
      dataSourceURL += '&headers=-1';
      var chartBuilder = Charts.newBarChart()
      .setTitle('Top Senders')
      .setOption('vAxis', {title: "Sender"})
      .setOption('hAxis', {title: "Message Count", format: "decimal"})
      .setDimensions(1024, 768)
      .setOption('chartArea', {left: '40%'})
      .setDataSourceUrl(dataSourceURL);
      this.chart = chartBuilder.build();
    },
  };

  var topMailingLists = {
    name: "Top Mailing Lists",
    db: null,
    ssID: null,
    chart: null,
    initSpreadSheet: function () {
      var ss = SpreadsheetApp.openById(this.ssID);
      var sheet = ss.insertSheet(this.name);
      sheet.appendRow(["MailingList", "Count"]);
    },
    msgFunction: function (msg) {
      var listIdObj = extractListId(msg.getRawContent());
      if (listIdObj.msgFromList) {
        var listId = listIdObj.listId;
        var rows = objDB.getRows(this.db, this.name, ['MailingList','Count'], {MailingList:listId});
        if ( rows.length === 0) {
          objDB.insertRow(this.db, this.name, {MailingList:listId, Count:1} );
        } else {
          var newCount = rows[0].Count + 1;
          objDB.updateRow(this.db, this.name, {MailingList:listId, Count:newCount}, {MailingList:listId} );
        }
      }
    },
    graphFunction: function () {
      var ss = SpreadsheetApp.openById(this.ssID);
      var sheetID = ss.getSheetByName(this.name).getSheetId();
      var encodedQuery = encodeURIComponent("select A,B order by B desc limit 10");
      var dataSourceURL = 'https://docs.google.com/spreadsheet/tq?key=' + this.ssID;
      dataSourceURL += '&tq=' + encodedQuery;
      dataSourceURL += '&gid=' + sheetID;
      dataSourceURL += '&headers=-1';
      var chartBuilder = Charts.newBarChart()
      .setTitle('Top Mailing Lists')
      .setDimensions(1024, 768)
      .setOption('vAxis', {title: "Mailing List"})
      .setOption('hAxis', {title: "Message Count", format: "decimal"})
      .setOption('chartArea', {left: '40%'})
      .setDataSourceUrl(dataSourceURL);
      this.chart = chartBuilder.build();
    },
  };

  msgConsumers.push(topSenders);
  msgConsumers.push(topMailingLists);

  return msgConsumers;
}<commit_msg>Add Top Non Mailing List Senders<commit_after>function getMsgConsumers() {
  var msgConsumers = [];

  var topSenders = {
    name: "<NAME>",
    db: null,
    ssID: null,
    chart: null,
    initSpreadSheet: function () {
      var ss = SpreadsheetApp.openById(this.ssID);
      var sheet = ss.insertSheet(this.name);
      sheet.appendRow(["From", "Count"]);
    },
    msgFunction: function (msg) {
      var rawFrom = msg.getFrom();
      var from = extractEmailAddress(rawFrom);
      var rows = objDB.getRows(this.db, this.name, ['From','Count'], {From:from});
      if ( rows.length === 0) {
        objDB.insertRow(this.db, this.name, {From:from, Count:1} );
      } else {
        var newCount = rows[0].Count + 1;
        objDB.updateRow(this.db, this.name, {From:from, Count:newCount}, {From:from} );
      }
    },
    graphFunction: function () {
      var ss = SpreadsheetApp.openById(this.ssID);
      var sheetID = ss.getSheetByName(this.name).getSheetId();
      var encodedQuery = encodeURIComponent("select A,B order by B desc limit 10");
      var dataSourceURL = 'https://docs.google.com/spreadsheet/tq?key=' + this.ssID;
      dataSourceURL += '&tq=' + encodedQuery;
      dataSourceURL += '&gid=' + sheetID;
      dataSourceURL += '&headers=-1';
      var chartBuilder = Charts.newBarChart()
      .setTitle(this.name)
      .setOption('vAxis', {title: "Sender"})
      .setOption('hAxis', {title: "Message Count", format: "decimal"})
      .setDimensions(1024, 768)
      .setOption('chartArea', {left: '40%'})
      .setDataSourceUrl(dataSourceURL);
      this.chart = chartBuilder.build();
    },
  };

  var topMailingLists = {
    name: "Top Mailing Lists",
    db: null,
    ssID: null,
    chart: null,
    initSpreadSheet: function () {
      var ss = SpreadsheetApp.openById(this.ssID);
      var sheet = ss.insertSheet(this.name);
      sheet.appendRow(["MailingList", "Count"]);
    },
    msgFunction: function (msg) {
      var listIdObj = extractListId(msg.getRawContent());
      if (listIdObj.msgFromList) {
        var listId = listIdObj.listId;
        var rows = objDB.getRows(this.db, this.name, ['MailingList','Count'], {MailingList:listId});
        if ( rows.length === 0) {
          objDB.insertRow(this.db, this.name, {MailingList:listId, Count:1} );
        } else {
          var newCount = rows[0].Count + 1;
          objDB.updateRow(this.db, this.name, {MailingList:listId, Count:newCount}, {MailingList:listId} );
        }
      }
    },
    graphFunction: function () {
      var ss = SpreadsheetApp.openById(this.ssID);
      var sheetID = ss.getSheetByName(this.name).getSheetId();
      var encodedQuery = encodeURIComponent("select A,B order by B desc limit 10");
      var dataSourceURL = 'https://docs.google.com/spreadsheet/tq?key=' + this.ssID;
      dataSourceURL += '&tq=' + encodedQuery;
      dataSourceURL += '&gid=' + sheetID;
      dataSourceURL += '&headers=-1';
      var chartBuilder = Charts.newBarChart()
      .setTitle(this.name)
      .setDimensions(1024, 768)
      .setOption('vAxis', {title: "Mailing List"})
      .setOption('hAxis', {title: "Message Count", format: "decimal"})
      .setOption('chartArea', {left: '40%'})
      .setDataSourceUrl(dataSourceURL);
      this.chart = chartBuilder.build();
    },
  };

  var topNonMailingListSenders = {
    name: "Top Non Mailing List Senders",
    db: null,
    ssID: null,
    chart: null,
    initSpreadSheet: function () {
      var ss = SpreadsheetApp.openById(this.ssID);
      var sheet = ss.insertSheet(this.name);
      sheet.appendRow(["From", "Count"]);
    },
    msgFunction: function (msg) {
      var listIdObj = extractListId(msg.getRawContent());
      if (! listIdObj.msgFromList) {
        var rawFrom = msg.getFrom();
        var from = extractEmailAddress(rawFrom);
        var rows = objDB.getRows(this.db, this.name, ['From','Count'], {From:from});
        if ( rows.length === 0) {
          objDB.insertRow(this.db, this.name, {From:from, Count:1} );
        } else {
          var newCount = rows[0].Count + 1;
          objDB.updateRow(this.db, this.name, {From:from, Count:newCount}, {From:from} );
        }
      }
    },
    graphFunction: function () {
      var ss = SpreadsheetApp.openById(this.ssID);
      var sheetID = ss.getSheetByName(this.name).getSheetId();
      var encodedQuery = encodeURIComponent("select A,B order by B desc limit 10");
      var dataSourceURL = 'https://docs.google.com/spreadsheet/tq?key=' + this.ssID;
      dataSourceURL += '&tq=' + encodedQuery;
      dataSourceURL += '&gid=' + sheetID;
      dataSourceURL += '&headers=-1';
      var chartBuilder = Charts.newBarChart()
      .setTitle(this.name)
      .setDimensions(1024, 768)
      .setOption('vAxis', {title: "Sender"})
      .setOption('hAxis', {title: "Message Count", format: "decimal"})
      .setOption('chartArea', {left: '40%'})
      .setDataSourceUrl(dataSourceURL);
      this.chart = chartBuilder.build();
    },
  };

  msgConsumers.push(topSenders);
  msgConsumers.push(topMailingLists);
  msgConsumers.push(topNonMailingListSenders);

  return msgConsumers;
}
{'fraction_non_alphanumeric': 0.15599343185550082, 'fraction_numerical': 0.009383063570255689, 'mean_word_length': 2.962360594795539, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 5, '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': '3573496', 'n_tokens_mistral': 2878, 'n_tokens_neox': 2793, 'n_words': 559}