会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
魏桐
博客园
首页
新随笔
联系
订阅
管理
1
2
3
4
下一页
2017年11月16日
Python3-笔记-numpy学习指南-002-基础
摘要: # numpy的数据类型,类型转换,占用内存字节数f64 = numpy.float64(42)print(f64, type(f64), f64.dtype, f64.dtype.itemsize)i8 = numpy.int8(42.0)print(i8, type(i8), i8.dtype,
阅读全文
posted @ 2017-11-16 13:19 魏桐
阅读(3087)
评论(0)
推荐(2)
2017年11月14日
Python3-笔记-E-015-库-subprocess子进程
摘要: import subprocesscalcProc = subprocess.Popen('c:\\Windows\\System32\\calc.exe')subprocess.Popen(['C:\\Windows\\notepad.exe', 'C:\\hello.txt']) 带有参数sub
阅读全文
posted @ 2017-11-14 13:31 魏桐
阅读(243)
评论(0)
推荐(0)
Python3-笔记-E-014-库-threading线程
摘要: import threading, timeprint('Start of program.')def takeANap(): time.sleep(5) print('Wake up!')threadObj = threading.Thread(target=takeANap)threadObj.
阅读全文
posted @ 2017-11-14 13:18 魏桐
阅读(109)
评论(0)
推荐(0)
Python3-笔记-E-013-库-Python的时间函数总结
摘要: 在Python 中,日期和时间可能涉及好几种不同的数据类型和函数。下面回顾了表示时间的3 种不同类型的值: Unix纪元时间戳(time模块中使用)是一个浮点值或整型值,表示自 1970年1月 1日午夜 0点(UTC)以来的秒数。 datetime 对象(属于datetime 模块)包含一些整型值,
阅读全文
posted @ 2017-11-14 11:45 魏桐
阅读(249)
评论(0)
推荐(0)
2017年11月10日
Python3-笔记-E-012-库-JSON
摘要: import json, pprint# 支持的类型:字典、列表、整型、浮点型、字符串、布尔型或Nonedef LoadsAndDumps(): stringOfJsonData = '{"name": "Zophie", "isCat": true, "miceCaught": 0, "felin
阅读全文
posted @ 2017-11-10 15:43 魏桐
阅读(219)
评论(0)
推荐(0)
Python3-笔记-E-011-库-CSV
摘要: import csv, pprintdef ReadFile2List(): file = open('example.csv') reader = csv.reader(file) data = list(reader) pprint.pprint(data) print(data[0][2])
阅读全文
posted @ 2017-11-10 10:52 魏桐
阅读(262)
评论(0)
推荐(0)
2017年10月31日
OGR 数据模型
摘要: 2013年10月10日 2015年3月30日修正坐标参考模型 1 OGR几何对象模型OGRGeometry 1.1 Geometry 几何图形,最基本的地图图形。注意:包含空间参考。 其它所有的地图图形都是由本类派生出来的。 包含了通用的属性和方法。 注意:空间操作的部分需要GEOS支持,如果没有G
阅读全文
posted @ 2017-10-31 11:28 魏桐
阅读(2058)
评论(0)
推荐(0)
2017年10月26日
Python3-笔记-F-001-组织文件
摘要: import shutil, os, zipfile # 复制、移动、改名、删除文件与文件夹 #shutil.copy('e:\\111\\key.txt', 'd:\\111\\') # copy文件 #shutil.copytree('e:\\111', 'd:\\111\\aaa') # co
阅读全文
posted @ 2017-10-26 15:42 魏桐
阅读(271)
评论(0)
推荐(0)
Python3-笔记-E-010-库-漂亮打印(这个是谁给翻译的名字吖。。。)pprint
摘要: import pprint#格式化打印message = 'It was a bright cold day in April, and the clocks were striking thirteen.'count = {}for character in message: count.setd
阅读全文
posted @ 2017-10-26 13:31 魏桐
阅读(413)
评论(0)
推荐(0)
Python3-笔记-E-008-库-字典序列化shelve
摘要: import shelve# shelve_demo.py 持久性字典:Python对象的持久化# 键值对形式, 将内存数据通过文件持久化, 值支持任何pickle支持的Python数据格式# 与pickle的主要区别是键值对方式, 并且在目录下生成三个文件class Person(object):
阅读全文
posted @ 2017-10-26 11:41 魏桐
阅读(301)
评论(0)
推荐(0)
1
2
3
4
下一页
公告