-
argparse
Some examplesThe following is a simple usage example that sums integers from the command-line and writes the result to a file:parser = argparse.ArgumentParser(description='sum the integers at the command line')parser.add_argument('integers', metav...…
-
Markdown Editor
欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦: Markdown和扩展Markdown简洁的语法 代码块高亮 图片链接和图片上传 LaTex数学公式 UML序列图和流程图 离线写博客 导入导出Markdown文件 丰富的快捷键快捷键 加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl + Q 插入链接 Ctrl + L 插入代码 Ctrl + ...…
-
Vundle + Vim
安装 Vim在 Ubuntu 上安装 Vim 很简单,在终端敲入如下命令即可sudo apt-get install vim安装 Vundle由于 vim 缺乏默认的插件管理器,所有插件的文件都散布在 ~/.vim 下的几个文件夹中,这样导致各种插件的安装、更新、删除都需要自己手动处理,既麻烦费事,又可能出现错误。所以我们需要插件管理器的帮忙,常见的插件管理器有 vundle、pathogen 等等,我们这里使用 vundle。Vundle 托管在 Github 上,所以使用 git 下载...…
-
visualization for error
matlab code% error visualizationclear all; clc;C = [80.72, 81.17, 80.45, 81.17, 80.81];C_idx = [1, 2, 3, 4, 5];C_e = [2.35, 3.25, 3.04, 2.14, 2.79];figure(1)errorbar(C_idx, C, C_e, '-s', 'LineWidth', 2, 'MarkerSize', 10, ... 'MarkerEdgeColor', ...…
-
Vim Setting
a vim configsource $VIMRUNTIME/vimrc_example.vimsource $VIMRUNTIME/mswin.vimbehave mswinset diffexpr=MyDiff()function MyDiff() let opt = '-a --binary ' if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif if &diffopt =~ 'iwhite' | let...…
-
frequent software on windows
software AutoHotKey: 神器!神器!神器!当然也得看使用者咯(^__^) 嘻嘻……详情请参看:Win下最爱效率神器:AutoHotKey。 Listary: 本地搜索神器,当然还有别的作用,More&More。 Launchy : 快速启动安装的应用程序,老而弥坚,有丝Mac下Spotlight之风; Wox : Windows下一款最接近 Alfred 的软件启动/文件搜索利器;可参见Listary Everything Wox Launch。 Chr...…
-
read .PFM images
matlab codefunction D = pfmread(filename_pfm) fid = fopen(filename_pfm); fscanf(fid,'%c',[1,3]);cols = fscanf(fid,'%f',1);rows = fscanf(fid,'%f',1);fscanf(fid,'%f',1);fscanf(fid,'%c',1);D = fread(fid,[cols,rows],'single');D(D == Inf) = 0;D = rot90...…
-
Jupyter Notebook In Docker for Server
生成jupyter配置文件,这个会生成配置文件.~/.jupyter/jupyter_notebook_config.pyjupyter notebook --allow-root --generate-config使用ipython生成密码In [1]: from notebook.auth import passwdIn [2]: passwd()Enter password: Verify password: Out[2]: 'sha1:XXX'去配置文件.~/.jupyter/ju...…
-
image visualization
a code exampleimport cPickleimport numpy as npimport matplotlib.pyplot as pltfrom matplotlib.patches import Rectangle#from src import api as vgfrom PIL import Image as PIL_Imageimport requestsfrom StringIO import StringIOobj = [] # 201rel = [] #...…
-
graph visualization
a code exampleimport networkx as nximport matplotlib.pyplot as pltimport scipy.io as sioimport numpy as npgraph = sio.loadmat('./graph_sub_obj.mat')classes = np.asarray(graph['classes'], dtype = np.str)graph_obj = np.asarray(graph['graph_obj'], dt...…