jupyter
使用指引
# cat jupyter.sh
cd /data
nohup jupyter notebook --ip=0.0.0.0 --porit=8888 --no-browser --allow-root > jupyter.log 2>&1 &
使用提醒
class S:
def a(self, s: str) -> bool:
s1 = s
print(s1, s)
# jupyter
# %time S().a('{[]}'), S().a("{[]}")
"""
[] []
[] []
CPU times: user 695 µs, sys: 212 µs, total: 907 µs
Wall time: 528 µs
(None, None)
"""
# jupyter
# S().a('{[]}'), S().a("{[]}")
"""
{[]} {[]}
{[]} {[]}
(None, None)
"""
"""
'\n{[]} {[]}\n{[]} {[]}\n\n(None, None)\n'
"""
class S:
def a(self, s: str) -> bool:
s1 = s
print(s1, s)
%time S().a('{[]}'), S().a("{[]}")
"""
[] []
[] []
CPU times: user 2.83 ms, sys: 970 µs, total: 3.8 ms
Wall time: 2.16 ms
(None, None)
"""
S().a('{[]}'), S().a("{[]}")
"""
{[]} {[]}
{[]} {[]}
(None, None)
"""
实际jupyter输出如下:
输出存在视觉差异。