<commit_before>#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include <errno.h>
#include <signal.h>
#include <string.h>
#include <iio.h>
#include <ad9361.h>

#define NOTUSED(V) ((void) V)
#define MHZ(x) ((long long)(x*1000000.0 + .5))
#define GHZ(x) ((long long)(x*1000000000.0 + .5))
#define NUM_SAMPLES 2600000
#define BUFFER_SIZE (NUM_SAMPLES * 2 * sizeof(int16_t))


struct stream_cfg {
    long long bw_hz; // Analog banwidth in Hz
    long long fs_hz; // Baseband sample rate in Hz
    long long lo_hz; // Local oscillator frequency in Hz
    const char* rfport; // Port name
    double gain_db; // Hardware gain
};

static void usage() {
    fprintf(stderr, "Usage: plutoplayer [options]\n"
        "  -t <filename>      Transmit data from file (required)\n"
        "  -a <attenuation>   Set TX attenuation [dB] (default -20.0)"
        "  -b <bw>            Set RF bandwidth [MHz] (default 5.0)");
    return;
}

static bool stop = false;

static void handle_sig(int sig)
{
    NOTUSED(sig);
    stop = true;
}

static char* readable_fs(double size, char *buf, size_t buf_size) {
    int i = 0;
    const char* units[] = {"B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"};
    while (size > 1024) {
        size /= 1024;
        i++;
    }
    snprintf(buf, buf_size, "%.*f %s", i, size, units[i]);
    return buf;
}

/*
 * 
 */
int main(int argc, char** argv) {<commit_msg>Add ADALM-Pluto support<commit_after>#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include <errno.h>
#include <signal.h>
#include <string.h>
#include <iio.h>
#include <ad9361.h>

#define NOTUSED(V) ((void) V)
#define MHZ(x) ((long long)(x*1000000.0 + .5))
#define GHZ(x) ((long long)(x*1000000000.0 + .5))
#define NUM_SAMPLES 2600000
#define BUFFER_SIZE (NUM_SAMPLES * 2 * sizeof(int16_t))


struct stream_cfg {
    long long bw_hz; // Analog banwidth in Hz
    long long fs_hz; // Baseband sample rate in Hz
    long long lo_hz; // Local oscillator frequency in Hz
    const char* rfport; // Port name
    double gain_db; // Hardware gain
};

static void usage() {
    fprintf(stderr, "Usage: plutoplayer [options]\n"
        "  -t <filename>      Transmit data from file (required)\n"
        "  -a <attenuation>   Set TX attenuation [dB] (default -20.0)\n"
        "  -b <bw>            Set RF bandwidth [MHz] (default 5.0)\n");
    return;
}

static bool stop = false;

static void handle_sig(int sig)
{
    NOTUSED(sig);
    stop = true;
}

static char* readable_fs(double size, char *buf, size_t buf_size) {
    int i = 0;
    const char* units[] = {"B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"};
    while (size > 1024) {
        size /= 1024;
        i++;
    }
    snprintf(buf, buf_size, "%.*f %s", i, size, units[i]);
    return buf;
}

/*
 * 
 */
int main(int argc, char** argv) {
{'fraction_non_alphanumeric': 0.16607396870554766, 'fraction_numerical': 0.03485064011379801, 'mean_word_length': 2.939775910364146, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '617988', 'n_tokens_mistral': 1160, 'n_tokens_neox': 1054, 'n_words': 316}