<commit_before>from elasticsearch import Elasticsearch

#localhost:9200
es = Elasticsearch()

def create_index():
    doc = {
        'url': 'https://www.python.org/events/python-events/462/',
        'title': 'Python Brasil [12]',
        'description':'The official home of the Python Programming Language',
        'image':'https://www.python.org/static/opengraph-icon-200x200.png',
        'text':'Notice: While Javascript is not essential for this website'
    }

    res = es.index(index="athena", doc_type='page', body=doc)
    print(res['created'])

def main():
    create_index()

if __name__ == "__main__":
    main()<commit_msg>The 'create_index' function was refactored and creates the 'insert_page' function.<commit_after>from elasticsearch import Elasticsearch

#localhost:9200
es = Elasticsearch()

def create_index():
    res = es.indices.create(index='athena', ignore=400)

def insert_page(url, title, description, image, text):
    doc = {
        'url': url,
        'title': title,
        'description':description,
        'image':image,
        'text':text
    }

    res = es.index(index="athena", doc_type='page', body=doc)

def main():
    create_index()

if __name__ == "__main__":
    main()
{'fraction_non_alphanumeric': 0.14520098441345364, 'fraction_numerical': 0.01804757998359311, 'mean_word_length': 3.5864661654135337, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '1238863', 'n_tokens_mistral': 397, 'n_tokens_neox': 382, 'n_words': 91}