<commit_before>class HomeController < ApplicationController

  layout "frontend"

  helper_method :sort_column, :sort_direction

  #general static pages:
  def pages
    if ( /\A([-a-zA-Z_\/]+)\Z/.match(params[:name]))
      respond_to do |format|
        template = "home/pages/#{$1}"

        layout = "static_pages"

        authorize! :show, template

        format.html do
          begin
            render template, :layout => layout
          rescue ActionView::MissingTemplate
            begin
              render "#{template}/index", :layout => layout
            rescue ActionView::MissingTemplate
              raise_404
            end
          end
        end
      end
    else
      raise_404
    end
  end

  before_filter :redirect_logged_in_user, only: :index
  def redirect_logged_in_user
    redirect_to after_sign_in_path_for(current_user) and return false if user_signed_in?
  end

  before_filter :accepts_html_instead_of_stars, only: [:index]
  def accepts_html_instead_of_stars
    # If the request 'Content Accept' header indicates a '*/*' format,
    # we set the format to :html.
    # This is necessary for GoogleBot which requests / with '*/*; q=0.6' for example.
    if request.format.to_s =~ %r%\*\/\*%
      request.format = :html
    end
  end

  def index
    @code = params[:code] if ( /\A([-a-zA-Z0-9_]+)\Z/.match(params[:code]))
    mp_track "Pageview: Landing page"
    render "home/pages/index", layout: "static_pages"
  end
end<commit_msg>Removed mp track from landing page<commit_after>class HomeController < ApplicationController

  layout "frontend"

  helper_method :sort_column, :sort_direction

  #general static pages:
  def pages
    if ( /\A([-a-zA-Z_\/]+)\Z/.match(params[:name]))
      respond_to do |format|
        template = "home/pages/#{$1}"

        layout = "static_pages"

        authorize! :show, template

        format.html do
          begin
            render template, :layout => layout
          rescue ActionView::MissingTemplate
            begin
              render "#{template}/index", :layout => layout
            rescue ActionView::MissingTemplate
              raise_404
            end
          end
        end
      end
    else
      raise_404
    end
  end

  before_filter :redirect_logged_in_user, only: :index
  def redirect_logged_in_user
    redirect_to after_sign_in_path_for(current_user) and return false if user_signed_in?
  end

  before_filter :accepts_html_instead_of_stars, only: [:index]
  def accepts_html_instead_of_stars
    # If the request 'Content Accept' header indicates a '*/*' format,
    # we set the format to :html.
    # This is necessary for GoogleBot which requests / with '*/*; q=0.6' for example.
    if request.format.to_s =~ %r%\*\/\*%
      request.format = :html
    end
  end

  def index
    @code = params[:code] if ( /\A([-a-zA-Z0-9_]+)\Z/.match(params[:code]))
    render "home/pages/index", layout: "static_pages"
  end
end
{'fraction_non_alphanumeric': 0.10599390450389434, 'fraction_numerical': 0.007450050795800881, 'mean_word_length': 2.483490566037736, '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': '6330832', 'n_tokens_mistral': 936, 'n_tokens_neox': 893, 'n_words': 238}