<commit_before>#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
#include <malloc.h>
#include <time.h>
#include <sys/time.h>
#include <locale.h>
#include <assert.h>
#include <errno.h>
#include <unistd.h>
#include "avl/avl.h"

static unsigned int get_free_mem()
{
    FILE *f;
    int n;
    char *start, *end;
    char buffer[0x1000];
    f = fopen("/proc/meminfo","r");
    if(!f) return -1;
    n = fread(buffer, 1, 0x1000, f);
    if(n<1) { fclose(f); return -1; }
    fclose(f);
    buffer[0x1000-1] = '\0';
    start = strstr(buffer, "MemFree:");
    if(start==NULL) return -1;
    end = strchr(start,'\n');
    if(end==NULL) return -1;<commit_msg>bug fix<commit_after>#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
#include <malloc.h>
#include <time.h>
#include <sys/time.h>
#include <locale.h>
#include <assert.h>
#include <errno.h>
#include <unistd.h>
#include "avl/avl.h"

static unsigned int get_free_mem()
{
    FILE *f;
    int n;
    char *start, *end;
    char buffer[0x1000];
    f = fopen("/proc/meminfo","r");
    if(!f) return 0;
    n = fread(buffer, 1, 0x1000, f);
    if(n<1) { fclose(f); return 0; }
    fclose(f);
    buffer[0x1000-1] = '\0';
    start = strstr(buffer, "MemFree:");
    if(start==NULL) return 0;
    end = strchr(start,'\n');
    if(end==NULL) return 0;
{'fraction_non_alphanumeric': 0.20058997050147492, 'fraction_numerical': 0.03392330383480826, 'mean_word_length': 3.493377483443709, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 25, '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': '4271528', 'n_tokens_mistral': 598, 'n_tokens_neox': 566, 'n_words': 130}