8. My name is James.
My name is not Jesus.
{ “My name” => [“is”],
“name is” => [“James”, “not”],
…}
9. class MarkovChain
def learn(text)
text.strip
.sub(/s+/, " ")
.sub(/( .){3,}/) { $&.delete(" ") }
.scan(/(?:w[-'w]*|,|(?:.{3,} |[.!?] ))/)
.each_cons(@order + 1) do |words|
if @starters.empty?
@starters << words[0..-2]
elsif words.first =~ /A[.!?]/
@starters << words[1..-1]
end
(@word_map[words[0..-2]] ||= [ ]) << words[-1]
end
end
end
10. class MarkovChain
def contruct_paragraph(sentence_count = rand(10) + 1)
words = @starters.sample
sentences = words.count { |word| word =~ /A[.!?]/ }
until sentences >= sentence_count
if choices = @word_map[words.last(@order)]
words << choices.sample
sentences += 1 if words.last =~ /A[.!?]/
else
start = @starters.sample
words.push(*start)
sentences += start.count { |word| word =~ /A[.!?]/ }
end
end
paragraph = words.join(' ')
.gsub(/ ([,.!?])/, '1')
.gsub(/.( .)+/, ".")
.gsub(/AW+/, "")
"t#{paragraph}n"
end
end
11. class MarkovChain
def contruct_paragraph(sentence_count = rand(10) + 1)
words = @starters.sample
sentences = words.count { |word| word =~ /A[.!?]/ }
until sentences >= sentence_count
if choices = @word_map[words.last(@order)]
words << choices.sample
sentences += 1 if words.last =~ /A[.!?]/
else
start = @starters.sample
words.push(*start)
sentences += start.count { |word| word =~ /A[.!?]/ }
end
end
paragraph = words.join(' ')
.gsub(/ ([,.!?])/, '1')
.gsub(/.( .)+/, ".")
.gsub(/AW+/, "")
"t#{paragraph}n"
end
end
12. class MarkovChain
def contruct_paragraph(sentence_count = rand(10) + 1)
words = @starters.sample
sentences = words.count { |word| word =~ /A[.!?]/ }
until sentences >= sentence_count
if choices = @word_map[words.last(@order)]
words << choices.sample
sentences += 1 if words.last =~ /A[.!?]/
else
start = @starters.sample
words.push(*start)
sentences += start.count { |word| word =~ /A[.!?]/ }
end
end
paragraph = words.join(' ')
.gsub(/ ([,.!?])/, '1')
.gsub(/.( .)+/, ".")
.gsub(/AW+/, "")
"t#{paragraph}n"
end
end
13.
14.
15. require "open-uri"
def load_fairy_tales
open("#{URL}/index.html") do |list|
list.read.scan(/href="([^"]+.txt)"/) do |story_url|
open("#{URL}/#{story_url.first}") do |story|
text = story.read
if text.sub!(/As*(w.+w)/, "0")
print "Loading #{$1}... " if DEBUG
yield text
puts "Done." if DEBUG
end
end
end
end
end
16. DEBUG = ARGV.delete("-d")
URL = "http://www.kidsnewsroom.org/elmer/infocentral/stories/grimm"
CHAIN_FILE = "markov_chain.marshal"
def build_chain
if File.exist? CHAIN_FILE
File.open(CHAIN_FILE) { |file| Marshal.load(file) }
else
MarkovChain.new.tap { |chain|
load_fairy_tales { |tale| chain.learn(tale) }
File.open(CHAIN_FILE, "w") { |file| Marshal.dump(chain, file) }
}
end
end
chain = build_chain
bible_length = File.size("bible.txt")
open("generated_tales.txt", "w") do |tales|
until tales.size >= bible_length
tales.write(chain.contruct_paragraph)
end
end
18. NONSENSE
Jack's life had gone into the depths of the beds.
After having counted again and then pretended to begin
working on them, the dwarfs advice I'm an old hut made of
twigs and dead leaves.
A whole world was stirring to life and the Princess fussed
around and ordered new clothes to be coming from inside
the oven door shut.
19. THOUGHT PROVOKING
But wealth doesn't always bring happiness.
In the meantime, Puss in Boots.
He was a lovely girl.
The gold pieces were spent to buy a lot more than any
mangy donkey or half-ruined mill, the bowl lay empty on a
large spider who promised to help her.
You are, your Highness, you'll have to work like the others,
or you'll not get even that.
20. SCARY
Hope flooded Pinocchio's heart as the water rushed into its
cavern-like mouth…
…the second Geppetto carved out the bone You're still
much too thin she complained.
Hansel opened the door. Who's there cried Grandma from
her bed It's me, otherwise it won't taste nice.
35. I GOOGLED IT
I know it sounds weird but you can put cabbage leaves on
your breasts and it will dry your milk out! I did it and it
works.
36. I GOOGLED IT
I know it sounds weird but you can put cabbage leaves on
your breasts and it will dry your milk out! I did it and it
works.
Cool cabbage compresses will reduce swelling quickly, and if
left in place for long periods will help diminish milk supply.
This method may be used instead of or in addition to
removing small amounts of milk to reduce supply. Use fresh
green leaves, cleaned and chilled, wrapped around the
breasts. Change them about every two hours.
42. TRAITS OF A SKEPTIC
Questions authority
A questioning attitude of knowledge, facts, or opinions/
beliefs stated as facts
Suspended judgement and systemic doubt
Requires all new information to be well supported by
evidence
46. LOGICAL FALLACIES
Christianity has the largest group of followers, because it’s
the best religion.
God exists because the Bible says so. The Bible is inspired.
Therefore, we know that God exists.
47. LOGICAL FALLACIES
Christianity has the largest group of followers, because it’s
the best religion.
God exists because the Bible says so. The Bible is inspired.
Therefore, we know that God exists.
Either God exists or evolution is true.
48. LOGICAL FALLACIES
Christianity has the largest group of followers, because it’s
the best religion.
God exists because the Bible says so. The Bible is inspired.
Therefore, we know that God exists.
Either God exists or evolution is true.
William Lane Craig is a jerk. I can’t listen to his debates.
49. LOGICAL FALLACIES
Christianity has the largest group of followers, because it’s
the best religion.
God exists because the Bible says so. The Bible is inspired.
Therefore, we know that God exists.
Either God exists or evolution is true.
William Lane Craig is a jerk. I can’t listen to his debates.
God doesn’t reveal Himself to nonbelievers.
52. BRAIN ODDITIES
The ideo-motor response: vividly imagine sucking on a
lemon and you may salivate
Pareidolia: why you see animals/faces in the clouds
53. BRAIN ODDITIES
The ideo-motor response: vividly imagine sucking on a
lemon and you may salivate
Pareidolia: why you see animals/faces in the clouds
Hypnagogia: ???
54. AS YOU KNOW IT
http://ufoclearinghouse.webs.com/ufochreportingcenter.htm
55. MEMBER BENEFITS
We never get abducted by aliens
We don’t lose sleep over the Feng Shui in our houses
We save a lot of money by avoiding alternative medical
treatments like acupuncture, chiropractors, etc.
We get to study tons of interesting subjects
Our children have a higher survival rate since we vaccinate
56. DIRTY LITTLE SECRETS
We kill a sacred cow to join
We’re all mad that second hand smoke doesn’t kill people
We can be slow to react to things like man-made global
warming
We have to be careful not too see logical fallacies
everywhere
We have to remember to be skeptical, not cynical
58. HIDDEN PROPHECY
Equidistant Linguistic Sequences spell out historic events
Events occurring after the Bible can be found
However, they are usually wrong unless we find them after
they occur
Works best with the English and Hebrew translations
59. A GRID OF LETTERS
http://en.wikipedia.org/wiki/Bible_code
64. class ELSSearch
def find_sequences(word, min_offset)
matched = false
letters = word.split("")
loop do
puts "Searching #{min_offset} for #{word}..." if DEBUG
@text.scan( / #{letters.join(".{#{min_offset}}")} |
#{letters.reverse.join(".{#{min_offset}}")} /x ) do
matched = true
@sequences[word][min_offset] << $~.offset(0)
end
break if matched
min_offset += 1
end
end
end
65. class ELSSearch
def find_sequences(word, min_offset)
matched = false
letters = word.split("")
loop do
puts "Searching #{min_offset} for #{word}..." if DEBUG
@text.scan( / #{letters.join(".{#{min_offset}}")} |
#{letters.reverse.join(".{#{min_offset}}")} /x ) do
matched = true
@sequences[word][min_offset] << $~.offset(0)
end
break if matched
min_offset += 1
end
end
end
66. class ELSSearch
def box_results(result = SearchResult.new, words = @words)
word = words.first
@sequences[word].each_value do |bounds|
bounds.each do |start, stop|
if result.overlaps?(start, stop)
expanded_results = result.expand(start, stop, word)
if words.size <= 1
return expanded_results
else
if nested_results = box_results(expanded_results, words[1..-1])
return nested_results
end
end
end
end
end
nil
end
end
67. class ELSSearch
def box_results(result = SearchResult.new, words = @words)
word = words.first
@sequences[word].each_value do |bounds|
bounds.each do |start, stop|
if result.overlaps?(start, stop)
expanded_results = result.expand(start, stop, word)
if words.size <= 1
return expanded_results
else
if nested_results = box_results(expanded_results, words[1..-1])
return nested_results
end
end
end
end
end
nil
end
end
68. class ELSSearch
def box_results(result = SearchResult.new, words = @words)
word = words.first
@sequences[word].each_value do |bounds|
bounds.each do |start, stop|
if result.overlaps?(start, stop)
expanded_results = result.expand(start, stop, word)
if words.size <= 1
return expanded_results
else
if nested_results = box_results(expanded_results, words[1..-1])
return nested_results
end
end
end
end
end
nil
end
end
69. class ELSSearch
def box_results(result = SearchResult.new, words = @words)
word = words.first
@sequences[word].each_value do |bounds|
bounds.each do |start, stop|
if result.overlaps?(start, stop)
expanded_results = result.expand(start, stop, word)
if words.size <= 1
return expanded_results
else
if nested_results = box_results(expanded_results, words[1..-1])
return nested_results
end
end
end
end
end
nil
end
end
70. class ELSSearch
def perform
@words.each do |word|
find_sequences(word, 1)
end
until @result = box_results
find_sequences(*lowest_sequence)
end
end
private
def lowest_sequence
word = @sequences.sort_by { |_, os| [os.keys.max, rand] }.first.first
[word, @sequences[word].keys.max + 1]
end
end
71. class ELSSearch
def perform
@words.each do |word|
find_sequences(word, 1)
end
until @result = box_results
find_sequences(*lowest_sequence)
end
end
private
def lowest_sequence
word = @sequences.sort_by { |_, os| [os.keys.max, rand] }.first.first
[word, @sequences[word].keys.max + 1]
end
end
72. class ELSSearch
def perform
@words.each do |word|
find_sequences(word, 1)
end
until @result = box_results
find_sequences(*lowest_sequence)
end
end
private
def lowest_sequence
word = @sequences.sort_by { |_, os| [os.keys.max, rand] }.first.first
[word, @sequences[word].keys.max + 1]
end
end
73. class ELSSearch
def perform
@words.each do |word|
find_sequences(word, 1)
end
until @result = box_results
find_sequences(*lowest_sequence)
end
end
private
def lowest_sequence
word = @sequences.sort_by { |_, os| [os.keys.max, rand] }.first.first
[word, @sequences[word].keys.max + 1]
end
end
74. class ELSSearch
def show_results(highlight = false)
matched_text = @text[@result.start...@result.stop]
lowest_offset = @result.mapping.values.map(&:first).min
box_size = nil
@result.mapping.each do |w, os|
i = os.first - lowest_offset
o = (os.last - os.first - w.size) / (w.size - 1)
box_size = o if box_size.nil? or o > box_size
w.size.times do |c|
j = i + ((o + 1) * c)
matched_text[j, 1] = matched_text[j, 1].upcase
end
end
matched_text.gsub!(/G.{#{[box_size, 80].min}}/, "0n")
matched_text.gsub!(/[A-Z]/, "e[1m0e[0m") if highlight
matched_text
end
end
75. class SearchResult
def initialize(start = nil, stop = nil, mapping = { })
@start = start
@stop = stop
@mapping = mapping
end
attr_reader :start, :stop, :mapping
def overlaps?(start, stop)
(@start.nil? and @stop.nil?) or (stop >= @start and start <= @stop)
end
def expand(start, stop, word)
self.class.new( [@start, start].compact.min,
[@stop, stop].compact.max,
@mapping.merge(word => [start, stop]) )
end
end
76. class SearchResult
def initialize(start = nil, stop = nil, mapping = { })
@start = start
@stop = stop
@mapping = mapping
end
attr_reader :start, :stop, :mapping
def overlaps?(start, stop)
(@start.nil? and @stop.nil?) or (stop >= @start and start <= @stop)
end
def expand(start, stop, word)
self.class.new( [@start, start].compact.min,
[@stop, stop].compact.max,
@mapping.merge(word => [start, stop]) )
end
end
98. SCIENCE OR FICTION
Episode 80, 1/31/2007:
New study shows that men enjoy romantic movies, so-
called chick flicks, almost as much as women.
99. SCIENCE OR FICTION
Episode 80, 1/31/2007:
New study shows that men enjoy romantic movies, so-
called chick flicks, almost as much as women.
A recent study has found that the most unpleasant sound
to humans is the sound of nails scratching across a
blackboard.
100. SCIENCE OR FICTION
Episode 80, 1/31/2007:
New study shows that men enjoy romantic movies, so-
called chick flicks, almost as much as women.
A recent study has found that the most unpleasant sound
to humans is the sound of nails scratching across a
blackboard.
Researchers have witnessed free-ranging spider monkeys
anointing themselves with crushed aromatic plants that
they believe is used as a type of perfume.
104. OTHER RESOURCES
Blogs Books by
Skepchick James Randi
Bad Astronomy Jon Ronson
Podcasts Richard Wiseman
Skeptiod
QuackCast
105. OTHER RESOURCES
Blogs Books by
Skepchick James Randi
Bad Astronomy Jon Ronson
Podcasts Richard Wiseman
Skeptiod Magazines
QuackCast Skeptical Inquirer
109. (CONTINUED)
TV Shows Web Sites
South Park Snopes.com
Bullshit! An Index to Creationist
Claims
CSI
Uncomfortable
iPhone App Questions: Was the
Death Star Attack an
Skeptic’s Dictionary
Inside Job?