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 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 |
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
OWM_API_KEY=#{開発用のAPI Key} | |
OWM_PLACE=Chiba,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
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() |
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
OWM_API_KEY=#{開発用のAPI Key} | |
OWM_PLACE=Yokohama,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
OWM_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
OWM_PLACE=Tokyo,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
[flake8] | |
ignore = E501 | |
exclude = .aws-sam |
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
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Globals: | |
Function: | |
Timeout: 900 | |
Environment: | |
Variables: | |
TZ: Asia/Tokyo |
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 os | |
import boto3 | |
def main(): | |
s3_client = boto3.client('s3') | |
params = {'Bucket': 'example-bucket'} | |
while True: |
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 os | |
import boto3 | |
def main(): | |
s3_client = boto3.client('s3') | |
response = s3_client.list_objects_v2(Bucket='example-bucket') | |
for content in response['Contents']: |
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
require "fileutils" | |
require "digest/md5" | |
Earthquake.init do | |
dir = File.join(File.dirname(__FILE__), "userimage") | |
output do |item| | |
next if item.nil? || item['user'].nil? || item['_stream'].nil? | |
begin | |
image_url = item['user']['profile_image_url'] | |
next unless image_url |
NewerOlder