Skip to content

Instantly share code, notes, and snippets.

View desmondyeoh's full-sized avatar
🎯
Focusing

Desmond Yeoh desmondyeoh

🎯
Focusing
View GitHub Profile
sudo apt update
sudo apt install build-essential git dkms
git clone https://github.com/brektrou/rtl8821CU.git
cd rtl8821CU
chmod +x dkms-install.sh
sudo ./dkms-install.sh
sudo modprobe 8821cu
@desmondyeoh
desmondyeoh / s2geometry.js
Created March 5, 2021 08:46
S2ID BigQuery
/// S2 Geometry functions
// the regional scoreboard is based on a level 6 S2 Cell
// - https://docs.google.com/presentation/d/1Hl4KapfAENAOf4gv-pSngKwvS_jwNVHRPZTTDzXXn6Q/view?pli=1#slide=id.i22
// at the time of writing there's no actual API for the intel map to retrieve scoreboard data,
// but it's still useful to plot the score cells on the intel map
// the S2 geometry is based on projecting the earth sphere onto a cube, with some scaling of face coordinates to
// keep things close to approximate equal area for adjacent cells
// to convert a lat,lng into a cell id:
from multiprocessing import Pool
import tqdm
def pmap(func, iterable, n_proc=8):
with Pool(n_proc) as p:
li = list(tqdm.tqdm_notebook(p.imap(func, iterable), total=len(iterable)))
return li