Skip to content

Instantly share code, notes, and snippets.

View phobson's full-sized avatar

Paul Hobson phobson

View GitHub Profile
@gjoseph92
gjoseph92 / README.md
Last active June 6, 2023 13:25
Share speedscope profiles in GitHub issues

An easy way to share speedscope profiles in GitHub issues

Speedscope is an excellent profile viewer. Maybe you're recorded a profile with py-spy and you want to show it to other people in a GitHub issue. The speedscope app can render profiles from a URL, but where do you store the profile?

You can do this easily with gists, githack, and a little script:

Installation:

@max-mapper
max-mapper / bibtex.png
Last active March 10, 2024 21:53
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png
@lpinner
lpinner / rioarray.py
Last active May 18, 2018 09:19
rasterio and dask for multithreaded chunked raster operations
import numpy as np
import rasterio as rio
import dask
import dask.array as da
class RioDataset():
def __init__(self, filepath, band=1):
self.band = band
self.dataset = rio.open(filepath)
self.dtype = self.dataset.dtypes[band-1]
@max-mapper
max-mapper / camping.geojson
Last active August 29, 2015 14:23
Oregon + Washington BLM Campsites (Scraped on June 21, 2015)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rgbkrk
rgbkrk / pyscratch.bash
Last active December 22, 2015 18:09
Python scientific tools from scratch on a mac
# This was the order I installed things for a working scientific computing environment on my Mac.
brew install python
pip install virtualenv virtualenvwrapper
# Also add these to your ~/.bash_profile:
export PATH=/usr/local/bin:/usr/bin:$PATH
source /usr/local/bin/virtualenvwrapper.sh
# Not necessary, but quite nice
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2: