<commit_before># sequenceserver.rb

$LOAD_PATH.unshift(File.dirname(__FILE__))

require 'rubygems'
require 'sinatra/base'
require 'yaml'
require 'logger'
require 'lib/helpers'
require 'lib/blast.rb'
require 'lib/sequencehelpers.rb'
require 'lib/sinatralikeloggerformatter.rb'
require 'customisation'

# Helper module - initialize the blast server.
module SequenceServer
  class App < Sinatra::Base
    include Helpers
    include SequenceHelpers
    include SequenceServer::Customisation

    # Basic configuration settings for app.
    configure do
      # enable some builtin goodies
      enable :session, :logging

      # base setting; Sinatra can then figure :root, :public, and :views itself
      set :app_file,   __FILE__

      # run with builin server when invoked directly (ruby search.rb)
      set :run,        Proc.new { app_file == $0 }

      set :log,        Proc.new { Logger.new(STDOUT) }
      log.formatter = SinatraLikeLogFormatter.new()

      set :environment, :development<commit_msg>deploy: log to `STDERR` instead of `STDOUT` (fix #60)<commit_after># sequenceserver.rb

$LOAD_PATH.unshift(File.dirname(__FILE__))

require 'rubygems'
require 'sinatra/base'
require 'yaml'
require 'logger'
require 'lib/helpers'
require 'lib/blast.rb'
require 'lib/sequencehelpers.rb'
require 'lib/sinatralikeloggerformatter.rb'
require 'customisation'

# Helper module - initialize the blast server.
module SequenceServer
  class App < Sinatra::Base
    include Helpers
    include SequenceHelpers
    include SequenceServer::Customisation

    # Basic configuration settings for app.
    configure do
      # enable some builtin goodies
      enable :session, :logging

      # base setting; Sinatra can then figure :root, :public, and :views itself
      set :app_file,   __FILE__

      # run with builin server when invoked directly (ruby search.rb)
      set :run,        Proc.new { app_file == $0 }

      set :log,        Proc.new { Logger.new(STDERR) }
      log.formatter = SinatraLikeLogFormatter.new()

      set :environment, :development
{'fraction_non_alphanumeric': 0.09029126213592233, 'fraction_numerical': 0.001941747572815534, 'mean_word_length': 3.5698447893569845, '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': '575589', 'n_tokens_mistral': 629, 'n_tokens_neox': 593, 'n_words': 185}