Skip to content

Instantly share code, notes, and snippets.

@otobrglez
otobrglez / jaccard_recommendation.rb
Last active April 2, 2024 17:51
Simple recommendation system written in Ruby based on Jaccard index.
# Simple Recommendation Engine in Ruby
# Visit: http://otobrglez.opalab.com
# Author: Oto Brglez <otobrglez@gmail.com>
class Book < Struct.new(:title)
def words
@words ||= self.title.gsub(/[a-zA-Z]{3,}/).map(&:downcase).uniq.sort
end
@eendeego
eendeego / README.md
Created November 14, 2012 17:44
Profiling node.js apps with Ben Noordhuis heapdump

This instructions allow you to take periodical heapdumps.

To use in your project, first install heapdump, then add the following code to your app just after requiring 'fs'.