会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
happygril3
上一页
1
···
21
22
23
24
25
26
27
28
29
···
56
下一页
2020年4月21日
linux安装mysql
摘要: 1.下载mysql wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.19-linux-glibc2.12-x86_64.tar
阅读全文
posted @ 2020-04-21 17:01 happygril3
阅读(145)
评论(0)
推荐(0)
2020年4月15日
logger
摘要: import logging logger = logging.getLogger(__name__) logger.setLevel(level = logging.INFO) handler = logging.FileHandler("session.log") handler.setLeve
阅读全文
posted @ 2020-04-15 08:13 happygril3
阅读(148)
评论(0)
推荐(0)
2020年4月8日
安装anaconda
摘要: (1)安装anaconda 1.下载 Anaconda3-5.3.1-Linux-x86_64.sh到../software sudo wget https://repo.continuum.io/archive/Anaconda3-5.1.0-Linux-x86_64.sh && bash Ana
阅读全文
posted @ 2020-04-08 12:22 happygril3
阅读(187)
评论(0)
推荐(0)
2020年4月7日
安装
摘要: (1)window安装 1.下载redis,将问价解压到E:\download\redis https://github.com/MSOpenTech/redis/releases 2.修改密码 redis.windows.conf文件下requirepass,设置为 requirepass 123
阅读全文
posted @ 2020-04-07 08:50 happygril3
阅读(105)
评论(0)
推荐(0)
2020年4月6日
字典
摘要: 1.统计字典中键的个数 len dict = {'Name': 'Zara', 'Age': 7} print(len(dict)) #2 2. 字典中按某个值排序(倒序) sorted x = [{'name':'Homer', 'age':39}, {'name':'Bart', 'age':1
阅读全文
posted @ 2020-04-06 16:09 happygril3
阅读(153)
评论(0)
推荐(0)
2020年3月29日
协程
摘要: 协程:是单线程下的并发,又称微线程 (1)线程由操作系统控制调度;协程由应用程序级别控制调度 (2)协程的切换开销更小,属于程序级别的切换,操作系统完全感知不到。 (3)协程是指单个线程,无法利用多核 *一个程序开启多个进程,每个进程开启多个线程,每个线程开启多个协程* import gevent
阅读全文
posted @ 2020-03-29 11:09 happygril3
阅读(127)
评论(0)
推荐(0)
进程线程_队列
摘要: (1)先进先出 import queue q=queue.Queue() q.put('first') q.put('second') q.put('third') print(q.get()) print(q.get()) print(q.get()) ''' first second third
阅读全文
posted @ 2020-03-29 09:19 happygril3
阅读(91)
评论(0)
推荐(0)
线程_事件
摘要: 线程的一个关键特性是每个线程都是独立运行且状态不可预测。 如果程序中的其他线程需要通过判断某个线程的状态来确定自己下一步的操作,这时我们需要使用threading库中的Event对象。 event.set():设置事件状态为True event.wait ():等待event.set 把事件状态设置
阅读全文
posted @ 2020-03-29 09:04 happygril3
阅读(163)
评论(0)
推荐(0)
线程_锁
摘要: (1)死锁 是指两个或两个以上的进程或线程在执行过程中,因争夺资源而造成的一种互相等待的现象,若无外力作用,它们都将无法推进下去。 此时称系统处于死锁状态或系统产生了死锁,这些永远在互相等待的进程称为死锁进程,如下就是死锁 #死锁 from threading import Thread,Lock,
阅读全文
posted @ 2020-03-29 08:38 happygril3
阅读(105)
评论(0)
推荐(0)
2020年3月28日
线程_GIL
摘要: #GIL:解释器级别的锁(保护的就是解释器级别的数据),同一时间只能有一个线程来执行 from threading import Thread import time n=100 def work(): time.sleep(0.1) global n temp=n time.sleep(0.1)
阅读全文
posted @ 2020-03-28 22:01 happygril3
阅读(81)
评论(0)
推荐(0)
上一页
1
···
21
22
23
24
25
26
27
28
29
···
56
下一页
导航
博客园
首页
新随笔
联系
订阅
管理
公告