Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1750545
  • 博文数量: 297
  • 博客积分: 285
  • 博客等级: 二等列兵
  • 技术积分: 3006
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-06 22:04
个人简介

Linuxer, ex IBMer. GNU https://hmchzb19.github.io/

文章分类

全部博文(297)

文章存档

2020年(11)

2019年(15)

2018年(43)

2017年(79)

2016年(79)

2015年(58)

2014年(1)

2013年(8)

2012年(3)

发布时间:2016-06-23 09:41:59

感谢Vamei的matplotlib 的文章:http://www.cnblogs.com/vamei/archive/2013/01/30/2879700.html代码如下:首先用psutil 获得进程的CPU 使用率,然后再用matplotlib绘图。点击(此处)折叠或打开import psutilimport sysimport rell=[].........【阅读全文】

阅读(1446) | 评论(0) | 转发(0)

发布时间:2016-06-21 10:37:05

本文内容基本上出自: Grokking.Algorithms.An.illustrated.guide.for.programmers.and.other.curious.peopleBFS:解决什么问题?1. Is there a path from node A to node B?2. What is the shortest path from node A to node B?适用于无权重的图,以前的帖子里面的wordladder问题,也是BFS的应用。w.........【阅读全文】

阅读(1356) | 评论(0) | 转发(0)

发布时间:2016-06-20 15:57:35

推荐本书,Grokking.Algorithms.An.illustrated.guide.for.programmers.and.other.curious.people这本书很不错,讲的通俗易懂。而且都是实际的利用数据结构解决问题,而没有把重点放在数据结构本身的实现上。下面是两段代码分别是计算longest_common_substring和longest_common_subsequence.点击(此处)折叠或.........【阅读全文】

阅读(1115) | 评论(0) | 转发(0)

发布时间:2016-06-15 13:30:37

1. 一本书共n页,有一串页码从1到n,计算各数码分别用到了几次注:数码为0,1,2。。。。。。9的数字先把数字转化成列表,然后从1-n,都转化成列表后extend. 对于这个列表用Counter 处理一下。点击(此处)折叠或打开from collections import Counterdef co.........【阅读全文】

阅读(1178) | 评论(0) | 转发(0)

发布时间:2016-06-04 11:13:22

下面两段代码出自http://rosettacode.org/wiki/Roman_numerals/Encode#Python点击(此处)折叠或打开def to_roman(x):    anums = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]    rnums = "M CM D CD C XC L.........【阅读全文】

阅读(1199) | 评论(0) | 转发(0)
给主人留下些什么吧!~~

fireboyz20052010-11-10 18:27

HI, 看到你"http://bbs.chinaunix.net/viewthread.php?tid=1806065"

这里的提问,你是不是在看一本叫《Shell脚本专家指南》的书?我也在阅读,我新手,不如大家交流一下,看到不明白也可以大家一起研究研究。

我的qq是:369035906
或gtalk:jiale.chan@gmail.com

回复  |  举报
留言热议
请登录后留言。

登录 注册