Skip to content

Instantly share code, notes, and snippets.

@afgomez
afgomez / git-checkout-branch-fuzzy
Last active April 9, 2023 18:04
FZF git-checkout
#!/bin/bash
branch=`git branch -a | sed 's/^\*//; s/^[ \t]*//; /HEAD.*/d; /^remotes\/origin\/$/d' | fzf --height 40% --border --reverse --preview 'git log --color=always {} -10' | sed 's/remotes\/origin\///'`
if [[ $branch ]]; then
git checkout $branch
fi
@wookayin
wookayin / reload-tensorflow-flags.py
Last active March 12, 2018 13:33
Reset tensorflow tf.app.flags, in ipython notebook
# use the following snippet in your ipython notebook shell
import argparse
import tensorflow as tf
tf.app.flags.FLAGS = tf.python.platform.flags._FlagValues()
tf.app.flags._global_parser = argparse.ArgumentParser()
@slowkow
slowkow / VCF.py
Last active November 6, 2023 09:44
VCF.py is a simple module for reading VCF files
"""
VCF.py
Kamil Slowikowski
October 30, 2013
Read VCF files. Works with gzip compressed files and pandas.
Note: This module ignores the genotype columns because
I didn't need them at the time of writing.