Skip to content

Instantly share code, notes, and snippets.

View taylorlapeyre's full-sized avatar

Taylor Lapeyre taylorlapeyre

View GitHub Profile
@DapperJohn
DapperJohn / PseudoTwo
Created November 5, 2013 18:42
PseudoCode for two
MinimumHeap(A){
return A[1];
}
ExtractMin(A){
if (heap-size[A] < 1) {
then error ``heap underflow''
min <- A[1]
A[1] <- A[heap-size[A]]
heap-size[A] <- heap-size[A] - 1
@daneden
daneden / dabblet.css
Created June 25, 2012 14:11
Multi-level dropdown menus
/**
* Multi-level dropdown menus
*/
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
@joelverhagen
joelverhagen / README.md
Created February 12, 2012 02:14
Jekyll YouTube Embed Plugin

This is a plugin meant for Jekyll.

Example use:

Easily embed a YouTube video. Just drop this file in your _plugins directory.

{% youtube oHg5SJYRHA0 %}
@zollinger
zollinger / getcolor.py
Last active March 11, 2023 15:57
Simple way to get dominant colors from an image in Python
from PIL import Image, ImageDraw
import argparse
import sys
def get_colors(image_file, numcolors=10, resize=150):
# Resize image to speed up processing
img = Image.open(image_file)
img = img.copy()
img.thumbnail((resize, resize))