Skip to content

Instantly share code, notes, and snippets.

desc: (none)
cmd: ./vsearch --derep_fulllength test-identical.fasta --sizein --sizeout --output test-identical.fasta.derep.fasta
time_unit: i
#-----------
snapshot=0
#-----------
time=0
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=0
@mys721tx
mys721tx / ident.go
Created August 24, 2018 17:07
Test Sequence Generator
package main
import (
"bufio"
"math/rand"
"os"
"github.com/biogo/biogo/alphabet"
"github.com/biogo/biogo/io/seqio/fasta"
"github.com/biogo/biogo/seq/linear"
@mys721tx
mys721tx / make.log
Created August 24, 2018 14:49
VSEARCH make log
make all-recursive
make[1]: Entering directory '/home/mys_721tx/vsearch'
Making all in src
make[2]: Entering directory '/home/mys_721tx/vsearch/src'
g++ -DHAVE_CONFIG_H -I. -I.. -Wall -Wsign-compare -O3 -g -msse2 -g -march=native -MT libcpu_sse2_a-cpu.o -MD -MP -MF .deps/libcpu_sse2_a-cpu.Tpo -c -o libcpu_sse2_a-cpu.o `test -f 'cpu.cc' || echo './'`cpu.cc
mv -f .deps/libcpu_sse2_a-cpu.Tpo .deps/libcpu_sse2_a-cpu.Po
rm -f libcpu_sse2.a
ar cru libcpu_sse2.a libcpu_sse2_a-cpu.o
ar: `u' modifier ignored since `D' is the default (see `U')
ranlib libcpu_sse2.a
@mys721tx
mys721tx / massif.out.15f715a
Last active August 23, 2018 21:08
derep_fulllength heap profile
desc: (none)
cmd: ./vsearch --derep_fulllength all.fasta --sizein --sizeout --output all.derep.test.fasta
time_unit: i
#-----------
snapshot=0
#-----------
time=0
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=0
@mys721tx
mys721tx / sum.py
Last active July 11, 2018 04:35
Summing all FASTA headers
"""
sum.py
"""
import sys
size = 0
def parse(line):
if line[0] == ">":
@mys721tx
mys721tx / split-package.patch
Created June 2, 2018 00:23
splitting google-auth-httplib2-git
diff --git a/PKGBUILD b/PKGBUILD
index 7ab045a..42fe6d6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,28 +1,45 @@
# Maintainer: Ainola
-pkgname=python2-google-auth-httplib2-git
+pkgbase=python-google-auth-httplib2-git
+pkgname=python-google-auth-httplib2-git
@mys721tx
mys721tx / get_follower.py
Last active January 5, 2018 01:19
Get twitter followers
"""
get_follower.py
"""
import twitter #python-twitter
auth = {
"consumer_key": "",
"consumer_secret": "",
"access_token_key": "",
@mys721tx
mys721tx / keybase.md
Created January 3, 2018 23:28
KeyBase proof

Keybase proof

I hereby claim:

  • I am mys721tx on github.
  • I am mys_721tx (https://keybase.io/mys_721tx) on keybase.
  • I have a public key whose fingerprint is 3A45 375D 6460 9CA3 4B64 C5F3 81C8 4F22 EE52 6950

To claim this, I am signing this object:

@mys721tx
mys721tx / README.md
Last active December 28, 2017 21:06
Five Players

The problem can be solved using discrete Fourier transform (DFT).

Rewriting the problem as a matrix equation Cx = b, we noticed that the coefficient matrix C is a circulant square matrix. The equation can then be rewriten as the circular convolution of c and x.

By circular convolution theorem, the point-wise product of the DFT of c and that of x is the DFT of b. We can compute x from the point-wise quotient. (Wikipedia)

@mys721tx
mys721tx / README.md
Last active December 29, 2017 00:10
Mirror Image

The problem can be solved by using a stack.

  1. We push everything in the stack.
  2. We pop everything off the stack

The running time of this algorithm is bounded by the stack operations. We can achieve O(n).