<commit_before>package main

import (
	"bufio"
	"fmt"
	"io"
	"log"
	"os"
	"os/exec"
	"path/filepath"
	"runtime"
)

func main() {
	program := NewProgram()
	program.Prepare()
	program.Run()
}

type Program struct {
	command *exec.Cmd
	stdout  io.ReadCloser
}

func NewProgram() *Program {
	_, file, _, _ := runtime.Caller(0)
	static := filepath.Join(filepath.Dir(file), "../client")
	return &Program{
		command: exec.Command(
			"websocketd", "-port=8888", "-passenv=GOPATH,PATH", "--staticdir="+static, "scantest"),
	}
}

func (self *Program) Prepare() {
	self.command.Env = os.Environ()
	self.ConnectToStdout()
}
func (self *Program) Run() {
	self.command.Start()
	go self.PrintForevor()
	self.command.Wait()
}

func (self *Program) ConnectToStdout() {
	var err error
	self.stdout, err = self.command.StdoutPipe()
	if err != nil {
		log.Fatal(err)
	}
}

func (self *Program) PrintForevor() {
	scanner := bufio.NewScanner(self.stdout)
	for scanner.Scan() {
		fmt.Println(scanner.Text())
	}
}
<commit_msg>Included the -web flag in the scantest-web command invocation.<commit_after>package main

import (
	"bufio"
	"fmt"
	"io"
	"log"
	"os"
	"os/exec"
	"path/filepath"
	"runtime"
)

func main() {
	program := NewProgram()
	program.Prepare()
	program.Run()
}

type Program struct {
	command *exec.Cmd
	stdout  io.ReadCloser
}

func NewProgram() *Program {
	_, file, _, _ := runtime.Caller(0)
	static := filepath.Join(filepath.Dir(file), "../client")
	return &Program{
		command: exec.Command(
			"websocketd", "-port=8888", "-passenv=GOPATH,PATH", "--staticdir="+static, "scantest", "-web"),
	}
}

func (self *Program) Prepare() {
	self.command.Env = os.Environ()
	self.ConnectToStdout()
}
func (self *Program) Run() {
	self.command.Start()
	go self.PrintForevor()
	self.command.Wait()
}

func (self *Program) ConnectToStdout() {
	var err error
	self.stdout, err = self.command.StdoutPipe()
	if err != nil {
		log.Fatal(err)
	}
}

func (self *Program) PrintForevor() {
	scanner := bufio.NewScanner(self.stdout)
	for scanner.Scan() {
		fmt.Println(scanner.Text())
	}
}

{'fraction_non_alphanumeric': 0.1769268056228793, 'fraction_numerical': 0.004847309743092583, 'mean_word_length': 4.212121212121212, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5176325', 'n_tokens_mistral': 827, 'n_tokens_neox': 806, 'n_words': 167}