05 2022 档案
摘要:# -*- coding: utf-8 -*-import paramiko# @Singletonclass SSHLinuxClient(object): def __init__(self, hostname, port, username, password, key_filename):
阅读全文
摘要:https://www.cnblogs.com/xiao-xue-di/p/15934566.html
阅读全文
摘要:yum update yum install -y yum-utils device-mapper-persistent-data lvm2 yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/
阅读全文
摘要:# 类装饰器 类实现单例模式def singleton(cls): _instance = {} def _singleton(*args, **kwargs): if cls not in _instance: _instance[cls] = cls(*args, **kwargs) retur
阅读全文
摘要:# -*- coding: utf-8 -*-import paramikoSSH_HOST = '192.168.1.130'SSH_PORT = 22SSH_USERNAME = 'root'SSH_PASSWORD = 'Aa753951123'class SSHLinuxClient(obj
阅读全文
摘要:import osdef create_models(): db_url = "mysql+pymysql://root:password@localhost:3306/test?charset=utf8mb4" project_path = os.getcwd() print(project_pa
阅读全文
摘要:import datetimeclass SerializrAbleMixin(object): """A SQLAlchemy mixin class that can serialize itself as a JSON object""" # args 自定义序列化字段 is_except 序
阅读全文
摘要:def test3(int1): if int1 > 2: int1 = int1 - 2 int1 = int1 / 2 test3(int1) return int1if __name__ == '__main__': print(test3(20))答案:9.0
阅读全文
浙公网安备 33010602011771号