<commit_before># -*- coding: utf-8 -*-
#!/usr/bin/env python
import Tkinter as tk

class Windows():

	def __init__(self,master):
		self.master = master
		self.master.title('少年，吐槽时间到了！')

		self.top_frame = tk.Frame(self.master)
		self.name_label = tk.Label(self.top_frame,text='日记名称')
		self.name_entry = tk.Entry(self.top_frame)
		self.top_frame.pack()
		self.name_label.grid(row=0,column=0)
		self.name_entry.grid(row=0,column=1)


		self.middle_frame = tk.Frame(self.master)
		self.content_label = tk.Label(self.middle_frame,text="内容")
		self.content_text = tk.Text(self.middle_frame)
		self.middle_frame.pack()
		self.content_label.grid(row=0,column=0)
		self.content_text.grid(row=0,column=1)

		self.bottom_frame = tk.Frame(self.master)
		self.menu_label_1 = tk.Button(self.bottom_frame,text="Save",bg='grey')
		self.menu_label_2 = tk.Button(self.bottom_frame,text="Discard",bg='red')
		self.menu_label_3 = tk.Button(self.bottom_frame,text="About",bg='grey')
		self.bottom_frame.pack()
		self.menu_label_1.grid(row=0,column=0)
		self.menu_label_2.grid(row=0,column=1)
		self.menu_label_3.grid(row=0,column=2)

	def foo():
		pass
		

def main():
	root = tk.Tk()
	app = Windows(root)
	root.mainloop()

if __name__ == "__main__":
	main()<commit_msg>创建menu<commit_after># -*- coding: utf-8 -*-
#!/usr/bin/env python
import Tkinter as tk
import sys

reload(sys)
sys.setdefaultencoding('utf-8')

class Windows():

	def __init__(self,master):
		self.master = master
		self.master.title('少年，吐槽时间到了！')
		self.CreateWidget(self.master)

	def CreateWidget(self,master):

        #创建菜单
		self.menu = tk.Menu(master)
		self.master.config(menu=self.menu)

		self.file_menu = tk.Menu(master)
		self.menu.add_cascade(label='File',menu=self.file_menu)
		self.file_menu.add_command(label='New',command=self.foo)
		self.file_menu.add_command(label='Open',command=self.foo)
		self.file_menu.add_command(label='Save',command=self.foo)
		self.file_menu.add_separator()
		self.file_menu.add_command(label='Exit',command=self.foo)

		self.help_menu = tk.Menu(master)
		self.menu.add_cascade(label='Help',menu=self.help_menu)
		self.help_menu.add_command(label='Guide',command=self.foo)

		self.top_frame = tk.Frame(master)
		self.top_frame.pack()
		self.welcome_label = tk.Label(self.top_frame,text='Welcome to Diary World!')
		self.welcome_label.pack()

		#创建内容text窗口
		self.bottom_frame = tk.Frame(master)
		self.bottom_frame.pack()

		self.content_label = tk.Label(self.bottom_frame,text="内容")
		self.content_label.pack(side='left')

		self.scrollbar = tk.Scrollbar(self.bottom_frame)
		self.scrollbar.pack(side='right',fill='y')
		self.content = tk.Text(self.bottom_frame,yscrollcommand=self.scrollbar.set)
		self.content.pack()
		self.scrollbar.config(command=self.content.yview)

	def foo():
		pass
		return None


def main():
	root = tk.Tk()
	app = Windows(root)
	root.mainloop()

if __name__ == "__main__":
	main()
{'fraction_non_alphanumeric': 0.16115702479338842, 'fraction_numerical': 0.007920110192837466, 'mean_word_length': 5.180851063829787, 'pattern_counts': {'":': 2, '<': 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': '3993817', 'n_tokens_mistral': 1240, 'n_tokens_neox': 1168, 'n_words': 137}