<commit_before>#include <algorithm>
#include <chrono>
#include <random>
#include <vector>

template <typename URNG>
std::vector<unsigned int> RandomPotts(const size_t L, const size_t q, URNG &rng) {
  std::uniform_int_distribution<unsigned int> dist_q(0, q - 1);
  auto random_q = std::bind(dist_q, rng);
  std::vector<unsigned int> grid(L * L);
  std::generate(std::begin(grid), std::end(grid), random_q);
  return grid;
}

double calculateH() { return 0; }

int main(int argc, char *argv[]) {
  std::random_device rd;
  std::mt19937 rng(rd());

  std::vector<unsigned int> grid = RandomPotts(100, 3, rng);
}
<commit_msg>Some work.<commit_after>#include <algorithm>
#include <cmath>
#include <random>
#include <vector>

#include "union_find.hpp"

typedef unsigned short Spin;
typedef std::vector<Spin> SpinConfiguration;


template <typename URNG>
SpinConfiguration RandomPotts(const size_t L, const size_t q, URNG &rng) {
  std::uniform_int_distribution<Spin> dist_q(0, q - 1);
  auto random_q = std::bind(dist_q, rng);
  SpinConfiguration grid(L * L);
  std::generate(std::begin(grid), std::end(grid), random_q);
  return grid;
}

double calculateH(const SpinConfiguration &sc) {
  const size_t L = std::sqrt(sc.size());
  double H = 0;
  size_t right, bottom;

  for (size_t pos = 0; pos < sc.size(); pos++) {
    right = pos + 1;
    bottom = pos + L;
    if ((pos + 1) % L == 0) {
      right -= L;
    }
    if ((pos + L) >= L * L) {
      bottom = pos % L;
    }


  }

  return 0;
}

int main(int argc, char *argv[]) {
  std::random_device rd;
  std::mt19937 rng(rd());

  SpinConfiguration grid = RandomPotts(100, 3, rng);
}

{'fraction_non_alphanumeric': 0.15902140672782875, 'fraction_numerical': 0.017737003058103974, 'mean_word_length': 4.311688311688312, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, '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': '2920229', 'n_tokens_mistral': 647, 'n_tokens_neox': 594, 'n_words': 162}