<commit_before>class Api::ArticlesController < ApplicationController
  before_action :authenticate_user!

  def index
    @feeds = Feed.where(user_id: current_user)
    @feeds.each { |feed| feed.update_articles }
    @articles = Article
                .where(feed_id: @feeds.map{ |f| f.id })
                .order(published_at: :desc)

    respond_to do |format|
      format.json { render json: zip_with_feeds(@articles) }
    end
  end

  def show<commit_msg>limit to 25 articles<commit_after>class Api::ArticlesController < ApplicationController
  before_action :authenticate_user!

  def index
    @feeds = Feed.where(user_id: current_user)
    @feeds.each { |feed| feed.update_articles }
    @articles = Article
                .where(feed_id: @feeds.map{ |f| f.id })
                .order(published_at: :desc)
                .limit(25)

    respond_to do |format|
      format.json { render json: zip_with_feeds(@articles) }
    end
  end

  def show
{'fraction_non_alphanumeric': 0.103125, 'fraction_numerical': 0.004166666666666667, 'mean_word_length': 2.783464566929134, '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': '5819573', 'n_tokens_mistral': 325, 'n_tokens_neox': 302, 'n_words': 67}