<commit_before>
require 'sinatra'
require 'sequel'

if ENV['DATABASE_URL'].nil?
  raise ArgumentError, "Missing DATABASE_URL from environment!"
end

DATABASE_URL = ENV["DATABASE_URL"]

DB = Sequel.connect(DATABASE_URL,
  test: true,
  pool_timeout: 2,
  connect_timeout: 2,
  sslmode: 'require')
DB.extension :pg_json

require './models'

get '/' do
  "Ops Changelog"
end

get '/events' do
  DB[:events].inspect
end

<commit_msg>select all events<commit_after>
require 'sinatra'
require 'sequel'

if ENV['DATABASE_URL'].nil?
  raise ArgumentError, "Missing DATABASE_URL from environment!"
end

DATABASE_URL = ENV["DATABASE_URL"]

DB = Sequel.connect(DATABASE_URL,
  test: true,
  pool_timeout: 2,
  connect_timeout: 2,
  sslmode: 'require')
DB.extension :pg_json

require './models'

get '/' do
  "Ops Changelog"
end

get '/events' do
  DB[:events].all.inspect
end


{'fraction_non_alphanumeric': 0.1258660508083141, 'fraction_numerical': 0.004618937644341801, 'mean_word_length': 4.858108108108108, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1278791', 'n_tokens_mistral': 339, 'n_tokens_neox': 329, 'n_words': 82}