Skip to main content

常用

%run 运行py脚本

%run xxx.py

bookmark - 对目录做别名

In [2]: %pwd
Out[2]: u'/home/vagrant'

In [3]: %bookmark dongxi ~/shire/dongxi

In [4]: %cd dongxi
/home/vagrant/shire/dongxi_code

In [5]: %pwd
Out[5]: u'/home/vagrant/shire/dongxi_code'

%timeit 可以测试性能

In [13]: a = 1

In [14]: b = 2

In [15]: %timeit a+b
40.8 ns ± 0.3 ns per loop (mean ± std. dev. of 7 runs, 10,000,000 loops each)