Skip to content

Instantly share code, notes, and snippets.

View daniel-wells's full-sized avatar

Daniel Wells daniel-wells

View GitHub Profile
@jfaganUK
jfaganUK / animate_least_squares.R
Created October 17, 2019 13:44
Animating the optimization of least squared linear model
## Animate optim ordinary least squares
rm(list=ls())
gc()
library(ggplot2)
library(tidyverse)
library(foreign)
library(gganimate)
library(transformr)
library(data.table)
@thomasp85
thomasp85 / script.R
Last active October 13, 2021 01:33
Temporal Network Viz
library(ggraph)
library(tidygraph)
library(gganimate)
# Data from http://konect.uni-koblenz.de/networks/sociopatterns-infectious
infect <- read.table('out.sociopatterns-infectious', skip = 2, sep = ' ', stringsAsFactors = FALSE)
infect$V3 <- NULL
names(infect) <- c('from', 'to', 'time')
infect$time <- as.POSIXct(infect$time, origin = Sys.time() - as.numeric(Sys.time()))
@graceavery
graceavery / harryPotterAliases
Last active May 10, 2023 02:51
bash aliases for Harry Potter enthusiasts
alias accio=wget
alias avadaKedavra='rm -f'
alias imperio=sudo
alias priorIncantato='echo `history |tail -n2 |head -n1` | sed "s/[0-9]* //"'
alias stupefy='sleep 5'
alias wingardiumLeviosa=mv
alias sonorus='set -v'
alias quietus='set +v'
@jxson
jxson / README.md
Created February 10, 2012 00:18
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation