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 html | |
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<title>Feature</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta http-equiv="Expires" content="-1" /> | |
<meta http-equiv="Pragma" content="no-cache" /> |
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
data/ |
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"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>bbc.introducing</groupId> | |
<artifactId>peel</artifactId> | |
<packaging>war</packaging> | |
<version>1.0.0-SNAPSHOT</version> | |
<url>https://dev.bbc.co.uk/maven/sites/peel</url> |
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
require 'rubygems' | |
require 'bbc_standards' | |
require 'sqlite_cache' | |
require 'open-uri' | |
require 'rubigraph' | |
include Rubigraph | |
Rubigraph.init | |
class Crawler |
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
require 'rubygems' | |
require 'mysql' | |
sql = %[ | |
select b.pid, b.title as brand_title, c.musicbrainz_gid as mbid, c.name as artist_name, count(DISTINCT se.id) as 'plays' | |
FROM contributors c | |
JOIN segments s ON s.primary_contributor_id = c.id | |
JOIN segment_events se ON se.segment_id = s.id | |
JOIN versions v ON se.version_id = v.id | |
JOIN broadcasts br ON v.id = br.version_id |
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
/:service/programmes/segments # n most played segments | |
/:service/programmes/segments/player # n most played segments available in iplayer | |
/:service/programmes/segments/latest # latest n segments | |
/programmes/:brand_pid/segments | |
/programmes/:brand_pid/segments/player | |
/programmes/:brand_pid/segments/latest | |
/:service/programmes/genres/music/:genre/segments | |
/:service/programmes/genres/music/:genre/segments/player |
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
class Point | |
attr_accessor :x, :y | |
def initialize(x, y) | |
@x, @y = x, y | |
end | |
end | |
ENTRY_COUNT = 40 | |
INCREMENT = 0.01 |
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
<!--#config timefmt="%Y" --><!--#set var="time_year" value="${DATE_LOCAL}" --> | |
<!--#config timefmt="%j" --><!--#set var="time_day" value="${DATE_LOCAL}" --> | |
<!--#config timefmt="%H" --><!--#set var="time_hour" value="${DATE_LOCAL}" --> | |
<!--#config timefmt="%M" --><!--#set var="time_min" value="${DATE_LOCAL}" --> | |
<!--#func var="time_year_m" func="mult" value="${time_year}" value="525948" --> | |
<!--#func var="time_day_m" func="mult" value="${time_day}" value="1440" --> | |
<!--#func var="time_hour_m" func="mult" value="${time_hour}" value="60" --> | |
<!--#func var="time" func="add" value="${time_year_m}" value="${time_day_m}" value="${time_hour_m}" value="${time_min}"--> | |
<!--#config timefmt="%Y" --><!--#func var="modified_year" func="flastmod" virtual="/radio1/nowplaying/latest.sssi" --> |
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
5fee3020-513b-48c2-b1f7-4681b01db0c6 Florence & The Machine http://www.myspace.com/florenceandthemachinemusic, http://www.facebook.com/florenceandthemachine | |
1a99cc88-aea3-4fe3-96b9-20791667f65f Dizzee Rascal http://www.dizzeerascal.net/, http://www.facebook.com/pages/Dizzee-Rascal/23440376442 - temp? | |
8ef1df30-ae4f-4dbd-9351-1a32b208a01e Alicia Keys http://www.aliciakeys.com/uk/home, http://www.facebook.com/aliciakeys | |
ef6e2e49-aa93-41bd-89b0-8c7d2f260a83 Lostprophets http://www.facebook.com/lostprophets?v=app_4949752878#!/lostprophets?v=wall | |
2d499150-1c42-4ffb-a90c-1cc635519d33 Cheryl Cole feat. Will.I.Am (Will.I.Am tbc) http://www.facebook.com/CherylCole, http://www.myspace.com/girlsaloud, http://www.bbc.co.uk/radio1/livelounge/artist/100323_cherylcole.shtml | |
54266e9c-7098-48ea-bb70-e25fdfa14227 Chipmunk http://www.iamchipmunk.com/, http://www.facebook.com/pages/Chipmunk/59123092225 | |
e0140a67-e4d1-4f13-8a01-364355bee46e Justin Bieber http://www.justinbieberofficial.co.uk, http://www.facebook.com/JustinBieber | |
85 |
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
require 'rubygems' | |
require 'open-uri' | |
require 'hpricot' | |
require 'sqlite_cache' | |
$cache = SqliteCache.new('my_cache.db') | |
def copen(url) | |
$cache.do_cached(url) do | |
puts "fetching: #{url}" |