This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -e -x | |
| SILENT=0 | |
| for arg in "$@"; do | |
| arg_l=$(echo "$arg" | tr '[:upper:]' '[:lower:]') | |
| if [ "$arg_l" == "silent" ]; then | |
| SILENT=1 | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Search recursively text in files | |
| grep -rIn "My text" ../path/to/folder/ | |
| # Replace recursively matching string in all text files | |
| find ../path/to/folder/ -type f -exec sed -i 's/My string to replace/My new string/g' {} + | |
| # Git merge without issues from EOL (win <-> unix for instance) | |
| git merge -s recursive -Xignore-space-at-eol my_branch | |
| # ccmake setup ubuntu |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| if [ "$#" -ne 1 ]; then | |
| echo "Please provides absolute path with all the TensorRT archives" | |
| fi | |
| arrayName=($(ls "${1}"/TensorRT*.*)) | |
| working_folder="${1}/repack" | |
| mkdir -p "${working_folder}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| if [ "$EUID" -ne 0 ] | |
| then echo "Please run as root" | |
| exit | |
| fi | |
| # https://apt.kitware.com/ | |
| if [ -n "$(uname -a | grep Ubuntu)" ]; then | |
| apt-get update ; apt-get install lsb-release apt-transport-https ca-certificates gnupg software-properties-common wget -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # docker run -it nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04 bash | |
| # then inside the image : | |
| apt update ; apt install git cmake libopencv-dev -y | |
| git clone https://github.com/AlexeyAB/darknet.git ; cd darknet | |
| git checkout 378d49e1c33cc8c064cb27c99815de0698b2ad93 | |
| mkdir build_cmake; cd build_cmake; cmake .. | |
| make -j4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| version="3.14.0" | |
| linux_name="cmake-${version}-Linux-x86_64" | |
| url="https://github.com/Kitware/CMake/releases/download/v${version}/${linux_name}.tar.gz" | |
| wget ${url} -O /tmp/cmake.tar.gz -q --show-progress | |
| cd /tmp/ | |
| tar -xf cmake.tar.gz | |
| sudo cp -r "${linux_name}/bin" /usr/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Assume coco folder from YOLO | |
| coco_original_path="/path/to/coco" | |
| coco_new_path="/path/to/coco_customclass" | |
| mkdir -p ${coco_new_path} | |
| cp -R ${coco_original_path}/annotations ${coco_new_path}/ | |
| cp -R ${coco_original_path}/common ${coco_new_path}/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import cv2 | |
| import pyzed.camera as zcam | |
| import pyzed.types as tp | |
| import pyzed.core as core | |
| import pyzed.defines as sl | |
| def main(): | |
| print("Running...") | |
| init = zcam.PyInitParameters() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #https://askubuntu.com/a/470636/609717 | |
| # Install package | |
| sudo apt install -y ccache | |
| # Update symlinks | |
| sudo /usr/sbin/update-ccache-symlinks | |
| # Prepend ccache into the PATH | |
| echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a ~/.bashrc |