Skip to content

Instantly share code, notes, and snippets.

View antunderwood's full-sized avatar

Anthony Underwood antunderwood

View GitHub Profile
# file is downloaded from covid19.sanger.ac.uk with customised lineage selection
data<- read_csv("C:/Users/Theo/Desktop/Estimated_Cases_in_England (2).csv")
library(gganimate)
data$date
library(MetBrewer)
lookup =c("B"="Other B lineages","B.1.1.529"="Omicron", "B.1.1.7"="Alpha","B.1.617.2"="Delta","B.1.177"="B.1.177","AY.4.2"="AY.4.2")
@bewt85
bewt85 / README.md
Last active July 8, 2023 08:09
here-here - what did I run here

here-here

here-here is like history but it saves the time you ran a command and the directory you were in when you ran it. Running here tells you all the commands you ran in this directory even if you were on a different server.

I commonly wonder how I made a file (and maybe why). Sometimes I try looking in my history (using the history command). This makes that easier by clearing out some of the noise.

Installation

@maidens
maidens / sensitivity_specificity_confidence_intervals.py
Created May 14, 2018 18:28
Confidence intervals for sensitivity and specificity in Python
from __future__ import print_function, division
from math import sqrt
from scipy.special import ndtri
def _proportion_confidence_interval(r, n, z):
"""Compute confidence interval for a proportion.
Follows notation described on pages 46--47 of [1].
@alexjironkin
alexjironkin / gist:4ed43412878723491240814a0d5a6ed6
Last active January 28, 2023 05:15
min_abundance_finder.py
'''
:Date: 26 Jul 2016
:Author: Public Health England
'''
"""Detect peaks in data based on their amplitude and other features."""
import argparse
from khmer import khmer_args
import khmer
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@pcreux
pcreux / Gemfile
Last active December 11, 2023 20:24
Fast Rails + Heroku Configuration
group :production do
gem 'unicorn'
# Enable gzip compression on heroku, but don't compress images.
gem 'heroku-deflater'
# Heroku injects it if it's not in there already
gem 'rails_12factor'
end
@madrobby
madrobby / forceScrollbars.coffee
Created September 13, 2011 16:16
Get Safari (Lion) to hopefully always indicate & show scrollbars correctly
# CoffeeScript source
$.fn.forceScrollbars = ->
@css position: 'static'
@[0].offsetHeight if @length > 0
@css position: 'relative'
@phoet
phoet / rails_admin_without_devise.rb
Created December 17, 2010 15:35
Using RailsAdmin without devise
# add RailsAdmin to the Gemfile
# do NOT add devise
gem "rails_admin", :git => "git://github.com/sferik/rails_admin.git"
# run Bundler
bundle
# run the generator for RailsAdmin
# looks like it's broken, but it just does not install devise
# you may also remove the app/config/locales/devise.en.yml
sudo apt-get install libtool
git clone git://dnaa.git.sourceforge.net/gitroot/dnaa/dnaa dnaa-git
cd dnaa-git
# bfast required. see above gist
cp -r ../bfast-git ./bfast
# samtools require. see above gist.
cp -r ../samtools-svn/ ./samtools
sh autogen.sh && ./configure && make && sudo make install