duplicates = multiple editions
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
# (Variant #4 for exercise 16.2 on EPI (Elements of Programming Interviews)) (September 2018 edition) | |
# The core idea is calculate the levenshtein distance, while taking into account the special cases of the regex expression | |
# *, +, ? and . were taken into account for the regex expression. Expression blocks are not supported | |
# This algorithm uses recursion with memoization (could be transposed to a DP solution), yielding a O(mn) time complexity, O(mn) auxiliary space for cache and O(max(m,n)) function call stack | |
# (m and n are the lengths of regex and target strings respectively) | |
# | |
# Version using dynamic programming: https://gist.github.com/lopespm/2362a77e7bd230a4622a43709c195826 | |
def regex_dist(regex: str, target: str): | |
def regex_dist_aux(r_i, t_i): |
#!/usr/local/bin/python | |
# coding: utf-8 | |
import cv2 | |
import sys | |
import numpy | |
from matplotlib import pyplot as plt | |
from scipy.spatial import distance | |
""" |
Pragma: akamai-x-cache-on, akamai-x-cache-remote-on, akamai-x-check-cacheable, akamai-x-get-cache-key, akamai-x-get-extracted-values, akamai-x-get-nonces, akamai-x-get-ssl-client-session-id, akamai-x-get-true-cache-key, akamai-x-serial-no |