0%

1
2
3
4
5
6
sudo python -m pip install --upgrade --force pip
sudo pip install setuptools
sudo pip install python-dateutil
sudo pip install --ignore-installed six
sudo pip install jupyter
//https://python.freelycode.com/contribution/detail/4

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
linux下指定位置为 

$HOME/.config/pip/pip.conf

或者


$HOME/.pip/pip.conf

mac下指定位置为

$HOME/Library/Application Support/pip/pip.conf

或者

$HOME/.pip/pip.conf
Read more »

空格

1
2
3
4
5
6
7
8

两个quad空格 a \qquad b a \qquad b 两个m的宽度
quad空格 a \quad b a \quad b 一个m的宽度
大空格 a\ b a\ b 1/3m宽度
中等空格 a\;b a\;b 2/7m宽度
小空格 a\,b a\,b 1/6m宽度
没有空格 ab ab\,
紧贴 a\!b a\!b 缩进1/6m宽度
Read more »

mac 命令行 ftp中文乱码
终端->偏好设置->设置->高级->字符编码->gb2312

1
python -m json.tool file.json

python reverse list

1
for filename in reversed(glob_result):

json

1
2
3
4
5
6
7
8
9
10
data = {}
output_json = {}
with open(json_file_name) as data_file:
data = json.load(data_file)

for (filename, person_json) in data.iteritems():
print filename, person_json

with open(out_filename, 'w+') as f:
json.dump(output_json, f)

强制右下,右上

1
2
3
4
5
6
7
8
9
10
11
\makeatletter    
\DeclareRobustCommand{\textsupsub}[2]{{%
\m@th\ensuremath{%
^{\mbox{\fontsize\sf@size\z@#1}}%
_{\mbox{\fontsize\sf@size\z@#2}}%
}%
}}
\makeatother
X\textsupsub{ab}{c}X\textsupsub{c}{ab}X.
\textsubscript.
\textsuperscript.

ipython notebook是一个基于浏览器的python数据分析工具,使用起来非常方便,具有极强的交互方式和富文本的展示效果。jupyter是它的升级版,它的安装也非常方便,一般Anaconda安装包中会自带。安装好以后直接输入jupyter notebook便可以在浏览器中使用。但是它默认只能在本地访问,如果想把它安装在服务器上,然后在本地远程访问,则需要进行如下配置:

Read more »