Skip to content

Instantly share code, notes, and snippets.

View betatim's full-sized avatar
🤠
Not my first rodeo

Tim Head betatim

🤠
Not my first rodeo
View GitHub Profile
@betatim
betatim / knn.py
Created July 20, 2023 11:20 — forked from fcharras/knn.py
import time
import math
import numpy as np
import torch
from cuml.neighbors import NearestNeighbors
def cuml_kneighbors(query, data, n_neighbors):
knn = NearestNeighbors(
@betatim
betatim / README.md
Last active April 6, 2017 08:41 — forked from ctb/README.md
benchmarking RAM allocation against file load time
@betatim
betatim / index.html
Last active July 15, 2016 21:17 — forked from zross/index.html
D3, Leaflet animation
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css" />
<script src="http://d3js.org/d3.v3.min.js" type="text/javascript"></script>
<script src="http://cdn.leafletjs.com/leaflet-0.7/leaflet.js"></script>
<script src='https://api.tiles.mapbox.com/mapbox.js/v1.6.4/mapbox.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox.js/v1.6.4/mapbox.css' rel='stylesheet' />
@betatim
betatim / md-nb-diffs.md
Last active October 8, 2017 14:08 — forked from matsen/md-nb-diffs.md
Markdown diffs for jupyter notebooks. Makes `diff`ing notebooks less tedious.

For sane jupyter notebook diffs

Install the nbconvert package, though you probably already have it if you are using jupyter. Put the nb2md script from below in your path and make it executable (chmod u+x).

nb2md for all your projects

  1. Add the following to your ~/.gitattributes file *.ipynb diff=nb2md
  2. Run git config --global diff.nb2md.textconv nb2md
  3. There is no third step. Go get some 🍦 instead.