Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

Leslie Evelyn Solorzano zloysmiertniy

💭
I may be slow to respond.
  • Uppsala, Sweden
Block or report user

Report or block zloysmiertniy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zloysmiertniy
zloysmiertniy / alpha.py
Last active Jul 14, 2019
Draw alpha levels blender
View alpha.py
location="/home/leslie/Documents/alphaamd/"
imgs=["cells2little.png"]
def drawboxesat(pdx, iw, ih, q):
step=1/q
for x in range(iw):
for y in range(ih):
intensity=pdx[(x,y)][0]
if intensity==0:
View mergiwild.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View iwild.html
<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"
@zloysmiertniy
zloysmiertniy / OSD-D3.js
Last active Apr 4, 2018
OSD+D3 create and drag elements
View OSD-D3.js
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){
View isosurfacespots.m
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;
@zloysmiertniy
zloysmiertniy / screens.m
Created Jan 9, 2017
Enhances spots and creates gimplike screen version
View screens.m
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';
View voxelsimagetiff.py
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
@zloysmiertniy
zloysmiertniy / Python VTK MPR
Created Nov 10, 2016
Nice short way to make an MPR in python
View Python VTK MPR
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,
View itk.cxx
/*
* 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)
@zloysmiertniy
zloysmiertniy / commands.sh
Last active Nov 11, 2016
General bash commands I use
View commands.sh
#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/{} \;
You can’t perform that action at this time.