<commit_before><commit_msg>Added real server<commit_after>package main

import (
    "time"
    "encoding/json"
    "fmt"
    "net/http"
    "sync/atomic"
)

type Recipe map[string]int

type Mutex struct {
    isBoozing int32
}
var boozing = &Mutex{}

func brew(w http.ResponseWriter, r *http.Request) {
    fmt.Fprintf(w, "Hello world!\n")
    decoder := json.NewDecoder(r.Body)
    var boozeRequest []Recipe
    err := decoder.Decode(&boozeRequest)
    if(err != nil) {
        fmt.Fprintf(w, "Wrong request format\n" + err.Error())
        return
    }
    if(atomic.CompareAndSwapInt32(&boozing.isBoozing, 0, 1)) {
        time.Sleep(3000 * time.Millisecond)
        fmt.Fprintf(w, "%+v\n", boozeRequest)
        boozing.isBoozing = 0
    } else {
        fmt.Fprintf(w, "Already boozing\n")
    }
}

func main() {
    http.HandleFunc("/brew", brew)
    http.ListenAndServe(":6543", nil)
}
{'fraction_non_alphanumeric': 0.14669652855543114, 'fraction_numerical': 0.0167973124300112, 'mean_word_length': 2.8701298701298703, 'pattern_counts': {'":': 1, '<': 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': '279646', 'n_tokens_mistral': 346, 'n_tokens_neox': 330, 'n_words': 64}