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() { | |
var loadSource = function(file, onSourceLoad) { | |
if (!file.fileSrc.match(/js-test/)) { | |
return false; | |
} | |
require([file.fileSrc], function() { | |
onSourceLoad({file: file, success: true, message: ''}); | |
}, function(err) { |
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
define(['text', 'lib/haml'], function(text, haml) { | |
var plugin = Object.create(text); // inherit methods of the text loader | |
function wrapload(fn) { | |
return function(value) { | |
fn(haml.compileHaml({source: value})); | |
} | |
} | |
function load(name, req, onload, config) { |
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
// haml loader for requirejs | |
(function() { | |
function register(text, haml) { | |
var plugin = Object.create(text); // inherit methods of the text loader | |
function wrapload(fn) { | |
return function(value) { | |
fn(haml.compileHaml({source: value})); | |
} |
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
(defn fizzbizz [x] | |
(reduce (fn [a [s d]] (get [s] (mod x d) a)) | |
x | |
[["bizz" 5]["fizz" 3]["fizzbizz" 15]])) |
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
(let [t (fn [type prop] ; type hint a property | |
(with-meta prop {:tag type})) | |
cc (fn [prop] ; camel-case a property | |
(str (.toUpperCase (subs (str prop) 0 1)) (subs (str prop) 1))) | |
m (fn [prop method] ; construct method name for property | |
(symbol (str method (cc prop)))) | |
bean-interface (fn [bean-name & props] ; define interface for bean | |
(let [set (fn [type prop] | |
`(~(m prop 'set) [~(t type 's)])) |
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
(ns try-spark.spark | |
(:refer-clojure :exclude [map filter reduce first name take min distinct max count]) | |
(:require [clojure.core :as core]) | |
(:require [clojure.reflect :as r]) | |
(:import org.apache.spark.sql.api.java.JavaSchemaRDD)) | |
; Parameter classes that we have to wrap in order to | |
; call rdd methods with plain clojure functions. | |
(def func-types | |
(into #{} |
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
describe.only('example', function () { | |
it('should find visible element, low arity', function () { | |
browser.execute(function () { | |
document.body.innerHTML = '<div id="a" class="a">foo</div><div id="b">blah</div>'; | |
}); | |
// We pretend we're waiting on a list of dom elements to be | |
// created. | |
browser.waitUntil( | |
() => browser.elements('//*[@class="a"]').value.length > 0, |
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
(ns matrix-test.core-test | |
(:require [clojure.test :refer :all] | |
[clojure.test.check :as tc] | |
[clojure.test.check.generators :as gen] | |
[clojure.test.check.properties :as prop] | |
[matrix-test.core :refer :all])) | |
(def element gen/int) | |
(defn matrix-size [[w h]] |
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 xenaPython as xena | |
host = xena.PUBLIC_HUBS["pancanAtlasHub"] | |
cohort ="TCGA PanCanAtlas" | |
samples = xena.cohort_samples(host, cohort, None) | |
genes = ["FOXM1", "TP53"] | |
expression_dataset = "EB++AdjustPANCAN_IlluminaHiSeq_RNASeqV2.geneExp.xena" | |
[foxm1_expresssion_by_sample, tp53_expression_by_sample] = xena.dataset_fetch(host, expression_dataset, samples, genes) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.