摘要: """背景介绍:光电容积脉搏波(Photoplethysmography,PPG)是一种适宜在日常生活环境下进行生理信号采集的手段。该技术利用光电信号感知血液容积的变化,并通过算法从中提取心率、心率变异性、血氧饱和度等人体医学信号,是一种无创检测技术。data.txt中的数据为某人的光电容积脉搏波( 阅读全文
posted @ 2021-12-22 12:38 牛牛码代码 阅读(97) 评论(0) 推荐(0) 编辑
摘要: TCP报文格式 TCP报头中的源端口号和目的端口号同IP数据报中的源IP与目的IP唯一确定一条TCP连接。TCP在发送数据前必须在彼此间建立连接,这里连接意思是:双方需要内保存对方信息(例如:IP,Port…) 报文主要段的意思 序号(sn):表示发送的数据字节流,确保TCP传输有序,对每个字节编号 阅读全文
posted @ 2021-02-08 10:44 牛牛码代码 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 隔离级别是为了解决以下问题的: 1.脏读(Drity Read):一个事务读取到另一个事务未提交的数据 2.不可重复读(Non-repeatable read):一个事务读取到另一个事务已提交的数据 (主要是修改) 3.幻读(一个事务多次查询整表数据,由于其他事务新增记录造成多次查询的记录条数不同( 阅读全文
posted @ 2020-12-01 21:52 牛牛码代码 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 比如这样一棵二叉树,如何打印二叉树叶子节点路径呢? 代码如下: #include <stdio.h> #include <stdlib.h> #include <string.h> int result[100] = {0}; int count = 0; struct TreeNode { int 阅读全文
posted @ 2020-11-19 16:03 牛牛码代码 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 给定一个二叉树和一个目标和,判断该树中是否存在根节点到叶子节点的路径,这条路径上所有节点值相加等于目标和。 说明: 叶子节点是指没有子节点的节点。 示例: 给定如下二叉树,以及目标和 sum = 22, 5 / \ 4 8 / / \ 11 13 4 / \ \ 7 2 1返回 true, 因为存在 阅读全文
posted @ 2020-11-19 15:38 牛牛码代码 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 数组中任意n个数的全排列(DFS)以及任意n个数的组合 #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX 100 /* 求数组中任意n个数的全排列 */ int result[MAX] = {0}; int 阅读全文
posted @ 2020-11-19 13:59 牛牛码代码 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 今天刷到一个leecode题:https://leetcode-cn.com/problems/pond-sizes-lcci/ 用到了深度优先算法 1. 深度优先搜索算法的概念: 深度优先搜索属于图算法的一种,英文缩写为DFS(Depth First Search.)其过程简要来说是对每一个可能的 阅读全文
posted @ 2020-11-19 10:49 牛牛码代码 阅读(350) 评论(0) 推荐(0) 编辑
摘要: 哈希表的数据结构: 其实就是数组+链表:如图, 通过一个hash函数将key转化成数组的下标,如果对应的下标在数组里面有数据,那么就冲突了,冲突了怎么办呢,这个时候就把这个数组当成链表的头结点,然后通过头插法或者尾插法将新的节点数据插入到这个链表里面,理论上有hash表的size有多大,就有多少条链 阅读全文
posted @ 2020-11-17 14:44 牛牛码代码 阅读(1676) 评论(0) 推荐(0) 编辑
摘要: docker 学习:docker search *** 搜索镜像docker images 查看本地镜像docker pull *** 拉取镜像docker run -it *** 运行某一个镜像docker run -itd **** 后台运行某一个镜像docker run -itd -p 500 阅读全文
posted @ 2020-10-12 09:38 牛牛码代码 阅读(65) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>void print(int arr[], int length){ for(int i = 0; i < length; i++) { printf("%d ",arr[i]); } printf("\n");}void Qsort(int arr[], int 阅读全文
posted @ 2020-09-22 19:42 牛牛码代码 阅读(1847) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <malloc.h>typedef struct Node{ int data; struct Node *next;}Node; void reverseNode(Node *head){ Node *cur = head->next; Nod 阅读全文
posted @ 2020-08-29 12:42 牛牛码代码 阅读(245) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <string.h>#include <stdlib.h> int ishuiwen(char *p){ int i = strlen(p); for(int j=0;j<=i/2;j++) { if(p[j] !=p[i-j-1]) { ret 阅读全文
posted @ 2020-08-17 22:14 牛牛码代码 阅读(66) 评论(0) 推荐(0) 编辑
摘要: """给你 k 种面值的硬币,面值分别为 c1, c2 ... ck,每种硬币的数量无限,再给一个总金额 amount,问你最少需要几枚硬币凑出这个金额,如果不可能凑出,算法返回 -1 。算法的函数签名如下:"""coins = [1, 2, 5]money = 11def coin_change( 阅读全文
posted @ 2020-08-09 23:43 牛牛码代码 阅读(711) 评论(0) 推荐(0) 编辑
摘要: """经典的数字三角形问题(简单易懂,经典动态规划)73 88 1 02 7 4 44 5 2 6 5D(r,j):"""l = [[7],[3,8], [8,1,0], [2,7,4,4],[4,5,2,6,5]]n = 5def get_max_sum(row, col): if n == ro 阅读全文
posted @ 2020-08-09 23:42 牛牛码代码 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 记录自己的面试题 param_data = {"a": {"a": [None, "", {}, {"x": None}]}, "b": 0}def value_is_not_empty(value): return value not in ['', None, {}, []]def empty_ 阅读全文
posted @ 2020-08-09 21:00 牛牛码代码 阅读(871) 评论(0) 推荐(0) 编辑
摘要: docker images 查看本地镜像 docker pull *** 拉取镜像 docker ps -a 查看容器列表 docker run -it name 启动容器name docker start container_id 启动容器 docker run -itd name 后台启动容器n 阅读全文
posted @ 2020-04-16 11:10 牛牛码代码 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 动态加载模块: 方式1:系统函数__import__() __import__(name, globals=None, locals=None, fromlist=(), level=0) name[必填] - 模块名称globals - 全局变量集合,默认为None,一般不用设置。如果设置的话,常 阅读全文
posted @ 2020-03-22 15:19 牛牛码代码 阅读(510) 评论(0) 推荐(0) 编辑
摘要: import aircv as acimport pyautoguidef matchImg(imgsrc, imgobj, confidencevalue=0.5): # imgsrc=原始图像,imgobj=待查找的图片 imsrc = ac.imread(imgsrc) imobj = ac. 阅读全文
posted @ 2020-03-21 09:50 牛牛码代码 阅读(2329) 评论(0) 推荐(0) 编辑
摘要: # -*- coding:utf-8 -*-__version__ = '1.0.0.0'"""@brief : 基于新闻的内容推荐系统@details: 详细信息@author : zhphuang@date : 2019-08-07"""import jiebafrom pandas impor 阅读全文
posted @ 2019-08-07 13:01 牛牛码代码 阅读(2789) 评论(1) 推荐(0) 编辑
摘要: 二、使用索引 如果筛选时元素时出现多个节点,但我们想确定唯一节点。可以使用类似于列表索引的方式精确定位。 三、使用属性 为了让定位更精准,跟使用索引类似,我们要增加信息量,那么还可以使用属性。@符号是属性符 #定位所有包含name属性的input节点 //input[@name] #定位含有属性的所 阅读全文
posted @ 2019-08-01 15:23 牛牛码代码 阅读(1669) 评论(0) 推荐(0) 编辑