Skip to content

Instantly share code, notes, and snippets.

View AndrewAnnex's full-sized avatar
👨‍🚀
🌎🛰💻👨‍🚀📈

Dr. Andrew Annex AndrewAnnex

👨‍🚀
🌎🛰💻👨‍🚀📈
View GitHub Profile
@cmod
cmod / hugofastsearch.md
Last active June 2, 2024 10:05 — forked from eddiewebb/readme.md
Fast, instant client side search for Hugo static site generator

Super fast, keyboard-optimized, client side Hugo search

This is a fork of and builds upon the work of Eddie Webb's search and Matthew Daly's search explorations.

It's built for the Hugo static site generator, but could be adopted to function with any json index compatible with Fuse fuzzy search library.

To see it in action, go to craigmod.com and press CMD-/ and start typing.

Fast Search

@sgillies
sgillies / advanced_rasterio_features.ipynb
Last active June 18, 2024 16:03
Advanced Rasterio features notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vicapow
vicapow / geos-voronoi-in-js.c
Last active May 4, 2021 23:47
example of compiling geos to JS because why not
/*
To compile:
first, get a version of geos and put it in `geos` relative path. then...
cd geos
emconfigure ./configure
emmake make
cd ..
emcc \
-s EXPORTED_FUNCTIONS='["_get_voronoi"]' \
@perrygeo
perrygeo / loading spatialite data into GeoDataFrames.md
Last active October 1, 2023 16:57
Loading spatialite tables into geopandas

Loading spatialite tables into GeoPandas GeoDataFrames

This little trick derives from the fact that the from_postgis class method is not really specific to postgis at all; it will work with sqlalchmey or dbapi2 connections. However, there are some peculiarities with spatialite that prevent this from being as simple as one might hope. There are two options:

  • The pysqlite2 driver works great for vanilla sqlite3 databases but spatialite requires loading an extension. In order to load extensions, you need to install a patched version and do some manual loading of the shared library. (see the_pysqlite2_way.py)

  • A better alternative is to use pyspatialite but installation is also a bit funky. I had to install from the current git master instead of the pypi version. The extension is loaded automatically. (see the_pyspatialite_way.py)

@ezietsman
ezietsman / build_deeming.sh
Last active August 26, 2020 20:42
Python, Cython, Fortran f2py and OpenCL versions of a Deeming periodogram
#!/bin/bash
f2py -c -m deeming periodogram.f90 -lgomp
f2py -c -m deemingomp periodogram.f90 --f90flags="-fopenmp " -lgomp