C++常用数据结构和函数
multiset
Multiset in C++ Standard Template Library (STL) | Geeks
valid anafram | leetcode
允许元素重复
12345678910111213141516171819202122232425262728#include <iostream>#include <set>using namespace std;int main(){ multiset<int> myset; myset.insert(1); myset.insert(2); myset.insert(1); myset.insert(2); auto pos = myset.find(0); if(pos == myset.end()) cout << "Not Find" << endl; cout << myset.count(1) << endl; // 2 for(int i : myset) cou ...
汇编语言
中英文对照
常见汇编命令英文缩写 - 凯歌的文章 - 知乎
CS(Code Segment): 代码段寄存器
IP(Instruction Pointer): 指令指针寄存器
PC(Program Counter): 程序计数器(寄存器)
PC=CS<<4+IP
一般寄存器: AX、BX、CX、DX
AH&AL=AX(accumulator): 累加寄存器
BH&BL=BX(base): 基址寄存器
CH&CL=CX(count): 计数寄存器
DH&DL=DX(data): 数据寄存器
SP(Stack Pointer): 堆栈指针寄存器(存放栈顶的偏移地址)
BP(Base Pointer): 基址指针寄存器
索引寄存器: SI、DI
SI(Source Index): 源索引寄存器
DI(Destination Index): 目的索引寄存器
通用寄存器: EAX、EBX、ECX、EDX | ESP、EBP | ESI、EDI(32位)
EAX、EBX、ECX、EDX 各为 AX、BX、CX、DX的延申
ESP、EBP 各为 SP、BP的延申
ESI、EDI 各为 S ...
计算机网络
概述
三种交换方式
从通信资源分配角度来看,交换(Switching)就是按照某种方式动态地分配传输线路资源。
电路交换(Circuit Switching)
电话交换机接通电话线的方式称为电路交换;
分组交换(Packet Switching)
重点
报文交换(Message Switching)
计算机网络的定义和分类
定义
分类
按交换技术分类
电路交换网络
报文交换网络
分组交换网络
按使用者分类
公用网
专用网
按传输介质分类
有线网络
无线网络
按覆盖范围分类
广域网WAN
城域网MAN
局域网LAN
个域网PAN
按拓扑结构分类
总线型网络
星型网络
环形网络
王状型网络
计算机网络的性能指标
数据量的单位
比特(bit):计算机中==数据量的单位==,也是信息论中信息量的单位。一个比特就是一个一位二进制数(0或1)。
123451 Byte = 8 bit1 KB = 2^10 Byte = 1024 Byte1 MB = K*KB = 2^10 * 2^10 Byte = 2^20 Byte1 GB = K*MB = 2^10 * 2^20 Byt ...
Git常用指令
安装
GitHub Desktop
desktop.github.com
Git 全平台版
git-scm.com
配置工具
对所有本地仓库的用户信息进行配置
1$ git config --global user.name "[name]"
对你的commit操作设置关联的用户名
1$ git config --global user.email "[email address]"
对你的commit操作设置关联的邮箱地址
1$ git config --global color.ui auto
启用有帮助的彩色命令行输出
分支
分支是使用 Git 工作的一个重要部分。你做的任何提交都会发生在当前“checked out”到的分支上。使用 git status 查看那是哪个分支。
1$ git branch [branch-name]
创建一个新分支
1$ git switch -c [branch-name]
切换到指定分支并更新工作目录(working directory)
1$ git merge [branch]
将指定分支的历史合并到 ...
numpy 中的 axis 和 pytorch 中的 dim
关于 numpy 中的 axis 和 pytorch 中的 dim
123456789101112131415import numpy as nparray = np.random.randint(low=0, high=6, size=(3, 4))print(array.shape, array)# (3, 4) [[5 3 0 4]# [4 3 1 0]# [2 0 3 2]]array0 = array.sum(axis=0, keepdims=True)print(array0.shape, array0)# (1, 4) [[11 6 4 6]]array1 = array.sum(axis=1, keepdims=True)print(array1.shape, array1)# (3, 1) [[12]# [ 8]# [ 7]]
123456789101112131415import torchtensor = torch.randint(low=0, high=6, size=(3, 4))prin ...
COCO format
Reference
Transforms v2: End-to-end object detection/segmentation example
Transforms v2: End-to-end object detection/segmentation example
Youtube video introducing COCO
COCO Dataset Format - Complete Walkthrough
Blog that introduces COCO format
COCO format , what and how
Waht is COCO format
Introduction
The COCO (Common Objects in Context) format is a standard format for storing and sharing annotations for images and videos. It was developed for the COCO image and video recognition cha ...
Gaussian Error Linear Unit (GELU)
Gaussian Error Linear Unit (GELU)
Arxiv link to the paper of GELU
Gaussian Error Linear Unit (GELU)
Definition of GELU
GELU(x)=xP(X≤x)=xΦ(x)=x⋅12[1+erf(x/2)]{\rm GELU}(x) = xP(X \leq x) = x\Phi(x) = x\cdot \frac{1}{2}
\left[ 1+ {\rm erf}(x/\sqrt2) \right]
GELU(x)=xP(X≤x)=xΦ(x)=x⋅21[1+erf(x/2)]
Where Φ(⋅)\Phi(\cdot)Φ(⋅) denotes cumulative distribution function (CDF) for normal distribution and erf(⋅){\rm erf}(\cdot)erf(⋅) is error function.
Derivative of GELU
ddxGELU(x)=ddx[x⋅Φ(x)]=Φ(x)+x ...
Google Scholar
How to use Google Scholars
谷歌学术检索论文如何指定多个来源
Google Scholar 谷歌学术文献检索技巧总结
TGRS
1Segmentation (source: "Transactions on Geoscience and Remote Sensing")
ICCV
1Segmentation (source: "International Conference on Computer Vision")
CVPR
1Segmentation (source: "Computer Vision and Pattern Recognition")
NeurIPS
1Segmentation (source: "Advances in Neural Information Processing Systems")
AAAI
1Segmentation (source: "Proceedings of the AAAI Conference on Artificia ...
Secure Shell
SSH, Secure Shell
查看已有公钥
12cd ~/.ssh # 进入目录cat id_rsa.pub # 显示公钥
1cat ~/.ssh/id_rsa.pub # 显示公钥
生成新的密钥
12345678910111213ssh-keygen -t rsa -b 4096 -f ~/.ssh/newsshkey# 参数说明:# -t rsa 指定加密方式为RSA# -b 4096 密钥长度(bit)# -f 指定密钥文件名, 默认为 id_rsa# 各个参数都可以不填, 使用默认参数ssh-keygen# 建议加上这些参数ssh-keygen -t rsa -C xxx@xxx.com# 这里的 xxx@xxx.com 只是用于生成的 sshkey 的名称, 并不要求具体命名为某个邮箱
将公钥上传至服务器
SSH配置密钥登录以及简单的安全设置
123ssh-copy-id -i ~/.ssh/newsshkey.pub -p port User@HostName# -i ~/.ssh/newsshkey.pub 指定密钥文件公钥, 注意后缀为.pub, 这是 ...
Datasets
ISPRS-Potsdam
Prepare Dataset: ISPRS-Potsdam | mmsegmentation
The Potsdam dataset is for urban semantic segmentation used in the 2D Semantic Labeling Contest - Potsdam.
The dataset can be requested at the challenge homepage. You will get a file named utf-8' 'Potsdam.zip, and unzip this file to get a folder named Potsdam which contains 10 files:
1234567891011Potsdam├── 1_DSM.rar├── 1_DSM_normalisation.zip├── 2_Ortho_RGB.zip <--├── 3_Ortho_IRRG.zip├── 4_Ortho_RGBIR.zip├── 5_Labels_all.zip├── 5_ ...