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
### Keybase proof | |
I hereby claim: | |
* I am henrygarner on github. | |
* I am henrygarner (https://keybase.io/henrygarner) on keybase. | |
* I have a public key ASDdfAARIXF3_ZRq1NP2ViflHC4PiGJvtNzBcDG8GJGfoAo | |
To claim this, I am signing this object: |
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 ^:figwheel-always barebones.core | |
(:require [om.core :as om :include-macros true] | |
[om.dom :as dom :include-macros true] | |
[reagent.core :as r] | |
[b1.charts :as c] | |
[b1.svg :as s])) | |
(enable-console-print!) | |
(def data (take 100 (repeatedly rand))) |
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 mcpi.minecraft import Minecraft | |
import mcpi.block as block | |
mc = Minecraft.create() | |
pos = mc.player.getTilePos() | |
width = 6 | |
depth = 5 | |
height = 4 |
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 turtle | |
tim = turtle.Turtle() | |
def drawSquare(length): | |
for i in range(4): | |
tim.forward(length) | |
tim.right(90) | |
# Draw 90 squares rotated 4 degrees |
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
user> (require '[biscuit.core :as digest]) | |
nil | |
user> (digest/crc8 "hobnob") | |
17 |
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
Vagrant::Config.run do |config| | |
config.vm.box = "eyu" | |
config.vm.forward_port(22, 2222) | |
config.vm.forward_port(3000,3033) | |
config.vm.forward_port(80,8088) | |
config.vm.forward_port(3306,3366) | |
config.vm.forward_port(5432,5434) | |
config.vm.forward_port(4567,4568) | |
config.vm.share_folder("shared", "/shared", "shared") | |
end |
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
(defproject dumbo "0.1.0-SNAPSHOT" | |
:repositories {"apache-releases" "http://repository.apache.org/content/repositories/releases/"} | |
:dependencies [[org.clojure/clojure "1.4.0"] | |
[org.apache.mahout/mahout-core "0.7"] | |
[org.apache.mahout/mahout-math "0.7"] | |
[org.apache.mahout/mahout-utils "0.5" :exclusions [com.google.guava/guava]]]) |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
config.vm.box = "lucid64" | |
config.vm.box_url = "http://files.vagrantup.com/lucid64.box" | |
config.vm.provision :shell, :inline => "apt-get update" | |
# Otherwise java install will fail with missing dependencies | |
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
class Hash | |
def flatten_nested(hash = {}, prefix = '') | |
each do |key, value| | |
full_key = prefix.empty? ? key : "#{prefix}_#{key}" | |
value.is_a?(Hash) ? value.flatten_nested(hash, full_key) : hash[full_key] = value | |
end | |
hash | |
end | |
end |
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
;; https://4clojure.com/problem/26 | |
(partial (fn f [a b n] | |
(if (= n 0) () | |
(cons a (f b (+ a b) (- n 1))) | |
) | |
) 1 1) |
NewerOlder