Construct TexTemplate class to convert tex to svg

This commit is contained in:
YishiMichael
2022-05-21 15:56:03 +08:00
parent edca4a93fa
commit f0984487ea
10 changed files with 177 additions and 228 deletions

View File

@ -1,4 +1,5 @@
from functools import lru_cache
import hashlib
import inspect
import math
@ -76,3 +77,9 @@ def binary_search(function,
else:
return None
return mh
def hash_string(string):
# Truncating at 16 bytes for cleanliness
hasher = hashlib.sha256(string.encode())
return hasher.hexdigest()[:16]