add server python code

code added from master branch of google photohunt app