<commit_before>import time
import math
import datetime

class BaseSVG:
    "Class to create a basic svg file"

    def __init__(self, width, height):
        w = str(width)
        h = str(height)

        timestamp = str(math.ceil(time.time()))
        today = datetime.date.today()
        year = str(today.year)
        today = str(today)
        
        self.filename = 'tsart-generated-' + timestamp + '.svg'
        
        self.svgCode = ''
        
        self.header = '''<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
    version="1.1"
    width="''' + w + '"' + "\n"
        self.header = self.header + '    height="' + h + '"' + "\n"
        self.header = self.header + '    viewBox="0 0 '
        self.header = self.header + w + ' ' + h + '">' + "\n"
        self.header = self.header + '<title>TS SVG Art Generator</title>' + "\n"
        self.header = self.header + '<desc>SVG Art Creator by <NAME> on ' + today + "\n"
        self.header = self.header + 'Filename: ' + self.filename + "\n" 
        self.header = self.header + 'Copyright ' + year + '</desc>' + "\n"

        self.groupStart = '<g id="group1" style="opacity:1">' + "\n"
        self.groupEnd = '</g>' + "\n"
        <commit_msg>Start adding color to the generated svg.<commit_after>import time
import math
import datetime

class BaseSVG:
    "Class to create a basic svg file"

    def __init__(self, width, height):
        w = str(width)
        h = str(height)

        timestamp = str(math.ceil(time.time()))
        today = datetime.date.today()
        year = str(today.year)
        today = str(today)
        
        # Need a try here
        self.filename = './gen_svg/tsart-generated-' + timestamp + '.svg'
        
        self.svgCode = ''
        
        self.header = '''<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
    version="1.1"
    width="''' + w + '"' + "\n"
        self.header = self.header + '    height="' + h + '"' + "\n"
        self.header = self.header + '    viewBox="0 0 '
        self.header = self.header + w + ' ' + h + '">' + "\n"
        self.header = self.header + '<title>TS SVG Art Generator</title>' + "\n"
        self.header = self.header + '<desc>SVG Art Creator by <NAME> on ' + today + "\n"
        self.header = self.header + 'Filename: ' + self.filename + "\n" 
        self.header = self.header + 'Copyright ' + year + '</desc>' + "\n"

        self.groupStart = '<g id="group1" style="opacity:1">' + "\n"
        self.groupEnd = '</g>' + "\n"
        
{'fraction_non_alphanumeric': 0.17852882703777337, 'fraction_numerical': 0.007157057654075547, 'mean_word_length': 2.0240384615384617, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 2, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2694170', 'n_tokens_mistral': 831, 'n_tokens_neox': 804, 'n_words': 202}