This file contains 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 | |
# check which cuda version has been linked | |
# handles path like "/usr/local/lib/foo*.so*" | |
for lib in "$@"; do | |
cuda_version=$(ldd "$lib" | grep -Po '(?<=libcudart.so.)\d.\d.' | head -1); | |
if [ -n "$cuda_version" ]; then | |
printf "CUDA $cuda_version : $lib\n" | |
fi |
This file contains 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
#include <stdio.h> | |
#include <string.h> | |
#include <opencv2/opencv.hpp> | |
int main(int argc, char **argv) { | |
cv::VideoCapture zed_cap(0); | |
cv::Mat sbs; |
This file contains 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 | |
usage() { | |
echo "This script needs the serial number as argument like this :" | |
echo "bash dl_zed_calib.sh 1010 [path/]" | |
exit 1 | |
} | |
conf_path="/usr/local/zed/settings/" |
This file contains 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/sh | |
# Ressource: https://www.blang.io/posts/2015-04_docker-tooling-latex/ | |
## Variables : | |
# https://hub.docker.com/r/fermiumlabs/latex-docker/ | |
docker_img="fermiumlabs/latex-docker" | |
# The main file is named 'Main.tex' | |
main_doc="Main" | |
# This include full compilation (with bibtex) |
This file contains 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
# SETTING UP : | |
# Generate an application token for your dropbox account and set it as environment variable named "DROPBOX_TOKEN" | |
# - https://blogs.dropbox.com/developers/2014/05/generate-an-access-token-for-your-own-account/ | |
# - https://confluence.atlassian.com/bitbucket/environment-variables-794502608.html | |
# Edit TEX_FILE (see below) according to the main tex file name | |
image: fermiumlabs/latex-docker:latest | |
pipelines: | |
custom: # Manually only |
This file contains 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 | |
# pre-receive hook that check for merge artefacts such as '<<<<<<<' or '>>>>>>>' | |
# Possible improvements : https://gist.github.com/hartfordfive/9670011#gistcomment-2045250 | |
COMMAND="grep -RI '<<<<<<<\|>>>>>>>'" | |
TEMPDIR=`mktemp -d` | |
# See https://www.kernel.org/pub/software/scm/git/docs/githooks.html#pre-receive |
This file contains 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)] |
This file contains 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 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 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++) |
OlderNewer