Skip to content

Instantly share code, notes, and snippets.

View 1292765944's full-sized avatar
🎯
Focusing

1292765944

🎯
Focusing
  • Tsinghua University
  • Beijing
View GitHub Profile
@1292765944
1292765944 / cmds.txt
Created December 16, 2015 04:15 — forked from wong2/cmds.txt
在任意聊天中输入。 [ ]表示后面要跟一个空格(可能还需要别的参数才能生效)
//wearversion
//wearlog
//wearvoiceinputenable
//wearvoiceinputdisable
//weargoogleapi
//assert
//pushassert
//uplog
//upcrash
//switchnotificationstatus
@1292765944
1292765944 / getRectFromMouse.cpp
Last active May 7, 2016 15:57
从鼠标获得矩形
cv::Rect target;
bool drawing_box = false;
bool gotBB = false;
// bounding box mouse callback
void mouseHandler(int event, int x, int y, int flags, void *param) {
switch( event ){
case CV_EVENT_MOUSEMOVE:
if (drawing_box){
target.width = x-target.x;
@1292765944
1292765944 / ubuntu-mount-new-disk.md
Created September 1, 2017 06:25 — forked from gaoyifan/ubuntu-mount-new-disk.md
ubuntu 添加新硬盘

ubuntu 添加新硬盘

查看硬盘:

# fdisk -l
...
Disk /dev/sdb: 274.9 GB, 274877906944 bytes
255 heads, 63 sectors/track, 33418 cylinders, total 	536870912 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
@1292765944
1292765944 / DatumToCVMat
Last active September 20, 2017 03:16
convert caffe::Datum to cv::Mat
cv::Mat DatumToCVMat(const Datum& datum){
int datum_channels = datum.channels();
int datum_height = datum.height();
int datum_width = datum.width();
string strData = datum.data();
cv::Mat cv_img;
if (strData.size() != 0)
{
cv_img.create(datum_height, datum_width, CV_8UC(datum_channels));
@1292765944
1292765944 / receptive field
Created October 30, 2017 05:13
receptive field by Ross' R-CNN
function receptive_field_sizes()
% compute input size from a given output size
f = @(output_size, ksize, stride) (output_size - 1) * stride + ksize;
% fix the pool5 output size to 1 and derive the receptive field in the input
out = ...
f(f(f(f(f(f(f(f(1, 3, 2), ... % conv5 -> pool5
3, 1), ... % conv4 -> conv5
3, 1), ... % conv3 -> conv4
Add the lines
\settopmatter{printacmref=false} % Removes citation information below abstract
\renewcommand\footnotetextcopyrightpermission[1]{} % removes footnote with conference information in first column
\pagestyle{plain} % removes running headers
below the \documentclass line.
Removing DOI information only: Using the command \acmDOI{} to set the DOI to an empty string has only a limited effect: In the ACM reference format and in the copyright notice the prefix https://doi.org/ still remains. Only when using the class option authorversion, this prefix will vanish in the footnote, but will still be part of the ACM reference. (Imho this is a bug.) Here is a hack to get rid of this prefix (and of any DOI that has been set).
Add the lines