摘要: python的数据很丰富,所以对于数据分析来讲, python是一种最合适的选择 下面讲述一下常见的数据结构,包括栈,队列,元组,字典,集合等,以及对这些数据结构进行操作 集合的遍历 #字典的遍历 补充: a = [[1, 2], [3, 4], [5, 6]]不使用任何循环,将上面的嵌套列表转换成 阅读全文
posted @ 2015-11-12 18:40 小泥巴2008 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 名词解释: 模块:一个程序文件 包:相当于一个类库,打包发布后相当于c#中的dll, 包中可包括若干个模块,比如main.py就是一个模块,对于test2文件下的所有模块组成一个包 对于一个包而言,注定是要被其它模块进行引用,所以需要一件初始化信息,比如包的路径,这些信息都是依赖包下的__init_ 阅读全文
posted @ 2015-11-12 15:30 小泥巴2008 阅读(4824) 评论(0) 推荐(0) 编辑
摘要: 1 #方法的参数定义和默认参数的定义 2 def ask_ok(prompt, retries=4, complaint='Yes or no, please!'): 3 while True: 4 ok = input(prompt) 5 if ok in ('y', 'ye', 'yes'): 6 ... 阅读全文
posted @ 2015-11-09 16:50 小泥巴2008 阅读(549) 评论(0) 推荐(0) 编辑
摘要: #if statement number=int(input("please input a number")); if number20: print("is yound older"); else: print("any one else") #for statement _strlist=["fjfsjf'","apple","shje"]; for it... 阅读全文
posted @ 2015-11-05 01:46 小泥巴2008 阅读(281) 评论(0) 推荐(0) 编辑
摘要: #我的第一个python程序 print("hello world"); #多行字符串 print("""\ Usage: thingy [OPTIONS] -h Display this usage message -H hostname Hostname to connect to """); #转... 阅读全文
posted @ 2015-11-05 01:42 小泥巴2008 阅读(357) 评论(0) 推荐(0) 编辑
摘要: 快速入门:十分钟学会Pythonhttp://python.jobbole.com/43922/python框架http://www.elias.cn/Python/HomePage#toc14[Python]多线程入门http://www.tuicool.com/articles/YvQRriip... 阅读全文
posted @ 2015-11-03 15:40 小泥巴2008 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 处理SQL Server 异常常用步骤 SQL Server常见的问题主要是SQL问题造成,常见的主要是CPU过高和阻塞。 一、CPU过高的问题 1、查询系统动态视图查询执行时间长的sql语句 WITH ProcessCTE(blocked) AS ( SELECT spid FROM sys.sy 阅读全文
posted @ 2015-10-30 16:17 小泥巴2008 阅读(1455) 评论(0) 推荐(0) 编辑
摘要: 平日工作中会写一些小的工具,但是使用log4net又过于大了些,感觉没有必要,所以就用记事本去记录一些系统日志 代码如下: 1 private static object objLock = new object(); // 读写文件锁 2 /// <summary> 3 /// 记录错误日志 4 阅读全文
posted @ 2015-10-21 11:26 小泥巴2008 阅读(601) 评论(0) 推荐(0) 编辑