设置说明 第 1 步:安装 Jupyter 第 2 步:安装并启用 jupyter_http_over_ws jupyter 扩展程序(一次性) pip install jupyter_http_over_wsjupyter serverextension enable —py jupyter_http_over_ws第 3 步:启动服务器并进行身份验证 jupyter notebook \ —NotebookApp.allow_origin=’https://colab.research.google.com‘ \ —port=8888 \ 服务器启动后,它将输出一条消息,其中...

阅读全文>>

图片保存的一种思路import pyautogui # 模拟鼠标右键图片另存为 from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains import time from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By webdriver = webdriver.Chrome() webdriver.get("ht...

阅读全文>>

[toc] 协程 & 异步编程(asyncio)协程(Coroutine),也可以被称为微线程,是一种用户态内的上下文切换技术。简而言之,其实就是通过一个线程实现代码块相互切换执行。例如: def func1(): print(1) ... print(2) def func2(): print(3) ... print(4) func1() func2() 上述代码是普通的函数定义和执行,按流程分别执行两个函数中的代码,并先后会输出:1、2、3、4。但如果介入协程技术那么就可以实现函数见代码切换执行,...

阅读全文>>