Skip to content

Instantly share code, notes, and snippets.

@bunop
bunop / .bashrc
Last active April 6, 2022 02:53
bash_history advanced cleanup
# http://stackoverflow.com/questions/338285/prevent-duplicates-from-being-saved-in-bash-history
# remove duplicates while preserving input order
function dedup {
#awk '! x[$0]++' $@
tac $@ | awk '! x[$0]++' | tac
}
# removes $HISTIGNORE commands from input
function remove_histignore {
@bunop
bunop / python_private_methods.py
Created November 14, 2019 10:16
Python mangling and private methods etude
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Nov 14 10:18:35 2019
@author: Paolo Cozzi <paolo.cozzi@ibba.cnr.it>
An etude of private methods on python and name mangling. For references, a
recap of underscore naming convenctions:
@bunop
bunop / skbio.yml
Created January 30, 2017 15:22
Skbio conda environment
name: skbio
channels:
- !!python/unicode
'bioconda'
- !!python/unicode
'r'
- !!python/unicode
'defaults'
dependencies:
- !!python/unicode
@bunop
bunop / moved.vcf
Last active March 7, 2016 13:16
htslib can't deal with positions above ~500000000 - resolved - see comments
##fileformat=VCFv4.1
##fileDate=20150619
##source=freeBayes v0.9.20
##phasing=none
##INFO=<ID=NS,Number=1,Type=Integer,Description="Number of samples with data">
##INFO=<ID=DP,Number=1,Type=Integer,Description="Total read depth at the locus">
##INFO=<ID=DPB,Number=1,Type=Float,Description="Total read depth per bp at the locus; bases in reads overlapping / bases in haplotype">
##INFO=<ID=AC,Number=.,Type=Integer,Description="Total number of alternate alleles in called genotypes">
##INFO=<ID=AN,Number=1,Type=Integer,Description="Total number of alleles in called genotypes">
##INFO=<ID=AF,Number=.,Type=Float,Description="Estimated allele frequency in the range (0,1]">
@bunop
bunop / README.md
Created November 3, 2015 11:12 — forked from hofmannsven/README.md
My simply Git Cheatsheet