<commit_before>//  Created by dasdom on 13.04.20.
//  
//

import Foundation

public class BirthdaysManager {
  public private(set) var all: [Birthday]
  
  public init() {
    all = []
    all = loadBirthdays()
  }
  
  public func add(_ birthday: Birthday) {
    all.append(birthday)
    save(birthdays: all)
  }
  
  public func birthdayCounts() -> [BirthdayCount] {
    all.map { BirthdayCount(birthday: $0) }.sorted(by: { $0.remainingDays < $1.remainingDays })
  }
}

public extension BirthdaysManager {<commit_msg>Change birthdayCounts from method to property<commit_after>//  Created by dasdom on 13.04.20.
//  
//

import Foundation

public class BirthdaysManager {
  public private(set) var all: [Birthday] {
    didSet {
      birthdayCounts = all
        .map { BirthdayCount(birthday: $0) }
        .sorted(by: { $0.remainingDays < $1.remainingDays })
    }
  }
  public private(set) var birthdayCounts: [BirthdayCount]
  
  public init() {
    all = []
    all = loadBirthdays()
    
    birthdayCounts = all
    .map { BirthdayCount(birthday: $0) }
    .sorted(by: { $0.remainingDays < $1.remainingDays })
  }
  
  public func add(_ birthday: Birthday) {
    all.append(birthday)
    save(birthdays: all)
  }
}

public extension BirthdaysManager {
{'fraction_non_alphanumeric': 0.12291831879460745, 'fraction_numerical': 0.016653449643140365, 'mean_word_length': 2.9685534591194966, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 4, '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': '1997384', 'n_tokens_mistral': 458, 'n_tokens_neox': 438, 'n_words': 101}