<commit_before>class FlagLogController < ApplicationController
  def index
    @individual_user = User.find(params[:user_id]) if params[:user_id].present?

    if @individual_user
      @applicable_flag_logs = @individual_user.flag_logs
    else
      @applicable_flag_logs = FlagLog.all
    end

    if params[:filter] == 'fps'
      @applicable_flag_logs = @applicable_flag_logs.joins(:post).where(:success => true).where('`posts`.`is_fp` = 1 OR `posts`.`is_naa` = 1')
    end
<commit_msg>Explicitly exclude tp posts from fp tab<commit_after>class FlagLogController < ApplicationController
  def index
    @individual_user = User.find(params[:user_id]) if params[:user_id].present?

    if @individual_user
      @applicable_flag_logs = @individual_user.flag_logs
    else
      @applicable_flag_logs = FlagLog.all
    end

    if params[:filter] == 'fps'
      @applicable_flag_logs = @applicable_flag_logs.joins(:post).where(:success => true).where(:posts => { :is_tp => false }).where('`posts`.`is_fp` = 1 OR `posts`.`is_naa` = 1')
    end

{'fraction_non_alphanumeric': 0.1291866028708134, 'fraction_numerical': 0.003827751196172249, 'mean_word_length': 4.282828282828283, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '6799984', 'n_tokens_mistral': 369, 'n_tokens_neox': 333, 'n_words': 65}