<commit_before>class MeasurementsController < ApplicationController
  respond_to :json
  before_filter :find_keg

  def index
    respond_with(@keg.measurements)
  end

  def show
    measurement = @keg.measurements.find(params[:id])
    respond_with([@keg, measurement])
  end

  def create
    measurement_params = ActiveSupport::JSON.decode(params[:keg]).reject{|k, v| v.blank?}
    Rails.logger.info measurement_params
    measurement = @keg.measurements.create(measurement_params)
    respond_with([@keg, measurement])
  end

  private

  def find_keg
    @keg = Keg.find(params[:keg_id])
  end
end
<commit_msg>stuff<commit_after>class MeasurementsController < ApplicationController
  respond_to :json
  before_filter :find_keg

  def index
    respond_with(@keg.measurements)
  end

  def show
    measurement = @keg.measurements.find(params[:id])
    respond_with([@keg, measurement])
  end

  def create
    measurement_params = ActiveSupport::JSON.decode(params[:keg]).reject{|k, v| v.blank?}
    Rails.logger.info("Fancy things: " + measurement_params)
    measurement = @keg.measurements.create(measurement_params)
    respond_with([@keg, measurement])
  end

  private

  def find_keg
    @keg = Keg.find(params[:keg_id])
  end
end

{'fraction_non_alphanumeric': 0.10771704180064309, 'fraction_numerical': 0.0, 'mean_word_length': 4.413043478260869, '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': '6259652', 'n_tokens_mistral': 420, 'n_tokens_neox': 408, 'n_words': 77}