Skip to content

Instantly share code, notes, and snippets.

View bfroehle's full-sized avatar

Bradley M. Froehle bfroehle

View GitHub Profile
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@bfroehle
bfroehle / README.md
Last active January 12, 2021 08:02
Proof of concept of using the LLVM JIT compiler to load Python extension modules.

Python & LLVM Extension Modules

This is a quick proof of concept of using the LLVM JIT compiler as Python's extension module loader. This implelentation completely replaces the standard extension module framework, so regular extension modules cannot be loaded. It would not be too difficult to extend the patch to allow loading both LLVM bitcode (.bc) and regular extension (.so) modules.

@bfroehle
bfroehle / knee.py
Created February 29, 2012 22:05
knee.py for Python 2.6, 2.7, and 3.2
"""
An Python re-implementation of hierarchical module import.
Function names and arguments have been chosen to mimic the C code in
`Python/import.c` whenever possible.
This code is intended to be read, not executed. However, it does work
-- all you need to do to enable it is "import knee".
(The name is a pun on the klunkier predecessor of this module, "ni".)
@sunetos
sunetos / bitey_struct.py
Created November 4, 2012 00:12
Bitey Autogeneration of Struct Member Names with Ctags
#!/usr/bin/env python
"""Patch bitey to auto-generate struct member names with exuberant ctags."""
__author__ = 'adam@adamia.com (Adam R. Smith)'
from collections import OrderedDict
import logging as log
import os
import subprocess