Skip to content

Instantly share code, notes, and snippets.


Josh Tan jtan189

View GitHub Profile
jtan189 /
Created Feb 19, 2020 — forked from mblondel/
Fuzzy K-means and K-medians
# Copyright Mathieu Blondel December 2011
# License: BSD 3 clause
import numpy as np
import pylab as pl
from sklearn.base import BaseEstimator
from sklearn.utils import check_random_state
from sklearn.cluster import MiniBatchKMeans
from sklearn.cluster import KMeans as KMeansGood
jtan189 /
Created Jan 24, 2019 — forked from marcan/
Simple Bloom filter implementation in Python 3 (for use with the HIBP password list)
# Simple Bloom filter implementation in Python 3
# Copyright 2017 Hector Martin "marcan" <>
# Licensed under the terms of the MIT license
# Written to be used with the Have I been pwned? password list:
# Download the pre-computed filter here (968MB, k=11, false positive p=0.0005):
View gist:98e4d27d16227ceae4db74c5b1696a0a
Verifying that "" is my Blockstack ID.

Keybase proof

I hereby claim:

  • I am jtan189 on github.
  • I am jtan ( on keybase.
  • I have a public key ASArAOyseL73hhmQKaJIwZMoydBE2rNmwYxuK9VKWjiTDAo

To claim this, I am signing this object:

jtan189 /
Created Sep 29, 2012
Java PBKDF2 Password Hashing Code
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.SecretKeyFactory;
import java.math.BigInteger;
* PBKDF2 salted password hashing.
* Author: havoc AT
You can’t perform that action at this time.