<commit_before>#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <string.h>

int MAX(int x,int y){
        return x > y ? x : y;
}

int main(int argc,char **argv){
    int clientFd;
    struct sockaddr_in clientAddr;
    socklen_t clientAddr_len;
    char server_addr[16];
    unsigned short server_port;
    char recBuf[4096];
    int recCount;
    fd_set rfds;
    unsigned short maxfdp;

    FD_ZERO(&rfds);

    if(argc == 3){
        strcpy(server_addr,argv[1]);
        server_port = atoi(argv[2]);
        printf("Connect to %s:%u\n",server_addr,server_port);
    }else{
        strcpy(server_addr,"127.0.0.1");
        server_port = 3000;
    }

    clientFd = socket(AF_INET,SOCK_STREAM,0);
    clientAddr_len = sizeof(clientAddr);

    memset(&clientAddr,0,clientAddr_len);
    clientAddr.sin_family = AF_INET;
    clientAddr.sin_addr.s_addr = inet_addr(server_addr);
    clientAddr.sin_port = htons(server_port);

    connect(clientFd,(struct sockaddr*)&clientAddr,sizeof(clientAddr));
    while(1){
        memset(recBuf,0,sizeof(recBuf));
        FD_SET(0,&rfds);
        FD_SET(clientFd,&rfds);
        maxfdp = MAX(0,clientFd) + 1;
        select(maxfdp,&rfds,NULL,NULL,NULL);
        if(FD_ISSET(0,&rfds)){
            recCount = read(0,recBuf,sizeof(recBuf));
            printf("Received from stdin: ###%s###\n",recBuf);
            if(strcmp(recBuf,"exit\n") == 0){
                break;
            }else{
                write(clientFd,recBuf,sizeof(recBuf));
            }
        }else if(FD_ISSET(clientFd,&rfds)){
            recCount = read(clientFd,recBuf,sizeof(recBuf));
            if(recCount > 0){
                printf("%s",recBuf);
            }
        }
    }

    close(clientFd);
    return 0;
}
<commit_msg>Remove cliet.c debug message<commit_after>#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <string.h>

int MAX(int x,int y){
        return x > y ? x : y;
}

int main(int argc,char **argv){
    int clientFd;
    struct sockaddr_in clientAddr;
    socklen_t clientAddr_len;
    char server_addr[16];
    unsigned short server_port;
    char recBuf[4096];
    int recCount;
    fd_set rfds;
    unsigned short maxfdp;

    FD_ZERO(&rfds);

    if(argc == 3){
        strcpy(server_addr,argv[1]);
        server_port = atoi(argv[2]);
        printf("Connect to %s:%u\n",server_addr,server_port);
    }else{
        strcpy(server_addr,"127.0.0.1");
        server_port = 3000;
    }

    clientFd = socket(AF_INET,SOCK_STREAM,0);
    clientAddr_len = sizeof(clientAddr);

    memset(&clientAddr,0,clientAddr_len);
    clientAddr.sin_family = AF_INET;
    clientAddr.sin_addr.s_addr = inet_addr(server_addr);
    clientAddr.sin_port = htons(server_port);

    connect(clientFd,(struct sockaddr*)&clientAddr,sizeof(clientAddr));
    while(1){
        memset(recBuf,0,sizeof(recBuf));
        FD_SET(0,&rfds);
        FD_SET(clientFd,&rfds);
        maxfdp = MAX(0,clientFd) + 1;
        select(maxfdp,&rfds,NULL,NULL,NULL);
        if(FD_ISSET(0,&rfds)){
            recCount = read(0,recBuf,sizeof(recBuf));
            if(strcmp(recBuf,"exit\n") == 0){
                break;
            }else{
                write(clientFd,recBuf,sizeof(recBuf));
            }
        }else if(FD_ISSET(clientFd,&rfds)){
            recCount = read(clientFd,recBuf,sizeof(recBuf));
            if(recCount > 0){
                printf("%s",recBuf);
            }
        }
    }

    close(clientFd);
    return 0;
}

{'fraction_non_alphanumeric': 0.14510344827586208, 'fraction_numerical': 0.01710344827586207, 'mean_word_length': 2.6115537848605577, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '3965000', 'n_tokens_mistral': 1356, 'n_tokens_neox': 1304, 'n_words': 207}