Skip to content

Instantly share code, notes, and snippets.

View onodes's full-sized avatar

onodes onodes

  • japan
View GitHub Profile
require 'rubygems'
require 'mechanize'
require 'pp'
require 'nkf'
require 'thread'
require 'hpricot'
q = Queue.new
WWW::Mechanize.html_parser = Hpricot
agent = WWW::Mechanize.new
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'
require 'socket'
require 'githubcommit.rb'
github = GitAtom2.new
#p github
data = github.check
#p data
puts 'test'
begin
#rubydbg.rb
#niku.rb
#
#
#
#
require 'rubygems'
require 'pp'
require 'narray'
#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
#何故俺にこれを作らせるんだ
name = gets.chomp!
text = <<EOS
#{name}!#{name}!#{name}!#{name}ぅぅうううわぁああああああああああああああああああああああん!!!
あぁああああ…ああ…あっあっー!あぁああああああ!!!#{name}#{name}#{name}ぅううぁわぁああああ!!!
あぁクンカクンカ!クンカクンカ!スーハースーハー!スーハースーハー!いい匂いだなぁ…くんくん
んはぁっ!#{name}たんの髪をクンカクンカしたいお!クンカクンカ!あぁあ!!
間違えた!モフモフしたいお!モフモフ!モフモフ!髪髪モフモフ!カリカリモフモフ…きゅんきゅんきゅい!!
#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")
require 'rubygems'
require 'net/irc'
class ExampleClient < Net::IRC::Client
def hash_make
@hash = Hash.new
@hash["onodes"] = 0.to_i
end
###########################################################################
# #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,