<commit_before>//////////////////////////////////////////////////////////////////////////////
// NoLifeNx - Part of the NoLifeStory project                               //
// Copyright (C) 2013 <NAME>                                        //
//                                                                          //
// This program is free software: you can redistribute it and/or modify     //
// it under the terms of the GNU Affero General Public License as           //
// published by the Free Software Foundation, either version 3 of the       //
// License, or (at your option) any later version.                          //
//                                                                          //
// This program is distributed in the hope that it will be useful,          //
// but WITHOUT ANY WARRANTY; without even the implied warranty of           //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
// GNU Affero General Public License for more details.                      //
//                                                                          //
// You should have received a copy of the GNU Affero General Public License //
// along with this program.  If not, see <http://www.gnu.org/licenses/>.    //
//////////////////////////////////////////////////////////////////////////////
#ifdef _WIN32
#  define NL_WINDOWS
#  ifndef NOMINMAX
#    define NOMINMAX
#  endif
#  define WIN32_LEAN_AND_MEAN
#else
#  define NL_POSIX
#endif
#include <string>
#include <cstdint>
namespace NL {
    class Bitmap;
    class Audio;
    class Node;
    class File;
    class Bitmap {
    public:
        Bitmap() : d(nullptr), w(0), h(0) {}
        Bitmap(Bitmap const & o) : d(o.d), w(o.w), h(o.h) {}
        Bitmap & operator=(Bitmap const &);
        bool operator<(Bitmap) const;
        void const * Data() const;
        uint16_t Width() const;
        uint16_t Height() const;
        uint32_t Length() const;
        size_t ID() const;
    private:
        Bitmap(uint16_t w, uint16_t h, void const * d) : d(d), w(w), h(h) {}
        void const * d;
        uint16_t w, h;
        friend Node;
    };
    class Audio {
    public:
        Audio() : d(nullptr), l(0) {}
        Audio(uint32_t l, void const * d) : d(d), l(l) {}
        Audio(Audio const & o) : d(o.d), l(o.l) {}
        Audio & operator=(Audio const &);
        bool operator==(Audio) const;
        operator bool() const;
        void const * Data() const;
        uint32_t Length() const;
    private:
        void const * d;
        uint32_t l;
        friend Node;
    };
    class Node {
    public:
        struct Data;
        enum Type : uint16_t {
            none = 0,
            ireal = 1,
            dreal = 2,
            string = 3,
            vector = 4,
            bitmap = 5,
            audio = 6,
        };
        Node();
        Node(Node const & o);
        Node(Node &&);
        Node & operator=(Node const &);
        Node begin() const;
        Node end() const;
        Node operator*() const;
        Node & operator++();
        Node operator++(int);
        bool operator==(Node) const;
        bool operator!=(Node) const;
        std::string operator+(std::string) const;
        std::string operator+(char const *) const;
        template <typename T>
        typename std::enable_if<std::is_integral<T>::value, Node>::type operator[](T n) const {
            return operator[](std::to_string(n));
        }
        Node operator[](std::string const &) const;
        Node operator[](char const *) const;
        Node operator[](Node) const;
        Node operator[](std::pair<char const *, size_t>) const;
        operator int64_t() const;
        operator uint64_t() const;
        operator int32_t() const;
        operator uint32_t() const;
        operator int16_t() const;
        operator uint16_t() const;
        operator int8_t() const;
        operator uint8_t() const;
        operator double() const;
        operator float() const;
        operator std::string() const;
        operator std::pair<int32_t, int32_t>() const;
        operator Bitmap() const;
        operator Audio() const;
        operator bool() const;
        int64_t GetInt(int64_t = 0) const;
        double GetFloat(double = 0) const;
        std::string GetString(std::string = std::string()) const;
        std::pair<int32_t, int32_t> GetVector(std::pair<int32_t, int32_t> = std::pair<int32_t, int32_t>(0, 0)) const;
        Bitmap GetBitmap(Bitmap = Bitmap()) const;
        Audio GetAudio(Audio = Audio()) const;
        bool GetBool(bool = false) const;
        int32_t X(int32_t = 0) const;
        int32_t Y(int32_t = 0) const;
        std::string Name() const;
        std::pair<char const *, size_t> NameFast() const;
        size_t Size() const;
        Type T() const;
    private:
        Node(Data const *, File const *);
        Node GetChild(char const *, size_t) const;
        int64_t ToInt() const;
        double ToFloat() const;
        std::string ToString() const;
        std::pair<int32_t, int32_t> ToVector() const;
        Bitmap ToBitmap() const;
        Audio ToAudio() const;<commit_msg>Fix for certain compilers<commit_after>//////////////////////////////////////////////////////////////////////////////
// NoLifeNx - Part of the NoLifeStory project                               //
// Copyright (C) 2013 <NAME>                                        //
//                                                                          //
// This program is free software: you can redistribute it and/or modify     //
// it under the terms of the GNU Affero General Public License as           //
// published by the Free Software Foundation, either version 3 of the       //
// License, or (at your option) any later version.                          //
//                                                                          //
// This program is distributed in the hope that it will be useful,          //
// but WITHOUT ANY WARRANTY; without even the implied warranty of           //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
// GNU Affero General Public License for more details.                      //
//                                                                          //
// You should have received a copy of the GNU Affero General Public License //
// along with this program.  If not, see <http://www.gnu.org/licenses/>.    //
//////////////////////////////////////////////////////////////////////////////
#ifdef _WIN32
#  define NL_WINDOWS
#  ifndef NOMINMAX
#    define NOMINMAX
#  endif
#  define WIN32_LEAN_AND_MEAN
#else
#  define NL_POSIX
#endif
#include <string>
#include <cstdint>
namespace NL {
    class Bitmap;
    class Audio;
    class Node;
    class File;
    class Bitmap {
    public:
        Bitmap() : d(nullptr), w(0), h(0) {}
        Bitmap(Bitmap const & o) : d(o.d), w(o.w), h(o.h) {}
        Bitmap & operator=(Bitmap const &);
        bool operator<(Bitmap) const;
        void const * Data() const;
        uint16_t Width() const;
        uint16_t Height() const;
        uint32_t Length() const;
        size_t ID() const;
    private:
        Bitmap(uint16_t w, uint16_t h, void const * d) : d(d), w(w), h(h) {}
        void const * d;
        uint16_t w, h;
        friend Node;
    };
    class Audio {
    public:
        Audio() : d(nullptr), l(0) {}
        Audio(uint32_t l, void const * d) : d(d), l(l) {}
        Audio(Audio const & o) : d(o.d), l(o.l) {}
        Audio & operator=(Audio const &);
        bool operator==(Audio) const;
        operator bool() const;
        void const * Data() const;
        uint32_t Length() const;
    private:
        void const * d;
        uint32_t l;
        friend Node;
    };
    class Node {
    public:
        struct Data;
        enum Type : uint16_t {
            none = 0,
            ireal = 1,
            dreal = 2,
            string = 3,
            vector = 4,
            bitmap = 5,
            audio = 6,
        };
        Node();
        Node(Node const & o);
        Node(Node &&);
        Node & operator=(Node const &);
        Node begin() const;
        Node end() const;
        Node operator*() const;
        Node & operator++();
        Node operator++(int);
        bool operator==(Node) const;
        bool operator!=(Node) const;
        std::string operator+(std::string) const;
        std::string operator+(char const *) const;
        template <typename T>
        typename std::enable_if<std::is_integral<T>::value, Node>::type operator[](T n) const {
            return operator[](std::to_string(n));
        }
        Node operator[](std::string const &) const;
        Node operator[](char const *) const;
        Node operator[](Node) const;
        Node operator[](std::pair<char const *, size_t>) const;
        operator int64_t() const;
        operator uint64_t() const;
        operator int32_t() const;
        operator uint32_t() const;
        operator int16_t() const;
        operator uint16_t() const;
        operator int8_t() const;
        operator uint8_t() const;
        operator double() const;
        operator float() const;
        operator std::string() const;
        operator std::pair<int32_t, int32_t>() const;
        operator Bitmap() const;
        operator Audio() const;
        operator bool() const;
        int64_t GetInt(int64_t = 0) const;
        double GetFloat(double = 0) const;
        std::string GetString(std::string = std::string()) const;
        std::pair<int32_t, int32_t> GetVector(std::pair<int32_t, int32_t> = std::make_pair(0, 0)) const;
        Bitmap GetBitmap(Bitmap = Bitmap()) const;
        Audio GetAudio(Audio = Audio()) const;
        bool GetBool(bool = false) const;
        int32_t X(int32_t = 0) const;
        int32_t Y(int32_t = 0) const;
        std::string Name() const;
        std::pair<char const *, size_t> NameFast() const;
        size_t Size() const;
        Type T() const;
    private:
        Node(Data const *, File const *);
        Node GetChild(char const *, size_t) const;
        int64_t ToInt() const;
        double ToFloat() const;
        std::string ToString() const;
        std::pair<int32_t, int32_t> ToVector() const;
        Bitmap ToBitmap() const;
        Audio ToAudio() const;
{'fraction_non_alphanumeric': 0.14191610965804513, 'fraction_numerical': 0.017630533759566018, 'mean_word_length': 1.5764911405041178, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 20, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7398212', 'n_tokens_mistral': 2927, 'n_tokens_neox': 2789, 'n_words': 901}