<commit_before>namespace :import do

  task users: :environment do
    NokoService.import_users
  end

  task projects: :environment do
    NokoService.import_projects
  end

  desc "Import new Noko entries"
  task entries: [:users, :projects, :environment] do
    start_date = Time.now.beginning_of_week.to_date
    end_date = Time.now.next_week(:tuesday).to_date

    puts "start importing entries from #{start_date} to #{end_date}"

    NokoService.import_entries(start_date, end_date)

    puts 'finished importing entries'
  end
end

namespace :calc do
  desc "Calculate Leaderboards"
  task leaderboards: :environment do
    ProjectLeaderboard.calculate
    UserLeaderboard.calculate
  end
end
<commit_msg>Extend rake task to saturday<commit_after>namespace :import do

  task users: :environment do
    NokoService.import_users
  end

  task projects: :environment do
    NokoService.import_projects
  end

  desc "Import new Noko entries"
  task entries: [:users, :projects, :environment] do
    start_date = Time.now.beginning_of_week.to_date
    end_date = Time.now.next_week(:saturday).to_date

    puts "start importing entries from #{start_date} to #{end_date}"

    NokoService.import_entries(start_date, end_date)

    puts 'finished importing entries'
  end
end

namespace :calc do
  desc "Calculate Leaderboards"
  task leaderboards: :environment do
    ProjectLeaderboard.calculate
    UserLeaderboard.calculate
  end
end

{'fraction_non_alphanumeric': 0.07222222222222222, 'fraction_numerical': 0.0, 'mean_word_length': 4.20216606498195, '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': '5594964', 'n_tokens_mistral': 457, 'n_tokens_neox': 441, 'n_words': 124}