<commit_before>class ApplicationController < ActionController::Base
  # Prevent CSRF attacks by raising an exception.
  # For APIs, you may want to use :null_session instead.
  protect_from_forgery with: :exception

  before_filter :no_bot

  private

  def no_bot
    if request.remote_ip == '172.16.17.32'
      redirect_to 'http://www.google.com'
    end
  end

  def gate_keeper
      if session[:visitor] == 'admin'
      # if current_visitor
      else

        # Galileo.create(:controller => 'gate_keeper',
        #                :view => 'unauthorized',
        #                :user_id => request.remote_ip,
        #                :session => request.session_options[:id])

        flash[:error] = "You must be logged in to access this section"
        redirect_to root_path
      end
    end

end<commit_msg>bot block<commit_after>class ApplicationController < ActionController::Base
  # Prevent CSRF attacks by raising an exception.
  # For APIs, you may want to use :null_session instead.
  protect_from_forgery with: :exception

  before_filter :no_bot

  private

  def no_bot
    if ['172.16.17.32', '172.16.31.10'].include? request.remote_ip
      redirect_to 'http://www.google.com'
    end
  end

  def gate_keeper
      if session[:visitor] == 'admin'
      # if current_visitor
      else

        # Galileo.create(:controller => 'gate_keeper',
        #                :view => 'unauthorized',
        #                :user_id => request.remote_ip,
        #                :session => request.session_options[:id])

        flash[:error] = "You must be logged in to access this section"
        redirect_to root_path
      end
    end

end
{'fraction_non_alphanumeric': 0.09472422062350119, 'fraction_numerical': 0.01618705035971223, 'mean_word_length': 2.2984189723320156, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 3, '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': '6707174', 'n_tokens_mistral': 519, 'n_tokens_neox': 479, 'n_words': 131}