<commit_before>package main

import (
	"github.com/astaxie/beego"
	"icecar/controllers"
	"icecar/models"
	//"icecar/filters"
	"labix.org/v2/mgo"
)

func main() {
	beego.Router("/account/register", &controllers.UserController{}, "get,post:Register")
	beego.Router("/account/login", &controllers.UserController{}, "get,post:Login")
	beego.Router("/user/logout", &controllers.UserController{}, "get:Logout")
	beego.Router("/user/getInfo", &controllers.UserController{}, "get,post:UserInfo")
	beego.Router("/file/upload", &controllers.FileController{}, "post:Upload")

	//beego.FilterPrefixPath("/user/getInfo", filters.AccessFilter)

	session, err := mgo.Dial(beego.AppConfig.String("mongourl"))
	if err != nil {
		panic(err)
		return
	}

	models.DB = session.DB(beego.AppConfig.String("mongodb"))
	defer session.Close()

	beego.Debug("start server")
	beego.Run()
}
<commit_msg>add file upload function<commit_after>package main

import (
	"github.com/astaxie/beego"
	"github.com/ginuerzh/icecar/controllers"
	"github.com/ginuerzh/icecar/models"
	//"icecar/filters"
	"labix.org/v2/mgo"
)

func main() {
	beego.Router("/account/register", &controllers.UserController{}, "get,post:Register")
	beego.Router("/account/login", &controllers.UserController{}, "get,post:Login")
	beego.Router("/user/logout", &controllers.UserController{}, "get:Logout")
	beego.Router("/user/getInfo", &controllers.UserController{}, "get,post:UserInfo")
	beego.Router("/file/upload", &controllers.FileController{}, "post:Upload")

	//beego.FilterPrefixPath("/user/getInfo", filters.AccessFilter)

	session, err := mgo.Dial(beego.AppConfig.String("mongourl"))
	if err != nil {
		panic(err)
		return
	}

	models.DB = session.DB(beego.AppConfig.String("mongodb"))
	defer session.Close()

	beego.Debug("start server")
	beego.Run()
}

{'fraction_non_alphanumeric': 0.18545252637423654, 'fraction_numerical': 0.001110494169905608, 'mean_word_length': 5.877862595419847, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2777375', 'n_tokens_mistral': 658, 'n_tokens_neox': 643, 'n_words': 87}