Skip to content

Instantly share code, notes, and snippets.

View pelson's full-sized avatar

Phil Elson pelson

View GitHub Profile
@pelson
pelson / index.ipynb
Created April 17, 2019 11:00
(old) Iris based interpolators, including spline and triangulation
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pelson
pelson / README.md
Last active February 4, 2020 09:43
Demonstration of pypi_simple and parsing wheel (PEP427) filenames

Demonstrates how to use pypi_simple to parse and manipulate PyPI wheel package metadata.

It takes quite some effort to figure out if a wheel is compatible with your system (platform_tag) and your Python version (python_tag), not to mention other features such as abi-tag, yanked status etc.. All in all, this points at a need for a high-level interface for package resolving with pip. (e.g. pip-tools, poetry, pip/wheel itself)

Stdout as of 2020-02-04:

DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): pypi.org:443
@pelson
pelson / index.ipynb
Created July 3, 2020 12:41
Remap the colour of an image from JET to Viridis
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pelson
pelson / keybase.md
Created October 17, 2020 04:04
keybase.md

Keybase proof

I hereby claim:

  • I am pelson on github.
  • I am philelson (https://keybase.io/philelson) on keybase.
  • I have a public key ASC5YEUGODXl7DLY4FaYCBM0NGBZ82yPONB7e8QTLqNm1go

To claim this, I am signing this object:

import requests
import zlib
import struct
import json
import html5lib
import re
import pprint
_gzip_header = b"\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff"