Skip to content

Instantly share code, notes, and snippets.

View vyzo's full-sized avatar

vyzo vyzo

  • Internet
  • Planet Earth
View GitHub Profile
@vyzo
vyzo / gist:28599
Created November 24, 2008 20:38
gnuplotting with plt-scheme
(require (planet vyzo/gnuplot))
(define gplot (gnuplot-spawn))
;; data for x, x^2, 2^x
(define data
(gnuplot-data
(build-list 100
(lambda (x) (let ((x (/ x 10.))) (list x (expt x 2) (expt 2 x)))))))
;; on screen plot
(gnuplot-set gplot '(title (str "growth curves")))
(gnuplot-plot gplot
Verifying that "vyzobot.id" is my Blockstack ID. https://onename.com/vyzobot

Keybase proof

I hereby claim:

  • I am vyzo on github.
  • I am vyzo (https://keybase.io/vyzo) on keybase.
  • I have a public key whose fingerprint is 52EA BD85 D928 BC1F 947B DE52 8238 CB12 0B33 F66A

To claim this, I am signing this object:

> QmVphmdp5KR96eFfkKhMpQhFHAkKd6dNN5WZdxxh2pVPiy
/ip4/94.61.35.167/tcp/42567
/ip4/94.61.35.167/tcp/31259
/ip4/94.61.35.167/tcp/36500
/ip4/94.61.35.167/tcp/44829
/ip4/94.61.35.167/tcp/55275
/ip4/94.61.35.167/tcp/21907
/ip4/94.61.35.167/tcp/26017
/ip4/94.61.35.167/tcp/30412
/ip4/94.61.35.167/tcp/60288
@vyzo
vyzo / gist:449a1807de81750ae8c48b42618fb28d
Created September 25, 2017 07:55
Sort samples from gxprof.out
(import :std/sort)
(def (count-top samples)
(def ht (make-hash-table-eq))
(let lp ((rest samples))
(match rest
([[fun . _] . rest]
(hash-update! ht fun fx1+ 0)
(lp rest))
(else
(let (cs (hash->list ht))
@vyzo
vyzo / gist:a1ff49baeb38a1c63beeff217d537dc3
Created September 26, 2017 08:58
handleFindPeers duration: the long tail
handleFindPeer.duration.earth
19815440301
19870696458
19987011137
20097031234
20169467455
20319469901
20360774121
20520299326
21919976115
@vyzo
vyzo / gist:8133ba30063e2ae9cba06ff71ac88df5
Created September 27, 2017 08:51
SOL datastore get latency metrics
metrics/earth.metrics:ipfs_fsrepo_datastore_get_latency_seconds_bucket{le="0.0001"} 31141
metrics/earth.metrics:ipfs_fsrepo_datastore_get_latency_seconds_bucket{le="0.001"} 627542
metrics/earth.metrics:ipfs_fsrepo_datastore_get_latency_seconds_bucket{le="0.01"} 747686
metrics/earth.metrics:ipfs_fsrepo_datastore_get_latency_seconds_bucket{le="0.1"} 759388
metrics/earth.metrics:ipfs_fsrepo_datastore_get_latency_seconds_bucket{le="+Inf"} 761842
metrics/earth.metrics:ipfs_fsrepo_datastore_get_latency_seconds_sum 2167.0453676279717
metrics/earth.metrics:ipfs_fsrepo_datastore_get_latency_seconds_count 761842
metrics/jupiter.metrics:ipfs_fsrepo_datastore_get_latency_seconds_bucket{le="0.0001"} 211092
@vyzo
vyzo / l2r.ss
Last active November 13, 2017 09:15
l2r: left-to-right evaluation
(defsyntax (l2r stx)
(syntax-case stx ()
((_ fun arg ...)
(with-syntax (((tmp ...) (gentemps #'(arg ...))))
#'(let* ((tmp arg) ...)
(fun tmp ...))))))
(defsyntax (let-alist stx)
(syntax-case stx ()
((macro expr body ...)
(with-syntax ((alist-ref (stx-identifier #'macro '%%ref)))
#'(let (alist expr)
(let-syntax
((alist-ref
(lambda (stx)
(syntax-case stx ()
((_ id)
(defsyntax (let-alist stx)
(syntax-case stx ()
((macro expr body ...)
(with-syntax ((alist-ref (stx-identifier #'macro '%%ref)))
#'(let (alist expr)
(let-syntax
((var-ref
(syntax-rules ()
((_ id) (%%ref id)))))
(let-syntax