<commit_before>class ApplicationController < ActionController::Base

  protect_from_forgery
  before_filter :set_locale

  helper_method :after_sign_in_path_for

  # pick the locale from ?locale=X in the url,  a prettier
  # solution might be used down the line, maybe depending
  # on the ui or user preferences maybe.
  def set_locale
    I18n.locale = params[:locale] || I18n.default_locale
  end

  # maintain the locale param on any urls
  def default_url_options(options={})
    # { :locale => I18n.locale }
    {}
  end

  def home
    @surveys = Survey.available_to_complete
    respond_to do |format|
      format.html { render '/home/index' }
    end
  end

  def status
    @job_count = Delayed::Job.count

    within_last_month = (Time.now - 1.month)..Time.now

    @counts = {
      'Published Certificates' =>            Certificate.where(published: true).count,<commit_msg>added unpublished responses and datasets<commit_after>class ApplicationController < ActionController::Base

  protect_from_forgery
  before_filter :set_locale

  helper_method :after_sign_in_path_for

  # pick the locale from ?locale=X in the url,  a prettier
  # solution might be used down the line, maybe depending
  # on the ui or user preferences maybe.
  def set_locale
    I18n.locale = params[:locale] || I18n.default_locale
  end

  # maintain the locale param on any urls
  def default_url_options(options={})
    # { :locale => I18n.locale }
    {}
  end

  def home
    @surveys = Survey.available_to_complete
    respond_to do |format|
      format.html { render '/home/index' }
    end
  end

  def status
    @job_count = Delayed::Job.count

    within_last_month = (Time.now - 1.month)..Time.now

    @counts = {
      'All Certificates' =>                  Certificate.count,
      'All Certificates This Month' =>       Certificate.where(created_at: within_last_month).count,
      'All Datasets' =>                      ResponseSet.select("DISTINCT(dataset_id)").count,
      'All Datasets This Month' =>           ResponseSet.select("DISTINCT(dataset_id)").where(created_at: within_last_month).count,
      'Published Certificates' =>            Certificate.where(published: true).count,
{'fraction_non_alphanumeric': 0.09202733485193622, 'fraction_numerical': 0.006378132118451025, 'mean_word_length': 3.135593220338983, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '6189417', 'n_tokens_mistral': 692, 'n_tokens_neox': 656, 'n_words': 173}