<commit_before>package web

// ConnectionHub xD
type ConnectionHub struct {
	connections map[*WSConn]bool
	broadcast   chan *WSMessage
	unregister  chan *WSConn
	register    chan *WSConn
}

// Hub xD
var Hub = ConnectionHub{
	connections: make(map[*WSConn]bool),
	broadcast:   make(chan *WSMessage),
	unregister:  make(chan *WSConn),
	register:    make(chan *WSConn),
}

func (h *ConnectionHub) run() {
	for {
		select {
		case conn := <-h.register:
			log.Debugf("REGISTERING %#v", conn)
			h.connections[conn] = true
		case conn := <-h.unregister:
			if _, ok := h.connections[conn]; ok {
				delete(h.connections, conn)
				close(conn.send)
			}
		case wsMessage := <-h.broadcast:<commit_msg>Removed more debug output<commit_after>package web

// ConnectionHub xD
type ConnectionHub struct {
	connections map[*WSConn]bool
	broadcast   chan *WSMessage
	unregister  chan *WSConn
	register    chan *WSConn
}

// Hub xD
var Hub = ConnectionHub{
	connections: make(map[*WSConn]bool),
	broadcast:   make(chan *WSMessage),
	unregister:  make(chan *WSConn),
	register:    make(chan *WSConn),
}

func (h *ConnectionHub) run() {
	for {
		select {
		case conn := <-h.register:
			// log.Debugf("REGISTERING %#v", conn)
			h.connections[conn] = true
		case conn := <-h.unregister:
			if _, ok := h.connections[conn]; ok {
				delete(h.connections, conn)
				close(conn.send)
			}
		case wsMessage := <-h.broadcast:
{'fraction_non_alphanumeric': 0.13523131672597866, 'fraction_numerical': 0.0, 'mean_word_length': 3.766101694915254, 'pattern_counts': {'":': 0, '<': 9, '<?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': '2787317', 'n_tokens_mistral': 544, 'n_tokens_neox': 489, 'n_words': 124}