Skip to content

Instantly share code, notes, and snippets.

Avatar

André F. Rendeiro afrendeiro

View GitHub Profile
@vgoklani
vgoklani / app.py
Last active May 6, 2021
Using Flask to output Python data to High Charts
View app.py
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
@app.route('/index')
def index(chartID = 'chart_ID', chart_type = 'bar', chart_height = 350):
chart = {"renderTo": chartID, "type": chart_type, "height": chart_height,}
series = [{"name": 'Label1', "data": [1,2,3]}, {"name": 'Label2', "data": [4, 5, 6]}]
title = {"text": 'My Title'}
@benbalter
benbalter / gist.md
Last active Apr 8, 2021
Example of how to embed a Gist on GitHub Pages using Jekyll.
View gist.md

Here's an example of how to embed a Gist on GitHub Pages:

{% gist 5555251 %}

All you need to do is copy and paste the Gist's ID from the URL (here 5555251), and add it to a gist tag surrounded by {% and %}.

@keithshep
keithshep / querybiomartexample.py
Created Dec 3, 2013
A small example for how to create XML queries for biomart using python
View querybiomartexample.py
import requests
def main():
exampleTaxonomy = "mmusculus_gene_ensembl"
exampleGene = "ENSMUSG00000086981"
urlTemplate = \
'''http://ensembl.org/biomart/martservice?query=''' \
'''<?xml version="1.0" encoding="UTF-8"?>''' \
'''<!DOCTYPE Query>''' \
@informationsea
informationsea / refFlat2Bed.py
Created Jun 28, 2015
Convert USCS refFlat.txt to BED format
View refFlat2Bed.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import csv
def _main():
parser = argparse.ArgumentParser(description="Convert RefFlat to BED format")
parser.add_argument('refFlat', type=argparse.FileType('r'))
parser.add_argument('outputBed', type=argparse.FileType('w'))
@karpathy
karpathy / min-char-rnn.py
Last active May 14, 2021
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
View min-char-rnn.py
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
View IGV_Batch_Screenshots.md

IGV Batch Screenshots

IGV provides functionality that allows a user to create a script to take screenshots of regions of interest.

Table of Contents

  1. Requirements
  2. Workflow
  3. Create BED File