<commit_before>require 'sinatra'
require 'mini_magick'
require 'chunky_png'
require 'redis'
require 'yaml'

GOOGLE_CHARTS_URL = "http://chart.apis.google.com/chart?cht=ls&chd=s:%s&chco=%s&chls=%s&chs=%sx%s".freeze
DATA_ENCODING = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".freeze


get '/' do
  redirect "http://blog.cristianobetta.com/2008/08/31/photo-histograms-everywhere/"
end

get '/*' do
  params[:height] ||= 175;
  params[:height] = params[:height].to_i
  params[:height] = 385 if params[:height] > 385<commit_msg>Simpliefied rule<commit_after>require 'sinatra'
require 'mini_magick'
require 'chunky_png'
require 'redis'
require 'yaml'

GOOGLE_CHARTS_URL = "http://chart.apis.google.com/chart?cht=ls&chd=s:%s&chco=%s&chls=%s&chs=%sx%s".freeze
DATA_ENCODING = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".freeze

get '/' do
  return redirect "http://blog.cristianobetta.com/2008/08/31/photo-histograms-everywhere/" unless params[:image]

  params[:height] ||= 175;
  params[:height] = params[:height].to_i
  params[:height] = 385 if params[:height] > 385
{'fraction_non_alphanumeric': 0.1586582048957389, 'fraction_numerical': 0.04895738893925657, 'mean_word_length': 6.829787234042553, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '705788', 'n_tokens_mistral': 496, 'n_tokens_neox': 433, 'n_words': 60}