/Applications/mongodb-osx-x86_64-1.8.2/bin/mongo 127.0.0.1:27017/gs getNonImplementedIdeas.js
> thunderbirdNonImplementedIdeasSortedByMeToos.txt
| Hour | Provider | NumMentions | |
|---|---|---|---|
| 2011062300 | yahoo | 2 | |
| 2011062301 | yahoo | 8 | |
| 2011062302 | yahoo | 0 | |
| 2011062303 | yahoo | 0 | |
| 2011062304 | yahoo | 0 | |
| 2011062305 | yahoo | 0 | |
| 2011062306 | yahoo | 0 | |
| 2011062307 | yahoo | 2 | |
| 2011062308 | yahoo | 0 |
/Applications/mongodb-osx-x86_64-1.8.2/bin/mongo 127.0.0.1:27017/gs getNonImplementedIdeas.js
> thunderbirdNonImplementedIdeasSortedByMeToos.txt
| >>> bigrams(tokens) | |
| [('Deleting', 'from'), ('from', 'All'), ('All', 'Mail'), ('Mail', 'I'), ('I', 'have'), | |
| ('have', 'over'), ('over', '600'), ('600', 'messages'), ('messages', 'in'), ('in', 'the'), | |
| ('the', 'ALL'), ('ALL', 'Mail'), ('Mail', 'box'), ('box', 'that'), ('that', 'I'), | |
| ('I', 'want'), ('want', 'to'), ('to', 'delete'), ('delete', 'but'), ('but', 'when'), | |
| ('when', 'I'), ('I', 'do'), ('do', 'they'), ('they', 'just'), ('just', 'keep'), | |
| ('keep', 'coming'), ('coming', 'back.'), ('back.', 'I'), ('I', 'have'), | |
| ('have', 'tried'), ('tried', 'compacting'), ('compacting', 'the'), ('the', 'folder'), | |
| ('folder', 'but'), ('but', 'that'), ('that', 'does'), ('does', 'not'), | |
| ('not', 'help.'), ('help.', 'Please'), ('Please', 'advise'), ('advise', 'how'), |
| # from http://markwatson.com/aiblog/2007/06/n-gram-analysis-using-ruby.html | |
| require 'sanitize' | |
| a="This is the SECOND time I have asked the same question over the last couple of weeks and not had any reply!! | |
| I cannot delete messages from ALL Mail; they just keep coming back into the folder. | |
| I have tried compacting and it makes no difference. Sometimes the messages do delete for a couple days but always come back. | |
| If I do not get a reply soon then I will unistall and get rid of Thunderbird" | |
| bi_grams = Hash.new(0) | |
| tri_grams = Hash.new(0) | |
| def words text | |
| Sanitize.clean(text).downcase.scan(/\w+/) |
| I was at Amazon for about six and a half years, and now I've been at | |
| Google for that long. One thing that struck me immediately about the | |
| two companies -- an impression that has been reinforced almost daily -- | |
| is that Amazon does everything wrong, and Google does everything right. | |
| Sure, it's a sweeping generalization, but a surprisingly accurate one. | |
| It's pretty crazy. There are probably a hundred or even two hundred | |
| different ways you can compare the two companies, and Google is superior | |
| in all but three of them, if I recall correctly. I actually did a | |
| spreadsheet at one point but Legal wouldn't let me show it to anyone, | |
| even though recruiting loved it. |
./bruteforceSearch.rb 2011 11 8 2011 11 14 -k crash -t crash
2>bfs.searchfor.crash.8-14november2011.stderr.txt
>bfs.searchfor.crash.8-14november2011.stdout.txt
| #!/usr/bin/env ruby | |
| # -*- coding: utf-8 -*- | |
| # prints a sparkline in the terminal using the supplied list of numbers | |
| # examples: | |
| # spark.rb 10 20 30 100 90 80 | |
| # spark.rb 1 2 0.4 0.1 1.3 0.7 | |
| @ticks = %w[▁ ▂ ▃ ▄ ▅ ▆ ▇] | |
| values = ARGV.map { |x| x.to_f } |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)