Skip to content

Instantly share code, notes, and snippets.

@davidbradway
davidbradway / durham-dockless.m
Created November 29, 2017 19:33
Cost Analysis of Bike Shares in Durham (MATLAB)
%% Cost Analysis of Bike Shares in Durham
rpm = 1:105; % rides per month
L1 = rpm;
L2 = 14 * ceil(rpm/100);
S1 = 5 * ceil(rpm/6);
S2 = 29 + 0*rpm;
figure(1), clf
subplot(2,1,1)
@davidbradway
davidbradway / markdown.md
Created January 25, 2015 23:52
Markdown Syntax Example from Mou

Mou

Mou icon

Overview

Mou, the missing Markdown editor for web developers.

Syntax

+-------------------------+
| [POWER] [LIGHT] | KEY_POWER SOURCE
| SOURCE |
| [ 1 ] [ 2 ] [ 3 ] | KEY_1 KEY_2 KEY_3
| |
| [ 4 ] [ 5 ] [ 6 ] | KEY_4 KEY_5 KEY_6
| |
| [ 7 ] [ 8 ] [ 9 ] | KEY_7 KEY_8 KEY_9
| |
| [ - ] [ 0 ] PRE-CH | KEY_TEXT KEY_0 KEY_PREVIOUS
@davidbradway
davidbradway / BN59-01041A.cfg
Created February 24, 2017 14:26
LIRC Config, brand: Samgung, model no. of remote control: BN59-01041A, devices being controlled by this remote: LN46D630
# Please make this file available to others
# by sending it to <winlirc.configs@gmail.com>
#
# this config file was automatically generated
# using lirc-0.9.0(MCE) on Fri Feb 24 09:12:40 2017
#
# contributed by David Bradway
#
# brand: Samgung
#
ssh-keygen -t rsa -C "dpb6@duke.edu"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
git config --global user.email "dpb6@duke.edu"
git config --global user.name "David Bradway"
@davidbradway
davidbradway / countries.json
Last active August 15, 2016 15:16
learning topojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@davidbradway
davidbradway / README.md
Created August 11, 2016 18:42 — forked from jasondavies/README.md
World Map

Based on Mike Bostock’s [World Map][0], modified to automatically colour countries such that no adjacent countries share the same colour.

This is done by extracting the topology via [TopoJSON][1] and greedily picking colours until the constraint is fulfilled.

See also: [Graph coloring][2] on Wikipedia.

Update: Greedily colouring is now performed in a single line, thanks to Mike Bostock!

@davidbradway
davidbradway / .block
Last active August 11, 2016 18:29 — forked from armollica/.block
HTML Annotation
height: 960
@davidbradway
davidbradway / LabLunch20150206.md
Last active August 29, 2015 14:14
Notes from Trahey Lab Lunch

Lab Lunch Notes

Announcements

  • Grants
    • Micro-E Not funded
    • Impact on Hiring - not recruiting new grad students
    • Write SSA grant
  • Facilities changes
    • BME Staff will move from Annex and Hudson to CIEMAS
  • New Faculty and students will be moved to Annex
@davidbradway
davidbradway / k_space lecture.md
Last active August 29, 2015 14:14
Lecture from K-Space Speckle Class

K-Space Lecture

2015/02/05

Ultrasound and laser light

  • Both are broadband coherent radiation sources
  • The more narrowband a laser, the more its image is like a speckle ultrasound image

Speckle Statistics

  • First-order Statistics
  • Mean speckle brightness and distribution