<commit_before>require 'guillotine'
require 'redis'
require 'haml'

module Katana
    class App < Guillotine::App
      # use redis adapter with redistogo
      uri = URI.parse(ENV["REDISCLOUD_URL"])
      REDIS = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password)
      adapter = Guillotine::Adapters::RedisAdapter.new REDIS
      set :service => Guillotine::Service.new(adapter, :strip_query => false,
                                              :strip_anchor => false)

      get '/' do
        haml :index
      end

      if ENV['TWEETBOT_API']
        # experimental (unauthenticated) API endpoint for tweetbot<commit_msg>update deprecated guillotine<commit_after>require 'guillotine'
require 'redis'
require 'haml'

module Katana
    class App < Guillotine::App
      # use redis adapter with redistogo
      uri = URI.parse(ENV["REDISCLOUD_URL"])
      REDIS = Redis.new(:host => uri.host, :port => uri.port, :password => <PASSWORD>.password)
      adapter = Guillotine::RedisAdapter.new REDIS
      set :service => Guillotine::Service.new(adapter, :strip_query => false,
                                              :strip_anchor => false)

      get '/' do
        haml :index
      end

      if ENV['TWEETBOT_API']
        # experimental (unauthenticated) API endpoint for tweetbot
{'fraction_non_alphanumeric': 0.10909090909090909, 'fraction_numerical': 0.0, 'mean_word_length': 2.5415549597855227, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4746858', 'n_tokens_mistral': 409, 'n_tokens_neox': 385, 'n_words': 97}