<commit_before>require 'rack'
require 'amqp'
require 'rack/content_length'
require 'rack/rewindable_input'

raw = File.read(ARGV[0])
app = eval("Rack::Builder.new {( #{raw} )}.to_app")
racked_app = Rack::Builder.new do
  use Rack::ContentLength
  use Rack::Chunked
  use Rack::CommonLogger, $stderr
  use Rack::Lint
  run app
end.to_app

def handle_request(app, uri)
  parts = uri.split(/\?/)
  uri = parts[0]
  query = parts[1] || ""
  env = ENV.to_hash
  env.update({
    "rack.version" => Rack::VERSION,
    "rack.input" => Rack::RewindableInput.new($stdin),
    "rack.errors" => $stderr,

    "rack.multithread" => false,
    "rack.multiprocess" => true,
    "rack.run_once" => true,

    "rack.url_scheme" => ["yes", "on", "1"].include?(ENV["HTTPS"]) ? "https" : "http",

    'REQUEST_METHOD' => 'GET',
    'SERVER_NAME' => 'howdy',
    'SERVER_PORT' => '8080',
    'PATH_INFO' => uri,
    'QUERY_STRING' => query,
    'HTTP_VERSION' => '1.1',
    'REQUEST_PATH' => uri,<commit_msg>removed linter for demo purposes<commit_after>require 'rack'
require 'amqp'
require 'rack/content_length'
require 'rack/rewindable_input'

raw = File.read(ARGV[0])
app = eval("Rack::Builder.new {( #{raw} )}.to_app")
racked_app = Rack::Builder.new do
  use Rack::ContentLength
  use Rack::Chunked
  use Rack::CommonLogger, $stderr
  run app
end.to_app

def handle_request(app, uri)
  parts = uri.split(/\?/)
  uri = parts[0]
  query = parts[1] || ""
  env = ENV.to_hash
  env.update({
    "rack.version" => Rack::VERSION,
    "rack.input" => Rack::RewindableInput.new($stdin),
    "rack.errors" => $stderr,

    "rack.multithread" => false,
    "rack.multiprocess" => true,
    "rack.run_once" => true,

    "rack.url_scheme" => ["yes", "on", "1"].include?(ENV["HTTPS"]) ? "https" : "http",

    'REQUEST_METHOD' => 'GET',
    'SERVER_NAME' => 'howdy',
    'SERVER_PORT' => '8080',
    'PATH_INFO' => uri,
    'QUERY_STRING' => query,
    'HTTP_VERSION' => '1.1',
    'REQUEST_PATH' => uri,
{'fraction_non_alphanumeric': 0.19635627530364372, 'fraction_numerical': 0.010121457489878543, 'mean_word_length': 3.8814814814814813, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 31, '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': '6361866', 'n_tokens_mistral': 792, 'n_tokens_neox': 758, 'n_words': 147}