This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Makefile b/Makefile | |
index 14c89d8..ab6cd16 100644 | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -25,4 +25,4 @@ scan-test: scan-test.o scan-sparql.o | |
$(CC) $(LDFLAGS) -o $@ $^ | |
sparql-query: sparql-query.o result-parse.o scan-sparql.o | |
- $(CC) $(LDFLAGS) -o $@ $^ | |
+ $(CC) -o $@ $^ $(LDFLAGS) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AttributeError at /dashboard/booking/new/ | |
type object 'Region' has no attribute 'base_objects' | |
Request Method: GET | |
Request URL: http://localhost:8000/dashboard/booking/new/ | |
Django Version: 1.4 | |
Exception Type: AttributeError | |
Exception Value: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def update_virtualbox_hd_uuids(vbox_conf): | |
''' | |
After using clonevm (ie VBoxManage clonevm "my-virtual-machine" --name "new_vm") | |
pass in name of VirtualBox configuration xml ''' | |
from xml.dom.minidom import parse, parseString | |
vbox = parse(vbox_conf).documentElement | |
for hardDisk in vbox.getElementsByTagName('HardDisk'): | |
location = hardDisk.getAttribute('location') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Terrible hack to get around pip bailing on flaky internet connection. | |
# | |
# Usage: | |
# python cackinstaller.py requirements.txt | |
# | |
import os | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Draw cairo in a pyglet window - without an intermediate image file. | |
import ctypes | |
#import cairocffi as cairo # example will work with cairocffi instead too | |
import cairo | |
import time | |
from pyglet import app, clock, font, gl, image, window | |
WIDTH, HEIGHT = 400, 400 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shoebot Sketch - Pleasing blue animated blue rectangle [stuaxo] | |
from math import cos, sin | |
def setup(): | |
speed(100) | |
def draw(): | |
transform(mode=CENTER) | |
translate(MOUSEX, MOUSEY) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# (Very) Simple particle system implementation in shoebot | |
# | |
# to run, install shoebot and planar.py, then run | |
# | |
# sbot -w arrow_particles.bot | |
from random import random | |
from planar.py import Vec2, Affine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
''' | |
Very minimal class for reading cells from 2d structures (e.g. those | |
returned by the csv reader. | |
reader classes extend GridModel and contain a Field and optional XAxis and | |
YAxis | |
class Customers(GridModel): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import gtk | |
class app(gtk.Window): | |
def __init__(self): | |
super(app, self).__init__() | |
#self.set_position(gtk.WIN_POS_CENTER) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cairocffi as cairo | |
s = cairo.ImageSurface(cairo.constants.FORMAT_ARGB32, 600, 400) | |
img = cairo.ImageSurface.create_from_png("/usr/share/icons/gnome/48x48/devices/joystick.png") | |
w, h = img.get_width(), img.get_height() | |
cr = cairo.Context(s) | |
def before(): | |
cr.save() |
OlderNewer