<commit_before>namespace :projects do
  desc 'Import from 24 Pull Requests'
  task import_from_24pr: :environment do
    26.times do |page|
      resp = RestClient.get "http://24pullrequests.com/projects.json?page=#{page+1}"
      projects = JSON.parse resp
      projects.each do |project|
        url = project['github_url']
        puts url
        github_project = GithubProject.new(url)
        unless github_project.find
          github_project.create rescue nil
        end
      end
    end
  end

  desc 'Re-calculate project scores'
  task recalculate_scores: :environment do
    Project.needs_update.each(&:update_info)
  end

  desc 'refresh issue ids relative to repositories'
  task refresh_issues: :environment do<commit_msg>There are 47 pages of projects on 24pr now<commit_after>namespace :projects do
  desc 'Import from 24 Pull Requests'
  task import_from_24pr: :environment do
    47.times do |page|
      resp = RestClient.get "http://24pullrequests.com/projects.json?page=#{page+1}"
      projects = JSON.parse resp
      projects.each do |project|
        url = project['github_url']
        puts url
        github_project = GithubProject.new(url)
        unless github_project.find
          github_project.create rescue nil
        end
      end
    end
  end

  desc 'Re-calculate project scores'
  task recalculate_scores: :environment do
    Project.needs_update.each(&:update_info)
  end

  desc 'refresh issue ids relative to repositories'
  task refresh_issues: :environment do
{'fraction_non_alphanumeric': 0.07677035076108538, 'fraction_numerical': 0.01455989410986102, 'mean_word_length': 3.032, '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': '1424496', 'n_tokens_mistral': 460, 'n_tokens_neox': 427, 'n_words': 129}