<commit_before>var xcolor    = require('xcolor');



exports.sortCommitsByDayOfWeek = function (counts){

  var mon   = []; 
  var tues  = []; 
  var wed   = []; 
  var thurs = []; 
  var fri   = []; 
  var sat   = []; 
  var sun   = [];
  var isSet = false;
  var firstDayOfCal;
  
  for (var key in counts){
    
    if (!isSet){
      isSet=true
      firstDayOfCal = new Date(key).getDay();      
    }
    
    switch (new Date(key).getDay()){
      case 0:
        sun.push(counts[key]);
        break;
      case 1:
        mon.push(counts[key]);
        break;
      case 2:
        tues.push(counts[key]);
        break;
      case 3:
        wed.push(counts[key]);
        break;
      case 4:
        thurs.push(counts[key]);
        break;
      case 5:
        fri.push(counts[key]);
        break;
      case 6:
        sat.push(counts[key]);
        break;
      default:
        console.log('you messed up')
    }
  };
  return {
    firstDayOfCal: firstDayOfCal,
    mon: mon,
    tues: tues,
    wed: wed,
    thurs: thurs,
    fri: fri,
    sat: sat,
    sun: sun
  };
}

exports.display = function (commitsByDayOfWeek){
  
  console.log('');
   //The if statement determines if a spacer is needed to line up dates in cal.
  console.log(displayMonthTitle())
  xcolor.log('     ' + displayCommits(commitsByDayOfWeek.sun, commitsByDayOfWeek.firstDayOfCal > 0 ? true : false)); 
  xcolor.log(' Mon ' + displayCommits(commitsByDayOfWeek.mon, commitsByDayOfWeek.firstDayOfCal > 1 ? true : false));
  xcolor.log('     ' + displayCommits(commitsByDayOfWeek.tues, commitsByDayOfWeek.firstDayOfCal > 2 ? true : false));
  xcolor.log(' Wed ' + displayCommits(commitsByDayOfWeek.wed, commitsByDayOfWeek.firstDayOfCal > 3 ? true : false));
  xcolor.log('     ' + displayCommits(commitsByDayOfWeek.thurs, commitsByDayOfWeek.firstDayOfCal > 4 ? true : false));
  xcolor.log(' Fri ' + displayCommits(commitsByDayOfWeek.fri, commitsByDayOfWeek.firstDayOfCal
  > 5 ? true : false));
  xcolor.log('     ' + displayCommits(commitsByDayOfWeek.sat, commitsByDayOfWeek.firstDayOfCal > 6 ? true : false));
  console.log('');
  
}


var displayMonthTitle =function (){
  var months = [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ];

  var end = 11; //Months are zero based
  var start = new Date().getMonth();
  var stop = false;
  var row='     '; 
  var monthSpacer = '        ';
  var firstMonthSpacer = '  ';
  var isFirstMonth = true;
  
  for (var i = start; i <= end; i++ ){<commit_msg>Fixed some spacing<commit_after>var xcolor    = require('xcolor');



exports.sortCommitsByDayOfWeek = function (counts){

  var mon   = []; 
  var tues  = []; 
  var wed   = []; 
  var thurs = []; 
  var fri   = []; 
  var sat   = []; 
  var sun   = [];
  var isSet = false;
  var firstDayOfCal;
  
  for (var key in counts){
    
    if (!isSet){
      isSet=true
      firstDayOfCal = new Date(key).getDay();      
    }
    
    switch (new Date(key).getDay()){
      case 0:
        sun.push(counts[key]);
        break;
      case 1:
        mon.push(counts[key]);
        break;
      case 2:
        tues.push(counts[key]);
        break;
      case 3:
        wed.push(counts[key]);
        break;
      case 4:
        thurs.push(counts[key]);
        break;
      case 5:
        fri.push(counts[key]);
        break;
      case 6:
        sat.push(counts[key]);
        break;
      default:
        console.log('you messed up')
    }
  };
  return {
    firstDayOfCal: firstDayOfCal,
    mon: mon,
    tues: tues,
    wed: wed,
    thurs: thurs,
    fri: fri,
    sat: sat,
    sun: sun
  };
}

exports.display = function (commitsByDayOfWeek){
  
  console.log('');
   //The if statement determines if a spacer is needed to line up dates in cal.
  console.log(displayMonthTitle())
  xcolor.log('     ' + displayCommits(commitsByDayOfWeek.sun, commitsByDayOfWeek.firstDayOfCal > 0 ? true : false)); 
  xcolor.log(' Mon ' + displayCommits(commitsByDayOfWeek.mon, commitsByDayOfWeek.firstDayOfCal > 1 ? true : false));
  xcolor.log('     ' + displayCommits(commitsByDayOfWeek.tues, commitsByDayOfWeek.firstDayOfCal > 2 ? true : false));
  xcolor.log(' Wed ' + displayCommits(commitsByDayOfWeek.wed, commitsByDayOfWeek.firstDayOfCal > 3 ? true : false));
  xcolor.log('     ' + displayCommits(commitsByDayOfWeek.thurs, commitsByDayOfWeek.firstDayOfCal > 4 ? true : false));
  xcolor.log(' Fri ' + displayCommits(commitsByDayOfWeek.fri, commitsByDayOfWeek.firstDayOfCal
  > 5 ? true : false));
  xcolor.log('     ' + displayCommits(commitsByDayOfWeek.sat, commitsByDayOfWeek.firstDayOfCal > 6 ? true : false));
  console.log('');
  
}


var displayMonthTitle =function (){
  var months = [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ];

  var end = 11; //Months are zero based
  var start = new Date().getMonth();
  var stop = false;
  var row='     '; 
  var monthSpacer = '      ';
  var firstMonthSpacer = '  ';
  var isFirstMonth = true;
  
  for (var i = start; i <= end; i++ ){
{'fraction_non_alphanumeric': 0.14390195690847993, 'fraction_numerical': 0.006325360743229888, 'mean_word_length': 2.591199432221434, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '3785779', 'n_tokens_mistral': 1858, 'n_tokens_neox': 1760, 'n_words': 404}