<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""给文字加点颜色."""

import os

if os.name == 'nt':
    from colorama import init
    init()
    win = True
else:
    win = False

COLORS = ('black', 'white', 'red', 'green', 'yellow', 'blue',
          'magenta', 'cyan', 'gray')
EFFECTS = ('bold', 'blink', 'underline', 'reverse', 'hidden')<commit_msg>解决 windows 下 colorama 不支持 unicode 字符的问题.<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""给文字加点颜色."""

import sys
reload(sys)
sys.setdefaultencoding(sys.stdout.encoding)
import os
if os.name == 'nt':
    from colorama import init
    init()
    win = True
else:
    win = False


COLORS = ('black', 'white', 'red', 'green', 'yellow', 'blue',
          'magenta', 'cyan', 'gray')
EFFECTS = ('bold', 'blink', 'underline', 'reverse', 'hidden')
{'fraction_non_alphanumeric': 0.20884520884520885, 'fraction_numerical': 0.002457002457002457, 'mean_word_length': 3.5027624309392267, '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': '1254185', 'n_tokens_mistral': 306, 'n_tokens_neox': 308, 'n_words': 81}