GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — TensorFlow-and-DeepLearning-Tutorial/PythonTips at master · CreatCodeBuild/TensorFlow-and-DeepLearning-Tutorial

Expand file tree

/

PythonTips

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

PythonTips

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
dummy-server
dummy-server
 
 
README.md
README.md
 
 
coroutine.py
coroutine.py
 
 
generator.py
generator.py
 
 

README.md

Outline

Python 加油站

在使用深度学习的过程中,我们使用到了一些 Python 技巧。
不一定每个同学都熟悉 Python,所以 Python 加油站就建立啦!

Generator 生成器的使用

Generator 是在 Python 2.5 (对,十多年了)中出现的老特性(对,虽然 JS 到 ES6 才有)。Generator 是一个可以让函数暂停的功能。
在 generator.py 中我们会探索 Generator 的基本以及高级一点地用法。
dummy-server 这个文件夹里面有一个 NodeJS 服务器,用来配合 Python Generator 的探索。

.../dummy-server$ node index.js 
python generator.py
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.