Update test.py
Browse files
test.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import subprocess
|
| 2 |
import time
|
| 3 |
-
subprocess.Popen(["pip", "install", "pyngrok", "jupyterlab"
|
| 4 |
ngrok_token_for_jupyter = "2jIHIsbkkZuy7kHSXBI9AWopaYl_ymL6gSiPpcuiw8NVNdpT"
|
| 5 |
http_port = "8083"
|
| 6 |
-
time.sleep(
|
| 7 |
# Command to run ngrok in the background
|
| 8 |
ngrok_command = ["ngrok", "http", http_port, "--authtoken=" + ngrok_token_for_jupyter]
|
| 9 |
ngrok_process = subprocess.Popen(ngrok_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
|
|
|
| 1 |
import subprocess
|
| 2 |
import time
|
| 3 |
+
subprocess.Popen(["pip", "install", "pyngrok", "jupyterlab"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
| 4 |
ngrok_token_for_jupyter = "2jIHIsbkkZuy7kHSXBI9AWopaYl_ymL6gSiPpcuiw8NVNdpT"
|
| 5 |
http_port = "8083"
|
| 6 |
+
time.sleep(60) #等待10秒安装完毕
|
| 7 |
# Command to run ngrok in the background
|
| 8 |
ngrok_command = ["ngrok", "http", http_port, "--authtoken=" + ngrok_token_for_jupyter]
|
| 9 |
ngrok_process = subprocess.Popen(ngrok_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|