Skip to content

Instantly share code, notes, and snippets.

Avatar

Saket Choudhary saketkc

View GitHub Profile
@gizmaa
gizmaa / Plot_Examples.md
Last active Jan 22, 2022
Various Julia plotting examples using PyPlot
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@willurd
willurd / web-servers.md
Last active Jan 19, 2022
Big list of http static server one-liners
View web-servers.md

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
@brentp
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
library(limma)
GROUP="62976"
# 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 kernel_kmeans.py
"""Kernel K-means"""
# Author: Mathieu Blondel <mathieu@mblondel.org>
# 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
@fperez
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.
@dgrtwo
dgrtwo / mnist_pairs.R
Created May 31, 2017
Comparing pairs of MNIST digits based on one pixel
View mnist_pairs.R
library(tidyverse)
# Data is downloaded from here:
# https://www.kaggle.com/c/digit-recognizer
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)
@fperez
fperez / README.md
Last active Jul 1, 2021
Polyglot Data Science with IPython
View README.md

Polyglot Data Science with IPython & friends

Author: Fernando Pérez.

A demonstration of how to use Python, Julia, Fortran and R cooperatively to analyze data, in the same process.

This is supported by the IPython kernel and a few extensions that take advantage of IPython's magic system to provide low-level integration between Python and other languages.

See the companion notebook for data preparation and setup.

@lmcinnes
lmcinnes / flow_cytometry.ipynb
Created Sep 8, 2018
Flow Cytometry experiments with UMAP
View flow_cytometry.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@twiecki
twiecki / dask_sparse_corr.py
Created Aug 17, 2018
Compute large, sparse correlation matrices in parallel using dask.
View dask_sparse_corr.py
import dask
import dask.array as da
import dask.dataframe as dd
import sparse
@dask.delayed(pure=True)
def corr_on_chunked(chunk1, chunk2, corr_thresh=0.9):
return sparse.COO.from_numpy((np.dot(chunk1, chunk2.T) > corr_thresh))
def chunked_corr_sparse_dask(data, chunksize=5000, corr_thresh=0.9):