Skip to content

Instantly share code, notes, and snippets.

View achidlow's full-sized avatar

Adam Chidlow achidlow

View GitHub Profile
@achidlow
achidlow / humble_bundle_download.py
Last active September 10, 2022 20:44
Download all the books in a humble bundle.
"""
Script to download all the books in a humble bundle.
May work for other resources, but don't have anything to test against.
To use, run from the directory you want to download the books in.
Pass the "game" key as the first argument (look in the URL of your normal download page).
To restrict to certain formats, pass them as extra positional arguments on the command line.
Example:
python humble_bundle_download abcdef12345 mobi pdf
@achidlow
achidlow / svm_params_crossval.py
Created September 25, 2013 14:51
Part of a blog post introducing distributed computing with IPython: http://chidlow.id.au/blog/2013/09/24/distributed-computing-with-ipython/
from IPython.parallel import Client
rc = Client()
dview = rc[:]
lview = rc.load_balanced_view()
with dview.sync_imports():
import numpy
from sklearn import svm