<commit_before>min_m = 3
max_m = 5

max_step = 4
max_abs = 4

plist = ["Random", "Heat Equation", "Wave Equation", "Laplace Equation"]

@interact
def _f(psel = Selector(plist, label = "PDE type:", selector_type = "button"), regen = Button(text="Regenerate Problem", default=True, value=True, label = "")):
    if psel == plist[0]:
        psel = choice(plist[1:])
    if psel == plist[1]:
    
        blist = ["Random", "Temperatures fixed at ends", "Insulated ends"]
        rlist = ["Random", "Formal Solution", "Partial Sum"]
        llist = ["Random", "From Graph", "From Formula"]
        
        @interact
        def _f(bsel = Selector(blist, label = "BC type:", selector_type = "button"), rsel = Selector(rlist, label = "problem type:", selector_type = "button"), lsel = Selector(llist, label = "NHBC represented by:", selector_type = "button"), regen1 = Button(text="Regenerate Problem", default=True, value=True, label = "")):
            if bsel == blist[0]:
                bsel = choice(blist[1:])
            if rsel == rlist[0]:
                rsel = choice(rlist[1:])
            if lsel == llist[0]:
                lsel = choice(llist[1:])
                
            f = generate_pc()
            alpha2 = 2^randint(-3,3)
            
            if bsel == blist[1]:
            
                bc = [randint(-max_abs,max_abs), randint(-max_abs,max_abs)]
                
                if bc == [0,0]:
                    problem = HHE1d(f = f, bc = bc, alpha2 = alpha2)
                else:
                    problem = NHHE1d(f = f, bc = bc, alpha2 = alpha2)
                    
                if rsel == rlist[1]:
                    html(r"Find the formal solution to the problem")
                    
                else:
                    m = randint(min_m, max_m)
                    html(r"Find the partial sum $s_{{{m}}}(t,x)$ to the problem".format(m = latex(m)))
                    
                html(problem.say_eqs())
                <commit_msg>amend<commit_after>min_m = 3
max_m = 5

max_step = 4
max_abs = 4

plist = ["Random", "Heat Equation", "Wave Equation", "Laplace Equation"]

@interact
def _f(psel = Selector(plist, label = "PDE type:", selector_type = "button"), regen = Button(text="Regenerate Problem", default=True, value=True, label = "")):
    if psel == plist[0]:
        psel = choice(plist[1:])
    if psel == plist[1]:
    
        blist = ["Random", "Temperatures fixed at ends", "Insulated ends"]
        rlist = ["Random", "Formal Solution", "Partial Sum"]
        llist = ["Random", "From Graph", "From Formula"]
        
        @interact
        def _f(bsel = Selector(blist, label = "BC type:", selector_type = "button"), rsel = Selector(rlist, label = "problem type:", selector_type = "button"), lsel = Selector(llist, label = "NHBC represented by:", selector_type = "button"), regen1 = Button(text="Regenerate Problem", default=True, value=True, label = "")):
            if bsel == blist[0]:
                bsel = choice(blist[1:])
            if rsel == rlist[0]:
                rsel = choice(rlist[1:])
            if lsel == llist[0]:
                lsel = choice(llist[1:])
                
            f = generate_pc()
            alpha2 = 2^randint(-3,3)
            
            bc = [randint(-max_abs,max_abs), randint(-max_abs,max_abs)]
                
            if bsel == blist[1]:
            
                
                if bc == [0,0]:
                    problem = HHE1d(f = f, bc = bc, alpha2 = alpha2)
                else:
                    problem = NHHE1d(f = f, bc = bc, alpha2 = alpha2)
                    
                if rsel == rlist[1]:
                    html(r"Find the formal solution to the problem")
                    
                else:
                    m = randint(min_m, max_m)
                    html(r"Find the partial sum $s_{{{m}}}(t,x)$ to the problem".format(m = latex(m)))
                    
                html(problem.say_eqs())
                
{'fraction_non_alphanumeric': 0.13996500874781304, 'fraction_numerical': 0.013996500874781305, 'mean_word_length': 1.678714859437751, 'pattern_counts': {'":': 0, '<': 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': '1008552', 'n_tokens_mistral': 1280, 'n_tokens_neox': 1201, 'n_words': 312}