This file contains 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 get_orig_prefix(): | |
""" | |
read orig-prefix.txt and return it | |
""" | |
orig_prefix_txt = normpath(abspath(join(get_python_lib(), '..', 'orig-prefix.txt'))) | |
print orig_prefix_txt | |
try: | |
with open(orig_prefix_txt) as f: | |
path = f.readline().strip() | |
return path |
This file contains 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 sys | |
import os | |
from OpenGL.GL import * | |
from OpenGL.GLUT import * | |
from OpenGL.GLU import * | |
sys.path.insert(0, os.getcwd()) | |
from csg.core import CSG |
This file contains 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
# coding: utf-8 | |
# In[12]: | |
# draw a yellow rectangle with cairocffi | |
import cairocffi as cairo | |
im = cairo.ImageSurface(cairo.FORMAT_ARGB32, 512, 512) |
This file contains 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
#!/bin/bash | |
function extract_images() { | |
# Disk images have a string like this | |
# | |
# DISK-1.IMA: , MS or PC-DOS bootloader IO.SYS+MSDOS.SYS | |
# | |
# | |
dest=$1 | |
file *.IMA | grep 'PC-DOS' | awk -F '[/:]' '{print $1}' | |
This file contains 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
""" | |
This is a port of the mozilla webgl-sample5 to pyopengl | |
I made this from scratch to more closely follow the original and includes all the comments... except it | |
just has a black screen :/ | |
The working, but more dirty version is here: | |
https://gist.github.com/stuaxo/ed0b5bd691f766098faf | |
Instead of webgl uses pyopengl |
This file contains 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
""" | |
Well ... this isn't the nicest port, I tried a second time with all the comments, but it didn't seem to work | |
- the 2nd version is here https://gist.github.com/stuaxo/5c641637f65a53cc8020 | |
Instead of webgl uses pyopengl | |
Instead of glm uses pyrr | |
Install Dependencies | |
pip install numpy pyopengl pyrr |
This file contains 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
$ python test_resize.py | |
[INFO ] [Logger ] Record log in /home/stu/.kivy/logs/kivy_15-09-09_19.txt | |
INFO:kivy:[Logger ] Record log in /home/stu/.kivy/logs/kivy_15-09-09_19.txt | |
[INFO ] [Kivy ] v1.9.1-dev | |
INFO:kivy:[Kivy ] v1.9.1-dev | |
[INFO ] [Python ] v2.7.9 (default, Apr 2 2015, 15:33:21) | |
[GCC 4.9.2] | |
INFO:kivy:[Python ] v2.7.9 (default, Apr 2 2015, 15:33:21) | |
[GCC 4.9.2] | |
[INFO ] [Factory ] 177 symbols loaded |
This file contains 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
#!/bin/python | |
# -*- coding: utf-8 -*- | |
""" | |
get input from a real APC mini and display it on. | |
usage | |
----- | |
$ python apc_mini.py "APC MINI MIDI 1" |
This file contains 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 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: |