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 | |
○題名 名前解決されない | |
○メールアドレス [email protected] | |
○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
#ifndef sasamljp | |
#define sasamljp | |
#endif |
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
# -*- encoding: utf-8 -*- | |
require 'rubygems' | |
require 'twitter' | |
class Integer | |
def prime? | |
n = self.abs() | |
return true if n == 2 | |
return false if n == 1 || n & 1 == 0 | |
d = n-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
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) |
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
# -*- 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
# -*- 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
[ | |
true, | |
false, | |
'true', | |
'True', | |
'TRUE', | |
'false', | |
'False', | |
'FALSE', | |
null, |
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): |
OlderNewer