<commit_before>#!/usr/bin/env python

import sys, os, json, random
sys.path.append(os.path.abspath("."))

try:
    from urllib.parse import urlparse
except ImportError:
    from urlparse import urlparse 

from optparse import OptionParser

import logging
logging.basicConfig()
log_level = os.environ.get('MSGFLO_PYTHON_LOGLEVEL')
logger = logging.getLogger('msgflo')
if log_level:
  level = getattr(logging, log_level.upper())
  logger.setLevel(level)

import gevent
import gevent.event

# AMQP
haigha = None
try:
  import haigha
  from haigha.connection import Connection as haigha_Connection
  from haigha.message import Message as haigha_Message
except ImportError as e:
  haigha = e

# MQTT
import paho.mqtt.client as mqtt<commit_msg>Also catch SyntaxError for Haigha import<commit_after>#!/usr/bin/env python

import sys, os, json, random
sys.path.append(os.path.abspath("."))

try:
    from urllib.parse import urlparse
except ImportError:
    from urlparse import urlparse 

from optparse import OptionParser

import logging
logging.basicConfig()
log_level = os.environ.get('MSGFLO_PYTHON_LOGLEVEL')
logger = logging.getLogger('msgflo')
if log_level:
  level = getattr(logging, log_level.upper())
  logger.setLevel(level)

import gevent
import gevent.event

# AMQP
haigha = None
try:
  import haigha
  from haigha.connection import Connection as haigha_Connection
  from haigha.message import Message as haigha_Message
except (ImportError, SyntaxError) as e:
  haigha = e

# MQTT
import paho.mqtt.client as mqtt
{'fraction_non_alphanumeric': 0.08498023715415019, 'fraction_numerical': 0.0, 'mean_word_length': 5.003952569169961, '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': '716663', 'n_tokens_mistral': 519, 'n_tokens_neox': 513, 'n_words': 143}