# Some tips to pull and push a database with Heroku
Some tips to improve test flow dealing with database on local and production environments.
It is really usefull if you want to fill your local database with real data from production environment.
| from botocore.credentials import RefreshableCredentials | |
| from botocore.session import get_session | |
| from boto3 import Session | |
| def assumed_session(role_arn, session_name, session=None): | |
| """STS Role assume a boto3.Session | |
| With automatic credential renewal. |
| a4b.amazonaws.com | |
| access-analyzer.amazonaws.com | |
| account.amazonaws.com | |
| acm-pca.amazonaws.com | |
| acm.amazonaws.com | |
| airflow-env.amazonaws.com | |
| airflow.amazonaws.com | |
| alexa-appkit.amazon.com | |
| alexa-connectedhome.amazon.com | |
| amazonmq.amazonaws.com |
| {"Touch Bar Items":[],"Key Mappings":{"0xf704-0x20000":{"Text":"[1;2P","Action":10},"0xf700-0x260000":{"Text":"[1;6A","Action":10},"0x37-0x40000":{"Text":"0x1f","Action":11},"0x32-0x40000":{"Text":"0x00","Action":11},"0xf709-0x20000":{"Text":"[17;2~","Action":10},"0xf70c-0x20000":{"Text":"[20;2~","Action":10},"0xf729-0x20000":{"Text":"[1;2H","Action":10},"0xf72b-0x40000":{"Text":"[1;5F","Action":10},"0xf705-0x20000":{"Text":"[1;2Q","Action":10},"0xf703-0x260000":{"Text":"[1;6C","Action":10},"0xf700-0x220000":{"Text":"[1;2A","Action":10},"0xf701-0x280000":{"Text":"0x1b 0x1b 0x5b 0x42","Action":11},"0x38-0x40000":{"Text":"0x7f","Action":11},"0x33-0x40000":{"Text":"0x1b","Action":11},"0xf703-0x220000":{"Text":"[1;2C","Action":10},"0x2c-0x40000":{"Action":11,"Text":"18 40 63 2c\n18 40 63 2c\n18 40 63 2c"},"0x3c-0x60000":{"Action":11,"Text":"18 40 63 3c"},"0xf701-0x240000":{"Text":"[1;5B","Action":10},"0xf70d-0x20000":{"Text":"[21;2~","Action":10},"0xf702-0x260000":{"Text":"[1;6D","Action":10},"0x3b-0x40000":{"Act |
| import asyncio | |
| import aiohttp | |
| import async_timeout | |
| from aiohttp import ClientError | |
| async def _fetch(session, url, coro): | |
| """HTTPリソースからデータを取得しコルーチンを呼び出す |
| #!/usr/bin/env ruby | |
| # encoding: utf-8 | |
| require "open-uri" | |
| require "nokogiri" | |
| require "uri" | |
| require 'fileutils' | |
| require 'parallel' | |
| ################################################################## | |
| ## 1. てきとーなディレクトリAを作る |