cfx test -v
New style done()
in jetpack test library testing assumes that the ui is 'clean', which means:
# lift: p(x,y) / ( p(x)*p(y) == ratio of 'overage' compared to independence | |
# rr = relative risk == p(x+|y+) / p(x-|y-) | |
rr_more <- function(n){ | |
m <- matrix(rmultinom(1,n,c(1,2,3,4)),c(2,2)) | |
rownames(m) <- colnames(m) <- c(T,F) | |
R <- rowSums(m) | |
C <- colSums(m) | |
lift <- m[1,1] / (R[1] * C[1] / n) |
# https://developer.mozilla.org/en-US/docs/addons.mozilla.org_%28AMO%29_API_Developers%27_Guide/The_generic_AMO_API | |
# by search | |
curl 'https://services.addons.mozilla.org/en-US/firefox/api/1.5/search/guid:firefox-hotfix@mozilla.org' | xmllint --format - | grep '<icon' | |
# by id | |
curl 'https://services.addons.mozilla.org/en-US/firefox/api/1.5/addon/1-click-youtube-video-downl?format=json' | python -m json.tool | grep '"icon":' | |
# by amo id | |
curl -s https://services.addons.mozilla.org/en-US/firefox/api/1.5/addon/1865 | xmllint --format - | grep icon |
# from: http://effbot.org/zone/librarybook-core-eval.htm | |
print eval("__import__('os').remove('file')", {"__builtins__": {}}) # in particular, one has to kill or safeguard __import__ | |
# PyRun_SimpleStringFlags | |
https://github.com/python-git/python/blob/715a6e5035bb21ac49382772076ec4c630d6e960/Modules/main.c#L284 | |
https://github.com/python-git/python/blob/715a6e5035bb21ac49382772076ec4c630d6e960/Python/pythonrun.c#L949 | |
https://github.com/python-git/python/blob/715a6e5035bb21ac49382772076ec4c630d6e960/Python/pythonrun.c#L1286 | |
""" | |
from fileinput or stdin, decorate lines with userid, ts for later sort. | |
Full usage: | |
hadoop dfs -text /bagheera/testpilot_contextfeaturerecommender/*/* | python dsu.py | sort -k 1,2 | cut -f 3- | less -S | |
(decorate-sort-undecorate pattern sorting) | |
""" |
let xulWindow = WindowUtils.getMostRecentBrowserWindow() | |
let mainWindow = xulWindow.document.children["main-window"] | |
let xulPanel = Array.from(mainWindow.querySelectorAll("popupset#mainPopupSet panel")).find(p => p.backgroundFrame && p.backgroundFrame.getAttribute("src") == this.panelUri) | |
xulPanel.setAttribute("noautohide", true) |
/* jshint forin:true, noarg:false, noempty:true, eqeqeq:true, bitwise:true, | |
strict:true, undef:true, curly:false, browser:true, | |
unused:true, | |
indent:2, maxerr:50, devel:true, node:true, boss:true, white:true, | |
globalstrict:true, nomen:false, newcap:true, esnext: true, moz: true */ | |
/*global exports, require */ | |
// "use strict"; |
""" | |
ENV: | |
ONEPERCENT - use the 1% sample | |
JOB_* - these will go to the JOB enivornment, and are viewable from the map functions | |
RUN - to run from cli. (gross, sorry!) | |
Examples: | |
rm -rf driver.jar /tmp/output; | |
ONEPERCENT=1 JOB_SUBSAMPLE=.02 make ARGS="scripts/whatever.py /tmp/output" hadoop # implied 1 pct location |
36423 glind ~/gits/servo [git:master]$ ./mach build | |
Submodule 'tests/wpt/web-platform-tests' (https://github.com/servo/web-platform-tests.git) registered for path 'tests/wpt/web-platform-tests' | |
Cloning into 'tests/wpt/web-platform-tests'... | |
remote: Counting objects: 73149, done. | |
remote: Compressing objects: 100% (23005/23005), done. | |
remote: Total 73149 (delta 47863), reused 73139 (delta 47855) | |
Receiving objects: 100% (73149/73149), 53.81 MiB | 590 KiB/s, done. | |
Resolving deltas: 100% (47863/47863), done. | |
Submodule path 'tests/wpt/web-platform-tests': checked out 'a467a3312ae3730e9e1ce0fd1cc200a2dbeadbe6' | |
Submodule 'resources' (https://github.com/servo/testharness.js.git) registered for path 'resources' |