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 "lingua/stemmer" | |
stemmer = Lingua::Stemmer.new | |
tag_counts = {} | |
STDIN.lines.each{|l| c, t = l.split; tag_counts[t.strip] = c.to_i } | |
duplicates = Hash.new{|h, k| h[k] = []} | |
tag_counts.keys.each{|k| duplicates[k.split("_").map{|x| stemmer.stem(x)}] << k } |
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
tag_counts = {} | |
STDIN.lines.each{|l| c, t = l.split; tag_counts[t.strip] = c.to_i } | |
duplicates = Hash.new{|h, k| h[k] = []} | |
tag_counts.keys.each{|k| duplicates[k.gsub(/-|_/, "")] << k } | |
duplicates.values.each{|vs| vs.sort!{|x, y| tag_counts[y] <=> tag_counts[x]} } | |
new_tag_counts = {} | |
duplicates.values.each{|vs| new_tag_counts[vs[0].gsub(/(_|-)+/, "_")] = vs.map{|v| tag_counts[v]}.inject(0, &:+)} | |
puts new_tag_counts.to_a.sort{|x, y| y[1] <=> x[1]}.map{|t, c| " #{c} #{t}" } | |
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 "set" | |
stopwords = Set[* | |
IO.read("smart.txt").lines.reject{|x| x =~ /^#/}.map(&:strip) | |
] | |
STDIN.lines.each do |l| | |
c, t = l.split | |
puts l unless stopwords.include? t.strip | |
end |
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 "set" | |
stopwords = Set[* | |
IO.read("smart.txt").lines.reject{|x| x =~ /^#/}.map(&:strip) | |
] | |
STDIN.lines.each do |l| | |
c, t = l.split | |
puts l unless stopwords.include? t.strip | |
end |
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 "sequel" | |
DB = Sequel.postgres('citeulike', :host => 'localhost') |
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
function load() | |
world = love.physics.newWorld(2000, 2000) | |
world:setGravity(0, 50) | |
ground = love.physics.newBody(world, 0, 0, 0) | |
ground_shape = love.physics.newRectangleShape(ground, 400, 500, 600, 10) | |
ground_shape:setData("Ground") | |
body = love.physics.newBody(world, 400, 450) | |
hector = love.physics.newRectangleShape(body, 0, 20, 40, 40) |
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
AESC | |
AGLU | |
AITU | |
AJAR | |
ALEC | |
ALSO | |
AREG | |
ATOK | |
ATUA | |
AWOL |
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
Let X1, ..., XN be Bernoulli(p) | |
Let Y1, ..., YN be Bernoulli(q) | |
X1, ..., XN, Y1, ..., YN are independent | |
Let P be the pearsons product moment correlation coefficient of (X1, ..., XN) and (Y1, ..., YN). i.e. P is a random variable that measures the pearsons for some specific sample of the two. | |
What is the distribution of P? |
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
13:10 < jsuereth> dibblego: Your post, as always, amuses me | |
13:11 < DRMacIver> jsuereth: It is not for your amusification. That is a sign of your inherent | |
dishonestiness with respect to the non-think of agileosity. | |
13:11 < ijuma> hah | |
13:12 < ricky_clarkson> The fact that you say agileosity means you recognise it as a concept. | |
13:12 < ricky_clarkson> Can we eliza him? ;) | |
13:13 < jsuereth> agileosity just made my word of the day | |
13:13 < DRMacIver> I recognise it as a non-concept which the ignorant plebians who pretend they are | |
"programmers" when they don't recognise the obvious concepts of catamorphic | |
homogenisation mistakenly believe has sufficient internal consistency to qualify |
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
0kB to 1kB: 181kB in 268 files | |
1kB to 2kB: 2243kB in 1341 files | |
2kB to 3kB: 3311kB in 1399 files | |
3kB to 4kB: 1448kB in 424 files | |
4kB to 5kB: 758kB in 173 files | |
5kB to 6kB: 399kB in 73 files | |
6kB to 7kB: 328kB in 51 files | |
7kB to 8kB: 253kB in 34 files | |
8kB to 9kB: 227kB in 27 files | |
9kB to 10kB: 226kB in 24 files |
OlderNewer