<commit_before>#include "fkredis.h"

#include <stdlib.h>
#include <stdio.h>

#define EXEC_CMD(fk_CMD) \
  do { \
    char *fk_RESP = NULL; \
    if (fkredis_exec(redis, (fk_CMD), &fk_RESP) == FK_REDIS_OK) { \
      printf("%s\n", fk_RESP); \
      free(fk_RESP); \
    } \
  } while (0)

int
main(void)
{
  void *redis = NULL;
  if (fkredis_open(&redis, "./fakeredis/fakeredis.lua") != FK_REDIS_OK) {
    exit(1);
  }

  EXEC_CMD("SET foo bar");
  EXEC_CMD("GET foo");
  EXEC_CMD("SET scm git");<commit_msg>demo.c: dump the Redis prompt<commit_after>#include "fkredis.h"

#include <stdlib.h>
#include <stdio.h>

#define EXEC_CMD(fk_CMD) \
  do { \
    printf("redis> %s\n", (fk_CMD)); \
    char *fk_RESP = NULL; \
    if (fkredis_exec(redis, (fk_CMD), &fk_RESP) == FK_REDIS_OK) { \
      printf("%s\n", fk_RESP); \
      free(fk_RESP); \
    } \
  } while (0)

int
main(void)
{
  void *redis = NULL;
  if (fkredis_open(&redis, "./fakeredis/fakeredis.lua") != FK_REDIS_OK) {
    exit(1);
  }

  EXEC_CMD("SET foo bar");
  EXEC_CMD("GET foo");
  EXEC_CMD("SET scm git");
{'fraction_non_alphanumeric': 0.19270346117867165, 'fraction_numerical': 0.0037418147801683817, 'mean_word_length': 3.1796875, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, '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': '2504685', 'n_tokens_mistral': 516, 'n_tokens_neox': 495, 'n_words': 86}