Skip to content

Instantly share code, notes, and snippets.

View IamPhytan's full-sized avatar
🦊
GitLabing / Pythoning / LaTeXing

Damien LaRocque IamPhytan

🦊
GitLabing / Pythoning / LaTeXing
View GitHub Profile
@IamPhytan
IamPhytan / mcap_to_csv.py
Created January 23, 2023 16:36
MCAP to CSV
#!/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
@IamPhytan
IamPhytan / cookbook-mcap.md
Last active December 22, 2022 17:09
MCAP Cookbook

MCAP

MCAP cheatsheet

Cookbook

Python

Get informations about a mcap

@IamPhytan
IamPhytan / filepath.py
Created December 19, 2022 16:17
Filepath : Pathlib-like path management for Python 3.7
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):
@IamPhytan
IamPhytan / kicad-v6-hotkeys-cheatsheet.md
Created June 23, 2022 15:51
KiCad v6 Hotkeys Cheatsheet

KiCad v6 Hotkeys

Symbol Editor

Action Key
Add pin P
Edit pin click + E
Move pin click + M
Rotate pin click + R
@IamPhytan
IamPhytan / 555-timer.tex
Created January 14, 2022 05:00
555 Timer Block Diagram using CircuiTikZ
% !TEX program = pdflatex
% !TEX options = --shell-escape -synctex=1 -interaction=nonstopmode -file-line-error "%DOC%"
\documentclass[preview]{standalone}
% Block diagrams & Flowcharts
% ========================================
\usepackage{tikz}
@IamPhytan
IamPhytan / vlc_media_player.py
Last active March 27, 2022 06:54
Code to control VLC Media Player with your hand (the VLC part)
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"
)
@IamPhytan
IamPhytan / install-opencv-contrib-python.sh
Created October 1, 2020 16:45
OpenCV Contrib Python Dependencies Installation for Raspberry Pi
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
@IamPhytan
IamPhytan / custom.js
Last active September 14, 2022 17:56
Jupyter Notebook Custom Keyboard Shortcuts / JetBrains keymap ?
// ~/.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