通过sh命令打开多个终端并执行指定的命令
shell1234567891011121314151617#!/bin/shsleep 1sgnome-terminal -t "5000" -x bash -c "cd /media/nvidia/3563-3135/exhibiton/web;/usr/bin/python3 app.py;"sleep 1sgnome-terminal -t "5001" -x bash -c "cd /media/nvidia/3563-3135/exhibiton/yolo;/usr/bin/python3 detect.py;"sleep 1sgnome-terminal -t "5002" -x bash -c "cd /media/nvidia/3563-3135/exhibiton/deepsort;/usr/bin/python3 demo.py;"sleep 1sgnome-terminal -t "5003" -x bash -c &quo ...
Supervisor使用教程
官方文档:https://github.com/Supervisor/supervisor
安装1sudo apt install supervisor
配置 /etc/supervisordemo: 在 /etc/supervisor/conf.d/ 新增子进程配置文件 celery_worker.conf
12345678910111213141516171819[program:celery_worker]command=celery -A main worker -l INFO --concurrency 10priority=999 ; the relative start priority (default 999)autostart=true ; start at supervisord start (default: true)autorestart=true ; retstart at unexpected quit (default: true)startsecs=10 ...
Jetson AGX Xavier安装torch、torchvision且成功运行yolov5算法
https://blog.csdn.net/qq_40691868/article/details/114379061
agx版本的pytorch
转载:
https://blog.csdn.net/qq_41426807/article/details/124705416
ks上网:
https://elinux.org/Jetson_Zoo
检查pytorch是否有gpu
>>> import torch>>> torch.cuda.is_available()
True
js读取href中的参数函数
123456789function GetQueryValue (queryName) { var query = decodeURI(window.location.search.substring(1)); var vars = query.split("&"); for (var i = 0; i < vars.length; i++) { var pair = vars[i].split("="); if (pair[0] == queryName) { return pair[1]; } } return null;}
VirtualBox_Ubuntu22.10_Terminal无法打开
情况描述:新安装的虚拟机无法打开Terminal,从应用列表中单击Terminal,左上角任务栏会出现Terminal,并且鼠标转圈,但是过一会左上角Terminal消失,就像一切都没有来过。解决办法: CTRL + ALT + F3 进入命令行模式(需要返回桌面时CTRL + ALT + F1) cd /etc/default sudo nano locale 把文件中的 “en_US” 改成 “en_US.UTF-8” 保存退出 sudo locale-gen –purge reboot 重启虚拟机
mysql允许root用户在任何地方进行远程登录,并具有所有库任何操作权限
在本机先使用root用户登录mysql:
mysql -u root -p"youpass"
进行授权操作:
mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'youpassword' WITH GRANT OPTION;
重载授权表:
FLUSH PRIVILEGES;
退出mysql数据库:
exit
Linux挂载tf卡空间
https://blog.csdn.net/cao849861802/article/details/126039190
通过flask完成web实时播放视频
12345678910111213141516171819def gen(): r = redis.StrictRedis(host=REDIS_HOST, port=REDIS_PORT, db=REDIS_DB, password=PASS_WORD) while True: try: # print(r.get('pic_path').decode()) img = cv2.imread(r.get('realtime_frame').decode(), 1) # img = cv2.imread("static/result.png", 1) ret, jpeg = cv2.imencode('.jpg', img) frame = jpeg.tobytes() # frame = {'file': open(r. ...