<commit_before># rake db:fix_invites

begin
  namespace :db do
   task :fix_invites => :environment do
      current_invites = User.invited_not_accepted
      nil_org_users = current_invites.select {|user| user.organization_id.nil?}
      nil_org_users.each do |user|
        query_result = Organization.where("UPPER(email) LIKE ? ", "%#{user.email.upcase}%")
        org = query_result.first
        puts "Wrong number of orgs: #org.email}" if query_result.length != 1
        user.organization_id = org.id
        user.save!
      end
    end
  end
end<commit_msg>another hot fix<commit_after># rake db:fix_invites

begin
  namespace :db do
   task :fix_invites => :environment do
      current_invites = User.invited_not_accepted
      nil_org_users = current_invites.select {|user| user.organization_id.nil?}
      nil_org_users.each do |user|
        query_result = Organization.where("UPPER(email) LIKE ? ", "%#{user.email.upcase}%")
        org = query_result.first
        puts "Wrong number of orgs: #{org.email}" if query_result.length != 1
        user.organization_id = org.id
        user.save!
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.10484581497797357, 'fraction_numerical': 0.001762114537444934, 'mean_word_length': 3.0141342756183747, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6929128', 'n_tokens_mistral': 380, 'n_tokens_neox': 374, 'n_words': 85}