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
######################################## | |
## CONFIG | Airflow Configs | |
######################################## | |
airflow: | |
## if we use legacy 1.10 airflow commands | |
## | |
legacyCommands: false | |
## configs for the airflow container image | |
## |
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
######################################## | |
## CONFIG | Airflow Configs | |
######################################## | |
airflow: | |
## if we use legacy 1.10 airflow commands | |
## | |
legacyCommands: false | |
## configs for the airflow container image | |
## |
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 os | |
import gzip | |
import json | |
import base64 | |
from urllib.request import Request, urlopen | |
from urllib.error import URLError, HTTPError | |
SLACK_CHANNEL = os.environ['SLACK_CHANNEL'] | |
SLACK_WEBHOOK = os.environ['SLACK_WEBHOOK'] |
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 json | |
from pytz import timezone | |
from dateutil import parser | |
import urllib.request | |
print('Loading function') | |
def lambda_handler(event, context): |
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
absl-py==0.11.0 | |
alembic==1.4.2 | |
ansiwrap==0.8.4 | |
apache-airflow==2.0.1 | |
apache-airflow-providers-ftp==1.0.1 | |
apache-airflow-providers-http==1.1.1 | |
apache-airflow-providers-imap==1.0.1 | |
apache-airflow-providers-sqlite==1.0.2 | |
apispec==3.3.2 | |
appdirs==1.4.4 |
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 requests | |
address = "東京都千代田区千代田" | |
api_key = "" | |
requestUrl = f'https://maps.googleapis.com/maps/api/geocode/json?address="{address}"&key={api_key}&sensor=false' | |
r = requests.get(requestUrl).json() | |
if(r['results'] == []): | |
print("non result") |
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
from googleapiclient import discovery | |
PROJECT_ID = "your-project" | |
build_id = "youru-build-id" | |
cloudbuild = discovery.build("cloudbuild", "v1", cache_discovery=False) | |
request = cloudbuild.projects().builds().get(id=build_id, projectId=PROJECT_ID) | |
res = request.execute() | |
print(res) |
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
from airflow import DAG | |
from airflow.models import Variable | |
from airflow.utils.dates import days_ago | |
from airflow.contrib.operators.pubsub_operator import ( | |
PubSubPublishOperator, | |
PubSubSubscriptionCreateOperator, | |
PubSubSubscriptionDeleteOperator, | |
PubSubTopicCreateOperator, | |
PubSubTopicDeleteOperator | |
) |
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
steps: | |
# Access the id_github file from Secret Manager | |
- name: gcr.io/cloud-builders/gcloud | |
entrypoint: 'bash' | |
args: [ '-c', 'gcloud secrets versions access latest --secret=github-access-token > /root/github-access-token' ] | |
volumes: | |
- name: 'vol' | |
path: /root/ |
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 datetime | |
import os | |
import pandas as pd | |
import pytz | |
ZENGIN_JSON_PATH = "https://raw.githubusercontent.com/zengin-code/source-data/master/data/banks.json" | |
zengin = pd.read_json(ZENGIN_JSON_PATH) | |
zengin = zengin.T[["code", "name", "hira", "kana", "roma"]] |
NewerOlder