Skip to content

Instantly share code, notes, and snippets.

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

Damien LaRocque IamPhytan

🦊
GitLabing / Pythoning / Rusting
View GitHub Profile
@IamPhytan
IamPhytan / diffbot_system.cpp
Created October 26, 2024 22:33 — forked from renderedSafe/diffbot_system.cpp
ROS2 Control Demos diffbot hardware interface publisher. Useful for micro-ROS hardware control.
// Copyright 2021 ros2_control Development Team
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@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 / 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
@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 / 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 / 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}