def compute_tsne(finestra, root, status, percorsoD, percorsoS, samples): status.configure(text="Processing") status.update() if samples == "": messagebox.showwarning("WARNING", "Specify number of samples") status.configure(text="Ready") return sc.tsne(percorsoD, percorsoS, samples) status.configure(text="Ready") messagebox.showinfo("Finish", "The t-SNE process has ended successfully") root.destroy() XM.build_up()
def compute_kmeans(finestra, root, status, percorsoD, percorsoS, percorsoG, percorsoDN, clusters): status.configure(text="Processing") status.update() if clusters == "": messagebox.showwarning("WARNING", "Specify number of clusters") status.configure(text="Ready") return km.kmeans(clusters, percorsoD, percorsoS, percorsoG, percorsoDN) status.configure(text="Ready") messagebox.showinfo("Finish", "The KMEANS process has ended successfully") root.destroy() XM.build_up()
def compute_ticc(finestra, root, status, percorsoD, percorsoS, percorsoG, percorsoDN, clusters, window, p_lambda, beta): status.configure(text="Processing") status.update() if clusters == "": messagebox.showwarning("WARNING", "Specify number of clusters") status.configure(text="Ready") return ticc.genera_cluster(clusters, window, p_lambda, beta, percorsoD, percorsoS, percorsoG, percorsoDN) status.configure(text="Ready") messagebox.showinfo("Finish", "The TICC process has ended successfully") root.destroy() XM.build_up()
def comp_Default(finestra, root, status, entry, percorsoD, percorsoS, percorsoG, percorsoDN): status.configure(text="Processing") status.update() print(percorsoS) if entry == "": messagebox.showwarning("WARNING", "Specify number of clusters") status.configure(text="Ready") return sc.genera_cluster(entry, 0, 0, 0, percorsoD, percorsoS, percorsoG, percorsoDN) status.configure(text="Ready") messagebox.showinfo("Finish", "The clustering process has ended successfully") root.destroy() XM.build_up()
def compute_gmm(finestra, root, status, percorsoD, percorsoS, percorsoG, percorsoDN, clusters, iniz, cov): status.configure(text="Processing") status.update() if clusters == "": messagebox.showwarning("WARNING", "Specify number of clusters") status.configure(text="Ready") return if iniz == "": messagebox.showwarning("WARNING", "Specify number of re-initialization") status.configure(text="Ready") return if cov == "": messagebox.showwarning("WARNING", "Select a type of variance") status.configure(text="Ready") return if cov == "D": cov = 'diag' if cov == "F": cov = 'full' if cov == "T": cov = 'tied' if cov == "S": cov = 'spherical' gm.gmm(clusters, cov, iniz, percorsoD, percorsoS, percorsoG, percorsoDN) status.configure(text="Ready") messagebox.showinfo("Finish", "The GMM process has ended successfully") root.destroy() XM.build_up()
def comp_Custom(finestra, root, status, entry1, entry2, entry3, percorsoD, percorsoS, percorsoG, percorsoDN): status.configure(text="Processing") status.update() if entry1 == "": messagebox.showwarning("WARNING", "Specify SDMax") status.configure(text="Ready") return if entry2 == "": messagebox.showwarning("WARNING", "Specify N") status.configure(text="Ready") return if entry3 == "": messagebox.showwarning("WARNING", "Specify NbIter") status.configure(text="Ready") return sc.genera_cluster("-", entry1, entry2, entry3, percorsoD, percorsoS, percorsoG, percorsoDN) status.configure(text="Ready") messagebox.showinfo("Finish", "The clustering process has ended successfully") root.destroy() XM.build_up()
+ # Clear the terminal and print the game title + self.clear_terminal_screen() + print (self.title) + + # Show splash + self.show_splash(self.splash_time) + + # Pop ups + def ask_yes_no(self, title, message): + return messagebox.askyesno(title, message) + + def show_info(self, title, message): + return messagebox.showinfo(title, message) + + def show_warning(self, title, message): + return messagebox.showwarning(title, message) + + def print_error_logs(self): + print ("Error Logs:") + for error in SPGL.logs: + print (error) + + if len(SPGL.logs) == 0: + print ("No errors") + print ("") + + def tick(self): + # Check the game state + # showsplash, running, gameover, paused + + if self.state == "showsplash":