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
/* | |
【 マウス+WASDキーによるカメラ操作 】 | |
作成者:watano | |
必ずカメラにアタッチしてください。 | |
Space : 上移動(+y) | |
Shift : 下移動(-y) | |
W : 前移動(+z) | |
S : 後移動(-z) | |
A : 左移動(-x) |
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
○カテゴリー ドメイン - DNS | |
○題名 名前解決されない | |
○メールアドレス takano32@gmail.com | |
○URL/ドメイン no32.tk | |
○作成日時 2012-03-30 18:20:21 | |
○更新日時 2012-04-25 16:27:34 | |
○メッセージ内容 | |
$ dig no32.tk | |
で名前が引けない |
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
import numpy as np | |
from scipy.stats import gmean | |
d1 = [2,4,5,7] | |
d2 = [2,4,5,70] | |
print np.average(d1), np.average(d2) | |
print gmean(d1), gmean(d2) |
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
#!/bin/bash | |
if [ "x$1" = "x" -o "x$2" = "x" ]; then | |
echo Usage: `basename "$0"` "<input.pdf>" "<output.pdf>" >&2 | |
exit 1 | |
fi | |
# change 'ps2write' to 'pswrite' if errors | |
gs -sDEVICE=ps2write -dNOCACHE -sOutputFile=- -q -dbatch \ | |
-dNOPAUSE -dQUIET "$1" -c quit | ps2pdf - "$2" |
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
import itertools | |
from PIL import Image | |
#def mandel(z, c): | |
# return z ** 2 + c | |
result = Image.new("L", (400, 400)) | |
for r, i in itertools.product(xrange(400), repeat=2): |
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
var block_id = 0; | |
var scale = 10; | |
var density = 10; | |
function f (x) { | |
return Math.pow(x, 3); | |
}; | |
var prefab_ids = []; |
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 'mysql2' | |
require './key.rb' | |
Twitter.configure do |config| | |
config.consumer_key = Const::CONSUMER_KEY | |
config.consumer_secret = Const::CONSUMER_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 'twitter' | |
class UpdateString < String | |
def delete_account_name(sasamljp) | |
self.sub("(#{sasamljp})",'') | |
end | |
def delete_at_mark | |
self.gsub(/(@|@)/,'') |
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
var ntwitter = require('ntwitter'); | |
var twi = new ntwitter({ | |
'consumer_key': '', | |
'consumer_secret': '', | |
'access_token_key': '', | |
'access_token_secret': '' | |
}); | |
var my_screen_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
require 'rubygems' | |
require 'levenshtein' | |
require 'shellwords' | |
def similar(s1, s2, threshold = 2) | |
d = Levenshtein.distance(toKatakana(s1), toKatakana(s2)) | |
d <= threshold | |
end | |
def toKatakana(str) |
NewerOlder