<commit_before>class TankosController < ApplicationController

  def index
    @tankos = Tanko.all
  end

  def new
    @templates = Tanko.where(template: [true])
    @tanko = Tanko.new
  end

  def edit
    @tanko = Tanko.find(params[:id])
  end

  def show
    @tanko = Tanko.find(params[:id])
    @containers_list = @tanko.containers.all
    
    response = HTTParty.get('http://172.17.42.1:4001/v2/keys/contanko/tanko/36/fe')
    @body = JSON.parse(response.body)
    
     
   end

  def create
    @tanko = Tanko.new(tanko_params)
    if @tanko.save

    if tanko_params[:metadata].length > 1
       @tanko_template = Tanko.find(tanko_params[:metadata])
       @containers_list = @tanko_template.containers.all
       
       pass=nil
       dbserver=nil
       dp_ins_type=""
       @containers_list.each do |container_template|
        
    #@tanko = Tanko.find(params[:tanko_id])                                                                                                                                
                                                                                                                                                                           
    #cp = container_params                                                                                                                                                 
    #dp_ins_type=""                                                                                                                                                        
    #if params[:custom_image_name].length > 1                                                                                                                              
    #  cp[:image_name] = params[:custom_image_name]                                                                                                                        
    #end                                                                                                                                                                   
                                                                                                                                                                           
    #if container_params[:shared_vol].length > 1                                                                                                                           
    #@shared_vol = @tanko.containers.find(container_params[:shared_vol])                                                                                                   
    #cp[:shared_vol] = @tanko.id.to_s + @shared_vol.instance_name + @shared_vol.id.to_s                                                                                    <commit_msg>clean up<commit_after>class TankosController < ApplicationController

  def index
    @tankos = Tanko.all
  end

  def new
    @templates = Tanko.where(template: [true])
    @tanko = Tanko.new
  end

  def edit
    @tanko = Tanko.find(params[:id])
  end

  def show
    @tanko = Tanko.find(params[:id])
    @containers_list = @tanko.containers.all
    
    #response = HTTParty.get('http://172.17.42.1:4001/v2/keys/contanko/tanko/36/fe')
    #@body = JSON.parse(response.body)
    
     
   end

  def create
    @tanko = Tanko.new(tanko_params)
    if @tanko.save

    if tanko_params[:metadata].length > 1
       @tanko_template = Tanko.find(tanko_params[:metadata])
       @containers_list = @tanko_template.containers.all
       
       pass=<PASSWORD>
       dbserver=nil
       dp_ins_type=""
       @containers_list.each do |container_template|
        
    #@tanko = Tanko.find(params[:tanko_id])                                                                                                                                
                                                                                                                                                                           
    #cp = container_params                                                                                                                                                 
    #dp_ins_type=""                                                                                                                                                        
    #if params[:custom_image_name].length > 1                                                                                                                              
    #  cp[:image_name] = params[:custom_image_name]                                                                                                                        
    #end                                                                                                                                                                   
                                                                                                                                                                           
    #if container_params[:shared_vol].length > 1                                                                                                                           
    #@shared_vol = @tanko.containers.find(container_params[:shared_vol])                                                                                                   
    #cp[:shared_vol] = @tanko.id.to_s + @shared_vol.instance_name + @shared_vol.id.to_s                                                                                    
{'fraction_non_alphanumeric': 0.05890909090909091, 'fraction_numerical': 0.006545454545454545, 'mean_word_length': 0.5306065664997217, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 124, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6628783', 'n_tokens_mistral': 1018, 'n_tokens_neox': 947, 'n_words': 143}