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 functools | |
import logging | |
import time | |
import sys | |
from airflow.configuration import conf | |
from airflow.operators.dummy_operator import DummyOperator | |
from airflow.utils.dates import days_ago |
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
I moved this script to repo: https://github.com/PolideaInternal/airflow-pianka-sh |
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 sys | |
import builtins | |
import time | |
real_import = builtins.__import__ | |
def debug_import(*args, **kwargs): |
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 sys | |
import builtins | |
import time | |
real_import = builtins.__import__ | |
def debug_import(*args, **kwargs): |
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 sys | |
import builtins | |
import time | |
real_import = builtins.__import__ | |
def debug_import(*args, **kwargs): |
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
GCP_CLUSTER_NAME=europe-west1-fluffy-bcad8335-gke | |
GCP_CLUSTER_ZONE=europe-west1-b | |
curl --cacert <(gcloud container clusters describe "${GCP_CLUSTER_NAME}" \ | |
--zone "${GCP_CLUSTER_ZONE}" \ | |
--format='value(masterAuth.clusterCaCertificate)' | base64 -d\ | |
) \ | |
--header "Authorization: Bearer $(gcloud auth print-access-token)" \ | |
https://$(gcloud container clusters describe "${GCP_CLUSTER_NAME}" \ | |
--zone "${GCP_CLUSTER_ZONE}" \ |
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
GCP_CLUSTER_NAME=europe-west1-fluffy-bcad8335-gke | |
GCP_CLUSTER_ZONE=europe-west1-b | |
curl --cacert <(\ | |
gcloud container clusters describe "${GCP_CLUSTER_NAME}" \ | |
--zone "${GCP_CLUSTER_ZONE}" \ | |
--format='value(masterAuth.clusterCaCertificate)' | base64 -d\ | |
) \ | |
--header "Authorization: Bearer $(gcloud auth print-access-token)" \ | |
https://$(\ |
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
#!/usr/bin/env bash | |
export GCP_CONFIG_DIR=/files/gcp | |
export GCP_PROJECT_ID=polidea-airflow | |
#gcloud container clusters get-credentials test-kamil-istio-2 --zone=us-central1-a | |
if [[ -f /files/gcp/keys/sa.json ]]; then | |
gcloud auth activate-service-account --key-file=/files/gcp/keys/sa.json > /dev/null | |
cp /files/gcp/keys/sa.json /files/gcp/keys/gcp_gke.json |
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
SELECT dag_id, | |
task_id, | |
execution_date, | |
state, | |
count(*), | |
min(duration) AS min_dur, | |
avg(duration) AS avg_dur, | |
max(duration) AS max_dur, | |
sum(duration) AS running_time, | |
max(end_date)-min(start_date) AS total_duration, |
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 re | |
from typing import Pattern | |
from bowler.helpers import print_tree | |
from fissix import pygram, pytree, fixer_util | |
from fissix.fixer_util import Name, String | |
from fissix.pgen2.driver import Driver | |
from bowler.types import LN, TOKEN | |
import requests |