<commit_before>from tkinter import *
from tkinter import ttk

def create_form(*args):
  pass

if __name__ == '__main__':
  root = Tk()
  root.title("PyGameTheory")
  
  mainframe = ttk.Frame(root, padding="3 3 12 12")
  mainframe.grid(column=0, row=0, sticky=(N, W, E, S))
  mainframe.columnconfigure(0, weight=1)
  mainframe.rowconfigure(0, weight=1)
  
  row = StringVar()
  column = StringVar()
  
  row_entry = ttk.Entry(mainframe, width=4, textvariable=row)
  row_entry.grid(column=1, row=1, sticky=(W, E))
  column_entry = ttk.Entry(mainframe, width=4, textvariable=column)
  column_entry.grid(column=1, row=2, sticky=(W, E))
  
  ttk.Button(mainframe, text="Create form", command=create_form).grid(column=2, row=3, sticky=W)
  
  ttk.Label(mainframe, text="rows").grid(column=2, row=1, sticky=W)
  ttk.Label(mainframe, text="columns").grid(column=2, row=2, sticky=W)
  
  for child in mainframe.winfo_children(): child.grid_configure(padx=5, pady=5)
  
  row_entry.focus()
  root.bind('<Return>', create_form)
  
  root.mainloop()
  <commit_msg>Working on very basic GUI -- too structural for my taste, might redo in OOP later on<commit_after>from tkinter import *
from tkinter import ttk

if __name__ == '__main__':
  def compute_ne():
    pass
  
  def create_form():
    ### Matrix_view_frame
    top_level = Toplevel()
    top_level.title("PyGameTheory -- Strategic Form")
    matrix_view_frame = ttk.Frame(top_level, padding="3 3 12 12")
    matrix_view_frame.grid(column=0, row=0, sticky=(N, W, E, S))
    matrix_view_frame.columnconfigure(0, weight=1)
    matrix_view_frame.rowconfigure(0, weight=1)
    num_rows = int(row.get())
    num_columns = int(column.get())
    payoff_matrix = {(m, n): 0 for m in range(num_rows) for n in range(num_columns)}
    entries = {key: ttk.Entry(matrix_view_frame, width=4, textvariable=payoff_matrix[key]) for key in payoff_matrix}
    for key in entries: entries[key].grid(column=key[1]+1, row=key[0]+1, sticky=(W, E))
    ttk.Button(matrix_view_frame, text="Compute NE", command=compute_ne).grid(column=0, row=num_rows+2, sticky=E)
  
  root = Tk()
  root.title("PyGameTheory")
  ### Mainframe
  main_frame = ttk.Frame(root, padding="3 3 12 12")
  main_frame.grid(column=0, row=0, sticky=(N, W, E, S))
  main_frame.columnconfigure(0, weight=1)
  main_frame.rowconfigure(0, weight=1)
  row = StringVar()
  column = StringVar()
  row_entry = ttk.Entry(main_frame, width=4, textvariable=row)
  row_entry.grid(column=1, row=1, sticky=(W, E))
  column_entry = ttk.Entry(main_frame, width=4, textvariable=column)
  column_entry.grid(column=1, row=2, sticky=(W, E))
  ttk.Button(main_frame, text="Create form", command=create_form).grid(column=2, row=3, sticky=W)
  ttk.Label(main_frame, text="rows").grid(column=2, row=1, sticky=W)
  ttk.Label(main_frame, text="columns").grid(column=2, row=2, sticky=W)
  for child in main_frame.winfo_children(): child.grid_configure(padx=5, pady=5)
  row_entry.focus()
  ### Mainloop
  root.bind('<Return>', create_form)
  root.mainloop()
  
{'fraction_non_alphanumeric': 0.1531591134634469, 'fraction_numerical': 0.023817399933840556, 'mean_word_length': 5.1214574898785425, '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': '1701954', 'n_tokens_mistral': 1170, 'n_tokens_neox': 1137, 'n_words': 232}