Created
October 28, 2013 21:06
-
-
Save richardking/7204693 to your computer and use it in GitHub Desktop.
MLB
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 | |
New York Yankees | |
NY Yankees | |
delta | |
Boston Red Sox | |
delta | |
Toronto Blue Jays | |
Blue Jays | |
Toronto | |
TOR | |
delta | |
Baltimore Orioles | |
Baltimore | |
BAL | |
delta | |
Tampa Bay Rays | |
Tampa Bay | |
delta | |
Chicago White Sox | |
White Sox | |
Chi White Sox | |
CHW | |
delta | |
Cleveland Indians | |
CLE | |
delta | |
Detroit Tigers | |
DET | |
delta | |
Kansas City Royals | |
Royals | |
Kansas City | |
KC | |
delta | |
Minnesota Twins | |
Twins | |
Minnesota | |
MIN | |
delta | |
Oakland Athletics | |
Athletics | |
OAK | |
delta | |
Texas Rangers | |
Texas | |
TEX | |
delta | |
Seattle Mariners | |
Mariners | |
Seattle | |
SEA | |
delta | |
Los Angeles Angels of Anaheim | |
Angels | |
LA Angels | |
LAA | |
delta | |
Houston Astros | |
Astros | |
Houston | |
HOU | |
delta | |
Atlanta Braves | |
delta | |
Miami Marlins | |
Miami | |
MIA | |
delta | |
New York Mets | |
NY Mets | |
NYM | |
delta | |
Philadelphia Phillies | |
Phillies | |
Philadelphia | |
PHI | |
delta | |
Washington Nationals | |
Nationals | |
Washington | |
WAS | |
delta | |
Chicago Cubs | |
Chi Cubs | |
CHC | |
delta | |
Pittsburgh Pirates | |
PIT | |
delta | |
Cincinnati Reds | |
Reds | |
CIN | |
delta | |
Milwaukee Brewers | |
Milwaukee | |
MIL | |
delta | |
St Louis Cardinals | |
St Louis | |
STL | |
delta | |
Arizona Diamondbacks | |
Arizona | |
ARI | |
delta | |
SF | |
delta | |
San Diego Padres | |
Padres | |
San Diego | |
SD | |
delta | |
Los Angeles Dodgers | |
LA Dodgers | |
delta | |
Colorado Rockies | |
Rockies | |
Colorado | |
COL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
MLB
new = Tag.find_by_permalink("mlb").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("mlb").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