Skip to content
Browse files

Added some instructions

  • Loading branch information...
1 parent 743ce99 commit 33cd4ca42e0712e7c129635f2ccf28f94221a8c8 @ianozsvald ianozsvald committed Dec 10, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 README.rst
View
6 README.rst
@@ -4,11 +4,13 @@ Python implementation of the Hyper LogLog and Sliding Hyper LogLog cardinality c
Installation:
============
-Use `pip install hyperloglog` to install from PyPI.
+Use ``pip install hyperloglog`` to install from PyPI.
Usage:
=====
+::
+
import hyperloglog
hll = hyperloglog.HyperLogLog(0.01) # accept 1% counting error
hll.add("hello")
@@ -20,6 +22,8 @@ Usage:
If we add a further 1000 random strings (giving a total of 1002 strings) we'll have a count roughly within 1% of the true value, in this case it counts 1007 (within +/- 10.2 of the true value)
+::
+
# add 1000 random 30 char strings to hll
import random
import string

0 comments on commit 33cd4ca

Please sign in to comment.
Something went wrong with that request. Please try again.