code stringlengths 1 1.73M | language stringclasses 1
value |
|---|---|
class Survey < ActiveRecord::Base
include AliasingColumns
set_table_name "SURVEYS"
AliasingColumns.add_aliases columns
belongs_to :user,
:class_name => "User",
:foreign_key => "user_id"
belongs_to :distributiontype,
:class_name => "DistributionType",
:foreign_key => "distribution_type_... | Ruby |
class RatingQuestion < ActiveRecord::Base
include AliasingColumns
set_table_name "RATING_QUESTIONS"
AliasingColumns.add_aliases columns
belongs_to :question,
:class_name => "Question",
:foreign_key => "question_id"
if AliasingColumns.get_adapter_name == "oracle"
# self.primary_ke... | Ruby |
class UsersSurveysPermission < ActiveRecord::Base
include AliasingColumns
set_table_name "USERS_SURVEYS_PERMISSIONS"
AliasingColumns.add_aliases columns
belongs_to :user,
:class_name => "User",
:foreign_key => "user_id"
belongs_to :survey,
:class_name => "Survey",
:fore... | Ruby |
class OQAnswer < ActiveRecord::Base
include AliasingColumns
set_table_name "OQ_ANSWERS"
AliasingColumns.add_aliases columns
belongs_to :filledsurvey,
:class_name => "FilledSurvey",
:foreign_key => "filled_survey_id"
belongs_to :question,
:class_name => "Question",
:foreign_key... | Ruby |
class CQAnswer < ActiveRecord::Base
include AliasingColumns
set_table_name "CQ_ANSWERS"
AliasingColumns.add_aliases columns
belongs_to :filledsurvey,
:class_name => "FilledSurvey",
:foreign_key => "filled_survey_id"
belongs_to :cqpossibleanswer,
:class_name => "CQPossibleAnswer",
... | Ruby |
class UploadedFile
def self.save(upload)
n = upload.original_filename
dir = "public/upload"
path = File.join( dir,n)
File.open(path, "wb") { |f| f.write(upload.read) }
end
end | Ruby |
class QuestionType < ActiveRecord::Base
include AliasingColumns
set_table_name "QUESTION_TYPES"
AliasingColumns.add_aliases columns
has_many :questions,
:class_name => "Question",
:foreign_key => "type_id"
if AliasingColumns.get_adapter_name == "oracle"
# self.primary_key ="ID"
set_sequence... | Ruby |
class CQPossibleAnswer < ActiveRecord::Base
include AliasingColumns
set_table_name "CQ_POSSIBLE_ANSWERS"
AliasingColumns.add_aliases columns
belongs_to :closedquestion,
:class_name => "ClosedQuestion",
:foreign_key => "closed_question_id"
has_many :cqanswers,
:class_name => "CQAnswe... | Ruby |
class ArrangingQuestion < ActiveRecord::Base
include AliasingColumns
set_table_name "ARRANGING_QUESTIONS"
AliasingColumns.add_aliases columns
belongs_to :question,
:class_name => "Question",
:foreign_key => "question_id"
if AliasingColumns.get_adapter_name == "oracle"
# self.pr... | Ruby |
class ClosedQuestion < ActiveRecord::Base
include AliasingColumns
set_table_name "CLOSED_QUESTIONS"
AliasingColumns.add_aliases columns
belongs_to :question,
:class_name => "Question",
:foreign_key => "question_id"
has_many :cqpossibleanswers,
:class_name => "CQPossibleAnswer",
... | Ruby |
class DistributingQuestion < ActiveRecord::Base
include AliasingColumns
set_table_name "DISTRIBUTING_QUESTIONS"
AliasingColumns.add_aliases columns
belongs_to :question,
:class_name => "Question",
:foreign_key => "question_id"
if AliasingColumns.get_adapter_name == "oracle"
# self.pri... | Ruby |
module UserHelper
end
| Ruby |
# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
end
| Ruby |
module MainHelper
end
| Ruby |
module SurveyHelper
def add_question_link(form_builder)
link_to_function 'Dodaj pytanie' do |page|
form_builder.fields_for :questions, Question.new, :child_index => 'NEW_RECORD' do |f|
STDERR.puts "-----------------------------------------------------xxx"
htmlOpen = render(:p... | Ruby |
module RightsHelper
end
| Ruby |
class MainController < ApplicationController
layout 'standard'
def login
session[:user_id] = nil
if request.post?
user = User.authenticate(params[:name], params[:password])
if user
session[:user_id] = user.ID
redirect_to(:action => "index")
else
flash.now[:notice] = "Invalid user/password combination"
... | Ruby |
require 'csv'
class UserController < ApplicationController
layout 'standard'
before_filter :authorizeAdmin
def search
@positions = Position.find(:all, :order => "NAME").map {|u| [u.name, u.id] }
@systemRoles = SystemRole.find(:all, :order => "NAME").map {|u| [u.name, u.id] }
@years = get_peri... | Ruby |
class RightsController < ApplicationController
layout 'standard';
before_filter :authorize,:authorizeSurveyer
#before_filter :authorizeAuthor,:except => :rights_overview
def rights_overview
@survey = Survey.find(params[:id])
respond_to do |format|
format.html
format.xml { render :xml => @surve... | Ruby |
class SurveyController < ApplicationController
layout 'standard';
before_filter :authorizeSurveyer, :only => [:new_survey,:create_survey,:edit_survey,:show_survey,:destroy_survey,
:new_rights,:create_rights]
before_filter :authorizeSurveyee, :only => [:list_filled,:fill_survey,:createFill... | Ruby |
# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.
class ApplicationController < ActionController::Base
before_filter :authorize, :except => :login
session :session_key => '_pollster_session_id'
helper :al... | Ruby |
ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'test_help'
class Test::Unit::TestCase
# Transactional fixtures accelerate your tests by wrapping each test method
# in a transaction that's rolled back on completion. This ensures that the
# test datab... | Ruby |
# Settings specified here will take precedence over those in config/environment.rb
# The production environment is meant for finished, "live" apps.
# Code is not reloaded between requests
config.cache_classes = true
# Enable threaded mode
# config.threadsafe!
# Use a different logger for distributed setups
# config.... | Ruby |
# Settings specified here will take precedence over those in config/environment.rb
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the webserver when you make code changes.
config.ca... | Ruby |
# Settings specified here will take precedence over those in config/environment.rb
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between... | Ruby |
ActionController::Routing::Routes.draw do |map|
# The priority is based upon order of creation: first created -> highest priority.
# Sample of regular route:
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
# Keep in mind you can assign values other than :controller and :action
# ... | Ruby |
# These settings change the behavior of Rails 2 apps and will be defaults
# for Rails 3. You can remove this initializer when Rails 3 is released.
if defined?(ActiveRecord)
# Include Active Record class name as root for JSON serialized output.
ActiveRecord::Base.include_root_in_json = true
# Store the full clas... | Ruby |
# Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
# Mime::Type.register_alias "text/html", :iphone
| Ruby |
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format
# (all these examples are active by default):
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person',... | Ruby |
# Be sure to restart your server when you modify this file
# Uncomment below to force Rails into production mode when
# you don't control web/app server and can't set it the proper way
# ENV['RAILS_ENV'] ||= 'production'
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3... | Ruby |
# Don't change this file!
# Configure your app in config/environment.rb and config/environments/*.rb
RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
module Rails
class << self
def boot!
unless booted?
preinitialize
pick_boot.run
end
end
def booted?
... | Ruby |
#!/usr/bin/ruby1.8
#
# You may specify the path to the FastCGI crash log (a log of unhandled
# exceptions which forced the FastCGI instance to exit, great for debugging)
# and the number of requests to process before running garbage collection.
#
# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log
#... | Ruby |
#!/usr/bin/ruby1.8
require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired... | Ruby |
# Get the directory that this configuration file exists in
dir = File.dirname(__FILE__)
# Load the sencha-touch framework automatically.
load File.join(dir, '..', 'themes')
# Compass configurations
sass_path = dir
css_path = File.join(dir, "..", "css")
environment = :development
output_style = :expanded
| Ruby |
# Get the directory that this configuration file exists in
dir = File.dirname(__FILE__)
# Load the sencha-touch framework automatically.
load File.join(dir, '..', 'themes')
# Compass configurations
sass_path = dir
css_path = File.join(dir, "..", "css-debug")
environment = :development
output_style = :expanded | Ruby |
# Get the directory that this configuration file exists in
dir = File.dirname(__FILE__)
# Load the sencha-touch framework automatically.
load File.join(dir, '..', 'themes')
# Compass configurations
sass_path = dir
css_path = File.join(dir, "..", "css")
environment = :production
output_style = :compressed | Ruby |
# This file registers the sencha-touch framework with compass
# It's a magic name that compass knows how to find.
dir = File.dirname(__FILE__)
require File.join(dir, 'lib', 'theme_images.rb')
Compass::Frameworks.register 'sencha-touch', dir
| Ruby |
stylesheet 'sencha-touch.scss' | Ruby |
module SenchaTouch
module SassExtensions
module Functions
module ThemeImages
def theme_image(theme, path, mime_type = nil)
path = path.value
images_path = File.join(File.dirname(__FILE__), "..", "images", theme.value)
real_path = File.join(images_path, path)
i... | Ruby |
environment = :production
project_type = :stand_alone
http_path = "/"
css_dir = "../styles"
sass_dir = "."
images_dir = "images"
sass_options = {
:line_numbers => false,
:debug_info => false
}
# output_style = :compressed
# output_style = :compact
output_style = :expanded
| Ruby |
require 'webrick'
include WEBrick
s = HTTPServer.new(
:Port => 2010,
:DocumentRoot => Dir::pwd
)
s.mount('/sh/scripts', WEBrick::HTTPServlet::FileHandler, '../scripts')
s.mount('/sh/styles', WEBrick::HTTPServlet::FileHandler, '../styles')
trap('INT') { s.stop }
s.start
| Ruby |
require 'date'
require 'erb'
output_file = "/home/battleho/swarm/sources/prototype1/ror/public/monitor.html"
storevalues = `find ~/swarm/pagestore/ -type d -maxdepth 3 | egrep '[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}' | xargs du -s`
# Expected sample values
# storevalues = <<-EOF
# 47160 /home/battleho/swarm/pagestore/2008... | Ruby |
#!/usr/bin/env ruby
# == Synopsis
# Generates records for the bayes-swarm database containing statistics about words according to the bayes-swarm definition.
# This tool can be used for testing purposes to load the bayes-swarm database with fictional data
# which can be statistically analyzed and tested.
#
# For examp... | Ruby |
# Provides common functionalities reused across scripts
module Common
# Given an array of command-line parameters returns the part of them
# which is before or after the +opt+ parameter, which acts as separator
def split_params(params,opt, after)
reject = after
res = params.collect do |p|
reject ... | Ruby |
class Functions
def linear
const_val = 3
return function { |x| const_val }
end
def smooth_sin
damping = 0.1
cycle = Math::PI / 10
return function { |x| Math.sin( cycle * x) / ( damping * x ) }
end
## DO NOT MODIFY BELOW THIS LINE
def method_missing(methId, *args)
puts "... | Ruby |
# statistics2.rb
#
# distributions of statistics
# by Shin-ichiro HARA
#
# 2003.09.25
#
# Ref:
# [1] http://www.matsusaka-u.ac.jp/~okumura/algo/
# [2] http://www5.airnet.ne.jp/tomy/cpro/sslib11.htm
module Statistics2
SQ2PI = Math.sqrt(2 * Math::PI)
# Newton approxima... | Ruby |
#!/usr/bin/env ruby
# == Synopsis
# Generates records for the bayes-swarm database containing statistics about words according to the bayes-swarm definition.
# This tool can be used for testing purposes to load the bayes-swarm database with fictional data
# which can be statistically analyzed and tested.
#
# For examp... | Ruby |
#!/usr/bin/ruby
require 'stopstem_helpers'
iws = Intword.find(:all, :conditions => {:language_id => 2600})
puts "id, name, word count"
iws.each do |iw|
if (is_stop_word?(iw.name))
puts "#{iw.id}, #{iw.name}, #{Word.count(:all, :conditions=>{:intword_id=>iw.id})}"
end
end
| Ruby |
#!/usr/bin/ruby
require 'stopstem_helpers'
iws = Intword.find(:all, :conditions => {:language_id => 2600})
#roots = {}
puts "id, name, is_stop, is_root, root, word count"
iws.each do |iw|
iwroot = root(iw.name)
iwcount = Word.count(:all, :conditions=>{:intword_id=>iw.id})
puts "#{iw.id}, #{iw.name}, #{is_s... | Ruby |
#!/usr/bin/ruby
require 'stopstem_helpers'
iws = Intword.find(:all, :conditions => {:language_id => 2600})
#roots = {}
puts "id, name, is_stop, is_root, root, word count"
iws.each do |iw|
iwroot = root(iw.name)
iwcount = Word.count(:all, :conditions=>{:intword_id=>iw.id})
puts "#{iw.id}, #{iw.name}, #{is_s... | Ruby |
#!/usr/bin/ruby
require 'stopstem_helpers'
iws = Intword.find(:all, :conditions => {:language_id => 2600})
puts "id, name, word count"
iws.each do |iw|
if (is_stop_word?(iw.name))
puts "#{iw.id}, #{iw.name}, #{Word.count(:all, :conditions=>{:intword_id=>iw.id})}"
end
end
| Ruby |
require 'rubygems'
Dir.chdir('../../prototype1/ruby/')
require 'swarm_ar_support.rb'
require 'ferret'
class StopAndStemAnalyzer < Ferret::Analysis::Analyzer
include Ferret::Analysis
def token_stream(field, str, lang)
stop_langs = {:it => Ferret::Analysis::FULL_ITALIAN_STOP_WORDS,
:en => Fe... | Ruby |
# = Bayes : Blender
# Contains the bulk logic that transforms a plain text content
# into a set of data-structures suitable for storage in the
# bayes database.
#
# Given a text content that belongs to a given portion of a page, it
# performs the following operations:
# * stopwords and other language artifacts are ... | Ruby |
# = Bayes
# The 'bayes' folder contains the specific bindings for the bayes-swarm
# entities, such as the active-record model. It is separated from the 'util'
# folder to preserve separation between generic code and code specialized for
# the current setup of the bayes-swarm model.
#
# == Copyright
# Copyright(c) 2008... | Ruby |
# = Bayes : PageStore extension
# Extends the default PageStore to provide additional information in the +META+
# file pertaining to the +Page+ the stored entry belongs to (such as id, kind
# and language code).
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2008 - bayes-swarm... | Ruby |
# = Bayes : ActiveRecord bindings
# Contains the ActiveRecord declaration of the bayes-swarm model.
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2008 - bayes-swarm project.
# Licensed under the Apache2 License.
require 'active_record'
class Intword < ActiveRecord::Base
bel... | Ruby |
# = Pulsar Runner
# This is responsible for kickstarting all the
# scripts and execution steps. It is invoked from the command line
# with this syntax :
#
# ruby runner.rb -c configuration_file.yml -f component
#
# such as:
#
# ruby runner.rb -c swarm_shoal_options.yml -f test/noop
#
# == Author
# Riccardo Govoni [... | Ruby |
# = Bayes : Group-Intwords
# Group-Intwords is a simple tool whose purpose is to consolidate and
# clean up the Intwords table in the database.
#
# It scans the Intwords table and looks for duplicates and words to are
# recorded in both the stemmed and not-stemmed form ( bugs in the past have
# resulted in non-stemme... | Ruby |
# = Bayes : Swarm-Shoal
# Shoal is the second component in the bayes-swarm execution chain.
# It is responsible for loading the web pages and feeds as saved by
# Swarm-Wave, analyzing their contents, normalizing them and saving
# the parsed data in a relational database, suitable for access by
# the web application... | Ruby |
# = Bayes : Swarm-Wave
# Wave is the first component in the bayes-swarm execution chain. It is
# responsible for downloading and saving to the local filesystem all the
# web pages and rss feeds declared in the database.
#
# It is also responsible for updating the +last_scantime+ information
# on the database.
#
# == Au... | Ruby |
# = Component
# The 'component' folder contains all the components for the bayes-swarm
# execution chain. New components for such chain should be added here. This includes,
# for example, web scrapers, script to consolidate data into databases, indexing
# algorithms and so forth.
#
# == Copyright
# Copyright(c) 2008 ... | Ruby |
# = Bayes : Swarm-MoreMeta
# MoreMeta is just a quick utility script that updates the META
# informations stored in the pagestore, to enrich them with additional
# info (as the page_id, kind, language and other infos).
#
# It also fixes a bug in some META files that contain spurious newlines
# for some URL entries.
#... | Ruby |
# = Pulsar
# This is the base folder for the Pulsar prototype.
# "Pulsar" is the codename for prototype3, the third iteration
# of the bayes-swarm extraction engine.
#
# The concept behind the Pulsar prototype is to divide the execution
# chain into 'components'. Each component is responsible to handle
# a particula... | Ruby |
# = Utilities : Extractors
# Contains the available web extractors.
#
# All the extractors should conform to the following interface: they should
# provide an +extract()+ method, which takes a +page+ and returns
# an +ExtractedPage+, a wrapper that binds together a page and its content,
# or +nil+ in case of error.
#
... | Ruby |
# = Utilities : File lister
# Contains filesystem search utilities
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2008 - bayes-swarm project.
# Licensed under the Apache2 License.
require 'util/log'
module Pulsar
# Recursively searches for matches within a directory.
cl... | Ruby |
# = Utilities : Stemmer
# The Stemmer is responsible for cleaning up textual data. It performs three
# basic operations:
# * stemming the words found within a block of text.
# * removing stopwords ( very popular words such as conjunctions) from the sample
# * removing special characters such as quotation marks, questio... | Ruby |
# = Utilities : Logging
# General purpose utilities related to logging
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2008 - bayes-swarm project.
# Licensed under the Apache2 License.
module Pulsar
# A module that can be included in classes to enrich them with logging meth... | Ruby |
# = Utilities : Html
# Contains utilities to parse and analyze html contents.
# It uses Hpricot as the backend library to perform the heavy work.
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2008 - bayes-swarm project.
# Licensed under the Apache2 License.
require 'hpricot'
... | Ruby |
# = Utilities : RssPage
# Contains the definition of a simple wrapper class that represents
# an RSS item.
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2008 - bayes-swarm project.
# Licensed under the Apache2 License.
module Pulsar
# An utility class to wrap a +url+, +ki... | Ruby |
# = Util
# The 'util' folder contains general purpose utilities and code
# supposed to be reused across different components, such as logging
# facilities, active_record binding code and web extractors.
#
# == Copyright
# Copyright(c) 2008 - bayes-swarm project.
# Licensed under the Apache2 License. | Ruby |
# = Utilities : File storage
# Contains code to handle saving web contents to the filesystem in
# an indexed manner, the so-called PageStore.
#
# See http://code.google.com/p/bayes-swarm/wiki/FileStorage for more info.
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2008 - bayes-... | Ruby |
# = Utilities : ActiveRecord management
# Contains general purpose utilities related to the ActiveRecord framework.
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2008 - bayes-swarm project.
# Licensed under the Apache2 License.
require 'active_record'
require 'util/log'
modul... | Ruby |
# = Test : UnitTests runner
# Executes the suite of available unit tests.
#
# To run the tests, use the +Runner+ as usual, but remember to add a +runner+
# option to tell Test::Unit which suite runner to use.
#
# ruby runner.rb -c test_shoal_options.yml \
# -f test/unittests \
# --ru... | Ruby |
# = Test : Blender
# A unit test for the BayesBlender, which is complex enough to
# require a dedicated effort to get it right.
#
# Refer to test/unittests.rb on how to run unit tests.
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2008 - bayes-swarm project.
# Licensed under th... | Ruby |
# = Unit
# The 'unit' folder contains unit tests.
#
# == Copyright
# Copyright(c) 2008 - bayes-swarm project.
# Licensed under the Apache2 License. | Ruby |
# = Test : ActiveRecord No-Op
# A simple component designed to verify that
# the ActiveReport bindings are working properly. Run with
#
# ruby runner.rb -c swarm_shoal_options.yml -f test/arnoop
#
# If everything is fine, it should print the list of pages stored in
# the database
#
# == Author
# Riccardo Govoni [batt... | Ruby |
# = Test : No-Op
# A simple component designed to verify that
# the Runner and component system are setup properly. Run with
#
# ruby runner.rb -c swarm_shoal_options.yml -f test/noop
#
# If everything is fine, it should just print a log line saying +NoOp.+
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# ... | Ruby |
# = ETL Runner
# This file is part of the ETL package.
# See the documentation for ETLRunner as a starting point.
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2007 - bayes-swarm project.
# Licensed under the Apache2 License.
#
require 'json'
require 'yaml'
require 'etl/util/lo... | Ruby |
# = Standard ETL blocks
# This file is part of the ETL package.
# This file contains the standard ETL blocks part of the bayes-swarm ETL package. Such blocks
# are general purpose ones, which may be usually reused in any chain, independently of its type.
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Co... | Ruby |
# = Conditional ETL blocks
# This file is part of the ETL package.
# This file contains ETL blocks that apply conditional rules on the ETL processing sequence.
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2007 - bayes-swarm project.
# Licensed under the Apache2 License.
requi... | Ruby |
# = ETL Utilities : Logging
# This file is part of the ETL package. It contains general purpose utilities related
# to logging
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2007 - bayes-swarm project.
# Licensed under the Apache2 License.
# A module that can be included in cla... | Ruby |
# = ETL Utilities : Database management
# This file is part of the ETL package. It contains general purpose utilities related
# to database management, Data Access Objects (DAO) and database interfacing in general
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2007 - bayes-swarm... | Ruby |
# = ETL Utilities : ActiveRecord management
# This file is part of the ETL package. It contains general purpose utilities related
# to the ActiveRecord framework.
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2007 - bayes-swarm project.
# Licensed under the Apache2 License.
re... | Ruby |
# = Database Load ETL blocks
# This file is part of the ETL package.
# This file contains ETL blocks that can be used to interoperate with a relational database,
# during the *load* phase of ETL processes.
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2007 - bayes-swarm project... | Ruby |
# = Multiplexer ETL blocks
# This file is part of the ETL package.
# This file contains the support structures to work with *multiplexed* etl blocks. A
# Multiplexer has the ability to perform its subsequent tasks a number of times,
# varying the DTO in use from time to time, depending on a given condition.
#
# == Aut... | Ruby |
# = Data Transfer Objects for bayes-swarm
# This file contains DTOs specific to the bayes-swarm project.
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2007 - bayes-swarm project.
# Licensed under the Apache2 License.
require 'dto/dto'
#
# An ETL DTO is the main object which i... | Ruby |
# = Multiplex ETL blocks for bayes-swarm
# This file contains ETL blocks specific to the bayes-swarm project.
# It contains multiplexers which scan through pages and sources.
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2007 - bayes-swarm project.
# Licensed under the Apache2 ... | Ruby |
# = Data Transfer Objects for bayes-swarm with ActiveRecord support
# This file contains DTOs specific to the bayes-swarm project, which are bound
# to ActiveRecord entities
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2007 - bayes-swarm project.
# Licensed under the Apache2 L... | Ruby |
# = Filtering ETL blocks for bayes-swarm
# This file contains ETL blocks specific to the bayes-swarm project.
# It contains filters that reduce the word list according to various algorithms
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2007 - bayes-swarm project.
# Licensed und... | Ruby |
# = Filtering ETL blocks for bayes-swarm
# This file contains ETL blocks specific to the bayes-swarm project.
# It contains grouping functions that compact the word list according to various algorithms
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2007 - bayes-swarm project.
# ... | Ruby |
# = Extractor ETL blocks for bayes-swarm
# This file contains ETL blocks specific to the bayes-swarm project.
# It contains extractors that can download pages from the file or load them from filesystem
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2007 - bayes-swarm project.
# ... | Ruby |
# = Cleaning ETL blocks for bayes-swarm
# This file contains ETL blocks specific to the bayes-swarm project.
# It contains extractors that clean raw contents from the previous steps.
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2007 - bayes-swarm project.
# Licensed under the ... | Ruby |
# = Extract ETL blocks
# This file contains ETL blocks used for testing purposes. Its content are
# subject to change without notice.
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2007 - bayes-swarm project.
# Licensed under the Apache2 License.
require 'etl/std'
require 'etl/m... | Ruby |
# = Storage and Load ETL blocks for bayes-swarm
# This file contains ETL blocks specific to the bayes-swarm project.
# It contains blocks that may be used to store DTOs into various output destinations
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2007 - bayes-swarm project.
# ... | Ruby |
# = Helper ETL blocks for bayes-swarm
# This file contains ETL blocks specific to the bayes-swarm project.
# It contains helper and utility blocks
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2007 - bayes-swarm project.
# Licensed under the Apache2 License.
require 'etl/std'
... | Ruby |
# = Data Transfer Objects
# This file is part of the ETL package
#
# == Description
# Data Transfer Objects (DTOs) are used to transfer values and application state
# between different ETL steps. They can be serialized and deserialized, to allow
# ETL partitioning and suspend/resume
#
# == Serialization
# The +json+ f... | Ruby |
# = Data Transfer Objects and Active Record
# This file is part of the ETL package and contains support structures to map between
# DTOs and ActiveRecord.
#
# == Object-Relational Mapping and JSON
# This file enriches ActiveRecord (by mixin some code into <tt>ActiveRecord::Base</tt> )
# to allow to-and-from conversion ... | Ruby |
# = Data Transfer Objects for Multiplexers
# This file is part of the ETL package
#
# == Description
# This file contains the definition of Data Transfer Objects suitable
# for multiplexed use.
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2007 - bayes-swarm project.
# Licensed... | Ruby |
require 'rubygems'
require 'etl/runner'
# $-v = true
e = ETLRunner.new("etl_sample.yml")
e.run | Ruby |
# = UnitTest : ActiveRecord - JSON interaction
# This file is part of the unit tests for the ETL package
#
# == Description
# The tests in this file verify interactions between ActiveRecord and JSON
#
# == Author
# Riccardo Govoni [battlehorse@gmail.com]
#
# == Copyright
# Copyright(c) 2007 - bayes-swarm project.
# Li... | Ruby |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.