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
(defn transform-n | |
[n words] | |
(->> words | |
(partition n 1) | |
(reduce (fn [acc [w next-w]] | |
(update-in acc | |
[w next-w] | |
(fnil inc 0))) | |
{}))) |
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 conditionless-fizzbuzz.core) | |
(defn if-divisible-by-n | |
[n then-fn else-fn] | |
(fn [x] | |
(let [remainder (mod x n) | |
chosen-fn ({0 then-fn} remainder else-fn)] | |
(chosen-fn x)))) | |
(def fizzbuzzer |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfXZDic/NA+CUb5poRGpSOLct5T5rNaXeRuPvGeGWZkH05c4FvvpUbCjT/OEHYJzgsJI99iCTKvusC9oG5uSKPYT/7p8m+vWvhX3wyT0zOhuyDMuGIMeWq6JYEqUhMi180Z/tn/Pl3gDXD7nGGi7lwu4BgDoHw+bpBjutXzToCqxTsagOOxVcGi+Gv/SOXGeXH/18nxThJNkffoQmGSVbeTymuxa73n5dfwl/HEfeAj/JaZ30gb+6b8+hO/JyZdgit7+FJHaw+OipuwdA/G2FzYKOfCCzbAURMJqpZy8XLiV5VxVorgKOWerYeXqw01mjWoNp7/gkIH085w4T0XUdz [email protected] |
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
#include <avr/interrupt.h> | |
#include <avr/io.h> | |
#include <avr/pgmspace.h> | |
#define __spi_clock 13 // SCK - hardware SPI | |
#define __spi_latch 10 | |
#define __spi_data 11 // MOSI - hardware SPI | |
#define __spi_data_in 12 // MISO - hardware SPI (unused) | |
#define __brightness_levels 32 // 0...15 above 28 is bad for ISR ( move to timer1, lower irq freq ! ) | |
#define __max_brightness __brightness_levels-1 |
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 examples.mountains | |
(:require [c2po.core :refer [c2po]] | |
[c2po.geom :as geom] | |
[c2po.scale :as scale] | |
[c2po.livereload-server :refer [render!]])) | |
(def animals | |
;; episode 2: mountains | |
{:gelada-baboon {:pop 200000, :child-rate 0.5, :unit 15} | |
:walia-ibex {:pop 500, :child-rate 1, :unit 10} |
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
Uncaught TypeError: Object div.child,[object Object] has no method 'match' main.js:25735 | |
singult.coffee.canonicalize_hiccup main.js:25735 | |
singult.coffee.canonicalize main.js:25725 | |
(anonymous function) main.js:25751 | |
singult.coffee.canonicalize_hiccup main.js:25744 | |
singult.coffee.canonicalize main.js:25725 | |
merge_BANG_ main.js:26213 | |
bug main.js:28309 | |
goog.events.Listener.handleEvent main.js:27214 | |
goog.events.fireListener main.js:27548 |
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 c2-cljs-examples.boxplots | |
(:use-macros [c2.util :only [bind!]]) | |
(:require [c2.core :as c2] | |
[c2.event :as event] | |
[c2.scale :as scale] | |
[c2.svg :as svg]) | |
(:use [c2.maths :only [extent]])) | |
(defn crisp | |
"This makes things look nice and sharp using a magic SVG attribute." |
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 quil-kinect.core | |
(import SimpleOpenNI.SimpleOpenNI) | |
(:use quil.core | |
[quil.applet :only [current-applet applet-close]])) | |
(def kinect (atom nil)) | |
(defn setup [] | |
(let [_ (println (.getClassLoader clojure.lang.IDeref)) | |
kinect-obj (new SimpleOpenNI (current-applet)) |
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
Exception in thread "Animation Thread" java.lang.ClassCastException: quil.applet.proxy$processing.core.PApplet$IMeta$c506c738 cannot be cast to clojure.lang.IDeref | |
at clojure.core$deref.invoke(core.clj:2078) | |
at quil_kinect.core$setup.invoke(NO_SOURCE_FILE:1) | |
at clojure.lang.Var.invoke(Var.java:397) | |
at quil.applet$applet$setup_fn__2190.invoke(applet.clj:192) | |
at quil.applet$applet$fn__2265.invoke(applet.clj:290) | |
at quil.applet.proxy$processing.core.PApplet$IMeta$c506c738.setup(Unknown Source) | |
at processing.core.PApplet.handleDraw(Unknown Source) | |
at quil.applet.proxy$processing.core.PApplet$IMeta$c506c738.handleDraw(Unknown Source) | |
at processing.core.PApplet.run(Unknown Source) |
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
drwxr-xr-x 2 ciel ciel 4096 2012-03-12 00:11 . | |
drwxr-xr-x 3 ciel ciel 4096 2012-03-12 00:09 .. | |
-rw-r--r-- 1 ciel ciel 401 2012-03-12 00:08 authorized_keys | |
-rw------- 1 ciel ciel 1679 2012-03-12 00:10 id_rsa | |
-rw-r--r-- 1 ciel ciel 390 2012-03-12 00:10 id_rsa.pub | |
-rw-r--r-- 1 ciel ciel 884 2012-03-12 00:11 known_hosts |