Skip to content

Instantly share code, notes, and snippets.

View jph00's full-sized avatar
🦘

Jeremy Howard jph00

🦘
View GitHub Profile

Confused about mask wearing? Sure, it's complicated. But not as complicated as some people imply. We've been looking at the science (see our papers Face Masks Against COVID-19: An Evidence Review — with 84 references! — and Face masks for the public during the covid-19 crisis). Here's a summary of the different streams of evidence, and our take on what it all means.

Translations

We'd love your help translating this article! Please at-mention @jeremyphoward on Twitter with your translation, and I'll retweet it and add it here.

The epidemiology of disease spread

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jph00
jph00 / python-stdlib.md
Created October 15, 2020 02:57
Every documented symbol in the Python standard library
<body>
<h1>Claire's Number Line</h1>
<table>
<thead>
<tr>
<th style="text-align:left"> &nbsp; &nbsp; ones<br/>tens</th>
<th style="background-color:hsla(284, 84%, 59%, 1)">0</th>
<th style="background-color:hsla(347, 87%, 78%, 1)">1</th>
<th style="background-color:hsla(46, 100%, 79%, 1)">2</th>
<th style="background-color:hsla(166, 70%, 84%, 1)">3</th>
@jph00
jph00 / number_line.ipynb
Created October 18, 2020 01:10
Claire's Number Line
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jph00
jph00 / type_workaround.py
Created October 21, 2020 17:56
A start on how to work around the annoying python behavior that isinstance doesn't work with generics in Python
from fastcore.all import *
from typing import _SpecialForm,_GenericAlias,Optional,Union
@patch
def __instancecheck__(self:_SpecialForm, typs): return isinstance(self, typs)
@patch(cls_method=True)
def __subclasscheck__(self:_SpecialForm, cls): return type.__subclasscheck__(self, cls)
@patch
def __subclasscheck__(self:_GenericAlias, cls):
return issubclass(cls.__origin__ if isinstance(cls, _GenericAlias) else cls, self.__origin__)
@jph00
jph00 / webserver.py
Created November 17, 2020 19:18
Minimal web server demo in Python (requires fastcore: `pip install fastcore`)
from fastcore.utils import *
host = 8888,'localhost'
sock = start_server(*host)
print(f'Serving on {host}...')
while True:
conn,addr = sock.accept()
with conn:
data = conn.recv(1024)
print(data.decode())
sudo add-apt-repository -y ppa:apt-fast/stable
sudo add-apt-repository -y ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get -y install apt-fast
# prompts
sudo apt-fast -y upgrade
sudo apt-fast install -y python3-pip ubuntu-drivers-common libvorbis-dev libflac-dev libsndfile-dev cmake build-essential libgflags-dev libgoogle-glog-dev libgtest-dev google-mock zlib1g-dev libeigen3-dev libboost-all-dev libasound2-dev libogg-dev libtool libfftw3-dev libbz2-dev liblzma-dev libgoogle-glog0v5 gcc-6 gfortran-6 g++-6 doxygen graphviz libsox-fmt-all parallel exuberant-ctags vim-nox python-powerline python3-pip ack lsyncd
sudo apt-fast install -y tigervnc-standalone-server firefox mesa-common-dev
@jph00
jph00 / uk-young-covid.ipynb
Created August 29, 2021 23:05
Covid cases in young people (<20) in England over time
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.