<commit_before>"use strict"

const os      = require('os')
const traffic = require('./ifstat');

class OsMonitor {

  constructor() {
    this.listenCpu()
    this.traffic = [];
    if (os.networkInterfaces && Object.keys(os.networkInterfaces()).length) {


      traffic(Object.keys(os.networkInterfaces()), (traffic) => {
        this.traffic = traffic
      })
    }

  }

  listenCpu() {
    function cpuAverage() {

      //Initialise sum of idle and time of cores and fetch CPU info
      var totalIdle = 0, totalTick = 0;
      var cpus = os.cpus();
      var type = os.type();

      //Loop through CPU cores
      for(var i = 0, len = cpus.length; i < len; i++) {

       //Select CPU core
       var cpu = cpus[i];
<commit_msg>Adding remove multi lines from network on windows<commit_after>"use strict"

const os      = require('os')
const traffic = require('./ifstat');

class OsMonitor {

  constructor() {
    this.listenCpu()
    this.traffic = [];

    var platform = os.platform();

    if (os.networkInterfaces && Object.keys(os.networkInterfaces()).length) {

      traffic(Object.keys(os.networkInterfaces()), (traffic) => {

        if (platform != 'win32') {
          this.traffic = traffic
        } else {
          this.traffic = traffic.filter((elem, index) => {
            if (!traffic[index+1]) return true;
            return !(elem[0] == traffic[index+1][0] && elem[1] == traffic[index+1][1]);
          })
        }
      })
    }

  }

  listenCpu() {
    function cpuAverage() {

      //Initialise sum of idle and time of cores and fetch CPU info
      var totalIdle = 0, totalTick = 0;
      var cpus = os.cpus();
      var type = os.type();

      //Loop through CPU cores
      for(var i = 0, len = cpus.length; i < len; i++) {

       //Select CPU core
       var cpu = cpus[i];

{'fraction_non_alphanumeric': 0.14631463146314633, 'fraction_numerical': 0.00825082508250825, 'mean_word_length': 2.2540250447227193, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '1660882', 'n_tokens_mistral': 589, 'n_tokens_neox': 559, 'n_words': 154}