start new:
tmux
start new with session name:
tmux new -s myname
| import sys | |
| import time | |
| from Bio import Entrez | |
| Entrez.email = "your.email@domain.tld" | |
| if not Entrez.email: | |
| print "you must add your email address" | |
| sys.exit(2) | |
| # create an empty list we will fill with the gene names |
| a=[] | |
| while STDIN.readline.chomp!="42" | |
| a.push($_) | |
| end | |
| a.each { |s| puts s } |
| 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 |
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.
$ python -m SimpleHTTPServer 8000| """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 |
Last Update: May 13, 2019
Offline Version
| # 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." | |
| # | |
| # https://docs.python.org/2/reference/datamodel.html | |
| # | |
| # There is an older implementation of a similar idea: |
| 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) |