python3
hlgwx
不积跬步无以至千里;
展开
-
Python GUI之tkinter窗口视窗教程大集合(看这篇就够了)
https://www.cnblogs.com/dgwblog/p/11537561.html原创 2020-02-25 11:38:00 · 282 阅读 · 0 评论 -
Python logging log日志写入文件
https://blog.csdn.net/albertfly/article/details/80931623原创 2019-12-27 15:04:08 · 192 阅读 · 0 评论 -
获取当前时间对应的各个时间段初始的时间戳
import timeimport datetimefrom datetime import timedeltanow = datetime.datetime.now() #获取当前时间Nowtime = int(time.time()) # 获取当前时间戳time01 = Nowtime-Nowtime%60 # 获取当前1分钟时间戳print('1分钟',time01...原创 2019-12-25 11:49:46 · 1148 阅读 · 0 评论 -
python 协程
https://blog.csdn.net/qq_27825451/article/details/86292513原创 2019-12-18 17:34:54 · 101 阅读 · 0 评论 -
python 命名规则
包名,模块名,普通函数,普通变量:(全都小写中间下划线)ad_stats.py类名:(首字母大写)AdStats全局变量:(全都大写中间用下划线分开)COLOR_WRITE...原创 2019-12-17 09:52:30 · 93 阅读 · 0 评论 -
Python PEP8 编码规范中文版
https://blog.csdn.net/ratsniper/article/details/78954852原创 2019-12-12 14:13:37 · 108 阅读 · 0 评论 -
pip/pip3更换国内镜像源
https://blog.csdn.net/zwliang98/article/details/83546788原创 2019-12-10 20:56:19 · 904 阅读 · 0 评论 -
python网络编程:socketserver的基本使用
https://cloud.tencent.com/developer/section/1368518原创 2019-12-10 18:30:23 · 147 阅读 · 0 评论 -
Python 一键安装全部依赖包
https://blog.csdn.net/qq_37925422/article/details/79646462原创 2019-12-03 11:19:51 · 742 阅读 · 0 评论 -
linux查看文件前几行和后几行的命令
https://blog.csdn.net/zmx19951103/article/details/78575265/原创 2019-11-27 16:52:11 · 356 阅读 · 0 评论 -
python3 redis 用法大全,学习了
https://www.cnblogs.com/wang-yc/p/5693288.html原创 2019-08-22 20:25:31 · 140 阅读 · 1 评论 -
多线程共享变量
from threading import Thread, Lockglobal_num = 0def func1(): global global_num #全局变量 for i in range(1000000): lock.acquire() # 两个线程会最开始抢这个锁,拿到锁就会处于关锁,执行后面的程序,其他线程执行处于监听状态,等待这个线...原创 2019-08-31 21:42:40 · 149 阅读 · 0 评论 -
Python程序退出: os._exit()和sys.exit()
https://blog.csdn.net/index20001/article/details/74294945原创 2019-09-02 18:31:12 · 257 阅读 · 0 评论 -
socketserver学习
http://www.liujiangblog.com/course/python/77原创 2019-09-02 21:24:42 · 89 阅读 · 0 评论 -
书库
https://www.zhihu.com/question/36082950原创 2019-09-03 00:32:15 · 222 阅读 · 0 评论 -
python多线程操作MySQL数据库pymysql
https://www.eertime.com/archives/288.html原创 2019-09-17 11:49:43 · 3122 阅读 · 0 评论 -
redis 有序集合
import redispool = redis.ConnectionPool(host='127.0.0.1') # 实现一个连接池r = redis.Redis(connection_pool=pool)for i in range(100): r.zadd("1",i,i)# #表名称为1,添加内容为 1到100,对应分数也是1到100.#增,删,改,查。...原创 2019-09-24 11:18:24 · 108 阅读 · 0 评论 -
Python mysql 数据库 关闭重连
# coding=utf-8import pymysqlimport timedef m(): """单次连接mysql执行多次操作后关闭一次, 然后再次重新启动重新连接。 避免每次操作都重新连接浪费资源。 同样可以避免数据库丢失连接状态导致程序出错。 :return: """ while 1: co...原创 2019-10-08 08:57:12 · 3118 阅读 · 1 评论 -
Python 多线程
https://www.cnblogs.com/chengd/articles/7770898.html原创 2019-08-21 14:05:16 · 106 阅读 · 0 评论 -
Python3 Async/Await解释
https://www.jianshu.com/p/5d38b598d8a6原创 2019-08-20 10:58:51 · 406 阅读 · 0 评论 -
Python3 socket 基础
https://blog.csdn.net/Rayn_Zhu/article/details/83413239原创 2019-08-19 16:47:32 · 88 阅读 · 0 评论 -
Python3图片链接下载图片
urllib.request.urlretrieve(zhutu_url, filename='./fb_pic/'+zhutu_name+'.png')zhutu_url:图片链接filename:图片保存地址,及图片名称。原创 2019-03-08 15:44:31 · 961 阅读 · 0 评论 -
linux 访问 链接地址
curlhttp://127.0.0.1:5000/red_num/9/sum_money/10/lei_sum/4/lei_num/9原创 2019-03-01 13:50:47 · 4003 阅读 · 0 评论 -
Python3 队列
Python3 队列基础。fifolifoPriority Queue(优先队列)https://blog.csdn.net/GeekLeee/article/details/77883252转载 2019-02-14 18:17:02 · 484 阅读 · 0 评论 -
linux 安装Python3 及 pip3
https://www.cnblogs.com/kimyeee/p/7250560.html转载 2019-01-03 20:20:14 · 152 阅读 · 0 评论 -
python3 加密 解密 签名
# -*- coding: UTF-8 -*-import rsa# 生成密钥(pubkey, privkey) = rsa.newkeys(1024)# =================================# 场景〇:密钥保存导入# =================================# 保存密钥with open('public.pem','w+'...转载 2018-08-20 09:44:36 · 508 阅读 · 0 评论 -
python 获取数组存入数据库中供取出调用。
1.将数据存储成list。a2.b=json.dumps(a)将b存入数据库中即为json字符串。方便以后调用下面链接可以参考:https://blog.csdn.net/nuli888/article/details/51960725原创 2019-03-14 20:23:12 · 2270 阅读 · 0 评论 -
python json.dumps() 中文乱码问题
json.dumps() 中文乱码了,解决办法见下面链接。https://www.cnblogs.com/geektown/p/5144017.html原创 2019-03-15 11:21:53 · 265 阅读 · 0 评论 -
Python import同级目录报错
import 相关知识https://blog.csdn.net/jacke121/article/details/77260071转载 2019-04-07 14:15:25 · 306 阅读 · 0 评论 -
Python3中的bytes和str类型
Python3中的bytes和str类型https://blog.csdn.net/lyb3b3b/article/details/74993327转载 2019-06-28 18:26:47 · 104 阅读 · 0 评论 -
Python 获取当前文件所在目录
https://blog.csdn.net/lovelyaiq/article/details/78417221import osimport sysprint(os.path.abspath('main.py')) #打印当前命令目录os.chdir(sys.path[0]) ...原创 2019-07-02 14:49:12 · 1624 阅读 · 0 评论 -
原 配置PyCharm(背景色+字体大小+解释器选择)
https://blog.csdn.net/vernice/article/details/50934869转载 2019-06-02 19:32:04 · 171 阅读 · 0 评论 -
Python面向对象编程
https://blog.csdn.net/CLHugh/article/details/75000104转载 2019-05-31 21:13:38 · 152 阅读 · 0 评论 -
Python windows linux 多进程
#!/usr/bin/python3#coding: utf-8from websocket import create_connectionimport gzipimport timeimport jsonimport redisfrom multiprocessing import Pooldef getdata(currsname): print(currsn...原创 2019-05-13 21:21:41 · 475 阅读 · 0 评论 -
linux 安装Python3 教程
https://www.cnblogs.com/kimyeee/p/7250560.html转载 2019-04-14 15:40:55 · 224 阅读 · 0 评论 -
python3爬虫知识积累
原文:python3网络爬虫一《使用urllib.request发送请求》urllib.request.urlopen()发送请求;urllib.request.Request()伪装浏览器的;原文:正则表达式速查表原文:python3 爬虫入门(三)正则表达式基本使用(有实例)原文:xpath与正则表达式在文本数据提取时该如何选择?(xpath爬取csdn实例)正则表达式实例:import re...原创 2018-03-07 08:35:59 · 411 阅读 · 1 评论