Skip to content

Instantly share code, notes, and snippets.

Chris Tufts ctufts

Block or report user

Report or block ctufts

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
ctufts /
Last active Oct 24, 2018
Notes on docker

Docker notes:


Images - Stopped containers Containers - running containers


ctufts /
Created May 25, 2018
Helpful Python Snippets
# select n items from a dict
from itertools import islice
def take(n, iterable):
"Return first n items of the iterable as a list"
return list(islice(iterable, n))
n = 5
for k,v in take(n, dictionary.items()):
ctufts /
Last active May 15, 2018
Windows CLI
  • dir : list all files and directories (equivalent of ls)
  • dir /od /n : /od is sorted (o) by date (d)
  • cls : clear terminal
  • <escape key> : clears current line from terminal, similar to ctrl + u on linux
  • <home key> : go to beginning of current string in the terminal, peforms same function as ctrl + a on linux
  • <end key> : got to end of current string in the terminal, similar to ctrl + e on linux
  • <f7> : view all command history in terminal
ctufts / index.html
Last active Jul 9, 2017
coin flip example
View index.html
<!DOCTYPE html>
<html xmlns="">
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
ctufts /
Created Apr 12, 2017
List of different error metrics

List of metrics First Tier:

  • False Positive - Type I
  • False Negative - Type II
  • True Positive
  • True Negative

Second Tier: Primary issues with 2nd tier - not easy to remember and have various names for the same thing: is there a way to prevent this, i.e. create some type of

ctufts / text_transistion.js
Last active Apr 6, 2017
function for crossfade transition of text using d3 based on this block:
View text_transistion.js
function transition_text(element_id, display_text, t_duration){
// base off of
.on("start", function () {
var t =
.style("opacity", 0)
ctufts / .block
Last active Mar 24, 2017
Force Layout - Point-Along-Path - State Diagram Animation
View .block
license: gpl-3.0
ctufts / .block
Last active Mar 17, 2017
Interval probability of a normal distribution
View .block
license: mit
border: no
ctufts / .block
Last active Mar 9, 2017
Normal Distribution CDF value based on standard deviations
View .block
license: mit
border: no
You can’t perform that action at this time.