Skip to content

Instantly share code, notes, and snippets.

View Keybase
### Keybase proof
I hereby claim:
* I am bbc2 on github.
* I am bertrandbc ( on keybase.
* I have a public key whose fingerprint is 9632 F322 CF0D 0BB6 9262 DA31 82ED DC1E 8CAB 3D73
To claim this, I am signing this object:
bbc2 /
Last active Aug 29, 2015
GitHub org-mode markup list code bug

The code block has an extra line at the end:

  • See:
    # some code
    print('hello world!')
bbc2 / begin.v
Created Dec 10, 2014
Proofs on addition and multiplication in Coq
View begin.v
Fixpoint add (x:nat) (y:nat) : nat :=
match x with
| 0 => y
| S z => S (add z y)
Lemma add_0 : forall x, add x 0 = x.
intros x.
induction x.
- reflexivity.
bbc2 /
Created Dec 10, 2014
Naive JSON parser
#!/usr/bin/env python
import re
import sys
HEX_DIGITS = '0123456789abcdefABCDEF'
NUMBER_RE = re.compile(r'-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?')
class ParseError(Exception):
bbc2 /
Created Nov 30, 2014
CoAP server bug
import asyncio
import aiocoap
def observe(protocol, addr):
host, port = addr
request = aiocoap.Message(code=aiocoap.GET)
request.set_request_uri('coap://{}:{}/time'.format(host, port))
request.opt.observe = 0
requester = protocol.request(request)
You can’t perform that action at this time.