In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:
- Separate big codebases into multiple repositories.
@binkmail.com | |
@bobmail.info | |
@chammy.info | |
@devnullmail.com | |
@letthemeatspam.com | |
@mailinater.com | |
@mailinator.net | |
@mailinator2.com | |
@notmailinator.com | |
@reallymymail.com |
import numpy as np | |
from scipy import stats | |
from itertools import combinations | |
from statsmodels.stats.multitest import multipletests | |
from statsmodels.stats.libqsturng import psturng | |
import warnings | |
def kw_dunn(groups, to_compare=None, alpha=0.05, method='bonf'): | |
""" |
# Copyright (c) 2016 Nicolas P. Rougier - BSD License | |
# SI prefixes as name:value | |
SI_prefix_name_value = { | |
"yocto": 10e-24, "zepto": 10e-21, "atto": 10e-18, "femto": 10e-15, | |
"pico": 10e-12, "nano": 10e-9, "micro": 10e-6, "milli": 10e-3, | |
"centi": 10e-2, "deci": 10e-1, "deca": 10e1, "hecto": 10e2, | |
"kilo": 10e3, "mega": 10e6, "giga": 10e9, "tera": 10e12, | |
"peta": 10e15, "exa": 10e18, "zetta": 10e21, "yotta": 10e24 } |
# ----------------------------------------------------------------------------- | |
# Copyright (c) 2016 Nicolas P. Rougier. All rights reserved. | |
# Distributed under the (new) BSD License. | |
# ----------------------------------------------------------------------------- | |
import sys | |
import math | |
import ctypes | |
import numpy as np | |
import OpenGL.GL as gl | |
import OpenGL.GLUT as glut |
# ----------------------------------------------------------------------------- | |
# Copyright (c) 2016, Nicolas P. Rougier | |
# Distributed under the (new) BSD License. | |
# ----------------------------------------------------------------------------- | |
import sys, math | |
def progress(value, length=40, title = " ", vmin=0.0, vmax=1.0): | |
""" | |
Text progress bar |
def binomial(n, k): | |
""" | |
A fast way to calculate binomial coefficients by Andrew Dalke. | |
See http://stackoverflow.com/questions/3025162/statistics-combinations-in-python | |
""" | |
if 0 <= k <= n: | |
ntok = 1 | |
ktok = 1 | |
for t in xrange(1, min(k, n - k) + 1): | |
ntok *= n |
I currently use Python for nearly all of my data science and wrangling work these days but usually find myself switching to R to visualize data using ggplot2. This is due in part to ggplot2's general excellence, but also because I had a lot of trouble learning Python's most popular viz library, matplotlib on my own...its homepage is decent enough...but its variety of plotting APIs (--pylab? OOP? %matplotlib
???) has led to widely differing examples and best practices among the many online matplotlib guides (not dissimilar to the general problem of trying to practice either Python 2.x or 3.x).
That changed yesterday when I stumbled across [Nicolas P. Rougier's beautifully designed and com
import matplotlib.pyplot as plt | |
import pandas as pd | |
import datashader as ds | |
import datashader.transfer_functions as tf | |
from datashader.colors import Hot | |
time_period = 60 |