Skip to content

Instantly share code, notes, and snippets.

View bfroehle's full-sized avatar

Bradley M. Froehle bfroehle

View GitHub Profile
@bfroehle
bfroehle / kenken.py
Created May 28, 2013 00:22
SAT-based KenKen solver.
"""
A SAT-based KenKen (http://www.kenken.com/) solver.
The implementation of this solver is based on the ideas contained in
the paper:
"A SAT-based Sudoku solver" by Tjark Weber
https://www.lri.fr/~conchon/mpri/weber.pdf
@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 / xstartup.custom
Created July 16, 2013 21:54
RealVNC xstartup script for Ubuntu 13.04. To use, save this file to `/etc/vnc/xstartup.custom` and make it executable. Then ensure that you have installed the `gnome-session-fallback` package.
#!/bin/sh
# VNC Server (Virtual-Mode) start-up script.
unset XDG_RUNTIME_DIR
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
if [ -f /usr/bin/gnome-session ]; then
@bfroehle
bfroehle / file_wrapper.cpp
Created October 5, 2011 22:09
Boost.Python from Python to FILE* wrapper
#include <boost/python.hpp>
#include <iostream>
namespace {
void *convert_to_FILEptr(PyObject* obj) {
return PyFile_Check(obj) ? PyFile_AsFile(obj) : 0;
}
}
void test_argument(FILE* f) {
@bfroehle
bfroehle / .gitignore
Created August 25, 2012 01:12
Bitey Magic, an IPython extension
*.py[oc]