<commit_before>package main

import (
	"flag"
	"fmt"
	"os"
	"strconv"
	"strings"

	"github.com/domdavis/adventofcode/2016/day1"
	"github.com/domdavis/adventofcode/2016/day2"
)

var year = flag.Int("year", 0, "The year to display")
var day = flag.Int("day", 0, "The day to display")

var solutions = map[int]map[int]func() string{
	2016: {
		1: day1.Solution,
		2: day2.Solution,
	},
}

func main() {
	flag.Parse()

	if y, ok := solutions[*year]; ok {
		if solution, ok := y[*day]; ok {
			fmt.Println(solution())
		} else {
			usage()
		}
	} else {
		usage()
	}
}

func usage() {
	fmt.Printf("Usage: %s -year <year> -day <day>\n\n", os.Args[0])
	fmt.Println("Available options:")

	for year, v := range solutions {
		fmt.Printf("  Year %d:\n", year)

		i := 0
		days := make([]string, len(v))<commit_msg>Wire up day 3<commit_after>package main

import (
	"flag"
	"fmt"
	"os"
	"strconv"
	"strings"

	"github.com/domdavis/adventofcode/2016/day1"
	"github.com/domdavis/adventofcode/2016/day2"
	"github.com/domdavis/adventofcode/2016/day3"
)

var year = flag.Int("year", 0, "The year to display")
var day = flag.Int("day", 0, "The day to display")

var solutions = map[int]map[int]func() string{
	2016: {
		1: day1.Solution,
		2: day2.Solution,
		3: day3.Solution,
	},
}

func main() {
	flag.Parse()

	if y, ok := solutions[*year]; ok {
		if solution, ok := y[*day]; ok {
			fmt.Println(solution())
		} else {
			usage()
		}
	} else {
		usage()
	}
}

func usage() {
	fmt.Printf("Usage: %s -year <year> -day <day>\n\n", os.Args[0])
	fmt.Println("Available options:")

	for year, v := range solutions {
		fmt.Printf("  Year %d:\n", year)

		i := 0
		days := make([]string, len(v))
{'fraction_non_alphanumeric': 0.19474313022700118, 'fraction_numerical': 0.03106332138590203, 'mean_word_length': 3.527027027027027, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1226538', 'n_tokens_mistral': 765, 'n_tokens_neox': 691, 'n_words': 161}