<commit_before>class DistGroupController < ApplicationController
  before_action :authenticate_user!

  def new
  end

  def show
    @dist_groups = DistGroup.all
  end

  def destroy
    @dist_group.destroy
  end

  # POST /dist_groups
  # POST /dist_groups.json
  def create
    @dist_group = DisGroup.new(dist_group_params)
    @dname = @dist_group.distname

    respond_to do |format|
      if @dist_group.save
        make_keypair
        # make_file


        format.html { redirect_to @dist_group, notice: 'Dis group was successfully created.' }
        format.json { render :@dist_group, status: :created, location: @dist_group }
      else
        format.html { render :new }
        format.json { render json: @dist_group.errors, status: :unprocessable_entity }
      end
    end
  end

  private
  # Use callbacks to share common setup or constraints between actions.
  def set_dist_group
    @dist_group = DistGroup.find(params[:id])
  end

  # Never trust parameters from the scary internet, only allow the white list through.
  def dist_group_params
    params.require(:dist_group).permit(:distname)
  end<commit_msg>Added index function<commit_after>class DistGroupController < ApplicationController
  before_action :authenticate_user!

  def index
    @dist_group = DistGroup.all
  end

  def new
  end

  def show
    @dist_groups = DistGroup.all
  end

  def destroy
    @dist_group.destroy(params[:id])
  end

  # POST /dist_groups
  # POST /dist_groups.json
  def create
    @dist_group = DistGroup.new(dist_group_params)
    @dname = @dist_group.distname

    respond_to do |format|
      if @dist_group.save
        make_keypair
        # make_file


        format.html { redirect_to @dist_group, notice: 'Dis group was successfully created.' }
        format.json { render :@dist_group, status: :created, location: @dist_group }
      else
        format.html { render :new }
        format.json { render json: @dist_group.errors, status: :unprocessable_entity }
      end
    end
  end

  private
  # Use callbacks to share common setup or constraints between actions.
  def set_dist_group
    @dist_group = DistGroup.find(params[:id])
  end

  # Never trust parameters from the scary internet, only allow the white list through.
  def dist_group_params
    params.require(:dist_group).permit(:distname)
  end
{'fraction_non_alphanumeric': 0.07540702656383891, 'fraction_numerical': 0.0, 'mean_word_length': 3.1036906854130053, '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': '5094590', 'n_tokens_mistral': 723, 'n_tokens_neox': 695, 'n_words': 198}