<commit_before># -*- coding: utf-8 -*-

# Model-less controller for dashboard data from other models
class DashboardController < ApplicationController
  before_action :require_user

  COMBINED_FEED_ENTRIES_LIMIT = 30
  CATEGORY_FEED_ENTRIES_LIMIT = 5

  def index
    if current_user.combined_feed_stream
      @entries_limit = COMBINED_FEED_ENTRIES_LIMIT
      @combined_entries  = FeedEntry.from_feeds(current_user.combined_feed_ids, limit: @entries_limit)
    else
      @entries_limit = CATEGORY_FEED_ENTRIES_LIMIT
      @news_entries      = feed_entries_from_category("news", limit: @entries_limit)
      @dialog_entries    = feed_entries_from_category("dialog", limit: @entries_limit)
      @my_own_entries    = feed_entries_from_category("my_own", limit: @entries_limit)
    end

    @feature           = featured_news_entry
    @tools_and_systems = shortcuts_from_category("tools_and_systems")
    @i_want            = shortcuts_from_category("i_want")<commit_msg>Changed combined feed entries to 15<commit_after># -*- coding: utf-8 -*-

# Model-less controller for dashboard data from other models
class DashboardController < ApplicationController
  before_action :require_user

  COMBINED_FEED_ENTRIES_LIMIT = 15
  CATEGORY_FEED_ENTRIES_LIMIT = 5

  def index
    if current_user.combined_feed_stream
      @entries_limit = COMBINED_FEED_ENTRIES_LIMIT
      @combined_entries  = FeedEntry.from_feeds(current_user.combined_feed_ids, limit: @entries_limit)
    else
      @entries_limit = CATEGORY_FEED_ENTRIES_LIMIT
      @news_entries      = feed_entries_from_category("news", limit: @entries_limit)
      @dialog_entries    = feed_entries_from_category("dialog", limit: @entries_limit)
      @my_own_entries    = feed_entries_from_category("my_own", limit: @entries_limit)
    end

    @feature           = featured_news_entry
    @tools_and_systems = shortcuts_from_category("tools_and_systems")
    @i_want            = shortcuts_from_category("i_want")
{'fraction_non_alphanumeric': 0.07426246185147507, 'fraction_numerical': 0.00508646998982706, 'mean_word_length': 4.3743169398907105, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6068888', 'n_tokens_mistral': 646, 'n_tokens_neox': 627, 'n_words': 108}