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
########################################################################### | |
# #Programming Collective Intelligence# | |
# PythonCode to RubyCode | |
########################################################################### | |
#人間の嗜好データ Python to Ruby | |
#irbなどからloadされることを前提としています. | |
#その際に$criticsとしてグローバル変数にしています. | |
$critics={'Lisa Rose'=> {'Lady in the Water'=> 2.5, 'Snakes on a Plane'=> 3.5, |
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 'net/irc' | |
class ExampleClient < Net::IRC::Client | |
def hash_make | |
@hash = Hash.new | |
@hash["onodes"] = 0.to_i | |
end | |
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
#simple_ircbot.rb | |
require 'rubygems' | |
require 'net/irc' | |
require 'twitter' | |
class ExampleClient < Net::IRC::Client | |
def twit_func(message) | |
if message.include?("onodes") | |
httpauth = Twitter::HTTPAuth.new("onodes","passwd") |
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
#何故俺にこれを作らせるんだ | |
name = gets.chomp! | |
text = <<EOS | |
#{name}!#{name}!#{name}!#{name}ぅぅうううわぁああああああああああああああああああああああん!!! | |
あぁああああ…ああ…あっあっー!あぁああああああ!!!#{name}#{name}#{name}ぅううぁわぁああああ!!! | |
あぁクンカクンカ!クンカクンカ!スーハースーハー!スーハースーハー!いい匂いだなぁ…くんくん | |
んはぁっ!#{name}たんの髪をクンカクンカしたいお!クンカクンカ!あぁあ!! | |
間違えた!モフモフしたいお!モフモフ!モフモフ!髪髪モフモフ!カリカリモフモフ…きゅんきゅんきゅい!! |
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<GLUT/glut.h> | |
#include<stdio.h> | |
#include<time.h> | |
#include<math.h> | |
#define WIDTH 1024 | |
#define HEIGHT 768 | |
#define PART 100 | |
#define MONITW 362.0 | |
#define MONITH 271.0 |
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
#niku.rb | |
# | |
# | |
# | |
# | |
require 'rubygems' | |
require 'pp' | |
require 'narray' |
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
#rubydbg.rb |
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 'socket' | |
require 'githubcommit.rb' | |
github = GitAtom2.new | |
#p github | |
data = github.check | |
#p data | |
puts 'test' | |
begin |
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 'mini_exiftool' | |
require 'pp' | |
dir = ARGV[0].chomp | |
file_array = Dir::glob(dir + "*.{jpg,JPG,NEF}") | |
file_instance = file_array.map{|filename| MiniExiftool.new(filename) } | |
puts "file scan" | |
file_date_array = file_instance.map{|file| file.DateTimeOriginal} | |
puts 'get file DateTime' |
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 'mechanize' | |
require 'pp' | |
require 'nkf' | |
require 'thread' | |
require 'hpricot' | |
q = Queue.new | |
WWW::Mechanize.html_parser = Hpricot | |
agent = WWW::Mechanize.new |
OlderNewer