上一页 1 2 3 4 5 6 7 8 9 ··· 21 下一页
摘要: 假设有如下一个python类: class Foo(object): def __a(self): print "Bet you can't see me..." def bar(self): self.__a() 而s是Securityp的一个实例,我们 s._Foo__a() 这种机制可以阻止继 阅读全文
posted @ 2019-01-09 13:38 simple_wxl 阅读(2575) 评论(0) 推荐(0) 编辑
摘要: logging与print 区别,为什么需要logging? 在写脚本的过程中,为了调试程序,我们往往会写很多print打印输出以便用于验证,验证正确后往往会注释掉,一旦验证的地方比较多,再一一注释比较麻烦,这样logging就应运而生了,直接把验证信息存在一个文件中(例如在logging.basi 阅读全文
posted @ 2019-01-09 12:12 simple_wxl 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 工作中需要对tensorflow 的一个predict结果加速,利用python中的线程池 def getPPLs(tester,datas): tester = run_epoch.rescore(session, test_lm, data, test_data, eval_op=None, t 阅读全文
posted @ 2018-12-27 10:32 simple_wxl 阅读(1530) 评论(0) 推荐(0) 编辑
摘要: 我的雪。。。 阅读全文
posted @ 2018-12-09 14:41 simple_wxl 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 常规的一些正则匹配 常规的一些正则匹配 \[ 匹配 "["括号 \.匹配 点. \.?表示.出现1次或者0次 "[a-zA-Z]*" 正则匹配只含英文的字母 subn函数 subn函数 re.subn('\[',"",rawstring) 将rawstring中符合正则匹配"\["的全部替换成"" 阅读全文
posted @ 2018-11-29 13:59 simple_wxl 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 当使用urllib.request.urlopen打开包含中文的链接时报错: from urllib import request url = 'https://baike.baidu.com/item/糖尿病'response = request.urlopen(url)提示错误:UnicodeE 阅读全文
posted @ 2018-11-14 13:54 simple_wxl 阅读(13503) 评论(0) 推荐(0) 编辑
摘要: 工作中遇到的问题:在GMM模型中添加一维scale比较大的特征,需不需要归一化 答案:不需要,推导如下: 阅读全文
posted @ 2018-09-21 14:41 simple_wxl 阅读(710) 评论(0) 推荐(0) 编辑
摘要: 1、select 和 selectMany SelectMany() 将中间数组序列串联为一个最终结果值,其中包含每个中间数组中的每个值 2、join语句 from x in xx join d in dd on x.y equals d.y select 3、级联concat 4、相等 Seque 阅读全文
posted @ 2018-08-21 10:39 simple_wxl 阅读(1766) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2018-07-30 11:24 simple_wxl 阅读(2) 评论(0) 推荐(0) 编辑
摘要: AlexNet (2012) The network had a very similar architecture as LeNet by Yann LeCun et al but was deeper, with more filters per layer, and with stacked 阅读全文
posted @ 2018-06-28 10:17 simple_wxl 阅读(1988) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 21 下一页