Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 hidden or 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 pylab import * | |
import scipy | |
from scipy import stats | |
from numba import vectorize, guvectorize, float64, jit, njit | |
@guvectorize(['void(float64[:], float64[:], float64[:])'], | |
'(i),(i)->()', | |
nopython=True | |
) |
This file contains hidden or 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
(if window-system | |
(tool-bar-mode -1) | |
(menu-bar-mode -1)) | |
(when (eq window-system 'ns) | |
(add-to-list 'default-frame-alist '(height . 80)) | |
(add-to-list 'default-frame-alist '(width . 132))) | |
(require 'package) | |
(setq package-enable-at-startup nil) | |
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) |
This file contains hidden or 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 proto import Proto, ProtoMeta | |
__metaclass__ = ProtoMeta | |
class A: | |
x = "This is X" | |
def getY(self): | |
return self._y | |
class B: | |
_y = "This is Y" |
This file contains hidden or 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
# gnerate Zipf distributed data as described in | |
# http://arxiv.org/abs/1407.7135 | |
# Zipf's law arises naturally in structured, high-dimensional data | |
# Laurence Aitchison, Nicola Corradi, Peter E. Latham | |
n <- 2**22 | |
k <- 20 | |
b <- rnorm(k, 1, 0.2) | |
data <- replicate(n, {z <- runif(1) | |
p <- (z^b) / (z^b + (1-z)^b) |