Skip to content

Instantly share code, notes, and snippets.

View njadhav1's full-sized avatar

Nitin Bhagwan Jadhav njadhav1

View GitHub Profile
{
"annotations": {
"list": [
{
"$$hashKey": "object:88",
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
{
"__inputs": [
{
"name": "DS_KAFKA_SOURCE",
"label": "kafka source",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
#!/usr/bin/python3
import pymysql
import argparse
import os
import sys
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.base import MIMEBase
#!/usr/bin/python
days=['yesterday', 'today','tomorrow','dayafter']
days_one=days[0]
days_two=days[1]
days_three=days[2]
days_four=days[3]
#!/usr/bin/python
# number claulcation via while loop
import sys
userstatus=raw_input("you want to check for largest number (Y/N) : ")
while True:
#!/usr/bin/python
numbers=raw_input("Enter three values by space seprate : ")
number_in_list=numbers.split()
print number_in_list
print(type(number_in_list[0]))
3
if (number_in_list[0] > number_in_list[1]) and (number_in_list[0] > number_in_list[2]):
print "large number is {}".format(number_in_list[0])
#!/usr/bin/python
# Find grater number in 3 number and if all three are same print all number equal
num1=input("Print number 1 : ")
num2=input("Print number 2 : ")
num3=input("Print number 3 : ")
###### Logic via IF variables
@njadhav1
njadhav1 / check_snapshot.sh
Created March 5, 2014 18:40
Check a snapshot details of AWS EBS volume
#!/bin/bash
########
# Purpose :- When you run create snapshot.sh it take some time to create snapshot
# the status of snapshot is pending once it start creating.
# So after executing create_snapshot.sh after some time you execute check_snapshot to check final status of snapshot
# Provide your Access and Secret Key also check your Region
# Bug Report to :- jadhav.nitin941@gmail.com
@njadhav1
njadhav1 / delete_snapshot.sh
Created March 5, 2014 18:38
Delete a snapshot of AWS EBS volume
#!/bin/bash
########
# Purpose :- To delete Automatic snapshot of AWS EBS volume
# Requirement :- Make Sure snapshot.config file is present in /data/backup/
# format for Collection.config is VOLMEID000
# For example
# vol-a994fff3
# vol-a994fTT4
@njadhav1
njadhav1 / create_snapshot.sh
Created March 5, 2014 18:36
Create a snapshot of AWS EBS volume
#!/bin/bash
########
# Purpose :- To Create Automatic snapshot of AWS EBS volume
# Requirement :- Make Sure snapshot.config file is present in /data/backup/
# format for snapshot.config is VOLMEID00000000
# For example
# vol-a994fff3