This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
# ## IPython Notebook for [Bommarito Consulting](http://bommaritollc.com/) Blog Post | |
# | |
# ### **Link**: [Fuzzy sentence matching in Python](http://bommaritollc.com/2014/06/fuzzy-match-sentences-in-python): http://bommaritollc.com/2014/06/fuzzy-match-sentences-in-python | |
# | |
# **Author**: [Michael J. Bommarito II](https://www.linkedin.com/in/bommarito/) | |
# In[159]: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
virtualenv venv | |
./venv/bin/pip install https://github.com/numpy/numpy/archive/master.zip | |
./venv/bin/pip install cython | |
./venv/bin/pip install https://github.com/scipy/scipy/archive/master.zip | |
./venv/bin/pip install https://github.com/scikit-learn/scikit-learn/archive/master.zip | |
./venv/bin/pip install ipython pyzmq tornado | |
./venv/bin/pip install https://github.com/pydata/pandas/archive/master.zip | |
./venv/bin/pip install pyparsing | |
./venv/bin/pip install https://github.com/matplotlib/matplotlib/archive/master.zip | |
./venv/bin/pip install jinja2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
@author Bommarito Consulting, LLC; http://bommaritollc.com/ | |
@date 20131029 | |
This script monitors and logs to CSV the status of all tunnels for all VPNs for a single EC2 region. | |
''' | |
# Imports | |
import boto | |
import boto.ec2 | |
import boto.vpc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download and uncompress the ORION binary | |
wget http://bommarito-consulting.s3.amazonaws.com/app/oracle/orion_linux_x86-64.gz | |
gunzip orion_linux_x86-64.gz | |
# Output the attached storage device list, excluding the root volume | |
ROOT_DEVICE=`grep "/ ext4" /etc/mtab | awk '{print $1}'` | |
ls /dev/xv* | grep -v $ROOT_DEVICE > orion.lun | |
# Now run the actual test. | |
sudo ./orion_linux_x86-64 -run oltp -write 20 -verbose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Settings; ideally, you might be using Wallets | |
# or '/ as sysdba' and not need to drop your password in here. | |
ADDM_PATH=/home/oracle/scripts/addm/ | |
ORACLE_USER=system | |
ORACLE_PASSWORD=tiger | |
ORACLE_TARGET=ORCL | |
S3_URI=s3://data.mycompany.com/oracle/addm/ORCL/ | |
# Source Oracle environment variables, which should be in bash_profile | |
source ~/.bash_profile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET pagesize 0; | |
SET heading off echo off feedback off verify off; | |
VARIABLE task_name VARCHAR2(40); | |
DECLARE | |
start_snap_id NUMBER := 0; | |
end_snap_id NUMBER := 0; | |
job_name VARCHAR2(255); | |
job_buff CLOB; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install and load required packages for rNotebook | |
install.packages(c('RCurl', 'devtools', 'shiny'), dependencies=TRUE, repos='http://cran.us.r-project.org') | |
require(devtools) | |
# Install rNotebook | |
install_github('rNotebook', 'ramnathv') | |
# Run rNotebook server | |
rNotebook::viewNotebook() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install R and some required apt packages | |
apt-get update --fix-missing | |
apt-get install r-base-core r-recommended r-cran-xml libcairo2-dev libcurl4-openssl-dev | |
# Now download and execute the script to install and run rNotebook | |
cd /tmp | |
wget https://gist.github.com/mjbommar/7186297/raw/rnotebook_install_run.R | |
sudo R --vanilla < rnotebook_install_run.R |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @date 20130818 | |
# @author Bommarito Consulting, LLC; [email protected] | |
# @page http://bommaritollc.com/?p=1067 | |
# Load libraries | |
library(ggplot2) | |
# Load data from git master | |
title_data <- read.csv('https://raw.github.com/mjbommar/us-code-complexity/master/results/table_data.csv', | |
header=T, |