Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| 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 | 
| // set-up a connection between the client and the server | |
| var socket = io.connect(); | |
| // let's assume that the client page, once rendered, knows what room it wants to join | |
| var room = "abc123"; | |
| socket.on('connect', function() { | |
| // Connected, let's sign-up for to receive messages for this room | |
| socket.emit('room', room); | |
| }); | 
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| # taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
| # generate server.xml with the following command: | |
| # openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
| # run as follows: | |
| # python simple-https-server.py | |
| # then in your browser, visit: | |
| # https://localhost:4443 | |
| import BaseHTTPServer, SimpleHTTPServer | |
| import ssl | 
People
|   :bowtie: | ๐ :smile: | ๐ :laughing: | 
|---|---|---|
| ๐ :blush: | ๐ :smiley: | :relaxed: | 
| ๐ :smirk: | ๐ :heart_eyes: | ๐ :kissing_heart: | 
| ๐ :kissing_closed_eyes: | ๐ณ :flushed: | ๐ :relieved: | 
| ๐ :satisfied: | ๐ :grin: | ๐ :wink: | 
| ๐ :stuck_out_tongue_winking_eye: | ๐ :stuck_out_tongue_closed_eyes: | ๐ :grinning: | 
| ๐ :kissing: | ๐ :kissing_smiling_eyes: | ๐ :stuck_out_tongue: | 
| import matplotlib.pyplot as plt | |
| def draw_neural_net(ax, left, right, bottom, top, layer_sizes): | |
| ''' | |
| Draw a neural network cartoon using matplotilb. | |
| :usage: | |
| >>> fig = plt.figure(figsize=(12, 12)) | |
| >>> draw_neural_net(fig.gca(), .1, .9, .1, .9, [4, 7, 2]) | |
| { | |
| "env": { | |
| "browser": true, | |
| "node": true, | |
| "es6": true | |
| }, | |
| "plugins": ["react"], | |
| "ecmaFeatures": { | 
| # -*- coding: utf-8 -*- | |
| import sys | |
| import numpy | |
| numpy.seterr(all='ignore') | |
| ''' |