General:
| Tools | Description |
|---|---|
| flank | Create new intervals from the flanks of existing intervals. |
| slop | Adjust the size of intervals. |
| shift | Adjust the position of intervals. |
| subtract | Remove intervals based on overlaps b/w two files. |
| library(plyranges) | |
| set.seed(1) | |
| x <- data.frame(seqnames=1, start=0:9 * 100 + 1, | |
| width=20, id=1:10) %>% | |
| as_granges() | |
| y <- data.frame(seqnames=1, start=round(runif(4,100,900)), | |
| width=10, id=letters[1:4]) %>% | |
| as_granges() %>% |
| """ | |
| Simple example to demostrate the embedding visualization for word embeddings in tensorflow / tensorboard | |
| https://www.tensorflow.org/how_tos/embedding_viz/ | |
| """ | |
| import tensorflow as tf | |
| import os | |
| assert tf.__version__ == '1.0.0-rc0' # if code breaks, check tensorflow version | |
| from tensorflow.contrib.tensorboard.plugins import projector |
Installation:
A quick installation does not require root access, as shown:
(wget -O - pi.dk/3 || curl pi.dk/3/ || fetch -o - http://pi.dk/3) | bash
For other installation options see http://git.savannah.gnu.org/cgit/parallel.git/tree/README
| """ | |
| Learning Task: | |
| Given a sequence, predict a label based on the first value of the sequence | |
| Explanation of stateful LSTM and setup: | |
| http://philipperemy.github.io/keras-stateful-lstm/ | |
| Exmple: | |
| given a sequence [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], predict 1 | |
| given a sequence [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], predict 0 |
| import asyncio | |
| import aiohttp | |
| import bs4 | |
| import tqdm | |
| @asyncio.coroutine | |
| def get(*args, **kwargs): | |
| response = yield from aiohttp.request('GET', *args, **kwargs) | |
| return (yield from response.read_and_close(decode=True)) |