09 2021 档案
摘要:serial和deque模块 import sys import time import re from collections import deque try: import serial.tools.list_ports PYSERIAL_INSTALLED = True except Imp
阅读全文
摘要:正则表达式修饰符 - 可选标志 正则表达式可以包含一些可选标志修饰符来控制匹配的模式。修饰符被指定为一个可选的标志。多个标志可以通过按位 OR(|) 它们来指定。如 re.I | re.M 被设置成 I 和 M 标志: 修饰符 描述 re.I 使匹配对大小写不敏感 re.L 做本地化识别(local
阅读全文
摘要:import serial import sys from time import sleep import time TELNET_RETURN = "\n" try: ser = serial.Serial("COM11", 115200,timeout=0, parity=serial.PAR
阅读全文
摘要:textfsm # py from textfsm import TextFSM output = ''' N7K# show vlan VLAN Name Status Ports 1 default active Eth1/1, Eth1/2, Eth1/3 Eth1/5, Eth1/6, Et
阅读全文
摘要:def open_telnet_connection(ip_address, port=3000): socket.setdefaulttimeout(3) try: session = telnetlib.Telnet(ip_address, int(port)) except (Connecti
阅读全文
摘要:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Guide/Regular_Expressions https://blog.csdn.net/csm0912/article/details/81206848 (?:x) 匹配 'x'
阅读全文
摘要:毫瓦->dbm 0dBm=1mW dbm = 10*math.log(毫瓦,10) # python 实现 dbm = 10*math.log(1,10) dbm->瓦 W=(power(10,dBm/10))/1000 # python 实现 w = math.pow(10,dBm/10)/100
阅读全文
摘要:import time res = [(time.sleep(1),print(i)) for i in range(10)] print(res) ''' [(None, None), (None, None), (None, None), (None, None), (None, None),
阅读全文
摘要:from sympy import var, plot_implicit var('x y ') plot_implicit((x**2+(-y)**2-1)**3+x**2*(-y)**3)
阅读全文
摘要:MCS Modulation and Coding Scheme (MCS) # 基础 1. a symbol is defined as Resource Element (RE) and MCS defined as how many useful bits can be transmitted
阅读全文
摘要:master_node = { '1': ['a', 'd'], '2': ['a', 'd'], '4': ['a', 'd']} agent_dict = { '2': ['b', 'f'], '3': ['b', 'f'], '4': ['b', 'f'], } agent_dict = {*
阅读全文
摘要:math >>> import math >>> math.log(4,2) 2.0 >>> sympy【解方程】 # 1 一元方程 import sympy # 引入解方程的专业模块sympy x = sympy.symbols("x") # 申明未知数"x" a = sympy.solve([x
阅读全文
浙公网安备 33010602011771号