Skip to content

Instantly share code, notes, and snippets.

View kachina's full-sized avatar

Tetsuya Chiba kachina

View GitHub Profile
@kachina
kachina / .bashrc
Created March 13, 2012 08:37
EC-CUBE on AWS (インストール編)
8 # User specific aliases and functions
9
10 export JAVA_HOME=/usr/lib/jvm/jre
11 export AWS_HOME=/opt/aws
12 export AWS_RDS_HOME=$AWS_HOME/apitools/rds
13 export AWS_CREDENTIAL_FILE=$AWS_HOME/credential-file-path
14 export EC2_REGION=ap-northeast-1
15 export PATH=$PATH:$HOME/bin:$JAVA_HOME/bin:$AWS_RDS_HOME/bin
import datetime
import os
import pkg_resources
import pyowm
# 開発環境の場合は .env ファイルを読み込む
for dist in pkg_resources.working_set:
if dist.project_name == 'python-dotenv':
from dotenv import load_dotenv
OWM_API_KEY=#{開発用のAPI Key}
OWM_PLACE=Chiba,Jp
import os
import pkg_resources
import pyowm
# 開発環境の場合は .env ファイルを読み込む
for dist in pkg_resources.working_set:
if dist.project_name == 'python-dotenv':
from dotenv import load_dotenv
load_dotenv()
OWM_API_KEY=#{開発用のAPI Key}
OWM_PLACE=Yokohama,Jp
[flake8]
ignore = E501
exclude = .aws-sam
OWM_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
OWM_PLACE=Tokyo,Jp
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Globals:
Function:
Timeout: 900
Environment:
Variables:
TZ: Asia/Tokyo
import os
import boto3
def main():
s3_client = boto3.client('s3')
params = {'Bucket': 'example-bucket'}
while True:
import os
import boto3
def main():
s3_client = boto3.client('s3')
response = s3_client.list_objects_v2(Bucket='example-bucket')
for content in response['Contents']: