摘要: 通过 dir 方法 可以查看 dir(obj) 如果是自定义类生成的对象,可以通过 __dict__ 属性来查看, class Test(): ''' this is document ''' x=1 def __init__(self,name,age): self.name=name self. 阅读全文
posted @ 2022-07-13 10:44 Orientation 阅读(263) 评论(0) 推荐(0) 编辑
摘要: socket 实现 tcp server import socket soc=socket.socket() #默认 family=-1,type=-1, proto=-1, fileno=None ''' if fileno is None: if family == -1: family = A 阅读全文
posted @ 2022-07-12 20:00 Orientation 阅读(243) 评论(0) 推荐(0) 编辑
摘要: import serial ser= serial.Serial('/dev/ttyAMA0',9600)ser.write('hello world'.encode('ascii'))data_len = ser.inWaiting()ser.read(data_len) 阅读全文
posted @ 2022-07-12 19:28 Orientation 阅读(451) 评论(0) 推荐(0) 编辑
摘要: openpyxl 用法实例 import requests import openpyxl import json import time res = requests.request('GET', 'http://1.2.32.2:23/data/getsites') text = res.tex 阅读全文
posted @ 2022-07-12 19:24 Orientation 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 运算符 + - * / 1+1.0 = 2.0 5/3=1, 5/3.0=1.6667(python2, C) 5/3=1.6667(python3) 数据类型: 基本类型:(int,float,string,bool,enum) 构造类型:数组类型,结构类型,联合类型 阅读全文
posted @ 2022-05-10 14:12 Orientation 阅读(18) 评论(0) 推荐(0) 编辑
摘要: ssh server 配置文件 所在目录 /etc/ssh/sshd_config ,中有个 permitrootlogin 选项,取消注释并修改成yes 阅读全文
posted @ 2022-05-07 00:03 Orientation 阅读(128) 评论(0) 推荐(0) 编辑
摘要: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32 NO_PUBKEY 871920D1991BC93C 解决办法 apt- 阅读全文
posted @ 2022-05-06 23:55 Orientation 阅读(1440) 评论(0) 推荐(0) 编辑
摘要: path = $(cd $(dirname $0); pwd)解析: 1、取当前运行脚本的所在路径: $0 2、取当前脚本所在路径的父目录: dirname 3、取返回的父目录的值: $(dirname $0) 4、cd到返回的父目录: cd “$(dirname “$0”)” 5、输出地址: $( 阅读全文
posted @ 2022-04-26 21:43 Orientation 阅读(361) 评论(0) 推荐(0) 编辑
摘要: docker 常用命令 To get more help with docker, check out our guides at https://docs.docker.com/go/guides/->会重定向至首页,可直接访问 https://docs.docker.com/reference/ 阅读全文
posted @ 2022-04-24 23:39 Orientation 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 中继器(RP repeater)是连接网络线路的一种装置,常用于两个网络节点之间物理信号的双向转发工作。 中继器是最简单的网络互联设备,主要完成物理层的功能,负责在两个节点的物理层上按位传递信息,完成信号的复制、调整和放大功能,以此来延长网络的长度。由于存在损耗,在线路上传输的信号功率会逐渐衰减,衰 阅读全文
posted @ 2022-02-17 10:39 Orientation 阅读(1637) 评论(0) 推荐(0) 编辑