Skip to content

Instantly share code, notes, and snippets.

View mik-laj's full-sized avatar
😸

Kamil Breguła mik-laj

😸
View GitHub Profile
from copy import deepcopy
from airflow.config_templates.airflow_local_settings import DEFAULT_LOGGING_CONFIG
from urllib.parse import urlparse
from pprint import pprint
from airflow.configuration import conf
LOGGING_CONFIG = deepcopy(DEFAULT_LOGGING_CONFIG)
REMOTE_BASE_LOG_FOLDER: str = conf.get('core', 'REMOTE_BASE_LOG_FOLDER')
steps:
- name: gcr.io/cloud-builders/git
args: ['clone', 'https://github.com/GoogleCloudPlatform/java-docs-samples.git', 'repo_dir']
- name: gcr.io/cloud-builders/git
args: ['checkout', '$_GIT_COMMIT']
dir: 'repo_dir'
- name: maven:3.6.3-jdk-8
args:
- sed
- -i
#!/usr/bin/env bash
yq r airflow/api_connexion/openapi/v1.yaml --tojson \
| jq \
'
.paths
| to_entries[]
| (
(.value|del(.parameters)|keys[]|ascii_upcase)
+
@mik-laj
mik-laj / gist:ff50e4991d4735c6caa8b69060cd89ea
Created May 16, 2020 11:35
Użycie: python pickle-test.py | bash -
import base64
import inspect
import pickle
import shlex
import textwrap
def get_dag_runs(dag_id_prefix):
print("dag_id_prefix=", dag_id_prefix)
import logging
#!/usr/bin/env python3.7
import argparse
import os
import shlex
import signal
import socket
import sys
from contextlib import closing
from subprocess import Popen, CalledProcessError
from tempfile import TemporaryDirectory
#!/usr/bin/env bash
secret=$(cat g_firebase.json | jq .private_key -r)
token_expiration=3600
# Static header fields.
header='{
"typ": "JWT",
"alg": "RS256",
"kid": "4f5fb174ca131353190d0662ec7c832b7e6184f5"
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#!/usr/bin/env bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
#!/usr/bin/env bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
@mik-laj
mik-laj / a.py
Created February 24, 2020 17:41
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