Skip to content

Instantly share code, notes, and snippets.

View vincentdavis's full-sized avatar

Vincent vincentdavis

View GitHub Profile
@vincentdavis
vincentdavis / gist:3480597
Created August 26, 2012 14:47 — forked from brantfaircloth/gist:944741
blat blast8 tabular format
text = Query id, Subject id, % identity, alignment length, mismatches, gap openings, q. start, q. end, s. start, s. end, e-value, bit score
csv = "Query id","Subject id","% identity","alignment length","mismatches","gap openings","q. start","q. end","s. start","s. end","e-value","bit score"
@vincentdavis
vincentdavis / gist:8588879
Last active January 4, 2016 07:29
De Bruijn sequence
def debruijn(k, n):
"""
De Bruijn sequence for alphabet size k (0,1,2...k-1)
and subsequences of length n.
From wikipedia Sep 22 2013
"""
a = [0] * k * n
sequence = []
def db(t, p,):
if t > n:
@vincentdavis
vincentdavis / listkeys.sh
Created February 16, 2016 16:36
List all user Authorized ssh keys
#!/bin/bash
for X in $(cut -f6 -d ':' /etc/passwd |sort |uniq); do
if [ -s "${X}/.ssh/authorized_keys" ]; then
echo "### ${X}: "
cat "${X}/.ssh/authorized_keys"
echo ""
fi
done
@vincentdavis
vincentdavis / keybase.md
Last active January 2, 2018 15:12
I am vincentdavis on github.

Keybase proof

I hereby claim:

  • I am vincentdavis on github.
  • I am vincentdavis (https://keybase.io/vincentdavis) on keybase.
  • I have a public key ASC5pBUtHGp8xVqEAo3JD13tbDDOF8a309iI0vqonm2W1wo

To claim this, I am signing this object:

import requests
from requests_html import HTMLSession
import pandas as pd
mainpage = "https://covid19.colorado.gov/covid19-outbreak-data"
try:
session = HTMLSession()
response = session.get(mainpage)
except:
print('failed to load main page')
@vincentdavis
vincentdavis / mount_filesystem_osx.md
Created January 12, 2022 19:06 — forked from TysonRayJones/mount_filesystem_osx.md
Mount a remote filesystem in OSX

If you're manipulating files stored on a remote machine, such as ARCUS or ARCHER supercomputers, you can mount the remote file system and interact with the files as if they were stored on your own machine. This makes viewing, editing, and opening files in software on your computer a breeze.

To do this on OSX, first ensure you have homebrew installed. If brew is not recognised in Terminal, run

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"