Initial commit of python implementation