Skip to content

Instantly share code, notes, and snippets.

@bfroehle
bfroehle / README.md
Last active Oct 6, 2020
Proof of concept of using the LLVM JIT compiler to load Python extension modules.
View README.md

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.

@sunetos
sunetos / bitey_struct.py
Created Nov 4, 2012
Bitey Autogeneration of Struct Member Names with Ctags
View bitey_struct.py
#!/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
@piscisaureus
piscisaureus / pr.md
Created Aug 13, 2012
Checkout github pull requests locally
View pr.md

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 / knee.py
Created Feb 29, 2012
knee.py for Python 2.6, 2.7, and 3.2
View knee.py
"""
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".)
You can’t perform that action at this time.