del object_using_gpu
torch.cuda.empty_cache()
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
void branchlessONB( Vector3 N, ref Vector3 A, ref Vector3 B) | |
{ | |
float sign = N.z >= 0.0f ? 1.0f : -1.0f; | |
float a = 1.0f / (sign + N.z); | |
float b = N.x * N.y * a; | |
A.Set(1.0f + sign * N.x * N.x * a, sign * b, -sign * N.x); | |
B.Set(b, sign + N.y * N.y * a, -N.y); | |
} | |
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
/// | |
/// Average max distance | |
/// | |
float maxdistance = 15; | |
int maxpoints = 5; | |
int closept[] = pcfind_radius(0, "P", "pscale", 1.0, @P, maxdistance, maxpoints); | |
f@dist = 0; | |
foreach (int opt; closept) { | |
vector npos = point(0, "P", opt); |
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
# Restart the VM | |
!kill -9 -1 | |
## Mount a google drive | |
# install prereqs | |
!apt-get install -y -qq software-properties-common python-software-properties module-init-tools | |
!add-apt-repository -y ppa:alessandro-strada/ppa 2>&1 > /dev/null | |
!apt-get update -qq 2>&1 > /dev/null | |
!apt-get -y install -qq google-drive-ocamlfuse fuse | |
from google.colab import auth |
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
#Uploading the Dataset | |
from google.colab import files | |
uploaded = files.upload() | |
#Save uploaded file on the Virtual Machine's | |
#Thanks to user3800642 from StackOverflow | |
with open("breast_cancer.csv", 'w') as f: | |
f.write(uploaded[uploaded.keys()[0]]) |
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
# good for testing frameworks | |
import maya.standalone | |
maya.standalone.initialize() | |
from maya import cmds | |
cmds.loadPlugin('path/to/plugin.so') |
NewerOlder