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 random, math | |
def test2(nReal, nFake, nSamples = 100): | |
numToSample = int(math.ceil( (nReal + nFake) * 0.05 )) | |
values = range(nReal + nFake) | |
numTimesCaught = 0 | |
total = 0.0 | |
for test in xrange(nSamples): | |
random.shuffle( values ) |
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
std::string GetStringTrackedDeviceProperty( vr::IVRSystem * pSystem, vr::TrackedDeviceIndex_t unDeviceIndex, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *pError ) | |
{ | |
vr::ETrackedPropertyError err = TrackedProp_Success; | |
std::string sRetVal; | |
char buf[32]; | |
uint32_t unPropLen = pSystem->GetStringTrackedDeviceProperty( unDeviceIndex, prop, buf, sizeof( buf ), &err ); | |
if ( err == vr::TrackedProp_Success ) | |
{ |
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
mkdir -p build && cd build | |
mkdir -p install | |
cmake -D CMAKE_BUILD_TYPE=Release \ | |
-D CMAKE_INSTALL_PREFIX=install \ | |
-D OIIO_PATH=/net/homedirs/jeremys/git/oiio.js/dist/spinux1/ \ | |
-D OCIO_BUILD_APPS=YES \ | |
../ | |
make install -j8 |
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
g++ main.cpp -I/net/homedirs/jeremys/git/ocio.js/build/dist/include -ostatictest /net/homedirs/jeremys/git/ocio.js/build/dist/lib/libOpenColorIO.a /net/homedirs/jeremys/git/ocio.js/build/ext/dist/lib/libyaml-cpp.a /net/homedirs/jeremys/git/ocio.js/build/ext/dist/lib/libtinyxml.a |
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/sh | |
OCIO_NAMESPACE=OpenColorIO_SPI | |
OCIO_SPCOMP2_VERSION=2 | |
INSTALL_SPCOMP2_LOCATION=/shots/spi/home/lib/SpComp2 | |
#INSTALL_SPCOMP2_LOCATION=/net/homedirs/jeremys/SpComp2_local/ | |
if [ $SP_OS == "spinux1" ]; then | |
SP_COMPILER=gcc44m64 | |
PYVER=2.6 |
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
mkdir -p build_cuda_$HOST | |
cd build_cuda_$HOST | |
cmake \ | |
-D CMAKE_BUILD_TYPE=Release \ | |
-D OCIO_BUILD_SHARED=TRUE \ | |
-D OCIO_BUILD_CUDA=TRUE \ | |
-D CUDA_TOOLKIT_ROOT_DIR=/net/apps/spinux1/nvidia/cuda-4.0.17/cuda \ | |
-D OCIO_USE_BOOST_PTR=TRUE \ | |
-D OCIO_BUILD_TESTS=TRUE \ | |
-D OCIO_BUILD_APPS=TRUE \ |
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/sh | |
# Clone master branch into sub-directory | |
mkdir -p mastercopy | |
git archive master | tar -x -C mastercopy | |
# Run cmake in a build directory | |
mkdir -p build | |
cd build | |
cmake \ |
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
mkdir -p build_tests | |
cd build_tests | |
cmake \ | |
-D CMAKE_BUILD_TYPE=Release \ | |
-D OCIO_BUILD_SHARED=FALSE \ | |
-D OCIO_BUILD_STATIC=FALSE \ | |
-D OCIO_BUILD_TRUELIGHT=FALSE \ | |
-D OCIO_BUILD_TESTS=TRUE \ | |
-D OCIO_BUILD_APPS=FALSE \ | |
-D OCIO_BUILD_NUKE=FALSE \ |