<commit_before>#include <stdio.h>
#include "../../include/os.h"
#include <assert.h>

static char path[256];

const char *appdata(const char *prog){
	if(path[0] == 0){
		int n = snprintf(path, sizeof(path), "~/.%s", prog);
		assert(n > 0);
	}
	return path;
}<commit_msg>getenv instead of ~<commit_after>#include <stdlib.h>
#include <stdio.h>
#include "../../include/os.h"
#include <assert.h>

static char path[256];

const char *appdata(const char *prog){
	if(path[0] == 0){
		char *home = getenv("HOME");
		if (!home)
			home = ".";
		int n = snprintf(path, sizeof(path), "%s/%s", home, prog);
		assert(n > 0);
	}
	return path;
}
{'fraction_non_alphanumeric': 0.21939586645468998, 'fraction_numerical': 0.019077901430842606, 'mean_word_length': 4.0, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 10, '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': '733256', 'n_tokens_mistral': 270, 'n_tokens_neox': 246, 'n_words': 64}