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
# イラストの顔の目の色をクルクルするGIFアニメを作るコマンド | |
# AnimeFace-Ruby.tar.gzの最新版(2011/4/11 21時以降)が必要 | |
# | |
# ruby eyecolor.rb homu.jpg homu.gif | |
require "rubygems" | |
require "RMagick" | |
require "AnimeFace" | |
module AnimeFace |
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
# http://f82cbdfd9f2d880db8b9443b4e84320b.gazou.me/large.png | |
require 'rubygems' | |
require 'RMagick' | |
require 'fileutils' | |
WIDTH = 80 | |
MARK_WIDTH = 11 | |
MARKS = [ |
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 <math.h> | |
#include <stdlib.h> | |
#include <limits.h> | |
#include <assert.h> | |
#define BIT_M 32 | |
#define N 10000 |
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
sum = 0.0; | |
<% node[:feature][:rects].each do |rect| %> | |
xs = x + Math.round(<%= rect[0] %> * scale); | |
ys = y + Math.round(<%= rect[1] %> * scale); | |
w = Math.round(<%= rect[2] %> * scale); | |
h = Math.round(<%= rect[3] %> * scale); | |
<% if (node[:feature][:tilted]) %> | |
sum += sumtf(integral_tilted, xs, ys, w, h) * <%= rect[4] %> * s2h_inv; | |
<% else %>; | |
sum += sumf(integral, xs, ys, w, h) * <%= rect[4] %> * s2_inv; |
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
【WNI】The Last 10-Second 【緊急地震速報】 | |
【WNI】The Last 10-Second 16【緊急地震速報】 | |
Firefox userChrome.js greasemonkeyスクリプトスレ15 | |
Firefox userChrome.js greasemonkeyスクリプトスレ16 | |
Mozilla Firefox 非公式ビルド(MOD)スレッド10 | |
Mozilla Firefox 非公式ビルド(MOD)スレッド11 | |
Mozilla Firefox Part164 | |
Mozilla Firefox Part165 | |
IE×Firefox×Opera×Safari×Chrome最終戦争18回戦 | |
IE×Firefox×Opera×Safari×Chrome最終戦争19回戦 |
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 'open-uri' | |
require 'rss' | |
require 'date' | |
require 'cgi' | |
API_URL="http://www.google.com/calendar/feeds/japanese__ja%%40holiday.calendar.google.com/public/basic?start-min=%04d-%02d-%02d&start-max=%04d-%02d-%02d" |
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
>-------------------------------------------------------------------------- | |
>- | |
>- http://blizzardkite.sakura.ne.jp/streamingplayer/ | |
>- http://sites.google.com/site/scriptstuffstyle/download | |
>- から作成 | |
>- | |
>- feezch.infoで使用. | |
>- バグってるパターンがあれば直したりしてます. | |
>- | |
>------------------------------------------------------------------------- |
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
class CreateNgFiles < ActiveRecord::Migration | |
def self.up | |
create_table :ng_files do |t| | |
t.string :ng_hash | |
t.string :memo | |
t.timestamps | |
end | |
add_index :ng_files, :ng_hash, :unique => true | |
end | |
def self.down |
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 'twitter' | |
require 'gdbm' | |
require 'json' | |
require 'tweetstream' | |
# configure | |
OAUTH_CONFIG = Proc.new do |config| | |
config.consumer_key = "" |
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 -*- | |
# 句読点のない文字列を文単位に区切る | |
# | |
# 基本的にはルールベースでルールが適用できない場合は機械学習器で判定する。 | |
# これは青空文庫のデータ( http://www.udp.jp/misc/aozora-data/ )から学習した。 | |
# * ruby 1.8の場合は $KCODE='u'としないと動かない | |
=begin | |
s = <<TEXT | |
昼飯のスパゲティナポリタンを眺めながら |