<commit_before>#include <algorithm>
#include <cstdio>
#include <cstring>
#include <map>

#include "hash.hpp"
#include "pg.hpp"
#include "slice.hpp"

auto importHeightMap (const std::string& fileName) {
	std::map<hash256_t, uint32_t> map;

	auto file = fopen(fileName.c_str(), "r");
	if (file == nullptr) return map;

	uint32_t height = 0;
	do {
		hash256_t hash;
		const auto read = fread(&hash[0], 32, 1, file);

		// EOF?
		if (read == 0) break;<commit_msg>tools: open in binary mode<commit_after>#include <algorithm>
#include <cstdio>
#include <cstring>
#include <map>

#include "hash.hpp"
#include "pg.hpp"
#include "slice.hpp"

auto importHeightMap (const std::string& fileName) {
	std::map<hash256_t, uint32_t> map;

	auto file = fopen(fileName.c_str(), "rb");
	if (file == nullptr) return map;

	uint32_t height = 0;
	do {
		hash256_t hash;
		const auto read = fread(&hash[0], 32, 1, file);

		// EOF?
		if (read == 0) break;
{'fraction_non_alphanumeric': 0.16416309012875535, 'fraction_numerical': 0.034334763948497854, 'mean_word_length': 4.654545454545454, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '7419557', 'n_tokens_mistral': 396, 'n_tokens_neox': 360, 'n_words': 101}