- 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?
10 minute lightnight talk
Spaark's offices. Not sure where but it will be a semi-formal setting, probably in a meeting room or breakout area
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?
| require 'rspec-given' | |
| class StoryCreator | |
| def initialize(story, selector_fn = nil) | |
| @story = story | |
| @selector_fn = selector_fn | |
| end | |
| def new_story | |
| trigram = { |
| 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 |
| 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 |
| ;; 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]))) |
| 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 |
| 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 |
| 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} } |
| describe "calculator" do | |
| let(:calculator) { CalculatorFactory.new.create } | |
| it "adds numbers" do | |
| calculator.calculate("1 + 2").should == 3 | |
| end | |
| it "adds big numbers" do | |
| calculator.calculate("11 + 22").should == 33 | |
| end |