<commit_before>package main

import (
	"encoding/binary"
	"flag"
	"fmt"
	"io"
	"net"
)

func main() {
	var port = flag.Int("p", 0, "port to listen on")
	flag.Parse()

	ln, err := net.Listen("tcp", fmt.Sprintf("localhost:%d", *port))
	if err != nil {
		fmt.Printf("failed to listen on port %d: %v\n", port, err)
		return
	}

	for {<commit_msg>Make go server exit cleanly<commit_after>package main

import (
	"encoding/binary"
	"flag"
	"fmt"
	"io"
	"net"
	"os"
	"os/signal"
	"syscall"
)

func main() {
	var port = flag.Int("p", 0, "port to listen on")
	flag.Parse()

	c := make(chan os.Signal, 1)
	signal.Notify(c, syscall.SIGINT, syscall.SIGTERM)
	go func() {
		for range c {
			os.Exit(0)
		}
	}()

	ln, err := net.Listen("tcp", fmt.Sprintf("localhost:%d", *port))
	if err != nil {
		fmt.Printf("failed to listen on port %d: %v\n", port, err)
		return
	}

	for {
{'fraction_non_alphanumeric': 0.18909512761020883, 'fraction_numerical': 0.004640371229698376, 'mean_word_length': 3.518324607329843, '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': '3697504', 'n_tokens_mistral': 378, 'n_tokens_neox': 357, 'n_words': 96}