-
liblinear-ruby: Ruby interface to LIBLINEAR using SWIG
-
classifier-reborn: Bayesian and LSI classification
dependencies: GSL
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
gibbon = Gibbon::API.new | |
view = ActionView::Base.new('app/views/', {instance_variable_for_templates: 5324}, ActionController::Base.new) | |
campaign = gibbon.campaigns.create( | |
type: "regular", | |
options: { | |
list_id: 'xxxy', | |
from_email: 'you@example.com', | |
from_name: 'Your From', | |
subject: "the subject", |
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
<?xml version="1.0"?> | |
<xsl:stylesheet | |
version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" | |
> | |
<xsl:output method="text"/> | |
<xsl:template match="//w: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
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
# irb3 - Runs an IRB-esque prompt (but it's NOT really IRB!) over multiple | |
# versions of Ruby at once (using RVM) | |
# | |
# By Peter Cooper, BSD licensed | |
# | |
# Main dependency is term-ansicolor for each impl: | |
# rvm exec gem install term-ansicolor |
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
# This is a basic example how to create an import from csv data. This could | |
# be called in a rake task: | |
namespace :db do | |
namespace :import do | |
desc "Import customer of old shop from csv" | |
task :customer => :environment do | |
csv_file = 'db/customer_data.csv' | |
importer = Import::ImportCustomer.new(IO.read(csv_file)) | |
importer.import |
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
namespace :db do | |
desc "Download the a full dump of the production database into the development database" | |
task :pull do | |
config = YAML::load(File.open(File.join('config', 'database.yml'))) | |
dump_database_remotely(config['production'], remote_file) | |
compress_backup_remotely(remote_file) | |
download_backup(remote_file(:compressed), local_file(:compressed)) |
An implementation of Conway's Game of Life in 140 characters of Ruby.
Created by Simon Ernst (@sier).
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
source "http://rubygems.org" | |
gem "cucumber" | |
gem "capybara" | |
gem "capybara-webkit", :platforms => [:ruby], :require => false, :git => "git://github.com/thoughtbot/capybara-webkit.git" | |
gem "capybara-mechanize", :git => "git://github.com/jeroenvandijk/capybara-mechanize.git" | |
gem "rspec" | |
gem "rake" | |
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
<!-- This is the HTML element that, when clicked, will cause the popup to appear. --> | |
<button id="open-popup">Subscribe to our mailing list</button> |
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
# ============================================================================ | |
# Info class | |
# ============================================================================ | |
class ApplicationInfo < Rails::Generators::AppGenerator | |
attr_reader :notices, :errors, :options, :data | |
def initialize | |
@notices = [] # Array of notices to display to the user at the end | |
@errors = [] # Array of errors to display to the user at the end | |
@options = [] # Array of options selected throughout the template |