二手产品经理

二手产品经理

THIS IS RENO

Automate - 97~98 days - Learn Python online for 100 days

Record#

  1. Practice for 96 days is to request web page content and then summarize the content using openai. Due to key issues, the openai process is skipped.
  2. Practice for 97 days is to create a continuous running process to execute custom code.
  3. Use schedule to create a process, code schedule.every(2).seconds.do(printMe) executes. Code meaning: do something every * time!
  4. To make the code execute continuously, first create an infinite loop, while true add schedule.run_pending() in the loop body.
  5. Writing code is still something that requires experience. Adding the code time.sleep(1) in the infinite loop can reduce CPU usage from 50% to 0.7%. If it weren't for the teacher, I definitely wouldn't know how to do it.

CODE#

96-day code#

97-day code#

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.