PDF中提取图片

  1. 安装库
C:\Users\*****>pip install pymupdf
Collecting pymupdf
  Downloading PyMuPDF-1.17.5-cp38-cp38-win_amd64.whl (5.1 MB)
     |████████████████████████████████| 5.1 MB 273 kB/s
Installing collected packages: pymupdf
Successfully installed pymupdf-1.17.5

C:\Users\*****>
  1. python 脚本
import fitz
import time
import re
import os

def pdf2pic(path, pic_path …
点击查看更多…

AD 密码过期查询

  1. 单个AD 账号查询
net user %USERNAME% /domain

例如:

PS C:\Windows\system32> net user lansz /domain
这项请求将在域 jx.cn 的域控制器处理。

用户名                 lansz
全名                   Lan ShunZhou
注释                   兰顺舟 …
点击查看更多…

office 激活

office 2019
转换成 vol版本出现报错
C:\Program Files\Microsoft Office\Office16>cscript ospp.vbs /rearm
Microsoft (R) Windows Script Host Version 5.812
版权所有(C) Microsoft Corporation。保留所有权利。

---Processing--------------------------
---------------------------------------
There was an error when trying to rearm Office. You can try …
点击查看更多…

ngxtop 报错

[root@**** ~]# ngxtop
Traceback (most recent call last):
  File "/usr/local/bin/ngxtop", line 7, in
    from ngxtop.ngxtop import main
  File "/usr/local/lib/python3.6/site-packages/ngxtop/ngxtop.py", line 77, in
    from config_parser import detect_log_config, detect_config_path, extract_variables, build_pattern
ModuleNotFoundError: No module named 'config_parser'
解决方法:
卸 …
点击查看更多…

Python 复制文件到新的路径

import shutil

path = 'd:\11111\test.py'

newpath = 'd:\2222\test.py'

shutil.copy(path, newpath)

点击查看更多…