Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
doing open source

esc esc

:octocat:
doing open source
View GitHub Profile
@esc
esc / ipynb
Created May 10, 2014
numpyson vs. bloscpack
View ipynb
{
"metadata": {
"name": "",
"signature": "sha256:0feedd0a35b31c9754c41d8a4b1cc4d08d77967657305f0b8f43b24c397cd132"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
View numpy-100.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View blaze_quickstart.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@esc
esc / test_lz4_failure.py
Created Oct 24, 2014
Testing LZ4 failure with blosc
View test_lz4_failure.py
import blosc
data = [
0x93, 0xb0, 0x49, 0xaf, 0x62, 0xad, 0xe3, 0xaa, 0xe4, 0xa5, 0x43, 0x20,
0x24, 0x29, 0xc9, 0xaf, 0xee, 0xad, 0x0b, 0xac, 0x3d, 0xa8, 0x1f, 0x99,
0x53, 0x27, 0xb6, 0x2b, 0x16, 0xb0, 0x5f, 0xae, 0x89, 0xac, 0x51, 0xa9,
0xfc, 0xa1, 0xc9, 0x24, 0x59, 0x2a, 0x2f, 0x2d, 0xb4, 0xae, 0xeb, 0xac,
0x2f, 0xaa, 0xec, 0xa4, 0x53, 0x21, 0x31, 0x29, 0x8f, 0x2c, 0x8e, 0x2e,
0x31, 0xad, 0xd6, 0xaa, 0x6d, 0xa6, 0xad, 0x1b, 0x3e, 0x28, 0x0a, 0x2c,
0xfd, 0x2d, 0xf8, 0x2f, 0x45, 0xab, 0x81, 0xa7, 0x1f, 0x95, 0x02, 0x27,
@esc
esc / gist:1f7097d6c33b037b6911
Created Apr 1, 2015
hashing with git and python
View gist:1f7097d6c33b037b6911
zsh» git init example
Initialized empty Git repository in /tmp/example/.git/
zsh» cd example
zsh» cp ../objektmodell-beispiel/hello.py .
zsh» cat hello.py
#! /usr/bin/env python
""" Hello World! """
print 'Hello World!'
View toy_mcmc.py
#!/usr/bin/env python
""" A toy mcmc sampler for a loaded dice.
Author: Valentin Haenel <esc@zetatech.org>
Adapted from Matlab code presented in the course:
'Probabilistic and Bayesian Modelling in Machine Learning and AI'
given by Prof. Manfred Opper at TU-Berlin in Summer 2009
"""
@esc
esc / git-ff-track
Created Oct 23, 2010
fast-forward local tracking branch
View git-ff-track
#!/bin/bash
# fast-forward local tracking branch if you get something like (on git checkout):
# Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
# Author: Valentin Haenel <valentin.haenel@gmx.de>
# Licence: wtfpl <http://sam.zoy.org/wtfpl/>
BRANCH=$( git branch | grep ^* | sed 's/^\* //' )
if [[ -z $BRANCH ]] ; then
# not a git repository
exit 1
@esc
esc / zmq_client.py
Created May 29, 2012
Example of Request Reply with zmq
View zmq_client.py
import zmq
context = zmq.Context()
socket = context.socket(zmq.REQ)
socket.connect("tcp://127.0.0.1:5000")
for i in range(10):
msg = "msg %s" % i
socket.send(msg)
print "Sending", msg
msg_in = socket.recv()
@esc
esc / bloscpack_new_header.rst
Created Jun 27, 2012
Bloscpack new header
View bloscpack_new_header.rst

RFC for the new Bloscpack Header

Author: Valentin Haenel
Contact: valentin.haenel@gmx.de

The following 32 bit header is proposed for bloscpack as of version 0.2.0. The design goals of the new header format are to contain as much information as possible to achieve interesting things in the future and to be as general as possible such that the new persistence layer of CArray is compatible with

View test.rst

Test

b, bart <bart>:bart simpson
-b, bart <bart>:bart simpson
b, -bart <bart>:bart simpson