Skip to content

Instantly share code, notes, and snippets.

View protortyp's full-sized avatar
🚀

Christian Engel protortyp

🚀
  • Boston / Munich
  • 09:49 (UTC +02:00)
View GitHub Profile
@protortyp
protortyp / .tmux.conf
Created September 29, 2020 15:39
tmux config
setw -g window-status-current-format "#T(#I:#W#F)"
setw -g window-status-format "#T(#I:#W#F)"
# reload
bind r source-file ~/.tmux.conf
# move windows
bind -n C-S-Left swap-window -t -1
bind -n C-S-Right swap-window -t +1
@protortyp
protortyp / .nanorc
Created September 29, 2020 15:40
nanorc
set tabsize 2
set linenumbers
set smooth
set nohelp
set morespace
set tabstospaces
@protortyp
protortyp / extensions.sh
Created October 5, 2020 18:49
code extensions
code --install-extension 13xforever.language-x86-64-assembly
code --install-extension aaron-bond.better-comments
code --install-extension adpyke.codesnap
code --install-extension albymor.increment-selection
code --install-extension alexcvzz.vscode-sqlite
code --install-extension Angular.ng-template
code --install-extension attilabuti.vscode-mjml
code --install-extension bierner.emojisense
code --install-extension bierner.markdown-preview-github-styles
code --install-extension bradlc.vscode-tailwindcss
@protortyp
protortyp / .aliases
Last active October 5, 2020 18:56
aliases
alias bb='brave-browser'
alias t='tmux'
alias ta='tmux attach'
alias sagi='sudo apt-get install -y'
alias sagu='sudo apt-get update'
alias e='echo'
alias sl='exa'
#alias ls='exa'
alias sls='exa'
alias pwd='pwd -P'
@protortyp
protortyp / split_datasets.py
Created December 28, 2022 06:56
Split datasets into train,val,test subdirectories
"""
Splits a dataset of png images into train, val, and test sets.
Creates the folders and randomly chooses files.
"""
import os
import random
import argparse
try:
import termcolor
@protortyp
protortyp / extract_by_sim.py
Last active December 31, 2022 14:09
Filter images that are similar to a template
"""
Copy all images that look similar to a template to a different location.
This script finds similar areas in source images, crops the target area, and
stores the result in a target directory.
"""
import concurrent.futures
import cv2
import os
import multiprocessing
@protortyp
protortyp / tum_ds_2022.md
Created February 8, 2023 20:34 — forked from bttger/tum_ds_2022.md
My mdfc notes I collected throughout the semester with copied stuff from slides, papers, and the internet. NOT REVIEWED YET answers might be wrong and please don't copy them blindly

Overview

Why should you make a distributed system?

  • The system is inherently distributed (e.g. mobile devices like smartphones)
  • Reliability (some nodes can fail and the system keeps functioning; fault tolerance)
  • Performance (process data faster by utilizing multiple nodes or achieve better latency by requesting data from a nearby node)
  • The capacity of a single machine isn’t enough for the task (e.g. limited memory size, bandwidth, CPU cycles, etc.; scalability)

What are the Characteristics of distributed systems?

@protortyp
protortyp / daily_note.md
Created March 5, 2023 10:17
Obsidian Daily Note Template

<%* let weekNumber = moment().format('W') let year = moment().format('Y') let month = tp.date.now("MM-MMMM") let yesterday = tp.date.now("YYYY-MM-DD_ddd", -1) let today = tp.date.now("YYYY-MM-DD_ddd") let tag = "#cw" + weekNumber + "_" + year let prevTag = #cw${weekNumber - 1}_${year} let file_path = A_daily_notes/${year}/${month}/${today} %>

#!/usr/bin/env python
import rospy
import cv2
from sensor_msgs.msg import Image
from cv_bridge import CvBridge
from PyCapture2 import *
def image_publisher():
rospy.init_node('epiphan_image_publisher', anonymous=True)
pub = rospy.Publisher('image_topic', Image, queue_size=10)
import rospy
import tf
from geometry_msgs.msg import Quaternion
# Create a quaternion object
quat = Quaternion()
quat.x = 0.1
quat.y = 0.2
quat.z = 0.3
quat.w = 0.4