Skip to content

Instantly share code, notes, and snippets.

View KevinWhalen's full-sized avatar

Kevin Whalen KevinWhalen

View GitHub Profile
@cmod
cmod / hugofastsearch.md
Last active March 22, 2024 07:02 — 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

@seanjensengrey
seanjensengrey / rust-python-cffi.md
Last active April 2, 2022 04:08
Calling Rust from Python/PyPy using CFFI (C Foreign Function Interface)

This is a small demo of how to create a library in Rust and call it from Python (both CPython and PyPy) using the CFFI instead of ctypes.

Based on http://harkablog.com/calling-rust-from-c-and-python.html (dead) which used ctypes

CFFI is nice because:

  • Reads C declarations (parses headers)
  • Works in both CPython and PyPy (included with PyPy)
  • Lower call overhead than ctypes
@sgillies
sgillies / geo_interface.rst
Last active March 14, 2024 20:42
A Python Protocol for Geospatial Data

Author: Sean Gillies Version: 1.0

Abstract

This document describes a GeoJSON-like protocol for geo-spatial (GIS) vector data.

Introduction

@kevinmcmahon
kevinmcmahon / coloredlogcat.py
Created January 19, 2012 20:31
Colored Logcat
#!/usr/bin/python
'''
Copyright 2009, The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0