科学网

 找回密码
  注册
python 字典顺序不变
高建召 2015-12-10 13:56
python 字典顺序不变 Cliff Gao from collections import OrderedDict d2=OrderedDict() d2 =33 d2 =20 d2 =102 d2 =321 d2 =10 d2 ### 输出结果 ###OrderedDict( ) for key,val in d2.iteritems(): print(key,val) ###输出结果 ##('ac', 33) ##('gw', ...
个人分类: python|3311 次阅读|没有评论
vim 自动添加表头
高建召 2015-11-21 13:10
Vim 自动添加表头 作者: Cliff Gao 以*.py 文件为例, 将下面代码复制到 ~/.vimrc 中 (如果找不到.vimrc 可以自己创建一个) function BufNewFile_PY() 0put='#!/usr/bin/env python' 1put='#FileName: '.expand('%') 2put='#Aut ...
个人分类: linux相关|3109 次阅读|没有评论
EM 算法一个例子
高建召 2015-11-14 07:53
EM 算法一个例子 EM in R 参考以下网页并翻译,其中变量稍作修改。 http://rstudio-pubs-static.s3.amazonaws.com/1001_3177e85f5e4840be840c84452780db52.html 假设: 有一枚硬币,以25%的概率面朝上(heads), 75%的概率面朝下(tails). 如果面朝上,服从均值为1,标准方差为1 的正态分布, ...
个人分类: 统计相关|8464 次阅读|没有评论
EM 算法
高建召 2015-11-13 17:10
摘自:以下课程 教师: Andrew Ng. 课程主页 http://cs229.stanford.edu/ 课程材料 http://cs229.stanford.edu/materials.html EM算法: 作者 Andrew Ng. 预备知识:Jensen不等式 如果f(x) 是个凸函数(convex function),X是随机变量,那么 E =f (E ). &nbs ...
个人分类: 统计相关|4534 次阅读|没有评论
PBS 系统
高建召 2015-10-22 10:02
PBS protable Batch System. 1PBS 命令: 1. qsub 用于提交作业 2. qstat 用于查询作业状态 3. qdel 删除已经提交的作业 qdel jobnumber 该命令删除自己提交的所有任务. qselect -u username | xargs qdel 4. qmgr 队列管理 2PBS 脚本例子 ...
个人分类: linux相关|4846 次阅读|没有评论
contact Number Contact Order Contact Map
高建召 2015-10-6 06:24
Contact Number: The contact number of an amino acid residue in a protein structure is defined by the number of C(beta) atoms around the C(beta) atom of the given residue, a quantity similar to, but different from, solvent accessible surface area. from: http://www.ncbi.nlm.nih.gov ...
个人分类: bioinformatics|5097 次阅读|没有评论
python subprocess 模块
高建召 2015-9-24 11:07
subprocess 模块, 可以用来调用其他程序,如shell 等。 这个模块将来会替代之前老模块如os.system d等。 The subprocess module allows you to spawn new processes, connect to theirinput/output/error pipes, and obtain their return codes. This module intends toreplace several older modul ...
个人分类: python|1887 次阅读|没有评论
ubuntu 环境变量的设置
高建召 2015-9-16 08:22
ubuntu 环境变量的设置 参考: http://my.oschina.net/qinlinwang/blog/30471 到 用户主目录下的.profile或.bashrc文件 登录到你的用户(非root),在终端输入: $ sudo gedit ~/.bashrc (或者 ~/.profile) 可以在此文件末尾加入PATH的设置如下: export PATH=”$PATH:yourPath1:yourPath2 ... ...
个人分类: linux相关|3264 次阅读|没有评论

本页有 2 篇博文因作者的隐私设置或未通过审核而隐藏

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-26 09:13

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部