This file contains hidden or 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
; Pseudocode for the procedure I used to create a backsplash | |
; composed of pennies for the kitchen | |
(ns com.quephird.penny-backsplash | |
(:gen-class) | |
) | |
(def oak-moulding | |
{:product-desc "http://www.lowes.com/pd_35579-1487-105_0__?productId=3041880" | |
:purpose "To cover up gaps between the countertop and the walls"} |
This file contains hidden or 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 fizzbuzz) | |
(defn divides? [n d] | |
(zero? (rem n d))) | |
(defn fizz [n] | |
(if (divides? n 3) "fizz")) | |
(defn buzz [n] | |
(if (divides? n 5) "buzz")) |
This file contains hidden or 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 untitled-20130106 | |
(:use quil.core clojure.pprint)) | |
(def screen-w 1920) | |
(def screen-h 1050) | |
(defn- random-rgba [] | |
[0 | |
(random 255) | |
(random 255) |
This file contains hidden or 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 balls-of-fire-inspiration | |
(:use quil.core quil.applet)) | |
(def screen-w 1920) | |
(def screen-h 1080) | |
(defn- star [c l w] | |
(let [graphics (current-applet) | |
lobe-count 8 | |
control-point-length (* l 0.8)] |
This file contains hidden or 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
class Painful { | |
public static void main(String[] args) { | |
int[] firstTenIntegers = {1,2,3,4,5,6,7,8,9,10}; | |
Functional squareFunction = new Functional() { | |
public int apply(int x) { | |
return x*x; | |
}}; | |
Functional cubeFunction = new Functional() { |
This file contains hidden or 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
(doseq [s (map | |
(fn [cs] (apply str cs)) | |
(partition 40 | |
(map | |
(fn [n] (str (char (int (+ 9581 (rand-int 3)))))) | |
(range 1 1001))))] | |
(println s)) | |
╮╭╯╭╮╮╰╮╮╮╭╮╰╰╯╭╮╮╰╮╯╰╰╭╰╰╮╮╭╮╮╭╯╯╰╮╮╮╯╰ | |
╭╰╮╰╰╯╯╭╭╮╮╯╰╭╰╮╯╯╰╭╭╮╰╭╯╯╭╮╭╮╭╯╯╯╭╮╯╯╭╭ |
This file contains hidden or 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 animated-gif-from-noaa-images | |
(:require [clojure.string :as string] | |
[clj-http.client :as client]) | |
(:import [java.io File] | |
[java.net URL] | |
[java.awt.image BufferedImage] | |
[javax.imageio IIOImage ImageIO ImageTypeSpecifier ImageWriter ImageWriteParam] | |
[javax.imageio.metadata IIOMetadata IIOMetadataNode])) | |
; Satellite image names are listed in the vis_names.txt file |
This file contains hidden or 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 ford-circles | |
(:use quil.core quil.applet)) | |
(def screen-w 1920) | |
(def screen-h 1080) | |
; This would likely be deemed a hack by a seasoned mathematician; | |
; I am sure there is a more efficient incantation to produce these numbers. | |
(defn farey-seq [n] | |
(apply sorted-set |
This file contains hidden or 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 easter-eggs | |
(:use quil.core quil.applet)) | |
(def screen-w 1920) | |
(def screen-h 1080) | |
(def easter-colors | |
[[255 170 255] ; pink | |
[253 198 137] ; orange | |
[255 255 170] ; yellow |
This file contains hidden or 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
load(draw); | |
draw_polar(expr,range) := | |
block([theta_var: range[1]], | |
draw2d(background_color = black, | |
xtics = 'none, | |
ytics = 'none, | |
axis_top = false, | |
axis_bottom = false, | |
axis_left = false, |