Skip to content
Snippets Groups Projects

add `.env.nu` to load Nushell modules

Merged STEVAN Antoine requested to merge add-nuenv-module-loading-file into main
2 files
+ 13
7
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -5,11 +5,12 @@ use ../../../.nushell plot [ into-axis-options, COMMON_OPTIONS, gplt ]
export def main [data: path, --save: path] {
check-file $data --span (metadata $data).span
let graphs = open $data
let raw = open $data
| where name !~ '^SEC'
| ns-to-ms $.times
| compute-stats $.times
| insert degree { get label | parse "degree {d}" | into record | get d | into int }
let graphs = $raw
| rename --column { degree: "x", mean: "y", stddev: "e" }
| select name x y e
| group-by name --to-table
@@ -19,11 +20,13 @@ export def main [data: path, --save: path] {
let options = [
# --title "time to create trusted setups for certain curves"
--x-label "degree"
--y-label "time (in ms)"
--x-label '$\log_2 d$'
# --y-label "time"
...($graphs.points | flatten | into-axis-options -x "plain" -y "duration")
...$COMMON_OPTIONS
(if $save != null { [ --save $save ] })
--x-tick-labels ($raw.degree | uniq | math log 2)
--x-ticks-rotation 0
]
gplt plot ($graphs | to json) ...($options | flatten | compact)
Loading