<commit_before>/*
 *  Copyright 2013 <NAME>
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

#define _BSD_SOURCE
#include <endian.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
    for(char line[1024]; !feof(stdin);)
    {
        fgets(line, 1024, stdin);
        fprintf(stdout, "%s", line);
    }
    return 0;
}<commit_msg>Wrote basic code to scan each line from stdin for OP.<commit_after>/*
 *  Copyright 2013 <NAME>
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

#define _BSD_SOURCE
#include <endian.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

int main(int argc, char **argv)
{
    char OP_str[5];
    //char B_str[9];

    for(char line[1024]; !feof(stdin);)
    {
        fgets(line, 1024, stdin);
        // TODO: if last char is not new line, read until end of line

        sscanf(line, " %4s", OP_str);

        for(unsigned char i=0; i<strlen(OP_str); ++i)
        {
            OP_str[i] = toupper(OP_str[i]);
        }

        fprintf(stdout, "OP_str=%s\n", OP_str);
    }

    return 0;
}
{'fraction_non_alphanumeric': 0.11167747914735866, 'fraction_numerical': 0.017608897126969416, 'mean_word_length': 3.1045627376425857, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '426824', 'n_tokens_mistral': 709, 'n_tokens_neox': 677, 'n_words': 257}