Skip to content

Instantly share code, notes, and snippets.

View jappy's full-sized avatar

Scott Jappinen jappy

View GitHub Profile
@xavi
xavi / gist:3729307
Created September 15, 2012 18:57
Fast, simple, powerful templating in Clojure
;; Call the renderer-fn macro with a template and it returns a function optimized to render it.
;; This happens at compile-time.
;; At run-time, you call this function with the parameters that will be interpolated into the template,
;; typically (but not limited to) a map.
;;
;; Useful in i18n for variable interpolation, for example. I'm using this to add internationalization
;; support to https://github.com/xavi/noir-auth-app
;; See usage at the end.
@Wollw
Wollw / wavelet.c
Created March 1, 2012 04:54
Wavelet Tree
/*
* An implementation of the Wavelet Tree data structure.
* It is similar to a binary search tree using bits.
*
* More info here:
* http://siganakis.com/challenge-design-a-data-structure-thats-small
* http://www.alexbowe.com/wavelet-trees
*/
#include <stdio.h>
#include <stdlib.h>
@ncornwell
ncornwell / ParyCudaSearch
Created April 27, 2011 01:16
Binary Search in CUDA
// kernel.cu : Defines the entry point for the console application.
//
#include "kernel.h"
#include <stdio.h>
#include <stdlib.h>
#include <cuda.h>
#include <cutil.h>
#include <cuda_runtime.h>