last

retinaface人脸姿态

核能气质少年 提交于 2019-12-01 23:41:05
抛转引玉: up down还能准,侧脸时,up和down是混乱的:有时不准 适合只有一个人脸,多人脸不行,不是特别准,大部分准。 这个讲的不错 https://blog.csdn.net/u014090429/article/details/100762308 # encoding=utf8 import os import numpy as np import cv2 # from test import * import math def drawResult(img, yaw, pitch, roll, save_dir): # img = cv2.imread(imgpath) draw = img.copy() cv2.putText(img, "Yaw:" + str(yaw), (20, 40), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 0)) cv2.putText(img, "Pitch:" + str(pitch), (20, 80), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 0)) cv2.putText(img, "Roll:" + str(roll), (20, 120), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 0)) last_status=

6380. 【NOIP2019模拟2019.10.06】小w与最长路(path)

蹲街弑〆低调 提交于 2019-12-01 22:28:47
题目 题目大意 给你一棵树,对于每一条边,求删去这条边之后,再用一条边(自己定)连接两个连通块,形成的树的直径最小是多少。 正解 首先,将这棵树的直径给找出来。显然,如果删去的边不在直径上,那么答案就是直径。 接下来考虑删去的边在直径上的情况。 自己连的边应该要是两棵树的直径的中点(中点就是直径上到端点最大距离最小的点)。 答案就是两棵树的直径的一半(当然这是粗略的说法)加上边权,和两棵树内部的直径长度的最大值。 设直径端点为 \(S\) 和 \(T\) ,现在想象直径是横过来的一条线,有一堆树挂在上面。 在直径上从左到右枚举删去哪条边,顺带着维护中点在哪里。 有个结论:中点肯定在原来的直径上。 (后面都以 \(S\) 的一边为例,显然另一边是一样的) 反证法,设中点为 \(x\) , \(x\) 不在直径上。设 \(y\) 为 \(x\) 到 \(S\) 路径上第一个出现在直径上的点。 现在找最远的点 \(z\) 。 如果 \(z\) 在 \(y\) 子树之外,那么路径就是 \(x\) 到 \(y\) 和 \(y\) 到 \(z\) 的距离。这时候如果要使 \(y\) 到 \(z\) 最大,则 \(z=S\) 。这时候将 \(x\) 变成 \(y\) 更优。 如果 \(z\) 在 \(x\) 子树之内,那么 \(x\) 到 \(z\) 的距离比 \(x\) 到 \(S\)

The last packet successfully received from the server was 1,480 milliseconds ago.

走远了吗. 提交于 2019-12-01 22:08:30
场景:一个上传接口,需要上传几十M的文件,文件中包含10几W的数据,然后对10+W的数据进行同步批量插入,每次批量插入1W。最后返回结果。 项目上线一段时间后,上传接口出现问题,数据库用的MySQL5.7.21,报了如下错误: 2018-07-16 01:30:03.497 ERROR com.alibaba.druid.pool.DruidDataSource Line:1594 - discard connection com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 1,480 milliseconds ago. The last packet sent successfully to the server was 1,480 milliseconds ago. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance

Codeforces Round #593 (Div. 2)

允我心安 提交于 2019-12-01 21:46:21
目录 Contest Info Solutions A. Stones B. Alice and the List of Presents C. Labs D. Alice and the Doll E. Alice and the Unfair Game Contest Info Practice Link Solved A B C D E F 5/6 O O O O Ø - O 在比赛中通过 Ø 赛后通过 ! 尝试了但是失败了 - 没有尝试 Solutions A. Stones 签到。 代码: view code #pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #include <bits/stdc++.h> #define fi first #define se second #define endl "\n" using namespace std; using db = double; using ll = long long; using ull = unsigned long long; using pII =

last 命令

六眼飞鱼酱① 提交于 2019-12-01 20:28:56
NAME last - show listing of last logged in users 数据源:/var/log/wtmp 文件 主要参数 -a:把从何处登入系统的主机名称或ip地址,显示在最后一行;-d:将IP地址转换成主机名称; -f <记录文件>:指定记录文件。 -n <显示列数>或-<显示列数>:设置列出名单的显示列数; -R:不显示登入系统的主机名称或IP地址; -x:显示系统关机,重新开机,以及执行等级的改变等信息。示例: 第一列:用户名 第二列:终端位置。pts/0 (伪终端) 意味着从诸如SSH或telnet的远程连接的用户.tty (teletypewriter) 意味着直接连接到计算机或者本地连接的用户 第三列:登录ip或者内核 。如果你看见:0.0 或者什么都没有,这意味着用户通过本地终端连接。除了重启活动,内核版本会显示在状态中。 第四列:开始时间 第五列:结束时间(still login in 还未退出 down 直到正常关机 crash 直到强制关机) 第六列:持续时间 last -5 //输出最近5条登录信息 来源: https://www.cnblogs.com/imcati/p/11716891.html

