<commit_before>def look_say input
  output = input.scan(/((\d)\2*)/).map(&:first).each_with_object "" do |sc, str|
      str << "#{sc.length}#{sc[0]}"
    end
  output
end

f = File.new("input10.txt")
input = ""
f.each_char do |c|
  input += c
end
40.times { input = look_say(input) }
puts input.length
10.times { input = look_say(input) }
puts input.length<commit_msg>day 10 tweaked<commit_after>def look_say input
  output = input.scan(/((.)\2*)/).map{|x| x[0]}.each_with_object "" do |sc, str|
      str << "#{sc.length}#{sc[0]}"
    end
end

f = File.new("input10.txt")
input = ""
f.each_char do |c|
  input += c
end
40.times { input = look_say(input) }
puts input.length
10.times { input = look_say(input) }
puts input.length
{'fraction_non_alphanumeric': 0.1917808219178082, 'fraction_numerical': 0.026027397260273973, 'mean_word_length': 3.7777777777777777, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2703564', 'n_tokens_mistral': 301, 'n_tokens_neox': 293, 'n_words': 65}