<commit_before>// Command helm allows for faster development using Docker and Docker Compose
// on Mac OS X.
package main

import (
	"fmt"
	log "github.com/Sirupsen/logrus"
	// "github.com/docker/libcompose"
	"gopkg.in/alecthomas/kingpin.v2"
	"os"
)

var (
	Name    string
	Version string
	Build   string
)

func main() {
	pwd, pwdErr := os.Getwd()
	if pwdErr != nil {
		fmt.Println("Error: could not determine your current directory:", pwdErr.Error())
		os.Exit(1)
	}

	var (
		verbose = kingpin.
			Flag("verbose", "Verbose mode.").
			Short('v').
			Bool()
	)

	// Setup '-h' as an alias for the help flag.
	kingpin.CommandLine.HelpFlag.Short('h')

	// Setup version printing.
	kingpin.Flag("version", "Show version.").PreAction(kingpin.Action(func(*kingpin.ParseContext) error {
		fmt.Printf("%v version %v, build %v\n", Name, Version, Build)
		os.Exit(0)
		return nil
	})).Bool()

	up := kingpin.Command("up", "Start up services defined in a Docker Compose file.")
	upFile := up.Flag("file", "Docker Compose file to use").Short('f').Default("docker-compose.yml").String()
	upDetached := up.Flag("detached", "Specify a Detached mode: Run containers in the background.").Short('d').Bool()

	down := kingpin.Command("down", "Stop any running services.")
	downFile := down.Flag("file", "Specify a Docker Compose file to use").Short('f').Default("docker-compose.yml").String()

	host := kingpin.Command("host", "Control and configure your Docker Machine.")
	hostInit := host.Command("init", "Initialise your Docker Machine for use.")
	hostStart := host.Command("start", "Start your Docker Machine.").Alias("up")
	hostStop := host.Command("stop", "Stop your Docker Machine.").Alias("down")
	hostRestart := host.Command("restart", "Restart your Docker Machine.")

	switch kingpin.Parse() {
	case up.FullCommand():
		log.Info("Up!")
		log.Info("File:", *upFile)
		if *upDetached {
			log.Info("Detaching...")
		}

	case down.FullCommand():
		log.Info("Down!")
		log.Info("File:", *downFile)

	case hostInit.FullCommand():
		log.Info("host init!")

	case hostStart.FullCommand():
		log.Info("host start!")

	case hostStop.FullCommand():
		log.Info("host stop!")

	case hostRestart.FullCommand():
		log.Info("host restart!")
	}

	if *verbose {
		log.Info("Hello, this is verbose mode.")
		log.Info("The current directory is:", pwd)
	}
}
<commit_msg>Added prettier help printing.<commit_after>// Command helm allows for faster development using Docker and Docker Compose
// on Mac OS X.
package main

import (
	"fmt"
	log "github.com/Sirupsen/logrus"
	// "github.com/docker/libcompose"
	"gopkg.in/alecthomas/kingpin.v2"
	"os"
)

var (
	Name    string
	Version string
	Build   string
)

func main() {
	pwd, pwdErr := os.Getwd()
	if pwdErr != nil {
		fmt.Println("Error: could not determine your current directory:", pwdErr.Error())
		os.Exit(1)
	}

	var (
		verbose = kingpin.
			Flag("verbose", "Verbose mode.").
			Short('v').
			Bool()
	)
	// Clean up help.
	kingpin.UsageTemplate(kingpin.CompactUsageTemplate)
	kingpin.CommandLine.Help = "Fast, Docker Compose-based development for Mac OS X."
	kingpin.CommandLine.HelpFlag.Short('h')

	// Setup version printing.
	kingpin.Flag("version", "Show version.").PreAction(kingpin.Action(func(*kingpin.ParseContext) error {
		fmt.Printf("%v version %v, build %v\n", Name, Version, Build)
		os.Exit(0)
		return nil
	})).Bool()

	up := kingpin.Command("up", "Start up services defined in a Docker Compose file.")
	upFile := up.Flag("file", "Docker Compose file to use").Short('f').Default("docker-compose.yml").String()
	upDetached := up.Flag("detached", "Specify a Detached mode: Run containers in the background.").Short('d').Bool()

	down := kingpin.Command("down", "Stop any running services.")
	downFile := down.Flag("file", "Specify a Docker Compose file to use").Short('f').Default("docker-compose.yml").String()

	host := kingpin.Command("host", "Control and configure your Docker Machine.")
	hostInit := host.Command("init", "Initialise your Docker Machine for use.")
	hostStart := host.Command("start", "Start your Docker Machine.").Alias("up")
	hostStop := host.Command("stop", "Stop your Docker Machine.").Alias("down")
	hostRestart := host.Command("restart", "Restart your Docker Machine.")

	switch kingpin.Parse() {
	case up.FullCommand():
		log.Info("Up!")
		log.Info("File:", *upFile)
		if *upDetached {
			log.Info("Detaching...")
		}

	case down.FullCommand():
		log.Info("Down!")
		log.Info("File:", *downFile)

	case hostInit.FullCommand():
		log.Info("host init!")

	case hostStart.FullCommand():
		log.Info("host start!")

	case hostStop.FullCommand():
		log.Info("host stop!")

	case hostRestart.FullCommand():
		log.Info("host restart!")
	}

	if *verbose {
		log.Info("Hello, this is verbose mode.")
		log.Info("The current directory is:", pwd)
	}
}

{'fraction_non_alphanumeric': 0.16999168744804655, 'fraction_numerical': 0.0012468827930174563, 'mean_word_length': 4.3006607929515415, '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': '1800954', 'n_tokens_mistral': 1710, 'n_tokens_neox': 1591, 'n_words': 421}