A Pen by Jonas Almeida on CodePen.
This file contains hidden or 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
x = [1,2,3] |
This file contains hidden or 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
$('<li> <a href="javascript:myPatientsFun()">JSON_Patients</a></li>').appendTo($('.navbar-nav')[0]); | |
myPatientsFun = function() { | |
if($('#JSON_Patients').length>0){$('#JSON_Patients').remove()} | |
else{ | |
var myPatients = Patients.find().fetch(); | |
$('.row-fluid').prepend($('<div id="JSON_Patients"><a style="color:red" href="javascript:myPatientsFun()">Hide ('+myPatients.length+')</a></div>')); | |
$('#JSON_Patients').append($('<pre>'+JSON.stringify(myPatients,undefined,3)+'</pre>')); | |
} | |
} |
This file contains hidden or 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
// https://gist.github.com/drobbins/64b0d90009333fc50d01 |
This file contains hidden or 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
// SPARQL query composition at http://agalpha.mathbiol.org/repositories/tcga#query/r/TCGA-CM-4743-01A-01_URL | |
label='TCGA-CM-4743-01A-0' // example of a label | |
url = 'http://agalpha.mathbiol.org/download?file=query.json&accept=application%2Fsparql-results%2Bjson&path=%2Frepositories%2Ftcga%3Fquery%3Dselect%2520distinct%2520%253Fo%2520%253Fu%250Awhere%2520%257B%250A%2509%253Ft%2520a%2520%253Chttp%253A%252F%252Fpurl.org%252Ftcga%252Fcore%2523platform%253E.%250A%2520%2520%2509%253Ft%2520%253Chttp%253A%252F%252Fwww.w3.org%252F2000%252F01%252Frdf-schema%2523label%253E%2520%2522tissue_images%2522.%250A%2520%2520%2509%253Fo%2520%253Chttp%253A%252F%252Fpurl.org%252Ftcga%252Fcore%2523platform%253E%2520%253Ft.%250A%2520%2520%2509%253Fo%2520rdfs%253Alabel%2520%253FL.%250A%2520%2520%2509filter%2520REGEX(%253FL%252C%72'+label+'1%27)%250A%2520%2520%2520%2520%253Fo%2520tcga%253Aurl%2520%253Fu%250A%257D%26infer%3Dfalse' | |
$.getJSON(url,function(x){ | |
y=x.results.bindings.map(function(xi){return xi.u.value}); | |
console.log(' |
This file contains hidden or 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
// One way to measure goodness of fit is to | |
// assess the even distribution of values arround | |
// the regression line. This is a non-parameric | |
// approach that is not sensitive to the magitude | |
// of the noise, only to its structure | |
RSD={ | |
res2sign:function(r){ // counts same-sideness of residuals in array r | |
var rs = 0 | |
for(var i=1;i<r.length;i++){rs+=((r[i]*r[i-1])>0)} |
This file contains hidden or 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
<h2>Mean Absolute Deviation = <span id="y"> ... </span></h2> | |
<p><textarea id="x"></textarea></p> | |
(separate values with commas) |
Forked from William Savage's Pen P2 - Zoomable tree map - using Json & D3.js(v3).
A Pen by Jonas Almeida on CodePen.
This file contains hidden or 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
var http = require('http') | |
var port = process.env.PORT || 1337; | |
http.createServer(function(req, res) { | |
res.writeHead(200, { | |
'Content-Type': 'text/plain', | |
'Access-Control-Allow-Origin': '*' // CORS | |
}); | |
if(req.url.match('=')){ | |
var pp=req.url.slice(2).split('=') // parameter array | |
var parm={} |
This file contains hidden or 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
Verifying my Blockstack ID is secured with the address 194cZZBfYZYtuRdnjVbNWnVNkUX6B8xJYL https://explorer.blockstack.org/address/194cZZBfYZYtuRdnjVbNWnVNkUX6B8xJYL |
OlderNewer