This file contains 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
100.times { | |
puts Benchmark.measure { | |
lines = [] | |
IO.readlines(ARGV[0]).each {|line| | |
word, probability = line.split(/\s+/) | |
lines << {:word => word, :probability => probability.to_f} | |
} | |
words = [] | |
(ARGV[1] ? ARGV[1].to_i : 1).times { |
This file contains 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
javascript:if%20(document.getElementById('download-youtube-video')==null%20&&%20!!(document.location.href.match(/http:%5C/%5C/%5Ba-zA-Z%5C.%5D*youtube%5C.com%5C/watch/)))%20%7Bvar%20yt_mp4_path='http://www.youtube.com/get_video?fmt=18&video_id='+swfArgs%5B'video_id'%5D+'&t='+swfArgs%5B't'%5D;%20var%20div_embed=document.getElementById('watch-embed-div');div_embed.innerHTML=div_embed.innerHTML+'%3Cbr%20/%3E%20%3Cspan%20id=%5C'download-youtube-video%5C'%3E%3Ca%20href=%5C''+yt_mp4_path+'%5C'%3EDownload%20as%20MP4%3C/a%3E%20(right-click%20and%20select%20%3Ci%3ESave%20'+%20(navigator.appName=='Microsoft%20Internet%20Explorer'?'target':'link')%20+'%20as%3C/i%3E)%3C/span%3E';%7Dvoid(0); |
This file contains 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
#import <Foundation/Foundation.h> | |
#import "iTunes.h" | |
#import "iTunesLibraryDumperKeys.h" | |
NSMutableDictionary *mutableDictionaryForItem(iTunesItem *item) { | |
return [NSMutableDictionary dictionaryWithObjectsAndKeys: | |
[NSNumber numberWithInteger:[item id]], EZiTunesLibraryDumperKeyItemID, | |
[NSNumber numberWithInteger:[item index]], EZiTunesLibraryDumperKeyItemIndex, | |
[item name], EZiTunesLibraryDumperKeyItemName, | |
[item persistentID], EZiTunesLibraryDumperKeyItemPersistentID, |
This file contains 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
# Copyright 2008 Chris Wanstrath | |
# Taken from defunkt's gist repository: http://github.com/defunkt/gist/tree/master | |
require 'open-uri' | |
require 'net/http' | |
module Gist | |
extend self | |
@@gist_url = 'http://gist.github.com/%s.txt' |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>CFBundleDevelopmentRegion</key> | |
<string>English</string> | |
<key>CFBundleExecutable</key> | |
<string>OmniOutliner Professional</string> | |
<key>CFBundleGetInfoString</key> | |
<string>OmniOutliner Professional Clipping Service 3.7.2, version 143.38, Copyright 2000-2008 The Omni Group</string> |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>CFBundleDevelopmentRegion</key> | |
<string>English</string> | |
<key>CFBundleExecutable</key> | |
<string>OmniOutliner Professional</string> | |
<key>CFBundleGetInfoString</key> | |
<string>OmniOutliner Professional Clipping Service 3.7.2, version 143.38, Copyright 2000-2008 The Omni Group</string> |
This file contains 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
# Copyright 2008 Chris Wanstrath | |
# Taken from defunkt's gist repository: http://github.com/defunkt/gist/tree/master | |
require 'open-uri' | |
require 'net/http' | |
module Gist | |
extend self | |
@@gist_url = 'http://gist.github.com/%s.txt' |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>CFBundleDevelopmentRegion</key> | |
<string>English</string> | |
<key>CFBundleExecutable</key> | |
<string>OmniOutliner Professional</string> | |
<key>CFBundleGetInfoString</key> | |
<string>OmniOutliner Professional Clipping Service 3.7.2, version 143.38, Copyright 2000-2008 The Omni Group</string> |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>CFBundleDevelopmentRegion</key> | |
<string>English</string> | |
<key>CFBundleExecutable</key> | |
<string>OmniOutliner Professional</string> | |
<key>CFBundleGetInfoString</key> | |
<string>OmniOutliner Professional Clipping Service 3.7.2, version 143.38, Copyright 2000-2008 The Omni Group</string> |
This file contains 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
# Copyright 2008 Chris Wanstrath | |
# Taken from defunkt's gist repository: http://github.com/defunkt/gist/tree/master | |
require 'open-uri' | |
require 'net/http' | |
module Gist | |
extend self | |
@@gist_url = 'http://gist.github.com/%s.txt' |
NewerOlder