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
# IPython log file | |
from pyon.ion.stream import StandaloneStreamPublisher | |
from ion.services.dm.utility.granule_utils import time_series_domain | |
from ion.services.dm.utility.granule import RecordDictionaryTool | |
import numpy as np | |
import time | |
#params = ['time','temp'] |
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
import sys | |
import select | |
import gevent | |
def stdin_ready(): | |
infds, outfds, erfds = select.select([sys.stdin], [], [], 0) | |
if infds: | |
return True | |
else: | |
return False |
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
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 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
body { | |
font-family: Helvetica, arial, sans-serif; | |
font-size: 14px; | |
line-height: 1.6; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
background-color: white; | |
padding: 30px; } | |
body > *:first-child { |
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
#!/usr/bin/env ruby | |
couchdb = "http://localhost:5984/" | |
if ARGV[0] == 'admin' | |
couchdb = couchdb + '_utils/index.html' | |
exec 'open ' + couchdb | |
elsif ARGV[0] == 'wipe' | |
require 'couchrest' | |
cr = CouchRest.new('http://localhost:5984') |
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
import sys | |
import gevent | |
from gevent.monkey import patch_all; patch_all() | |
from gevent import server, event, socket | |
from multiprocessing import Process, current_process, cpu_count | |
""" | |
Simple multiprocess StreamServer that proxies messages between clients. | |
Avoids using a multiprocessing.Event since it blocks on a semaphore. |
NewerOlder