MCAP
Cookbook
Python
Get informations about a mcap
#!/usr/bin/env python3 | |
import argparse | |
from collections import OrderedDict | |
from pathlib import Path | |
from typing import Dict, Tuple, Union | |
import pandas as pd | |
from mcap.reader import McapReader, make_reader | |
from mcap.records import Channel, Statistics | |
from mcap.summary import Summary |
from os import path | |
class FilePath: | |
def __init__(self, complete_path): | |
self.folder, self.filename = path.split(complete_path) | |
self.filestem, self.ext = path.splitext(self.filename) | |
self.path = complete_path | |
self.csv_type = self.filestem.rsplit("_", 1)[-1] | |
def __repr__(self): |
Action | Key |
---|---|
Add pin | P |
Edit pin | click + E |
Move pin | click + M |
Rotate pin | click + R |
% !TEX program = pdflatex | |
% !TEX options = --shell-escape -synctex=1 -interaction=nonstopmode -file-line-error "%DOC%" | |
\documentclass[preview]{standalone} | |
% Block diagrams & Flowcharts | |
% ======================================== | |
\usepackage{tikz} |
import pafy | |
import vlc | |
import time | |
from enum import IntEnum, auto | |
import logging | |
logging.basicConfig( | |
level=logging.DEBUG, format="[%(levelname)s]: %(asctime)s:%(module)s:%(message)s" | |
) |
sudo apt update && sudo apt upgrade | |
sudo apt install -y build-essential cmake pkg-config | |
sudo apt install -y libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev | |
sudo apt install -y libavcodec-dev libavformat-dev libswscale-dev libv4l-dev | |
sudo apt install -y libxvidcore-dev libx264-dev | |
sudo apt install -y libfontconfig1-dev libcairo2-dev | |
sudo apt install -y libgtk2.0-dev | |
sudo apt install -y libatlas-base-dev gfortran |
// ~/.jupyter/custom/custom.js | |
/** | |
* | |
* Duplicate a current line in the Jupyter Notebook | |
* Used only CodeMirror API - https://codemirror.net | |
* | |
**/ | |
CodeMirror.keyMap.pcDefault["Ctrl-D"] = function(cm){ | |
// get a position of a current cursor in a current cell |