<commit_before>package hello

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

func init() {
    http.HandleFunc("/svg/month", handler)
}

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


text := r.URL.Query().Get("text")
width := r.URL.Query().Get("width")
if width == "" {
   width = "300"
}

height := r.URL.Query().Get("height")
if height  == "" {
   height = "20"
}
dy := r.URL.Query().Get("dy")

if dy  == "" {
   dy = "-2.6em"
}

fill := r.URL.Query().Get("fill")

if fill  == "" {
   fill = "000000"
}


format := r.URL.Query().Get("format")

if format  == "" {
   format = "January 2006"
}



if text == "" {
   text = time.Now().Format(format)
} else {
   text = text + " " + time.Now().Format(format)
}
    w.Header().Set("Content-Type","image/svg+xml")
    


   output := fmt.Sprintf(`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"  viewBox="0 0 %s %s">
  

    <text text-anchor="left"  style="font-family: Arial, Helvetica, Verdana" font-weight="bold" fill="#%s" dy='%s' font-size="ANY SIZE">%s</text>
</svg>`, width, height, fill, dy, text)

  //  w.Header().Set("Content-Length", fmt.Sprintf("%d",len(output)))
    fmt.Fprint(w, output)
}<commit_msg>setup<commit_after>package hello

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

func init() {
	http.HandleFunc("/svg/month", handler)
}

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

	text := r.URL.Query().Get("text")
	width := r.URL.Query().Get("width")
	if width == "" {
		width = "300"
	}

	height := r.URL.Query().Get("height")
	if height == "" {
		height = "20"
	}

	dx := r.URL.Query().Get("dx")

	if dx == "" {
		dx = "0"
	}

	dy := r.URL.Query().Get("dy")

	if dy == "" {
		dy = "-2.6em"
	}

	fill := r.URL.Query().Get("fill")

	if fill == "" {
		fill = "000000"
	}

	format := r.URL.Query().Get("format")

	if format == "" {
		format = "January 2006"
	}

	size := r.URL.Query().Get("size")

	if size == "" {
		size = "ANY SIZE"
	}

	if text == "" {
		text = time.Now().Format(format)
	} else {
		text = text + " " + time.Now().Format(format)
	}
	w.Header().Set("Content-Type", "image/svg+xml")

	output := fmt.Sprintf(`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"  viewBox="0 0 %s %s">
    <text text-anchor="left"  style="font-family: Arial, Helvetica, Verdana" font-weight="bold" fill="#%s" dx='%s' dy='%s' font-size="%s">%s</text>
</svg>`, width, height, fill, dx, dy, size, text)

	//  w.Header().Set("Content-Length", fmt.Sprintf("%d",len(output)))
	fmt.Fprint(w, output)
}
{'fraction_non_alphanumeric': 0.24468085106382978, 'fraction_numerical': 0.023246650906225373, 'mean_word_length': 3.296108291032149, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 6}, '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': '5576085', 'n_tokens_mistral': 1091, 'n_tokens_neox': 1009, 'n_words': 188}