10 2020 档案

摘要:$ cat checkserver.py #!/usr/bin/python # -*- coding: utf-8 -*- import os import socket import smtplib from email.mime.text import MIMEText from email. 阅读全文
posted @ 2020-10-16 11:28 lixinliang 阅读(181) 评论(0) 推荐(0) 编辑
摘要:使用 pip 命令来安装 mysql-connector: python -m pip install mysql-connector 开始演练: import mysql.connector mydb = mysql.connector.connect( host="192.168.10.10", 阅读全文
posted @ 2020-10-14 17:02 lixinliang 阅读(342) 评论(0) 推荐(0) 编辑
摘要:#父类Person class Person(): def __init__(self,name,age,hair): self.name = name self.age = age self.hair = hair def talk(self): print("Person is talking 阅读全文
posted @ 2020-10-13 19:20 lixinliang 阅读(873) 评论(0) 推荐(0) 编辑
摘要:class Person: #类名称 a = 0 #初始化一个起始值 def __init__(self,name,height,weight): #类的初始化,第一个参数必须是 self,后面参数分别表示为 名称,身高,体重 self.name = name #访问对应的变量 self.heigh 阅读全文
posted @ 2020-10-13 17:17 lixinliang 阅读(228) 评论(0) 推荐(0) 编辑
摘要:import requests from pyquery import PyQuery as pq import time import os import random #自定义header header = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10. 阅读全文
posted @ 2020-10-10 23:05 lixinliang 阅读(120) 评论(0) 推荐(0) 编辑
摘要:$ cat /etc/docker/daemon.json { "default-ulimits":{ "nofile":{ "Name":"nofile", "Hard":864000, "Soft":864000 } }, "log-driver":"json-file", "log-opts" 阅读全文
posted @ 2020-10-09 16:38 lixinliang 阅读(309) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示