Skip to content

Instantly share code, notes, and snippets.

@lavilet
lavilet / gist:f894ce241bbeb65a42c3
Created May 11, 2014 15:38
Ruby port of super-simple text summarization tool, written in python. Based on https://gist.github.com/shlomibabluki/5473521
class Summarizer
attr_accessor :title, :text
attr_reader :word_hash
def extract_sentences(content)
tr = content.gsub("\n", ". ")
return tr.split(". ")
end
def split_content_to_paragraphs(content)
@lavilet
lavilet / ChromeBookmarks ActiveRecord importer
Created May 11, 2014 16:14
Import your chrome bookmarks to a database via ActiveRecord. It tags each bookmark automatically by scraping keywords from a webpage. Need to add threads.
require 'rubygems'
require 'active_record'
require 'markio'
require 'open-uri'
require 'nokogiri'
require 'socket'
ActiveRecord::Base.establish_connection(
:adapter => "sqlite3",
@lavilet
lavilet / keybase.md
Last active February 1, 2021 10:28
keybase.md

Keybase proof

I hereby claim:

  • I am lavilet on github.
  • I am lavilet (https://keybase.io/lavilet) on keybase.
  • I have a public key ASD22uHYnK0VKY-c8p19OmSgnDhuevvwChoatF1YEDqamwo

To claim this, I am signing this object: