Skip to content

Instantly share code, notes, and snippets.

View mac01021's full-sized avatar

Matthew Coolbeth mac01021

View GitHub Profile
@binarybana
binarybana / mcmcspeed.jl
Created August 22, 2013 01:48
Immutable vs Composite types in Julia
module TestMod
immutable ITest
x :: Float64
y :: Float64
z :: Vector{Float64}
end
type CTest
x :: Float64
@visenger
visenger / install_scala_sbt.sh
Last active January 31, 2023 19:10
Scala and sbt installation on ubuntu 12.04
#!/bin/sh
# one way (older scala version will be installed)
# sudo apt-get install scala
#2nd way
sudo apt-get remove scala-library scala
wget http://www.scala-lang.org/files/archive/scala-2.11.4.deb
sudo dpkg -i scala-2.11.4.deb
sudo apt-get update
@zaphar
zaphar / graph.clj
Created January 16, 2012 21:44 — forked from artdent/graph.clj
Ways by node
(defn collect-ways-by-node [ways]
(reduce (fn [m m2] (merge-with #(concat %1 %2) m1 m2))
(for [way ways]
(for [id (:nodes way)]
(hash-map (:id way) [id])))))
@michiakig
michiakig / ants.clj
Created July 19, 2011 22:37
Clojure ant sim from Rich Hickey
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Ant sim ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright (c) Rich Hickey. All rights reserved.
; The use and distribution terms for this software are covered by the
; Common Public License 1.0 (http://opensource.org/licenses/cpl.php)
; which can be found in the file CPL.TXT at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license.
; You must not remove this notice, or any other, from this software.
;dimensions of square world