Skip to content

Instantly share code, notes, and snippets.

@theredpea
Last active August 29, 2015 13:56
Show Gist options
  • Save theredpea/9331738 to your computer and use it in GitHub Desktop.
Save theredpea/9331738 to your computer and use it in GitHub Desktop.
import metric
(500 * metric.byte) / (4 * metric.Mbps)
#0 Need floats else it rounds
(500 * metric.byte) / (4.0 * metric.Mbps)
#0.001 Notice 4.0 (float) vs 4 (int)
size = 500 * metric.byte
rate = 4 * metric.Mbps
propDelay = 5 * metric.ms
def delay( size = 0.0 * metric.byte, rate = 0.0 * metric.Mbps, propDelay = 0.0 * metric.ms):
R = rate
M = size
D = propDelay
return float(M)/R + float(D)
@theredpea
Copy link
Author

Question 1
Review Exercises
Week 2
Computer Networks
by David Wetherall, Arvind Krishnamurthy, John Zahorjan
Coursera

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment