Codebase list golang-github-beorn7-perks / de68c24
Merge branch 'master' into debian/jessie-backports Martín Ferrari 7 years ago
8 changed file(s) with 86 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
0 .pc
0 *.test
1 *.prof
0 Copyright (C) 2013 Blake Mizerany
1
2 Permission is hereby granted, free of charge, to any person obtaining
3 a copy of this software and associated documentation files (the
4 "Software"), to deal in the Software without restriction, including
5 without limitation the rights to use, copy, modify, merge, publish,
6 distribute, sublicense, and/or sell copies of the Software, and to
7 permit persons to whom the Software is furnished to do so, subject to
8 the following conditions:
9
10 The above copyright notice and this permission notice shall be
11 included in all copies or substantial portions of the Software.
12
13 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
14 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
16 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
17 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
18 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
19 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0 golang-github-beorn7-perks (0.0~git20160804.0.4c0e845-1) unstable; urgency=medium
1
2 * New upstream snapshot.
3 * debian/control: Remove golang-go dependency from -dev package.
4 * debian/control: Replace golang-go with golang-any in Build-Depends.
5
6 -- Martín Ferrari <tincho@debian.org> Wed, 23 Nov 2016 15:06:45 +0100
7
8 golang-github-beorn7-perks (0.0~git20150223.0.b965b61-2) unstable; urgency=medium
9
10 * debian/control:
11 - Update Standards-Version with no changes.
12 - Update Vcs-* to use HTTPS.
13 - Improve package description.
14 - Add me and Tim to Uploaders.
15 * debian/rules:
16 - Do not install *everything*.
17
18 -- Martín Ferrari <tincho@debian.org> Sun, 19 Jun 2016 18:09:35 +0000
19
020 golang-github-beorn7-perks (0.0~git20150223.0.b965b61-1~bpo8+1) jessie-backports; urgency=medium
121
222 * Rebuild for jessie-backports.
11 Section: devel
22 Priority: extra
33 Maintainer: Debian Go Packaging Team <pkg-go-maintainers@lists.alioth.debian.org>
4 Uploaders: Dmitry Smirnov <onlyjob@debian.org>, Tim Potter <tpot@hpe.com>
4 Uploaders: Dmitry Smirnov <onlyjob@debian.org>,
5 Tim Potter <tpot@hpe.com>,
6 Martín Ferrari <tincho@debian.org>
57 Build-Depends: debhelper (>= 9),
68 dh-golang (>= 1.17~),
7 golang-go
8 Standards-Version: 3.9.6
9 golang-any,
10 Standards-Version: 3.9.8
911 Homepage: https://github.com/beorn7/perks
1012 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-go/packages/golang-github-beorn7-perks.git
11 Vcs-Git: git://anonscm.debian.org/pkg-go/packages/golang-github-beorn7-perks.git
13 Vcs-Git: https://anonscm.debian.org/git/pkg-go/packages/golang-github-beorn7-perks.git
1214 XS-Go-Import-Path: github.com/beorn7/perks
1315
1416 Package: golang-github-beorn7-perks-dev
1517 Architecture: all
16 Depends: ${shlibs:Depends},
17 ${misc:Depends},
18 golang-go
18 Depends: ${misc:Depends},
19 ${shlibs:Depends},
1920 Description: effective computation of things
20 Perks contains the Go package quantile that computes approximate quantiles
21 over an unbounded data stream within low memory and CPU bounds.
21 This is a fork of github.com/bmizerany/perks (now unmaintained).
22 The package contains:
23 * github.com/beorn7/perks/histogram: a Go implementation of BigML's histogram
24 package for Clojure/Java.
25 * github.com/beorn7/perks/quantile: computes approximate quantiles over an
26 unbounded data stream within low memory and CPU bounds.
0 README.md
00 #!/usr/bin/make -f
11
2 export DH_GOLANG_INSTALL_ALL := 1
2 export DH_GOLANG_INSTALL_EXTRA := quantile/exampledata.txt
33
44 %:
55 dh $@ --buildsystem=golang --with=golang
132132 if l == 0 {
133133 return 0
134134 }
135 i := int(float64(l) * q)
135 i := int(math.Ceil(float64(l) * q))
136136 if i > 0 {
137137 i -= 1
138138 }
3232 for quantile, epsilon := range Targets {
3333 n := float64(len(a))
3434 k := int(quantile * n)
35 if k < 1 {
36 k = 1
37 }
3538 lower := int((quantile - epsilon) * n)
3639 if lower < 1 {
3740 lower = 1
98101 verifyPercsWithAbsoluteEpsilon(t, a, s)
99102 }
100103
104 func TestTargetedQuerySmallSampleSize(t *testing.T) {
105 rand.Seed(42)
106 s := NewTargeted(TargetsSmallEpsilon)
107 a := []float64{1, 2, 3, 4, 5}
108 for _, v := range a {
109 s.Insert(v)
110 }
111 verifyPercsWithAbsoluteEpsilon(t, a, s)
112 // If not yet flushed, results should be precise:
113 if !s.flushed() {
114 for φ, want := range map[float64]float64{
115 0.01: 1,
116 0.10: 1,
117 0.50: 3,
118 0.90: 5,
119 0.99: 5,
120 } {
121 if got := s.Query(φ); got != want {
122 t.Errorf("want %f for φ=%f, got %f", want, φ, got)
123 }
124 }
125 }
126 }
127
101128 func TestLowBiasedQuery(t *testing.T) {
102129 rand.Seed(42)
103130 s := NewLowBiased(RelativeEpsilon)