#Non-mathematical Introductions
- http://gcn.com/articles/2014/01/09/topographical-data-analysis.aspx
- https://www.simonsfoundation.org/quanta/20131004-the-mathematical-shape-of-things-to-come/
#Videos
#Non-mathematical Introductions
#Videos
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| import sys | |
| from multiprocessing import Pool | |
| from random import random | |
| def calculate_pi(iters): | |
| """ Worker function """ | |
| points = 0 # points inside circle |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| #!/usr/bin/python | |
| def fair_share(scheduables, totalCapacity): | |
| print "demand:%s totalCapacity:%s" % (scheduables, totalCapacity) | |
| totalDemand = reduce(lambda a, b: int(a) + int(b), [x['demand'] for x in scheduables]) | |
| cap = min(totalDemand, totalCapacity) | |
| weightSlotRatio = 1.0 |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| #!/usr/bin/env python | |
| """Command line script to convert a file, usually an image, into a data URI | |
| for use on the web.""" | |
| import base64 | |
| import mimetypes | |
| import os | |
| import sys |