<commit_before>load "lib/airport.rb"
AIRPORTS = Airport.get_airports

set :layout, false
page "*.json", :content_type => "application/json"

configure :development do
end

configure :build do
end

helpers do
  def airports
    AIRPORTS
  end
end

proxy_file = "airport.json"
ignore proxy_file
AIRPORTS.drop(1).each do |a|
  a.delete(:id)
  if a[:icao]
    proxy "/icao/#{a[:icao].to_s.downcase}.json", proxy_file, :locals => { :airport => a }
  end

  if a[:iata]
    proxy "/iata/#{a[:iata].to_s.downcase}.json", proxy_file, :locals => { :airport => a }
  end
end<commit_msg>simplify usage of airports in config.rb<commit_after>set :layout, false
page "*.json", :content_type => "application/json"

configure :development do
end

configure :build do
end

helpers do
end

proxy_file = "airport.json"
ignore proxy_file
load "lib/load_airports.rb"
load_airports.each do |a|
  a.delete(:id)
  if a[:icao]
    proxy "/icao/#{a[:icao].to_s.downcase}.json", proxy_file, :locals => { :airport => a }
  end
  if a[:iata]
    proxy "/iata/#{a[:iata].to_s.downcase}.json", proxy_file, :locals => { :airport => a }
  end
end
{'fraction_non_alphanumeric': 0.15813117699910154, 'fraction_numerical': 0.0008984725965858042, 'mean_word_length': 4.157407407407407, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '4242927', 'n_tokens_mistral': 437, 'n_tokens_neox': 432, 'n_words': 104}