2022年10月26日

Linux下挂载lvm卷

摘要: 1、首先查看lvm卷,使用pvs 2、查看卷组中的逻辑卷lvdisplay 《volume-group-name》 3、挂载:mount LV Path/lv_name 阅读全文

posted @ 2022-10-26 15:19 秋不语 阅读(143) 评论(0) 推荐(0)

Debian U盘安装需要下载和替换的文件

摘要: 一、从网络安装 从http://http.us.debian.org/debian/dists/jessie/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz 和netboot/debian-in 阅读全文

posted @ 2022-10-26 15:18 秋不语 阅读(254) 评论(0) 推荐(0)

Python 数据库连接 excel 读写 日期

摘要: 1、连接数据库: import pymysql db = pymysql.connect("localhost","username","password","database_name") cursor = db.cursor **获得数据库游标** **写sql语句** sql = """ cr 阅读全文

posted @ 2022-10-26 10:23 秋不语 阅读(291) 评论(0) 推荐(0)

爬虫

摘要: bs4 aa = bs('r','lxml')div = aa.find('div',class_="values").textli = aa.select(".classname > ul > li ") xpath from lxml import etreetree = etree.HTML( 阅读全文

posted @ 2022-10-26 10:19 秋不语 阅读(224) 评论(0) 推荐(0)

2022年2月20日

python 多线程

摘要: 导入包: from threading import Thread 调用方法与多进程基本相同 与进程区别: 进程:多用于计算密集型,每个进程独立使用一部分内存等资源,占用资源多 线程:多用于io密集型,多个线程共同使用同一个进程的资源,占用资源更少 阅读全文

posted @ 2022-02-20 22:25 秋不语 阅读(26) 评论(0) 推荐(0)

python 多进程与进程池

摘要: 多进程: 导入包:from multiprocessing import Process, Queue,Manager 函数式使用法: def abc(abc,bcd): print(abc,bcd) return abc,bcd 基本调用: res = Process(target=abc,arg 阅读全文

posted @ 2022-02-20 10:46 秋不语 阅读(290) 评论(0) 推荐(0)

2022年1月31日

python AES加密

摘要: 使用的包: pycryptodome 安装 pip install pycryptodome 导入 : from Crypto.Cipher import AES import base64 import random import secrets 基本参数 mode = 2 # mode 1:EC 阅读全文

posted @ 2022-01-31 09:55 秋不语 阅读(1439) 评论(0) 推荐(0)

2022年1月26日

python rsa加密

摘要: rsa 加密,是一个非对称加密,python中有多个 库可以使用,在此使用rsa库存 pip install rsa 假如使用4096 bit的密钥, 加密时每次可加密的字符长度是4096/8-11=501bytes,加上自身带的11bytes数据, 加密后的密文长度是512bytes 密钥长度越长 阅读全文

posted @ 2022-01-26 20:43 秋不语 阅读(2026) 评论(0) 推荐(0)

python zip压缩与解压

摘要: 使用的模块:zipfile import zipfile 压缩: 生成zipfile对象: fs = zipfile.ZipFile(targetfilepath,'w,zipfile.ZIP_LZMA) targetfilepath:压缩后的文件路径,带文件名 ZIP_LZMA:压缩算法,该算法比 阅读全文

posted @ 2022-01-26 17:32 秋不语 阅读(847) 评论(0) 推荐(0)

2022年1月6日

Linux Nginx 虚拟主机 日志配置 访问控制与认证 状态监控

摘要: Nginx虚拟主机 1、基于多IP的方式 [root@web01 conf.d]# cat game2.conf server { listen 80; server_name 192.168.15.7; location / { root /opt/Super_Marie; index index 阅读全文

posted @ 2022-01-06 21:28 秋不语 阅读(66) 评论(0) 推荐(0)

导航