Skip to content

Instantly share code, notes, and snippets.

View mssrinivas's full-sized avatar
💭
Caffeine ∝ Code

M.S.Srinivas mssrinivas

💭
Caffeine ∝ Code
  • Seattle, USA
View GitHub Profile
import json
from collections import defaultdict
storageDict = {}
output = {}
globalMinimum = float('inf')
elements = []
k=0
class Solution(object):
[
{
"Type": "I/O",
"Service": "Azure Storage",
"Purpose": "Write",
"Provider": "Azure",
"Temporary Storage": "1024 GB",
"Configuration": "Per 10,000 operations",
"Pricing in USD (monthly)": 0.05,
"Grade": "",
@mssrinivas
mssrinivas / ExponentialBackOff.go
Created October 30, 2020 00:12
Example of a simple exponential backoff for retries
// InitBackoffPolicy is a backoff-policy intervals ranging up to 5 seconds.
func InitSimpleBackoffPolicy() []int {
backoffIntervals := []int{0, 100, 500, 3000, 5000}
return backoffIntervals
}
// Randomization of interval with a jitter function for uniform distribution
// between two successive retry attempts
func BackoffDuration(n int, intervals []int) time.Duration {
if n >= len(intervals) {
@mssrinivas
mssrinivas / diabetes.csv
Created July 31, 2019 05:47
Diabetes data set
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
preg plas pres skin insu mass pedi age class
6 148 72 35 0 33.6 0.627 50 tested_positive
1 85 66 29 0 26.6 0.351 31 tested_negative
8 183 64 0 0 23.3 0.672 32 tested_positive
1 89 66 23 94 28.1 0.167 21 tested_negative
0 137 40 35 168 43.1 2.288 33 tested_positive
5 116 74 0 0 25.6 0.201 30 tested_negative
3 78 50 32 88 31 0.248 26 tested_positive
10 115 0 0 0 35.3 0.134 29 tested_negative
2 197 70 45 543 30.5 0.158 53 tested_positive