摘要: Centos 7 安装TrWebOcr 环境说明 虚拟机环境:centos 7 全新环境,做了少量优化,比如关闭防火墙,yum源使用阿里云等 # 关闭防火墙 systemctl stop firewalld systemctl disable firewalld # 更改yum源 curl -o / 阅读全文
posted @ 2022-06-17 13:06 WIN&迷失 阅读(619) 评论(0) 推荐(0) 编辑
摘要: # 检验是否全是中文字符 def is_all_chinese(strs): for _char in strs: if not '\u4e00' <= _char <= '\u9fa5': return False return True # 检验是否含有中文字符 def is_contains_ 阅读全文
posted @ 2021-08-31 10:24 WIN&迷失 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 安装模块 pip install configobj 测试用配置文件内容: [DEFAULT] appid = appkey = 读取配置文件 from configobj import ConfigObj config = ConfigObj("config.ini", encoding='utf 阅读全文
posted @ 2021-08-31 00:59 WIN&迷失 阅读(697) 评论(0) 推荐(0) 编辑
摘要: Python 判断文本文件的编码类型 from chardet.universaldetector import UniversalDetector def GetEncoding(file): """ 获取文本文件的编码类型 :param file: :return: 返回值是字典 {'encod 阅读全文
posted @ 2021-08-30 23:52 WIN&迷失 阅读(2068) 评论(0) 推荐(0) 编辑
摘要: 1 public static bool IsInPath(string command) 2 { 3 bool isInPath = false; 4 // 判断PATH中是否存在 命令 5 foreach (string test in (Environment.GetEnvironmentVa 阅读全文
posted @ 2021-07-01 23:08 WIN&迷失 阅读(170) 评论(0) 推荐(0) 编辑
摘要: ml-auto:元素右移mr-auto: 元素左移 阅读全文
posted @ 2020-06-22 14:18 WIN&迷失 阅读(1116) 评论(0) 推荐(0) 编辑
摘要: 函数描述 len(seq) 返回序列的长度 list(seq) 将序列转换为列表 max(args) 返回序列或一组参数中的最大值 min(args) 返回序列和一组参数中的最小值 reversed(seq) 让你能够反向迭代序列 sorted(seq) 返回一个有序列表,其中包含指定序列中的所有元 阅读全文
posted @ 2019-10-14 17:46 WIN&迷失 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 函数描述 abs(number) 返回指定数的绝对值 bytes(string, encoding[, errors]) 对指定的字符串进行编码,并以指定的方式处理错误 cmath.sqrt(number) 返回平方根;可用于负数 float(object) 将字符串或数字转换为浮点数 help([ 阅读全文
posted @ 2019-10-14 00:51 WIN&迷失 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 1,设置国内豆瓣源 临时启用豆瓣源 pip install -i https://pypi.douban.com/simple/ virtualenvwrapper #windows中用下面的命令安装 pip install virtualenvwrapper-win 永久更改为国内源 ####wi 阅读全文
posted @ 2019-09-26 23:03 WIN&迷失 阅读(617) 评论(0) 推荐(0) 编辑
摘要: win 10 上,总是会不小按到shift + 空格,自动切换全角、半角 解决方法:以前网上找的一个小工具,现在分享 链接: https://pan.baidu.com/s/1aXYPIm6aRAoHh9Grk4q8vA 密码: fmqm 按图所示,选中全角/半角切换 取消 启用热键 的选项 确定- 阅读全文
posted @ 2018-08-19 11:35 WIN&迷失 阅读(1364) 评论(1) 推荐(0) 编辑