Skip to content

Instantly share code, notes, and snippets.

@luoyetx
Last active August 25, 2018 17:21
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save luoyetx/a44eea84272123f608dcf737588cdfa7 to your computer and use it in GitHub Desktop.
Save luoyetx/a44eea84272123f608dcf737588cdfa7 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import pdfkit
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/%s.html'%chapter
fname = '%02d-%s.pdf'%(idx+1, chapter)
pdfkit.from_url(url, fname)
if __name__ == '__main__':
main()
@XingwenZhang
Copy link

hello, why I use this script and get the empty pdf? I use Ubuntu 16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment