<commit_before>#ifndef __MW__RANDOM__
#define __MW__RANDOM__

#include <random>
#include <iostream>

#define FAILURE_PROBABILITY 0.01

class MW_Random {
public:
  MW_Random(int id, int size)
  {
    unsigned current = std::chrono::high_resolution_clock::now().time_since_epoch().count();
    current += id * size;
    dre = std::default_random_engine(current);
    distribution = std::uniform_real_distribution<double> (0.0, 1.0);
  }

  bool random_fail()
  {
    return distribution(dre) < FAILURE_PROBABILITY;
  }
private:
  std::uniform_real_distribution<double> distribution;
  std::default_random_engine dre;
};

#endif // __MW__RANDOM__
<commit_msg>fix for missing header in MW_Random<commit_after>#ifndef __MW__RANDOM__
#define __MW__RANDOM__

#include <random>
#include <chrono>
#include <iostream>

#define FAILURE_PROBABILITY 0.01

class MW_Random {
public:
  MW_Random(int id, int size)
  {
    unsigned current = std::chrono::high_resolution_clock::now().time_since_epoch().count();
    current += id * size;
    dre = std::default_random_engine(current);
    distribution = std::uniform_real_distribution<double> (0.0, 1.0);
  }

  bool random_fail()
  {
    return distribution(dre) < FAILURE_PROBABILITY;
  }
private:
  std::uniform_real_distribution<double> distribution;
  std::default_random_engine dre;
};

#endif // __MW__RANDOM__

{'fraction_non_alphanumeric': 0.11908284023668639, 'fraction_numerical': 0.010355029585798817, 'mean_word_length': 5.322429906542056, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 12, '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': '2915504', 'n_tokens_mistral': 488, 'n_tokens_neox': 468, 'n_words': 91}