# Path: jarr/lib/utils.py
# def jarr_get(url, timeout=None, user_agent=None, headers=None, **kwargs):
#     from jarr.bootstrap import conf  # circular import otherwise
#     timeout = timeout or conf.crawler.timeout
#     user_agent = user_agent or conf.crawler.user_agent
#     def_headers = {'User-Agent': user_agent}
#     if headers is not None:
#         def_headers.update(headers)
#     request_kwargs = {'verify': False, 'allow_redirects': True,
#                       'timeout': timeout, 'headers': def_headers}
#     request_kwargs.update(kwargs)
#     return requests.get(url, **request_kwargs)
# 
# Path: jarr/bootstrap.py
# def is_secure_served():
# def init_logging(log_path=None, log_level=logging.INFO, modules=(),
#                  log_format='%(asctime)s %(levelname)s %(message)s'):
# def init_db(echo=False):
# def init_models():
# def commit_pending_sql(*args, **kwargs):
# def rollback_pending_sql(*args, **kwargs):
# REDIS_CONN = Redis(host=conf.db.redis.host,
#                    db=conf.db.redis.db,
#                    port=conf.db.redis.port)


import logging
from jarr.lib.utils import jarr_get as common_get
from jarr.bootstrap import conf
# This file provides functions used for:
# - import from a JSON file;
# - generation of tags cloud;
# - HTML processing.
#



logger = logging.getLogger(__name__)


def jarr_get(*args, **kwargs):
    kwargs['timeout'] = conf.crawler.timeout
    kwargs['user_agent'] = conf.crawler.user_agent
    return common_get(*args, **kwargs)



# Path: jarr/lib/utils.py
# def jarr_get(url, timeout=None, user_agent=None, headers=None, **kwargs):
#     from jarr.bootstrap import conf  # circular import otherwise
#     timeout = timeout or conf.crawler.timeout
#     user_agent = user_agent or conf.crawler.user_agent
#     def_headers = {'User-Agent': user_agent}
#     if headers is not None:
#         def_headers.update(headers)
#     request_kwargs = {'verify': False, 'allow_redirects': True,
#                       'timeout': timeout, 'headers': def_headers}
#     request_kwargs.update(kwargs)
#     return requests.get(url, **request_kwargs)
# 
# Path: jarr/bootstrap.py
# def is_secure_served():
# def init_logging(log_path=None, log_level=logging.INFO, modules=(),
#                  log_format='%(asctime)s %(levelname)s %(message)s'):
# def init_db(echo=False):
# def init_models():
# def commit_pending_sql(*args, **kwargs):
# def rollback_pending_sql(*args, **kwargs):
# REDIS_CONN = Redis(host=conf.db.redis.host,
#                    db=conf.db.redis.db,
#                    port=conf.db.redis.port)


# Path: jarr/utils.py
import logging
from jarr.lib.utils import jarr_get as common_get
from jarr.bootstrap import conf

# This file provides functions used for:
# - import from a JSON file;
# - generation of tags cloud;
# - HTML processing.
#



logger = logging.getLogger(__name__)


def jarr_get(*args, **kwargs):
    kwargs['timeout'] = conf.crawler.timeout
    kwargs['user_agent'] = conf.crawler.user_agent
    return common_get(*args, **kwargs)



def get_tfidf_pref(feed, pref_name):