Skip to content

Instantly share code, notes, and snippets.

@neale
Last active April 7, 2016 18:40
Show Gist options
  • Save neale/d5faf156930ef7730734ba71f185a848 to your computer and use it in GitHub Desktop.
Save neale/d5faf156930ef7730734ba71f185a848 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import subprocess
chapters = [
'intro',
'linear_algebra',
'prob',
'numerical',
'ml',
'mlp',
'regularization',
'optimization',
'convnets',
'rnn',
'guidelines',
'applications',
'linear_factors',
'autoencoders',
'representation',
'graphical_models',
'monte_carlo',
'partition',
'inference',
'generative_models',
]
def main():
for idx, chapter in enumerate(chapters):
print chapter
url = 'http://www.deeplearningbook.org/contents/{}.html'.format(chapter)
fname = '{}-{}.pdf'.format(idx+1, chapter)
subprocess.call(["wkhtmltopdf", url, fname])
subprocess.call(["pdfunite $(ls -tr *.pdf) DeepLearningBook.pdf"])
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment