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/ruby -rubygems | |
require 'json' | |
require 'net/http' | |
data='' | |
Net::HTTP.start('veetle.com', 80) do |http| | |
x = http.get('/channel-listing-cross-site.js').body | |
x.gsub!(/VEETLE\.channelList\.preFetch\(\);/,'') | |
x.gsub!(/VEETLE\.channelList\.list=/,'') | |
x.gsub!(/; VEETLE\.channelList\.postFetch\(\);/,'') | |
data = JSON.parse(x) |
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/ruby -rubygems | |
require 'json' | |
require 'net/http' | |
data='' | |
Net::HTTP.start('veetle.com', 80) do |http| | |
x = http.get('/channel-listing-cross-site.js').body | |
x.gsub!(/VEETLE\.channelList\.preFetch\(\);/,'') | |
x.gsub!(/VEETLE\.channelList\.list=/,'') | |
x.gsub!(/; VEETLE\.channelList\.postFetch\(\);/,'') | |
data = JSON.parse(x) |
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
mysql> select ug_group, ug_user, user_name, user_real_name from user_groups, user where user_id = ug_user; | |
+------------+---------+--------------------+----------------------------+ | |
| ug_group | ug_user | user_name | user_real_name | | |
+------------+---------+--------------------+----------------------------+ | |
| bot | 2 | Danbri.org | Dan Brickley | | |
| bot | 64 | LibbyMiller | Libby Miller | | |
| bot | 94 | Steevc | | | |
| bot | 213 | DanBri | Dan Brickley | | |
| bureaucrat | 1 | WikiSysop | | | |
| bureaucrat | 2 | Danbri.org | Dan Brickley | |
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
mysql> select * from user_openid; | |
+----------------------------------------------------------------------------------+----------+ | |
| uoi_openid | uoi_user | | |
+----------------------------------------------------------------------------------+----------+ | |
| http://danbri.org/ | 2 | | |
| http://www.w3.org/People/Berners-Lee/ | 3 | | |
| http://kidehen.idehen.net/dataspace/person/kidehen | 6 | | |
| http://www.wasab.dk/morten/ | 7 | | |
| http://sukinkot.livejournal.com/ | 8 | | |
| http://openid.osgeo.org/user/crschmidt | 9 | |
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/ruby -rubygems | |
require 'open-uri' | |
base='http://www.visiteastside.co.uk/search_eastside/index.php?name=&&&offset=0#searchresults' | |
poidb = {} | |
# This Ruby script will extract data from the pages of the Visit East Side site. | |
# | |
# Notes: | |
# Please play nice and only use the data for purposes that further the goals of |
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/ruby | |
require 'open-uri' | |
f = File.read('celebrities_profiles.txt') | |
f.each do |c| | |
fields = c.split(/\t/) | |
screen_name = fields[16]; | |
url = fields[20]; | |
# puts "Got: #{fields[16]} url: #{fields[20]}" |
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
linkage = load '/user/danbri/wikipedia/dbpedia2twittername.txt.bz2' using PigStorage('\t') AS (dbpedia_entry: chararray, screen_name: chararray); | |
linked_topics = JOIN linkage by dbpedia_entry, WPSB1 by dbpedia_entry; | |
by_topics = GROUP linked_topics BY dbpedia_category; | |
cat_stats = FOREACH by_topics GENERATE group as category, COUNT(celeb_topics); | |
store cat_stats into 'edsu_topics'; |
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
Consumerism;Gender roles;Families: 1960s | |
[' Consumerism;Gender roles;Families: 1960s\n'] | |
Suggested keywords: | |
Gender role, | |
Transgendered, | |
Academic, | |
Gender identity, | |
Gender, |
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
clf | |
hold on; | |
grid on; | |
# item labels | |
I = { | |
'Dr Who', | |
'Eastenders', | |
'Farmer Seeks Wife', | |
'Eurovision', |
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
package tv.foaf; | |
import org.apache.mahout.common.RandomUtils; | |
import org.apache.mahout.cf.taste.impl.recommender.slopeone.SlopeOneRecommender; | |
import org.apache.mahout.cf.taste.impl.recommender.svd.Factorizer; | |
import org.apache.mahout.cf.taste.impl.recommender.svd.SVDRecommender; | |
import org.apache.mahout.cf.taste.impl.recommender.svd.ALSWRFactorizer; | |
import org.apache.mahout.cf.taste.impl.recommender.svd.ExpectationMaximizationSVDFactorizer; | |
import org.apache.mahout.cf.taste.common.TasteException; | |
import org.apache.mahout.cf.taste.eval.IRStatistics; |
OlderNewer