<commit_before>class BlackjackValue
  def initialize(hand)
    @hand = hand
  end

  def values
    {"Two" => 2, "Three" => 3, "Four" => 4, "Five" => 5, "Six" => 6,
    "Seven" => 7, "Eight" => 8, "Nine" => 9, "Ten" => 10, "Jack" => 10,
    "Queen" => 10, "King" => 10, "Ace" => 11}
  end

  def value
    @hand.reduce(0) do |sum_of_values, card|
      sum_of_values + values[card.rank]
    end
  end
end
<commit_msg>Add notes - look into Enumerable methods to solve for Aces<commit_after>class BlackjackValue
  def initialize(hand)
    @hand = hand
  end

  def values
    {"Two" => 2, "Three" => 3, "Four" => 4, "Five" => 5, "Six" => 6,
    "Seven" => 7, "Eight" => 8, "Nine" => 9, "Ten" => 10, "Jack" => 10,
    "Queen" => 10, "King" => 10, "Ace" => 11}
  end

  # look into:
  # Enumerable#any?
  # or...
  # Enumerable#count
  # for solving for Aces

  def value
    @hand.reduce(0) do |sum_of_values, card|
      sum_of_values + values[card.rank]
    end
  end
end

{'fraction_non_alphanumeric': 0.18640576725025745, 'fraction_numerical': 0.03913491246138002, 'mean_word_length': 2.796875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 29, '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': '909722', 'n_tokens_mistral': 437, 'n_tokens_neox': 380, 'n_words': 112}