<commit_before>
# Colors
# Fading Dots


# This program draws randomly colored fading dots that are
#	placed by the mouse clicks of the user.  

import SimpleGUICS2Pygame.simpleguics2pygame as simplegui
import random

# Global Variables

canvas_width = 300
canvas_height = 300
dots = []


# Classes for colors and dots


class RGBcolor:
    
    # create color with specified intensities
    def __init__(self, red, green, blue):
        self.red = red
        self.green = green
        self.blue = blue

    # make HTML color string
    def make_html(self):
        return "rgb(" + str(self.red) + ", " + str(self.green) + ", " + str(self.blue) + ")"
    
    # print out readable representation
    def __str__(self):
        return "Red: " + str(self.red) + ", Green: " + str(self.green) + ", Blue: " + str(self.blue)
    
    # brighten towards white
    def brighten(self):
        self.red += 1
        self.green += 1
        self.blue += 1
        
class Dot:
    def __init__(self, pos, color, radius, lifespan):
        self.pos = pos
        self.color = color
        self.radius = radius
        # Without lifespan, the number of dots would increase
        #	indefinitely, causing the program to slow down.
        self.life = lifespan
        
    def draw(self, canvas):
        color_string = self.color.make_html()
        canvas.draw_circle(self.pos, self.radius, 1, color_string, color_string)
        
    # Updates the life and causes the color to fade to white.
    def update(self):
        self.life -= 1
        self.color.brighten()
        
    def get_life(self):
        return self.life
<commit_msg>print self.color to see what happened when we use the function update(self)<commit_after>
# Colors
# Fading Dots


# This program draws randomly colored fading dots that are
#	placed by the mouse clicks of the user.  

import SimpleGUICS2Pygame.simpleguics2pygame as simplegui
import random

# Global Variables

canvas_width = 300
canvas_height = 300
dots = []


# Classes for colors and dots


class RGBcolor:
    
    # create color with specified intensities
    def __init__(self, red, green, blue):
        self.red = red
        self.green = green
        self.blue = blue

    # make HTML color string
    def make_html(self):
        return "rgb(" + str(self.red) + ", " + str(self.green) + ", " + str(self.blue) + ")"
    
    # print out readable representation
    def __str__(self):
        return "Red: " + str(self.red) + ", Green: " + str(self.green) + ", Blue: " + str(self.blue)
    
    # brighten towards white
    def brighten(self):
        self.red += 1
        self.green += 1
        self.blue += 1
        
class Dot:
    def __init__(self, pos, color, radius, lifespan):
        self.pos = pos
        self.color = color
        self.radius = radius
        # Without lifespan, the number of dots would increase
        #	indefinitely, causing the program to slow down.
        self.life = lifespan
        
    def draw(self, canvas):
        color_string = self.color.make_html()
        canvas.draw_circle(self.pos, self.radius, 1, color_string, color_string)
        
    # Updates the life and causes the color to fade to white.
    def update(self):
        self.life -= 1
        self.color.brighten()
        print self.color
        
    def get_life(self):
        return self.life

{'fraction_non_alphanumeric': 0.0955509107196178, 'fraction_numerical': 0.007763511495968946, 'mean_word_length': 2.271484375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '107102', 'n_tokens_mistral': 1047, 'n_tokens_neox': 979, 'n_words': 319}