<commit_before>.container
  %h1.label-heading
    Search
  = render partial: "search_form"

  - if @q
    - if !@scrapers_total_count.zero? || !@owners.empty?
      .search-results.row
        .col-xs-12
          %ul.search-type-nav.nav.nav-tabs
            %li{class: ('active' unless @type == "users"), role: "presentation"}
              = link_to search_path(q: @q, type: nil) do
                Scrapers
                %span.badge #{@scrapers_total_count}
            %li{class: ('active' if @type == "users"), role: "presentation"}
              = link_to search_path(q: @q, type: "users") do
                Users
                %span.badge #{@owners.total_count}

        - if @type == "users" && !@owners.total_count.zero?
          .col-xs-12
            - @owners.with_details.each do |owner, details|
              = render owner, highlight: details[:highlight]
          .col-xs-12
            = paginate @owners
        - else
          - if @type != "users" && !@scrapers_total_count.zero?
            .col-xs-12.col-md-3.list-filters
              .btn-group
                = link_to "Only scrapers with data", search_path(q: @q), class: "btn btn-default #{('active' unless @show == 'all')}"
                = link_to "All scrapers", search_path(q: @q, show: "all"), class: "btn btn-default #{('active' if @show == 'all')}"
            - if !@scrapers.total_count.zero?
              .col-xs-12.col-md-9
                - @scrapers.with_details.each do |scraper, details|
                  = render scraper, highlight: details[:highlight]
              .col-xs-12
                = paginate @scrapers

        - if @type == "users" && @owners.empty? && !@scrapers_total_count.zero?
          .col-xs-12
            .alert.alert-info
              Sorry, we couldn’t find any users relevant to your search term
              %strong “#{@q}”.
        - elsif @type != "users" && !@owners.empty? && @scrapers_total_count.zero?
          .col-xs-12
            .alert.alert-info
              Sorry, we couldn’t find any scrapers relevant to your search term
              %strong “#{@q}”.
        - elsif @type != "users" && @show != "all" && @scrapers.empty?
          .col-xs-12.col-md-9<commit_msg>Add heading to filters section<commit_after>.container
  %h1.label-heading
    Search
  = render partial: "search_form"

  - if @q
    - if !@scrapers_total_count.zero? || !@owners.empty?
      .search-results.row
        .col-xs-12
          %ul.search-type-nav.nav.nav-tabs
            %li{class: ('active' unless @type == "users"), role: "presentation"}
              = link_to search_path(q: @q, type: nil) do
                Scrapers
                %span.badge #{@scrapers_total_count}
            %li{class: ('active' if @type == "users"), role: "presentation"}
              = link_to search_path(q: @q, type: "users") do
                Users
                %span.badge #{@owners.total_count}

        - if @type == "users" && !@owners.total_count.zero?
          .col-xs-12
            - @owners.with_details.each do |owner, details|
              = render owner, highlight: details[:highlight]
          .col-xs-12
            = paginate @owners
        - else
          - if @type != "users" && !@scrapers_total_count.zero?
            .col-xs-12.col-md-3.list-filters
              %h2.h5.text-muted Filter scrapers
              .btn-group
                = link_to "Only scrapers with data", search_path(q: @q), class: "btn btn-default #{('active' unless @show == 'all')}"
                = link_to "All scrapers", search_path(q: @q, show: "all"), class: "btn btn-default #{('active' if @show == 'all')}"
            - if !@scrapers.total_count.zero?
              .col-xs-12.col-md-9
                - @scrapers.with_details.each do |scraper, details|
                  = render scraper, highlight: details[:highlight]
              .col-xs-12
                = paginate @scrapers

        - if @type == "users" && @owners.empty? && !@scrapers_total_count.zero?
          .col-xs-12
            .alert.alert-info
              Sorry, we couldn’t find any users relevant to your search term
              %strong “#{@q}”.
        - elsif @type != "users" && !@owners.empty? && @scrapers_total_count.zero?
          .col-xs-12
            .alert.alert-info
              Sorry, we couldn’t find any scrapers relevant to your search term
              %strong “#{@q}”.
        - elsif @type != "users" && @show != "all" && @scrapers.empty?
          .col-xs-12.col-md-9
{'fraction_non_alphanumeric': 0.14796711841812932, 'fraction_numerical': 0.010219951121972895, 'mean_word_length': 1.7334547662416515, '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': '501445', 'n_tokens_mistral': 1455, 'n_tokens_neox': 1416, 'n_words': 322}