This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import abc | |
class Source(metaclass=abc.ABCMeta): | |
@abc.abstractmethod | |
def read(self) -> int: | |
raise NotImplementedError() | |
class Sink(metaclass=abc.ABCMeta): | |
@abc.abstractmethod | |
def write(self, integer: int): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from textwrap import wrap | |
from scipy.spatial import cKDTree | |
from PIL import Image | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import argparse | |
from pathlib import Path | |
def hex_to_rgb(hex: str): | |
return [int(x, 16) for x in wrap(hex.lstrip("#"), 2)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -g default-terminal "xterm-256color" | |
set-option -ga terminal-overrides ",xterm-256color:Tc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setup() { | |
createCanvas(400, 400); | |
} | |
function drawLine(x0, y0, x1, y1, freq) { | |
var dx = abs(x1 - x0); | |
var sx = x0 < x1? 1: -1; | |
var dy = -abs(y1 - y0) | |
var sy = y0 < y1? 1: -1 | |
var err = dx + dy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
ps -ef | tail -n 20 > /tmp/10_procs | |
flag=0 | |
mkdir -p /tmp/procs_folder/ | |
while read -r uuid pid ppid _; do | |
if [[ flag -eq 0 ]]; then |