Skip to content

Instantly share code, notes, and snippets.

View hansent's full-sized avatar

Thomas Hansen hansent

View GitHub Profile
'''
Use keyboard to do some action
'''
__all__ = ('start', 'stop')
import sys
import logging
from pymt import *
#!/bin/bash
SCRIPT_PATH="${BASH_SOURCE[0]}";
if([ -h "${SCRIPT_PATH}" ]) then
while([ -h "${SCRIPT_PATH}" ]) do SCRIPT_PATH=`readlink "${SCRIPT_PATH}"`; done
fi
SCRIPT_PATH=`dirname ${SCRIPT_PATH}`
export PYTHONPATH=${SCRIPT_PATH}/pymt:${SCRIPT_PATH}/lib/sitepackages
export DYLD_FALLBACK_LIBRARY_PATH=${SCRIPT_PATH}/lib
Thomas-Hansens-MacBook-Pro:videoplayer tehansen$ pymt test.py
[INFO ] PyMT v0.5
[INFO ] [Core ] Using accelerate module
[INFO ] [Logger ] Record log in /Users/tehansen/.pymt/logs/pymt_10-08-13_31.txt
[INFO ] [No OpenGL_accelerate module loaded] No module named OpenGL_accelerate
[INFO ] [Unable to load registered array format handler numeric]
Traceback (most recent call last):
File "/Applications/PyMT.app/Contents/Resources/lib/sitepackages/OpenGL/arrays/formathandler.py", line 44, in loadPlugin
plugin_class = entrypoint.load()
File "/Applications/PyMT.app/Contents/Resources/lib/sitepackages/OpenGL/plugins.py", line 14, in load
vorbis: vorbistag: VorbisTag
vorbis: vorbisparse: VorbisParse
vorbis: vorbisdec: Vorbis audio decoder
vorbis: vorbisenc: Vorbis audio encoder
volume: volume: Volume
videotestsrc: videotestsrc: Video test source
videoscale: videoscale: Video scaler
videorate: videorate: Video rate adjuster
typefindfunctions: xdgmime-base: no extensions
typefindfunctions: image/vnd.adobe.photoshop: psd
Thomas-Hansens-MacBook-Pro:Movid tehansen$ brew uninstall opencv
Uninstalling /usr/local/Cellar/opencv/2.1.0...
Thomas-Hansens-MacBook-Pro:Movid tehansen$ brew install opencv
==> Downloading http://www.cmake.org/files/v2.8/cmake-2.8.2.tar.gz
######################################################################## 100.0%
==> ./bootstrap --prefix=/usr/local/Cellar/cmake/2.8.2 --system-libs --datadir=/
==> make
==> make install
/usr/local/Cellar/cmake/2.8.2: 550 files, 28M, built in 6.9 minutes
==> Checking out https://code.ros.org/svn/opencv/trunk/opencv
require 'formula'
class Opencv <Formula
# Use head, don't install 2.1.0 due to a *massive* memory leak:
# https://code.ros.org/trac/opencv/ticket/253
#Use revision 3478, which fixes the leak, later revisions break on OSX though
head 'https://code.ros.org/svn/opencv/trunk/opencv', :using => :svn, :revision => '3478'
homepage 'http://opencv.willowgarage.com/wiki/'
depends_on 'cmake'
set 1
sta result
next, lda stdin
brz done
brp skip
neg
skip, sta value
mlt result
sta result
lda value
hansent@hansent-mbp:~/pymt$ sudo python -m pymt.tools.dumpinput
[INFO ] PyMT v0.5.2-dev
[INFO ] [Core ] Using accelerate module
[INFO ] [Logger ] Record log in /home/hansent/.pymt/logs/pymt_10-11-10_10.txt
[INFO ] [No OpenGL_accelerate module loaded] No module named OpenGL_accelerate
None
[INFO ] [Graphx ] Using accelerate graphx module
[DEBUG ] [Cache ] register <pymt.label> with limit=1000, timeout=1.0s
[DEBUG ] [Cache ] register <pymt.cssrect> with limit=100, timeout=60s
** Message: pygobject_register_sinkfunc is deprecated (GstObject)
hansent@hansent-mbp:~/code$ ls
backup fresk kinect kivy-test.py libfreenect openFrameworks poly2tri-python pymt pysvg-read-only
hansent@hansent-mbp:~/code$ git clone [email protected]:tito/kivy.git
Initialized empty Git repository in /home/hansent/code/kivy/.git/
remote: Counting objects: 1370, done.
remote: Compressing objects: 100% (991/991), done.
remote: Total 1370 (delta 825), reused 725 (delta 359)
Receiving objects: 100% (1370/1370), 902.94 KiB | 935 KiB/s, done.
Resolving deltas: 100% (825/825), done.
hansent@hansent-mbp:~/code$ cd kivy/
<Picture>:
size: myimage.norm_image_size
Image:
id: myimage
source: self.parent.url
pos: (0,0)
size: 400,400
canvas:
Clear