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
syntax="proto2"; | |
import "dccl/option_extensions.proto"; | |
message SingleImageSummary { | |
option (dccl.msg) = { codec_version: 4 | |
id: 124 | |
max_bytes: 100 }; | |
required int32 image_id = 1 [(dccl.field) = { min: 0 max: 65535 }]; | |
required double latitude = 2 [(dccl.field) = { units { system: "angle::degree" derived_dimensions: "plane_angle" } | |
min: -90 |
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 exifread | |
from pathlib import Path | |
import argparse | |
def _get_if_exist(data, key): | |
if key in data: | |
return data[key] | |
return None | |
def get_exif(filename): |
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 rosbag, csv | |
import string | |
import argparse | |
from pathlib import Path | |
""" | |
Extract messages from bagfiles into CSV files | |
Usage: | |
python rosbag2csv.py bagfiles [bagfiles ...] [--topics TOPICS [TOPICS ...]] |
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 filecmp | |
directory_cmp = filecmp.dircmp( | |
a="/media/oplab-source/configuration", | |
b="/media/remote/biocammap/Data/configuration", | |
hide=[".@__thumb"]) | |
def print_subdir(directory_cmp, level=0, full_tree=False): | |
left_only = directory_cmp.left_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
import torch | |
import numpy as np | |
powers_of_two = list(2**p for p in range(1, 9)) | |
print(powers_of_two) | |
print('-------- Using torch') | |
for M in powers_of_two: | |
for N in powers_of_two: | |
a = torch.rand(M, N) |
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
# install dependencies | |
sudo apt-get install qt5-default qtcreator libqt5xmlpatterns5-dev qtscript5-dev libeigen3-dev | |
git clone --recursive --branch MeshLab-2020.05 https://github.com/cnr-isti-vclab/meshlab.git | |
cd meshlab | |
# set build flags | |
QMAKE_FLAGS=('-spec' 'linux-g++' 'CONFIG+=release' 'CONFIG+=qml_release' 'CONFIG+=c++11' 'QMAKE_CXXFLAGS+=-fPIC' 'QMAKE_CXXFLAGS+=-fopenmp' 'QMAKE_CXXFLAGS+=-std=c++11' 'QMAKE_CXXFLAGS+=-fpermissive' 'INCLUDEPATH+=/usr/include/eigen3' "LIBS+=-L`pwd`/lib/linux-g++") | |
MAKE_FLAGS=('-j12') |
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
mean_xyz_m: [1.5000313520431519, -0.08760256320238113, 8.258567810058594] | |
mean_plane: [1.0, -5.104500695516541e-06, -2.2570870615480905e-05, -1.499910442280434] | |
plane_angle_std_deg: 0.027107068317437855 | |
plane_angle_mean_deg: 0.012027655943119862 | |
plane_angle_median_deg: 0.004789200110805726 | |
pitch_angle_std_deg: 0.024811587400379545 | |
pitch_angle_mean_deg: -0.0019246573604165722 | |
yaw_angle_std_deg: 0.016095586665442262 | |
yaw_angle_mean_deg: 0.0010355123576031083 | |
num_iterations: 100 |
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
# Save this in ~/.screenrc | |
# Use bash | |
shell /bin/bash | |
autodetach on | |
# Big scrollback | |
defscrollback 5000 |
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 [ $# -ne 2 ]; | |
then echo "USAGE: move_repo.sh OLD_REMOTE_URL NEW_REMOTE_URL" | |
exit | |
fi | |
CURR_DIR=`pwd` | |
OLD_REMOTE="$1" | |
NEW_REMOTE="$2" |
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 <iostream> | |
#include <string> | |
#include <cstring> | |
#include <vector> | |
#include <iomanip> // setw | |
std::string f2s(float p) { | |
unsigned char* pc = reinterpret_cast<unsigned char*>(&p); | |
return std::string(pc, pc + sizeof(float)); | |
} |
NewerOlder