爬取百度图片
1234567891011121314151617181920212223242526272829303132333435363738394041from fake_useragent import UserAgentimport requestsimport reimport uuidheaders = {"User-agent": UserAgent().random, # 随机生成一个代理请求 "Accept-Encoding": "gzip, deflate, br", "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6", "Connection": "keep-alive"}img_re = re.compile('"thumbURL":&q ...
linux 打开端口1935,CentOS服务器开放端口
https://blog.csdn.net/weixin_39915308/article/details/116846197
cartographer 使用自己的雷达
文件修改
demo_revo_lds.launch12345678910111213141516171819202122232425262728293031323334<!-- Copyright 2016 The Cartographer Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS&quo ...
opencv-python同时调用两个摄像头
123456789101112131415161718192021222324252627282930313233import cv2import numpy as npcapture = cv2.VideoCapture(0)capture_usb = cv2.VideoCapture(2)# 打开自带的摄像头if capture.isOpened() and capture_usb.isOpened(): # 以下设置显示屏的宽高 capture.set(cv2.CAP_PROP_FRAME_WIDTH, 640) capture.set(cv2.CAP_PROP_FRAME_HEIGHT, 480) capture_usb.set(cv2.CAP_PROP_FRAME_WIDTH, 640) capture_usb.set(cv2.CAP_PROP_FRAME_HEIGHT, 480) # 持续读取摄像头数据 while True: read_code, frame = capture.read() read_ ...
nano 自启动脚本实现方式
nano 自启动脚本实现方式https://blog.csdn.net/Lstar_/article/details/120993385
1gnome-session-properties
pip导出 requirements.txt
pipreqs1pip install pipreqs
在python项目的根目录下 使用 pipreqs ./
12pipreqs ./ --encoding=utf8INFO: Successfully saved requirements file in ./requirements.txt
在deepin20.6上运行ros和far planner
https://blog.csdn.net/weixin_39977764/article/details/125348862
deepin v20.6+cuda+cudnn+anaconda(miniconda)
https://blog.csdn.net/qq_39821554/article/details/126256588
sudo aptitude install
conda config –set auto_activate_base false
flask集成swagger
flask-siwadochttps://zhuanlan.zhihu.com/p/529381856
把sqlalchemy对象转化成json数据类型
把sqlalchemy对象转化成json数据类型123456789101112131415161718192021def to_json_all(msg: list): data = [] if type(msg) == list: for i in range(len(msg)): temp_dict = {} j = 0 for k, v in msg[i].__dict__.items(): if j > 0: temp_dict[k] = v j += 1 data.append(temp_dict) else: temp_dict = {} j = 0 for k, v in msg.__dict__.items(): if j > 0: ...