Skip to content

Instantly share code, notes, and snippets.

@coder-ghw
Last active January 16, 2024 08:04
Show Gist options
  • Save coder-ghw/521585e074bdab35a561d57d76361001 to your computer and use it in GitHub Desktop.
Save coder-ghw/521585e074bdab35a561d57d76361001 to your computer and use it in GitHub Desktop.
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}
############################# 一个例子##########################
path_result_base=$path_base/debug_output
rm -rf $path_result_base
mkdir $path_result_base
for folder_name in $(ls $path_images)
do
files_depth=($path_images/$folder_name/Depth/*)
file_depth=${files_depth[0]}
echo $file_depth
IFS="/"; read -ra ss <<< "$file_depth"; unset IFS
result_name=${ss[-3]}_${ss[-1]}
path_result=$path_result_base/${result_name:0:-4}/
echo $path_result
mkdir -p $path_result
./bin/$test_name $file_depth --ir $file_ir --config $path_config --n 1 --thread=1 --depth_scale 16 --path_results $path_result
done
############################# 跑一个runner ##########################
run_name=$1
shift 1
params=$@
echo "runner name: $run_name"
echo "params: $params"
############################## mount to nas###########################
sudo mount -t cifs -o uid=<user ID>,username=<nas username>,password=<your nas password>,iocharset=utf8 //192.168.xx.x/dir/ <your local path>
{
"configurations": [
{
"name": "x64-Release",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [
"msvc_x64_x64"
],
"variables": [
{
"name": "WITH_CPU_TRACE",
"value": "OFF",
"type": "BOOL"
},
{
"name": "CMAKE_EXPORT_COMPILE_COMMANDS",
"value": "ON",
"type": "BOOL"
}
]
}
]
}
{
"version": "0.2.1",
"defaults": {},
"configurations": [
{
"type": "default",
"project": "CMakeLists.txt",
"projectTarget": "test_core_device.exe (E:\\guohw\\projects\\qvision\\core\\build\\bin\\test_core_device.exe)",
"args": ["0.9", "8000", "100", "gpu", "jancsi", "4", "0", "0"],
"name": "TEST:test_core_device"
}
]
}
{
"vim.insertModeKeyBindings": [
{
"before": [
"j",
"j"
],
"after": [
"<Esc>"
]
}
],
"vim.normalModeKeyBindings": [
{
"before": [
"<C-h>"
],
"after": [
"<C-w>",
"h"
]
},
{
"before": [
"<C-j>"
],
"after": [
"<C-w>",
"j"
]
},
{
"before": [
"<C-k>"
],
"after": [
"<C-w>",
"k"
]
},
{
"before": [
"<C-l>"
],
"after": [
"<C-w>",
"l"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment