<commit_before>package main

import (
	"net"
	"os"
	"os/exec"
	"os/signal"
	"time"

	"github.com/pkg/errors"

	"google.golang.org/grpc"

	"golang.org/x/net/context"

	"github.com/havoc-io/mutagen/cmd"
	"github.com/havoc-io/mutagen/daemon"
	"github.com/havoc-io/mutagen/process"
)

func dialDaemon() (*grpc.ClientConn, error) {
	return grpc.Dial(
		"",
		grpc.WithBlock(),
		grpc.WithDialer(func(_ string, timeout time.Duration) (net.Conn, error) {
			return daemon.DialTimeout(timeout)
		}),
		grpc.WithInsecure(),
		grpc.WithTimeout(1*time.Second),
	)
}

var daemonUsage = `usage: mutagen daemon [-h|--help] [-s|--stop]

Controls the lifecycle of the Mutagen daemon. The default behavior of this
command is to start the Mutagen daemon in the background. The command is
idempotent - a daemon instance is only created if one doesn't already exist.
`

func daemonMain(arguments []string) {
	// Parse and handle flags.
	flagSet := cmd.NewFlagSet("daemon", daemonUsage, nil)
	run := flagSet.BoolP("run", "r", false, "run the daemon server")
	stop := flagSet.BoolP("stop", "s", false, "stop any running daemon server")
	flagSet.ParseOrDie(arguments)

	// Check that options are sane.
	if *run && *stop {
		cmd.Fatal(errors.New("-r/--run with -s/--stop doesn't make sense"))
	}<commit_msg>Small comment correction.<commit_after>package main

import (
	"net"
	"os"
	"os/exec"
	"os/signal"
	"time"

	"github.com/pkg/errors"

	"google.golang.org/grpc"

	"golang.org/x/net/context"

	"github.com/havoc-io/mutagen/cmd"
	"github.com/havoc-io/mutagen/daemon"
	"github.com/havoc-io/mutagen/process"
)

func dialDaemon() (*grpc.ClientConn, error) {
	return grpc.Dial(
		"",
		grpc.WithBlock(),
		grpc.WithDialer(func(_ string, timeout time.Duration) (net.Conn, error) {
			return daemon.DialTimeout(timeout)
		}),
		grpc.WithInsecure(),
		grpc.WithTimeout(1*time.Second),
	)
}

var daemonUsage = `usage: mutagen daemon [-h|--help] [-s|--stop]

Controls the lifecycle of the Mutagen daemon. The default behavior of this
command is to start the Mutagen daemon in the background. The command is
idempotent - a daemon instance is only created if one doesn't already exist.
`

func daemonMain(arguments []string) {
	// Parse flags.
	flagSet := cmd.NewFlagSet("daemon", daemonUsage, nil)
	run := flagSet.BoolP("run", "r", false, "run the daemon server")
	stop := flagSet.BoolP("stop", "s", false, "stop any running daemon server")
	flagSet.ParseOrDie(arguments)

	// Check that options are sane.
	if *run && *stop {
		cmd.Fatal(errors.New("-r/--run with -s/--stop doesn't make sense"))
	}
{'fraction_non_alphanumeric': 0.152317880794702, 'fraction_numerical': 0.0007791195948578107, 'mean_word_length': 4.075098814229249, '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': '75549', 'n_tokens_mistral': 973, 'n_tokens_neox': 935, 'n_words': 236}