<commit_before>class UsersController < ApplicationController
  before_filter :authenticate!

  def show
    user_repositories = Rails.cache.fetch("user_repositories_#{current_user.id}", expires_in: 1.hour) do
      current_user.github.repositories +
      current_user.github.organizations.map do |org|
        current_user.github.org_repos(org.login)
      end.flatten(1)
    end

    keys = user_repositories.map { |repo| "#{repo.owner.login}/#{repo.name}" }
    ghcr_repos = Repository.where(full_name: keys).to_a.inject({}){ |h, r| h[r.to_s] = r; h }

    normalized_repositories = user_repositories.map do |repo|
      ghcr_repo = ghcr_repos["#{repo.owner.login}/#{repo.name}"]

      pending = ghcr_repo ?<commit_msg>Use full_name method on github repository accepts: c563a8e351<commit_after>class UsersController < ApplicationController
  before_filter :authenticate!

  def show
    user_repositories = Rails.cache.fetch("user_repositories_#{current_user.id}", expires_in: 1.hour) do
      current_user.github.repositories +
      current_user.github.organizations.map do |org|
        current_user.github.org_repos(org.login)
      end.flatten(1)
    end

    full_name_ary = user_repositories.map(&:full_name)
    ghcr_repos = Repository.where(full_name: full_name_ary).to_a.inject({}){ |h, r| h[r.to_s] = r; h }

    normalized_repositories = user_repositories.map do |repo|
      ghcr_repo = ghcr_repos[repo.full_name]

      pending = ghcr_repo ?
{'fraction_non_alphanumeric': 0.11651816312542837, 'fraction_numerical': 0.0075394105551747775, 'mean_word_length': 4.12280701754386, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1539246', 'n_tokens_mistral': 530, 'n_tokens_neox': 489, 'n_words': 83}