アキバで146100円。通常より3万円以上OFF
せっかくなのでやったことのメモ
Ubuntuの共有をマウント
動画用コーディックの追加 Xvid、WMVはどうすればよいかまだ不明
写真、音楽のコピー
シェル等のコピー
mac rubyでもClick証券用発注ツールは動作した
今後試してみたいこと
DTrace
ZFS
Darwine
AppleというよりSunの技術ですな
Appleはパッケージングがうまいということかな
OSXは今のところ快調。
困ったことも特になし!!

Ubuntu/外為に関しての備忘録、メモ等・・・
bash gnuplot.sh bollinger.dat out
#!/bin/bash
INPUT=$1
OUTPUT=$2
gnuplot <<EOF
reset
set title "Bollinger Bands"
#set size 2.0, 2.0
set terminal png
set output "${OUTPUT}.png"
set xdata time
set timefmt "%m/%d%H:%M"
set format x "%m/%d %H:%M"
set title "Bollinger Bands"
set yrange [102.0:105.0]
set ytics (102.0, 102.5, 103.0, 103.5, 104.0, 104.5, 105.0)
#set xrange [50:253]
set lmargin 9
set rmargin 2
set grid
set logscale y
plot '$INPUT' using 1:2:4:3:5 notitle with candlesticks lt -1, \
'$INPUT' using 1:6 notitle with lines lt 1, \
'$INPUT' using 1:7 notitle with lines lt 1, \
'$INPUT' using 1:8 notitle with lines lt 1
EOF
05/2213:29 102.98 103.05 102.98 103.03 102.861904761905 103.000846339173 102.722963184637
05/2213:39 103.01 103.05 103.01 103.05 102.871904761905 103.032730014529 102.711079509281
05/2213:49 103.06 103.07 103.0 103.0 102.88 103.048878654657 102.711121345343
05/2213:59 103.04 103.1 103.02 103.08 102.892380952381 103.079880793624 102.704881111138
05/2214:09 103.07 103.13 103.07 103.11 102.907619047619 103.111472402901 102.703765692337
05/2214:19 103.1 103.13 103.1 103.11 102.923333333333 103.136531206948 102.710135459719
require 'rubygems'
require 'tlsmail'
require 'time'
module Gmail
def Gmail.get_content(from_address, to_address, subject=nil, body=nil)
content = ""
content << "From: #{from_address}\n"
content << "To: #{to_address}\n"
content << "Subject: #{subject}\n"
content << "Date: #{Time.now.rfc2822}\n\n"
content << "#{body}\n"
return content
end
def Gmail.send(user, pass, from_address, to_address, subject=nil, body=nil)
Net::SMTP.enable_tls(OpenSSL::SSL::VERIFY_NONE)
Net::SMTP.start('smtp.gmail.com', 587, 'gmail.com', user, pass, :login) { |smtp|
smtp.send_message(get_content(from_address, to_address, subject, body), \
from_address, to_address)
}
end
end
if __FILE__ == $0
Gmail.send("Gmailのアカウント", "パスワード", "送信元アドレス", "送信先アドレス", "sub", "test")
end
application: hello
version: 1
runtime: python
api_version: 1
handlers:
- url: /.*
script: hello.py
import time
print ''
print 'Hello!!'
print ''
tm = time.localtime(time.time())
print time.strftime("%Y/%m/%d %H:%M:%S", tm)
$ ~/sdk/google_appengine/dev_appserver.py ./
WARNING 2008-04-08 23:28:08,144 __init__.py] Could not read datastore data from /tmp/dev_appserver.datastore
INFO 2008-04-08 23:28:08,147 __init__.py] Running application hello on port 8080: http://localhost:8080
Hello!!
2008/04/08 14:47:37
puts "usage ruby #{$0} 元本 金利 年数"; exit 100 if ARGV.size != 3
puts "元本 #{ARGV[0]} 金利 #{ARGV[1]}% #{ARGV[2]}年"
base = ARGV[0].to_i
kinri = ARGV[1].to_f / 100.0
num = ARGV[2].to_i
k_sum = 1.0
1.upto(num) { |i|
k_sum *= (kinri + 1)
alt = base * k_sum
printf "%2d %8d\n", i, alt.to_i
}
script$ ruby fuku.rb 1000000 0.8 10
usage ruby fuku.rb 元本 金利 年数
元本 1000000 金利 0.8% 10年
1 1008000
2 1016064
3 1024192
4 1032386
5 1040645
6 1048970
7 1057362
8 1065820
9 1074347
10 1082942
script$ ruby fuku.rb 1000000 10 10
usage ruby fuku.rb 元本 金利 年数
元本 1000000 金利 10% 10年
1 1100000
2 1210000
3 1331000
4 1464100
5 1610510
6 1771561
7 1948717
8 2143588
9 2357947
10 2593742