09 2018 档案

摘要:1 概念理清 2 创建数组 2.1 f1= np.array( [ [1,2,3,4], [2,3,4,5], [3,4,5,6] ]) 其他代码 a= np.array([ [ [3.4,5,6,8], [3,2.4,5,7] ], [ [2.3,4,5,6], [0.9,5,6,1] ], [ 阅读全文
posted @ 2018-09-19 17:22 sunzebo 阅读(235) 评论(0) 推荐(0) 编辑
摘要:参考 Python必会的单元测试框架 —— unittest 阅读全文
posted @ 2018-09-18 22:54 sunzebo 阅读(270) 评论(0) 推荐(0) 编辑
摘要:Out: 参考资料: http://www.runoob.com/python/python-gui-tkinter.html Tkinter 组件 Tkinter的提供各种控件,如按钮,标签和文本框,一个GUI应用程序中使用。这些控件通常被称为控件或者部件。 目前有15种Tkinter的部件。我们 阅读全文
posted @ 2018-09-13 20:43 sunzebo 阅读(277) 评论(0) 推荐(0) 编辑
摘要:1 队列读写 2 队列实现生产者、消费者 阅读全文
posted @ 2018-09-12 21:08 sunzebo 阅读(1746) 评论(0) 推荐(0) 编辑
摘要:1. Code Out: 995 -5 892 -103 814 -78 694 -120 668 -26 550 -118 482 -68 423 -59 293 -130 188 -105 193 5 325 132 473 148 535 62 539 4 677 138 738 61 875 阅读全文
posted @ 2018-09-12 13:12 sunzebo 阅读(1700) 评论(0) 推荐(0) 编辑
摘要:代码: 2 输出: D:\Programs\Anaconda\python.exe D:/1_practice/python/projects/downloads_modify/归类/并发/thread_sync_5.py c1 c2 c3 m1 p1m2 p2 p5 ('num:', 1, 'pr 阅读全文
posted @ 2018-09-12 00:36 sunzebo 阅读(251) 评论(0) 推荐(0) 编辑
摘要:代码: 输出: 基准,以上代码执行 main end 03:58 0->1 03:58 1->2 04:00 2->3 04:00 3->4 04:02 4->5 04:02 5->6 04:04 6->7 04:04 7->8 04:06 8->9 04:06 9->10 04:08 10->11 阅读全文
posted @ 2018-09-11 21:30 sunzebo 阅读(228) 评论(0) 推荐(0) 编辑
摘要:Out1 保证 在操作共享数据的地方,执行完线程1,再执行线程2 Out2 即使在线程1中加了锁,但是线程2没有加锁,两个代码在同时跑。 数据一致性无法保证 阅读全文
posted @ 2018-09-11 00:46 sunzebo 阅读(159) 评论(0) 推荐(0) 编辑
摘要:1 usePool.py 2 usePoolmap.py 3 usePoolgetData.py 4 usePoolCallback.py 使用回调函数 参考: python进程池:multiprocessing.pool 阅读全文
posted @ 2018-09-10 22:39 sunzebo 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-09-09 03:08 sunzebo 阅读(333) 评论(0) 推荐(0) 编辑
摘要:总结: 代码: 输出: 格式说明: 小时 :秒,时间戳, <当前进程ID, [父 进程ID,当前进程线程数量]> root@ssmaster:~/python# python test_threadprocess1.py 03:04,1536397384.349529: main begin03:0 阅读全文
posted @ 2018-09-08 17:21 sunzebo 阅读(227) 评论(0) 推荐(0) 编辑
摘要:总结: 桥接 模式上外网比较简单。 缺点是每次重启虚拟机,分配的IP可能变化,导致 xshell 连接 时都要修改,很麻烦 桥接模式能不能配置静态IP ? 1. 环境 物理机网络 情况,从外部自动获取IP 2. 虚拟机软件设置 3. 虚拟操作系统 linux的网络设置 Linux ssmaster 阅读全文
posted @ 2018-09-08 14:36 sunzebo 阅读(130) 评论(0) 推荐(0) 编辑
摘要:输出: 阅读全文
posted @ 2018-09-08 02:37 sunzebo 阅读(265) 评论(0) 推荐(0) 编辑
摘要:输入: 360 影视 html https://www.360kan.com/dianying/index.html 解析代码 输出 : 参考资料: Python解析html的几种操作方式 lxml.etree._Element 属性: 阅读全文
posted @ 2018-09-08 00:46 sunzebo 阅读(390) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-09-04 20:58 sunzebo 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-09-04 19:51 sunzebo 阅读(6808) 评论(0) 推荐(0) 编辑
摘要:test_module2.py: test_module.py: 阅读全文
posted @ 2018-09-02 00:04 sunzebo 阅读(233) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示