Skip to content

Instantly share code, notes, and snippets.


Gordon P. Hemsley GPHemsley

Block or report user

Report or block GPHemsley

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View dominant-color.js
function getDominantColor(aImg) {
let canvas = document.createElement("canvas");
canvas.height = aImg.height;
canvas.width = aImg.width;
let context = canvas.getContext("2d");
context.drawImage(aImg, 0, 0);
// keep track of how many times a color appears in the image
let colorCount = {};
GPHemsley / python_collections.mediawiki
Last active Aug 29, 2015
Table of collection data types in Python
View python_collections.mediawiki
container ordered members? unique members? immutable type? used for keys in
You can’t perform that action at this time.