Skip to content

Instantly share code, notes, and snippets.

View jedesah's full-sized avatar
💭
Debugging my digestion

Jean-Rémi Desjardins jedesah

💭
Debugging my digestion
View GitHub Profile
@jedesah
jedesah / Day 1.md
Last active August 29, 2015 14:10 — forked from gangstead/Day 1.md

Friday 11/14/14

notes by Steven Gangstead

Rapture Art of One-liner - Jon Pretty @propensive

rapture.io -collection of libraries for scala

jawn json parser. Quicker than Jackson, and I guess Jackson must normally be considered the quickest.

My thoughts: Awesome talk. Look into rapture, looks useful. Jon is smart.

@jedesah
jedesah / gist:11118551
Created April 20, 2014 16:38
O(E + V) to find articulation points of a graph in Scala (based on http://algs4.cs.princeton.edu/41undirected/Biconnected.java.html)
/** *
* This function assumes that the graph is a single connected graph
* @param graph adjencency list (node id's must be zero based)
* @return The nodes that are the articulation points
*/
def articulationPoints(graph: Array[mutable.BitSet]): BitSet = {
val result = new mutable.BitSet()
val depth = Array.fill[Int](graph.length)(-1)
val lowest = Array.fill[Int](graph.length)(-1)
var count = 0
--Authored by Grant Slatton on 2013 October 8
--All code is released to the public domain under the terms of [http://unlicense.org]
import Data.List
import Data.Ord
import Data.Maybe
--Define how you represent your GameState
--In Connect 4, it's just a list of length width of sublists of length height,
--and an Int for whose turn it is, player 1 == 1, player 2 == -1
package com.github.jedesah.codesheet.api
import org.specs2.mutable._
import scala.tools.reflect.ToolBox
class Assumptions extends Specification {
"toolBox.eval()" should {
"use defined variables outside of actual tree being evaled (in my code)" in {
val bigUglyVariable = 1