Python download Wunda deep learning programming exercises

Source: Internet
Author: User

After registering deep learning on Cousera, you can download the after-class exercise.

1. After entering the programming environment, click File-open in the upper left corner to enter the file management mode

2. Click on the Red Circle folder to enter the root directory

3. In the top right corner of the root directory, new one IPYNB

4. Open the new IPYNB, enter and do the following, you can compress the files in the root directory into a zip format, download the zip file to get all the programming content

Import Zipfileimport osfor i in range (1,5):    startdir = "week%d"% (i)  #要压缩的文件夹路径    file_news = startdir + '. Zip ' # After compressing the folder's name    print (file_news)    z = zipfile. ZipFile (File_news, ' W ', ZipFile. zip_deflated) #参数一: folder name    for Dirpath, Dirnames, filenames in Os.walk (startdir):        Fpath = Dirpath.replace ( Startdir, ') #这一句很重要, without replace, start copying from the root directory        Fpath = Fpath and Fpath + os.sep or ' ' #这句话理解我也点郁闷, implementing compression for the current folder and all contained files        for filename in filenames:            z.write (Os.path.join (dirpath, filename), fpath+filename)            print (' compression succeeded ')    z.close ()     print (file_news+ ' End ')

  

Python download Wunda deep learning programming exercises

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.