Using [keras](https://github.com/fchollet/keras) or this other python [code](https://github.com/dansoutner/LSTM).