会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
光辉-岁月
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
下一页
2020年11月10日
ubuntu设置root密码及远程连接
摘要: # 1. 设置root账户 设置密码 sudo passwd root # 2. ssh远程登陆拒绝访问:修改SSH配置文件 sudo vim /etc/ssh/sshd_config # 允许远程登录 PermitRootLogin yes # 3. 重启服务 sudo service ssh r
阅读全文
posted @ 2020-11-10 00:18 疯狂列表推导式
阅读(414)
评论(0)
推荐(0)
2020年11月9日
GUI实现md5编码
摘要: #!/usr/bin/env python # -*- coding: utf-8 -*- from tkinter import * import hashlib import time LOG_LINE_NUM = 0 class MY_GUI(): def __init__(self,init
阅读全文
posted @ 2020-11-09 08:11 疯狂列表推导式
阅读(136)
评论(0)
推荐(0)
2020年11月4日
队列
摘要: from queue import Queue # 队列 先进先出 q = Queue() for i in range(5): q.put(i) while not q.empty(): print(q.get()) 0 1 2 3 4 from queue import LifoQueue #
阅读全文
posted @ 2020-11-04 13:06 疯狂列表推导式
阅读(77)
评论(0)
推荐(0)
2020年11月3日
paramiko连接服务器
摘要: import paramiko def connect_to_server(): client = paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) print(' 开始连接服务器 ')
阅读全文
posted @ 2020-11-03 23:17 疯狂列表推导式
阅读(78)
评论(0)
推荐(0)
matplotlib模块画坐标图
摘要: import matplotlib.pyplot as plt x_data = ['2011', '2012', '2013', '2014', '2015', '2016', '2017'] y_data = [58000, 60200, 63000, 71000, 84000, 90500,
阅读全文
posted @ 2020-11-03 23:03 疯狂列表推导式
阅读(108)
评论(0)
推荐(0)
提取图片中的文字
摘要: from PIL import Image import pytesseract image = Image.open('demo.png') content = pytesseract.image_to_string(image, lang='chi_sim') print('demo图片中的文字
阅读全文
posted @ 2020-11-03 22:13 疯狂列表推导式
阅读(97)
评论(0)
推荐(0)
cv2抠图示例
摘要: import cv2 # 读取图片 img = cv2.imread('demo.png') # h、w为想要截取的图片大小 h, w = 35, 170 # 坐标 x, y= 500, 425 targetImg = img[(y):(y + h), (x):(x + w)] cv2.imwrit
阅读全文
posted @ 2020-11-03 22:04 疯狂列表推导式
阅读(546)
评论(0)
推荐(0)
清空文本内容truncate()
摘要: all_dat_str = '1213124123425' # 写入信息 with open('音频信息1111111111111', 'w') as f: print('写入信息的长度为 ', f.write(all_dat_str)) # 确认有信息 with open('音频信息1111111
阅读全文
posted @ 2020-11-03 08:06 疯狂列表推导式
阅读(131)
评论(0)
推荐(0)
创建redis连接池
摘要: import redis def create_redis_pool(): REDIS_DB = '127.0.0.1' REDIS_PORT = 6379 pool = redis.ConnectionPool(host=REDIS_DB, port=REDIS_PORT, max_connect
阅读全文
posted @ 2020-11-03 07:52 疯狂列表推导式
阅读(445)
评论(0)
推荐(0)
2020年11月2日
禁止转义
摘要: # 加u说明编码的方式 data_str = u'中文测试' print('加u,说明是unicode编码的变量 ', len(data_str)) 加u,说明是unicode编码的变量 4 # 禁止\的转义功能 r_str = r'\n' o_str = '\\n' print('加r,去掉反斜杠
阅读全文
posted @ 2020-11-02 23:51 疯狂列表推导式
阅读(195)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
下一页
公告