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
CFLAGS="-I$(brew --prefix zlib)/include -I$(brew --prefix jpeg)/include -I$(brew --prefix openjpeg)/include -I$(brew --prefix webp)/include -I$(brew --prefix lcms2)/include -I$(brew --prefix libtiff)/include -I$(brew --prefix freetype)/include -I$(brew --prefix libimagequant)/include" python ./setup.py build_ext --inplace --enable-zlib --enable-jpeg --enable-tiff --enable-freetype --enable-lcms --enable-webp --enable-webpmux --enable-jpeg2000 --enable-imagequant |
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 python | |
""" | |
DESCRIPTION | |
Prints the polynomials that describe a photoshop curve. | |
There are three curves (one per RGB channel) which you can later | |
use to make a custom filter for your image. | |
See http://www.weemoapps.com/creating-retro-and-analog-image-filters-in-mobile-apps | |
for the theory behind this method. |
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 instakit.processors.halftone import FloydSteinberg | |
import glob, os, sys | |
from PIL import Image | |
floydster = FloydSteinberg() | |
jpgs = glob.glob("/Users/fish/Documents/YO_DOGG/HOLZER/*.jpg") | |
images = [Image.open(impath) for impath in jpgs] | |
processed = [floydster.process(im) for im in images] | |
for p in processed: p.show() | |
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 python | |
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
import zipfile | |
import tempfile | |
import pylire | |
import shutil | |
import sys |
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 python | |
# encoding: utf-8 | |
# | |
# PyCheckMate, a PyChecker output beautifier for TextMate. | |
# Copyright (c) Jay Soffian, 2005. <jay at soffian dot org> | |
# Inspired by Domenico Carbotta's PyMate. | |
# Extensively overhauled for version 2.0 by Alexander Böhn. | |
# | |
# License: Artistic. | |
# |
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 python | |
# -*- coding: utf-8 -*- | |
# | |
# multiple_dispatch.py | |
# | |
# My version: | |
# https://gist.github.com/fish2000/1af4b852d20b7568a9b9c90fe2346b6d | |
# | |
# Forked from the originall by @wolfv: | |
# https://gist.github.com/wolfv/73f56e4a9cac84eea6a796fde3213456 |
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 | |
#: * `show` <formula> [<formula>...]: | |
#: Show the syntax-highlighted source of the specified formulae | |
function brew() { | |
"${HOMEBREW_PREFIX}/bin/brew" "$@" | |
} | |
pygmentize="$(which pygmentize)" |
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
PIPER-ALPHA:tmp$ brew install numpy --HEAD | |
Checking if we need to fetch /usr/local/Homebrew... | |
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/fish2000/homebrew-praxa... | |
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle... | |
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask... | |
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-completions... | |
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core... | |
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-dupes... | |
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-nginx... | |
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-php... |
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
PIPER-ALPHA:language_level[language_level_3]$ ./rebuild | |
+++ dirname ./rebuild | |
++ cd . | |
++ pwd | |
+ : /tmp/language_level | |
++ dirname /tmp/language_level | |
+ : /tmp | |
+ rm -rf /tmp/language_level/build | |
+ rm -rf /tmp/language_level/mypackage/__pycache__/ | |
+ rm -f /tmp/language_level/mypackage/mycymod.cpp |
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 pyls() { | |
if [ "$1" ]; then | |
attribute_count=$(py "len(dir(${1}))") | |
item_count=$(py "getattr(${1}, '__len__', lambda *a, **k: 0)()") | |
what_is_it=$(py "type(${1}).__name__") | |
echo -n "> Python ${what_is_it} “${1}” has ${item_count} member sub-items" | |
[ "${item_count}" -eq "0" ] && echo "" || echo ":" | |
# py ${1} | py -x '"+ %s" % x' -c 'print("")' | |
py ${1} | py -x '"+ %s" % x' | |
echo -n "> Python ${what_is_it} “${1}” has ${attribute_count} member attributes" |