2017年10月18日

python基本语法1.4--初识爬虫

摘要: import requests import time import xml.etree.ElementTree as ET from multiprocessing.dummy import Pool as ThreadPoo; from xml.parsers.expat import ParserCreate class DefaultSaxHandler(object): d... 阅读全文

posted @ 2017-10-18 23:30 小嘤嘤 阅读(344) 评论(0) 推荐(0) 编辑

python基本语法1.5--调用numpy库的性能影响

摘要: import timeit sum_by_for = """ for d in data: s += d """ sum_by_sum = """ sum(data) """ sum_by_numpy_sum = """ import numpy numpy.sum(data) """ def timeit_using_list(n, loops): list_setup... 阅读全文

posted @ 2017-10-18 23:30 小嘤嘤 阅读(305) 评论(0) 推荐(0) 编辑

python基本语法1.3--注释说明以及空格说明

摘要: # -*- coding: utf-8 -*-#或者写成下面这种形式 # coding: utf-8 #注意空格的对齐try: x = 100 y = 200 except IndentationError: print('IndentationError: unexpected indent') # 单行注释 ''' 多行注释 多行注释 ''' # 多行代码 st... 阅读全文

posted @ 2017-10-18 23:27 小嘤嘤 阅读(857) 评论(0) 推荐(0) 编辑

python基本语法1.2--数的移位及与或抑或相关计算

摘要: #便于中文的显示# -*- coding: utf-8 -*- #指数表示 # a ** b power(a, b) print(10 ** 2) #100 print(10 ** 2.5) #316.22776601683796 #做除法 # //: 返回商的整数部分 print(23 // 5) #4 print(28.7 // 4.4) #6.0 #>向右移位做除法 print(16... 阅读全文

posted @ 2017-10-18 23:25 小嘤嘤 阅读(444) 评论(0) 推荐(0) 编辑

python基本语法1.1--十进制与十六进制数之间的相互转换

摘要: #大端与小端print((1024).to_bytes(2, byteorder = 'big')) print((65536).to_bytes(8, byteorder = 'little'))#有符号与无符号 print((-1024).to_bytes(4, byteorder = 'big', signed = True))#b'\xff\xff\xfc\x00' print((-10... 阅读全文

posted @ 2017-10-18 23:20 小嘤嘤 阅读(23895) 评论(0) 推荐(0) 编辑

mnist深入--用卷积神经网络改善mnist

摘要: 文章链接: http://blog.csdn.net/yhl_leo/article/details/50624471 训练结果准确率为0.9318 训练优化方法修改为梯度下降算法: 训练结果准确率为0.9925 阅读全文

posted @ 2017-10-18 22:20 小嘤嘤 阅读(847) 评论(1) 推荐(0) 编辑

导航