<commit_before><commit_msg>Added context manager example.<commit_after>##############################################################################
#
# A simple example using the XlsxWriter Python module and the "with" context
# manager. This doesn't require an explicit close().
#
# Copyright 2013-2015, <NAME>, <EMAIL>
#
import xlsxwriter

with xlsxwriter.Workbook('hello_world.xlsx') as workbook:
    worksheet = workbook.add_worksheet()

    worksheet.write('A1', 'Hello world')
{'fraction_non_alphanumeric': 0.256198347107438, 'fraction_numerical': 0.01859504132231405, 'mean_word_length': 6.698412698412699, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '212608', 'n_tokens_mistral': 142, 'n_tokens_neox': 129, 'n_words': 38}