2016年3月18日

digital root问题

摘要: 问题阐述会是这样的: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the proce 阅读全文

posted @ 2016-03-18 11:39 yuanww 阅读(357) 评论(0) 推荐(0) 编辑

2016年3月1日

classic asp中使用ADODB.Command防止sql injection

摘要: 原始代码如下 Set Conn = Server.CreateObject("Adodb.Connection") Conn.Open "Provider=Microsoft.Jet.Oledb.4.0;Data Source="&Server.MapPath("*****.mdb") sql="s 阅读全文

posted @ 2016-03-01 15:20 yuanww 阅读(1005) 评论(0) 推荐(0) 编辑

2016年1月22日

caffe 配置 札记

摘要: cudnn的配置1. 安装前请去先官网下载cuDNN (cudnn-7.0-linux-x64-v3),建议安装v3,v4有些问题。将cudnn-7.0-linux-x64-v3解压后会有两个文件夹include和lib64,复制其中文件到系统库sudo cp include/cudnn.h /us... 阅读全文

posted @ 2016-01-22 16:41 yuanww 阅读(262) 评论(0) 推荐(0) 编辑

2016年1月13日

linux shell 札记

摘要: shell 数组数组索引:单个元素索引: ${array[n]}全部元素: ${array[*]}或者 ${array[@]}部分索引: ${array[2:]}数组所有元素统一加前缀/后缀:1 array=( "${array[@]/%/_content}" ) 2 array=( "${arr... 阅读全文

posted @ 2016-01-13 19:35 yuanww 阅读(372) 评论(0) 推荐(0) 编辑

2016年1月6日

cv2.imread BGR模式

摘要: openCV 的cv2.imread()导入图片时是BGR通道顺序,这与Matplotlib的显示,或者读取图片的通道不同,如果需要可以转换为RGB模式,以下代码显示不同之处,但BGR在许多地方使用,caffe倒入数据是以BGR方式 1 plt.figure(figsize=(18, 10)) 2... 阅读全文

posted @ 2016-01-06 11:59 yuanww 阅读(16149) 评论(0) 推荐(0) 编辑

2016年1月2日

Generative Learning algorithms

摘要: "generative algorithm models how the data was generated in order to categorize a signal. It asks the question: based on my generation assumptions, whi... 阅读全文

posted @ 2016-01-02 17:20 yuanww 阅读(448) 评论(0) 推荐(0) 编辑

Probability theory

摘要: 1.Probability mass functions (pmf) and Probability density functions (pdf)pmf 和 pdf 类似,但不同之处在于所适用的分布类型PMF -> discrete distributions, while pdf -> cont... 阅读全文

posted @ 2016-01-02 16:15 yuanww 阅读(354) 评论(0) 推荐(0) 编辑

2015年12月24日

python Memo

摘要: list&tuple 运算乘以constant>>> x = ((1,2),)>>> x*2((1, 2), (1, 2))>>> x = ((1,2))>>> x*2(1, 2, 1, 2)>>> View Code从上面可以看出,tuple或者list和一个常数相乘,会复制元素得到一个新的tup... 阅读全文

posted @ 2015-12-24 12:26 yuanww 阅读(670) 评论(0) 推荐(0) 编辑

2015年12月22日

numpy 札记

摘要: transpose在处理caffe读入的图片数据时,需要将原始图片的数据H*W*3(height*width*RGB) 转换为 3*H*W(RGB*heigth*width)需要用到numpy的transpose功能:设想图片尺寸2x2,RGB模式 则数组规模为2x2x3>>>import nump... 阅读全文

posted @ 2015-12-22 15:53 yuanww 阅读(831) 评论(0) 推荐(0) 编辑

2015年12月16日

linux LVM 逻辑卷

摘要: fdiskpvcreatevgcreatelvcreate查看显示创建删除扩容激活扫描查找LVlvdisplaylvcreatelvremovelvextendlvchangelvscanPVpvdisplaypvcreatepvremovepvchangepvscanVGvgdisplayvgcr... 阅读全文

posted @ 2015-12-16 16:51 yuanww 阅读(249) 评论(0) 推荐(0) 编辑

导航