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
""" | |
DAG to notify nearing GitHub access token expiry on Skype | |
""" | |
import logging | |
from datetime import datetime, timedelta | |
import requests | |
from airflow.decorators import dag, task | |
from airflow.models import Variable | |
skype_channel = Variable.get("SKYPE_CHANNEL") |
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
""" | |
A DAG to run GitHub lambdas on conditional dependency every night | |
""" | |
from airflow import DAG | |
from airflow.decorators import dag, task | |
from airflow.models import Variable | |
from datetime import datetime, timedelta | |
import boto3 | |
import json | |
import logging |
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
""" | |
Script to invoke GitHub Lambdas conditionally | |
""" | |
import boto3 | |
import os | |
import json | |
import logging | |
from datetime import datetime | |
from botocore.exceptions import BotoCoreError, ClientError | |
from botocore.config import Config |
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
neo4j>=5.3.0 | |
requests>=2.28.1 | |
python-dateutil>=2.8.2 |
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
""" | |
Script to fetch the most influential employee from the current week's Survey data | |
Use-case : Most help given and taken employee (Monday to Friday) | |
Script to be run at 4pm IST every Friday | |
""" | |
from datetime import datetime | |
import json | |
import os | |
import sys | |
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) |
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
""" | |
Script to contain the common functions, used across different microservices, in the Insights app | |
""" | |
import os | |
from datetime import datetime | |
from dateutil.relativedelta import relativedelta, MO, FR | |
import requests | |
from neo4j import GraphDatabase | |
def initialize_db_driver(): |
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
""" | |
Script to fetch the employee(s) who learnt the most and least last month, from Survey data. | |
""" | |
import json | |
import os | |
import sys | |
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | |
import common_functions | |
def get_tech_query(): |