<commit_before>class App < Sinatra::Application
  def column_hash
    summary = Hash.new{|hash, key| hash[key] = Array.new;}
    Database[session[:db]].columns.map{|x| summary[x[:column_name]] << x[:table_name]}
    summary
  end

  get "/columns" do
    data = column_hash.to_a.sort.to_h
    respond_to do |wants|
      wants.html { haml :columns, locals: { columns: data } }
      wants.json { data.to_json }
    end
  end

  get "/columns/:column_name" do
    haml :column, locals: {column: column_hash[params[:column_name]]}
  end
end<commit_msg>column lookups are now case insensitive<commit_after>class App < Sinatra::Application
  def column_hash
    summary = Hash.new{|hash, key| hash[key] = Array.new;}
    Database[session[:db]].columns.map{|x| summary[x[:column_name].downcase] << x[:table_name]}
    summary
  end

  get "/columns" do
    data = column_hash.to_a.sort.to_h
    respond_to do |wants|
      wants.html { haml :columns, locals: { columns: data } }
      wants.json { data.to_json }
    end
  end

  get "/columns/:column_name" do
    haml :column, locals: {column: column_hash[params[:column_name].downcase]}
  end
end
{'fraction_non_alphanumeric': 0.13636363636363635, 'fraction_numerical': 0.0, 'mean_word_length': 3.6169354838709675, 'pattern_counts': {'":': 0, '<': 9, '<?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': '1507181', 'n_tokens_mistral': 397, 'n_tokens_neox': 393, 'n_words': 90}