<commit_before>namespace :one_off do
  # put your one off tasks here and delete them once they've been ran
  desc 'update python repos'
  task update_python_repos: :environment do
    GithubRepository.where(language: 'Python').find_each(&:update_all_info_async)<commit_msg>Rake task to pre populate language cache fields<commit_after>namespace :one_off do
  # put your one off tasks here and delete them once they've been ran
  desc 'cache languages'
  task cache_languages: :environment do
    Project.with_repo.includes(:github_repository).find_each do |project|
      project.update_columns(language: project.github_repository.try(:language))
    end
{'fraction_non_alphanumeric': 0.07350689127105667, 'fraction_numerical': 0.0, 'mean_word_length': 5.475247524752476, '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': '1741831', 'n_tokens_mistral': 185, 'n_tokens_neox': 177, 'n_words': 61}