<commit_before>package main

import (
    "bytes"
    "fmt"
    "net/http"
    "net/smtp"
)

func handler(w http.ResponseWriter, r *http.Request) {
    fmt.Fprintf(w, "Hi there, I love %s!<br>", r.URL.Path[1:])
    // Connect to the remote SMTP server.
    c, err := smtp.Dial("localhost:25")
    if err != nil {
        fmt.Fprintf(w, "Oh dear 1 - %s", err)
        return
    }
    defer c.Close()
    // Set the sender and recipient.
    c.Mail("<EMAIL>")
    c.Rcpt("root@localhost")
    // Send the email body.
    wc, err := c.Data()
    if err != nil {
        fmt.Fprintf(w, "Oh dear 2 - %s", err)
        return
    }
    defer wc.Close()
    buf := bytes.NewBufferString("Test notification e-mail.")
    if _, err = buf.WriteTo(wc); err != nil {
        fmt.Fprintf(w, "Oh dear 3 - %s", err)
        return
    }
}

func main() {
    http.HandleFunc("/", handler)
    http.ListenAndServe(":9001", nil)
}
<commit_msg>Testing a change so I can figure out why the thing emails me twice.<commit_after>package main

import (
    "fmt"
    "net/http"
    "net/smtp"
)

func handler(w http.ResponseWriter, r *http.Request) {
    fmt.Fprintf(w, "Hi there, I love %s!<br>", r.URL.Path[1:])
    // Connect to the remote SMTP server.
    c, err := smtp.Dial("localhost:25")
    if err != nil {
        fmt.Fprintf(w, "Oh dear 1 - %s", err)
        return
    }
    defer c.Close()
    // Set the sender and recipient.
    c.Mail("<EMAIL>")
    c.Rcpt("root@localhost")
    // Send the email body.
    wc, err := c.Data()
    if err != nil {
        fmt.Fprintf(w, "Oh dear 2 - %s", err)
        return
    }
    defer wc.Close()
    if err = r.Write(wc); err != nil {
        fmt.Fprintf(w, "Oh dear 3 - %s", err)
        return
    }
}

func main() {
    http.HandleFunc("/", handler)
    http.ListenAndServe(":9001", nil)
}

{'fraction_non_alphanumeric': 0.16383561643835617, 'fraction_numerical': 0.010958904109589041, 'mean_word_length': 2.142857142857143, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 7, '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': '4051751', 'n_tokens_mistral': 685, 'n_tokens_neox': 666, 'n_words': 184}