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
# TYPES AND PROGRAMMING LANGUAGES by Benjamin C. Pierce Copyright (c)2002 Benjamin C. Pierce | |
# Excercise 3.5.17 | |
class Array | |
def isnumericval | |
t = self | |
case | |
when t[0] == :zero | |
true | |
when t[0] == :succ |
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 libraries | |
import time | |
import os | |
while True: # do forever | |
os.system('fswebcam -r 320x240 -S 3 --jpeg 50 --save /home/pi/to_transmit/%H%M%S.jpg') # uses Fswebcam to take picture |
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
20分経っても方針が見えないならここを見る。数字が小さいほど優先度高い。 | |
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
''' quick example showing how to attach a pdf to multipart messages | |
and then send them from SES via boto | |
''' | |
from email.mime.text import MIMEText | |
from email.mime.application import MIMEApplication | |
from email.mime.multipart import MIMEMultipart | |
import boto |
NewerOlder