Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Wei Shen shenwei356

🎯
Focusing
View GitHub Profile
View __mm_add_epi32.md
  8            .          .           TEXT ·__mm_add_epi32(SB),0,$0 
  9        640ms      640ms               VMOVDQU x+0(FP), Y0 
 10        5.62s      5.62s               VMOVDQU y+32(FP), Y1 
 11        4.81s      4.81s               VPADDD  Y1, Y0, Y0 
 12        1.16s      1.16s               VMOVDQU Y0, q+64(FP) 
 13        1.30s      1.30s               VZEROUPPER 
 14            .          .               RET 
@shenwei356
shenwei356 / test.go
Created Jul 4, 2018
inverse-bloom-filter
View test.go
package main
import (
"compress/gzip"
"fmt"
"os"
"strconv"
boom "github.com/tylertreat/BoomFilters"
)
@shenwei356
shenwei356 / add-timestamp-for-media-file.sh
Last active Apr 25, 2018
Adding create time to image/video files
View add-timestamp-for-media-file.sh
#!/bin/sh
while read file; do
if [[ $string =~ .*=.* ]]; then
continue
fi
t=$(exiftool "$file" \
| grep "^Create Date" | head -n 1 \
| sed -r "s/\s+/ /g" | cut -d " " -f 4 \
View bench-fx2tab.sh
#!/bin/sh
# Test data
#
# Retrieve 1M reads from any Illumina reads
#
# seqkit head -n 1000000 xxxx_1.fq.gz -o test.fq.gz
#
# Or
#
@shenwei356
shenwei356 / howto.md
Last active Oct 31, 2019 — forked from killercup/pandoc.css
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
View howto.md
pandoc -f markdown -t html -c pandoc.css -s -o report.html
@shenwei356
shenwei356 / doc.md
Last active Apr 3, 2017
Effect of random seed on results of 'seqkit sample'
@shenwei356
shenwei356 / Downloading genome annotation files from NCBI ftp with given FTP URL list.md
Last active Feb 7, 2019
Downloading genome annotation files from NCBI ftp with given FTP URL list
View Downloading genome annotation files from NCBI ftp with given FTP URL list.md

URL list

$ head choose_ftp.txt
ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000/015/405/GCA_000015405.1_ASM1540v1
ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000/620/625/GCA_000620625.1_ASM62062v1
ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000/972/925/GCA_000972925.1_ASM97292v1
ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/001/021/385/GCA_001021385.1_ASM102138v1
ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000/328/565/GCA_000328565.1_ASM32856v1

Target files

View Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@shenwei356
shenwei356 / filter spades assembly result according to coverage.md
Last active Aug 10, 2020
Filtering spades assembly result according to coverage using SeqKit and csvtk
View filter spades assembly result according to coverage.md

Filtering Spades assembly result according to coverage information in sequence header

Sample sequence

$ cat contigs.fasta 
>NODE_1_length_869844_cov_1135.34
ACTGNacgtn 
>NODE_2_length_576386_cov_975.882
acgtn
View howto
var system = require('system');
var page = require('webpage').create();
page.open(system.args[1], function()
{
console.log(page.content);
phantom.exit();
});