<commit_before>package controllers

import play.api._
import org.intracer.finance._
import org.apache.poi.ss.usermodel.Sheet
import scala.collection.JavaConverters._

object Global extends GlobalSettings {

  lazy val operations = loadFinance()

  var mapping: CodeMapping = _

  override def onStart(app: Application) {

    loadFinance()
    Logger.info("Application has started")
  }

  override def onStop(app: Application) {
    Logger.info("Application shutdown...")
  }


  def loadFinance(): Seq[Operation] = {

    val wb = XlsTools.load("wmua4")
    //  val configSheet = wb.getSheetAt(2)
    //
    //  val mapping = AccountMapper.readMapping(configSheet)

    //"wmua2011-2013_revised")
    Main.evaluator = wb.getCreationHelper.createFormulaEvaluator()

    val configSheet = wb.getSheetAt(2)

    mapping = AccountMapper.readMapping(configSheet)

    val sheet1 = wb.getSheetAt(0)
    val sheet2 = wb.getSheetAt(1)

    val year1 = getOperations(sheet1)
    val year2 = getOperations(sheet2)

    val operations = (year1 ++ year2).toSeq

    Logger.info("Operations:" + operations.mkString("\n"))

    operations
  }


  def getOperations(sheet: Sheet) = {
    val cacheOperations = sheet.asScala.flatMap(row => AccountMapper.map(row, CacheConfig))
    val uahOperations = sheet.asScala.flatMap(row => AccountMapper.map(row, UahConfig))

    cacheOperations ++ uahOperations
  }


}<commit_msg>updates<commit_after>package controllers

import play.api._
import org.intracer.finance._
import org.apache.poi.ss.usermodel.Sheet
import scala.collection.JavaConverters._

object Global extends GlobalSettings {

  lazy val operations = loadFinance()

  var mapping: CodeMapping = _

  override def onStart(app: Application) {

    loadFinance()
    Logger.info("Application has started")
  }

  override def onStop(app: Application) {
    Logger.info("Application shutdown...")
  }


  def loadFinance(): Seq[Operation] = {

    val wb = XlsTools.load("wmua5")
    //  val configSheet = wb.getSheetAt(2)
    //
    //  val mapping = AccountMapper.readMapping(configSheet)

    //"wmua2011-2013_revised")
    Main.evaluator = wb.getCreationHelper.createFormulaEvaluator()

    val configSheet = wb.getSheetAt(2)

    mapping = AccountMapper.readMapping(configSheet)

    val sheet1 = wb.getSheetAt(0)
    val sheet2 = wb.getSheetAt(1)

    val year1 = getOperations(sheet1)
    val year2 = getOperations(sheet2)

    val operations = (year1 ++ year2).toSeq

    Logger.info("Operations:" + operations.mkString("\n"))

    operations
  }


  def getOperations(sheet: Sheet) = {
    val cacheOperations = sheet.asScala.flatMap(row => AccountMapper.map(row, CacheConfig))
    val uahOperations = sheet.asScala.flatMap(row => AccountMapper.map(row, UahConfig))

    cacheOperations ++ uahOperations
  }


}
{'fraction_non_alphanumeric': 0.11316725978647686, 'fraction_numerical': 0.01494661921708185, 'mean_word_length': 3.67720465890183, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2617186', 'n_tokens_mistral': 942, 'n_tokens_neox': 902, 'n_words': 178}