<commit_before>#!/usr/bin/env ruby
# I don't want folks to have to learn to use yet another tool (rackup)
# just to launch logstash-web. So let's work like a standard ruby
# library.


$:.unshift("%s/../lib" % File.dirname(__FILE__))
$:.unshift(File.dirname(__FILE__))

require "json" # gem json
require "logstash/namespace"
require "logstash/search/elasticsearch"
require "logstash/search/query"
require "logstash/web/controllers/api_v1"
require "logstash/web/controllers/search"
require "logstash/web/controllers/static_files"
require "logstash/web/helpers/require_param"
require "optparse"
require "rack" # gem rack
require "sinatra/base" # gem sinatra

Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8<commit_msg>- explicitly load haml and sass to avoid warnings like this later:     WARN: tilt autoloading 'haml' in a non thread-safe way; explicit require       'haml' suggested.     WARN: tilt autoloading 'sass' in a non thread-safe way; explicit require       'sass' suggested.<commit_after>#!/usr/bin/env ruby
# I don't want folks to have to learn to use yet another tool (rackup)
# just to launch logstash-web. So let's work like a standard ruby
# library.


$:.unshift("%s/../lib" % File.dirname(__FILE__))
$:.unshift(File.dirname(__FILE__))

require "json" # gem json
require "logstash/namespace"
require "logstash/search/elasticsearch"
require "logstash/search/query"
require "logstash/web/controllers/api_v1"
require "logstash/web/controllers/search"
require "logstash/web/controllers/static_files"
require "logstash/web/helpers/require_param"
require "optparse"
require "rack" # gem rack
require "sinatra/base" # gem sinatra
require "haml"
require "sass"

Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
{'fraction_non_alphanumeric': 0.11574846967167501, 'fraction_numerical': 0.00333889816360601, 'mean_word_length': 5.3087719298245615, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4893901', 'n_tokens_mistral': 596, 'n_tokens_neox': 579, 'n_words': 166}