A toy example of Juttle that illustrates how far one can push on the modularity of subgraphs...
This file contains 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
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"io" | |
"math/rand" | |
"time" |
This file contains 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
% zq -Z "sample" zed-sample-data/zng/*.gz | |
{ | |
sample: { | |
_path: "conn", | |
ts: 2018-03-24T17:15:21.255387Z, | |
uid: "C8Tful1TvM3Zf5x8fl" (bstring), | |
id: { | |
orig_h: 10.164.94.120, | |
orig_p: 39681 (port=(uint16)), |
This file contains 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
license: gpl-3.0 |
This file contains 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
license: gpl-3.0 |
This file contains 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
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
"github.com/tjarratt/babble" | |
) |
This file contains 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
const scale = 0.9; | |
emitter -hz 20 -limit 1000 | ( | |
put first=Math.sin(scale*2*Math.PI*Date.unixms(time)/1000.) | | |
put third=Math.sin(1.25*scale*2*Math.PI*Date.unixms(time)/1000.) | | |
put fifth=Math.sin(1.5*scale*2*Math.PI*Date.unixms(time)/1000.) | | |
( split 'first','third','fifth' | @timechart ; | |
put value=first+third+fifth | keep time,value | | |
@timechart -title 'major chord' ) | |
; | |
put first=Math.sin(scale*2*Math.PI*Date.unixms(time)/1000.) | |
This file contains 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
emitter -limit 5 | put message='Hello, world' | @table |
A simple example where we run multiple dice games, illustrating how modularity and subgraphs are helpful
Roll dice and compute a histogram displayed as a barchart.
NewerOlder