View chr2num.R
#!/usr/bin/env Rscript
#copy .metainfo and .chrnames.endsembl from orig tar.gz in subfolder and change
# chrnames, ID
#tar with tar -zcvf Tair10numeric.tar.gz Tair10numeric
convertRdata <- function(){
id <- "Tair10numeric"
dir.create(id, recursive=TRUE, show=FALSE )
View gist:4741d705ab2ed1e2c5fd
### Keybase proof
I hereby claim:
* I am idot on github.
* I am idotamir (https://keybase.io/idotamir) on keybase.
* I have a public key whose fingerprint is CAB5 4E68 808E 591E 4F62 E3BE 0271 0975 3DDF F04E
To claim this, I am signing this object:
View eulerGrid.R
## Prepare data to plot in Euler Grid.
## Quantity or binary table with columns for samples and rows for features
#### FUNCTIONS #######
## convert a (table, matrix,) data.frame to either 0/1 or FALSE/TRUE based on whether values exceed threshold.
## to invert a threshold use: new.table <- table == FALSE
View config.scala
package scalaz.example
object Reader extends App {
/**
* Manual propagation of the environment (in the example, `contextRoot`.)
*/
object Config0 {
def fragment1(contextRoot: String) = <a href={contextRoot + "/foo"}>foo</a>
View iteratee-io.scala
import java.io.{ BufferedReader, File, FileReader }
import scalaz._, Scalaz._, effect.IO, iteratee.{ Iteratee => I, _ }
object IterateeIOExample {
type ErrorOr[+A] = EitherT[IO, Throwable, A]
def openFile(f: File) = IO(new BufferedReader(new FileReader(f)))
def readLine(r: BufferedReader) = IO(Option(r.readLine))
def closeReader(r: BufferedReader) = IO(r.close())
View combinePlots.R
library(gridExtra)
getLegend <- function(tp.gplot, position="bottom", box="horizontal"){
tmp <- ggplot_gtable(ggplot_build(tp.gplot + theme(legend.position = position, legend.box = box)))
leg <- which(sapply(tmp$grobs, function(x) x$name) == "guide-box")
legend <- tmp$grobs[[leg]]
return(legend)
}
#then extract height or width of legend
View ngGrid.js
//////////////////////////////////////
/// Grid Directive to Angular 1.0.2
//////////////////////////////////////
// To use:
// <script>
// var app = angular.module('myapp', ['ngGrid']);
// var Ctrl = function($scope) { $scope.todos = [...] }
// </script>
// <div ng-app="myapp">
View CQRS_ES_Actor.scala
import scala.collection.mutable.ListBuffer
import akka.actor.{Actor,ActorRef}
import akka.actor.Actor._
import akka.routing.{ Listeners, Listen }
//Represents a domain event
trait Event
//A builder to create domain entities
trait EntityBuilder[Entity] {
View toIllu.py
#!/usr/bin/env python
def toIllu(c):
"""returns the 1.5 value of phred+33
>>> [toIllu(ord(n)) for n in["!",'"',"#","$","H","I","J"]]
['B', 'B', 'B', 'C', 'g', 'h', 'h']
"""
if c < 36:
return "B"
elif c > 73:
View tikz2pdf.py
#!/usr/bin/env python
#
# Copyright (c) 2007, Hans Meine <hans_meine@gmx.net>
# All rights reserved.
#
# This is licensed according to the new BSD license.
# Please send patches / comments, I would be happy about any feedback.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions