Skip to content

Instantly share code, notes, and snippets.

{
"type": "game_progress_stats",
"content_source": "game_stats",
"score_progress_size": {
"w": 261,
"h": 18
},
"score_entry": {
"type": "frame",
"base-size": {
@BlaneCordes
BlaneCordes / gist:3919017
Created October 19, 2012 16:00
Macro in progress
Sub Pipeline()
'Module 3
'Iterating through the Funding Date Column and looking for clients going live within 30 days
'Selecting the rows for each client in that target range
'TODO: Export information into an email template in Outlook
'TODO: Send email to distribution list
Dim fundingDate As range
@BlaneCordes
BlaneCordes / dww.rb
Created July 25, 2012 02:43
scrape
def self.scrape_free_agents
transaction_trends_page = Nokogiri::HTML(open("http://baseball.fantasysports.yahoo.com/b1/buzzindex?date=#{Time.now.to_date}&pos=ALL&src=combined&sort=BI_A&sdir=1"))
hot_players = transaction_trends_page.css(".name").text
hot_players.gsub!(/([A-Z][^A-Z]+)/, '\1 ')
hot_players.gsub!(/([A-Z])/, '\1\2')
hot_players.gsub!(/(Shin-|O') /, '\1')
hot_players.gsub!(/(Wei-|O') /, '\1')
array_players = hot_players.split(' ')
array_players.each_with_index do |name,index|
if name == "CC"
#loop through games by team_id
z = Game.find_by_team_id(team_id)
#For each game:
#determine home wins if home_score is greater than away_score
#determine home losses if home_score is less than away_score
#determine away wins if away_score is greater than home_score
#determine away losses if away_score is less than home_score