随笔分类 - PYTHON
python知识
摘要:python多进程学习笔记 1.队列 队列数据的存入与取出 2.管道 从一个管道的output段输出到另一个队列的input端 3.端到端数据发送与接收 输出
阅读全文
摘要:pandas基础知识汇总 1.时间序列 datetime.datetime(2018, 11, 18, 16, 44, 4, 405600) 2018 11 18 2018 07 06 00:00:00 16:44:04 A B C D 2018 11 07 0.215536 0.855986 0.
阅读全文
摘要:Index(['A', 'B', 'C', 'D'], dtype='object', name='Gnes')
阅读全文
摘要:时间序列数据统计—滑动窗口 窗口函数 2018 01 01 0.797334 2018 01 02 0.451286 2018 01 03 1.329133 2018 01 04 0.416577 2018 01 05 0.610993 Freq: D, dtype: float64 Rolling
阅读全文
摘要:Note 1.Time Series 2频率与日期偏移
阅读全文
摘要:1.The most simple decorator [in] [out] 2.strengthen [in] [out] 1.return is a function,not the result of function running 2.renturn a new function
阅读全文
摘要:1.basic "numpy.meshgrid" 由一维数组到二维数组,用于生成网格数据 "matplotlib" python绘图库 2.code 3.result
阅读全文
摘要:1.code python coding=utf8 import requests import itchat KEY = '8edce3ce905a4c1dbb965e6b35c3834d' def get_response(msg): 这里我们就像在“3. 实现最简单的与图灵机器人的交互”中做的
阅读全文
摘要:1.准备工作 安装itchat "参考" itchat内部函数 2.个人微信男女比例分析 哈哈,没想到还是女性朋友多
阅读全文
摘要:1.基础知识点回顾 1.plot(x, y, marker='D')表示绘制折线图,marker设置样式菱形。 2.scatter(x, y, marker='s', color='r')绘制散点图,红色正方形。 3.bar(x, y, 0.5, color='c')绘制柱状图,间距为0.5,原色。
阅读全文
摘要:multiprocess stdout AttributeError:module '__main__' has no attribute '__spec__' 在ipython解释器中运行以上脚本一直弹出这个问题,AttributeError 查阅官方文档,In the remaining cas
阅读全文
摘要:锁 在大多数系统上,python同时支持消息传递和基于线程的并发编程。但实际上python的线程受限很多,为了最大程度保护线程的安全,Python使用了全局解释器锁(Global Interpreter Lock),在任意指定时刻只允许单个线程运行。 :调用方法multiprocess.Joinab
阅读全文
摘要:1.pipe 除了使用队列外,还可以使用管道在进程间执行消息传递 pipe([]duplex) 在进程间创建一条管道,并返回元组 ,其中conn1和conn2是表示管道两端的Connection对象。默认控制下管道是双向的。如果将 设为False,conn1只能接受,conn2只能用于发送。 2.c
阅读全文
摘要:1.进程池 进程池技术的应用至少由以下两部分组成: 资源进程: 预先创建好的空闲进程,管理进程会把工作分发到空闲进程来处理。 管理进程: 管理进程负责创建资源进程,把工作交给空闲资源进程处理,回收已经处理完工作的资源进程。 上面资源进程跟管理进程的概念很好理解,下面就是进程池的关键,管理进程如何有效
阅读全文

浙公网安备 33010602011771号