<commit_before>#data-table
  - if scraper.database.valid?
    - active_table = scraper.database.first_table_name

    - if active_table
      %header.data-header
        %h3 Data
        %p.scraper-data-usage
          %strong 1934 downloads
          by
          %strong 3 users.

      %ul.nav.nav-tabs
        - scraper.database.table_names.each do |table|
          %li{class: ("active" if table == active_table)}
            = link_to table, "#table_#{table}", data: {toggle: "tab"}

      .tab-content
        - scraper.database.table_names.each do |table|
          .tab-pane{class: ("active" if table == active_table), id: "table_#{table}"}
            - rows = scraper.database.first_ten_rows(table)
            %p
              - unless signed_in?
                To download data
                = button_link_to "sign in with GitHub", user_omniauth_authorize_path(:github)
              .btn-group
                = button_link_to "Download table (as CSV)", data_scraper_path(scraper, format: :csv, query: scraper.database.select_all(table), key: (current_user.api_key if current_user)), disabled: !signed_in?
                = button_link_to "Download SQLite database (#{number_to_human_size scraper.database.sqlite_db_size})", data_scraper_path(scraper, :format => :sqlite, key: (current_user.api_key if current_user)), disabled: !signed_in?<commit_msg>show the downloaders' avatars instead of just count (prototyp)<commit_after>#data-table
  - if scraper.database.valid?
    - active_table = scraper.database.first_table_name

    - if active_table
      %header.data-header
        %h3 Data
        %p.scraper-data-usage
          %strong 1934 downloads
          by
          - # TODO: change this to show people/orgs who downloaded, not contributors
          - scraper.contributors.each do |contributor|
            = link_to contributor do
              = owner_image(contributor, 30)

      %ul.nav.nav-tabs
        - scraper.database.table_names.each do |table|
          %li{class: ("active" if table == active_table)}
            = link_to table, "#table_#{table}", data: {toggle: "tab"}

      .tab-content
        - scraper.database.table_names.each do |table|
          .tab-pane{class: ("active" if table == active_table), id: "table_#{table}"}
            - rows = scraper.database.first_ten_rows(table)
            %p
              - unless signed_in?
                To download data
                = button_link_to "sign in with GitHub", user_omniauth_authorize_path(:github)
              .btn-group
                = button_link_to "Download table (as CSV)", data_scraper_path(scraper, format: :csv, query: scraper.database.select_all(table), key: (current_user.api_key if current_user)), disabled: !signed_in?
                = button_link_to "Download SQLite database (#{number_to_human_size scraper.database.sqlite_db_size})", data_scraper_path(scraper, :format => :sqlite, key: (current_user.api_key if current_user)), disabled: !signed_in?
{'fraction_non_alphanumeric': 0.11073825503355705, 'fraction_numerical': 0.00436241610738255, 'mean_word_length': 2.5361803084223014, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3726507', 'n_tokens_mistral': 935, 'n_tokens_neox': 899, 'n_words': 202}