<commit_before>package perseus

import (
	"bytes"
	"github.com/jessebmiller/cfg"
	"net/http"
	"net/url"
)

// Send sends a message (async) to the configured namespace
func Send(message string) {
	go send(message)
}

func send(message string) {
	if cfg.Get("PERSEUS_SEND", "true") == "false" {
		// someonee turned perseus off
		return
	}
	host := cfg.Get("PERSEUS_URL", "http://perseus")
	ns := cfg.Get("PERSEUS_NS", "/default")
	vals := url.Values{"message": {message}}
	_, _ := http.Post(
		host+ns,
		"application/x-www-form-urlencoded",
		bytes.NewBufferString(vals.Encode()),
	)
}<commit_msg>bugfix<commit_after>package perseus

import (
	"bytes"
	"github.com/jessebmiller/cfg"
	"net/http"
	"net/url"
)

// Send sends a message (async) to the configured namespace
func Send(message string) {
	go send(message)
}

func send(message string) {
	if cfg.Get("PERSEUS_SEND", "true") == "false" {
		// someonee turned perseus off
		return
	}
	host := cfg.Get("PERSEUS_URL", "http://perseus")
	ns := cfg.Get("PERSEUS_NS", "/default")
	vals := url.Values{"message": {message}}
	http.Post(
		host+ns,
		"application/x-www-form-urlencoded",
		bytes.NewBufferString(vals.Encode()),
	)
}
{'fraction_non_alphanumeric': 0.17387616624257846, 'fraction_numerical': 0.0, 'mean_word_length': 4.363636363636363, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3718872', 'n_tokens_mistral': 461, 'n_tokens_neox': 447, 'n_words': 92}