Skip to content

Instantly share code, notes, and snippets.

@Michaelgathara
Michaelgathara / main.rs
Created February 20, 2024 09:43
overlapping lines problem
pub mod overlapping_line {
#[derive(Debug, Clone)]
pub enum Linetree {
Empty,
Filled,
Node {
pivot: i64,
left: Box<Linetree>,
right: Box<Linetree>,
}
(define (compose-list fs)
(lambda (x)
(foldr (lambda (f acc) (f acc)) x fs)))
(define (add1 x) (+ x 1))
(define (number->string x) (number->string x))
((compose-list (list number->string add1)) 3)
# sudo apt install -y && sudo apt-get -y install libcogl-pango-dev && pip install manim
from manim import *
from math import *
class KleinBottle(ThreeDScene):
def construct(self):
def klein_bottle(u, v):
u = u * 2 * PI
v = v * 2 * PI
half = (u < PI)
@Michaelgathara
Michaelgathara / process.py
Created December 3, 2024 16:11
Take a video and tear it down into frames that have faces then classify the person's emotions
import cv2
import os
import glob
from deepface import DeepFace
videos_folder = 'videos/'
output_folder = 'output_frames/'
if not os.path.exists(output_folder):
os.makedirs(output_folder)
@Michaelgathara
Michaelgathara / time_picker.html
Created September 1, 2025 21:15
Circular IOS-Like Time Picker
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>iOS Time Picker</title>
<style>
html,
body {
height: 100%;