Skip to content

Instantly share code, notes, and snippets.

View RichardScottOZ's full-sized avatar

RichardScottOZ

  • Australia
View GitHub Profile
@RichardScottOZ
RichardScottOZ / vectorized_sklearn_xr.ipynb
Created April 27, 2024 19:05 — forked from aaronspring/vectorized_sklearn_xr.ipynb
vectorized `sklearn` with `xarray`
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@RichardScottOZ
RichardScottOZ / fozzie.py
Created March 3, 2024 05:21
Timer Noise Fozzie version
import time
from IPython.display import Audio, display
def allDone():
display(Audio(url='http://blogfiles.wfmu.org/SW/waka_waka.mp3', autoplay=True))
allDone()
def countdown(t):
@RichardScottOZ
RichardScottOZ / gguf-merge.sh
Created September 10, 2023 21:47 — forked from crasm/gguf-merge.sh
Shell script for merging TheBloke's .gguf-split model files
#!/bin/sh
log() {
format="$1"; shift
# shellcheck disable=SC2059
>&2 printf "$format\n" "$@"
}
usage() {
>&2 cat <<EOF
@RichardScottOZ
RichardScottOZ / mars_quads.geojson
Created November 23, 2022 20:20 — forked from AndrewAnnex/Rgb_encode_mars.ipynb
Terrain RGB encoding for planets
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@RichardScottOZ
RichardScottOZ / README.md
Last active March 16, 2022 08:42 — forked from kwinkunks/README.md
Rip data from a pseudocolour image, given the colourmap

Ripping data from pseudocolour images

Because viridis, like all good colourmaps, is perceptually linear, it's easy to get the data from it: just use a greyscale version of the image. But you can rip the data from any pseudocolour image if you know (or can guess) the colourmap.

In the rip-data.py example, here's the approach:

  1. Read the image and transform the values to the range 0-1.
  2. Guess the colourmap, in this case it's viridis. Matplotlib conveniently gives us the RGB triples that make up a colourmap.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@RichardScottOZ
RichardScottOZ / esri_mess.ipynb
Created June 27, 2021 04:59 — forked from alexgleith/esri_mess.ipynb
Find all the possible ESRI Land Cover scene and put them in a big list.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@RichardScottOZ
RichardScottOZ / stackstac_NASA_HLS.ipynb
Created April 19, 2021 05:24 — forked from rmg55/stackstac_NASA_HLS.ipynb
using stackstac with NASA HLS S30 catalog
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.