This file contains hidden or 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 BoxMuller | |
def initialize(average, deviation) | |
@pos = -1 | |
@ave = average | |
@dev = deviation | |
@buf = Array.new | |
end | |
def get(position = @pos) | |
return @buf[position] |
This file contains hidden or 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 File | |
def self.actual_path(file = nil) | |
file = __FILE__ if file == nil | |
file = File.expand_path(file) | |
if File.ftype(file) == 'link' then | |
actpath = File.readlink(file) | |
file = File.actual_path(actpath) | |
end | |
return file |
This file contains hidden or 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
module Latin1Conv | |
require 'cgi' | |
LATIN1_CONVERT_TABLE = { | |
' ' => ' ', | |
'¡' => '¡', | |
'¢' => '¢', | |
'£' => '£', | |
'¤' => '¤', |
This file contains hidden or 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 'date' | |
require 'monitor' | |
WAIT_TIME = 10 | |
class BDALogger | |
attr_accessor :today, :logfile |
This file contains hidden or 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
ใใฃใใ | |
Giga Pointsใใใใใใ | |
ใใฌใซ | |
็้ฎ(ใใฉใน)ใฏ้ฃฒใฟ้ฃใใใชใใใฏใใบใใ | |
ๅฎใใฎใใใคใ่ฒทใในใ๏ผ | |
ใฐใชใใๅใฎ้ใ | |
*ใฐใชใใๅผฑใใปใใๅฅฝใฟใใ | |
ๅฝข็ถใซใใๆ่ฆใฎ้ใ | |
็ดฐใ้ทใ: ้ใๆใใ |
This file contains hidden or 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
ใใกใใใกใใชใณใผใใฏ้็บใ้ ใใใ | |
็็ฃๆงใๅฎใใใใซใฏใณใผใใๅธธใซ็ถบ้บใช็ถๆ ใซไฟใค | |
ๆธใใฎใฏ1ๅใ่ชญใใฎใฏไฝๅใ | |
2็ซ ๆๅณใฎใใๅๅ | |
ๆๅณใๆ็ขบใชๅๅใซใใ | |
ใชใใใใๅญๅจใใใฎใใไฝใใใใฎใใใฉใฎใใใซไฝฟ็จใใใฎใ | |
ใใๅๅใซ่งฃ่ชฌใๅฟ ่ฆใชใใๆๅณใๆ็ขบใชๅๅใงใฏใชใ | |
int d //ๆฅๅไฝใฎ็ต้ๆ้ |
This file contains hidden or 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 'formula' | |
class Nano <Formula | |
url 'http://www.nano-editor.org/dist/v2.2/nano-2.2.6.tar.gz' | |
homepage 'http://www.nano-editor.org/' | |
md5 '03233ae480689a008eb98feb1b599807' | |
depends_on 'ncursesw' | |
def install |
This file contains hidden or 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
repos = [ | |
'~/dotfiles', | |
'~/termtter', | |
'~/privaterepos', | |
'~/pokutuna_misc', | |
'~/btproject', | |
'~/scala-query', | |
'~/Documents/scala-collections-impl-doc-ja', | |
'~/Documents/scala-actors-doc-ja', |
This file contains hidden or 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 -*- | |
raise ArgumentError unless ARGV.size >= 2 | |
def prompt(message) | |
puts "#{message} [Y/n]" | |
answer = STDIN.gets.chomp | |
answer == 'Y' ? true : false | |
end |
This file contains hidden or 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 -*- | |
@turu = { :head => 1, :leg => 2, :wing => 2 } | |
@kame = { :head => 1, :leg => 4, :wing => 0 } | |
@tonbo = { :head => 1, :leg => 6, :wing => 4 } | |
raise ArgumentError if [@turu, @kame, @tonbo].any? { |a| a[:head] != 1 } | |
def calc(head, leg, wing) | |
(0..head).each do |t| |
OlderNewer