会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
光辉-岁月
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
3
4
5
6
7
8
9
下一页
2020年8月11日
python 控制 excel
摘要: Python控制exce 关于包的说明: xlrd 读取excel文件, xlrd >= 2.0时,仅支持xls格式; 指定 xlrd 版本 1.2.0 可支持xlsx xlwt 写入excel文件,仅支持xls格式。推荐使用 适合与xlrd配合读取和修改excel文件,也可以直接创建新excel文
阅读全文
posted @ 2020-08-11 08:24 疯狂列表推导式
阅读(4411)
评论(0)
推荐(0)
2020年6月29日
两个list,并集、交集、差集
摘要: # -*- coding: utf-8 -*- list1 = [1, 2, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5] list2 = [5, 5, 6, 7, 8, 9] # set集合 # 差集--两种情况 print(list(set(list1) - set(list2))
阅读全文
posted @ 2020-06-29 08:38 疯狂列表推导式
阅读(291)
评论(0)
推荐(0)
2020年5月10日
关于apt-get install
摘要: 1. apt get install 适用于Ubuntu系统,不适用于mac os 2. mac os安装包的命令应该是brew
阅读全文
posted @ 2020-05-10 08:54 疯狂列表推导式
阅读(669)
评论(0)
推荐(0)
2020年4月19日
异步进程池
摘要: import os from multiprocessing import Pool demo = 'this is a test' def func(): with open('text.txt', 'w') as f: f.write(demo) print('process {} write
阅读全文
posted @ 2020-04-19 23:57 疯狂列表推导式
阅读(121)
评论(0)
推荐(0)
获取cpu信息
摘要: ```https://blog.csdn.net/cpongo3/article/details/88819885```
阅读全文
posted @ 2020-04-19 19:18 疯狂列表推导式
阅读(144)
评论(0)
推荐(0)
2020年4月16日
print重定向
摘要: ``` # -*- coding: utf-8 -*- ''' @File : test.py @Author: qiguagnhui @Date : 2020-04-11 23:17 @Desc : ''' import os import sys savedStdout = sys.stdout #保存标准输出流 with open('out.txt', 'w') as file: sys.s
阅读全文
posted @ 2020-04-16 23:52 疯狂列表推导式
阅读(143)
评论(0)
推荐(0)
2020年4月13日
python实现排列和组合
摘要: # -*- encoding=utf-8 -*- from itertools import combinations,permutations test_data = {'a', 'b', 'c'} # 排列 -- 关注排列方式 print('排列有:{}'.format(list(permuta
阅读全文
posted @ 2020-04-13 08:20 疯狂列表推导式
阅读(298)
评论(0)
推荐(0)
list_反转,切片,删除,升序降序
摘要: ``` # 第一种: number = 11223344556677889900 # 反转1,reverse()方法 # list1 = list(str(number)) # list1.reverse() # 反转2, 切片 list1 = list(str(number))[::-1] print('反转后的', list1) # 删除 # 删除1, 直接remove元素 list1.rem
阅读全文
posted @ 2020-04-13 08:12 疯狂列表推导式
阅读(322)
评论(0)
推荐(0)
抠图
摘要: ``` # -*- coding: utf-8 -*- import cv2 # 读取图片 img = cv2.imread('phone.png') # h、w为想要截取的图片大小 h = 35 w = 170 x = 500 y = 425 cropImg = img[(y):(y + h), (x):(x + w)] cv2.imwrite('test.png', cropImg) ```
阅读全文
posted @ 2020-04-13 06:52 疯狂列表推导式
阅读(110)
评论(0)
推荐(0)
2020年4月12日
获取系统cpu和内存参数
摘要: ``` # -*- coding: utf-8 -*- # 获取server运行情况 # import json # from datetime import datetime # # import paramiko # import xlwt, xlrd # from xlutils.copy import copy # # def get_host_cpu_memory(): # client
阅读全文
posted @ 2020-04-12 18:27 疯狂列表推导式
阅读(259)
评论(0)
推荐(0)
上一页
1
···
3
4
5
6
7
8
9
下一页
公告