-
How much time do I have?
-
What's the venue like?
-
At what time of day will I be presenting?
-
Who is the audience?
-
What's their background?
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
| require 'rspec-given' | |
| describe "word counter" do | |
| Given(:word_counter) { WordCounterFactory.new.create } | |
| Then { word_counter.count("one") == {"one" => 1} } | |
| Then { word_counter.count("one fish") == {"one" => 1, "fish" => 1} } | |
| Then { word_counter.count("one fish fish") == {"one" => 1, "fish" => 2} } | |
| Then { word_counter.count("one fish,fish") == {"one" => 1, "fish" => 2} } | |
| Then { word_counter.count("one fish Fish") == {"one" => 1, "fish" => 2} } | |
| Then { word_counter.count("one fish Fish") == {"one" => 1, "fish" => 2} } |
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
| require 'rspec-given' | |
| # Really, really, really going nowhere with this at the moment :-( | |
| class Chop | |
| def initialize(list) | |
| @list = list | |
| end | |
| def find(item, start = 0) | |
| mid_point = @list.length / 2 |
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
| require 'rspec-given' | |
| module Chop | |
| def chop(coll, search, i = 0) | |
| return nil if bad_search?(coll, search) | |
| middle = coll.count / 2 | |
| return i if coll.first == search | |
| if coll[middle] <= search | |
| chop(coll[middle..-1], search, i + middle) | |
| else |
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
| ;; based on core.logic 0.8-alpha2 or core.logic master branch | |
| (ns sudoku | |
| (:refer-clojure :exclude [==]) | |
| (:use clojure.core.logic)) | |
| (defn get-square [rows x y] | |
| (for [x (range x (+ x 3)) | |
| y (range y (+ y 3))] | |
| (get-in rows [x y]))) |
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 Phrase | |
| def initialize(words) | |
| words_cleaner = WordsCleaner.new(words) | |
| @frequency_counter = Frequencies.new(words_cleaner) | |
| end | |
| def word_count | |
| @frequency_counter.frequencies | |
| end | |
| end |
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
| alias tlss='t ls | sort' | |
| alias tgrep='tlss | grep' | |
| alias tas='t add @stuff' | |
| alias tad='t add @delegate' | |
| alias taw='t add @wait' | |
| alias tat='t add @today' | |
| alias tal='t add @later' | |
| PATH=~/Dropbox/todo/bin:$PATH |
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
| require 'rspec-given' | |
| class StoryCreator | |
| def initialize(story, selector_fn = nil) | |
| @story = story | |
| @selector_fn = selector_fn | |
| end | |
| def new_story | |
| trigram = { |
- How much time do I have?
10 minute lightnight talk
- What's the venue like?
Spaark's offices. Not sure where but it will be a semi-formal setting, probably in a meeting room or breakout area
- At what time of day will I be presenting?
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
| (require 'package) | |
| (add-to-list 'package-archives | |
| '("marmalade" . "http://marmalade-repo.org/packages/")) | |
| (package-initialize) | |
| (defvar my-packages '(clojure-mode | |
| cider | |
| paredit | |
| auto-complete | |
| highlight-parentheses |