<commit_before>bad_transactions = Protocols::X12::TransactionSetEnrollment.where({
  "submitted_at" => {"$gt" => Date.new(2014, 11, 1)},
  "receiver_id" => "461542132"
})

transmission_ids = bad_transactions.map(&:transmission_id)

transmissions = Protocols::X12::Transmission.where(
  "id" => {"$in" => transmission_ids },
  "submitted_at" => {"$gt" => Date.new(2014, 11, 1)},
  "isa08" => "461542132"
)

transmissions.each do |t|
  t.transaction_set_enrollments.each do |tse|
    tse.body.remove!
    tse.delete
  end
  t.delete
end<commit_msg>Cleanup.<commit_after>transmissions = Protocols::X12::Transmission.where(
  "id" => {
    "$in" => [
               "548b4519eb899ab61800a587",
               "548b13c0791e4b6b750000cd",
               "5481ccbc791e4b73320002a1",
               "54886d08791e4bfec900029d",
               "548f07db791e4becb8004628"
             ]
  }
)

transmissions.each do |t|
  t.transaction_set_enrollments.each do |tse|
    tse.body.remove!
    tse.delete
  end
  t.delete
end
{'fraction_non_alphanumeric': 0.14638971315529178, 'fraction_numerical': 0.12363996043521266, 'mean_word_length': 3.324786324786325, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '4995788', 'n_tokens_mistral': 469, 'n_tokens_neox': 395, 'n_words': 53}