会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
andrew.elec90
博客园
首页
新随笔
联系
管理
订阅
2014年11月21日
python学习笔记(6)——fileIO
摘要: 1、open&argument 1 my_file = open("output.txt", "w") hint:You can open files in write-only mode ("w"), read-only mode ("r"), readandwrite mode ("r+"...
阅读全文
posted @ 2014-11-21 00:19 andrew.elec90
阅读(276)
评论(0)
推荐(0)
2014年11月20日
python学习笔记(5)—— class
摘要: 1、空class,占空间1 class Animal(object):2 pass 2、定义__init__()空1 class Animal(object):2 def __init__():3 pass 3、declare nameclass Animal...
阅读全文
posted @ 2014-11-20 21:19 andrew.elec90
阅读(204)
评论(0)
推荐(0)
python学习笔记(3)—— 进制
摘要: python中使用二进制也很方便 1、表示1 one = 0b12 two = 0b103 three = 0b11 2、操作1 print 5 >> 4 # Right Shift2 print 5 << 1 # Left Shift3 print 8 & 5 # Bitwise ...
阅读全文
posted @ 2014-11-20 17:59 andrew.elec90
阅读(125)
评论(0)
推荐(0)
python学习笔记(3)—— dict&tuple&somthing advance
摘要: 1、item1 my_dict ={'a':1,'b':2}2 print my_dict.items()3 4 [('a', 1), ('b', 2)] 2、keys,values1 my_dict ={'a':1,'b':2}2 print my_dict.keys()3 print my...
阅读全文
posted @ 2014-11-20 17:30 andrew.elec90
阅读(120)
评论(0)
推荐(0)
2014年11月19日
aa
摘要: 转义字符\from datetime import datetimenow = datetime.now()now.year(day,month,hour,minute,second)notis evaluated first;andis evaluated next;oris evaluated ...
阅读全文
posted @ 2014-11-19 18:03 andrew.elec90
阅读(149)
评论(0)
推荐(0)
机器学习(2)—— matplotlib
摘要: python34 中绘图基本是matplotlib库,基于matplotlib库可以绘制基本的图形。 1、基本绘图 (1)点图(data:http://pan.baidu.com/s/1i3L0UDB) 1 import matplotlib.pyplot as plt 2 import m...
阅读全文
posted @ 2014-11-19 14:38 andrew.elec90
阅读(163)
评论(0)
推荐(0)
机器学习(1)——pyhton34 matplotlib与numpy安装
摘要: matplotlib,numpy,scipy是做数据挖掘的基本python库,在安装时我碰到了不少麻烦,尤其是在python 3.4中。 按照如下顺序安装1,2,3,import matplotlib库出现问题时依次安装4,5,6可以解决问题。1、numpy-1.8.1-win32-super...
阅读全文
posted @ 2014-11-19 14:12 andrew.elec90
阅读(224)
评论(0)
推荐(0)
2014年11月15日
Python学习笔记(2)——对象类型
摘要: 内置对象包括数字(123,1.2)、字符串(‘aaa’)、列表([])、字典({'a':'b','c':'d'})、元组(())、文件(fid=open(‘’,‘r’))、集合(set(‘abc’))、BOOL量等。 1、字符串 (1)字符串索引从0开始,正向索引从左边开始,反向索引从右边开...
阅读全文
posted @ 2014-11-15 22:06 andrew.elec90
阅读(214)
评论(0)
推荐(0)
Python学习笔记(1)——if,while及函数
摘要: 最近因为学习Bag of Visterms,发现很多算法国外都用python编写,所以开始学习python。对于一个没基础的人来说,学习哪个版本的python,貌似知乎上也没一个好的说法,索性学习python 3,正好从华章拿了一本learning python,恰好有2和3的区别,可以更好的学习...
阅读全文
posted @ 2014-11-15 17:05 andrew.elec90
阅读(239)
评论(0)
推荐(0)
公告