<commit_before>class BotsController < ApplicationController
  before_action :set_bot, only: [:show, :edit, :update, :destroy]
  before_action :authenticate_user!, except: [:index, :show]
  before_action :check_bot_ownership, only: [:edit, :update, :destroy]

  # GET /bots
  # GET /bots.json
  def index
    @bots = Bot.all
  end

  # GET /bots/1
  # GET /bots/1.json
  def show
  end

  # GET /bots/new
  def new
    @bot = Bot.new
  end

  # GET /bots/1/edit
  def edit
    @eligible_collaborators = User.where.not(:id => User.with_role(:owner, @bot).pluck(:id))
                                  .where.not(:id => User.with_role(:collaborator, @bot).pluck(:id))<commit_msg>sort users alphabetically in the picker<commit_after>class BotsController < ApplicationController
  before_action :set_bot, only: [:show, :edit, :update, :destroy]
  before_action :authenticate_user!, except: [:index, :show]
  before_action :check_bot_ownership, only: [:edit, :update, :destroy]

  # GET /bots
  # GET /bots.json
  def index
    @bots = Bot.all
  end

  # GET /bots/1
  # GET /bots/1.json
  def show
  end

  # GET /bots/new
  def new
    @bot = Bot.new
  end

  # GET /bots/1/edit
  def edit
    @eligible_collaborators = User.where.not(:id => User.with_role(:owner, @bot).pluck(:id))
                                  .where.not(:id => User.with_role(:collaborator, @bot).pluck(:id))
                                  .order(:username)
{'fraction_non_alphanumeric': 0.13706293706293707, 'fraction_numerical': 0.004195804195804196, 'mean_word_length': 2.7265625, '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': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2471477', 'n_tokens_mistral': 522, 'n_tokens_neox': 504, 'n_words': 115}