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
qpdf --qdf --object-streams=disable $1 $1.tmp # uncompress /FlateDecode sections | |
perl -pe 's/(?<=\/T \()(.*?)(?=\))/ "x" x length($1) /e' $1.tmp > $1.tmp2 # remove /T commands containing author name in comments | |
qpdf --compress-streams=y $1.tmp2 $1.tmp3 # recompress streams | |
qpdf --empty --pages $1.tmp3 1-z -- $1.anonymous.pdf # remove document metadata (this also removes whole comments) | |
rm $1.tmp* # cleanup |
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
from __future__ import print_function | |
import numpy as np | |
import scipy.linalg | |
from scipy.odr import * | |
import matplotlib as mpl | |
from mpl_toolkits.mplot3d import Axes3D | |
from matplotlib import pyplot as plt | |
import sys | |
import time |
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
update_deb_from_github() { | |
repo=$1 # will use github.com/repos/${repo}/releases, so set to e.g. BoostIO/boostnote | |
pkg=$2 # name of the Deiban package e.g. apt can use, so e.g. boostnote | |
deb_type=$3 # a substring of the deb file on github releases which uniquely tells the requested deb from other deb files on the latest releases page | |
version_installed=$(LANG=C aptitude show boostnote | grep Version | grep -o '[0-9]\{1,2\}\.[0-9]\{1,2\}\.[0-9]\{1,2\}') | |
download_link=$(curl -s https://api.github.com/repos/${repo}/releases/latest | jq -r ".assets[] | .browser_download_url" | grep "${deb_type}.*\.deb") | |
version_upstream=$(echo ${download_link} | grep -o '[0-9]\{1,2\}\.[0-9]\{1,2\}\.[0-9]\{1,2\}' | head -n1) | |
if [[ "${version_installed}" != "${version_upstream}" ]]; then | |
wget -O "/tmp/${pkg}.deb" "${download_link}" |
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 | |
# BSD 3-clause license, copyright Martin Pecka @ 2019 | |
# This script outputs a command that will revert all packages from non-PPA versions to their latest PPA version. | |
# This may be handy i.e. for finding packages for which you installed a newer version from a .deb file, or after | |
# incompletely removing a PPA. | |
export LC_ALL=C |
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 | |
# Based on the script from https://forum.odroid.com/viewtopic.php?t=29298 | |
# Changes to that script are released under BSD license (c) Martin Pecka, 2019. | |
# raidmgr_static can be downloaded here: https://wiki.odroid.com/_media/accessory/add-on_boards/xu4_cloudshell2/raidmgr_static_cloudshell2.zip | |
RAID_MANAGER="/usr/bin/raidmgr_static" | |
STATUS="$(echo -e "SR C0\nEX\n" | $RAID_MANAGER)" |
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
Subprocess > gazebo:make `cd /media/data/gazebo/build/gazebo; catkin build --get-env gazebo | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd -` | |
[gazebo:make] /usr/bin/cmake -H/media/data/gazebo/src/gazebo -B/media/data/gazebo/build/gazebo --check-build-system CMakeFiles/Makefile.cmake 0 | |
[gazebo:make] /usr/bin/cmake -E cmake_progress_start /media/data/gazebo/build/gazebo/CMakeFiles /media/data/gazebo/build/gazebo/CMakeFiles/progress.marks | |
[gazebo:make] /usr/bin/make -f CMakeFiles/Makefile2 all | |
[gazebo:make] make[1]: Vstupuje se do adresáře „/media/data/gazebo/build/gazebo“ | |
[gazebo:make] /usr/bin/make -f deps/opende/ou/CMakeFiles/gazebo_opende_ou.dir/build.make deps/opende/ou/CMakeFiles/gazebo_opende_ou.dir/depend | |
[gazebo:make] /us |
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
# Distributed under the OSI-approved BSD 3-Clause License. | |
# Base on https://github.com/vector-of-bool/CMakeCM/blob/master/modules/FindFilesystem.cmake | |
#[=======================================================================[.rst: | |
FindFilesystem | |
############## | |
This module supports the C++17 standard library's filesystem utilities. Use the | |
:imp-target:`std::filesystem` imported target to enable support of it. |
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
@version:3.19 | |
options { | |
chain_hostnames(no); | |
flush_lines(0); | |
stats_freq(0); | |
flush_lines(0); | |
log_msg_size(65536); | |
}; |
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
[ INFO]: pub1 a boost::shared_ptr<sensor_msgs::PointCloud2_<std::allocator<void> > > | |
[ INFO]: pub2 b boost::shared_ptr<sensor_msgs::PointCloud2_<boost::fast_pool_allocator<void, boost::default_user_allocator_new_delete, std::mutex, 32u, 0u> > > | |
[ INFO]: sub a boost::shared_ptr<sensor_msgs::PointCloud2_<std::allocator<void> > const> | |
[ INFO]: Received message a is equal to p | |
[ INFO]: sub b boost::shared_ptr<sensor_msgs::PointCloud2_<std::allocator<void> > const> | |
[ INFO]: Received message b is a new instance | |
[ WARN]: length PC2 with frame b | |
[ WARN]: write PC2 with frame b | |
[ WARN]: read PointCloud2 with frame b |
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 <ignition/transport.hh> | |
#include <ignition/msgs/pose_v.pb.h> | |
#include <ros/ros.h> | |
#include <nav_msgs/Odometry.h> | |
#include <tf2_ros/transform_broadcaster.h> | |
#include <tf2_ros/static_transform_broadcaster.h> | |
class GroundTruthPublisher | |
{ |