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
/* | |
* Description | |
Using Groonga as Inverted-Index library. | |
* TODO | |
- Not to store document contents (possible?). | |
- Store documents with scores, and order with scores in the index. | |
- Store documents with sections | |
- Store documents with positions | |
- Separate writer/reader function |
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 | |
# | |
# 2010/12/21 Kazuki Ohta <[email protected]> | |
# Respawn unicorn child processes. | |
# | |
rails_root = ENV["RAILS_HOME"] | |
# master | |
unicorn_master_pid_file = File.expand_path("tmp/pids/unicorn.pid", rails_root) |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <strings.h> | |
#include <assert.h> | |
#include <pthread.h> | |
#include <bmi.h> | |
#define MAX_IDLE_TIME 10 |
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
import java.io.*; | |
import java.util.*; | |
import org.apache.hadoop.conf.*; | |
import org.apache.hadoop.fs.*; | |
import org.apache.hadoop.hbase.*; | |
import org.apache.hadoop.hbase.client.*; | |
import org.apache.hadoop.hbase.util.*; | |
public class Test { | |
public static void main(String[] args) { |
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
# Operating hBase by JRuby script. | |
# $ hbase org.jruby.Main a.rb | |
# http://wiki.apache.org/hadoop/Hbase/JRuby | |
include Java | |
import org.apache.hadoop.hbase.HBaseConfiguration | |
import org.apache.hadoop.hbase.client.Put | |
import org.apache.hadoop.hbase.client.Get | |
import org.apache.hadoop.hbase.client.Scan | |
import org.apache.hadoop.hbase.client.HTable |
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
package net.kzk9; | |
import java.io.IOException; | |
import org.apache.hadoop.conf.*; | |
import org.apache.hadoop.hbase.*; | |
import org.apache.hadoop.hbase.client.*; | |
import org.apache.hadoop.hbase.filter.*; | |
import org.apache.hadoop.hbase.io.*; | |
import org.apache.hadoop.hbase.util.*; |
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
package net.kzk9; | |
import java.io.IOException; | |
import org.apache.hadoop.conf.*; | |
import org.apache.hadoop.io.*; | |
import org.apache.hadoop.hbase.*; | |
import org.apache.hadoop.hbase.client.*; | |
import org.apache.hadoop.hbase.filter.*; | |
import org.apache.hadoop.hbase.io.*; |
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 'sqlite3' | |
require 'rexml/document' | |
include SQLite3 | |
target_projects = { | |
"Sedue" => "SQ" | |
} | |
#------------------ |
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 | |
# coding: utf-8 | |
require 'net/http' | |
require 'uri' | |
require 'rubygems' | |
require 'json' | |
require 'time' | |
USERNAME = 'kzk_mover' |
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
# -*- coding: utf-8 -*- | |
require 'rubygems' | |
require 'json' | |
require 'uri' | |
require 'net/http' | |
require 'active_record' | |
require 'active_support' | |
require 'mechanize' | |
require 'nokogiri' | |
require 'kconv' |