12 2019 档案
摘要:A valid parentheses string is either empty (""), "(" + A + ")", or A + B, where A and B are valid parentheses strings, and +represents string concaten
阅读全文
摘要:Given an array of non-negative integers arr, you are initially positioned at start index of the array. When you are at index i, you can jump to i + ar
阅读全文
摘要:Given two binary search trees root1 and root2. Return a list containing all the integers from both trees sorted in ascending order. Example 1: Example
阅读全文
摘要:引言 基于低分辨率的图像恢复高分辨图像具有重要意义,近年来,利用深度学习做单张图像超分辨主要有两个大方向:1、减小失真度(distortion, 意味着高PSNR)的图像超分辨,这类方法主要最小化均方误差;2、提高感知质量(perception)的图像。这类方法主要利用GAN来做约束,使得生成的图像
阅读全文
摘要:引言 直方图是一种对数据分布的描述,在图像处理中,直方图概念非常重要,应用广泛,如图像对比度增强(直方图均衡化),图像信息量度量(信息熵),图像配准(利用两张图像的互信息度量相似度)等。 1、numpy中histogram()函数用于统计一个数据的分布 numpy.histogram(a, bins
阅读全文
摘要:引言 在进行科学计算的过程的中,很多时候我们需要将中间的计算结果保存下来以便后续查看,或者还需要后续再进行分析处理。 解决方案 1、一维/二维数组保存/载入 特别地,针对一维/二维数组保存,numpy自带savetxt函数有实现;针对保存在txt文件中的数组,numpy自带loadtxt函数。接下来
阅读全文
摘要:u/U:表示unicode字符串 不是仅仅是针对中文, 可以针对任何的字符串,代表是对字符串进行unicode编码。 一般英文字符在使用各种编码下, 基本都可以正常解析, 所以一般不带u;但是中文, 必须表明所需编码, 否则一旦编码转换就会出现乱码。 建议所有编码方式采用utf-8,即在py文件开头
阅读全文
摘要:There are n people whose IDs go from 0 to n - 1 and each person belongs exactly to one group. Given the array groupSizes of length n telling the group
阅读全文
摘要:1、注释多行 1). 首先按esc进入命令行模式下,按下Ctrl + v,进入VISUAL BLOCK模式; 2). 在行首使用上下键选择需要注释的多行; 3). 按下键盘(大写)“I”键,进入插入模式; 4). 然后输入注释符(“//”、“#”等); 5). 最后按下“Esc”键。 注:在按下es
阅读全文