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 f1(): | |
return sum([int(i) for i in str(pow(2, 1000))]) | |
def f2(): | |
return sum([int(i) for i in str(2 ** 1000)]) |
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
vk1D & J::Send,{Blind}{Left} | |
vk1D & K::Send,{Blind}{Down} | |
vk1D & I::Send,{Blind}{Up} | |
vk1D & L::Send,{Blind}{Right} | |
vk1C & 1::Run,"https://www.google.com/" | |
vk1C & 2::Run,"https://www.bing.com/" | |
vk1C & 3::Run,"https://www.amazon.co.jp/" |
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
def f1(xs, ys): | |
for y in ys: | |
xs.append(y) | |
def f2(xs, ys): | |
xs.extend(ys) | |
if __name__ == '__main__': |
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
def f(a, b): | |
if not a: | |
return False | |
if b: | |
return True | |
return False | |
def g(a, b): | |
return a and b |
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
# cf. https://docs.djangoproject.com/ja/1.10/ref/settings/ | |
EMAIL_HOST = 'smtp.gmail.com' | |
EMAIL_PORT = 587 | |
EMAIL_USE_TLS = True | |
EMAIL_HOST_USER = '送信元メールアドレス' | |
EMAIL_HOST_PASSWORD = 'アプリパスワード' |
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 -*- | |
from email.mime.text import MIMEText | |
import smtplib | |
EMAIL = '送信元メールアドレス' | |
PASSWORD = 'アプリパスワード' | |
TO = '送信先メールアドレス' | |
msg = MIMEText('This is a test') |
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
; クリップボードの内容(長文テキスト)をBing翻訳で英和翻訳する | |
vk1Csc079 & T::Run,http://www.bing.com/translator/?from=en&to=ja&text=%CLIPBOARD% |
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 -*- | |
from __future__ import unicode_literals | |
""" | |
Destroy files. | |
""" | |
import argparse | |
import os |
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
def factorial(a, b): | |
""" | |
>>> factorial(1, 6) | |
720 | |
>>> factorial(10, 100) == factorial(1, 100) / factorial(1, 9) | |
True | |
""" | |
ab = a * b |
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 -*- | |
PREFECTURES_I_TO_S = { | |
1: '北海道', 2: '青森県', 3: '岩手県', 4: '宮城県', 5: '秋田県', | |
6: '山形県', 7: '福島県', 8: '茨城県', 9: '栃木県', 10: '群馬県', | |
11: '埼玉県', 12: '千葉県', 13: '東京都', 14: '神奈川県', 15: '新潟県', | |
16: '富山県', 17: '石川県', 18: '福井県', 19: '山梨県', 20: '長野県', | |
21: '岐阜県', 22: '静岡県', 23: '愛知県', 24: '三重県', 25: '滋賀県', | |
26: '京都府', 27: '大阪府', 28: '兵庫県', 29: '奈良県', 30: '和歌山県', | |
31: '鳥取県', 32: '島根県', 33: '岡山県', 34: '広島県', 35: '山口県', |
NewerOlder