<commit_before>package main

import (
	// _ "expvar"
	"flag"
	"fmt"
	"koding/db/mongodb/modelhelper"
	// _ "net/http/pprof" // Imported for side-effect of handling /debug/pprof.
	"os"
	"socialapi/workers/api/handlers"
	"socialapi/workers/common/runner"
	"socialapi/workers/helper"
	notificationapi "socialapi/workers/notification/api"

	"github.com/rcrowley/go-tigertonic"
)

var (
	cert       = flag.String("cert", "", "certificate pathname")
	key        = flag.String("key", "", "private key pathname")
	flagConfig = flag.String("config", "", "pathname of JSON configuration file")
	host       = flag.String("host", "0.0.0.0", "listen address")
	port       = flag.String("port", "7000", "listen port")

	hMux       tigertonic.HostServeMux
	mux, nsMux *tigertonic.TrieServeMux

	Name = "SocialAPI"
)

func init() {
	flag.Usage = func() {
		fmt.Fprintln(os.Stderr, "Usage: example [-cert=<cert>] [-key=<key>] [-config=<config>] [-host=<host>] [-port=<port>]")
		flag.PrintDefaults()
	}
	mux = tigertonic.NewTrieServeMux()
	mux = handlers.Inject(mux)
	mux = notificationapi.InitHandlers(mux)
}

func main() {
	r := runner.New(Name)
	if err := r.Init(); err != nil {
		fmt.Println(err)
		return
	}

	if !flag.Parsed() {
		flag.Parse()
	}

	server := newServer()
	// shutdown server
	defer server.Close()

	// init redis
	redisConn := helper.MustInitRedisConn(r.Conf.Redis)
	defer redisConn.Close()

	// init mongo connection
	modelhelper.Initialize(r.Conf.Mongo)

	r.Wait()
}
<commit_msg>Social: send tiger tonic errors snake cased<commit_after>package main

import (
	// _ "expvar"
	"flag"
	"fmt"
	"koding/db/mongodb/modelhelper"
	// _ "net/http/pprof" // Imported for side-effect of handling /debug/pprof.
	"os"
	"socialapi/workers/api/handlers"
	"socialapi/workers/common/runner"
	"socialapi/workers/helper"
	notificationapi "socialapi/workers/notification/api"

	"github.com/rcrowley/go-tigertonic"
)

var (
	cert       = flag.String("cert", "", "certificate pathname")
	key        = flag.String("key", "", "private key pathname")
	flagConfig = flag.String("config", "", "pathname of JSON configuration file")
	host       = flag.String("host", "0.0.0.0", "listen address")
	port       = flag.String("port", "7000", "listen port")

	hMux       tigertonic.HostServeMux
	mux, nsMux *tigertonic.TrieServeMux

	Name = "SocialAPI"
)

func init() {
	flag.Usage = func() {
		fmt.Fprintln(os.Stderr, "Usage: example [-cert=<cert>] [-key=<key>] [-config=<config>] [-host=<host>] [-port=<port>]")
		flag.PrintDefaults()
	}
	mux = tigertonic.NewTrieServeMux()
	mux = handlers.Inject(mux)
	mux = notificationapi.InitHandlers(mux)
	tigertonic.SnakeCaseHTTPEquivErrors = true

}

func main() {
	r := runner.New(Name)
	if err := r.Init(); err != nil {
		fmt.Println(err)
		return
	}

	if !flag.Parsed() {
		flag.Parse()
	}

	server := newServer()
	// shutdown server
	defer server.Close()

	// init redis
	redisConn := helper.MustInitRedisConn(r.Conf.Redis)
	defer redisConn.Close()

	// init mongo connection
	modelhelper.Initialize(r.Conf.Mongo)

	r.Wait()
}

{'fraction_non_alphanumeric': 0.16770594026911717, 'fraction_numerical': 0.005251066622907778, 'mean_word_length': 3.8457869634340223, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '1769275', 'n_tokens_mistral': 1199, 'n_tokens_neox': 1143, 'n_words': 218}