Last active
April 7, 2016 18:40
-
-
Save neale/d5faf156930ef7730734ba71f185a848 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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