欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

jupyter-study

程序员文章站 2022-01-20 10:05:53
...
print("hello world")
hello world
%connect_info
{
  "shell_port": 62708,
  "iopub_port": 62709,
  "stdin_port": 62710,
  "control_port": 62711,
  "hb_port": 62712,
  "ip": "127.0.0.1",
  "key": "0c4476d3-23ca71566160cebace1022a5",
  "transport": "tcp",
  "signature_scheme": "hmac-sha256",
  "kernel_name": ""
}

Paste the above JSON into a file, and connect with:
    $> jupyter <app> --existing <file>
or, if you are local, you can connect with just:
    $> jupyter <app> --existing kernel-a64df954-ee8d-4f4e-b1f1-43048efdf4f5.json
or even just:
    $> jupyter <app> --existing
if this is the most recent Jupyter kernel you have started.
  • a
  • b
a='hi'
import time, sys
for i in range(8):
    print(i)
    time.sleep(0.5)
0
1
2
3
4
5
6
7
for i in range(50):
    print(i)
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from numpy import *
eye(4)
array([[1., 0., 0., 0.],
       [0., 1., 0., 0.],
       [0., 0., 1., 0.],
       [0., 0., 0., 1.]])
l=(1,2)
type(l)
tuple
m=[1,2]
type(m)
list

相关标签: jupyter

推荐阅读