gitflow | git |
---|---|
git flow init |
git init |
git commit --allow-empty -m "Initial commit" |
|
git checkout -b develop master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.colors as mcolors | |
def hex_to_rgb(value): | |
''' | |
Converts hex to rgb colours | |
value: string of 6 characters representing a hex colour. | |
Returns: list length 3 of RGB values''' | |
value = value.strip("#") # removes hash symbol if present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def symlog_bins(arr, n_bins, zero_eps=0.1, padding=0): | |
""" | |
Splits a data range into log-like bins but with 0 and negative values taken into account. | |
Can be used together with matplotlib 'symlog' axis sacale (i.e. ax.set_xscale('symlog')) | |
Feel free to contribute: https://gist.github.com/artoby/0bcf790cfebed5805fbbb6a9853fe5d5 | |
""" | |
a = min(arr) / (1 + padding) | |
b = max(arr) * (1 + padding) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
codontab = { | |
'TCA': 'S', # Serina | |
'TCC': 'S', # Serina | |
'TCG': 'S', # Serina | |
'TCT': 'S', # Serina | |
'TTC': 'F', # Fenilalanina | |
'TTT': 'F', # Fenilalanina | |
'TTA': 'L', # Leucina | |
'TTG': 'L', # Leucina | |
'TAC': 'Y', # Tirosina |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get_latest_release() { | |
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api | |
grep '"tag_name":' | # Get tag line | |
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value | |
} | |
# Usage | |
# $ get_latest_release "creationix/nvm" | |
# v0.31.4 |