<commit_before>require 'csv'
class IntervalsController < ApplicationController
        protect_from_forgery except: :create      
        def create
                file = params[:file]
                file_path = file.path
                result = 0
		max = 0
		num = 0
                CSV.foreach(file_path) do |row|
			while(true)
				for i in num..(num+30)
                        		result += row[0].to_f
				end
				if num == 0
					max = result.to_f
				end
				else
					if max < result
						max = result.to_f
					end
				end
				num += 1
				
			end
                end
                max = max.ceil
                render plain: "%.2f"%max
        end
end


<commit_msg>Some fix<commit_after>require 'csv'
class IntervalsController < ApplicationController
        protect_from_forgery except: :create      
        def create
                file = params[:file]
                file_path = file.path
                result = 0
		max = 0
		num = 0
                CSV.foreach(file_path) do |row|
		
				for i in num..(num+30)
                        		result += row[0].to_f
				end
				if num == 0
					max = result.to_f
				end
				else
					if max < result
						max = result.to_f
					end
				end
				num += 1
				
			
                end
                max = max.ceil
                render plain: "%.2f"%max
        end
end



{'fraction_non_alphanumeric': 0.0744047619047619, 'fraction_numerical': 0.013392857142857142, 'mean_word_length': 1.152, 'pattern_counts': {'":': 0, '<': 7, '<?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': '808442', 'n_tokens_mistral': 516, 'n_tokens_neox': 389, 'n_words': 111}