Last Update: May 13, 2019
Offline Version
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
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
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
# -*- coding: utf-8 -*- | |
# -*- mode: python -*- | |
# Adapted from mpl_toolkits.axes_grid1 | |
# LICENSE: Python Software Foundation (http://docs.python.org/license.html) | |
from matplotlib.offsetbox import AnchoredOffsetbox | |
class AnchoredScaleBar(AnchoredOffsetbox): | |
def __init__(self, transform, sizex=0, sizey=0, labelx=None, labely=None, loc=4, | |
pad=0.1, borderpad=0.1, sep=2, prop=None, barcolor="black", barwidth=None, | |
**kwargs): |
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
<Multi_key> <space> <a> : "α" U03B1 # GREEK SMALL LETTER ALPHA | |
<Multi_key> <a> <space> : "α" U03B1 # GREEK SMALL LETTER ALPHA | |
<Multi_key> <space> <b> : "β" U03B2 # GREEK SMALL LETTER BETA | |
<Multi_key> <b> <space> : "β" U03B2 # GREEK SMALL LETTER BETA | |
<Multi_key> <space> <c> : "ξ" U03BE # GREEK SMALL LETTER XI | |
<Multi_key> <c> <space> : "ξ" U03BE # GREEK SMALL LETTER XI | |
<Multi_key> <space> <d> : "δ" U03B4 # GREEK SMALL LETTER DELTA | |
<Multi_key> <d> <space> : "δ" U03B4 # GREEK SMALL LETTER DELTA | |
<Multi_key> <space> <e> : "ε" U03B5 # GREEK SMALL LETTER EPSILON | |
<Multi_key> <e> <space> : "ε" U03B5 # GREEK SMALL LETTER EPSILON |
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 scipy.spatial.distance import pdist, squareform | |
import numpy as np | |
from numbapro import jit, float32 | |
def distcorr(X, Y): | |
""" Compute the distance correlation function | |
>>> a = [1,2,3,4,5] | |
>>> b = np.array([1,2,9,4,4]) |
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
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
basic CSS template for A4 print
Forked from rafaelcastrocouto's Pen A4 CSS page template.
A Pen by Dermot McGuire on CodePen.
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.
OlderNewer