Skip to content

Instantly share code, notes, and snippets.

View raldone01's full-sized avatar

raldone01

View GitHub Profile
@raldone01
raldone01 / multivid.py
Created October 9, 2023 05:54
multivid.py
import argparse
import cv2
import numpy as np
import os
import sys
import logging # Step 2: Import the logging library
# Initialize logging
logging.basicConfig(level=logging.INFO)
@raldone01
raldone01 / CMakeLists.txt
Created September 15, 2023 21:30
Fast LCM and GCD
cmake_minimum_required(VERSION 3.10.2)
project(c_lcm)
set(CMAKE_CXX_STANDARD 17)
add_executable(c_lcm main.cpp)
@raldone01
raldone01 / chargo-check.png
Last active June 25, 2022 20:54
Rustc: Consider restricting Self: Sized, Self: Sized,
chargo-check.png
@raldone01
raldone01 / Parent.kt
Last active August 29, 2019 18:14
I like extension functions
interface Parent {
/**
* This property is null when this isn't attached to anything.
*/
val parent: Parent?
val children: List<Parent>
/**
* @throws NoMutationAllowedException
timespec timespecDiff(timespec start, timespec stop) {
timespec ret;
ret.tv_sec = stop.tv_sec - start.tv_sec;
if(start.tv_nsec > stop.tv_nsec) {
ret.tv_nsec = 1000000000 - start.tv_nsec + stop.tv_nsec;
ret.tv_sec--;
} else
ret.tv_nsec = stop.tv_nsec - start.tv_nsec;
return ret;
}