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.models import BaseOperator | |
from airflow.utils.decorators import apply_defaults | |
from os import environ | |
class PrintText(BaseOperator): | |
@apply_defaults | |
def __init__( | |
self, | |
text_to_print, |
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 datetime import timedelta | |
from airflow.models import DAG | |
from airflow.operators.bash_operator import BashOperator | |
from airflow.utils.dates import days_ago | |
from airflow.operators.print_text_old import PrintText | |
text_to_print_dag = 'Hello World!' | |
args = { | |
'owner': 'Airflow', |
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 dateutil.relativedelta import relativedelta | |
from airflow.exceptions import AirflowException | |
from airflow import models | |
from airflow import DAG | |
from operators import Operator | |
from datetime import datetime, timedelta | |
import os | |
# dag run interval | |
schedule_interval_dag = timedelta(days=1) |
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.models import BaseOperator | |
from airflow.utils.decorators import apply_defaults | |
from os import environ | |
from google.cloud import bigquery | |
from datetime import datetime | |
from datetime import timedelta | |
from airflow import configuration | |
from airflow.utils.email import send_email | |
import time | |
import logging |
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
# To manipulate data, NLP and visualizations | |
import pandas as pd | |
import numpy as np | |
import seaborn as sns | |
import matplotlib.pyplot as plt | |
import os | |
from subprocess import check_output | |
# Standard plotly imports | |
import plotly as py | |
import plotly.tools as tls |
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 dash | |
import dash_core_components as dcc | |
import dash_html_components as html | |
import numpy as np | |
import plotly.graph_objs as go | |
import dash_bootstrap_components as dbc | |
external_stylesheets = [dbc.themes.BOOTSTRAP] | |
app = dash.Dash(__name__, external_stylesheets=external_stylesheets) |
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 dash | |
import dash_html_components as html | |
import dash_core_components as dcc | |
from dash.dependencies import Input, Output | |
import plotly.graph_objs as go | |
from numpy import random | |
app = dash.Dash() | |
# initiate dataframe |
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 dash | |
import dash_core_components as dcc | |
import dash_html_components as html | |
import plotly.graph_objs as go | |
import pandas as pd | |
from dash.dependencies import Input, Output | |
from numpy import random | |
app = dash.Dash() |
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.exceptions import AirflowException | |
from airflow import models | |
from airflow import DAG | |
from datetime import datetime, timedelta | |
from airflow.utils.email import send_email | |
from dateutil.relativedelta import relativedelta | |
import os | |
schedule_interval_dag = timedelta(days=1) |
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
function scan_files() { | |
var folder = DriveApp.getFolderById(folderID); | |
var processedfolder = DriveApp.getFolderById(processedfolderId); | |
var files = folder.getFiles(); | |
while (files.hasNext()) { | |
var file = files.next(); | |
if (file.getName().substring(0, 10) != 'processed_' || file.getName().substring(0, 7) != 'loaded_') { | |
loadCSVfromdrive(file); | |
} | |
} |