<commit_before>namespace :spending_proposals do
  desc "Sends an email to the authors of unfeasible spending proposals"
  task send_unfeasible_emails: :environment do
    SpendingProposal.find_each do |spending_propsal|
      if spending_propsal.unfeasible_email_pending?
        spending_propsal.send_unfeasible_email
        puts "email sent for proposal #{spending_propsal.title}"
      else
        puts "this proposal is feasible: #{spending_propsal.title}"
      end
    end
  end

  desc "Updates all spending proposals to recalculate their tsv column"
  task touch: :environment do
    SpendingProposal.find_in_batches do |spending_propsal|
      spending_propsal.each(&:save)
    end
  end

  desc "Sets spending proposal as created by Forum"
  task set_forum: :environment do
    proposals_ids = [4225,4023,5515,5152,4884,4881,3606,4434,4252,4459,4914,5412,5451,5277,38,4899,4913,4966,5000,4753,4720,4735,4754,4750,4763,4747,4479,3776,3778,3973,3983,3997,4014,4056,4068,4083,3781,3966,4082,4890,4515,4156,4892,4145,4894,4850,4537,4867,4824,4597,4622,5280,5148,4689,5110,5187,5189,4984,5185,5088,5338,4658,5047,5060,4782,4241,5218,4979,5035,5369,5393,4744,4665,4661,4956,3792,4504,4307,4506,5176,4453,4923,3989,4959,3979,5041,4980,3987,3985,3885,4464,5040,5192,4727,5006,5038,4493,4480,4474,4488,4485,4718,4732,4785,4348,4347,4618,4736,4393,4364,4390,5496,4400,4375,4381,4384,5066,4396,4399,4390,4378,5346,4380,5359,4383,4363,5341,5336,5333,4421,4424,5286,4815,4986,5164,4991,4496,4595,5432,4743,5427,4836,4592,3716,5362,4120,4306]
    proposals_ids.each do |proposal_id|
      proposal = SpendingProposal.find(proposal_id)
      proposal.update(forum: true)
      puts "."
    end
  end
end<commit_msg>updates forum proposals<commit_after>namespace :spending_proposals do
  desc "Sends an email to the authors of unfeasible spending proposals"
  task send_unfeasible_emails: :environment do
    SpendingProposal.find_each do |spending_propsal|
      if spending_propsal.unfeasible_email_pending?
        spending_propsal.send_unfeasible_email
        puts "email sent for proposal #{spending_propsal.title}"
      else
        puts "this proposal is feasible: #{spending_propsal.title}"
      end
    end
  end

  desc "Updates all spending proposals to recalculate their tsv column"
  task touch: :environment do
    SpendingProposal.find_in_batches do |spending_propsal|
      spending_propsal.each(&:save)
    end
  end

  desc "Sets spending proposal as created by Forum"
  task set_forum: :environment do
    proposals_ids = [4926, 5255, 4801, 4716, 5078, 4526, 4635, 4830, 4730, 4946, 4719, 4576, 5227, 5297, 4353, 4147, 4789, 5224, 4673, 4671, 4670, 5345, 4101, 5326, 4760, 4757, 4681, 4655, 4438, 4429, 4371, 4368, 4367, 4366, 4362, 4359, 4356, 4355, 4352, 4350, 4349, 4346, 4345, 4343, 4340, 4339, 4338, 4336, 4335, 4333, 4330, 4943, 5061, 4932, 4948, 5037, 5055, 5061, 5043, 4277, 5059, 4947, 5050, 4945, 4276, 4267, 5063, 4940, 4994, 4183, 3971, 4590, 4111, 4113, 4693, 5193, 4739, 2757, 4393, 4364, 4390, 4400, 4375, 4381, 4384, 4396, 4399, 4378, 5346, 4380, 4383, 4363, 4424, 4373, 4967, 4965, 2142, 5341, 5336, 5333, 4421, 4994, 4183, 3971, 4590, 4111, 4113, 4693, 5193, 4739, 2757, 4058, 4332, 4137, 5328, 4125, 4422, 5098, 4144, 4376, 4099]
    proposals_ids.each do |proposal_id|
      proposal = SpendingProposal.find(proposal_id)
      proposal.update(forum: true)
      puts "."
    end
  end
end
{'fraction_non_alphanumeric': 0.11266783420899007, 'fraction_numerical': 0.3123175715119673, 'mean_word_length': 5.2650822669104205, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3931641', 'n_tokens_mistral': 2064, 'n_tokens_neox': 1407, 'n_words': 291}