<commit_before><commit_msg>yay not needing to use logs.<commit_after>datum = File.open("data_rand_motif_match.txt").readlines


File.open('results.txt', "w") do |output|   
  n = datum.first.split().first.to_i
  pGC = datum.first.split().last.to_f

  prob_hash = {'A'=>(1-pGC)/2, 'T'=>(1-pGC)/2, 'G'=>pGC/2, 'C'=>pGC/2}
  prob = datum.last.chars.map{|x| prob_hash[x]}.inject(:*)
  puts "#{prob}"
  output.puts "#{1-(1-prob)**n}"
end
{'fraction_non_alphanumeric': 0.24074074074074073, 'fraction_numerical': 0.018518518518518517, 'mean_word_length': 4.551282051282051, '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': '2461709', 'n_tokens_mistral': 192, 'n_tokens_neox': 187, 'n_words': 28}