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
"""Process a lisp file to extract useful data.""" | |
import sys, os | |
from collections import namedtuple | |
substitutions = ( | |
# Expand quote literal to quote fn | |
("'(", "(quote "), | |
# Expand parens with white-space for splitting | |
(')', ' ) '), | |
('(', ' ( '), |
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
"""Some composable HTML functions, and pre-built widgets.""" | |
from functools import partial | |
from itertools import chain | |
#---------------------------- Generic HTML ------------------------------------ | |
self_closing = ["area", "base", "br", "col", "command", "embed", "hr", "img", | |
"input", "keygen", "link", "meta", "param", "source", "track", | |
"wbr"] |
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
import bpy | |
target = bpy.context.object | |
mesh = target.data | |
#tmat = target.matrix_world | |
#bpy.ops.object.visual_transform_apply() | |
#bpy.ops.ed.undo() | |
# Get a list of the objects bounding box z-coords | |
zs = [point[2] for point in target.bound_box] | |
bottom = min(zs) |
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
(ns my-test | |
(use [midje.sweet]) | |
(require [clojure.core.async :as async :refer :all]) | |
(import [javax.swing JFrame JButton JPanel SwingUtilities]) | |
(import [java.awt Color Dimension]) | |
(import [java.awt.event ActionListener WindowAdapter KeyListener])) | |
(defn map-chan [f in] | |
(let [c (chan)] |