<commit_before>#!/usr/bin/env ruby

require 'logger'
require 'bundler'
Bundler.require

require_relative 'namespace_tools'

REDIS_PORT = ENV['REDIS_PORT'] || 6379
REDIS_HOST = ENV['REDIS_HOST'] || 'localhost'

GROUPED_HELP_FILE = File.expand_path("redis-doc/grouped_help.json", File.dirname(__FILE__))
GROUPED_HELP = JSON.parse File.read(GROUPED_HELP_FILE)

def production?
  ENV['RACK_ENV'] == 'production'
end

def development?
  ENV['RACK_ENV'] == 'development'
end

def test?
  ENV['RACK_ENV'] == 'test'
end


class TryRedis < Sinatra::Base
  #see the logging for development mode
  configure :development do
    enable  :logging
    disable :dump_errors<commit_msg>Use a fixed session secret in development<commit_after>#!/usr/bin/env ruby

require 'logger'
require 'bundler'
Bundler.require

require_relative 'namespace_tools'

REDIS_PORT = ENV['REDIS_PORT'] || 6379
REDIS_HOST = ENV['REDIS_HOST'] || 'localhost'

GROUPED_HELP_FILE = File.expand_path("redis-doc/grouped_help.json", File.dirname(__FILE__))
GROUPED_HELP = JSON.parse File.read(GROUPED_HELP_FILE)

def production?
  ENV['RACK_ENV'] == 'production'
end

def development?
  ENV['RACK_ENV'] == 'development'
end

def test?
  ENV['RACK_ENV'] == 'test'
end


class TryRedis < Sinatra::Base
  #see the logging for development mode
  configure :development do
    enable  :logging
    disable :dump_errors
    set :session_secret, "<KEY>
{'fraction_non_alphanumeric': 0.12214285714285714, 'fraction_numerical': 0.005714285714285714, 'mean_word_length': 5.546728971962617, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 4, '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': '7167855', 'n_tokens_mistral': 524, 'n_tokens_neox': 489, 'n_words': 112}