<commit_before>require 'sinatra/base'
require 'thin'
require 'json'
require_relative 'database'
require_relative 'setup'
require 'securerandom'

module Dwmb
  class Server < Sinatra::Base
    set :bind, '0.0.0.0'
    set :server, 'thin'
    set :public_folder, '../static'

    def setup
        @@setup ||= Setup.new
    end

    get "/status_all" do
      {status:"ok", slots:["on", "off", "on", "error"]}.to_json
    end

    get "/" do
      redirect '/index.html'
    end

    post '/drop' do
        User.all.destroy
        Session.all.destroy
        Card.all.destroy

        adapter = DataMapper.repository(:default).adapter<commit_msg>remove /status_all<commit_after>require 'sinatra/base'
require 'thin'
require 'json'
require_relative 'database'
require_relative 'setup'
require 'securerandom'

module Dwmb
  class Server < Sinatra::Base
    set :bind, '0.0.0.0'
    set :server, 'thin'
    set :public_folder, '../static'

    def setup
        @@setup ||= Setup.new
    end

    get "/" do
      redirect '/index.html'
    end

    post '/drop' do
        User.all.destroy
        Session.all.destroy
        Card.all.destroy

        adapter = DataMapper.repository(:default).adapter
{'fraction_non_alphanumeric': 0.1292743953294412, 'fraction_numerical': 0.006672226855713094, 'mean_word_length': 2.6036036036036037, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '893846', 'n_tokens_mistral': 397, 'n_tokens_neox': 377, 'n_words': 97}