<commit_before>#ifndef MJOLNIR_UTIL_PROGRESS_BAR_HPP
#define MJOLNIR_UTIL_PROGRESS_BAR_HPP
#include <cstring>
#include <cmath>
#include <array>

namespace mjolnir
{

template<std::size_t Width>
class progress_bar
{
    //XXX: requires UTF-8. TODO: consider setting locale
    static constexpr auto full  = u8"█"; // U+2588 Full block
    static constexpr auto l7    = u8"▉"; // U+2589 Left seven eighths block
    static constexpr auto l6    = u8"▊"; // U+258A Left three quarters block
    static constexpr auto l5    = u8"▋"; // U+258B Left five eighths block
    static constexpr auto l4    = u8"▌"; // U+258C Left half block
    static constexpr auto l3    = u8"▍"; // U+258D Left three eighths block
    static constexpr auto l2    = u8"▎"; // U+258E Left one quarter block
    static constexpr auto l1    = u8"▏"; // U+258F Left one eighth block

    // \r100.0%| ... W*3 ... |\0
    static constexpr std::size_t buffer_size = 10 + Width * 3;

  public:

    progress_bar(): total_(1), r_total_(1.0)
    {
        buffer_.fill('\0');<commit_msg>fix: add missing include files<commit_after>#ifndef MJOLNIR_UTIL_PROGRESS_BAR_HPP
#define MJOLNIR_UTIL_PROGRESS_BAR_HPP
#include <array>
#include <cstring>
#include <cmath>
#include <cassert>

namespace mjolnir
{

template<std::size_t Width>
class progress_bar
{
    //XXX: requires UTF-8. TODO: consider setting locale
    static constexpr auto full  = u8"█"; // U+2588 Full block
    static constexpr auto l7    = u8"▉"; // U+2589 Left seven eighths block
    static constexpr auto l6    = u8"▊"; // U+258A Left three quarters block
    static constexpr auto l5    = u8"▋"; // U+258B Left five eighths block
    static constexpr auto l4    = u8"▌"; // U+258C Left half block
    static constexpr auto l3    = u8"▍"; // U+258D Left three eighths block
    static constexpr auto l2    = u8"▎"; // U+258E Left one quarter block
    static constexpr auto l1    = u8"▏"; // U+258F Left one eighth block

    // \r100.0%| ... W*3 ... |\0
    static constexpr std::size_t buffer_size = 10 + Width * 3;

  public:

    progress_bar(): total_(1), r_total_(1.0)
    {
        buffer_.fill('\0');
{'fraction_non_alphanumeric': 0.1225444340505145, 'fraction_numerical': 0.05144995322731525, 'mean_word_length': 3.0282485875706215, 'pattern_counts': {'":': 0, '<': 12, '<?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': '750395', 'n_tokens_mistral': 847, 'n_tokens_neox': 746, 'n_words': 235}