<commit_before>"""
Dialog to set ftol for Scipy

    ftol(float): Relative error desired in the sum of squares.
"""
################################################################################
#This software was developed by the University of Tennessee as part of the
#Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
#project funded by the US National Science Foundation.
#
#See the license text in license.txt
#
#copyright 2009, University of Tennessee
################################################################################
import wx
import sys
# default ftol
F_TOL = 1.49012e-08
SANS_F_TOL = 5e-05

PANEL_HEIGHT = 265
FONT_VARIANT = 0
if sys.platform.count("win32") > 0:
    PANEL_WIDTH = 270
else:
    PANEL_WIDTH = 285
    
class ChangeFtol(wx.Dialog):
    """
    Dialog to select ftol
    """
    def __init__(self, parent, base, id=-1, title="FTolerance"):
        wx.Dialog.__init__(self, parent, id, title,
                           size=(PANEL_WIDTH, PANEL_HEIGHT))
        # font size
        self.SetWindowVariant(variant=FONT_VARIANT)
        # build layout
        panel = wx.Panel(self, -1)
        vbox = wx.BoxSizer(wx.VERTICAL)
        wx.StaticBox(panel, -1, 'FTol selection (Leastsq)', (5, 6), (PANEL_WIDTH * 0.9, PANEL_HEIGHT * 0.7))
        self.default_bt = wx.RadioButton(panel, -1, 'SansView Default (5e-05)', (15, 30), style=wx.RB_GROUP)
        self.default_bt.SetValue(True)
        self.default_bt.Bind(wx.EVT_RADIOBUTTON, self.OnFtolSelection)
        self.sci_default_bt = wx.RadioButton(panel, -1, 'Scipy Default (1.49012e-08)', (15, 55))
        self.sci_default_bt.SetValue(False)
        self.sci_default_bt.Bind(wx.EVT_RADIOBUTTON, self.OnFtolSelection)
        self.high_bt = wx.RadioButton(panel, -1, '1e-06', (15, 80))
        self.high_bt.SetValue(False)
        self.high_bt.Bind(wx.EVT_RADIOBUTTON, self.OnFtolSelection)
        self.mid_bt = wx.RadioButton(panel, -1, '1e-05', (15, 105))
        self.mid_bt.SetValue(False)
        self.mid_bt.Bind(wx.EVT_RADIOBUTTON, self.OnFtolSelection)
        self.low_bt = wx.RadioButton(panel, -1, '1e-04', (15, 130))
        self.low_bt.SetValue(False)
        self.low_bt.Bind(wx.EVT_RADIOBUTTON, self.OnFtolSelection)
        self.custom_bt = wx.RadioButton(panel, -1, 'Custom', (15, 155))
        self.custom_bt.SetValue(False)
        self.custom_bt.Bind(wx.EVT_RADIOBUTTON, self.OnFtolSelection)
        self.custombox = wx.TextCtrl(panel, -1, '', (95, 155))
        self.custombox.Disable()
        
        hbox = wx.BoxSizer(wx.HORIZONTAL)
        okButton = wx.Button(self, wx.ID_OK, 'Set', size=(70, 30))
        closeButton = wx.Button(self,wx.ID_CANCEL, 'Cancel', size=(70, 30))
        hbox.Add(okButton, 1, wx.RIGHT, 5)
        hbox.Add(closeButton, 1, wx.RIGHT, 5)
        vbox.Add(panel, 1, wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, 10)
        vbox.Add(hbox, 1, wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, 10)
        
        self.SetSizer(vbox)
<commit_msg>Fix FTOL dialog size<commit_after>"""
Dialog to set ftol for Scipy

    ftol(float): Relative error desired in the sum of squares.
"""
################################################################################
#This software was developed by the University of Tennessee as part of the
#Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
#project funded by the US National Science Foundation.
#
#See the license text in license.txt
#
#copyright 2009, University of Tennessee
################################################################################
import wx
import sys
# default ftol
F_TOL = 1.49012e-08
SANS_F_TOL = 5e-05

