1 line
17 KiB
JSON
1 line
17 KiB
JSON
[{"title":"Python证书链出问题导致的模块全部报错","date":"2024-10-30T14:57:27.000Z","url":"/2024/10/30/Python%E8%AF%81%E4%B9%A6%E9%93%BE%E5%87%BA%E9%97%AE%E9%A2%98%E5%AF%BC%E8%87%B4%E7%9A%84%E6%A8%A1%E5%9D%97%E5%85%A8%E9%83%A8%E6%8A%A5%E9%94%99/","tags":[["技术","/tags/%E6%8A%80%E6%9C%AF/"]],"categories":[["技术","/categories/%E6%8A%80%E6%9C%AF/"]],"content":"记录一下,解决办法很简单,网上都是废话: 设置,需要注意的是certifi不是标准库,需要额外安装: 大功告成"},{"title":"Mac安装软件时提示已损坏的解决办法","date":"2024-10-09T08:29:29.000Z","url":"/2024/10/09/Mac%E5%AE%89%E8%A3%85%E8%BD%AF%E4%BB%B6%E6%97%B6%E6%8F%90%E7%A4%BA%E5%B7%B2%E6%8D%9F%E5%9D%8F%E7%9A%84%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95/","tags":[["技术","/tags/%E6%8A%80%E6%9C%AF/"]],"categories":[["技术","/categories/%E6%8A%80%E6%9C%AF/"]],"content":"APP损坏主要有4个原因1、没有允许任何来源的应用;2、应用程序内容中的一项没有变成unix文件;3、这个应用的安全隔离属性未移出;4、app本身出错了;其中前3个可以解决,最后一个只能再换个网站下载 方法一1、打开系统偏好设置,找到安全性与隐私,打开后找到通用,然后点击小锁,输入密码2、如果你的系统有“任何来源”这个选项,那就点击任何来源3、如果没有,那就打开终端4、输入以下代码,再按回车,输入密码,注意:你输入的密码不会显示,输完密码在安按回车sudo spctl --master-disable5、这时候,再重新打开系统偏好设置,就可以看到任何来源了设置完成后,再次打开应用,如果还是损坏,就请参见方法二 方法二1、如果已经设置了任何来源,仍然无法打开,那么我们在这个app文件上点击右键,选择“显示包内容”,然后依次打开Contents文件夹、MacOS文件夹2、如果图标上没有“exec”四个字,就打开终端,输入以下代码:chmod -x3、注意:“ -x ”的前后都有空格。输入完代码,再把这个未知文件拖进终端,终端里面就会显示这个文件的路径4、然后按回车,这个时候,你会发现,原本的未知文件变成了unix文件这个时候,再次打开应用,就可以正常运行了 方法三前面的方法都尝试了,还是打不开,怎么办?在终端中输入这串代码xattr -r -d com.apple.quarantine把app文件拖动进来,最后回车,就可以正常运行了 鸣谢原文:"},{"title":"摄影作品:Field","date":"2023-07-18T15:46:00.000Z","url":"/2023/07/18/%E6%91%84%E5%BD%B1%E4%BD%9C%E5%93%81-Field/","tags":[["摄影","/tags/%E6%91%84%E5%BD%B1/"]],"categories":[["摄影","/categories/%E6%91%84%E5%BD%B1/"]],"content":"使用协议 CC-BY-SA 4.0 授权使用本图像相片详细参数参建元数据"},{"title":"Python 中关于 round 函数的小坑","date":"2023-02-25T08:26:49.000Z","url":"/2023/02/25/Python-%E4%B8%AD%E5%85%B3%E4%BA%8E-round-%E5%87%BD%E6%95%B0%E7%9A%84%E5%B0%8F%E5%9D%91/","tags":[["技术","/tags/%E6%8A%80%E6%9C%AF/"]],"categories":[["技术","/categories/%E6%8A%80%E6%9C%AF/"]],"content":"遇到的小坑,round(10.5)得到的结果是10,很疑惑,查了一下资料,总结一下: round的结果跟python版本有关这是Python 2: 这是Python3: 为什么? 看一下文档: Values are rounded to the closest multiple of 10 to the power minus ndigits; if two multiples are equally close, rounding is done away from 0. 这是Python2.7的文档,可以看到这里是真正意义上的四舍六入。但到了Python3就变成了这样: Values are rounded to the closest multiple of 10 to the power minus ndigits; if two multiples are equally close, rounding is done toward the even choice. 此时,如果距离两边一样远,会保留到偶数的一边。比如round(0.5)和round(-0.5)都会保留到0,而round(1.5)会保留到2。"},{"title":"PVE LXC容器与宿主机共享目录","date":"2023-02-05T16:03:00.000Z","url":"/2023/02/06/PVE-LXC%E5%AE%B9%E5%99%A8%E4%B8%8E%E5%AE%BF%E4%B8%BB%E6%9C%BA%E5%85%B1%E4%BA%AB%E7%9B%AE%E5%BD%95/","tags":[["技术","/tags/%E6%8A%80%E6%9C%AF/"]],"categories":[["技术","/categories/%E6%8A%80%E6%9C%AF/"]],"content":"需求:PVE宿主机上有一个Raid阵列,希望把所有的服务数据放在里面服务主机都是LXC容器解决方案:使用pct命令添加挂载点 (Mount Point),这个功能只能用命令实现,例如:pct set 100 -mp0 /shared,mp=shared 100代表LXC容器的编号, mp0为递增,后续再添加就是1、2、3等,以此类推/shared 代宿主机上要共享的目录,mp= 后面跟的 shared 是LXC容器内的目录上述命令会将宿主机的 /shared 目录挂载到LXC容器内的 /shared 目录上"},{"title":"PVE修改主机名遇到的一些问题","date":"2023-02-05T16:02:43.000Z","url":"/2023/02/06/PVE%E4%BF%AE%E6%94%B9%E4%B8%BB%E6%9C%BA%E5%90%8D%E9%81%87%E5%88%B0%E7%9A%84%E4%B8%80%E4%BA%9B%E9%97%AE%E9%A2%98/","tags":[["技术","/tags/%E6%8A%80%E6%9C%AF/"]],"categories":[["技术","/categories/%E6%8A%80%E6%9C%AF/"]],"content":"起因事情是这样的,因为打算换新服务器,然后打算沿用老的服务器的主机名,但是要做阵列之类的,老的操作系统就不用了,于是就需要临时的改掉老服务器的主机名防止冲突。 期间遇到很多问题,发现PVE修改主机名需要注意很多不同的细节问题,在这边作此篇记录一下,顺便分享一下自己的经验 经过第一步:修改Linux的主机名修改 /etc/hostname 中的主机名 第二步:修改PVE本地环路主机名修改 /etc/hosts 中的本地环路主机名,它看起来应该是这样的: 第三步:如果构建了集群,还需要修改集群同步文件注意:千万不要改成集群内存在过的节点的名字!!!!不要问我为什么!!!! :(修改 /etc/corosync/corosync.conf 内的主机名,将所有原有的老主机名替换成新的 随后执行重启命令 systemctl restart corosync 最后工作:重启相关服务 大功告成!"},{"title":"飞机注册号识别:初论","date":"2023-02-03T17:37:51.000Z","url":"/2023/02/04/%E9%A3%9E%E6%9C%BA%E6%B3%A8%E5%86%8C%E5%8F%B7%E8%AF%86%E5%88%AB%EF%BC%9A%E5%88%9D%E8%AE%BA/","tags":[["技术","/tags/%E6%8A%80%E6%9C%AF/"]],"categories":[["技术","/categories/%E6%8A%80%E6%9C%AF/"]],"content":"原文概要:Aircraft registration number recognition can be used in the fields of photo classification and rapid detection of aircraft flight information, providing convenient automation solutions for these fields. This study synthesizes the problems of object recognition, character recognition, sorting and retrieval of messy data, and puts forward reasonable solutions for these problems. Finally, a computer vision system based on deep learning and global aircraft database retrieval were realized, which can automatically identify the aircraft in the image and return detailed information. Gitee项目地址Github项目地址文章地址"},{"title":"2023年1月24日 萧山国际机场拍机影集","date":"2023-01-25T08:02:00.000Z","url":"/2023/01/25/2023%E5%B9%B41%E6%9C%8824%E6%97%A5-%E8%90%A7%E5%B1%B1%E5%9B%BD%E9%99%85%E6%9C%BA%E5%9C%BA%E6%8B%8D%E6%9C%BA%E5%BD%B1%E9%9B%86/","tags":[["摄影","/tags/%E6%91%84%E5%BD%B1/"]],"categories":[["摄影","/categories/%E6%91%84%E5%BD%B1/"]],"content":"展开查看图片预览: PhotoPro色彩:Processed.zipsRGB色彩:Processed sRGB.zip在线预览:飞常准ADS-B图库"},{"title":"2023年1月22日 乐清 清和公园","date":"2023-01-23T05:29:00.000Z","url":"/2023/01/23/2023%E5%B9%B41%E6%9C%8822%E6%97%A5-%E4%B9%90%E6%B8%85-%E6%B8%85%E5%92%8C%E5%85%AC%E5%9B%AD/","tags":[["摄影","/tags/%E6%91%84%E5%BD%B1/"]],"categories":[["摄影","/categories/%E6%91%84%E5%BD%B1/"]],"content":"展开查看图片预览: PhotoPro色彩:Processed.zipsRGB色彩:Processed sRGB.zip"},{"title":"2023年1月16日 萧山国际机场拍机影集","date":"2023-01-18T14:24:00.000Z","url":"/2023/01/18/2023%E5%B9%B41%E6%9C%8816%E6%97%A5-%E8%90%A7%E5%B1%B1%E5%9B%BD%E9%99%85%E6%9C%BA%E5%9C%BA%E6%8B%8D%E6%9C%BA%E5%BD%B1%E9%9B%86/","tags":[["摄影","/tags/%E6%91%84%E5%BD%B1/"]],"categories":[["摄影","/categories/%E6%91%84%E5%BD%B1/"]],"content":"展开查看图片预览: PhotoPro色彩:Processed.zipsRGB色彩:Processed sRGB.zip在线预览:飞常准ADS-B图库"},{"title":"Git只对Github使用代理","date":"2023-01-17T15:36:00.000Z","url":"/2023/01/17/Git%E5%8F%AA%E5%AF%B9Github%E4%BD%BF%E7%94%A8%E4%BB%A3%E7%90%86/","tags":[["技术","/tags/%E6%8A%80%E6%9C%AF/"]],"categories":[["技术","/categories/%E6%8A%80%E6%9C%AF/"]],"content":"记录一下,Github的SB速度什么时候能改… 设置: git config --global http. socks5://127.0.0.1:4781git config --global https. socks5://127.0.0.1:4781 取消: git config --global --unset http. config --global --unset https. "},{"title":"摄影作品: The Moon","date":"2023-01-12T09:31:00.000Z","url":"/2023/01/12/%E6%91%84%E5%BD%B1%E4%BD%9C%E5%93%81-The-Moon/","tags":[["摄影","/tags/%E6%91%84%E5%BD%B1/"]],"categories":[["摄影","/categories/%E6%91%84%E5%BD%B1/"]],"content":"使用协议 CC-BY-SA 4.0 授权使用本图像相片详细参数参建元数据"},{"title":"Pale Blue Dot 暗淡蓝点 AI修复版","date":"2022-10-29T14:30:00.000Z","url":"/2022/10/29/Pale-Blue-Dot-%E6%9A%97%E6%B7%A1%E8%93%9D%E7%82%B9-AI%E4%BF%AE%E5%A4%8D%E7%89%88/","tags":[["资源","/tags/%E8%B5%84%E6%BA%90/"]],"categories":[["资源","/categories/%E8%B5%84%E6%BA%90/"]],"content":"从NASA官网获取的原图,经过AI处理与PS滤镜后得到的作品,下载地址(压缩包内含1990与2020年原图):"},{"title":"A类业余无线电台操作证书考试题库v20210222","date":"2022-10-17T16:03:00.000Z","url":"/2022/10/18/A%E7%B1%BB%E4%B8%9A%E4%BD%99%E6%97%A0%E7%BA%BF%E7%94%B5%E5%8F%B0%E6%93%8D%E4%BD%9C%E8%AF%81%E4%B9%A6%E8%80%83%E8%AF%95%E9%A2%98%E5%BA%93v20210222/","tags":[["资源","/tags/%E8%B5%84%E6%BA%90/"]],"categories":[["资源","/categories/%E8%B5%84%E6%BA%90/"]],"content":"最近要考A证要用到,找了很久,最后找到了由BI6LAL大佬整理的在线版,特地保存成了PDF,分享给大家:原网站:"},{"title":"LSI SAS1068E SCSI导致4TB磁盘只识别2TB","date":"2022-10-11T16:55:00.000Z","url":"/2022/10/12/LSI-SAS1068E-SCSI%E5%AF%BC%E8%87%B44TB%E7%A3%81%E7%9B%98%E5%8F%AA%E8%AF%86%E5%88%AB2TB/","tags":[["技术","/tags/%E6%8A%80%E6%9C%AF/"]],"categories":[["技术","/categories/%E6%8A%80%E6%9C%AF/"]],"content":"因为工作室旧的文件服务器性能不足,打算将存储服务器的任务交给其他服务器处理,于是试图把原先的存储服务器中的两块硬盘(4TB+128GB)换到刀片服务器上。插电开机,进入Proxmox VE:欸?说好的4TB呢!看了,确定不是GPT分区的问题,百度上都在放屁,你看fdisk在物理层面上认了2TB整,一点都不差,肯定不是磁盘本身问题:还是Google一下,这马上就发现问题了: It seems the issue is that some drives are attached to the LSI SAS1068E SCSI storage controller and that one has a 2 TB drive limitation. 巧了,我这台Dell R410就是LSI SAS1068E SCSI阵列卡,这下找到问题了。解决方法是换一台服务器,或者更换阵列卡,主板上的Sata控制器支持2TB及以上,但涉及到接口物理魔改,Dell官方明确给出了不建议的提示,所以我们也不考虑。我这边更换到了另一台服务器作为解决方案。 资料来源:"},{"title":"22.7出游摄影作品集合","date":"2022-07-24T16:00:00.000Z","url":"/2022/07/25/22-7%E5%87%BA%E6%B8%B8%E6%91%84%E5%BD%B1%E4%BD%9C%E5%93%81%E9%9B%86%E5%90%88/","tags":[["摄影","/tags/%E6%91%84%E5%BD%B1/"]],"categories":[["摄影","/categories/%E6%91%84%E5%BD%B1/"]],"content":"目的地:1.浙西大峡谷2.浙西天池3.鸠兹古镇4.马仁奇峰精选图集:图集内容未经授权,禁止任何商业用途,版权所有,非商用转载请注明本站出处与原作者名。"},{"title":"Proxmox虚拟机伪装","date":"2022-06-25T16:00:00.000Z","url":"/2022/06/26/Proxmox%E8%99%9A%E6%8B%9F%E6%9C%BA%E4%BC%AA%E8%A3%85/","tags":[["技术","/tags/%E6%8A%80%E6%9C%AF/"]],"categories":[["技术","/categories/%E6%8A%80%E6%9C%AF/"]],"content":"问题是这样的,我用PVE安装了一台Windows 11虚拟机做All in one,结果跑程序的时候出现了sorry this application cannot run under a vm的提示,也就是不允许运行在虚拟机中。 为了跑起这个程序,于是我们就需要让虚拟机对自己伪装,我使用的是Proxmox平台,也就是KVM虚拟化,只需要在对应的虚拟机的CONF配置文件中(/etc/pve/qemu-server/虚拟机ID.conf)增加以下这一行: args: -cpu 'host,kvm=off,-hypervisor' kvm=off代表了对平台隐藏KVM,-hypervisor代表了禁止平台检测cpuid来判断是否为虚拟机,这样虚拟机内的系统就会以为自己跑在物理硬件上。 参考方法来源:"},{"title":"Anaconda导致Powershell报错","date":"2022-05-02T16:00:00.000Z","url":"/2022/05/03/Anaconda%E5%AF%BC%E8%87%B4Powershell%E6%8A%A5%E9%94%99/","tags":[["技术","/tags/%E6%8A%80%E6%9C%AF/"]],"categories":[["技术","/categories/%E6%8A%80%E6%9C%AF/"]],"content":" 记录一下解决方法,以管理员身份运行Powershell,然后输入: set-executionpolicy remotesigned 输入a,回车,然后大功告成。"},{"title":"疫情之下的生机:随手拍","date":"2022-04-05T16:00:00.000Z","url":"/2022/04/06/%E7%96%AB%E6%83%85%E4%B9%8B%E4%B8%8B%E7%9A%84%E7%94%9F%E6%9C%BA%EF%BC%9A%E9%9A%8F%E6%89%8B%E6%8B%8D/","tags":[["摄影","/tags/%E6%91%84%E5%BD%B1/"]],"categories":[["摄影","/categories/%E6%91%84%E5%BD%B1/"]],"content":"图集内容未经授权,禁止任何商业用途,版权所有,非商用转载请注明本站出处与原作者名。"},{"title":"MongoDB GoLang 字符串与ObjectID相互转换","date":"2022-04-03T16:00:00.000Z","url":"/2022/04/04/MongoDB-GoLang-%E5%AD%97%E7%AC%A6%E4%B8%B2%E4%B8%8EObjectID%E7%9B%B8%E4%BA%92%E8%BD%AC%E6%8D%A2/","tags":[["技术","/tags/%E6%8A%80%E6%9C%AF/"]],"categories":[["技术","/categories/%E6%8A%80%E6%9C%AF/"]],"content":"先看ObjectID转字符串(十六进制),这个简单: 然后字符串(十六进制)就头疼了查了百度、必应国内版,最后用英语在必应国际版上的一个小网站里面找到了解决方案,连官方文档都没提到这个函数: 当然,如果你不想在错误的时候返回nil,就可以直接写: 上述方法需要额外引入模块: “go.mongodb.org/mongo-driver/bson/primitive” 方法来源:"},{"title":"MacOS Brew代理","date":"2022-01-16T16:00:00.000Z","url":"/2022/01/17/MacOS-Brew%E4%BB%A3%E7%90%86/","tags":[["技术","/tags/%E6%8A%80%E6%9C%AF/"]],"categories":[["技术","/categories/%E6%8A%80%E6%9C%AF/"]],"content":"因为某些因素所以brew安装软件的时候一直失败,设了半天HTTP_PROXY完全不鸟我,然后发现应该设置ALL_PROXY: "},{"title":"TensorFlow2.3.0缺少Lib","date":"2021-12-18T16:00:00.000Z","url":"/2021/12/19/TensorFlow2-3-0%E7%BC%BA%E5%B0%91Lib/","tags":[["技术","/tags/%E6%8A%80%E6%9C%AF/"]],"categories":[["技术","/categories/%E6%8A%80%E6%9C%AF/"]],"content":"今天在配置TensorFlow环境的时候,正确的安装上了CUDN和CUDNN Lib,但是TensorFlow运行的时候还是报错,缺少一堆Lib;于是便去网上搜索了一番,补上了这些文件,终于GPU Available变成了True,现在把文件分享出来,放到CUDN的lib文件夹内即可。下载地址:"},{"title":"ESXI直通显卡","date":"2021-12-08T16:00:00.000Z","url":"/2021/12/09/ESXI%E7%9B%B4%E9%80%9A%E6%98%BE%E5%8D%A1/","tags":[["技术","/tags/%E6%8A%80%E6%9C%AF/"]],"categories":[["技术","/categories/%E6%8A%80%E6%9C%AF/"]],"content":"此前折腾过ESXI直通显卡,无奈老黄奸的一批,GeForce系列民用级别显卡全线驱动屏蔽直通,然后在今年五月,NVIDIA终于解除了对此的禁止措施(),于是今天再来折腾一次,记录一下遇到的小问题。 问题相对于之前真的小了不少,在驱动屏蔽时期,需要魔改驱动,但这都成为了过去式。只需要修改两个小地方就可以实现完美直通。 首先,在ESXI设备管理中,将显卡设置为直通模式;然后再给虚拟机设置以下键值对: 然后在/etc/vmware/passthru.map这个文件里,找到设备对应的行如果是A卡则加一行 1002 ffff link false 如果是N卡则在已有那行下加 10de ffff link false 输入:wq保存退出,然后输入reboot重启,应该重启之后就大功告成了。 N卡如果依然不工作就把下面的全加上: "},{"title":"Docker搭建RTMP服务器","date":"2021-09-19T16:00:00.000Z","url":"/2021/09/20/Docker%E6%90%AD%E5%BB%BARTMP%E6%9C%8D%E5%8A%A1%E5%99%A8/","tags":[["技术","/tags/%E6%8A%80%E6%9C%AF/"]],"categories":[["技术","/categories/%E6%8A%80%E6%9C%AF/"]],"content":"正好在解决相关的问题,网上大部分人使用的是alfg/nginx-rtmp,这个包很好,自带FLV流转HLS,但是我的场景内不需要转换,而且这个包没使用GPU编码,而且这个包默认不使用GPU编码,HLS流自动转换浪费了服务器大量的CPU性能,所以我自己Docker Hub找到了这样一个包:tiangolo/nginx-rtmp,只有纯净的RTMP+NGINX服务器的实现,几乎没有额外的CPU开销,性能非常好,可以直接使用rtmp协议再次把流拉下来观看。拉取包: 运行容器: 然后只需要把流推送到 rtmp://IP_ADDRESS/live/STREAM_NAME 这个地址就可以了"}] |