A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
# Option 1: Use apt-get | |
# keys taken from https://software.intel.com/en-us/articles/installing-intel-free-libs-and-python-apt-repo | |
cd ~/GitHub/r-with-intel-mkl/ | |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB | |
apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB | |
sudo sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list' | |
sudo apt-get update && sudo apt-get install intel-mkl-64bit |
" _____ __ __ _____ __________ _ ___ __ _ | |
" / ____| \/ |_ _|___ / __ \| \ | \ \ / / (_) | |
" | | | \ / | | | / / | | | \| |\ \_/ / ______ __ ___ _ __ ___ _ __ ___ | |
" | | | |\/| | | | / /| | | | . ` | \ / |______| \ \ / / | '_ ` _ \| '__/ __| | |
" | |____| | | |_| |_ / /_| |__| | |\ | | | \ V /| | | | | | | | | (__ | |
" \_____|_| |_|_____/_____\____/|_| \_| |_| \_/ |_|_| |_| |_|_| \___| | |
" | |
" | |
" 1. Easy navigation in .vimrc: | |
" Use <Leader>ig to view indentation guides |
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 |
Movies Recommendation:
Music Recommendation:
# Install rvm system-wide | |
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer ) | |
# Update the packages | |
apt-get update | |
apt-get upgrade | |
apt-get install build-essential | |
# get the packages required by ruby | |
rvm pkg install zlib |
# create stub, then run flask app in tornado on port 5000 (perhaps with supervisord config below http://supervisord.org/index.html) | |
#!/usr/bin/env python | |
from tornado.wsgi import WSGIContainer | |
from tornado.httpserver import HTTPServer | |
from tornado.ioloop import IOLoop | |
from myflaskapp import app | |
http_server = HTTPServer(WSGIContainer(app)) |