From 828b812e8d1e6636eff09de17c13712e976f6e43 Mon Sep 17 00:00:00 2001 From: Kristin Linn Date: Mon, 19 Oct 2015 15:31:40 -0400 Subject: [PATCH 1/3] add data file for histogram.py example --- README.markdown | 2 +- data_example.txt | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 data_example.txt diff --git a/README.markdown b/README.markdown index 7d2b02a..a2d8dcc 100644 --- a/README.markdown +++ b/README.markdown @@ -18,7 +18,7 @@ A utility that parses input data points and outputs a text histogram Example: - $ cat /tmp/data | histogram.py --percentage --max=1000 --min=0 + $ cat 'f = open('data_example.txt', 'w')\n for i in range(60):\n f.write(str(random.randint(0, 1000))+'\n')\n f.close()' | histogram.py --percentage --max=1000 --min=0 # NumSamples = 60; Min = 0.00; Max = 1000.00 # 1 value outside of min/max # Mean = 332.666667; Variance = 471056.055556; SD = 686.335236; Median 191.000000 diff --git a/data_example.txt b/data_example.txt new file mode 100644 index 0000000..88bb6c4 --- /dev/null +++ b/data_example.txt @@ -0,0 +1,60 @@ +576 +880 +41 +511 +206 +148 +185 +663 +57 +349 +978 +221 +541 +586 +694 +445 +569 +663 +335 +233 +425 +960 +168 +289 +400 +252 +65 +953 +606 +246 +60 +306 +775 +295 +34 +973 +134 +529 +678 +595 +567 +616 +607 +980 +212 +53 +286 +489 +676 +273 +229 +173 +745 +846 +175 +615 +504 +988 +288 +66 From c10de42e66090aa4d083f5d9cb302e4b62003e8a Mon Sep 17 00:00:00 2001 From: Kristin Linn Date: Mon, 19 Oct 2015 15:31:40 -0400 Subject: [PATCH 2/3] change data location to new file data_example.txt in histogram.py example --- README.markdown | 2 +- data_example.txt | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 data_example.txt diff --git a/README.markdown b/README.markdown index 7d2b02a..79fc545 100644 --- a/README.markdown +++ b/README.markdown @@ -18,7 +18,7 @@ A utility that parses input data points and outputs a text histogram Example: - $ cat /tmp/data | histogram.py --percentage --max=1000 --min=0 + $ cat data_example.txt | histogram.py --percentage --max=1000 --min=0 # NumSamples = 60; Min = 0.00; Max = 1000.00 # 1 value outside of min/max # Mean = 332.666667; Variance = 471056.055556; SD = 686.335236; Median 191.000000 diff --git a/data_example.txt b/data_example.txt new file mode 100644 index 0000000..88bb6c4 --- /dev/null +++ b/data_example.txt @@ -0,0 +1,60 @@ +576 +880 +41 +511 +206 +148 +185 +663 +57 +349 +978 +221 +541 +586 +694 +445 +569 +663 +335 +233 +425 +960 +168 +289 +400 +252 +65 +953 +606 +246 +60 +306 +775 +295 +34 +973 +134 +529 +678 +595 +567 +616 +607 +980 +212 +53 +286 +489 +676 +273 +229 +173 +745 +846 +175 +615 +504 +988 +288 +66 From b6f6c8f853a2b2b8c099c7695c804830222a5ac9 Mon Sep 17 00:00:00 2001 From: Kristin Linn Date: Mon, 19 Oct 2015 16:30:58 -0400 Subject: [PATCH 3/3] fix output for first example --- README.markdown | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/README.markdown b/README.markdown index 79fc545..9ee91cd 100644 --- a/README.markdown +++ b/README.markdown @@ -20,19 +20,18 @@ Example: $ cat data_example.txt | histogram.py --percentage --max=1000 --min=0 # NumSamples = 60; Min = 0.00; Max = 1000.00 - # 1 value outside of min/max - # Mean = 332.666667; Variance = 471056.055556; SD = 686.335236; Median 191.000000 + # Mean = 450.200000; Variance = 79226.560000; SD = 281.472130; Median 435.000000 # each ∎ represents a count of 1 - 0.0000 - 100.0000 [ 28]: ∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎ (46.67%) - 100.0000 - 200.0000 [ 2]: ∎∎ (3.33%) - 200.0000 - 300.0000 [ 2]: ∎∎ (3.33%) - 300.0000 - 400.0000 [ 8]: ∎∎∎∎∎∎∎∎ (13.33%) - 400.0000 - 500.0000 [ 8]: ∎∎∎∎∎∎∎∎ (13.33%) - 500.0000 - 600.0000 [ 7]: ∎∎∎∎∎∎∎ (11.67%) - 600.0000 - 700.0000 [ 3]: ∎∎∎ (5.00%) - 700.0000 - 800.0000 [ 0]: (0.00%) - 800.0000 - 900.0000 [ 1]: ∎ (1.67%) - 900.0000 - 1000.0000 [ 0]: (0.00%) + 0.0000 - 100.0000 [ 7]: ∎∎∎∎∎∎∎ (11.67%) + 100.0000 - 200.0000 [ 6]: ∎∎∎∎∎∎ (10.00%) + 200.0000 - 300.0000 [ 12]: ∎∎∎∎∎∎∎∎∎∎∎∎ (20.00%) + 300.0000 - 400.0000 [ 4]: ∎∎∎∎ (6.67%) + 400.0000 - 500.0000 [ 3]: ∎∎∎ (5.00%) + 500.0000 - 600.0000 [ 9]: ∎∎∎∎∎∎∎∎∎ (15.00%) + 600.0000 - 700.0000 [ 9]: ∎∎∎∎∎∎∎∎∎ (15.00%) + 700.0000 - 800.0000 [ 2]: ∎∎ (3.33%) + 800.0000 - 900.0000 [ 2]: ∎∎ (3.33%) + 900.0000 - 1000.0000 [ 6]: ∎∎∎∎∎∎ (10.00%) With logarithmic scale