<commit_before>#include <hidapi.h>
#include <cstdio>

int main(int argc, char **argv) {
#define MAX_STR 255
    wchar_t wstr[MAX_STR];
    
    hid_device *handle = hid_open(0x16c0, 0x0480, nullptr);
    if (!handle) {
        fprintf(stderr, "No temperature sensor found!\n");
        return 1;
    }
    
    printf("Device Info:\n");
    int res = hid_get_manufacturer_string(handle, wstr, MAX_STR);
    printf("\tManufacturer String: %ls\n", wstr);
    
    res = hid_get_product_string(handle, wstr, MAX_STR);
    printf("\tProduct String: %ls\n", wstr);
    
    unsigned char buf[65];
    for (;;) {
        int num = hid_read(handle, buf, 64);
        if (num < 0) {
            fprintf(stderr, "Could not read from device!\n");
            return 2;
        }
        if (num == 64) {
            short temp = *(short *)&buf[4]; //holy fuck!
            printf("temp: %+.1f°C\n", (float)temp/10.0f);
        }
    }
    return 0;
}
<commit_msg>bunnytiem<commit_after>#include <hidapi.h>
#include <cstdio>

int main(int argc, char **argv) {
    
    hid_device *handle = hid_open(0x16c0, 0x0480, nullptr);
    if (!handle) {
        fprintf(stderr, "No temperature sensor found!\n");
        return 1;
    }
    
    const int MAX_STR = 255;
		wchar_t wstr[MAX_STR];

    printf("Device Info:\n");
    int res = hid_get_manufacturer_string(handle, wstr, MAX_STR);
    printf("\tManufacturer String: %ls\n", wstr);
    
    res = hid_get_product_string(handle, wstr, MAX_STR);
    printf("\tProduct String: %ls\n", wstr);
    
    unsigned char buf[65];
    for (;;) {
        int num = hid_read(handle, buf, 64);
        if (num < 0) {
            fprintf(stderr, "Could not read from device!\n");
            return 2;
        }
        if (num == 64) {
            short temp = *(short *)&buf[4]; //holy fuck!
            printf("temp: %+.1f°C\n", (float)temp/10.0f);
        }
    }
    return 0;
}

{'fraction_non_alphanumeric': 0.15235602094240838, 'fraction_numerical': 0.028272251308900525, 'mean_word_length': 2.2610921501706485, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '4563389', 'n_tokens_mistral': 714, 'n_tokens_neox': 680, 'n_words': 163}