相关文章
python 通过SSHTunnelForwarder隧道连接redis的方法
背景:我司Redis服务器使用的亚马逊服务,本地需要通过跳板机,然后才有权限访问Redis服务。 连接原理:使用SSHTunnelForwarder模块,通过本地22端口ssh到跳板机,...
Python读取txt某几列绘图的方法
晚上帮同学用Python脚本绘图,大概需求是读取一个txt文件的两列分别作为x和y的值,绘图即可,代码如下: #coding:utf-8 import numpy as np imp...
对python中assert、isinstance的用法详解
1. assert 函数说明: Assert statements are a convenient way to insert debugging assertions into a...
基于Python实现迪杰斯特拉和弗洛伊德算法
图搜索之基于Python的迪杰斯特拉算法和弗洛伊德算法,供大家参考,具体内容如下 Djstela算法 #encoding=UTF-8 MAX=9 ''' Created on 20...
一看就懂得Python的math模块
math模块 # 数学相关模块 import math r = math.floor(3.2) # 向下取整 print(r) r = math.ceil(4.5) # 向上取整...