Skip to content

Instantly share code, notes, and snippets.

View leehanchung's full-sized avatar
👾

Han leehanchung

👾
View GitHub Profile
@leehanchung
leehanchung / benfords_election.py
Created November 7, 2020 07:41
detecting election fraud using Benford's Law
##############################################################################
# Author: Han-chung Lee
# Date: 2020-11-6
#
# Detecting election fraud activity at Milwaukee County using Benford's Law
#
# Statistical detection of systematic election irregularities:
# https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3478593/
##############################################################################
@leehanchung
leehanchung / collisionLSH.py
Created August 18, 2021 20:05 — forked from unrealwill/collisionLSH.py
Proof of Concept : generating collisions on a neural perceptual hash
import tensorflow as tf #We need tensorflow 2.x
import numpy as np
#The hashlength in bits
hashLength = 256
def buildModel():
#we can set the seed to simulate the fact that this network is known and doesn't change between runs
#tf.random.set_seed(42)
model = tf.keras.Sequential()
@leehanchung
leehanchung / factors_gen.txt
Created April 5, 2024 04:01
yandex search features
This file has been truncated, but you can view the full file.
# Contains human-readable representation of NFactor::TCodeGenInput message (defined in factors_metadata.proto)
Group: [
"Datetime",
"Domain",
"RapidClicks",
"RegHostStatic",
"RegDocStatic",
"Regex",
"LinkBM25",