<commit_before>load 'Rakefile'
require "rack-timeout"
use Rack::Timeout
Rack::Timeout.timeout = 500

while !Rake::Task['db:rollback'].invoke.nil?
  Rake::Task['db:migrate'].invoke
  Rake::Task['db:seed'].invoke
end

class Service < Engine::Server
  get '/' do
    content_type :json
    handle_get params
  end

  post '/' do
    content_type :json
    handle_post params
  end
end

run Service
<commit_msg>server<commit_after>load 'Rakefile'
require "rack-timeout"
use Rack::Timeout
Rack::Timeout.timeout = 500

while !Rake::Task['db:rollback'].invoke.nil?
  Rake::Task['db:migrate'].invoke
  Rake::Task['db:seed'].invoke
end

class Service < Engine::Server
  get '/' do
    content_type :json
    params[:response] = handle_get params
    params.to_json
  end

  post '/' do
    content_type :json
    response = handle_post params
    { response:response }.to_json
  end
end

run Service

{'fraction_non_alphanumeric': 0.12794612794612795, 'fraction_numerical': 0.006734006734006734, 'mean_word_length': 4.15606936416185, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7601649', 'n_tokens_mistral': 316, 'n_tokens_neox': 307, 'n_words': 71}