This file contains hidden or 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 sys;w=lambda x:sys.stdout.write(x); [i if (i % 3 != 0 or w("Fizz") or 1) and (i % 5 != 0 or w("Buzz") or 1) and (i%3==0 or i%5==0 or w(str(i)) or 1) and w("\n") else i for i in range(1,101)] |
This file contains hidden or 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
| fb(101). | |
| fb(N) :- | |
| N mod 15 =:= 0, write('fizzbuzz'), fb2(N). | |
| fb(N) :- | |
| N mod 3 =:= 0, write('fizz'), fb2(N). | |
| fb(N) :- | |
| N mod 5 =:= 0, write('buzz'), fb2(N). | |
| fb(N) :- | |
| write(N), fb2(N). | |
| fb2(N) :- |
This file contains hidden or 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
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import urllib | |
| from BeautifulSoup import BeautifulSoup | |
| import re | |
| def li(id): | |
| f = urllib.urlopen("http://togetter.com/li/"+id) | |
| html = f.read().decode("utf-8", "replace") |
This file contains hidden or 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
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| def p(str): | |
| #print str | |
| pass | |
| def readline(): | |
| import sys | |
| f = open(sys.argv[1]) |
This file contains hidden or 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
| 星空のメモリア考察 | |
| 本編は普通って感じだったがEternal Heartやったらすごくお気に入りになった。多分夢アフターが人生(CLANNAD AfterStory)だからだと思うんだけど。 | |
| いっこ気になったので考察書いてみる。 | |
| ・別のルートの結果(メアアフター含む)が夢アフターに平然と出てくるのはなぜか | |
| ぶっちゃけ一番まともな解は「そこまで細かくシナリオライターが考えてない」って事なんだろうけど、もうちょっと違った視点で見てみる。 |
This file contains hidden or 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 time | |
| def bench(func): | |
| loop = 3 | |
| tim = [] * loop | |
| for i in range(loop): | |
| start = time.time() | |
| func() | |
| tim.append( time.time() - start ) |
This file contains hidden or 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
| Tracking Latent Dynamics | |
| 潜在的構造変化検出の情報論的学習理論 | |
| 潜在情報の例:unixのコマンドログ | |
| 潜在変数(クラスタ):メール、プログラム作成、情報漏えい | |
| データ:cp, bash, make ... | |
| 潜在情報の確率モデル | |
| P(X) = shigma_k=1 P(X|Z)P_k(Z) | |
| Latent Dynamicsの数学モデル |
This file contains hidden or 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
| Jun 20 15:43:36 a /etc/init.d/mysql[5843]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in | |
| Jun 20 15:43:36 a /etc/init.d/mysql[5843]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed | |
| Jun 20 15:43:36 a /etc/init.d/mysql[5843]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' | |
| Jun 20 15:43:36 a /etc/init.d/mysql[5843]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists! | |
| Jun 20 15:43:36 a /etc/init.d/mysql[5843]: |
This file contains hidden or 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
| #! -*- coding:utf-8 -*- | |
| import random | |
| import numpy as np | |
| def p(str): | |
| print str | |
| pass | |
This file contains hidden or 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 pylab import plot | |
| x = [] | |
| for i in xrange(100): | |
| x.append(np.random.multivariate_normal( [1, 1], [[ 2, 0],[0, 1]])) | |
| xx = zip(*x) |