<commit_before>package gode

import (
	"os"
	"path/filepath"
	"runtime"
)

// The Node version to install.
// Override this by setting client.Version.
const DefaultNodeVersion = "v0.10.32"

// Client is the interface between Node and Go.
// It also setups up the Node environment if needed.
type Client struct {
	RootPath    string
	NodePath    string
	NpmPath     string
	ModulesPath string
	Version     string
	NodeURL     string
}

// NewClient creates a new Client at the specified rootPath
// The Node installation can then be setup here with client.Setup()
func NewClient(rootPath string) *Client {
	client := &Client{
		RootPath:    rootPath,
		NodePath:    filepath.Join(rootPath, nodeBase(DefaultNodeVersion), "bin", "node"),
		NpmPath:     filepath.Join(rootPath, nodeBase(DefaultNodeVersion), "bin", "npm"),
		ModulesPath: filepath.Join(rootPath, "lib", "node_modules"),
		Version:     DefaultNodeVersion,
		NodeURL:     nodeURL(DefaultNodeVersion),
	}
	os.Setenv("NODE_PATH", client.ModulesPath)
	os.Setenv("NPM_CONFIG_GLOBAL", "true")
	os.Setenv("NPM_CONFIG_PREFIX", client.RootPath)
	os.Setenv("NPM_CONFIG_SPINNER", "false")

	return client
}

func nodeBase(version string) string {
	switch {
	case runtime.GOARCH == "386":
		return "node-" + version + "-" + runtime.GOOS + "-x86"
	default:
		return "node-" + version + "-" + runtime.GOOS + "-x64"
	}
}

func nodeURL(version string) string {
	switch {
	case runtime.GOOS == "windows" && runtime.GOARCH == "386":
		return "http://nodejs.org/dist/" + version + "/node.exe"
	case runtime.GOOS == "windows" && runtime.GOARCH == "amd64":
		return "http://nodejs.org/dist/" + version + "/x64/node.exe"
	case runtime.GOARCH == "386":
		return "http://nodejs.org/dist/" + version + "/" + nodeBase(version) + ".tar.gz"
	default:
		return "http://nodejs.org/dist/" + version + "/" + nodeBase(version) + ".tar.gz"
	}
}
<commit_msg>fixed config var<commit_after>package gode

import (
	"os"
	"path/filepath"
	"runtime"
)

// The Node version to install.
// Override this by setting client.Version.
const DefaultNodeVersion = "v0.10.32"

// Client is the interface between Node and Go.
// It also setups up the Node environment if needed.
type Client struct {
	RootPath    string
	NodePath    string
	NpmPath     string
	ModulesPath string
	Version     string
	NodeURL     string
}

// NewClient creates a new Client at the specified rootPath
// The Node installation can then be setup here with client.Setup()
func NewClient(rootPath string) *Client {
	client := &Client{
		RootPath:    rootPath,
		NodePath:    filepath.Join(rootPath, nodeBase(DefaultNodeVersion), "bin", "node"),
		NpmPath:     filepath.Join(rootPath, nodeBase(DefaultNodeVersion), "bin", "npm"),
		ModulesPath: filepath.Join(rootPath, "lib", "node_modules"),
		Version:     DefaultNodeVersion,
		NodeURL:     nodeURL(DefaultNodeVersion),
	}
	os.Setenv("NODE_PATH", client.ModulesPath)
	os.Setenv("NPM_CONFIG_GLOBAL", "true")
	os.Setenv("NPM_CONFIG_PREFIX", client.RootPath)
	os.Setenv("NPM_CONFIG_SPIN", "false")

	return client
}

func nodeBase(version string) string {
	switch {
	case runtime.GOARCH == "386":
		return "node-" + version + "-" + runtime.GOOS + "-x86"
	default:
		return "node-" + version + "-" + runtime.GOOS + "-x64"
	}
}

func nodeURL(version string) string {
	switch {
	case runtime.GOOS == "windows" && runtime.GOARCH == "386":
		return "http://nodejs.org/dist/" + version + "/node.exe"
	case runtime.GOOS == "windows" && runtime.GOARCH == "amd64":
		return "http://nodejs.org/dist/" + version + "/x64/node.exe"
	case runtime.GOARCH == "386":
		return "http://nodejs.org/dist/" + version + "/" + nodeBase(version) + ".tar.gz"
	default:
		return "http://nodejs.org/dist/" + version + "/" + nodeBase(version) + ".tar.gz"
	}
}

{'fraction_non_alphanumeric': 0.1470276008492569, 'fraction_numerical': 0.01167728237791932, 'mean_word_length': 3.8758085381630014, 'pattern_counts': {'":': 8, '<': 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': '438158', 'n_tokens_mistral': 1322, 'n_tokens_neox': 1269, 'n_words': 326}