Skip to content

Instantly share code, notes, and snippets.

@ptocca
ptocca / DaskAWS-work.ipynb
Created June 17, 2020 14:58
Using dask-cloudprovider on AWS
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ptocca
ptocca / gist:c1adb171149bfdd23143722fa0e1b988
Last active November 28, 2017 20:30
Generate random variates with given correlation
# Paolo Toccaceli, 2017-11-28
import numpy as np
import scipy.stats as ss
def Iman_Conover(X_orig,S):
"""Given a matrix X_orig with n samples of random variables from r distributions and a correlation matrix S,
this function outputs a matrix of n samples of r random variables with the same marginal distributions
as the input, but with correlation as close as possible to S