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
from OpenGL import GL as gl | |
from OpenGL import GLUT as glut | |
from OpenGL.arrays import vbo | |
import numpy as np | |
from scipy.misc import lena | |
class TextureQuad2D(object): | |
def __init__(self, texdata, rect=(-1., -1., 1., 1.)): |
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 | |
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'): | |
""" |
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 | |
from scipy import stats | |
from itertools import combinations | |
from statsmodels.stats.multitest import multipletests | |
from statsmodels.stats.libqsturng import psturng | |
import warnings | |
def kw_nemenyi(groups, to_compare=None, alpha=0.05, method='tukey'): | |
""" |
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
# Copyright 2014 Alistair Muldal <[email protected]> | |
import numpy as np | |
import igraph | |
from itertools import izip, combinations, product | |
def bansal_shuffle(G, target_gcc, tol=1E-3, maxiter=None, inplace=True, | |
require_connected=False, seed=None, verbose=False): | |
r""" |
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
#!/usr/bin/env python | |
import numpy | |
from numpy.distutils.system_info import get_info | |
import sys | |
import timeit | |
print("version: %s" % numpy.__version__) | |
print("maxint: %i\n" % sys.maxsize) | |
info = get_info('blas_opt') |
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
def unique_rows(a, **kwargs): | |
rowtype = np.dtype((np.void, a.dtype.itemsize * a.shape[1])) | |
b = np.ascontiguousarray(a).view(rowtype) | |
return_index = kwargs.pop('return_index', False) | |
out = np.unique(b, return_index=True, **kwargs) | |
idx = out[1] | |
uvals = a[idx] | |
if (not return_index) and (len(out) == 2): |
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
#!/usr/bin/env python | |
import argparse | |
import subprocess | |
import re | |
import os | |
TYPECODES = ['\-', 'r', 'd', 'b', 'l', 'p', 's', 'w', 'v'] | |
DESCRIPTIONS = [ | |
'unknown type', |