<commit_before>package main

import "fmt"

func main() {
	fmt.Println("Hello package world.")
}<commit_msg>Add placeholder fcgi server.<commit_after>package main

import (
	"flag"
	"io"
	"log"
	"net"
	"net/http"
	"net/http/fcgi"
	"os"
	"os/signal"
	"strconv"
)

var html = `<!DOCTYPE html>
<html>
	<head>
		<title>Gopacks.org</title>
	</head>
	<body>
		<h1>Gopacks.org coming soon...</h1>
	</body>
</html>`

var portFlag = flag.Int("port", 80, "The port on which to listen.")

type server struct {
}

func (s *server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	log.Printf("%v requested: %v", r.Host, r.RequestURI)
	headers := w.Header()
	headers.Add("Content-Type", "text/html")
	io.WriteString(w, html)
}

func main() {
	flag.Parse()

	exit := make(chan os.Signal)
	signal.Notify(exit, os.Interrupt, os.Kill)

	port := ":" + strconv.Itoa(*portFlag)

	listener, err := net.Listen("tcp", port)
	if err != nil {
		log.Fatalln("Error listening:", err)
	}
	defer listener.Close()
	log.Println("Listening on:", *portFlag)

	log.Println("Starting service...", *portFlag)
	go func() {
		err = fcgi.Serve(listener, &server{})
		if err != nil {
			log.Println("FCGI Serve error:", err)
			exit <- nil
		}
	}()

	sig := <-exit
	if sig != nil {
		log.Println("Received signal:", sig)
	}
	log.Println("Exiting.")
}
{'fraction_non_alphanumeric': 0.19207317073170732, 'fraction_numerical': 0.003048780487804878, 'mean_word_length': 3.8810408921933086, 'pattern_counts': {'":': 1, '<': 16, '<?xml version=': 0, '>': 14, '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': '6453568', 'n_tokens_mistral': 545, 'n_tokens_neox': 515, 'n_words': 121}