Skip to content

Instantly share code, notes, and snippets.

View leshaker's full-sized avatar

Max Schelker leshaker

View GitHub Profile
@chad-m
chad-m / streamlit_download_button.py
Last active June 24, 2024 04:21
A download function and examples app for Streamlit
import base64
import os
import json
import pickle
import uuid
import re
import streamlit as st
import pandas as pd
@vidboda
vidboda / addchr2vcf.sh
Created April 8, 2019 11:06
add chr to a vcf file
zcat file1.vcf.gz | awk -F"\t" '{if ($0 !~ /^#/) {print "chr"$0} else{print $0}}' | bgzip -c >file1chr.vcf.gz
@nloadholtes
nloadholtes / setup.py
Created July 15, 2017 20:25
An example of using the git hash/tag as a version number
from setuptools import setup, find_packages
import subprocess
def _get_version_hash():
"""Talk to git and find out the tag/hash of our latest commit"""
try:
p = subprocess.Popen(["git", "describe",
"--tags", "--dirty", "--always"],
stdout=subprocess.PIPE)
except EnvironmentError:
@davfre
davfre / bamfilter_oneliners.md
Last active February 24, 2024 01:23
SAM and BAM filtering oneliners
@obazoud
obazoud / clean-docker.sh
Last active September 27, 2022 04:56
Remove docker image without tag
#!/bin/bash
sudo docker stop $(docker ps -a -q)
sudo docker rm $(docker ps -a -q)
sudo docker ps -a | grep 'months ago' | awk '{print $1}' | xargs sudo docker rm
sudo docker images | grep "\<none\>" | awk '{ print $3 }' | xargs sudo docker rmi
@hopsoft
hopsoft / readme2ghpage.rb
Created June 21, 2012 17:09
Convert your README.md on master to index.md on gh-pages
#!/usr/bin/env ruby
# checkout the readme from the master branch
`git checkout gh-pages; git checkout master README.md`
path = `pwd`.gsub(/\n/, "")
readme_path = File.join(path, "README.md")
index_path = File.join(path, "index.md")
# write the index readme file