
python学习
decan5958
daydayup!
展开
-
BLE低功耗蓝牙与经典蓝牙的区别,做蓝牙模块开发必须要了解的知识!
BLE低功耗蓝牙与经典蓝牙的区别,做蓝牙模块开发必须要了解的知识!基本知识:https://cloud.tencent.com/developer/article/1602370https://www.jianshu.com/p/d991f0fdec63BLE例子:http://ianharvey.github.io/bluepy-doc/scanentry.html下面这个文章讲的很好https://blog.lao-yuan.com/2018/08/05/python-BLE原创 2021-01-07 14:22:16 · 561 阅读 · 0 评论 -
Numpy库部分函数使用
在深度学习中经常用到Numpy、scipy以及Matplotlib三大库,Numpy、scipy主要用于数值计算,Matplotlib数据可视化。前面学习了python的基本知识,感觉看一些项目代码还是没有看的很明白,其中这里有几个Numpy的函数,在这里记录下。from numpy import *import numpy as np#包含5个元素的向量x = array([3, 1, 2原创 2017-08-08 16:31:42 · 290 阅读 · 0 评论 -
python学习
在学习python,看的是python基础教程(第二版)。结合自己看书以及在上机操作的一些理解,对代码做了一些注释,也方便自己复习查阅,也希望得到交流指正。把每一个实例都进行了验证,代码都是可以跑的,#构造方法_metaclass_= type #新式类class FooBar: def _init_(self): #创建构造方法原创 2017-08-02 17:28:32 · 263 阅读 · 0 评论 -
python学习--正则表达式
看到一个华南理工大学的大牛写的python,非常漂亮,然后膜拜了一下。正则表达太强大了,以后还得继续好好学https://docs.python.org/2/library/re.html#re.compile。import re# ^表示首行rule = r"^hello" print re.findall(rule,"hello cow cat hello")原创 2017-08-03 17:54:57 · 562 阅读 · 0 评论 -
python学习--文件、标准库、异常处理
#文件#touch read.txt#Welcome to this file#There is nothing here except#This stupid haiku#open()打开文件 read()读取文件f = open(r'./read.txt')print f.read(7) #Welcomprint f.read(4)原创 2017-08-04 10:18:12 · 346 阅读 · 0 评论 -
python学习(基础补充)--字符串、列表、元组
# \ 转义引号print "he isn't a boy!" #return he isn't a boy!print 'he isn't a boy!' #return invalid syntaxprint 'he isn\'t a boy!' #return he isn't a boy!#字符拼接print "hello, " + "world!"原创 2017-08-04 15:36:07 · 307 阅读 · 0 评论 -
python学习(基础补充)--字典、条件语句、循环
#建立字典items = [('name', 'hdb'), ('age', 42)]d = dict(items)print d #{'age': 42, 'name': 'hdb'}d = dict(name = 'hdb', age = 42)print d #{'age': 42, 'name': 'h原创 2017-08-05 21:10:04 · 408 阅读 · 2 评论