<commit_before>package web

import (
	"log"
	"net/http"
	"sync"

	"code.google.com/p/go.net/websocket"
)

type Message map[string]interface{}

type Hub struct {
	In   chan Message
	outs map[chan Message]bool
	sync.Mutex
}

func NewHub() *Hub {
	h := &Hub{outs: make(map[chan Message]bool)}
	h.In = make(chan Message)
	go func() {
		for m := range h.In {
			for out, _ := range h.outs {
				select {
				case out <- m:
				default:
					log.Println("could not broadcast tweet:", m)<commit_msg>Changed Message to be more generic.<commit_after>package web

import (
	"log"
	"net/http"
	"sync"

	"code.google.com/p/go.net/websocket"
)

type Message interface{}

type Hub struct {
	In   chan Message
	outs map[chan Message]bool
	sync.Mutex
}

func NewHub() *Hub {
	h := &Hub{outs: make(map[chan Message]bool)}
	h.In = make(chan Message)
	go func() {
		for m := range h.In {
			for out, _ := range h.outs {
				select {
				case out <- m:
				default:
					log.Println("could not broadcast tweet:", m)
{'fraction_non_alphanumeric': 0.14170854271356784, 'fraction_numerical': 0.0, 'mean_word_length': 3.1673640167364017, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5765271', 'n_tokens_mistral': 412, 'n_tokens_neox': 370, 'n_words': 104}