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
# -*- encoding: utf-8 -*- | |
require 'rubygems' | |
require 'weather_jp' | |
local = WeatherJp.get gets.to_s | |
system("say #{local.today.to_s}") |
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
# -*- encoding: utf-8 -*- | |
n = 0 | |
input = gets.to_i | |
while n < input do | |
print "「" | |
print "てら" | |
n.times do | |
print "あり" | |
end | |
print "w」" |
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
# -*- encoding: utf-8 -*- | |
require 'rubygems' | |
require 'tweetstream' | |
require 'twitter' | |
require './key.rb' | |
Twitter.configure do |config| | |
config.consumer_key = Const::CONSUMER_KEY | |
config.consumer_secret = Const::CONSUMER_SECRET | |
config.oauth_token = Const::ACCESS_TOKEN |
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
# -*- encoding: utf-8 -*- | |
require 'prime' | |
def printPrime(num) | |
print " ====== ___====== | |
,, -―-、 _====_==== ̄ ̄== ̄ ̄  ̄ ̄ ̄ | |
/ ヽ _─==三≡≡ ̄== | |
/ ̄ ̄/ /i⌒ヽ、| _== ̄ | |
/ ●/ / /  ̄ | |
/ ト、.,../ ,ー-、 _人人人人人人人人人人人人人人人_ |
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
input=gets.split | |
r=input[0].to_i%input[1].to_i | |
until r==0 do | |
m=n | |
n=r | |
r=m%n | |
puts n | |
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
# -*- encoding: utf-8 -*- | |
def datetoDay(str) | |
inputs = str.split | |
y = inputs[0].to_i | |
m = inputs[1].to_i | |
d = inputs[2].to_i | |
if m < 3 | |
y -= 1 |
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
# -*- encoding: utf-8 -*- | |
require 'natto' | |
require 'twitter' | |
require 'tweetstream' | |
require './key.rb' | |
@rest = Twitter::REST::Client.new do |config| | |
config.consumer_key = Const::CONSUMER_KEY | |
config.consumer_secret = Const::CONSUMER_SECRET | |
config.access_token = Const::ACCESS_TOKEN | |
config.access_token_secret = Const::ACCESS_TOKEN_SECRET |
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
# -*- encoding: utf-8 -*- | |
require 'natto' | |
@natto = Natto::MeCab.new | |
def getSS | |
sentenses = [] | |
File.read("./ss.txt", :encoding => Encoding::UTF_8).split("\n").each do |str| | |
sentenses.push str if str.include?("「") and str.include?("」") | |
end | |
sentenses.map! do |sentense| |
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
# -*- encoding: utf-8 -*- | |
require 'tweetstream' | |
require 'twitter' | |
require 'date' | |
require './key.rb' | |
rest = Twitter::REST::Client.new do |config| | |
config.consumer_key = Const::CONSUMER_KEY | |
config.consumer_secret = Const::CONSUMER_SECRET | |
config.access_token = Const::ACCESS_TOKEN | |
config.access_token_secret = Const::ACCESS_TOKEN_SECRET |
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
RollingBox box3d; | |
float counter; | |
void setup(){ | |
size(500, 800, P3D); | |
box3d = new RollingBox(); | |
counter = 0; | |
frameRate(60); | |
} |