<commit_before>require "fileutils"
require "sinatra"
require "cairo"
require_relative "lib/cube_renderer"

get "/" do
  %(<a href="/cube/RUR'">pew</a>)
end

get "/cube/:alg" do
  FileUtils.mkdir("tmp") unless Dir.exist?("tmp")
  CubeRenderer.new(params[:alg]).draw("tmp/#{params[:alg]}.png")
  send_file("tmp/#{params[:alg]}.png")
end<commit_msg>remove cairo<commit_after>require "fileutils"
require "sinatra"
require_relative "lib/cube_renderer"

get "/" do
  %(<a href="/cube/RUR'">pew</a>)
end

get "/cube/:alg" do
  FileUtils.mkdir("tmp") unless Dir.exist?("tmp")
  CubeRenderer.new(params[:alg]).draw("tmp/#{params[:alg]}.png")
  send_file("tmp/#{params[:alg]}.png")
end
{'fraction_non_alphanumeric': 0.2222222222222222, 'fraction_numerical': 0.0, 'mean_word_length': 6.191489361702128, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2420660', 'n_tokens_mistral': 267, 'n_tokens_neox': 264, 'n_words': 42}