Skip to content

Instantly share code, notes, and snippets.

# Create some sample data
CV_1 <- 0.2
CV_2 <- 0.3
Mean <- 65
sigma_1 <- sqrt(log(1 + CV_1^2))
mu_1 <- log(Mean) - sigma_1^2 / 2
sigma_2 <- sqrt(log(1 + CV_2^2))
mu_2 <- log(Mean) - sigma_2^2 / 2
q <- c(0.25, 0.5, 0.75, 0.9, 0.95)
SummaryTable <- data.frame(
@whophil
whophil / ipython-notebook.conf
Last active August 18, 2018 05:15
Upstart file (Ubuntu) for Jupyter / IPython notebook
start on filesystem or runlevel [2345]
stop on shutdown
description "Jupyter / IPython Notebook Upstart script"
script
export HOME="/home/phil/Notebooks"; cd $HOME
echo $$ > /var/run/ipython_start.pid
exec su -s /bin/sh -c 'exec "$0" "$@"' phil -- /home/phil/Enthought/Canopy_64bit/User/bin/jupyter-notebook --config='/home/phil/.jupyter/jupyter_notebook_config.py'
end script
@richardotis
richardotis / autograd_utils.py
Created November 5, 2015 16:30
Integrating SymPy with autograd for efficient automatic differentiation of lambdify'd functions
"""
This module manages interactions with the autograd library.
"""
import autograd.numpy as anp
import numpy as np
from autograd import elementwise_grad, jacobian
from sympy import lambdify
# NumPyPrinter requires unreleased sympy 0.7.7 (in sympy master)
# if you aren't using Piecewise or logical operators
# you can change NumPyPrinter to LambdaPrinter in this module