<commit_before>const fs = require('fs')
const config = require('../../config')

function copy (srcDir, dstDir) {
  var results = []
  var list = fs.readdirSync(srcDir)
  var src, dst
  list.forEach(function (file) {
    src = srcDir + '/' + file
    dst = dstDir + '/' + file
    var stat = fs.statSync(src)
    if (stat && stat.isDirectory()) {
      try {
        console.log('creating dir: ' + dst)
        fs.mkdirSync(dst)
      } catch (e) {
        console.log('directory already exists: ' + dst)
      }
      results = results.concat(copy(src, dst))
    } else {
      try {
        console.log('copying file: ' + dst)
        fs.writeFileSync(dst, fs.readFileSync(src))
      } catch (e) {
        console.log('could\'t copy file: ' + dst)
      }
      results.push(src)
    }
  })
  return results
}
module.exports = function () {
  if (!config.dirs.statics) {
    return
  }

  let len = config.dirs.statics.length

  for (let i = 0; i < len; i++) {
    const pack = config.dirs.statics[i]
    copy(pack.files, pack.destination)
  }
}<commit_msg>clear logs<commit_after>const fs = require('fs')
const config = require('../../config')

function copy (srcDir, dstDir) {
  var results = []
  var list = fs.readdirSync(srcDir)
  var src, dst
  list.forEach(function (file) {
    src = srcDir + '/' + file
    dst = dstDir + '/' + file
    var stat = fs.statSync(src)
    if (stat && stat.isDirectory()) {
      try {
        fs.mkdirSync(dst)
      } catch (e) {}
      results = results.concat(copy(src, dst))
    } else {
      try {
        fs.writeFileSync(dst, fs.readFileSync(src))
      } catch (e) {}
      results.push(src)
    }
  })
  return results
}
module.exports = function () {
  if (!config.dirs.statics) {
    return
  }

  let len = config.dirs.statics.length

  for (let i = 0; i < len; i++) {
    const pack = config.dirs.statics[i]
    copy(pack.files, pack.destination)
  }
}
{'fraction_non_alphanumeric': 0.15731515469323545, 'fraction_numerical': 0.001048767697954903, 'mean_word_length': 2.329842931937173, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5750795', 'n_tokens_mistral': 670, 'n_tokens_neox': 660, 'n_words': 151}