Instantly share code, notes, and snippets.

# Thomas Ogdentommyogden

• Sort options
Last active Mar 4, 2019
aggregation.txt
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
Last active Feb 17, 2019
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
Created Feb 15, 2019
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
Last active Nov 22, 2018
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
Last active Jan 26, 2017
Sieve of Eratosthenes
View .block
 height: 944 border: no
Last active Apr 4, 2016
Otimes Icon
Last active Apr 3, 2016
Monte Carlo Integration 1

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) \ 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) 

Last active Aug 29, 2015
Least Squares Fit

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.

Last active Aug 29, 2015
Random Scatter