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
package mypackage | |
import grails.test.mixin.TestFor | |
import grails.test.mixin.TestMixin | |
import grails.test.mixin.support.GrailsUnitTestMixin | |
import spock.lang.* | |
/** | |
* See the API for {@link grails.test.mixin.support.GrailsUnitTestMixin} for usage instructions | |
*/ |
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
# -*- coding: utf-8 *-* | |
import subprocess | |
import xml.dom.minidom as mdom | |
import collectiontools.reactions as reactions | |
sbmlStam = """ | |
<sbml xmlns="http://www.sbml.org/sbml/level2" level="2" version="1" xmlns:html="http://www.w3.org/1999/xhtml"> | |
<model id="%(id)s" name="%(name)s"> | |
<listOfUnitDefinitions> | |
<unitDefinition id="mmol_per_gDW_per_hr"> | |
<listOfUnits> |
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
def chunker(seq, size): | |
return (seq[pos:pos + size] for pos in xrange(0, len(seq), size)) |
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
''' | |
Created on May 20, 2012 | |
@author: Piotr Zakrzewski | |
''' | |
import collections | |
import pygame | |
import threading | |
import random |
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
install.packages("Rserve") #only the first time | |
install.packages("jsonlite")#only the first time | |
library("Rserve") | |
Rserve(args="--vanilla") |
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
class SampleService { | |
def methodA() { | |
methodB() | |
} | |
def methodB() { | |
return "real method" | |
} | |
} |
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
#!/usr/bin/python3 | |
""" | |
Get a md5 hash of a file (content wise, binary) | |
""" | |
import hashlib | |
def getHash(path): | |
with open(path,"rb") as infile: | |
content = infile.read() | |
hash = hashlib.md5(content).digest() |
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
df <- data.frame(Row.Label= as.character(1:5) , Bio.marker=as.character(2:6), z=11:15, u=26:30) | |
df2 <- data.frame(Row.Label= as.character(1:5) , Bio.marker=as.character(2:6), z=11:15, u=26:30) | |
loaded_variables <- list("first one"=df, "second" = df2) | |
library(gplots) | |
dataset1color <- "coral3" | |
dataset2color <- "chartreuse3" | |
labelColumns <- c("Row.Label","Bio.marker") |
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
psql -U tm_cz -h localhost transmart | |
sudo -u postgres psql transmart |
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
numpy.fromiter((<some_func>(x) for x in <something>),<dtype>,<size of something>) |
OlderNewer