Skip to content

Instantly share code, notes, and snippets.

View tbrittoborges's full-sized avatar
🎯

Thiago Britto Borges tbrittoborges

🎯
View GitHub Profile
@mikelove
mikelove / E-P_pairs.R
Created June 16, 2023 06:35
New approach to computing correlations between pairs of overlapping features in terms of data matrices
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() %>%
@willkurt
willkurt / prob_logic.ipynb
Last active September 16, 2021 17:25
Implementing probability as logic using Python's data model methods
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ilevantis
ilevantis / bedtools_cheatsheet.md
Last active April 10, 2024 19:12
Bedtools cheatsheet

Bedtools Cheatsheet

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.
@stefanthaler
stefanthaler / colorize_word_embeddings.py
Created February 3, 2017 14:38
A simple example to demonstrate how to link embedding metadata to word embeddings in tensorflow / tensorboard
"""
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
@Brainiarc7
Brainiarc7 / gnu-parallel-bioinformatics.md
Last active September 6, 2023 13:59
GNU Parallel usage in Bioinformatics with examples: A primer.
@stefanthaler
stefanthaler / stateful_lstm_embedding.py
Last active September 2, 2020 14:10
Simple example for a stateful keras LSTM with embedding.
"""
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jfpuget
jfpuget / Julia_Python_perf.ipynb
Last active April 15, 2022 11:55
An exercise in Python optimization: make Python benchmarks as fast, if not faster, than Julia.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@madjar
madjar / scrapper.py
Last active March 5, 2023 15:02
A example of scrapper using asyncio and aiohttp
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))
@sloria
sloria / bobp-python.md
Last active May 1, 2024 08:37
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens