Skip to content

Instantly share code, notes, and snippets.

View coder-ghw's full-sized avatar
🎨
Focusing

guohw coder-ghw

🎨
Focusing
View GitHub Profile
@coder-ghw
coder-ghw / docker.sh
Last active November 3, 2024 14:05
dotfile
#debian-11 换源
sed -i 's@http://\(deb\|security\).debian.org@https://mirrors.aliyun.com@g' /etc/apt/sources.list
#ubuntu换源
sed -i 's/http:\/\/.*.ubuntu.com/https:\/\/mirrors.aliyun.com/g' /etc/apt/sources.list
@coder-ghw
coder-ghw / bash.sh
Last active January 16, 2024 08:04
tools
# 简单获取文件加下的文件的绝对路径
files_depth=($path_images/$folder_name/Depth/*)
# 路径分割字符串
## 例子中分割符号 /; 得到的ss 是个数组 ss[0] ss[-1]进行索引
IFS="/"; read -ra ss <<< "$file_depth"; unset IFS
## 选取字符串子串
${result_name:0:-4}
@coder-ghw
coder-ghw / gen_pinv.py
Last active October 27, 2023 01:52
python
import numpy as np
import matplotlib.pyplot as plt
#%%
def generateData(n = 30):
# similar to peaks() function in MATLAB
g = np.linspace(-2.0, 2.0, n)
X, Y = np.meshgrid(g, g)
X, Y = X.reshape(-1,1), Y.reshape(-1,1)
#a, b, c, d , e = -5, -5, 1, 1, 10
#ifndef __x_x_H__
#define __x_x_H__
#ifdef __cplusplus
extern "C"
{
#endif
class AlgFoo
{
public:
cmake_minimum_required(VERSION 2.8)
project(sample-testcv)
#这里使用 NO_DEFAULT_PATH 可以避免自动识别到安装的路径
find_package( OpenCV REQUIRED PATHS "/home/guohw/projects/opencv-all/build" NO_DEFAULT_PATH)
include_directories( ${OpenCV_INCLUDE_DIRS} )
message("opencv dir: " ${OpenCV_INCLUDE_DIRS})
add_executable(test_stereo_quasi test_QuasiDenseStereo.cpp )
@coder-ghw
coder-ghw / cmd.md
Last active February 18, 2024 22:49
cheatsheet

Batch Cheat Sheet

cmd-batch

For more information on a specific command, type HELP command-name

Command Description
ASSOC Displays or modifies file extension associations.
ATTRIB Displays or changes file attributes.