<commit_before># GCC Compiler
import os
import sys
import subprocess

import bit

from bit.compiler.compiler import Compiler
from bit.utils import flatten, hash
from bit.cprint import command

class CC(Compiler):

    def __init__(self, project_name):
        Compiler.__init__(self, project_name)
        self.executable = 'cc'
        self.output_extension = 'o'
        self.cxx_support = False
        self.type = 'binary'

    def __str__(self):
        return 'CC'

    def compile_files(self):
        counter = 1
        if self.type == 'dynamic':
            self.cflags('-fPIC')
        for file_name in self.file_list:
            out_file = '{0}/{1}.{2}'.format(self.object_directory, file_name, 
                                            self.output_extension)
            percentage = self.percentage(counter, self.file_count)
            object_directory = out_file.split('/')
            object_directory.pop()
            if len(object_directory) > 1:
                object_directory = '/'.join(object_directory)
            else:
                object_directory = object_directory.pop()
            info_file = file_name.split('/').pop()
            try:
                os.makedirs(object_directory)
            # With no way with which to discern why makedirs fails, we must unfortunately pass
            except OSError:
                pass
            if self.type == 'dynamic':
                self.cflags('-fPIC')
            run_list = [self.executable, '-o', '"{0}"'.format(out_file), '-c', 
                        '"{0}"'.format(file_name)] + self.compiler_flags
            self.format_command(percentage, info_file)
            run_list = ' '.join(run_list)
            try:
                return_value = subprocess.call(run_list)
            except OSError:
                return_value = os.system(run_list)
            if return_value:
                return return_value
            self.link_list.append(out_file)
            counter += 1
        return 0

    def link_files(self):
        if self.type == 'static':
            self.project_name = 'lib{0}.a'.format(self.project_name)
            self.lflags('-static')
        elif self.type == 'dynamic':
            self.project_name = 'lib{0}{1}'.format(self.project_name, self.link_extension)
            self.lflags('-shared')
        try:
            os.makedirs(self.build_directory)
        except OSError:
            pass
        # Stops extra parameters from existing
        self.linker_flags = list(set(self.linker_flags))
        run_list = ' '.join(flatten([self.executable, '-o', 
                            '{0}/{1}'.format(self.build_directory, self.project_name)] 
                            + self.link_list + self.linker_flags))
        command('[LINK] {0}'.format(self.project_name))
        try:
            subprocess.call(run_list)
        except OSError:
            os.system(run_list)
        return 0

    def define(self, *defines):
        for define in flatten(list(defines)):
            self.cflags('-D', define)

    def incdir(self, *directories):
        for directory in flatten(list(directories)):
            self.cflags('-I', directory)
            self.lflags('-I', directory)

    def libdir(self, *directories):
        for directory in flatten(list(directories)):
            self.lflags('-L', directory)

    def library(self, *libraries):
        for library in flatten(list(libraries)):
            self.lflags('-l{0}'.format(library))

    @property
    def C99(self):
        self.cflags('-std=c99')
        self.lflags('-std=c99')

    @property
    def CXX(self):
        self.executable = 'c++'
        self.cxx_support = True
<commit_msg>Went back to the old way of list(set(list_name)) in cc<commit_after># GCC Compiler
import os
import sys
import subprocess

import bit

from bit.compiler.compiler import Compiler
from bit.utils import flatten, hash
from bit.cprint import command

class CC(Compiler):

    def __init__(self, project_name):
        Compiler.__init__(self, project_name)
        self.executable = 'cc'
        self.output_extension = 'o'
        self.cxx_support = False
        self.type = 'binary'

    def __str__(self):
        return 'CC'

    def compile_files(self):
        counter = 1
        if self.type == 'dynamic':
            self.cflags('-fPIC')
        for file_name in self.file_list:
            out_file = '{0}/{1}.{2}'.format(self.object_directory, file_name, 
                                            self.output_extension)
            percentage = self.percentage(counter, self.file_count)
            object_directory = out_file.split('/')
            object_directory.pop()
            if len(object_directory) > 1:
                object_directory = '/'.join(object_directory)
            else:
                object_directory = object_directory.pop()
            info_file = file_name.split('/').pop()
            try:
                os.makedirs(object_directory)
            # With no way with which to discern why makedirs fails, we must unfortunately pass
            except OSError:
                pass
            if self.type == 'dynamic':
                self.cflags('-fPIC')
            run_list = [self.executable, '-o', '"{0}"'.format(out_file), '-c', 
                        '"{0}"'.format(file_name)] + self.compiler_flags
            self.format_command(percentage, info_file)
            run_list = ' '.join(run_list)
            try:
                return_value = subprocess.call(run_list)
            except OSError:
                return_value = os.system(run_list)
            if return_value:
                return return_value
            self.link_list.append(out_file)
            counter += 1
        return 0

    def link_files(self):
        if self.type == 'static':
            self.project_name = 'lib{0}.a'.format(self.project_name)
            self.lflags('-static')
        elif self.type == 'dynamic':
            self.project_name = 'lib{0}{1}'.format(self.project_name, self.link_extension)
            self.lflags('-shared')
        try:
            os.makedirs(self.build_directory)
        except OSError:
            pass
        # Stops extra parameters from existing
        self.linker_flags = list(set(self.linker_flags))
        run_list = ' '.join(flatten([self.executable, '-o', 
                            '{0}/{1}'.format(self.build_directory, self.project_name)] 
                            + self.link_list + self.linker_flags))
        command('[LINK] {0}'.format(self.project_name))
        try:
            subprocess.call(run_list)
        except OSError:
            os.system(run_list)
        return 0

    def define(self, *defines):
        for define in flatten(list(set(defines))):
            self.cflags('-D', define)

    def incdir(self, *directories):
        for directory in flatten(list(set(directories))):
            self.cflags('-I', directory)
            self.lflags('-I', directory)

    def libdir(self, *directories):
        for directory in flatten(list(set(directories))):
            self.lflags('-L', directory)

    def library(self, *libraries):
        for library in flatten(list(set(libraries))):
            self.lflags('-l{0}'.format(library))

    @property
    def C99(self):
        self.cflags('-std=c99')
        self.lflags('-std=c99')

    @property
    def CXX(self):
        self.executable = 'c++'
        self.cxx_support = True

{'fraction_non_alphanumeric': 0.11593813046402152, 'fraction_numerical': 0.006186953597848016, 'mean_word_length': 1.8732612055641422, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4966239', 'n_tokens_mistral': 2208, 'n_tokens_neox': 2135, 'n_words': 443}