<commit_before>$stdout.sync = true

require 'sinatra'
require 'sinatra/reloader' if development?
require 'sinatra/activerecord'
require 'rack-flash'
require 'haml'

require './pingpong_config'
config = PingpongConfig

enable :sessions
use Rack::Flash

set :database_file, "database.yml"

if http_username = config[:http_username]
  use Rack::Auth::Basic, "Pingpong Pros Only!" do |username, password|
    username == config[:http_username] and password == config[:http_password]
  end
end

get '/' do
  @config = config
  @notice = flash[:notice]<commit_msg>update timezone to UTC for ActiveRecord<commit_after>$stdout.sync = true

require 'sinatra'
require 'sinatra/reloader' if development?
require 'sinatra/activerecord'
# Adding this to make sure that Timezones get formatted correctly http://pivotallabs.com/utc-vs-ruby-activerecord-sinatra-heroku-and-postgres/
Time.zone = 'UTC'
ActiveRecord::Base.default_timezone = :utc
require 'rack-flash'
require 'haml'

require './pingpong_config'
config = PingpongConfig

enable :sessions
use Rack::Flash

set :database_file, "database.yml"

if http_username = config[:http_username]
  use Rack::Auth::Basic, "Pingpong Pros Only!" do |username, password|
    username == config[:http_username] and password == config[:http_password]
  end
end

get '/' do
  @config = config
  @notice = flash[:notice]
{'fraction_non_alphanumeric': 0.11812778603268945, 'fraction_numerical': 0.0, 'mean_word_length': 5.6683168316831685, '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': '426690', 'n_tokens_mistral': 450, 'n_tokens_neox': 430, 'n_words': 117}