<commit_before>package main

import (
	"errors"
	"github.com/colinmarc/hdfs"
	"io"
	"net/url"
	"os"
	"os/user"
	"path"
	"regexp"
	"strings"
)

var (
	errMultipleNamenodeUrls = errors.New("Multiple namenode URLs specified")
	rootPath                = userDir()
)

func userDir() string {
	currentUser, err := user.Current()
	if err != nil || currentUser.Username == "" {
		return "/"
	}

	return path.Join("/user", currentUser.Username)
}

// normalizePaths parses the hosts out of HDFS URLs, and turns relative paths
// into absolute ones (by appending /user/<user>). If multiple HDFS urls with<commit_msg>Hack to workaround Current.user on linux<commit_after>package main

import (
	"errors"
	"github.com/colinmarc/hdfs"
	"io"
	"net/url"
	"os"
	"os/user"
	"path"
	"regexp"
	"strings"
)

var (
	errMultipleNamenodeUrls = errors.New("Multiple namenode URLs specified")
	rootPath                = userDir()
)

func userDir() string {
	//	currentUser, err := user.Current()
	//	if err != nil || currentUser.Username == "" {
	return "/"
	//	}

	//	return path.Join("/user", currentUser.Username)
}

// normalizePaths parses the hosts out of HDFS URLs, and turns relative paths
// into absolute ones (by appending /user/<user>). If multiple HDFS urls with
{'fraction_non_alphanumeric': 0.14, 'fraction_numerical': 0.0, 'mean_word_length': 3.5, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1629792', 'n_tokens_mistral': 456, 'n_tokens_neox': 436, 'n_words': 118}