<commit_before>import sys
import random
import math
import imutils
import cv2
import pygame
from pygame.locals import *

pygame.init()
pygame.mouse.set_visible(0)

words_dict = {"eat":"verb", "talk":"verb",
              "red":"adjective", "nice":"adjective"}

shot_dict = {}

##        self.object_lower = (89, 230, 230)# HSV color range for object to be tracked
##        self.object_upper = (108, 255, 255)
object_lower = (94, 126, 129)# HSV color range for object to be tracked
object_upper = (131, 255, 255)

score_font = pygame.font.Font(None, 32)

score = 0
countdown = 30

Surface = pygame.display.set_mode((800,600))
#pygame.display.set_mode((0,0), pygame.FULLSCREEN)


display_width, display_height = pygame.display.get_surface().get_size()

left_border = (display_height/display_width) * 0.05 * display_width
right_border = (display_width -
                (display_height/display_width) * 0.05 * display_width)
top_border = 0.05 * display_height
bottom_border = 0.95 * display_height

PRETTY_BLUE = (128, 0, 0)
Words = []

class Word:
    def __init__(self):
        self.font = pygame.font.Font(None, 48)
        self.word = random.choice(list(words_dict.keys()))
        self.rendered_word = self.font.render(self.word, 1, (100,0,0))
        self.rect = self.rendered_word.get_rect()
        self.x = random.randint(left_border + self.rect.width,
                                right_border - self.rect.width)
        self.y = random.randint(top_border + self.rect.height,
                                bottom_border - self.rect.height)
        self.speedx = 0.1*(random.random()+0.01)<commit_msg>working on slow framerates issue<commit_after>import sys
import random
import math
import imutils
import cv2
import pygame
from pygame.locals import *

pygame.init()
pygame.mouse.set_visible(0)

words_dict = {"eat":"verb", "talk":"verb",
              "red":"adjective", "nice":"adjective"}

shot_dict = {}

##        self.object_lower = (89, 230, 230)# HSV color range for object to be tracked
##        self.object_upper = (108, 255, 255)
object_lower = (94, 126, 129)# HSV color range for object to be tracked
object_upper = (131, 255, 255)

score_font = pygame.font.Font(None, 32)

score = 0
countdown = 30

#Surface = pygame.display.set_mode((800,600))
Surface = pygame.display.set_mode((0,0), pygame.FULLSCREEN)


display_width, display_height = pygame.display.get_surface().get_size()

left_border = (display_height/display_width) * 0.05 * display_width
right_border = (display_width -
                (display_height/display_width) * 0.05 * display_width)
top_border = 0.05 * display_height
bottom_border = 0.95 * display_height

PRETTY_BLUE = (128, 0, 0)
Words = []

class Word:
    def __init__(self):
        self.font = pygame.font.Font(None, 48)
        self.word = random.choice(list(words_dict.keys()))
        self.rendered_word = self.font.render(self.word, 1, (255,0,0))
        self.rect = self.rendered_word.get_rect()
        self.x = random.randint(int(left_border + self.rect.width),
                                int(right_border - self.rect.width))
        self.y = random.randint(int(top_border + self.rect.height),
                                int(bottom_border - self.rect.height))
        self.speedx = 0.1*(random.random()+0.01)
{'fraction_non_alphanumeric': 0.13091241989624658, 'fraction_numerical': 0.048214830637778455, 'mean_word_length': 3.175796178343949, 'pattern_counts': {'":': 8, '<': 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': '909016', 'n_tokens_mistral': 1227, 'n_tokens_neox': 1083, 'n_words': 236}