Skip to content

Instantly share code, notes, and snippets.

View nwillems's full-sized avatar

Nicolai Willems nwillems

View GitHub Profile
@nwillems
nwillems / 00-readme.md
Last active June 3, 2021 06:35
A small utility to read parquet files

Parquet Browser

this small utility allows you to view the schema of a file and browse the data. thats it. then theres a small exploratory script.

@nwillems
nwillems / pipeline.py
Created November 24, 2020 13:33
Python Async Pipelined functions
import functools
import inspect
def asynchronize(fn):
if inspect.iscoroutinefunction(fn):
return fn
@functools.wraps(fn)
async def _wrapper(*args, **kwargs):
return fn(*args, **kwargs)
@nwillems
nwillems / README.md
Last active September 7, 2020 13:19
encode/databases inflater thingamajig

Run using ipython:

$ poetry run ipython
Python 3.8.2 (default, Jul 16 2020, 14:00:26)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.18.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import index
@nwillems
nwillems / README.md
Last active July 25, 2019 14:15
Terraform wrapper script to run inside of a docker container

Run terraform in a container!

This file should just be in your path and your terraform codebase located in a folder called terraform. Then just run it like this:

terraformw init
terraformw plan -out plan.tfplan
terraformw apply plan.tfplan
@nwillems
nwillems / Dockerfile
Last active June 5, 2018 08:10
cali-example
FROM scratch
COPY cali-example /tool
ENTRYPOINT ["/tool"]
@nwillems
nwillems / util.js
Last active August 29, 2015 14:23
Javascript Clone array
// Fire away with comments - I'd like to know faster or more compact
// or what-ever-measure-you-like solutions
function clone(a){
return Array.apply(null, a);
}
// NOTE-to-Self: DONT EVER DO "arr.length--" it WILL mutate array!
@nwillems
nwillems / process.c
Last active August 29, 2015 14:21
[JACKAudio] Processing stuffs
int process(jack_nframes_t nframes, void *arg){
jack_default_audio_sample_t *out;
jack_default_audio_sample_t inp[nframes];
int i =0;
out = jack_port_get_buffer(output_port, nframes);
for(i =0; i < nframes; i++){
int t = state;
//char tmp = (t * (t >> 5 | t >> 8)) >> (t >> 16);
@nwillems
nwillems / README.md
Created January 11, 2015 02:05
Some other trials with D3

Hello and welcome - another trial with D3 and plotting course statistics.

@nwillems
nwillems / index.html
Last active August 29, 2015 14:12
Trials with Hive graphs in D3
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.link {
fill: none;
stroke-width: 1.5px;
}
.axis {
@nwillems
nwillems / index.html
Last active August 29, 2015 14:12 — forked from mbostock/.block
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.link {
fill: none;
stroke: #666;
stroke-width: 1.5px;
}