<commit_before>ActiveAdmin.register Owner do
  actions :index, :show

  index do
    column :gravatar do |owner|
      # Can't style the images using bootstrap because we're in the admin interface
      image_tag owner.gravatar_url, size: "50x50"
    end
    column :type
    column :nickname
    column :name

    column :scrapers do |owner|
      owner.scrapers.count
    end
    column :wall_time do |owner|
      owner.wall_time.to_i
    end
    column :cpu_time do |owner|
      owner.cpu_time.to_i
    end
    column :total_disk_usage do |owner|
      number_to_human_size(owner.total_disk_usage)
    end

    actions
  end

  filter :type
  filter :nickname
  filter :name

  # See permitted parameters documentation:<commit_msg>Make active admin compatible with friendly ID<commit_after>ActiveAdmin.register Owner do
  actions :index, :show

  index do
    column :gravatar do |owner|
      # Can't style the images using bootstrap because we're in the admin interface
      image_tag owner.gravatar_url, size: "50x50"
    end
    column :type
    column :nickname
    column :name

    column :scrapers do |owner|
      owner.scrapers.count
    end
    column :wall_time do |owner|
      owner.wall_time.to_i
    end
    column :cpu_time do |owner|
      owner.cpu_time.to_i
    end
    column :total_disk_usage do |owner|
      number_to_human_size(owner.total_disk_usage)
    end

    actions
  end

  filter :type
  filter :nickname
  filter :name

  controller do
    def find_resource
      scoped_collection.friendly.find(params[:id])
    end
  end

  # See permitted parameters documentation:
{'fraction_non_alphanumeric': 0.06281094527363185, 'fraction_numerical': 0.004975124378109453, 'mean_word_length': 2.840095465393795, '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': '3347658', 'n_tokens_mistral': 517, 'n_tokens_neox': 493, 'n_words': 154}