Created
October 28, 2013 21:07
-
-
Save richardking/7204719 to your computer and use it in GitHub Desktop.
NHL
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
delta | |
Boston Bruins | |
BOS | |
delta | |
Buffalo Sabres | |
BUF | |
delta | |
Montreal Canadiens | |
MTL | |
delta | |
Ottawa Senators | |
OTT | |
delta | |
Toronto Maple Leafs | |
TOR | |
delta | |
Florida Panthers | |
FLA | |
delta | |
Tampa Bay Lightning | |
delta | |
Detroit Red Wings | |
DET | |
delta | |
Chicago Blackhawks | |
CHI | |
delta | |
Nashville Predators | |
NSH | |
delta | |
St Louis Blues | |
St Louis | |
STL | |
delta | |
Colorado Avalanche | |
COL | |
delta | |
Minnesota Wild | |
MIN | |
delta | |
Dallas Stars | |
DAL | |
delta | |
Winnipeg Jets | |
WPG | |
delta | |
Calgary Flames | |
CGY | |
delta | |
Edmonton Oilers | |
EDM | |
delta | |
Vancouver Canucks | |
VAN | |
delta | |
Anaheim Ducks | |
ANA | |
delta | |
Phoenix Coyotes | |
PHX | |
delta | |
Los Angeles Kings | |
LA | |
delta | |
San Jose Sharks | |
SJ | |
delta | |
New Jersey Devils | |
New Jersey | |
NJ | |
delta | |
New York Islanders | |
NY Islanders | |
NYI | |
delta | |
New York Rangers | |
NY Rangers | |
delta | |
Philadelphia Flyers | |
Philadelphia | |
PHI | |
delta | |
Pittsburgh Penguins | |
PIT | |
delta | |
Carolina Hurricanes | |
CAR | |
delta | |
Washington Capitals | |
WSH | |
delta | |
Columbus Blue Jackets | |
CBJ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
new = Tag.find_by_permalink("nhl").teams.map{|t| [t.name, t.short_name, t.nav_name, t.city_name, t.mascot_name, t.abbreviation].uniq }.flatten
aa = Hash[new.map{|a| [a, new.count(a)]}]
dups = Hash[aa.select {|a| a[1] >1 }].keys
Tag.find_by_permalink("nhl").teams.each do |t|
new = [t.name, t.short_name, t.nav_name, t.city_name, t.mascot_name, t.abbreviation].uniq
puts "delta"
new.each do |n|
puts n unless (t.positive_keywords.map{|a| a.keyword} + dups).include?(n)
end
puts
end