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
def parallel_lines(line_array, min_lines_num=5): | |
""" Returns numpy_array with only min_lines_num parallel lines left. | |
returns parallel lines with most occurring slopes | |
:param line_array: np.array generated via cv2.HoughTransformP() | |
:param min_lines_num: amount of lines that will be analyzed, pass odd numbers. | |
:return: line array with only parallel lines or array with only first line | |
""" | |
def calc_slope(p1_x, p1_y, p2_x, p2_y): | |
def round_down(num, divisor): |
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
# habraproxy.py — это простейший http-прокси-сервер, запускаемый локально (порт на ваше | |
# усмотрение), который показывает содержимое страниц Хабра. С одним исключением: после | |
# каждого слова из шести букв должен стоять значок «™». Примерно так: | |
# | |
# http://habrahabr.ru/company/yandex/blog/258673/ | |
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
# Сейчас на фоне уязвимости Logjam все в индустрии в очередной раз обсуждают проблемы и | |
# особенности TLS. Я хочу воспользоваться этой возможностью, чтобы поговорить об одной из | |
# них, а именно — о настройке ciphersiutes. | |
# |