Skip to content

Instantly share code, notes, and snippets.

@py-ranoid
Last active October 16, 2018 06:06
Show Gist options
  • Save py-ranoid/3c09999a68694566dbfb624bb1504295 to your computer and use it in GitHub Desktop.
Save py-ranoid/3c09999a68694566dbfb624bb1504295 to your computer and use it in GitHub Desktop.
Download GoogleNews word vectors from terminal.
function gdrive_download () {
CONFIRM=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate "https://docs.google.com/uc?export=download&id=$1" -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$CONFIRM&id=$1" -O $2
rm -rf /tmp/cookies.txt
}
gdrive_download 0B7XkCwpI5KDYNlNUTTlSS21pQmM GoogleNews-vectors-negative300.bin.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment