the concise python code i study for is here
Question A @ line 8
i do not really understand the syntax meaning for "res = res << 1" for the purpose of "get_signature"
Question B @ line 49 (SOLVED BY myself through another Q&A)
"xor = r1^r2" does not really make any sense to me, which the author later tried "(d-nna(vor))" to calculate "hash_sim" -- (refer to line 50)
Question C @ about hash_sim in general
that question is more to do with LSH understanding, what variable "d" (line 38) is doing in the sample code ---- which is later used to calculate hash_sim in line 50
Question D @ line 20 and 24 -- synatx for "&"
not only having problem in understand the syntax "num = num & (num-1)", but also unsure what function "nnz" is doing in the context of hash_similarlity. this question may relate to my question (-b-) when the author apply the "xor" into "nnz", and again equation for "xor" (question b) looks odd to me.
both my python and LSH understanding are at the beginner level, and I kind of entering in the loop for this problem. thanks for taking your time to going through my confusion as well as the codes