replace array with your options
(set: $cyclinglink to (array: "off", "low", "high"))
(set: $cl_index to 0)
The power is currently set to [(print: $cyclinglink[$cl_index])]<cl|.
[]<cl_macro|
(replace: ?cl_macro)[(display: "cyclinglink")]
import os, csv, urllib2, re, mechanize | |
from BeautifulSoup import BeautifulSoup | |
# initialize variables | |
rows = []; | |
INPUT_FILE = 'combined.csv' | |
OUTPUT_FILE = 'new.csv' | |
# get all clinical trial ids, store rows for later | |
if os.path.isfile(INPUT_FILE): |
$.each(mejs.players, function(i, p) { | |
p.media.onended = function() { | |
mejs.players[(i == mejs.players.length - 1 ? 0 : i + 1)].play() | |
} | |
}); |
var binnify = function(arr) { | |
var output = []; | |
var bin_string = (arr) => (arr.length == 1) ? `${arr[0]}` : `${arr[0]}-${arr[arr.length - 1]}`; | |
var bin_start = 0; | |
for (var i = 1; i < arr.length; i++) { | |
if (arr[i] != arr[i - 1] + 1) { | |
output.push(bin_string(arr.slice(bin_start, i))); | |
bin_start = i; | |
} | |
} |
Hello world!