Skip to content

Instantly share code, notes, and snippets.

from operator import itemgetter
from PIL import Image, ImageDraw, ImageFont
from matplotlib import font_manager
from multiprocessing import Pool
import numpy as np
import os.path
# Make a lowercase + uppercase alphabet.
alphabet = 'abcdefghijklmnopqrstuvwxyz'
@trigeorgis
trigeorgis / filter_through_command.py
Last active April 12, 2018 19:27 — forked from olifante/filter_through_command.py
Sublime Text 3: "Filter Through Command" plugin
#!/usr/bin/env python
# -*- coding: utf-8 -*-
## based on https://gist.github.com/1910413 updated for Sublime Text 3
import sublime
import sublime_plugin
import subprocess
class PromptRunExternalCommand(sublime_plugin.WindowCommand):
@trigeorgis
trigeorgis / gist:1211149
Created September 12, 2011 12:33
Stream.js addition
drop: function(howmany){
if ( howmany <= 0 ) {
if ( this.empty() ) {
return new Stream();
}
return new Stream( this.head(), this.tail() );
}
// Otherwise we could check only once if it's empty and omit the exception.