<commit_before>/**
 * Tests Squirrel sessions and _SERVER global
 */
dofile("session.nut")

local id = session_id()
if( id == null ) {
	session_start()
	// get the session id
	id = session_id()
}

local server = ""
foreach( key,val in _SERVER ) {
	server += key + " -> " + val + "\n"
}

local html = @"<!DOCTYPE html>
<html>
<head>
	<title>Welcome to MOD_SQ</title>
	<style type='text/css'>
		body { font-family: sans-serif; }
		span { font-family: monospace; }
	</style>
</head>
<body><commit_msg>dofile() requires a full path to the file<commit_after>/**
 * Tests Squirrel sessions and _SERVER global
 */
local path = _SERVER["filename"]
local pathend = path.find("welcome.nut")
path = path.slice(0, pathend)

// load session functions
dofile(path + "session.nut")

local id = session_id()
if( id == null ) {
	session_start()
	// get the session id
	id = session_id()
}

local server = ""
foreach( key,val in _SERVER ) {
	server += key + " -> " + val + "\n"
}

local html = @"<!DOCTYPE html>
<html>
<head>
	<title>Welcome to MOD_SQ</title>
	<style type='text/css'>
		body { font-family: sans-serif; }
		span { font-family: monospace; }
	</style>
</head>
<body>
{'fraction_non_alphanumeric': 0.1738382099827883, 'fraction_numerical': 0.0008605851979345956, 'mean_word_length': 3.7663934426229506, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 23, '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': '6396602', 'n_tokens_mistral': 442, 'n_tokens_neox': 421, 'n_words': 121}