This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(py36) -bash-4.2$ rm -rf .git | |
(py36) -bash-4.2$ rm .gitattributes | |
(py36) -bash-4.2$ git init | |
Initialized empty Git repository in /disk1/pore_data/Porcupine-data/.git/ | |
(py36) -bash-4.2$ git remote add origin git@github.com:uwmisl/Porcupine-data.git | |
(py36) -bash-4.2$ git add README.md; git commit -m "initial commit" | |
[master (root-commit) 4d255df] initial commit | |
1 file changed, 1 insertion(+) | |
create mode 100644 README.md | |
(py36) -bash-4.2$ git push -u --force origin master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from matplotlib import pyplot as plt | |
import seaborn as sns | |
import matplotlib.patches as mpatches | |
sns.set(style="whitegrid", font_scale=1.8) | |
def diverging_stacked_bar(results, category_names=[], colors=[], symmetrical=False, | |
bar_width = 0.35): | |
if len(category_names) % 2 == 0: # even | |
print(len(category_names)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' Python 2.7 progress bar | |
Code mostly taken from: | |
https://stackoverflow.com/questions/3173320/text-progress-bar-in-the-console | |
I usually use this for simple for loops with long iterations to make sure it's | |
actually progressing without polluting stdout. | |
''' | |
import sys | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
input=$1 | |
if [[ $input == *.zip ]]; then | |
unzip -q -o -d "${input%.*}" "$input" | |
in_dir="${input%.*}"/* | |
else | |
in_dir=$input/* | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pip install ont-fast5-api | |
from ont_fast5_api import fast5_file | |
import uuid | |
import numpy as np | |
f5_fname = "sample.fast5" | |
mode = "r+" # Supported modes: ['r', 'r+', 'w', 'w-', 'x'], same meanings as h5py http://docs.h5py.org/en/latest/high/file.html | |
f5 = fast5_file.Fast5File(fname=f5_fname, mode=mode) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# this script does absolutely ZERO error checking. however, it worked | |
# for me on a RHEL 6.3 machine on 2012-08-08. clearly, the version numbers | |
# and/or URLs should be made variables. cheers, zmil...@cs.wisc.edu | |
install_dir=software/mosh | |
protobuf_version=3.4.0 | |
mosh_version=1.3.2 # https://mosh.org/mosh-1.3.2.tar.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Updates | |
sudo apt-get update | |
sudo apt-get -y dist-upgrade | |
# Install packages | |
sudo apt-get -y install vim hostapd dnsmasq | |
# Make my mouse poll properly | |
sudo vim /boot/cmdline.txt # add usbhid.mousepoll=0 to this file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Updates | |
sudo apt-get update | |
sudo apt-get -y dist-upgrade | |
sudo reboot | |
# Install packages | |
sudo apt-get -y install vim | |
# Make my mouse poll properly | |
sudo vim /boot/cmdline.txt # add usbhid.mousepoll=0 to this file |