求平方根

江枫思渺然 提交于 2019-12-01 18:56:41
牛顿法 class Solution { public: int mySqrt(int x) { if (x == 0) return 0; double last=0; double res=1; while(res!=last) { last=res; res=(res+x/res)/2; } return int(res); } }; 二分法 class Solution { public: int mySqrt(int x) { // 注:在中间过程计算平方的时候可能出现溢出,所以用 long long 。 long long i=0; long long j=x/2+1;// 对于一个非负数 n ,它的平方根不会大于( n/2+1 ) while(i<=j) { long long mid=(i+j)/2; long long res=mid*mid; if(res==x) return mid; else if(res<x) i=mid+1; else j=mid-1; } return j; } }; 来源: https://www.cnblogs.com/xukaiae86/p/11713198.html

@uoj - 435@ 【集训队作业2018】Simple Tree

不问归期 提交于 2019-12-01 18:55:10
目录 @description@ @solution@ @accepted code@ @details@ @description@ 有一棵有根树,根为 1,点有点权。 现在有 m 次操作,操作有 3 种: 1 x y w,将 x 到 y 的路径上的点点权加上 w (其中 w=±1); 2 x y,询问在 x 到 y 的路径上有多少个点点权 >0; 3 x,询问在 x 的子树里的点有多少个点点权 >0。 输入格式 第一行三个数 n,m,T,表示树的结点个数,操作个数,和是否加密。 接下来 n−1 行,每行 2 个数 x y,表示结点 x 和 y 之间有一条边。 接下来一行 n 个数,第 i 个数表示结点 i 的初始点权。 接下来 m 行,每行格式见题目描述。 如果 T=1,则这 m 行读入的每个 x,y 都需要异或 last_ans 才能得到真实的输入,其中 last_ans 表示上一次询问操作的答案,如果不存在上一次询问操作则为 0​。 输出格式 对于每个询问操作,输出一行表示答案。 样例一 input 5 5 0 1 2 1 3 3 4 3 5 1 0 0 0 0 2 2 5 3 3 1 2 5 1 2 2 5 3 3 output 1 0 4 2 限制与约定 对于所有数据,1≤n≤10^5,1≤m≤10^5,−10^9≤ 点权 ≤10^9。 @solution@

mybatis注解基础使用

半腔热情 提交于 2019-12-01 18:42:01
一、创建Maven项目 代码:pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>wyf</groupId> <artifactId>xqweb</artifactId> <version>1.0-SNAPSHOT</version> <dependencies> <!-- https://mvnrepository.com/artifact/org.mybatis/mybatis --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.4.4</version> </dependency> <!-- https:/

PTA Deque (C语言)

匆匆过客 提交于 2019-12-01 16:59:21
A "deque" is a data structure consisting of a list of items, on which the following operations are possible: Push(X,D): Insert item X on the front end of deque D. Pop(D): Remove the front item from deque D and return it. Inject(X,D): Insert item X on the rear end of deque D. Eject(D): Remove the rear item from deque D and return it. Write routines to support the deque that take O(1) time per operation. Format of functions: Deque CreateDeque(); int Push( ElementType X, Deque D ); ElementType Pop( Deque D ); int Inject( ElementType X, Deque D ); ElementType Eject( Deque D ); where Deque is

MySQL查询性能优化

蓝咒 提交于 2019-12-01 16:50:02
一、是否查询了不需要的数据 1.多使用limit来分页 2.不要用select *,特别是在多表关联的时候 3.避免重复查询相同的数据,可以多使用缓存 二、正确使用索引 如何正确使用索引见上一篇文章《MySQL索引》,这里再补充几个索引失效的案例: key(last_name, first_name, dob) 1.select * from blog_user where last_name like ‘%A%’; //使用like时通配符在前 2.select * from blog_user where last_name is null; //is null或is not null会放弃使用索引 3.select * from blog_user where UPPER(last_name) like 'A%'; //对索引列做了函数计算 4.select * from blog_user where last_name like 'A%' or first_name = 'b'; //使用or会导致索引失效,除非or的左右两边都分别正确使用索引。如select * from blog_user where last_name like 'A%' or last_name = 'b'; 5.隐式类型转换 6.隐式字符编码转换 创建blog_name表: CREATE