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
function onOpen() { | |
var menuEntries = [ {name: "Create Diary Doc from Sheet", functionName: "createDocFromSheet"}]; | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
ss.addMenu("Fitness Diaries", menuEntries); | |
} | |
function createDocFromSheet(){ | |
var templateid = "1O4afl8SZmMxMFpAiN16VZIddJDaFdeRBbFyBtJvepwM"; // get template file id | |
var FOLDER_NAME = "Fitness Diaries"; // folder name of where to put completed diaries | |
// get the data from an individual user |
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
# Simplest possible marimekko/mosaic plot | |
doInstall <- TRUE # Change to FALSE if you don't want packages installed. | |
toInstall <- c("vcd", "ggplot2", "RColorBrewer") | |
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")} | |
lapply(toInstall, library, character.only = TRUE) | |
theme_set(theme_gray(base_size = 7)) | |
# All you need to start with is individual count data, and a grouping variable |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Module> | |
<ModulePrefs title="Gist"> | |
<Require feature="dynamic-height"/> | |
</ModulePrefs> | |
<UserPref name="id" display_name="Gist ID" required="true" default_value="9088612"/> | |
<UserPref name="font_size" display_name="Font size (px)" required="true" default_value="12"/> | |
<UserPref name="line_height" display_name="Line height (px)" required="true" default_value="16"/> | |
<Content type="html"> | |
<![CDATA[ |
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
#@ImagePlus imp | |
#@Integer(label="Number of Neighbors") k | |
#@Boolean(label="Give Each Neighbor's Distance") is_show_each | |
''' | |
Simple 2D KNN script | |
Olivier Burri, BioImaging & Optics Platform | |
Ecole Polytechnique Fédérale de Lausanne | |
July 12th 2016 |
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
#@ DatasetService ds | |
#@ UIService ui | |
#@ Long radius = 13 | |
#@ String (choices={"Diamond", "Hypersphere"}, style="listBox") shapeType | |
/* | |
* Displays a Diamond or Hypersphere neighborhood for a given radius | |
*/ | |
if( shapeType.equals("Diamond")) | |
shp = new DiamondShape(radius); |