Skip to content

Instantly share code, notes, and snippets.

View taylorlapeyre's full-sized avatar

Taylor Lapeyre taylorlapeyre

View GitHub Profile
@zollinger
zollinger / getcolor.py
Last active November 6, 2024 08:18
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))
@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 %}
@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;
}
@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