This is guide about how to configure multiple SSH keys for some Git host websites such as Github, Gitlab, among others.
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
# give Python access to Blender's functionality | |
import bpy | |
# extend Python's math functionality | |
import math | |
def hex_color_to_rgba(hex_color): | |
# remove the leading '#' symbol | |
hex_color = hex_color[1:] |
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
/** | |
* Import images from .qpdata files into a new project in QuPath v0.2.x. | |
* | |
* The purpose of this is to help recover data from files that were saved outside a project. | |
* It may not work for all images, but should work for most 'straightforward' examples (i.e. a single image per image file). | |
* | |
* If your .qpdata files are already part of a v0.1.2 project, use 'File -> Project... -> Import images from v0.1.2' instead. | |
* If your .qpdata files are already part of a v0.2.0 project, use 'File -> Project... -> Add images' and add the .qpproj file instead. | |
* | |
* Warning! This hasn't been very extensively tested (I always use projects from the start...). |
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
// Processing code by Etienne JACOB | |
// motion blur template by beesandbombs | |
// opensimplexnoise code in another tab might be necessary | |
// --> code here : https://gist.github.com/Bleuje/fce86ef35b66c4a2b6a469b27163591e | |
int[][] result; | |
float t, c; | |
float ease(float p) { | |
return 3*p*p - 2*p*p*p; |
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
Collections of scripts to alter object colors harvested mainly from Pete, but also picked up from the forums | |
TOC | |
Change IF channel color.groovy - Change the LUT for individual channels. Does not work with OpenSlide servers (check Image tab). | |
Change colors by subclass.groovy - Detection object color adjustment when using subclasses. | |
Change subcellular detection color - Hugely useful when working with subcellular detections as, by default, they are a derived class | |
and cannot be altered directly through the Annotation tab interface. |
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 scipy import interpolate | |
def crop_and_resample_2darray(arr, x_crop, y_crop, resample, *args, **kwargs): | |
"""Crop a 2darray and resize the data""" | |
len_x_crop = x_crop[1]-x_crop[0] | |
len_y_crop = y_crop[1]-y_crop[0] | |
arr_crop = arr[x_crop[0]:x_crop[1], y_crop[0]:y_crop[1]] | |
f = interpolate.interp2d(np.arange(len_y_crop), |
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
{0: 'tench, Tinca tinca', | |
1: 'goldfish, Carassius auratus', | |
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias', | |
3: 'tiger shark, Galeocerdo cuvieri', | |
4: 'hammerhead, hammerhead shark', | |
5: 'electric ray, crampfish, numbfish, torpedo', | |
6: 'stingray', | |
7: 'cock', | |
8: 'hen', | |
9: 'ostrich, Struthio camelus', |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>D3 Drawing</title> | |
<script src="https://cdn.jsdelivr.net/d3js/3.5.9/d3.min.js"></script> | |
</head> | |
<body> | |
<h3>Draw a polygon :D</h3> | |
<script> |
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
# Copyright (c) 2013, Robin Wilson | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# * Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. | |
# * Redistributions in binary form must reproduce the above copyright | |
# notice, this list of conditions and the following disclaimer in the | |
# documentation and/or other materials provided with the distribution. |
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="http://code.jquery.com/jquery-1.11.0.min.js"></script> | |
</head> | |
<body> | |
<img id="viewer" src="" width="800px"/> | |
<div id="info"> </div> | |
<script> | |
$(function() { |
NewerOlder