PANEL_HEIGHT = 265
FONT_VARIANT = 0
if sys.platform.count("win32") > 0:
    PANEL_WIDTH = 270
else:
    PANEL_WIDTH = 285
    
class ChangeFtol(wx.Dialog):
    """
    Dialog to select ftol
    """
    def __init__(self, parent, base, id=-1, title="FTolerance"):
        wx.Dialog.__init__(self, parent, id, title,
                           size=(PANEL_WIDTH, PANEL_HEIGHT))
        # font size
        self.SetWindowVariant(variant=FONT_VARIANT)
        # build layout
        vbox = wx.BoxSizer(wx.VERTICAL)
        title_text = wx.StaticText(self, id=wx.NewId(), label='FTol selection (Leastsq)')
        self.default_bt = wx.RadioButton(self, -1, 'SansView Default (5e-05)', (15, 30), style=wx.RB_GROUP)
        self.default_bt.SetValue(True)
        self.default_bt.Bind(wx.EVT_RADIOBUTTON, self.OnFtolSelection)
        self.sci_default_bt = wx.RadioButton(self, -1, 'Scipy Default (1.49012e-08)', (15, 55))
        self.sci_default_bt.SetValue(False)
        self.sci_default_bt.Bind(wx.EVT_RADIOBUTTON, self.OnFtolSelection)
        self.high_bt = wx.RadioButton(self, -1, '1e-06', (15, 80))
        self.high_bt.SetValue(False)
        self.high_bt.Bind(wx.EVT_RADIOBUTTON, self.OnFtolSelection)
        self.mid_bt = wx.RadioButton(self, -1, '1e-05', (15, 105))
        self.mid_bt.SetValue(False)
        self.mid_bt.Bind(wx.EVT_RADIOBUTTON, self.OnFtolSelection)
        self.low_bt = wx.RadioButton(self, -1, '1e-04', (15, 130))
        self.low_bt.SetValue(False)
        self.low_bt.Bind(wx.EVT_RADIOBUTTON, self.OnFtolSelection)
        self.custom_bt = wx.RadioButton(self, -1, 'Custom', (15, 155))
        self.custom_bt.SetValue(False)
        self.custom_bt.Bind(wx.EVT_RADIOBUTTON, self.OnFtolSelection)
        self.custombox = wx.TextCtrl(self, -1, '', (95, 155))
        self.custombox.Disable()
        
        hbox = wx.BoxSizer(wx.HORIZONTAL)
        okButton = wx.Button(self, wx.ID_OK, 'Set', size=(70, 30))
        closeButton = wx.Button(self,wx.ID_CANCEL, 'Cancel', size=(70, 30))
        hbox.Add(okButton, 1, wx.RIGHT, 5)
        hbox.Add(closeButton, 1, wx.RIGHT, 5)
        
        vbox.Add(title_text, 0, wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, 10)
        vbox.Add(self.default_bt, 0, wx.LEFT, 20)
        vbox.Add(self.sci_default_bt, 0, wx.LEFT, 20)
        vbox.Add(self.high_bt, 0, wx.LEFT, 20)
        vbox.Add(self.mid_bt, 0, wx.LEFT, 20)
        vbox.Add(self.low_bt, 0, wx.LEFT, 20)
        vbox.Add(self.custom_bt, 0, wx.LEFT, 20)
        vbox.Add(self.custombox, 0, wx.LEFT, 60)
        vbox.Add(hbox, 0, wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, 10)
        
        self.SetSizer(vbox)

{'fraction_non_alphanumeric': 0.17583293479993622, 'fraction_numerical': 0.03841861948031245, 'mean_word_length': 3.0953002610966056, 'pattern_counts': {'":': 0, '<': 3, '<?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': '124087', 'n_tokens_mistral': 2404, 'n_tokens_neox': 2199, 'n_words': 455}