<commit_before>import Tkinter
import threading
import time

COLORS = {
    "bg" : "#406873",
    "fg" : "#F3FDE1"
}

class FullScreenGraphics(Tkinter.Tk,threading.Thread):
	def __init__(self):
		threading.Thread.__init__(self)
		self.daemon=True
		self.ready=threading.Semaphore(0)
		self.start()
		self.ready.acquire()

	def run(self):
		Tkinter.Tk.__init__(self)
		self.configure(background=COLORS['bg'])
		self.withdraw()
		self.width,self.height=self.winfo_screenwidth(),self.winfo_screenheight()
		self.attributes('-fullscreen', True)
		self.bind("<Escape>", self.over)
		self.finished=False
		self.ready.release()
		self.mainloop()
		self.finished=True

	def center(self):
		return (self.width/2,self.height/2)
<commit_msg>Trying to fix segfault bug (most likely occuring in tk graphics)<commit_after>import Tkinter
import threading
import time

COLORS = {
    "bg" : "#406873",
    "fg" : "#F3FDE1"
}

class FullScreenGraphics(Tkinter.Tk,threading.Thread):
	def __init__(self):
		threading.Thread.__init__(self)
		self.daemon=True
		self.ready=threading.Semaphore(0)
		self.start()
		self.ready.acquire()

	def run(self):
		Tkinter.Tk.__init__(self)
		self.configure(background=COLORS['bg'])
		self.withdraw()
		self.width,self.height=self.winfo_screenwidth(),self.winfo_screenheight()
		self.attributes('-fullscreen', True)
		self.bind("<Escape>", self.over)
		self.finished=False
		self.after(0,lambda:self.ready.release())
		self.mainloop()
		self.finished=True

	def center(self):
		return (self.width/2,self.height/2)

{'fraction_non_alphanumeric': 0.15098039215686274, 'fraction_numerical': 0.015032679738562092, 'mean_word_length': 5.02755905511811, 'pattern_counts': {'":': 0, '<': 5, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4290562', 'n_tokens_mistral': 610, 'n_tokens_neox': 565, 'n_words': 86}