<commit_before>#import <sys/ioctl.h>
#include <sys/types.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>

// print something verbose
#define VERBOSE(x) { progress_event(x); };

// output some data
#define NOTIFY(x) progress_message(x);

// update percentage of currently running task
#define PERCENT(x) progress_percent(x);


#define NSPrint(M, ...) fprintf(stderr, "%s \n", [[NSString stringWithFormat:M, ##__VA_ARGS__] UTF8String]);

#define CLUTCH_DEBUG 1

#ifdef CLUTCH_DEBUG
#   define FILE_NAME (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) // shortened path of __FILE__ is there is one
#
#   define NSLog(M, ...) fprintf(stderr, "\033[0;32mDEBUG\033[0m | %s:%d | %s\n", FILE_NAME, __LINE__, [[NSString stringWithFormat:M, ##__VA_ARGS__] UTF8String]);
#   define DEBUG(M, ...) fprintf(stderr, "\033[0;32mDEBUG\033[0m | %s:%d | %s\n", FILE_NAME, __LINE__, [[NSString stringWithFormat:M, ##__VA_ARGS__] UTF8String]);
#   define ERROR(M, ...) fprintf(stderr, "\033[0;32mERROR\033[0m | %s \n", [[NSString stringWithFormat:M, ##__VA_ARGS__] UTF8String]);

#   define FILE_NAME (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) // shortened path of __FILE__ is there is one
#   define DebugLog(M, ...) NSLog(@"\033[0;32m[YOPA]\033[0m | %s:%d | %@\n", FILE_NAME, __LINE__, [NSString stringWithFormat:M, ##__VA_ARGS__]);

#else
#   define DEBUG(M, ...)
#   define NSLog(M, ...)<commit_msg>Define CLUTCH_DEBUG conditionally (NDEBUG or set by user with xcodebuild)<commit_after>#import <sys/ioctl.h>
#include <sys/types.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>

// print something verbose
#define VERBOSE(x) { progress_event(x); };

// output some data
#define NOTIFY(x) progress_message(x);

// update percentage of currently running task
#define PERCENT(x) progress_percent(x);


#define NSPrint(M, ...) fprintf(stderr, "%s \n", [[NSString stringWithFormat:M, ##__VA_ARGS__] UTF8String]);

#if !defined(CLUTCH_DEBUG) || !defined(NDEBUG)
#define CLUTCH_DEBUG 1
#endif

#if CLUTCH_DEBUG
#   define FILE_NAME (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) // shortened path of __FILE__ is there is one
#
#   define NSLog(M, ...) fprintf(stderr, "\033[0;32mDEBUG\033[0m | %s:%d | %s\n", FILE_NAME, __LINE__, [[NSString stringWithFormat:M, ##__VA_ARGS__] UTF8String]);
#   define DEBUG(M, ...) fprintf(stderr, "\033[0;32mDEBUG\033[0m | %s:%d | %s\n", FILE_NAME, __LINE__, [[NSString stringWithFormat:M, ##__VA_ARGS__] UTF8String]);
#   define ERROR(M, ...) fprintf(stderr, "\033[0;32mERROR\033[0m | %s \n", [[NSString stringWithFormat:M, ##__VA_ARGS__] UTF8String]);

#   define FILE_NAME (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) // shortened path of __FILE__ is there is one
#   define DebugLog(M, ...) NSLog(@"\033[0;32m[YOPA]\033[0m | %s:%d | %@\n", FILE_NAME, __LINE__, [NSString stringWithFormat:M, ##__VA_ARGS__]);

#else
#   define DEBUG(M, ...)
#   define NSLog(M, ...)
{'fraction_non_alphanumeric': 0.18760357971494862, 'fraction_numerical': 0.03115677825654624, 'mean_word_length': 5.0, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '6147489', 'n_tokens_mistral': 1199, 'n_tokens_neox': 1112, 'n_words': 261}