Skip to content

Instantly share code, notes, and snippets.

{
"metadata": {
"name": "USGS tinkering"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@abkfenris
abkfenris / asa-sessions.inc.php
Created November 14, 2013 02:39
Polling and graphing a Cisco ASA firewall connection count within Observium. Not all graphing (minigraphs and small graphs on device page) works correctly.
<?php
// Lives at html/pages/device/graphs/asa-sessions.inc.php
if ($device['os'] == "asa" || $device['os_group'] == "firewall")
{
$graph_title = "Firewall Sessions";
$graph_type = "asa_sessions";
include("includes/print-device-graph.php");
@abkfenris
abkfenris / Main.ipynb
Created June 5, 2014 04:08
Gage-web main iPython notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@abkfenris
abkfenris / Dockerfile
Created July 25, 2014 23:45
ipython with matplotlib dockerfile
FROM ipython/notebook
MAINTAINER Alex Kerney <abk@mac.com>
RUN apt-get install -y -q python-numpy python-scipy python-matplotlib python-pandas python-sympy python-nose
@abkfenris
abkfenris / Untitled0.ipynb.json
Created July 26, 2014 17:18
Docker Matplotlib inline
{
"metadata": {
"name": "",
"signature": "sha256:e9c247a0199e65cc4be3ea32489846f2c936e1ad9ecd6348aa766df3b9705e02"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@abkfenris
abkfenris / 6.00.1x Alice Challenge.ipynb
Last active August 29, 2015 14:04
MIT 6.00.1x Alice Challenge on Facebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@abkfenris
abkfenris / 6.00.1x Alice Requests.ipynb
Created August 4, 2014 13:33
6.00.1x Alice Challenge with Requests module
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@abkfenris
abkfenris / Earthquake 2.ipynb
Last active August 29, 2015 14:05
Earthquake SearchResearch
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@abkfenris
abkfenris / Earthquake3.ipynb
Created August 7, 2014 13:59
Earthquake 3
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from models import Contact, Task
# not real, but to give you an idea
from email import SendMail
# email client with server info
client = SendMail('abc@def.com', 'password', 'mail.def.com')
# get all the contacts
for contact in Contact.select():