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
| type Kmer uint32 | |
| func (self *Index) GetPositionsKmer(kmer Kmer) (positions []int, err os.Error) { | |
| if kmer > self.kMask { | |
| return nil, bio.NewError("Kmer out of range", 0, []Kmer{kmer, self.kMask}) | |
| } | |
| i := Kmer(0) | |
| if kmer != 0 { // special case: An has no predecessor | |
| i = self.finger[kmer-1] |
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
| { | |
| // preprocessing | |
| dp := make(chan *DP, self.cores) | |
| for i := 0; i < self.cores; i++ { | |
| dp <- &DP{ | |
| a: self.a, | |
| b: self.b, | |
| minLen: minLen, | |
| maxDiff: maxDiff, |
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
| func (self *Morass) write(writing sortable) (err os.Error) { | |
| defer func() { | |
| self.error <- err | |
| self.done <- writing[:0] | |
| }() | |
| select { | |
| case <-self.error: | |
| default: | |
| } |
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
| include $(GOROOT)/src/Make.inc | |
| TARG=testtest | |
| GOFILES=\ | |
| test.go\ | |
| include $(GOROOT)/src/Make.pkg |
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
| From f5cc658536f716b5686a8cd158ad556b77a023c9 Mon Sep 17 00:00:00 2001 | |
| From: kortschak <dan.kortschak@adelaide.edu.au> | |
| Date: Sat, 14 Jan 2012 18:00:49 +1030 | |
| Subject: [PATCH] time changes - weekly.2011-12-01 | |
| --- | |
| consoleview.go | 9 ++++----- | |
| jsonio.go | 18 +++++++++--------- | |
| legacyio.go | 8 ++++---- | |
| main.go | 4 +++- |
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
| package main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| "runtime" | |
| "unsafe" | |
| ) | |
| type commonType struct { |
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
| package main | |
| import ( | |
| "bufio" | |
| "crypto/rand" | |
| "crypto/rsa" | |
| "crypto/tls" | |
| "crypto/x509" | |
| "crypto/x509/pkix" | |
| "encoding/pem" |
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
| //Use morass when you don't want your data to be a quagmire. | |
| // | |
| //Sort data larger than can fit in memory. | |
| // | |
| // morass məˈras/ | |
| // 1. An area of muddy or boggy ground. | |
| // 2. A complicated or confused situation. | |
| package morass | |
| // Copyright ©2011 Dan Kortschak <dan.kortschak@adelaide.edu.au> |
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
| package main | |
| import ( | |
| "fmt" | |
| "testing" | |
| ) | |
| // An offset slice seems to be the only way to implement the C idiom to | |
| // an offset (by o) a view (v) on an array (a): | |
| // int *v, o; |
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
| package main | |
| import ( | |
| "crypto/sha256" | |
| "fmt" | |
| "math/rand" | |
| "os" | |
| "time" | |
| ) |
OlderNewer