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 datetime import datetime, timedelta | |
import networkx as nx | |
from airflow import DAG | |
from airflow.operators import BashOperator, SubDagOperator | |
start_date = datetime(year=2017, month=6, day=13, hour=19, minute=0) | |
schedule_interval = '0 * * * 1-5' | |
default_args = { |
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
OUTPUT="Backup created at /data/bkp/dremio-bkp-2019_04_25/dremio_backup_2019-04-25_15.56, dremio tables 25, uploaded files 0" | |
REGEX=\/.*?(\,) # Returns: /data/bkp/dremio-bkp-2019_04_25/dremio_backup_2019-04-25_15.56, dremio tables 25, | |
REGEX2=\/.+?(\,) # Returns: /data/bkp/dremio-bkp-2019_04_25/dremio_backup_2019-04-25_15.56, dremio tables 25, | |
REGEX3=\/.*?(?=\,) # Returns nothing | |
if [[ $OUTPUT =~ $REGEX ]]; then echo ${BASH_REMATCH}; fi | |
if [[ $OUTPUT =~ $REGEX2 ]]; then echo ${BASH_REMATCH}; fi | |
if [[ $OUTPUT =~ $REGEX3 ]]; then echo ${BASH_REMATCH}; fi |
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
{ | |
"source": [ | |
"aws.ecr" | |
], | |
"detail-type": [ | |
"AWS API Call via CloudTrail" | |
], | |
"detail": { | |
"eventSource": [ | |
"ecr.amazonaws.com" |
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
{ | |
"repositoryName": "enterprise-project-service-api", | |
"imageTag": "1.3.0", | |
"registryId": "num_sua_conta", | |
"imageManifest": "{\n \"schemaVersion\": 2,\n ... ]\n}" | |
} |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"logs:CreateLogGroup", | |
"logs:CreateLogStream", | |
"logs:PutLogEvents" | |
], |
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 __future__ import print_function | |
import boto3 | |
PROJECT_PREFIX = 'enterprise-project-service-' | |
ACCOUNT_ID = None | |
ECR_SUFFIX = '.dkr.ecr.us-east-1.amazonaws.com/' | |
# the event is from pattern $.requestParameters | |
# take a look at sample-event.json |
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
Caused by: java.lang.IncompatibleClassChangeError: Implementing class | |
at java.lang.ClassLoader.defineClass1(Native Method) | |
at java.lang.ClassLoader.defineClass(ClassLoader.java:763) | |
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) | |
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) | |
at java.net.URLClassLoader.access$100(URLClassLoader.java:73) | |
at java.net.URLClassLoader$1.run(URLClassLoader.java:368) | |
at java.net.URLClassLoader$1.run(URLClassLoader.java:362) | |
at java.security.AccessController.doPrivileged(Native Method) | |
at java.net.URLClassLoader.findClass(URLClassLoader.java:361) |
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
{ | |
searchIntention.bestPrices:{ | |
maxmilhas:{ | |
latam: { | |
miles: 30000, | |
price_airline: 500, | |
price_maxmilhas: 200 | |
}, | |
gol: { | |
miles: 30000, |
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
"bestPrices": { | |
"properties": { | |
"airline": { | |
"properties": { | |
"avianca": { | |
"properties": { | |
"miles": { | |
"type": "long" | |
}, | |
"price_airline": { |
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
{ | |
"size": 0, | |
"query": { | |
"bool": { | |
"must": [ | |
{ | |
"match_phrase": { | |
"searchIntention.from": { | |
"query": "[PASSAR AQUI O AEROPORTO]" | |
} |
NewerOlder