def replace_text(text, variables):
    """
    Replace some special words in text to variable from dictionary
    @param text: raw text
    @param variables: dictionary of variables for replace
    """
    for name, value in variables.items():
        text = text.replace('#%s#' % name, str(value))
    return text