<commit_before>package ircstats

type User struct {
	Username   string
	Url        string
	Avatar     string
	LineCount  int64
	WordCount  int64
	DaysActive int64
	CharCount  int64
	WordsLine  int64
	LineLength int64
	LinesDay   int64
	WordsDay   int64
	Vocabulary int64
	DaysTotal  int64
	MaxHours   int64
	Words      []string
	HoursAndDaysStats
	Seen
}

func (u *User) CalculateTotals() {
	u.Vocabulary = int64(len(u.Words))
	u.DaysTotal = int64(len(u.Days))

	if (u.LineCount > 0) {
		u.WordsLine = int64(u.WordCount / u.LineCount)
	} else {
		u.WordsLine = 0
	}

	// @todo finish
}

func NewUser(nick string, timestamp int64) User {
	u := User{Username: nick}
	u.Initiate()
	u.UpdateSeen(timestamp)
	return u
}

<commit_msg>Modified User constructor to return pointer<commit_after>package ircstats

type User struct {
	Username   string
	Url        string
	Avatar     string
	LineCount  int64
	WordCount  int64
	DaysActive int64
	CharCount  int64
	WordsLine  int64
	LineLength int64
	LinesDay   int64
	WordsDay   int64
	Vocabulary int64
	DaysTotal  int64
	MaxHours   int64
	Words      []string
	HoursAndDaysStats
	Seen
}

func (u *User) CalculateTotals() {
	u.Vocabulary = int64(len(u.Words))
	u.DaysTotal = int64(len(u.Days))

	if (u.LineCount > 0) {
		u.WordsLine = int64(u.WordCount / u.LineCount)
	} else {
		u.WordsLine = 0
	}

	// @todo finish
}

func NewUser(nick string, timestamp int64) *User {
	u := User{Username: nick}
	u.Initiate()
	u.UpdateSeen(timestamp)
	return &u
}


{'fraction_non_alphanumeric': 0.08736559139784947, 'fraction_numerical': 0.043010752688172046, 'mean_word_length': 3.3794117647058823, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '60648', 'n_tokens_mistral': 640, 'n_tokens_neox': 570, 'n_words': 143}