<jupyter_start><jupyter_text>Elasticsearch<jupyter_code>from elasticsearch import Elasticsearch
es = Elasticsearch([{'host': 'localhost', 'port': 9200}])
es
_es = None
_es = Elasticsearch([{'host': 'localhost', 'port': 9200}])
if _es.ping():
    print('Yay Connect')
else:
    print('Awww it could not connect!')
# import json
# from time import sleep

# import requests
# import urllib3
# from bs4 import BeautifulSoup
# import logging


# def connect_elasticsearch():
#     _es = None
#     _es = Elasticsearch([{'host': 'localhost', 'port': 9200}])
#     if _es.ping():
#         print('Yay Connect')
#     else:
#         print('Awww it could not connect!')
#     return _es


# if __name__ == '__main__':
#     logging.basicConfig(level=logging.ERROR)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14885496183206107, 'fraction_numerical': 0.017811704834605598, 'mean_word_length': 4.35374149659864, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '666523', 'license': 'MIT', 'n_tokens_mistral': 273, 'n_tokens_neox': 265, 'n_words': 68, 'path': 'notebooks/Elasticseach.ipynb', 'repo_name': 'coatk1/test_code', 'size': '786'}