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

  - if @q
    - if !@scrapers_total_count.zero? || @owners.any?
      .search-results
        %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.with_details.each do |owner, details|
            = render owner, highlight: details[:highlight]
          = paginate @owners
        - else
          .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')}"
          - @scrapers.with_details.each do |scraper, details|
            = render scraper, highlight: details[:highlight]
          = paginate @scrapers

        - if @type == "users" && @owners.empty? && !@scrapers_total_count.zero?
          .alert.alert-info
            Sorry, we couldn’t find any users relevant to your search term
            %strong “#{@q}”.
        - elsif @type != "users" && @scrapers_total_count.zero? && @owners.any?
          .alert.alert-info
            Sorry, we couldn’t find any scrapers relevant to your search term<commit_msg>Only show 'has_data?' filters if there are scraper results<commit_after>.container
  %h1.label-heading
    Search
  = render partial: "search_form"

  - if @q
    - if !@scrapers_total_count.zero? || @owners.any?
      .search-results
        %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.with_details.each do |owner, details|
            = render owner, highlight: details[:highlight]
          = paginate @owners
        - else
          - if @type != "users" && !@scrapers_total_count.zero?
            .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')}"
          - @scrapers.with_details.each do |scraper, details|
            = render scraper, highlight: details[:highlight]
          = paginate @scrapers

        - if @type == "users" && @owners.empty? && !@scrapers_total_count.zero?
          .alert.alert-info
            Sorry, we couldn’t find any users relevant to your search term
            %strong “#{@q}”.
        - elsif @type != "users" && @scrapers_total_count.zero? && @owners.any?
          .alert.alert-info
            Sorry, we couldn’t find any scrapers relevant to your search term
{'fraction_non_alphanumeric': 0.1431864016133679, 'fraction_numerical': 0.0005762028233938346, 'mean_word_length': 2.2088724584103514, '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': '3082767', 'n_tokens_mistral': 1075, 'n_tokens_neox': 1068, 'n_words': 279}