Hey there!
We have detected a security vulnerability in your repository. Please contact us at https://github-scanner.com to get more information on how to fix this issue.
Best regards,
Github Security Team
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 logging | |
from airflow import DAG | |
from datetime import datetime, timedelta | |
from airflow.providers.postgres.hooks.postgres import PostgresHook | |
from airflow.operators.python import PythonOperator | |
# Change these to your identifiers, if needed. | |
POSTGRES_CONN_ID = "postgres_default" |
This (and related gists) captures how i created my docker swarm architecture. This is intended mostly for my own notes incase i need to re-creeate anything later! As such expect some typos and possibly even an error...
Each major task has its own gist, this is to help with maitainability long term.
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
.\" cat THISFILE | tsql | tbl | groff -Tpdf > THISFILE.pdf | |
Store info | |
.sqldb :memory: | |
.sqlbeg | |
create table Fam ( | |
name text, | |
id integer | |
primary key |
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
version: "3.8" | |
# This should give a high level idea of the approach. | |
# The complete solution is too complex and involves multiple internal microservices. | |
# I have tried to capture core things to consider while some else needs to achieve Docker swarm based auto scalout of workers. | |
services: | |
webserver: | |
image: customized/airflow:prod | |
environment: |
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
from airflow import DAG | |
from airflow.operators.python_operator import PythonOperator | |
from airflow.hooks.base_hook import BaseHook | |
from airflow.utils.dates import days_ago | |
default_args = { | |
'start_date': days_ago(2) | |
} | |
dag = DAG('test-connection-hook', default_args = default_args, description='Test connection details', schedule_interval='@once') |
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
# Protect the master branch. Enforce that ci/tests and shiftleft should pass to allow merges | |
# Allow PR to be dismissed by sem-user and managers team | |
resource "github_branch_protection" "protect_master" { | |
repository = "${github_repository_name}" | |
branch = "master" | |
enforce_admins = true | |
require_signed_commits = false | |
required_status_checks { | |
strict = false |
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
from eve import Eve | |
from .sensor_manager import TempSensorManager | |
# API configuration | |
SETTINGS = { | |
'DOMAIN': { | |
'sensors': { | |
'schema': { | |
'_id': {'type': 'string', 'unique': 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
from functools import lru_cache | |
from datetime import datetime | |
@lru_cache(maxsize=None) | |
def fib_cache(n): | |
if n < 2: | |
return n | |
return fib_cache(n-1) + fib_cache(n-2) | |
def fib_no_cache(n): |
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
Apus Agate Adjacent | |
Aquila Almandine Adjunct | |
Aries Amber Almuten | |
Bootes Amethyst Angular | |
Caelum Apatite Apside | |
Cancer Aquamarine Arcing | |
Canis Azurite Ascendant | |
Cepheus Beryl Aspecting | |
Cetus Carnelian Beheld | |
Corona Chalcedony Benefic |
NewerOlder