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 DrawTower(x,y,z,a): | |
bpy.ops.mesh.primitive_cube_add(location=(x,y,z+1), rotation = (0,0,a)) | |
bpy.ops.mesh.primitive_cylinder_add(location=(x,y,z+3), rotation = (0,0,a)) | |
bpy.ops.mesh.primitive_cone_add(location=(x,y,z+5), rotation = (0,0,a)) | |
def DrawTowers(n): | |
for i in range (0,n): | |
DrawTower(cos((2*pi*i)/n)*4,sin((2*pi*i)/n)*4,0,2*pi/n*i) | |
def DrawTowersCircle(n,r,cx,cy): |
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
#Copy directory structure | |
cd /path/to/directories && | |
find . -type d -exec mkdir -p -- /path/to/backup/{} \; | |
#copy files of certain extension | |
#http://superuser.com/questions/299938/how-can-i-recursively-copy-files-by-file-extension-preserving-directory-structu | |
cd /source/path | |
find -type f -name \*.txt -exec install -D {} /dest/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
/* | |
* Create a float image the size of a short image | |
* This is an example of how to create an image of | |
* a different type but same size as a given image | |
*/ | |
FloatImageType::Pointer ppRecruitImage = FloatImageType::New(); | |
//define origin and size the same as the input | |
//get the biggest region (which usually is the whole image) |
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 testBug(self): | |
# Uncomment the next line if you want to run this via | |
# `gdb python`. | |
#raw_input('Hit Ctrl-C') | |
# Load some data. | |
v16 = vtk.vtkVolume16Reader() | |
v16.SetDataDimensions(64, 64) | |
v16.SetDataByteOrderToLittleEndian() | |
v16.SetFilePrefix(os.path.join(Testing.VTK_DATA_ROOT, |
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
from PIL import Image | |
import numpy | |
im=Image.open('C:/Users/Administrator/Documents/Leslie/Uppsala/registered161101/crops/b1-2-0001-1757-1887-White Top Hat.tif') | |
def makeMaterial(name, diffuse, specular, alpha): | |
mat = bpy.data.materials.new(name) | |
mat.diffuse_color = diffuse | |
mat.diffuse_shader = 'LAMBERT' | |
mat.diffuse_intensity = 1.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
clear all; | |
base=5; | |
if(base==1) | |
b3=imread('MAX_base_1_ch3.tif'); | |
b4=imread('MAX_base_1_ch4.tif'); | |
b5=imread('MAX_base_1_ch5.tif'); | |
b6=imread('MAX_base_1_ch6.tif'); | |
finalname='b1-color.tif'; |
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
close all | |
clear all | |
fname ='C:\Users\Administrator\Documents\Leslie\Uppsala\registered161101\crops\b1-2-0001-1757-1887-White Top Hat.tif'; | |
info = imfinfo(fname); | |
num_images = numel(info); | |
w =info.Width; | |
h= info.Height; |
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
var exampleapp={ | |
starCount:0, | |
OSDviewer: null, | |
init: function(){ | |
var OSDviewer = OpenSeadragon(this.OSDOptions); | |
this.OSDviewer=OSDviewer; | |
this.OSDsvgov=this.OSDviewer.svgOverlay(); | |
var click_handler= function(event) { | |
if(event.quick){ |
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
<html> | |
<head> | |
<script src="https://d3js.org/d3.v4.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.8.0/p5.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> | |
<script src="/home/leslie/Downloads/iWildCam_2019_iNat_Idaho.json"></script> | |
<script src="/home/leslie/Downloads/iWildCam_2019_CCT_Bboxes.json"></script> | |
<!-- Latest compiled and minified CSS --> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer