Initial commit.
This commit is contained in:
21
cmd/calc/main.go
Normal file
21
cmd/calc/main.go
Normal file
@ -0,0 +1,21 @@
|
||||
// Rrea
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"smariot.com/complexity"
|
||||
)
|
||||
|
||||
func main() {
|
||||
entropy, count, err := complexity.Reader(os.Stdin)
|
||||
|
||||
fmt.Printf("read %d runes, entropy=%fb, average=%fb/rune\n", count, entropy, entropy/float32(count))
|
||||
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user