This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import pika | |
| import functools | |
| import logging | |
| import logging.handlers | |
| log_file_name = 'logs/publisher_rabbitmq.log' | |
| logging_level = logging.DEBUG | |
| # Logging settings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pika | |
| import functools | |
| import logging | |
| import logging.handlers | |
| log_file_name = 'logs/consumer_rabbitmq.log' | |
| logging_level = logging.DEBUG | |
| # Logging settings | |
| formatter = logging.Formatter( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| import numpy as np | |
| import pandas as pd | |
| import nlp_pre_processing | |
| # An internal NLP lib to process text | |
| nlp = nlp_pre_processing_library.NLPPreprocessor() | |
| # Multiprocessing library that uses pool | |
| # to distribute the task for all processors |