<commit_before>// +build linux

package xid

import "io/ioutil"

func readPlatformMachineID() (string, error) {
	b, err := ioutil.ReadFile("/sys/class/dmi/id/product_uuid")
	return string(b), err
}
<commit_msg>Try /etc/machine-id for linux first (#60)<commit_after>// +build linux

package xid

import "io/ioutil"

func readPlatformMachineID() (string, error) {
	b, err := ioutil.ReadFile("/etc/machine-id")
	if err != nil || len(b) == 0 {
		b, err = ioutil.ReadFile("/sys/class/dmi/id/product_uuid")
	}
	return string(b), err
}

{'fraction_non_alphanumeric': 0.17013232514177692, 'fraction_numerical': 0.005671077504725898, 'mean_word_length': 4.353535353535354, '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': '4390753', 'n_tokens_mistral': 212, 'n_tokens_neox': 203, 'n_words': 47}