Skip to content

Instantly share code, notes, and snippets.

@arjunnambiartc
arjunnambiartc / devicelogin.py
Last active July 21, 2021 22:35
Login to multiple devices,run multiple commands using paramiko, store the results using xlswriter and send email using Python's smtplib library
#! /usr/bin/python
import os
import getpass
import paramiko
import xlsxwriter
import socket
import re
import sys
import smtplib
@arjunnambiartc
arjunnambiartc / models.py
Last active August 29, 2015 14:01
models.py for jericho
from django.db import models
from django.contrib.auth.models import User
class Sheet1(models.Model):
Name = models.CharField(max_length=100)
Year = models.SmallIntegerField(max_length=5)
Start_Date = models.DateField(help_text='in EST')
End_Date = models.DateField(help_text='in EST')
@arjunnambiartc
arjunnambiartc / adminx.py
Last active October 20, 2015 05:37
adminx.py for jericho
import xadmin
from xadmin import views
from models import Sheet1, Change, MyChange
from xadmin.layout import *
class BaseSetting(object):
enable_themes = False
use_bootswatch = False
show_bookmarks = False
import requests
import inspect
from selenium import webdriver
from bs4 import BeautifulSoup
from PIL import Image
import hashlib
import uuid
import cgi
import arrow
import httplib2