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 ctypes | |
# Path to location of libcudart | |
_CUDA = "/Developer/NVIDIA/CUDA-5.5/lib/libcudart.5.5.dylib" | |
cuda = ctypes.cdll.LoadLibrary(_CUDA) | |
cuda.cudaMemGetInfo.restype = int | |
cuda.cudaMemGetInfo.argtypes = [ctypes.c_void_p, ctypes.c_void_p] | |
cuda.cudaGetErrorString.restype = ctypes.c_char_p |
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
from PyQt4 import QtCore, QtGui | |
import maya.cmds as cmds | |
import maya.OpenMayaUI as mui | |
import sip | |
global app | |
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
$ go build -x -v . | |
# swigtest/ocio | |
ocio/ocio.cpp:24:16: error: no viable conversion from 'OCIO::ConstConfigRcPtr' (aka 'shared_ptr<const OpenColorIO::v1::Config>') to 'Config *' (aka 'void *') | |
/usr/include/c++/4.2.1/tr1/boost_shared_ptr.h:678:7: note: candidate function |
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
from PyQt4 import QtGui, QtCore | |
# from PySide import QtGui, QtCore | |
class ColorPot(QtGui.QFrame): | |
# colorChanged = QtCore.Signal(QtGui.QColor) | |
colorChanged = QtCore.pyqtSignal(QtGui.QColor) | |
def __init__(self, color=None, parent=None): | |
super(ColorPot, self).__init__(parent) |
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
""" | |
ActiveState: | |
http://code.activestate.com/recipes/578634-pyqt-pyside-thread-safe-callbacks-main-loop-integr/ | |
ref and proxy classes are based on: | |
http://code.activestate.com/recipes/81253/#c5 | |
Modified proxy to support a quiet concept for callbacks that can | |
simply pass if they were not valid, instead of raising an exception. |
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/env python | |
""" | |
Showing a test, inside and outside of Maya, | |
of child windows still remaining alive after being closed. | |
Test can toggle the WA_DeleteOnClose attribute on each child widget: | |
# Command line (dont delete) | |
$ ./child_window_test.py |
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
#!/bin/bash | |
if [ -z $1 ] || [ ! -d ${1}/server ]; then | |
echo "plow_rebuild.sh <path to plow source>" | |
exit 1 | |
fi | |
realpath1() { | |
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}" | |
} |
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
from PyQt4 import QtCore, QtGui | |
class ColorBox(QtGui.QFrame): | |
def __init__(self,parent=None): | |
super(ColorBox,self).__init__(parent) | |
self.bgColor = QtCore.Qt.white | |
self.setFixedHeight(20) | |
self.setFrameStyle(1) |
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
Show hidden characters
// Preferences.sublime-settings | |
{ | |
// ... | |
"auto_complete_triggers": [{"selector": "source.python", "characters": "."}], | |
"auto_complete_selector": "-" | |
} |