<commit_before>import sys
import time
import telepot

"""
$ python2.7 emodi.py <token>

Emodi: An Emoji Unicode Decoder - You send me an emoji, I give you the unicode.

Caution: Python's treatment of unicode characters longer than 2 bytes (which 
most emojis are) varies across versions and platforms. I have tested this program 
on Python2.7/Raspbian. If you try it on other versions/platforms, the length-
checking and substring-extraction below may not work as expected.
"""

def handle(msg):
    msg_type, from_id, chat_id = telepot.glance(msg)
    m = telepot.namedtuple(msg, 'Message')

    if chat_id < 0:<commit_msg>Added some comments<commit_after>import sys
import time
import telepot

"""
$ python2.7 emodi.py <token>

Emodi: An Emoji Unicode Decoder - You send me an emoji, I give you the unicode.

Caution: Python's treatment of unicode characters longer than 2 bytes (which 
most emojis are) varies across versions and platforms. I have tested this program 
on Python2.7.3/Raspbian. If you try it on other versions/platforms, the length-
checking and substring-extraction below may not work as expected.
"""

def handle(msg):
    msg_type, from_id, chat_id = telepot.glance(msg)
    m = telepot.namedtuple(msg, 'Message')

    if chat_id < 0:
{'fraction_non_alphanumeric': 0.07882165605095541, 'fraction_numerical': 0.010350318471337579, 'mean_word_length': 4.194214876033058, 'pattern_counts': {'":': 0, '<': 7, '<?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': '302669', 'n_tokens_mistral': 405, 'n_tokens_neox': 390, 'n_words': 161}