<commit_before>require 'sinatra'
require 'sqlite3'

# config
set :bind, '0.0.0.0'
db = SQLite3::Database.new("data.db")

# routes
get '/' do
  library = db.execute("select * from movies order by title")
  erb :index, :locals => {:library => library}
end
<commit_msg>missed this in last commit:<commit_after>require 'sinatra'
require 'sqlite3'

# config
set :bind, '0.0.0.0'
db = SQLite3::Database.new("data.db")

# routes
get '/' do
  puts params

  order = params["sort"]
  order = "title" if order.nil?

  library = db.execute("select * from movies order by #{order}")
  erb :index, :locals => {:library => library}
end

{'fraction_non_alphanumeric': 0.16720257234726688, 'fraction_numerical': 0.01929260450160772, 'mean_word_length': 4.279661016949152, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '849283', 'n_tokens_mistral': 230, 'n_tokens_neox': 227, 'n_words': 64}