Skip to content

Instantly share code, notes, and snippets.

@Nanguage
Nanguage / cuda_9.0_cudnn_7.0.sh
Created August 20, 2018 07:37 — forked from ashokpant/cuda_9.0_cudnn_7.0.sh
Install CUDA Toolkit v9.0 and cuDNN v7.0 on Ubuntu 16.04
#!/bin/bash
# install CUDA Toolkit v9.0
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb)
CUDA_REPO_PKG="cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb"
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/${CUDA_REPO_PKG}
sudo dpkg -i ${CUDA_REPO_PKG}
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda-9-0
#!/usr/bin/python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@Nanguage
Nanguage / tabs2spaces.py
Last active July 17, 2018 03:41 — forked from amoilanen/tabs2spaces.py
Python script to replace tabs with spaces recursively for all files matching a specified file mask regex, the number of spaces if configurable
USAGE = '''
Usage example:
python tabs2spaces.py . 4 ".*\.py$"
'''
import io
import argparse
import os
@Nanguage
Nanguage / install-ffmpeg.sh
Last active July 7, 2018 06:25 — forked from sparrc/install-ffmpeg.sh
Installs ffmpeg with libaom and libx265 enabled for av1 and hevc encoding (tested on Ubuntu 16.04)
#!/usr/bin/env bash
# Installs ffmpeg from source (HEAD) with libaom and libx265, as well as a few
# other common libraries
# binary will be at ~/bin/ffmpeg
sudo apt update && sudo apt upgrade -y
mkdir -p ~/ffmpeg_sources ~/bin
export PATH="$HOME/bin:$PATH"
@Nanguage
Nanguage / deseq2-analysis-template.R
Created August 21, 2017 13:42 — forked from stephenturner/deseq2-analysis-template.R
Template for analysis with DESeq2
## RNA-seq analysis with DESeq2
## Stephen Turner, @genetics_blog
# RNA-seq data from GSE52202
# http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=gse52202. All patients with
# ALS, 4 with C9 expansion ("exp"), 4 controls without expansion ("ctl")
# Import & pre-process ----------------------------------------------------
# Import data from featureCounts