Skip to content

Instantly share code, notes, and snippets.

@gngdb
gngdb / gist:cdab95c14f6577edfbbb
Created February 24, 2015 15:17
PMR tutorial 2 questions 4 and 5
{
"metadata": {
"name": "",
"signature": "sha256:3053e761cda6c1e5fe6f3fa5089c2cb47730ba1f8b6f525924879ecc69582c31"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@gngdb
gngdb / gist:809da9c38610ecd2f3f3
Created March 27, 2015 12:30
PMR tutorial 7 notebook
This file has been truncated, but you can view the full file.
{"nbformat_minor": 0, "cells": [{"source": "Question 2\n====\n\n> Consider a noisy oscillator given by\n> \n $$\n \\mathbf{x} = \\alpha R \\mathbf{x} + \\mathbf{\\epsilon}\n $$\n>\n> where R is a unitary rotation matrix through a small angle and epsilon is a very small isotropic Gaussian noise term.\n> Initialise at the unit vector. What happens to this system over time if $\\alpha=1$? What if $alpha < 1$? Draw an\n> example picture\n\nSo I'm not going to draw it, it's going to draw itself.\n", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "import numpy as np\n%matplotlib inline", "outputs": [], "metadata": {"collapsed": true, "trusted": true}}, {"execution_count": 2, "cell_type": "code", "source": "# initialise unit column vector\nx = np.ones((2,1))", "outputs": [], "metadata": {"collapsed": false, "trusted": true}}, {"execution_count": 3, "cell_type": "code", "source": "#define our update equation\ndef update(x, alpha, R, var_epsilon):\n return alpha*np.
@gngdb
gngdb / deconv_differences.ipynb
Last active December 14, 2015 20:01
Trying out different ways to deconvolve
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gngdb
gngdb / gist:93724ec941b8954606fd
Created January 18, 2016 12:44
illustrating np.linalg.inv issue in autograd
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
@gngdb
gngdb / gist:45fce8f9993e992ab43cfb8be2d16e75
Created September 26, 2016 18:13
fresh Jupyter conda env export
name: fresh
channels: !!python/tuple
- defaults
dependencies:
- _nb_ext_conf=0.3.0=py27_0
- anaconda-client=1.5.1=py27_0
- backports=1.0=py27_0
- backports_abc=0.4=py27_0
- clyent=1.2.2=py27_0
- configparser=3.5.0=py27_0
@gngdb
gngdb / gist:88e85d0a3fc5f875c4c24c050dc90674
Created September 26, 2016 18:18
build error log for calysto
Collecting calysto-processing
Using cached calysto_processing-2.0.2.zip
Collecting metakernel (from calysto-processing)
Using cached metakernel-0.14.0-py2.py3-none-any.whl
Collecting html2text (from calysto-processing)
Requirement already up-to-date: IPython>=3.0 in ./conda/envs/fresh/lib/python2.7/site-packages (from metakernel->calysto-processing)
Building wheels for collected packages: calysto-processing
Running setup.py bdist_wheel for calysto-processing ... error
Complete output from command /opt/conda/envs/fresh/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-Zz1AnC/calysto-processing/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpa62Bwypip-wheel- --python-tag cp27:
running bdist_wheel
@gngdb
gngdb / gist:7b0008a49978dfa4c444f49082789874
Created October 17, 2016 10:18
template.tex with shortbold for slacktex
\documentclass[border={4pt 4pt 4pt 4pt},preview]{standalone}
\usepackage{mathrsfs,amsmath}
\usepackage{shortbold}
\begin{document}
$my_text
\end{document}
@gngdb
gngdb / concrete.ipynb
Last active May 15, 2020 18:25
Notes on concrete distributions
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gngdb
gngdb / shortbold.md
Last active August 3, 2017 16:58
Jupyter shortbold markdown cell, just paste into a markdown cell to enjoy shortbold MathJax for the rest of the notebook!

$ \newcommand{\aB}{\mathbf{a}} \newcommand{\bB}{\mathbf{b}} \newcommand{\cB}{\mathbf{c}} \newcommand{\dB}{\mathbf{d}} \newcommand{\eB}{\mathbf{e}} \newcommand{\fB}{\mathbf{f}} \newcommand{\gB}{\mathbf{g}} \newcommand{\hB}{\mathbf{h}} \newcommand{\iB}{\mathbf{i}}