Skip to content

Instantly share code, notes, and snippets.

Dan MacKinnon dmackinnon1

View GitHub Profile
@dmackinnon1
dmackinnon1 / forest_of_fogetfulness.ipynb
Last active Sep 14, 2018
A Jupyter notebook for the "Lion and Unicorn" puzzle (puzzle 47) in "What is the Name of This Book?" By Raymond Smullyan
View forest_of_fogetfulness.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dmackinnon1
dmackinnon1 / url_fetch.py
Last active May 24, 2018
Python - read csv, get json, write file
View url_fetch.py
# A sample python file, kept for reference.
# -----------------------------------------
# reads a set of values from a csv,
# uses these in url construction, performs a get,
# extracts from json, writes to a new file.
import urllib.request
import json
import csv
csvfile = open('entitlements.csv', newline='')
targetfile = open('target.csv', 'wb');
View binomial_1.rmd
---
title: "Binomial and Negative Binomial Simulation"
author: "Dan MacKinnon"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
@dmackinnon1
dmackinnon1 / playlist.rmd
Created Mar 22, 2017
Simulation of 'how many tracks before a repetition in my playlist' problem
View playlist.rmd
---
title: "Playlist"
author: "Dan MacKinnon"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
##Introduction
@dmackinnon1
dmackinnon1 / twin_partners.rmd
Last active Mar 24, 2017
Simulation in R of the "twin lab partners" problem.
View twin_partners.rmd
---
title: "Twin Lab Partners"
author: "Dan MacKinnon"
date: "March 21, 2017"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
@dmackinnon1
dmackinnon1 / pancake.rmd
Last active Mar 24, 2017
Simulating and exploring the pancake probability problem in R
View pancake.rmd
---
title: "Pancake Problem"
author: "Dan MacKinnon"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
@dmackinnon1
dmackinnon1 / false_positives.rmd
Last active Mar 20, 2017
Exploring a 'false positive' conditional probability problem using a simulation in R.
View false_positives.rmd
---
title: "False Positives"
author: "Dan MacKinnon"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
@dmackinnon1
dmackinnon1 / birthday.rmd
Created Mar 15, 2017
Exploring the Birthday Problem in R
View birthday.rmd
---
title: "Birthday"
author: "Dan MacKinnon"
date: "March 15, 2017"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
##Introduction
@dmackinnon1
dmackinnon1 / r_monty.rmd
Last active Aug 15, 2017
Exploring the Monty Hall Problem in R
View r_monty.rmd
---
title: "R Monty"
author: "Dan MacKinnon"
date: "March 14, 2017"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
You can’t perform that action at this time.