Skip to content

Instantly share code, notes, and snippets.

View xhiroga's full-sized avatar

Hiroaki Ogasawara xhiroga

View GitHub Profile
@meyju
meyju / cloudwatch_logs_download.sh
Created May 5, 2015 09:11
Script downloads all logs from aws cloudwatch logs
#!/usr/bin/env bash
#
# Copyright 2015 Julian Meyer
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@risgk
risgk / arith_big.rb
Last active March 6, 2021 07:40
TAPL 演習3.5.17 Rubyでの実装例
# 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
# 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
@hamadu
hamadu / helpme.txt
Created November 15, 2012 06:19
問題が解けないとき/20分経っても方針が見えないならここを見る。
20分経っても方針が見えないならここを見る。数字が小さいほど優先度高い。
1. 問題文に見落としはないですか
- そもそもちゃんと問題読んだ?別の問題を解こうとしてない?
-- 似た問題を解いたことがある場合は特に注意する。
- 制約条件はちゃんと読みましたか
-- 指数時間のアルゴリズムで間に合ったりしない?
-- グラフは特殊な形をしてませんか
--- 木だったり、閉路の数だったり
--解けるものを「解けない」と勘違いしてませんか
@yosemitebandit
yosemitebandit / send_pdf_with_boto_ses.py
Created June 6, 2012 17:56
send PDF attachment with boto and SES
''' 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