Python opencv 特征匹配 支持h264 多线程 队列
特征匹配12pip install opencv-pythonpip install opencv-contrib-python==3.4.2.17 这里一定要加版本号,负责会报一个版权错误代码 12345678910111213141516171819202122232425262728293031323334353637383940# import numpy as npimport cv2import matplotlib.pyplot as pltimg1 = cv2.imread('a1.jpg', 0) # queryImageimg2 = cv2.imread('a4.jpg', 0) # trainImage# Initiate SIFT detectorsift = cv2.xfeatures2d.SIFT_create()# find the keypoints and descriptors with SIFTkp1, des1 = sift.detectAndCompute(img1, None)...
php 对多维数组 排序
当参数是多维数组时候前面参数类似sql中的group by,而最后一个是排序的数据以下是按0列排序,如果前面有多个条件也可以,SORT_DESC,SORT_NUMERIC这种只对前面的数组排序有效最后一个数组会跟着前面的数组改变顺序,从而实现多维数组排序 12345678910$arr = [ [1, 2], [99, 0], [100, -1],];array_multisort( array_column($arr, 0), SORT_DESC, SORT_NUMERIC, $arr);var_export($arr); 支持多个字段类似order by 12345678// CPU内存升序$cpu = array_column($available, 'Cpu');$mem = array_column($available, 'Memory');array_multisort( $cpu, SORT_ASC, SORT_NUMERIC, $mem, SORT_ASC, SORT_NUME...
sublime 接口测试 代替 postman 等工具
主要是利用sublime的自带编译系统 新建json12345678910{ "mehtod": "GET", "url": "https://wx.iguojin.com/activity/astrazeneca/saveData", "query": { "name": "测试", "hospital": "一家医院", "phone": "13011111111" }} 为json建编译系统123456789{ "cmd": [ "php", "C:\\php\\bin\\phppost\\index.php", "$fi...
mysql max min 必须放在-条件之后
1SELECT *,max(marks) FROM `form_log` where reason = 'astrazeneca' group by userid
Ubuntu apache2 开启虚拟机 但是无效果
今天在ubuntu的apache2开启了一个虚拟机重启apache但是无效后来发现,虚拟机中侦听的端口是被设置在另一个配置文件中的ports.conf
linux 常用命令
lsofhttps://www.jianshu.com/p/a3aa6b01b2e1list openfiles 1lsof -i :22 创建用户https://blog.csdn.net/taolusi/article/details/81304057 12adduser:会自动为创建的用户指定主目录、系统shell版本,会在创建时输入用户密码。useradd:需要使用参数选项指定上述基本设置,如果不使用任何参数,则创建的用户无密码、无主目录、没有指定shell版本。 time获取命令执行时间 1234time python3 Oreal.pyreal 0m12.471suser 0m9.756ssys 0m0.251s dnf软件源列表12345# 当前启用的dnf repolist# 全部源dnf repolist all dnf禁用软件源1sudo dnf config-manager --set-disable sublime-text
小乌龟 git 使用方法 常用命令
推送标签 1git push origin master --tags
docker 常用 命令
容器管理 启动容器 1docker run -it ubuntu /bin/bash 查看所有的容器 1docker ps -a 启动一个已停止得容器 1docker start b750bbbcfd88 后台运行 1docker run -itd --name ubuntu-test ubuntu /bin/bash 停止一个容器 1docker stop 容器ID 进入容器 12docker attach 容器IDdocker exec -it 243c32535da7 /bin/bash # 退出后容器不退出 导出容器快照 1docker export 容器 > /data/ubuntu.tar 导入容器快照 1cat docker/ubuntu.tar | docker import - test/ubuntu:v1 删除容器(必须停止状态) 1docker rm -f 容器id 查看日志 1docker logs ID或者名字 查看程序进程 1docker top ID或者名字 镜像管理 展示本地镜像 1docker ...
yii2 使用记录
安装遇到Content-Length mismatch, received 98048 bytes out of the expected 4075770报错 修改composer.json的config键值 123456789"config": { "process-timeout": 1800, "fxp-asset" : { "installer-paths" : { "npm-asset-library" : "vendor/npm", "bower-asset-library" : "vendor/bower" } }}, 伪静态 .htaccess文件内容为 12345Options +FollowSymLinksRewriteEngine onRewri...
php 笔试题
第一部分 程序如下,写出执行结果 12345678910$count = 3;function get_count(){ static $count = 0; return $count++;}echo $count; //3++$count;echo get_count(); //0echo get_count(); //1 有文件dir/upload.img.jpg,使用2种以上方法获取拓展名 123456789101112131415// pathinfopathinfo($dir)['extension'];array ( 'dirname' => 'dir', 'basename' => 'upload.img.jpg', 'extension' => 'jpg', 'filename' => 'upload.img...