<commit_before>// std
#include <chrono>
#include <csignal>
#include <iostream>
#include <unordered_map>

// Includes common necessary includes for development using depthai library
#include "depthai/depthai.hpp"

// #define DEPTHAI_STABILITY_TEST_SCRIPT

#ifdef DEPTHAI_STABILITY_TEST_DEBUG
    #include <opencv2/opencv.hpp>
#endif

static const std::vector<std::string> labelMap = {
    "person",        "bicycle",      "car",           "motorbike",     "aeroplane",   "bus",         "train",       "truck",        "boat",
    "traffic light", "fire hydrant", "stop sign",     "parking meter", "bench",       "bird",        "cat",         "dog",          "horse",
    "sheep",         "cow",          "elephant",      "bear",          "zebra",       "giraffe",     "backpack",    "umbrella",     "handbag",
    "tie",           "suitcase",     "frisbee",       "skis",          "snowboard",   "sports ball", "kite",        "baseball bat", "baseball glove",
    "skateboard",    "surfboard",    "tennis racket", "bottle",        "wine glass",  "cup",         "fork",        "knife",        "spoon",
    "bowl",          "banana",       "apple",         "sandwich",      "orange",      "broccoli",    "carrot",      "hot dog",      "pizza",
    "donut",         "cake",         "chair",         "sofa",          "pottedplant", "bed",         "diningtable", "toilet",       "tvmonitor",
    "laptop",        "mouse",        "remote",        "keyboard",      "cell phone",  "microwave",   "oven",        "toaster",      "sink",
    "refrigerator",  "book",         "clock",         "vase",          "scissors",    "teddy bear",  "hair drier",  "toothbrush"};

// Keyboard interrupt (Ctrl + C) detected
static std::atomic<bool> alive{true};
static void sigintHandler(int signum) {
    alive = false;
}

