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
# -*- coding: utf-8 -*- | |
from numpy import * | |
print 'これはHaar Wavelet基底を生成するプログラムです。' | |
print '2^n次元の基底を生成します' | |
size = 2 ** input('nを入力してください(10以下を推奨): ') | |
n = size |
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
string = raw_input().lower() | |
notvowl = ".".join([c for c in string if not c in "aiueoy"]) | |
print "." + notvowl |
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
inp = int(raw_input()) | |
k = inp - 1 | |
def generate(n): | |
return [' ' for i in range(inp - n + 1)] \ | |
+ [str(i) for i in range(n)] + [str(i) for i in range(n-1)][::-1] | |
for i in range(inp + 1): | |
print " ".join(generate(i + 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
print [("" if (i % 3) else "Fizz") + ("" if (i % 5) else "Buzz") or i for i in range(1,100)] |
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 | |
def gs_cofficient(v1, v2): | |
return np.dot(v2, v1) / np.dot(v1, v1) | |
def multiply(cofficient, v): | |
return map((lambda x : x * cofficient), v) | |
def proj(v1, v2): | |
return multiply(gs_cofficient(v1, v2) , v1) |
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
#Simple benchmark for PyPy's numpypy | |
#Based on https://bitbucket.org/pypy/pypy/src/dd3bcd84b145/pypy/module/micronumpy/bench/ | |
import time | |
try: | |
import numpypy as numpy | |
except: | |
import numpy |
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
When I started wicd, recived this message, and can't start wicd. | |
# wicd-client | |
Traceback (most recent call last): | |
File "/usr/share/wicd/gtk/wicd-client.py", line 63, in <module> | |
from wicd import dbusmanager | |
File "/usr/lib/python2.7/site-packages/wicd/dbusmanager.py", line 93, in <module> | |
DBUS_MANAGER = DBusManager() | |
File "/usr/lib/python2.7/site-packages/wicd/dbusmanager.py", line 57, in __init__ | |
self._bus = dbus.SystemBus() |
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
# wicd-client | |
Traceback (most recent call last): | |
File "/usr/share/wicd/gtk/wicd-client.py", line 63, in <module> | |
from wicd import dbusmanager | |
File "/usr/lib/python2.7/site-packages/wicd/dbusmanager.py", line 93, in <module> | |
DBUS_MANAGER = DBusManager() | |
File "/usr/lib/python2.7/site-packages/wicd/dbusmanager.py", line 57, in __init__ | |
self._bus = dbus.SystemBus() | |
File "/usr/lib/python2.7/site-packages/dbus/_dbus.py", line 202, in __new__ | |
private=private) |
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
暗号は対称暗号方式と公開鍵暗号方式に大きく分けることができます. | |
暗号といえば多くの人が思い浮かべるであろうシーザー暗号や, | |
シャーロック・ホームズの「踊る人形」暗号は対称暗号方式です. | |
しかしながら,現代の情報通信ではRSA暗号に代表される公開鍵暗号方式もまた大きな役割を果たしています. | |
今回の発表では,対称暗号方式に比べ直感的には理解の難しい公開鍵暗号方式に焦点を当て, | |
具体例をあげながら,対称暗号方式との比較をすると共に計算機の計算量の仮定に基づく安全性の保証について話します. |
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
"文字コードの設定 | |
set encoding=utf8 | |
set fileencodings=iso-2022-jp,sjis,euc-jp | |
"シンタックスハイライト | |
syntax on | |
"カラースキーマの設定 | |
set t_Co=256 | |
colorscheme molokai |
OlderNewer