<commit_before>package main

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

func get(w http.ResponseWriter, r *http.Request) {
}

func put(w http.ResponseWriter, r *http.Request) {
}

func stat(w http.ResponseWriter, r *http.Request) {
        r.ParseForm()
        fmt.Printf("file=%s", r.Form.Get("file"))
        io.WriteString(w, "100 FOUND")
}

func main() {
        http.HandleFunc("/get", get)
        http.HandleFunc("/put", put)
        http.HandleFunc("/stat", stat)
        http.ListenAndServe(":8000", nil)
}
<commit_msg>Enhanced server to implement get<commit_after>package main

import (
        "os"
        "io"
        "bufio"
        "net/http"
)

func get(w http.ResponseWriter, r *http.Request) {
    var ok error

    r.ParseForm()

    _,ok = os.Lstat(r.Form.Get("file"))
    if (nil != ok) {
        http.Error(w, "Not Found", 404)
        return
    }

    file, err := os.Open(r.Form.Get("file"))
    if (err != nil) {
        http.Error(w, "File open failed", 500)
        return
    }

    w.Header().Set("Content-Type", "application/octet-stream")
    _,err = io.Copy(w, bufio.NewReader(file))
    if (err != nil) {
        http.Error(w, "File write failed", 500)
        return
    }
}

func put(w http.ResponseWriter, r *http.Request) {
    r.ParseForm()
}

func stat(w http.ResponseWriter, r *http.Request) {
    var ok error

    r.ParseForm()
    _,ok = os.Lstat(r.Form.Get("file"))
    if (nil == ok) {
        io.WriteString(w, "200 OK")
    } else {
        http.Error(w, "Not Found", 404)
        return
    }
}

func main() {
        http.HandleFunc("/get/", get);
        http.HandleFunc("/put/", put)
        http.HandleFunc("/stat/", stat)
        http.ListenAndServe(":8000", nil)
}

{'fraction_non_alphanumeric': 0.1676267281105991, 'fraction_numerical': 0.014976958525345621, 'mean_word_length': 2.2286245353159853, 'pattern_counts': {'":': 2, '<': 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': '3584527', 'n_tokens_mistral': 640, 'n_tokens_neox': 613, 'n_words': 132}