<commit_before>package main

import (
	"net/http"
	"time"
)

func main() {
	pmainDB, err := NewDatabaseManager()

	if err != nil {
		panic(err)
	}

	// Copy to the global variable
	mainDB = pmainDB
	mainDB.showedNewCount = 5

	mux := http.NewServeMux()
	handlers, err := CreateHandlers()

	if err != nil {
		panic(err)
	}

	for k, v := range *handlers {
		mux.HandleFunc(k, v.PassHandler())
	}

	mux.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("./static/"))))

	// Should use TLS
	server := http.Server{
		Addr:           ":8080",
		ReadTimeout:    10 * time.Second,
		WriteTimeout:   10 * time.Second,
		MaxHeaderBytes: 1 << 20,
		Handler:        mux,
	}

	err = server.ListenAndServe()

	if err != nil {
		panic(err)<commit_msg>Mon Jul 18 22:21:19 JST 2016<commit_after>package main

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

func main() {
	pmainDB, err := NewDatabaseManager()

	if err != nil {
		panic(err)
	}

	fmt.Println(pmainDB.UserAdd("tsuzu", "つづ", "hoge", "<EMAIL>", 0))

	// Copy to the global variable
	mainDB = pmainDB
	mainDB.showedNewCount = 5

	mux := http.NewServeMux()
	handlers, err := CreateHandlers()

	if err != nil {
		panic(err)
	}

	for k, v := range *handlers {
		mux.HandleFunc(k, v.PassHandler())
	}

	mux.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("./static/"))))

	// Should use TLS
	server := http.Server{
		Addr:           ":8080",
		ReadTimeout:    10 * time.Second,
		WriteTimeout:   10 * time.Second,
		MaxHeaderBytes: 1 << 20,
		Handler:        mux,
	}

	err = server.ListenAndServe()

	if err != nil {
		panic(err)
{'fraction_non_alphanumeric': 0.16417910447761194, 'fraction_numerical': 0.023009950248756218, 'mean_word_length': 3.1150895140664963, 'pattern_counts': {'":': 2, '<': 8, '<?xml version=': 0, '>': 4, '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': '4830549', 'n_tokens_mistral': 676, 'n_tokens_neox': 605, 'n_words': 142}