发上等愿,结中等缘,享下等福;择高处立,寻平处住,向宽处行

Brick walls are there for a reason :they let us prove how badly we want things

代码改变世界

阅读排行榜

python 二维码识别包 pyzbar zxing使用简介

2019-07-26 17:01 by kowme, 7690 阅读, 收藏,
摘要: 一、Python下二维码识别包的使用详情 在python下二维码识别,目前主要有三个模块:zbar 、zbarlight、zxing。 未使用zbarlight,原因是zbarlight和zbar的dll相同,二维码识别准去率没提升。另外,该包的pip安装存在一些问题未解决。 1、安装包: pip 阅读全文

python 判断回文字符串的方法

2019-05-06 15:32 by kowme, 7145 阅读, 收藏,
摘要: # -*- coding:utf-8 -*- # palindrome str : 回文字符串:一个字符串,不论是从左往右,还是从右往左,字符的顺序都是一样的(如abba,等) def is_palindrome_1(tmp_str): for i in range(len(tmp_str)): if tmp_str[i] != tmp_str[-(i+1)]: ... 阅读全文

Python:判断文本中的用户名在数据库中是否存在,存在返回1,不存在返回0

2014-07-11 22:03 by kowme, 5248 阅读, 收藏,
摘要: 下面是我写的python的一个小脚本,作用是:判断文本中的用户名在数据库中是否存在,存在返回1,不存在返回0.用的是MySQL数据库。 要注意的是:strip函数的使用,该函数的作用是去除字符串两端多余的whitespace。 所以strip的作用肯定不是像书上说的去除字符串两端多余空格。 查了一下 阅读全文

[linux系统]XFS (vda3):Corruption detected.Unmount and run xfs_repair 简单解决办法

2019-04-12 17:57 by kowme, 5223 阅读, 收藏,
摘要: 今天kvm的centos系统,rm -rf时报错,具体如下: rm: cannot remove ‘log-0/case1/log_net’: Input/output errorrm: cannot remove ‘log-0/case1/log_iostate’: Input/output er 阅读全文

Python多线程下存在_strptime的问题

2018-01-04 16:03 by kowme, 3372 阅读, 收藏,
摘要: 由于Python的datetime和time中的_strptime方法不支持多线程,运行时会报错:AttributeError: _strptime code: 会报错误:AttributeError: 'module' object has no attribute '_strptime' 解决方 阅读全文

It's not who you are underneath, it's what you do that defines you

Brick walls are there for a reason :they let us prove how badly we want things