Skip to content

Instantly share code, notes, and snippets.

Thomas Ogden tommyogden

Block or report user

Report or block tommyogden

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View aggregation.txt
x y c
15.55 28.65 2
14.9 27.55 2
14.45 28.35 2
14.15 28.8 2
13.75 28.05 2
13.35 28.45 2
13 29.15 2
13.45 27.5 2
13.6 26.5 2
View jain.txt
x y c
0.85 17.45 2
0.75 15.6 2
3.3 15.45 2
5.25 14.2 2
4.9 15.65 2
5.35 15.85 2
5.1 17.9 2
4.6 18.25 2
4.05 18.75 2
View jain.txt
0.85 17.45 2
0.75 15.6 2
3.3 15.45 2
5.25 14.2 2
4.9 15.65 2
5.35 15.85 2
5.1 17.9 2
4.6 18.25 2
4.05 18.75 2
3.4 19.7 2
@tommyogden
tommyogden / run_notebooks.py
Last active Aug 9, 2019
Run a Set of Jupyter Notebooks from the Command Line
View run_notebooks.py
# ! python
# coding: utf-8
import os
import argparse
import glob
import nbformat
from nbconvert.preprocessors import ExecutePreprocessor
from nbconvert.preprocessors.execute import CellExecutionError
@tommyogden
tommyogden / .block
Last active Jan 26, 2017
Sieve of Eratosthenes
View .block
height: 944
border: no
View README.md
@tommyogden
tommyogden / README.md
Last active Apr 3, 2016
Monte Carlo Integration 1
View README.md

Monte Carlo integration of the function $f(x) = x^2$ on the interval $\left[ 0, 1 \right]$ on $\mathbb{R}$. The correct result is $1/3$. How close is the numerically computed result?

We sample $N = 1000$ points on the plane $(x,y) \in ([0,1], [0,1])$ and define an acceptance function

$$ A(x,y) = \begin{cases} 1 & \text{if} ~ y \leq f(x) \

@tommyogden
tommyogden / README.md
Last active Apr 4, 2016
Hermite Polynomials
View README.md

Plots the first ten Hermite polynomials (physicists' definition), defined using the recursion relation.

$$ H_{n+1}(x) = 2x H_n(x) - 2 (n-1) H_{n-2}(x) $$

@tommyogden
tommyogden / README.md
Last active Aug 29, 2015
Least Squares Fit
View README.md

Fits a straight line to data using the Least Squares method.

"Least squares" means that the overall solution minimizes the sum of the squares of the errors made in the results of every single equation.

Least squares function by Ben van Dyke.

@tommyogden
tommyogden / README.md
Last active Aug 29, 2015
Random Scatter
View README.md

A set of 100 points are given a new uniform random distribution every 5 seconds.

You can’t perform that action at this time.