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
#!/usr/bin/python | |
import boto, json | |
from boto.s3.connection import S3Connection | |
from boto.gs.connection import GSConnection | |
def compare_buckets(bucket_one_bucket_name, | |
bucket_two_bucket_name, | |
bucket_one_access_key_id, |
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
#!/usr/bin/env bash | |
#Author: Ashrith | |
#Arrays to store hosts and their regionsOnLine respectively | |
declare -a HOSTS_ARRAY | |
declare -a REGIONS_ARRAY | |
message="" | |
EXIT_STATUS=0 |
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
#!/bin/bash | |
set -o nounset | |
set -o errexit | |
set -o pipefail | |
EXTRA_TAGS=${1} | |
TSDB_CMD=$( /usr/bin/which tsdb ) | |
START_TIME="1y-ago" | |
END_TIME="45d-ago" |
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
#!/bin/bash | |
set -o nounset | |
set -o errexit | |
set -o pipefail | |
TSDB_CMD=$( /usr/bin/which tsdb ) | |
START_TIME="1y-ago" | |
END_TIME="21d-ago" | |
SLEEP=10 |
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
/* Expected exposure is the expected (average) credit exposure conditional on positive market values */ | |
def expectedExposure(marketValues: Seq[Double]): Double = { | |
val exposures = marketValues.filter(_ > 0f) | |
if (exposures.size == 0) 0.0 | |
else exposures.sum / exposures.size | |
} | |
/* A high percentile (95%) of the distribution of exposures at any particular future date. Also called Peak Exposure (PE) */ | |
def potentialFutureExposure(marketValues: Seq[Double], confidenceLevel: Double): Double = { | |
val exposures = marketValues.filter(_ > 0) |
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
#Install R and then following packages | |
#repr failed to create | |
yum install R-* | |
install.packages("evaluate", dependencies = TRUE) | |
install.packages("base64enc", dependencies = TRUE) | |
install.packages("devtools", dependencies = TRUE) | |
install_github('IRkernel/repr') | |
install.packages("dplyr", dependencies = TRUE) | |
install.packages("caret", dependencies = TRUE) | |
install.packages("repr", dependencies = TRUE) |
NewerOlder