Skip to content

Instantly share code, notes, and snippets.


Saket Choudhary saketkc

View GitHub Profile
brantfaircloth /
Created Apr 3, 2011
Get protein sequences from Genbank given a genomic accession number and a gene name
import sys
import time
from Bio import Entrez = ""
if not
print "you must add your email address"
# create an empty list we will fill with the gene names
saketkc / TEST.rb
Created Jul 14, 2011
CodeChef(SPOJ) Problem1 Ruby Solution
View TEST.rb
while STDIN.readline.chomp!="42"
a.each { |s| puts s }
brentp / one-channel-agilent.R
Created Aug 17, 2011
use limma to normalize 1-channel agilent data and write out differentially expressed genes.
View one-channel-agilent.R
# targets.txt has columns of "FileName" and "Condition" e.g.
FileName Condition
data/scrubbed/LT001098RU_COPD.45015.txt COPD
data/scrubbed/LT001600RL_ILD.45015.txt ILD
data/scrubbed/LT003990RU_CTRL.45015.txt CTRL
data/scrubbed/LT004173LL_ILD.45015.txt ILD
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
willurd /
Last active Jan 19, 2022
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
"""Kernel K-means"""
# Author: Mathieu Blondel <>
# License: BSD 3 clause
import numpy as np
from sklearn.base import BaseEstimator, ClusterMixin
from sklearn.metrics.pairwise import pairwise_kernels
from sklearn.utils import check_random_state
gizmaa /
Last active Jan 22, 2022
Various Julia plotting examples using PyPlot
fperez / ProgrammaticNotebook.ipynb
Last active Dec 9, 2021
Creating an IPython Notebook programatically
View ProgrammaticNotebook.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Inspired by the following sentence that I ran across this morning:
# "f_lineno is the current line number of the frame - writing to
# this from within a trace function jumps to the given line
# (only for the bottom-most frame). A debugger can implement a
# Jump command (aka Set Next Statement) by writing to f_lineno."
# There is an older implementation of a similar idea:
dgrtwo / mnist_pairs.R
Created May 31, 2017
Comparing pairs of MNIST digits based on one pixel
View mnist_pairs.R
# Data is downloaded from here:
kaggle_data <- read_csv("~/Downloads/train.csv")
pixels_gathered <- kaggle_data %>%
mutate(instance = row_number()) %>%
gather(pixel, value, -label, -instance) %>%
extract(pixel, "pixel", "(\\d+)", convert = TRUE)