<commit_before>from splinter import Browser
import config
import time

def firstwizard(b, name):
    b.visit( config.serverurl + name )
    b.find_by_css('a.button-large').click()
    b.find_by_css('#dbname').fill( name )
    b.find_by_css('#uname').fill( config.dbuser )
    b.find_by_css('#pwd').fill( config.dbpass )
    b.find_by_css('input.button-large').click()
    if (b.is_text_present('Run the install', wait_time=2)):
        b.find_by_css('a.button-large').click()
        b.find_by_css('#weblog_title').fill( name )
        b.find_by_css('#user_login').fill( config.wpuser )
        b.find_by_css('#pass1').fill( config.wppass )
        b.find_by_css('#pass2').fill( config.wppass )
        b.find_by_css('#admin_email').fill(  config.wpmail )
        b.find_by_css('input.button-large').click()

def runbrowser(name):
    with Browser() as b:
        firstwizard(b, name)<commit_msg>Updated browser to handle new WP installation wizard: one field for password and required confirmation of weak password<commit_after>from splinter import Browser
import config
import time

def firstwizard(b, name):
    b.visit( config.serverurl + name )
    b.find_by_css('a.button-large').click()
    b.find_by_css('#dbname').fill( name )
    b.find_by_css('#uname').fill( config.dbuser )
    b.find_by_css('#pwd').fill( config.dbpass )
    b.find_by_css('input.button-large').click()
    if (b.is_text_present('Run the install', wait_time=2)):
        b.find_by_css('a.button-large').click()
        b.find_by_css('#weblog_title').fill( name )
        b.find_by_css('#user_login').fill( config.wpuser )
        b.find_by_css('.wp-generate-pw').click()
        b.find_by_css('#pass1').fill( config.wppass )
        b.check('pw_weak')
        b.find_by_css('#admin_email').fill(  config.wpmail )
        b.find_by_css('input.button-large').click()

def runbrowser(name):
    with Browser() as b:
        firstwizard(b, name)
{'fraction_non_alphanumeric': 0.15885416666666666, 'fraction_numerical': 0.0026041666666666665, 'mean_word_length': 3.573809523809524, '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': '187925', 'n_tokens_mistral': 681, 'n_tokens_neox': 674, 'n_words': 110}