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

#define USAGE "Usage: puller <directory1...directory2>"
#define ANSI_COLOR_BLUE "\x1b[34m"
#define ANSI_COLOR_GREEN "\x1b[32m"
#define ANSI_COLOR_RESET "\x1b[0m"

int main(int argc, char *argv[]) {
  if (argc < 2) {
    printf("%s\n", USAGE);
    return 0;
  }
  int i;
  for (i = 1; i < argc; i++) { // first arg is exec
    char base_command[1024] = "";
    strcat(base_command, "cd ");
    strcat(base_command, argv[i]);
    strcat(base_command, " && git pull && cd ../");
    printf(ANSI_COLOR_BLUE "puller: Pulling repository in " ANSI_COLOR_GREEN "\"%s\"" ANSI_COLOR_BLUE "..." ANSI_COLOR_RESET "\n", argv[i]);
    system(base_command);
  }
}<commit_msg>Add puller summary<commit_after>#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define USAGE "Usage: puller <directory1...directory2>"
#define ANSI_COLOR_BLUE "\x1b[34m"
#define ANSI_COLOR_GREEN "\x1b[32m"
#define ANSI_COLOR_YELLOW "\x1b[33m"
#define ANSI_COLOR_RESET "\x1b[0m"

int main(int argc, char *argv[]) {
  if (argc < 2) {
    printf("%s\n", USAGE);
    return 0;
  }
  int i;
  for (i = 1; i < argc; i++) { // first arg is exec
    char base_command[1024] = "";
    strcat(base_command, "cd ");
    strcat(base_command, argv[i]);
    strcat(base_command, " && git pull && cd ../");
    printf(ANSI_COLOR_BLUE "puller: Pulling repository in " ANSI_COLOR_GREEN "\"%s\"" ANSI_COLOR_BLUE "..." ANSI_COLOR_RESET "\n", argv[i]);
    system(base_command);
  }
  printf(ANSI_COLOR_BLUE "\n------PULLER SUMMARY------" ANSI_COLOR_RESET "\n");
  char *dir_ending = (argc == 2) ? "y" : "ies";
  printf(ANSI_COLOR_YELLOW "* Pulled repositories in" ANSI_COLOR_GREEN " %d" ANSI_COLOR_YELLOW " director%s:" ANSI_COLOR_RESET "\n", argc - 1, dir_ending);
  for (i = 1; i < argc; i++) {
    printf(ANSI_COLOR_YELLOW "\t* %s" ANSI_COLOR_RESET "\n", argv[i]);
  }
  printf(ANSI_COLOR_BLUE "--------------------------" ANSI_COLOR_RESET "\n");
}
{'fraction_non_alphanumeric': 0.1919191919191919, 'fraction_numerical': 0.020202020202020204, 'mean_word_length': 3.7392344497607657, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 11, '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': '3157572', 'n_tokens_mistral': 812, 'n_tokens_neox': 778, 'n_words': 176}