<commit_before>class FriendsController < ApplicationController
  before_filter :authenticate_user!

  def index
    me_and_following_ids = current_user.followings.pluck(:id) << current_user.id

    friend_ids = current_user.social_friends.all.pluck(:id)
    not_following_friends_ids = friend_ids - me_and_following_ids
    @friends = User.where(id: not_following_friends_ids).sample(20)

    user_ids = (User.pluck(:id) - me_and_following_ids).sample(20)
    @users = User.where(id: user_ids)
  end
end<commit_msg>友達を探すページ: 「その他利用者の皆さん」には最近ログインした人だけを表示する<commit_after>class FriendsController < ApplicationController
  before_filter :authenticate_user!

  def index
    me_and_following_ids = current_user.followings.pluck(:id) << current_user.id

    friend_ids = current_user.social_friends.all.pluck(:id)
    not_following_friend_ids = friend_ids - me_and_following_ids
    @friends = User.where(id: not_following_friend_ids).sample(20)

    user_ids = (User.pluck(:id) - (me_and_following_ids + @friends.map(&:id)))
    @users = User.where(id: user_ids).past_month(field: :current_sign_in_at).sample(20)
  end
end
{'fraction_non_alphanumeric': 0.10474485228290063, 'fraction_numerical': 0.007162041181736795, 'mean_word_length': 5.615384615384615, 'pattern_counts': {'":': 0, '<': 9, '<?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': '113330', 'n_tokens_mistral': 434, 'n_tokens_neox': 400, 'n_words': 54}