<commit_before>from wex.extractor import Attributes
from wex.etree import xpath, text


extract = Attributes()


@extract.attribute
def name(response):
    return text(xpath('//h1')(response))


@extract.attribute
def whoops(response):
    return 1/0


@extract.attribute
def country(response):
    return text(xpath('//dd[@id="country"]')(response))


@extract.attribute
def region(response):
    return text(xpath('//dd[@id="region"]')(response))<commit_msg>Fix step6/tutorial.py<commit_after>from wex.extractor import Attributes
from wex.etree import xpath, text


extract = Attributes()


@extract.add
def name(response):
    return text(xpath('//h1')(response))


@extract.add
def whoops(response):
    return 1/0


@extract.add
def country(response):
    return text(xpath('//dd[@id="country"]')(response))


@extract.add
def region(response):
    return text(xpath('//dd[@id="region"]')(response))
{'fraction_non_alphanumeric': 0.16150442477876106, 'fraction_numerical': 0.007743362831858407, 'mean_word_length': 5.284722222222222, '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': '4110247', 'n_tokens_mistral': 309, 'n_tokens_neox': 295, 'n_words': 62}