<commit_before>from __future__ import unicode_literals
from six import StringIO, text_type
from uuid import UUID

from ordereddict import OrderedDict
from openpyxl import Workbook

from rest_framework.renderers import BaseRenderer

# six versions 1.3.0 and previous don't have PY2
try:
    from six import PY2
except ImportError:
    import sys
    PY2 = sys.version_info[0] == 2


class ExcelRenderer(BaseRenderer):

    """
    Renderer which serializes to Excel
    """

    media_type = 'application/ms-excel'
    format = 'xlsx'<commit_msg>Update renderers.py<commit_after>from __future__ import unicode_literals
from six import StringIO, text_type
from uuid import UUID

from collections import OrderedDict
from openpyxl import Workbook

from rest_framework.renderers import BaseRenderer

# six versions 1.3.0 and previous don't have PY2
try:
    from six import PY2
except ImportError:
    import sys
    PY2 = sys.version_info[0] == 2


class ExcelRenderer(BaseRenderer):

    """
    Renderer which serializes to Excel
    """

    media_type = 'application/ms-excel'
    format = 'xlsx'
{'fraction_non_alphanumeric': 0.06295620437956205, 'fraction_numerical': 0.014598540145985401, 'mean_word_length': 4.055299539170507, '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': '2249657', 'n_tokens_mistral': 348, 'n_tokens_neox': 328, 'n_words': 112}