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
| // From the excellent answer here : https://stackoverflow.com/a/17955149/7036639 | |
| /* | |
| * daemonize.c | |
| * This example daemonizes a process, writes a few log messages, | |
| * sleeps 20 seconds and terminates afterwards. | |
| */ | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> |
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 | |
| # https://auvidea.com/firmware/ | |
| path_jetpack="./64_TX2/" | |
| backup_folder="./64_TX2_backup_files/" | |
| patch_name="auvidea-kernel-J90-J120-v1.6" | |
| wget "http://www.auvidea-pcb.com/firmware/tx2/1.6/${patch_name}.zip" | |
| unzip "${patch_name}.zip" |
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://ubuntuforums.org/showthread.php?t=1145596 | |
| # Make mounting point | |
| sudo mkdir /mnt/mountpoint # Pick the name for "mountpoint" and use it throughout | |
| sudo chown -R ${USER}: /mnt/mountpoint # Example: sudo chown -R john: /mnt/mountpoint | |
| # find UUID | |
| sudo blkid | grep "sdb1" # assuming it's sdb1 | |
| # edit fstab |
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
| #define MAJOR_VER 1 | |
| #define MINOR_VER 0 | |
| #ifdef _WIN32 | |
| #define WINDOWS | |
| #endif | |
| #ifdef WINDOWS | |
| #include <Windows.h> | |
| #include <delayimp.h> |
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 | |
| while true | |
| do | |
| random_str=" $(cat /dev/urandom | tr -dc 'a-zA-Z' | fold -w 15 | head -n 1)" | |
| echo $random_str | |
| echo -ne " $random_str" | xclip -selection c | |
| sleep 0.1 | |
| done |
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 | |
| set -e | |
| NONE='\x1b[m' | |
| BOLD='\x1b[1m' | |
| RED='\x1b[31m' | |
| ITALIC='\x1b[3m' | |
| tmp_folder="/tmp/cudnn_install" |
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
| void Transform2Matrix4f(const sl::Matrix4f &array_, Eigen::Matrix4f &mat_) { | |
| for(int y = 0; y < 4; y++) { | |
| for(int x = 0; x < 4; x++) | |
| mat_(y, x) = array_.m[y * 4 + x]; | |
| } | |
| } | |
| void Matrix4f2Transform(const Eigen::Matrix4f &mat_, sl::Matrix4f &array_) { | |
| for(int y = 0; y < 4; y++) { | |
| for(int x = 0; x < 4; x++) |
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 | |
| if [[ $EUID -ne 0 ]]; then | |
| echo "This script must be run as root" | |
| exit 1 | |
| fi | |
| enable_fan(){ | |
| # turn on fan for safety | |
| echo "Enabling fan for safety..." |
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 | |
| tegra_detection=$( | |
| case "$(cat /sys/module/tegra_fuse/parameters/tegra_chip_id)" in | |
| ("64") echo "tegra_k1" ;; | |
| ("33") echo "tegra_x1" ;; | |
| ("24") echo "tegra_x2" ;; | |
| (*) echo "unknown" ;; | |
| esac) |
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 numpy as np | |
| import cv2 | |
| cap = cv2.VideoCapture(0) # depending on the ZED ID | |
| while(True): | |
| ret, frame = cap.read() # Capture SbS frames | |
| height, width = frame.shape[:2] | |
| left = frame[0:height,0:int(width*0.5)] |