int main(int argc, char** argv) {
    using namespace std;
    using namespace std::chrono;
    std::signal(SIGINT, &sigintHandler);

    std::string nnPath(BLOB_PATH);

    // // If path to blob specified, use that
    // if(argc > 1) {
    //     nnPath = std::string(argv[1]);
    // }

    seconds TEST_TIMEOUT{24 * 60 * 60};
    if(argc > 1) {
        TEST_TIMEOUT = seconds{stoi(argv[1])};
    }

    // Create pipeline
    dai::Pipeline pipeline;

    // Define sources and outputs
    auto camRgb = pipeline.create<dai::node::ColorCamera>();
    auto monoLeft = pipeline.create<dai::node::MonoCamera>();
    auto monoRight = pipeline.create<dai::node::MonoCamera>();
    auto ve1 = pipeline.create<dai::node::VideoEncoder>();
    auto ve2 = pipeline.create<dai::node::VideoEncoder>();
    auto ve3 = pipeline.create<dai::node::VideoEncoder>();
    auto spatialDetectionNetwork = pipeline.create<dai::node::YoloSpatialDetectionNetwork>();
    auto stereo = pipeline.create<dai::node::StereoDepth>();
    auto edgeDetectorLeft = pipeline.create<dai::node::EdgeDetector>();
    auto edgeDetectorRight = pipeline.create<dai::node::EdgeDetector>();
    auto edgeDetectorRgb = pipeline.create<dai::node::EdgeDetector>();
#ifdef DEPTHAI_STABILITY_TEST_SCRIPT
    auto script1 = pipeline.create<dai::node::Script>();
    auto script2 = pipeline.create<dai::node::Script>();
    auto script3 = pipeline.create<dai::node::Script>();
    auto script4 = pipeline.create<dai::node::Script>();
    auto scriptBurn = pipeline.create<dai::node::Script>();
#endif

    // TODO(themarpe) - enable specific parts separatelly, to control load<commit_msg>Stability test - set XLink chunk size to 0<commit_after>// std
#include <chrono>
#include <csignal>
#include <iostream>
#include <unordered_map>

// Includes common necessary includes for development using depthai library
#include "depthai/depthai.hpp"

// #define DEPTHAI_STABILITY_TEST_SCRIPT

#ifdef DEPTHAI_STABILITY_TEST_DEBUG
    #include <opencv2/opencv.hpp>
#endif

static const std::vector<std::string> labelMap = {
    "person",        "bicycle",      "car",           "motorbike",     "aeroplane",   "bus",         "train",       "truck",        "boat",
    "traffic light", "fire hydrant", "stop sign",     "parking meter", "bench",       "bird",        "cat",         "dog",          "horse",
    "sheep",         "cow",          "elephant",      "bear",          "zebra",       "giraffe",     "backpack",    "umbrella",     "handbag",
    "tie",           "suitcase",     "frisbee",       "skis",          "snowboard",   "sports ball", "kite",        "baseball bat", "baseball glove",
    "skateboard",    "surfboard",    "tennis racket", "bottle",        "wine glass",  "cup",         "fork",        "knife",        "spoon",
    "bowl",          "banana",       "apple",         "sandwich",      "orange",      "broccoli",    "carrot",      "hot dog",      "pizza",
    "donut",         "cake",         "chair",         "sofa",          "pottedplant", "bed",         "diningtable", "toilet",       "tvmonitor",
    "laptop",        "mouse",        "remote",        "keyboard",      "cell phone",  "microwave",   "oven",        "toaster",      "sink",
    "refrigerator",  "book",         "clock",         "vase",          "scissors",    "teddy bear",  "hair drier",  "toothbrush"};

// Keyboard interrupt (Ctrl + C) detected
static std::atomic<bool> alive{true};
static void sigintHandler(int signum) {
    alive = false;
}

int main(int argc, char** argv) {
    using namespace std;
    using namespace std::chrono;
    std::signal(SIGINT, &sigintHandler);

    std::string nnPath(BLOB_PATH);

    // // If path to blob specified, use that
    // if(argc > 1) {
    //     nnPath = std::string(argv[1]);
    // }

    seconds TEST_TIMEOUT{24 * 60 * 60};
    if(argc > 1) {
        TEST_TIMEOUT = seconds{stoi(argv[1])};
    }

    // Create pipeline
    dai::Pipeline pipeline;
    pipeline.setXLinkChunkSize(0);

    // Define sources and outputs
    auto camRgb = pipeline.create<dai::node::ColorCamera>();
    auto monoLeft = pipeline.create<dai::node::MonoCamera>();
    auto monoRight = pipeline.create<dai::node::MonoCamera>();
    auto ve1 = pipeline.create<dai::node::VideoEncoder>();
    auto ve2 = pipeline.create<dai::node::VideoEncoder>();
    auto ve3 = pipeline.create<dai::node::VideoEncoder>();
    auto spatialDetectionNetwork = pipeline.create<dai::node::YoloSpatialDetectionNetwork>();
    auto stereo = pipeline.create<dai::node::StereoDepth>();
    auto edgeDetectorLeft = pipeline.create<dai::node::EdgeDetector>();
    auto edgeDetectorRight = pipeline.create<dai::node::EdgeDetector>();
    auto edgeDetectorRgb = pipeline.create<dai::node::EdgeDetector>();
#ifdef DEPTHAI_STABILITY_TEST_SCRIPT
    auto script1 = pipeline.create<dai::node::Script>();
    auto script2 = pipeline.create<dai::node::Script>();
    auto script3 = pipeline.create<dai::node::Script>();
    auto script4 = pipeline.create<dai::node::Script>();
    auto scriptBurn = pipeline.create<dai::node::Script>();
#endif

    // TODO(themarpe) - enable specific parts separatelly, to control load
{'fraction_non_alphanumeric': 0.16081197811690182, 'fraction_numerical': 0.005470774546501584, 'mean_word_length': 2.863737486095662, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 53, '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': '5882509', 'n_tokens_mistral': 2224, 'n_tokens_neox': 2195, 'n_words': 487}