Models | Examples |
---|---|
Display ads | Yahoo! |
Search ads |
This file contains hidden or 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
require 'spec_helper' | |
# This spec was generated by rspec-rails when you ran the scaffold generator. | |
# It demonstrates how one might use RSpec to specify the controller code that | |
# was generated by Rails when you ran the scaffold generator. | |
# | |
# It assumes that the implementation code is generated by the rails scaffold | |
# generator. If you are using any extension libraries to generate different | |
# controller code, this generated spec may or may not pass. | |
# |
This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'nokogiri' | |
require 'open-uri' | |
class Mp3Crawler | |
def initialize(url) | |
@data = Nokogiri::XML(open(url)) | |
end | |
def links |
This file contains hidden or 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
if | |
@sentiment["mood"] == positive && @sentiment["prob"] > 0.94 | |
@tag.score = 100 | |
elsif | |
@sentiment["mood"] == positive && @sentiment["prob"] > 0.89 | |
@tag.score = 96 | |
elsif | |
@sentiment["mood"] == positive && @sentiment["prob"] > 0.84 | |
@tag.score = 92 | |
elsif |