generative twitter book python code