<commit_before>ActiveAdmin::Dashboards.build do

  section "Power taggers", :priority => 1 do
    table_for User.order('tag_counter DESC').limit(10) do
      column :name do |u|
        link_to(u.full_name, admin_user_path(u))
      end
      column 'OSM', :osm_id do |u|
        if u.osm_username.blank?
          span u.osm_id
        else
          link_to u.osm_username, "#{OpenStreetMapConfig.oauth_site}/user/#{u.osm_username}"
        end
      end
      column 'POIs tagged', :tag_counter
    end
  end



  section "Power editors", :priority => 2 do
    table_for User.order('edit_counter DESC').limit(10) do
      column :name do |u|
        link_to(u.full_name, admin_user_path(u))
      end
      column 'OSM', :osm_id do |u|
        if u.osm_username.blank?
          span u.osm_id
        else
          link_to u.osm_username, "#{OpenStreetMapConfig.oauth_site}/user/#{u.osm_username}"
        end
      end
      column 'POIs edited', :edit_counter
    end
  end

  section "Power creators", :priority => 3 do
    table_for User.order('create_counter DESC').limit(10) do
      column :name do |user|
        link_to(user.full_name, admin_user_path(user))
      end
      column 'OSM', :osm_id do |u|
        if u.osm_username.blank?
          span u.osm_id
        else
          link_to u.osm_username, "#{OpenStreetMapConfig.oauth_site}/user/#{u.osm_username}"
        end
      end
      column 'POIs created', :create_counter
    end
  end

  # Define your dashboard sections here. Each block will be
  # rendered on the dashboard in the context of the view. So just
  # return the content which you would like to display.<commit_msg>Show 10 latest user on admin dashboard.<commit_after>ActiveAdmin::Dashboards.build do

  section "Power taggers", :priority => 1 do
    table_for User.order('tag_counter DESC').limit(10) do
      column :name do |u|
        link_to(u.full_name, admin_user_path(u))
      end
      column 'OSM', :osm_id do |u|
        if u.osm_username.blank?
          span u.osm_id
        else
          link_to u.osm_username, "#{OpenStreetMapConfig.oauth_site}/user/#{u.osm_username}"
        end
      end
      column 'POIs tagged', :tag_counter
    end
  end

  section "Power editors", :priority => 2 do
    table_for User.order('edit_counter DESC').limit(10) do
      column :name do |u|
        link_to(u.full_name, admin_user_path(u))
      end
      column 'OSM', :osm_id do |u|
        if u.osm_username.blank?
          span u.osm_id
        else
          link_to u.osm_username, "#{OpenStreetMapConfig.oauth_site}/user/#{u.osm_username}"
        end
      end
      column 'POIs edited', :edit_counter
    end
  end

  section "Power creators", :priority => 3 do
    table_for User.order('create_counter DESC').limit(10) do
      column :name do |user|
        link_to(user.full_name, admin_user_path(user))
      end
      column 'OSM', :osm_id do |u|
        if u.osm_username.blank?
          span u.osm_id
        else
          link_to u.osm_username, "#{OpenStreetMapConfig.oauth_site}/user/#{u.osm_username}"
        end
      end
      column 'POIs created', :create_counter
    end
  end

  section "Latest users", :priority => 4 do
    table_for User.order('created_at DESC').limit(10) do
      column :name do |user|
        link_to(user.full_name, admin_user_path(user))
      end
      column :created_at
    end
  end



  # Define your dashboard sections here. Each block will be
  # rendered on the dashboard in the context of the view. So just
  # return the content which you would like to display.
{'fraction_non_alphanumeric': 0.09941192943153178, 'fraction_numerical': 0.00644077289274713, 'mean_word_length': 2.447876447876448, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '6164627', 'n_tokens_mistral': 1228, 'n_tokens_neox': 1175, 'n_words': 318}