I hereby claim:
- I am jdpage on github.
- I am jdpage (https://keybase.io/jdpage) on keybase.
- I have a public key whose fingerprint is 2EAF E6DF 2116 2473 BF75 009B D024 E567 FFB1 9848
To claim this, I am signing this object:
| # A nestable function-completion notification decorator | |
| # File: notify_deco.py | |
| # Author: Jonathan David Page <jonathan@sleepingcyb.org> | |
| # | |
| # This is free and unencumbered software released into the public domain. | |
| # | |
| # Anyone is free to copy, modify, publish, use, compile, sell, or | |
| # distribute this software, either in source code form or as a compiled | |
| # binary, for any purpose, commercial or non-commercial, and by any | |
| # means. |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #define BUFSIZE 1024 | |
| int main() | |
| { | |
| /* Pipe text into me! */ | |
| char data[BUFSIZE + 4]; |
| #ifndef HEX_HEX_H | |
| #define HEX_HEX_H | |
| #include <stdlib.h> | |
| enum hex_err_e { | |
| HEX_OK, | |
| HEX_ENOMEM, | |
| HEX_EBOUNDS, | |
| HEX_EBADSPACE, |
I hereby claim:
To claim this, I am signing this object:
| // octave count? | |
| 2 => int octaves; | |
| // device to open | |
| 0 => int device; | |
| // get from command line | |
| if( me.args() ) me.arg(0) => Std.atoi => device; | |
| MidiIn min; | |
| MidiMsg msg; |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #define NEXT(n) ((n)->next(n)) | |
| typedef struct co_fib { | |
| int (*next)(struct co_fib *); | |
| int a; | |
| int b; | |
| } * co_fib_t; |
| from __future__ import division | |
| from fractions import gcd | |
| from itertools import izip, tee, izip_longest | |
| import sys | |
| def pi_noncanon_seq(): | |
| """ | |
| produces a generalized continued fraction from of pi, starting with | |
| (0 4) (1 1) (3 4) (5 9) ... | |
| """ |
| class Add extends Func2<Integer, Integer, Integer> { | |
| @Override | |
| public Integer apply(Integer a, Integer b) { | |
| return a + b; | |
| } | |
| } |
| #!/usr/bin/python3 | |
| import random | |
| def sorted(l): | |
| if len(l) == 0: | |
| return l | |
| else: | |
| x, *xs = l | |
| left, right = [], [] |
| open System | |
| let rec sorted = function | |
| | (x :: xs) -> | |
| let left, right = List.partition (fun i -> i < x) xs | |
| let sleft = sorted left | |
| let sright = sorted right | |
| sleft @ (x :: sright) | |
| | [] -> [] |