from numpy.oldnumeric.mlab import pi, cos, sin, arctan2, array, angle import types import write_style points = 0.0013000 inches = 72.27*points import scipy import scipy.signal as signal from __init__ import maxwidth as _maxwidth from __init__ import maxheight as _maxheight _dpi = 75 _hold = 0 _maxcolors=256 _textcolor=None gist.pldefault(dpi=_dpi,maxcolors=_maxcolors) # Get a directory that the user has write access to for # storing temporary *.gp and *.gs files import tempfile import os import sys # functions copied from weave.catalog def whoami(): """return a string identifying the user.""" return os.environ.get("USER") or os.environ.get("USERNAME") or "unknown" def create_dir(p): """ Create a directory and any necessary intermediate directories."""
#!/usr/bin/env python import rt import time import numpy import gist gist.pldefault(marks=0) n = 5000 t = 0.001 v = numpy.empty(n) for i in range(n): a = time.time() time.sleep(t) v[i] = time.time() - a print v.min(), v.max(), v.std() gist.plg(v, color="red") tt = long(1e9 * t) v = numpy.empty(n) rt.sched_setscheduler() time.sleep(1) for i in range(n): a = time.time() rt.clock_nanosleep(tt)
import numpy from numpy import ravel, reshape, repeat, arange, transpose, compress, \ where, ones, newaxis, asarray, pi, cos, sin, arctan2, array, angle import types import write_style points = 0.0013000 inches = 72.27*points from __init__ import maxwidth as _maxwidth from __init__ import maxheight as _maxheight _dpi = 75 _hold = 0 _maxcolors=256 _textcolor=None gist.pldefault(dpi=_dpi,maxcolors=_maxcolors) # Get a directory that the user has write access to for # storing temporary *.gp and *.gs files import tempfile import os import sys # functions copied from weave.catalog def whoami(): """return a string identifying the user.""" return os.environ.get("USER") or os.environ.get("USERNAME") or "unknown" def create_dir(p): """ Create a directory and any necessary intermediate directories."""