Skip to content

Instantly share code, notes, and snippets.

View shobhit's full-sized avatar

Shobhit shobhit

View GitHub Profile
@shobhit
shobhit / index.html
Created February 15, 2021 04:50 — forked from biovisualize/index.html
Download SVG with preview
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<title>Download SVG</title>
<style type="text/css">
a{
cursor: pointer;
text-decoration: underline;
color: black;
@shobhit
shobhit / dijkstra.py
Created February 24, 2017 17:22 — forked from mdsrosa/dijkstra.py
Modified Python implementation of Dijkstra's Algorithm (https://gist.github.com/econchick/4666413)
from collections import defaultdict, deque
class Graph(object):
def __init__(self):
self.nodes = set()
self.edges = defaultdict(list)
self.distances = {}
def add_node(self, value):
@shobhit
shobhit / 0_reuse_code.js
Last active August 29, 2015 14:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@shobhit
shobhit / send_pdf_with_boto_ses.py
Created August 24, 2012 21:06 — forked from yosemitebandit/send_pdf_with_boto_ses.py
send PDF attachment with boto and SES
''' quick example showing how to attach a pdf to multipart messages
and then send them from SES via boto
'''
from email.mime.text import MIMEText
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
import boto