<commit_before>require "sinatra"
require "sinatra/reloader" if development?
require "twitter"
require "oauth"
require 'dotenv'
Dotenv.load

configure do
    use Rack::Session::Cookie, secret: Digest::SHA256.hexdigest(rand.to_s)
end

before do
    @consumer = OAuth::Consumer.new(
        ENV["CONSUMER_KEY"],
        ENV["CONSUMER_SECRET"],
        site: "https://api.twitter.com",
        authorize_path: "/oauth/authenticate"
    )
end

get "/" do<commit_msg>authenticate to authorize<commit_after>require "sinatra"
require "sinatra/reloader" if development?
require "twitter"
require "oauth"
require 'dotenv'
Dotenv.load

configure do
    use Rack::Session::Cookie, secret: Digest::SHA256.hexdigest(rand.to_s)
end

before do
    @consumer = OAuth::Consumer.new(
        ENV["CONSUMER_KEY"],
        ENV["CONSUMER_SECRET"],
        site: "https://api.twitter.com"
    )
end

get "/" do
{'fraction_non_alphanumeric': 0.133032694475761, 'fraction_numerical': 0.006764374295377677, 'mean_word_length': 3.9608938547486034, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '3235985', 'n_tokens_mistral': 321, 'n_tokens_neox': 301, 'n_words': 65}