<commit_before>class SubredditsController < ApplicationController
  def index
    @todays_graph_data = Comment.joins(:subreddit).group(:name).where( "commented_on >= ?", 
      Time.zone.now.beginning_of_day).where("reply_status != 'never'").count
    subreddits = Subreddit.where(name: @todays_graph_data.keys)

    subreddits.each do |subreddit|
      total_today = subreddit.comments.where( "commented_on >= ?", 
        Time.zone.now.beginning_of_day).count
      @todays_graph_data[subreddit.name] = (@todays_graph_data[subreddit.name] / total_today) * 100
    end
  end
end<commit_msg>Converted divisor to a float so that the quotient would be a float instead of an integer<commit_after>class SubredditsController < ApplicationController
  def index
    @todays_graph_data = Comment.joins(:subreddit).group(:name).where( "commented_on >= ?", 
      Time.zone.now.beginning_of_day).where("reply_status != 'never'").count
    subreddits = Subreddit.where(name: @todays_graph_data.keys)

    subreddits.each do |subreddit|
      total_today = subreddit.comments.where( "commented_on >= ?", 
        Time.zone.now.beginning_of_day).count
      @todays_graph_data[subreddit.name] = (@todays_graph_data[subreddit.name] / total_today.to_f) * 100
    end
  end
end
{'fraction_non_alphanumeric': 0.11806656101426308, 'fraction_numerical': 0.004754358161648178, 'mean_word_length': 4.443965517241379, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '3299259', 'n_tokens_mistral': 442, 'n_tokens_neox': 435, 'n_words': 69}