how to download files in github code example

Example 1: github untrack files

git rm -r --cached .

Example 2: how to download file in python

import urllib2

filedata = urllib2.urlopen('http://i3.ytimg.com/vi/J---aiyznGQ/mqdefault.jpg')
datatowrite = filedata.read()
 
with open('/Users/scott/Downloads/cat2.jpg', 'wb') as f:
    f.write(datatowrite)

Example 3: download files in from github

# To do this you would need to get the raw file contents
# You can get this by go to the file and clicking on the "Raw" button
# This button will redirect you to a url containing raw.githubusercontent.com
# Copy this url and use it with the following commands

curl -LJO