Skip to content

Instantly share code, notes, and snippets.

View ConstantinoSchillebeeckx's full-sized avatar

Constantino Schillebeeckx ConstantinoSchillebeeckx

View GitHub Profile
@ConstantinoSchillebeeckx
ConstantinoSchillebeeckx / move_file_with_git_history.sh
Created September 14, 2023 20:49
Move files or directories from one repo to another while maintaining history
#!/bin/bash
# Utility script to copy over a file or directory from one repo to another while maintaining history
# Taken from: https://savorywatt.com/2015/01/25/move-files-and-folders-between-git-repos-using-patches/
# Usage:
# ./scripts/move_file_with_git_history.sh ~/some/repo/some/file/foo.py
# https://gist.github.com/mohanpedala/1e2ff5661761d3abd0385e8223e16425
set -e
set -u
set -o pipefail
@ConstantinoSchillebeeckx
ConstantinoSchillebeeckx / github.user.css
Created October 31, 2018 14:43
Custom theme for Typora Github theme; sets code and mark styles to match those of Bootstrap3
#write {
max-width: 1160px;
}
code {
padding: 2px 4px;
font-size: 90%;
color: #c7254e;
background-color: #f9f2f4;
border-radius: 4px;
#!/usr/bin/env python3
'''
TODOC
Usage:
------
./boiler_plate.py -d required -p optional
'''
@ConstantinoSchillebeeckx
ConstantinoSchillebeeckx / utils.py
Last active April 30, 2018 18:35
Helper utilities useful with jupyter notebook
def value_count(x, name=None):
'''
Helper function that wraps df.value_counts() into a more
presentable fashion.
Example:
========
dat = a|b|c
1|2|3
4|5|6
@ConstantinoSchillebeeckx
ConstantinoSchillebeeckx / vsearch_pick_open_reference_otus.sh
Last active July 28, 2017 09:30
bash script that uses vsearch to run the equivalent of QIIME's pick_open_reference_otus.py
#!/bin/bash
echo "Vsearch started: $(date)";
echo "";
# generate all the proper directories
mkdir -p step1_otus; mkdir -p step2_otus; mkdir -p step3_otus; mkdir -p step4_otus
# must sort because searching done greedily
# see http://drive5.com/usearch/manual/uparseotu_algo.html