<commit_before>package main

import (
	"encoding/json"
	"fmt"
	"log"
	"net/http"
)

func main() {
	http.HandleFunc("/peers/register", func(w http.ResponseWriter, req *http.Request) {

		id := "d2a9b5be-4cfc-4929-963c-185c7f9c8697"

		response := map[string]interface{}{
			"peer": map[string]interface{}{
				"id":              id,
				"peerName":        "bestWeaviate",
				"last_contact_at": 1234,
				"peerUri":         "http://localhost:8080",
			},
			"contextionary": map[string]interface{}{
				"hash": map[string]string{
					"algorithm": "foo",
					"value":     "bar",
				},
				"url": "http://contextionary.com",
			},
		}
		responseBytes, err := json.Marshal(response)
		if err != nil {
			w.WriteHeader(http.StatusInternalServerError)
			fmt.Fprintf(w, "%s", err)
		}

		w.Header().Set("Content-Type", "application/json")
		w.WriteHeader(http.StatusOK)
		w.Write(responseBytes)
	})

	http.HandleFunc("/peers/ping", func(w http.ResponseWriter, req *http.Request) {
		w.WriteHeader(http.StatusOK)
	})

	log.Fatal(http.ListenAndServe(":8090", nil))
}<commit_msg>gh-602 fix ping handler in genesis fake<commit_after>package main

import (
	"encoding/json"
	"fmt"
	"log"
	"net/http"
)

var id = "d2a9b5be-4cfc-4929-963c-185c7f9c8697"

func main() {
	http.HandleFunc("/peers/register", func(w http.ResponseWriter, req *http.Request) {

		response := map[string]interface{}{
			"peer": map[string]interface{}{
				"id":              id,
				"peerName":        "bestWeaviate",
				"last_contact_at": 1234,
				"peerUri":         "http://localhost:8080",
			},
			"contextionary": map[string]interface{}{
				"hash": map[string]string{
					"algorithm": "foo",
					"value":     "bar",
				},
				"url": "http://contextionary.com",
			},
		}
		responseBytes, err := json.Marshal(response)
		if err != nil {
			w.WriteHeader(http.StatusInternalServerError)
			fmt.Fprintf(w, "%s", err)
		}

		w.Header().Set("Content-Type", "application/json")
		w.WriteHeader(http.StatusOK)
		w.Write(responseBytes)
	})

	http.HandleFunc("/peers/"+id+"/ping", func(w http.ResponseWriter, req *http.Request) {
		w.WriteHeader(http.StatusOK)
	})

	log.Fatal(http.ListenAndServe(":8090", nil))
}
{'fraction_non_alphanumeric': 0.1830275229357798, 'fraction_numerical': 0.030733944954128442, 'mean_word_length': 3.524896265560166, 'pattern_counts': {'":': 22, '<': 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': '6512770', 'n_tokens_mistral': 952, 'n_tokens_neox': 803, 'n_words': 127}