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
@GrabResolver(name='biojava', root='http://www.biojava.org/download/maven/') | |
@Grab('org.biojava:biojava3-core:3.0.2') | |
import org.biojava3.core.sequence.*; | |
rna = new DNASequence("atgccgaatcgtaa").RNASequence | |
println rna |
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
@GrabResolver(name='biojava', root='http://www.biojava.org/download/maven/') | |
@Grab('org.biojava:biojava3-core:3.0.2') | |
import org.biojava3.core.sequence.* | |
import org.biojava3.core.sequence.io.* | |
import org.biojava3.core.sequence.compound.* | |
def testFasta = '''> seq1 This is the description of my first sequence. | |
AGTACGTAGTAGCTGCTGCTACGTGCGCTAGCTAGTACGTCA | |
CGACGTAGATGCTAGCTGACTCGATGC | |
> seq2 This is a description of my second sequence. |
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
@GrabResolver(name='biojava', root='http://www.biojava.org/download/maven/') | |
@Grab('org.biojava:biojava3-core:3.0.2') | |
import org.biojava3.core.sequence.*; | |
rna = new DNASequence(args? args[0] : '').RNASequence | |
println rna |
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 org.mozilla.universalchardet.UniversalDetector | |
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath files('juniversalchardet-1.0.3.jar') // not available in public repository :( | |
} | |
} |
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
apply plugin:'groovy' | |
apply plugin:'idea' | |
apply plugin:'project-report' | |
apply plugin:'maven' | |
repositories { | |
mavenLocal() | |
mavenCentral() | |
} |
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 groovy.json.JsonSlurper | |
assert args && args.size() == 2 | |
def urls = args[0].split(',') | |
def expectedVersion = args[1] | |
urls.each { url -> | |
println "examining url $url" | |
def json = new JsonSlurper().parseText(url.toURL().text) | |
json.jobs.each { |
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 groovy.json.* | |
def HOSTNAME = 'http://ci.jruby.org' | |
def JOBNAME = 'jruby-dist' | |
def JOB_URL = "$HOSTNAME/job/$JOBNAME/lastSuccessfulBuild" | |
def text = "$JOB_URL/api/json".toURL().text | |
println JsonOutput.prettyPrint(text) | |
def json = new JsonSlurper().parseText(text) | |
json.artifacts.each{ | |
println it | |
} |
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
@Grab(group = 'net.sf.opencsv', module = 'opencsv', version = '2.3') | |
import au.com.bytecode.opencsv.CSVReader | |
import au.com.bytecode.opencsv.CSVParser | |
import au.com.bytecode.opencsv.CSVWriter | |
def TEST_FILE_NAME = 'test.csv' | |
def TEST_OUTPUT_FILE_NAME = 'testOut.csv' | |
List<String[]> rows = new CSVReader(new FileReader(new File(TEST_FILE_NAME)), CSVParser.DEFAULT_SEPARATOR, CSVParser.DEFAULT_ESCAPE_CHARACTER, CSVParser.DEFAULT_QUOTE_CHARACTER, 1).readAll() | |
def rowsOver100 = rows.findAll {it[1].toInteger() > 100} |
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 org.mbte.gretty.httpserver.* | |
@GrabResolver(name='gretty', | |
root='http://groovypp.artifactoryonline.com/groovypp/libs-releases-local') | |
@Grab('org.mbte.groovypp:gretty:0.4.279') | |
GrettyServer server = [] | |
server.groovy = [ | |
localAddress: new InetSocketAddress("localhost", 8080), | |
defaultHandler: { |
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
@GrabResolver(name = 'gretty', root = 'http://groovypp.artifactoryonline.com/groovypp/libs-releases-local') | |
@Grab('org.mbte.groovypp:gretty:0.4.279') | |
@Grab('com.icegreen:greenmail:1.3.1b') | |
import javax.mail.internet.MimeMessage | |
import org.jboss.netty.channel.local.LocalAddress | |
import org.mbte.gretty.httpserver.GrettyServer | |
import com.icegreen.greenmail.user.* | |
import com.icegreen.greenmail.util.* | |
//create the greenmail server |