Skip to content

Instantly share code, notes, and snippets.

View nottombrown's full-sized avatar

Tom B Brown nottombrown

View GitHub Profile
@nottombrown
nottombrown / earthquakes_in_sf.md
Last active December 31, 2020 01:02
Earthquake Danger in SF

SF Earthquake Danger

How dangerous are earthquakes to SF residents? My best guess is that we get an extra 15 micromorts per year. That’s a 3% increase over the non-natural causes mortality base rate in the US.

Math

Each year has about a 1/500 chance of a massive 7.9 magnitude earthquake that kills ~6000 people. SF has 800k people. (1/500) * (6000/800000) * 1000000 = 15 micromorts/year

Yearly all non-natural causes mortality in the US is 580 micromorts / year

15 / 580 = 2.6% increase in mortality rate

[tensor for tensor in tensors if preds_node.op in tensor.consumers()]
@nottombrown
nottombrown / render_images.html
Created September 20, 2018 01:27
Messy prototype of confident error viewer
%%html_define_svelte ImageGrid
<div class="figure">
{{#each data as d, data_idx}}
<div class="selected-child" style="background-color: {{d['color']}}" on:click='select(data_idx)'>
<div class="label">
<div class='pred'> pred: {{d['pred_digit']}}</div>
<div class='label'> human: {{d['label']}}</div>
conf: {{d['conf']}}%
{{FrontSide}}
<hr id=answer>
{{Back}}
<script>
var content = document.querySelector('.card').innerHTML;
document.querySelector('.card').innerHTML = content.replace(/`(.*?)`/g, "<code>$1</code>");
</script>
<script type="text/x-mathjax-config">
@nottombrown
nottombrown / test
Created September 18, 2020 19:44
test
tset