Esempio n. 1
0
    def __init__(self, manager, size):
        BaseFrame.__init__(self, manager, size)
        top_frame = Frame(self)
        top_frame.pack(pady=20)

        self.new_btn = Button(top_frame,
                              width=10,
                              height=3,
                              text="New Config",
                              command=lambda: self.action("settings"))
        self.new_btn.pack()

        mid_frame = Frame(self)
        mid_frame.pack(pady=10, ipadx=10)

        self.bar = Entry(mid_frame, width=30)
        self.bar.pack(side=LEFT)

        self.bbutton = Button(mid_frame, text="Browse", command=self.browse)
        self.bbutton.pack(side=RIGHT)

        bot_frame = Frame(self)
        bot_frame.pack(ipadx=10)

        self.load_btn = Button(
            bot_frame,
            width=30,
            height=2,
            text="Load Config",
            command=lambda: self.action("settings", self.bar.get()))
        self.load_btn.pack(side=BOTTOM)
 def __init__(self, manager, size, settings, configs):
     BaseFrame.__init__(self, manager, size)
     container = Frame(self, borderwidth=2, relief="groove")
     container.pack(padx=XPAD, pady=YPAD, fill=BOTH, expand=YES)
     self.textbox = Text(container)
     self.textbox.pack(anchor=CENTER, fill=BOTH)
     self.final = dict()
     self.final.update(settings)
     self.final['CONFIGS'] = configs
     self.save_final()
     self.run()
Esempio n. 3
0
 def __init__(self, manager, size):
     BaseFrame.__init__(self, manager, size)
     topleft = Frame(self)
     topleft.pack(fill=BOTH)
     Button(topleft, text="Settings", command=self.go_back).pack(padx=XPAD,
                                                                 pady=YPAD,
                                                                 side=LEFT,
                                                                 anchor=W)
     Button(topleft, text="Create New Dataset",
            command=self.proceed).pack(padx=XPAD,
                                       pady=YPAD,
                                       side=RIGHT,
                                       anchor=E)
     self.container = Frame(self, borderwidth=2, relief="groove")
     self.container.pack(padx=XPAD, pady=YPAD, fill=BOTH, expand=YES)
     self.inner_containers = list()
     self.configs = dict()
     self.update()
     self.display()
Esempio n. 4
0
 def loadImg(self):
     BaseFrame.loadImg(self)
     pass
Esempio n. 5
0
    def __init__(self, manager, size):
        BaseFrame.__init__(self, manager, size)
        self.grab_set()
        container = Frame(self, borderwidth=2, relief="groove")
        container.pack(padx=XPAD, pady=YPAD,fill=BOTH, expand=YES)
        
        # Dataset Name
        f1 = Frame(container)
        f1.pack(fill=BOTH, padx=XPAD, pady=YPAD, ipadx=30, ipady=5)
        Label(f1, text="Dataset name:").pack(side=LEFT, anchor=N)
        self.e1 = Entry(f1, width=30)
        self.e1.pack(side=RIGHT, anchor=N)

        # Dataset Path
        f2 = Frame(container)
        f2.pack(fill=BOTH, padx=XPAD, pady=YPAD, ipadx=30, ipady=5)
        f2a = Frame(f2)
        f2a.pack(fill=BOTH)
        Label(f2a, text="Dataset path:").pack(side=LEFT, anchor=N)
        self.e2 = Entry(f2a, width=30)
        self.e2.pack(side= RIGHT, anchor=N)
        f2b = Frame(f2, height=20)
        f2b.pack_propagate(0)
        f2b.pack(fill=BOTH)
        Button(f2b, text="Browse", width=25, command=lambda: self.browse(self.e2)).pack(side=RIGHT,anchor=E)
        
        # Loading Script Path
        f3 = Frame(container)
        f3.pack(fill=BOTH, padx=XPAD, pady=YPAD, ipadx=30, ipady=5)
        f3a = Frame(f3)
        f3a.pack(fill=BOTH)
        Label(f3a, text="Loading script path:").pack(side=LEFT, anchor=N)
        self.e3 = Entry(f3a, width=30)
        self.e3.pack(side= RIGHT, anchor=N)
        f3b = Frame(f3, height=20)
        f3b.pack_propagate(0)
        f3b.pack(fill=BOTH)
        Button(f3b, text="Browse", width=25, command=lambda: self.browse(self.e3)).pack(side=RIGHT, anchor=E)


        # Percentage
        f4 = Frame(container)
        f4.pack(fill=BOTH, padx=XPAD, pady=YPAD, ipadx=30, ipady=5)
        Label(f4, text="Percentage of dataset to use:").pack(side=LEFT, anchor=W)
        self.e4 = Scale(f4,orient='horizontal', length=150, from_=0, to=1, resolution=-1, digits=3)
        self.e4.set(1)
        self.e4.pack(side=RIGHT, anchor=N)
        

        # Optional Parameters
        f5 = Frame(container)
        f5.pack(fill=BOTH, padx=XPAD, pady=YPAD, ipadx=30, ipady=5)
        f5a = Frame(f5)
        f5a.pack(fill=BOTH)
        Label(f5a, text="Optional loading script paramaters:").pack(side=LEFT, anchor=N)
        self.lbe1 = Entry(f5a, width=10)
        self.lbe1.pack(side=LEFT)
        Label(f5a, text=":").pack(side=LEFT)
        self.lbe2 = Entry(f5a, width=10)
        self.lbe2.pack(side=LEFT)
        Button(f5a, text="Add", command=self.add_item).pack(side=RIGHT, anchor=E)
        f5b = Frame(f5)
        f5b.pack(fill=BOTH, pady=10)
        Button(f5b, text="Delete", height=5, command=self.delete_item).pack(side=RIGHT, anchor=S)
        self.e5 = Listbox(f5b, width=23, height=5)
        self.e5.pack(side= RIGHT, anchor=E)
        sb = Scrollbar(f5b, orient="vertical")
        sb.config(command=self.e5.yview)
        sb.pack(side="right", fill="y")
        self.e5.config(yscrollcommand=sb.set)

        f6 = Frame(container)
        f6.pack(fill=BOTH, pady=10)
        Button(f6, text="Submit", height=3, command=self.submit).pack(side=BOTTOM, fill=X,  padx=10, expand=1,anchor=S)
    def __init__(self, manager, size):
        BaseFrame.__init__(self, manager, size)
        
        container = Frame(self, borderwidth=2, relief="groove")
        container.pack(padx=XPAD, pady=YPAD,fill=BOTH, expand=YES)

        f1 = Frame(container)
        f1.pack(fill=BOTH, padx=XPAD, pady=YPAD, ipadx=30, ipady=5)
        Label(f1, text="Dataset name:").pack(side=LEFT, anchor=N)
        self.e1 = Entry(f1, width=30)
        self.e1.pack(side=RIGHT, anchor=N)

        f3 = Frame(container)
        f3.pack(fill=BOTH, padx=XPAD, pady=YPAD, ipadx=30, ipady=5)
        Label(f3, text="Dataset File Extension:").pack(side=LEFT, anchor=N)
        self.e3 = StringVar()
        self.e3.set("csv")
        Radiobutton(f3, variable=self.e3, value="csv").pack(side=RIGHT, anchor=N)
        Label(f3, text="CSV").pack(side=RIGHT, anchor=N)
        Radiobutton(f3, variable=self.e3, value="json").pack(side=RIGHT, anchor=N)
        Label(f3, text="JSON").pack(side=RIGHT, anchor=N)

        f4 = Frame(container)
        f4.pack(fill=BOTH, padx=XPAD, pady=YPAD, ipadx=30, ipady=5)
        Label(f4, text="Test set size:").pack(side=LEFT, anchor=W)
        self.e4 = Scale(f4,orient='horizontal', length=100, from_=0, to=0.5, resolution=-1, digits=2)
        self.e4.set(0)
        self.e4.pack(side=RIGHT, anchor=N)

        
        f5 = Frame(container)
        f5.pack(fill=BOTH, padx=XPAD, pady=YPAD, ipadx=30, ipady=5)
        self.e5 = BooleanVar()
        self.e5.set(True)
        Label(f5, text="Shuffle Dataset").pack(side=LEFT, anchor=N)
        Checkbutton(f5, variable=self.e5).pack(side=LEFT, anchor=N)

        f6 = Frame(container)
        f6.pack(fill=BOTH, padx=XPAD, pady=YPAD, ipadx=30, ipady=5)
        Label(f6, text="Number shuffles:").pack(side=LEFT, anchor=W)
        self.e6 = IntVar()
        self.e6.set(1)
        Spinbox(f6, width=5, textvariable=self.e6, from_=0, to=10).pack(side=RIGHT, anchor=N)

        f7 = Frame(container)
        f7.pack(fill=BOTH, padx=XPAD, pady=YPAD, ipadx=30, ipady=5)
        f7a = Frame(container)
        f7a.pack(fill=BOTH)
        Label(f7a, text="Dataset Concatenation Type:").pack(side=LEFT, anchor=N)
        f7b = Frame(container)
        f7b.pack(fill=BOTH)
        self.e7 = StringVar()
        self.e7.set("equal")
        Label(f7b, text="EQUAL").pack(side=LEFT, anchor=S)
        Radiobutton(f7b, variable=self.e7, value="equal").pack(side=LEFT, anchor=S)
        Label(f7b, text="PERCENTAGE").pack(side=LEFT, anchor=S)
        Radiobutton(f7b, variable=self.e7, value="percentage").pack(side=LEFT, anchor=S)

        f7 = Frame(container)
        f7.pack(fill=BOTH, padx=XPAD, pady=YPAD, ipadx=30, ipady=5)
        Button(f7, text="Proceed", command=self.proceed).pack(side=BOTTOM, anchor=S)