<commit_before>exports.parsers = {

  parseCheckIn: function(req) {
    var d = {
      date: new Date(),
      udid: req.body.udid,
      spec: []
    };
    
    var json = JSON.parse(req.body.json);
    
    d.isCharging = json.powr;
    d.isCharged = json.chrg;
    d.batteryLevel = json.batt;
    d.batteryTemp = json.temp;
    d.networkSearch = json.srch;

    d.lum = (json.lumn !== null) ? json.lumn.split(",") : [];
    d.lumAvg = 0;
    d.cpuP = (json.cpuP !== null) ? json.cpuP.split(",") : [];
    d.cpuPAvg = 0;
    d.cpuC = (json.cpuC !== null) ? json.cpuC.split(",") : [];
    d.cpuCAvg = 0;
    for (var i = 0; i < d.lum.length; i++) { d.lumAvg = d.lumAvg + d.lum[i]; }
      if (d.lumAvg > 0) { d.lumAvg = Math.round(d.lumAvg / d.lum.length); }
    for (var i = 0; i < d.cpuP.length; i++) { d.cpuPAvg = d.cpuPAvg + d.cpuP[i]; }
      if (d.cpuPAvg > 0) { d.cpuPAvg = Math.round(d.cpuPAvg / d.cpuP.length); }
    for (var i = 0; i < d.cpuC.length; i++) { d.cpuCAvg = d.cpuCAvg + d.cpuC[i]; }
      if (d.cpuCAvg > 0) { d.cpuCAvg = Math.round(d.cpuCAvg / d.cpuC.length); }
    
    var specGroup = json.spec.split("*");
    d.specCount = specGroup.length;
    for (var g = 0; g < specGroup.length; g++) {
      d.spec[g] = [];
      var specHex = specGroup[g].split(",");
      // for (var i = 0; i < specHex.length; i++) { d.spec[g][i] = parseInt(specHex[i], 16); }
      d.spec[g] = specHex;
    }

    return d;
  }

}<commit_msg>temporarily disabled spectra saving<commit_after>exports.parsers = {

  parseCheckIn: function(req) {
    var d = {
      date: new Date(),
      udid: req.body.udid,
      spec: []
    };
    
    var json = JSON.parse(req.body.json);
    
    d.isCharging = json.powr;
    d.isCharged = json.chrg;
    d.batteryLevel = json.batt;
    d.batteryTemp = json.temp;
    d.networkSearch = json.srch;

    d.lum = (json.lumn !== null) ? json.lumn.split(",") : [];
    d.lumAvg = 0;
    d.cpuP = (json.cpuP !== null) ? json.cpuP.split(",") : [];
    d.cpuPAvg = 0;
    d.cpuC = (json.cpuC !== null) ? json.cpuC.split(",") : [];
    d.cpuCAvg = 0;
    for (var i = 0; i < d.lum.length; i++) { d.lumAvg = d.lumAvg + d.lum[i]; }
      if (d.lumAvg > 0) { d.lumAvg = Math.round(d.lumAvg / d.lum.length); }
    for (var i = 0; i < d.cpuP.length; i++) { d.cpuPAvg = d.cpuPAvg + d.cpuP[i]; }
      if (d.cpuPAvg > 0) { d.cpuPAvg = Math.round(d.cpuPAvg / d.cpuP.length); }
    for (var i = 0; i < d.cpuC.length; i++) { d.cpuCAvg = d.cpuCAvg + d.cpuC[i]; }
      if (d.cpuCAvg > 0) { d.cpuCAvg = Math.round(d.cpuCAvg / d.cpuC.length); }
    
    var specGroup = json.spec.split("*");
    d.spec = specGroup;

    // d.specCount = specGroup.length;
    // for (var g = 0; g < specGroup.length; g++) {
    //   d.spec[g] = [];
    //   var specHex = specGroup[g].split(",");
    //   // for (var i = 0; i < specHex.length; i++) { d.spec[g][i] = parseInt(specHex[i], 16); }
    //   d.spec[g] = specHex;
    // }

    return d;
  }

}
{'fraction_non_alphanumeric': 0.2101889338731444, 'fraction_numerical': 0.008771929824561403, 'mean_word_length': 2.1677350427350426, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 9, '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': '3910228', 'n_tokens_mistral': 1335, 'n_tokens_neox': 1286, 'n_words': 245}