import math


def filter_by_slope(slope):
    """
    Filter horizontal lines
    :param slope: the slope of the line
    :return: False if the line is almost horizontal, True otherwise
    """
    # The calculation is done creating a valid zone around the vertical
    deviation_from_vertical = 70*math.pi/180
    vertical = 90*math.pi/180
    # Transpose the slope to the 1 and 2 quadrants
    if slope < 0:
        slope += math.pi
        # Filter
    if vertical-deviation_from_vertical < slope < vertical+deviation_from_vertical:
        return True
    return False