L08※定时执行文件
1> 设置个人任务调度 crontab -e 30 8 * * * /usr/local/anaconda3/bin/python3 /data/jupyter/scrapy/weather.py 项目含义范围第一个*一小时当中的第几分钟0-59第二个*一天当中的第几个小时...
L24※Centos 升级gcc版本
1> 卸载原来的旧版本 ① 查看当前的版本号 rpm -q gcc ② 卸载掉旧版本 rpm -e [上一步查到的版本号] ③ 如果上一步报错 error: Failed dependencies: gcc = 4.8.5-44.el7 is needed by ...
N17※Win11右键默认显示更多选项
1> 打开终端 首先用鼠标右键点击“开始”按钮(或者按Win+X键),选择点击 “Windows 终端(管理员) 2> 输入下列代码 reg.exe add 'HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a5...
L35※设置或删除swap虚拟内存
1> 创建swap文件 ① 创建 Swap 文件 #创建swap文件,分区大小为4G sudo dd if=/dev/zero of=/swapfile count=4096 bs=1M ② 激活 Swap 文件 sudo chmod 600 /swapfile sudo mkswap /swapfile ③...
N34※国内外公共DNS汇总
1> 国内公共DNS 供应商IPV4IPV6DOHDOT阿里云223.5.5.5223.6.6.62400:3200::12400:3200:baba::1https://dns.alidns.com/dns-queryhttps://223.5.5.5/dns-queryhttps://223.6.6.6/dns-querydns...
L50※开启nginx浏览目录及美化
1> 下载fancyindex模块 cd /usr/local wget https://hub.condor.vip/ngx-fancyindex/ngx-fancyindex-0.5.2.tar.xz tar xvf ngx-fancyindex-0.5.2.tar.xz 2> 重新编译nginx 添加ngx-fancyi...
N29※flask 编写后端api
1> 第一个程序 from flask import Flask app = Flask(__name__) @app.route('/') def hello(): return 'hello,world@' 2> 路由配置 ① 使用装饰器 @app.route(url_name, methods) ② 使用...
N33※修复windows 系统
以管理员身份运行Windows PowerShell Dism /Online /Cleanup-Image /ScanHealth Dism /Online /Cleanup-Image /CheckHealth DISM /Online /Cleanup-image /RestoreHealth sfc /SCANNOW 重启电脑...
N27※python脚本
1> 一段时间内只允许调用1次函数 import time def once_per_period(period): def decorator(func): last_called = 0 def wrapper(*args, **kwargs): nonlocal last_called now = time.time()...
L47※debian关闭ipv6服务
vim /etc/sysctl.conf net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 sysctl -p