Skip to content

Commit

Permalink
RST formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ikegami-yukino committed Nov 23, 2014
1 parent 8c56938 commit efd4917
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
6 changes: 2 additions & 4 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

CHANGES
=======
========

0.6 (2014-11-23)
----------------
Expand All @@ -11,8 +10,7 @@ CHANGES
- Change `filter()` methods param
- Support with-statement
- Implement increment-add from dict
- (e.g.) summed_sketch = sketch + dict
sketch += dict
- (e.g.) summed_sketch = sketch + dict; sketch += dict


0.5 (2014-04-08)
Expand Down
18 changes: 10 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ madoka
.. image:: https://travis-ci.org/ikegami-yukino/madoka-python.svg?branch=master
:target: https://travis-ci.org/ikegami-yukino/madoka-python
.. image:: https://coveralls.io/repos/ikegami-yukino/madoka-python/badge.png
:target: https://coveralls.io/r/ikegami-yukino/madoka-python
:target: https://coveralls.io/r/ikegami-yukino/madoka-python


Madoka is an implementation of a Count-Min sketch data structure for summarizing data streams.

Expand All @@ -17,7 +18,6 @@ Based on `madoka`_ C++ library.

NOTE: Madoka-Sketch does not have index of keys. so Madoka-Sketch can not dump all keys such as Python dict's `dict.keys()`.


Installation
============

Expand Down Expand Up @@ -47,7 +47,6 @@ For example, if you wants to count float data, it's preferable to choose Croquis
- CroquisUint64
- storing unsigned long long (64bit)


Usage
=====

Expand All @@ -56,6 +55,7 @@ But, Croquis classes have also same interfaces mostly.
So you can use other classes by the same way as Sketch class.
In that case, you should replace to intended class from "Sketch".


Create a new sketch
--------------------------------------------

Expand All @@ -64,11 +64,11 @@ Create a new sketch
>>> import madoka
>>> sketch = madoka.Sketch()


- Sketch madoka.Sketch([width=0, max_value=0, path='', flags=0, seed=0])

- Permission of file given to `path` should be 644
- `madoka.Sketch()` calls `madoka.Sketch.create()`, so you don't have to explicitly call `create() ` in initialization

- `madoka.Sketch()` calls `madoka.Sketch.create()`, so you don't have to explicitly call `create()` in initialization


Increment a key value
Expand Down Expand Up @@ -109,6 +109,7 @@ or
- Note that `key_length` is automatically determined when not giving `key_length`. Thus, the order of parameters differs from original madoka C++ library.



Update a key value
--------------------------------------------

Expand Down Expand Up @@ -207,7 +208,6 @@ Initialize a sketch with settings change

- Permission of file given to `path` should be 644


Copy a sketch
--------------------------------------------

Expand Down Expand Up @@ -246,6 +246,7 @@ Shrink a sketch
- void shrink(Sketch[, width=0, max_value=0, filter=None, path=None, flags=0])

- When width > 0, width must be less than source sketch

- Permission of file given to `path` should be 644


Expand All @@ -259,7 +260,7 @@ Get summed sketch
- Create summed sketch, So it does not break original sketches

Get summed sketch by dict
-----------------------
--------------------------

::

Expand Down Expand Up @@ -298,6 +299,7 @@ Apply filter into all values
- void filter(Callable[, apply_zerovalue=False])

- If apply_zerovalue = True, filter_method is applied also 0 values (It may be slow) (from version 0.6 or later)

- Note that processing time increases according to sketch's width. If you feel this method is slow, I recommend setting width to less than 1000000 when creating sketch

Set values from dict
Expand All @@ -317,6 +319,7 @@ or
- void fromdict(dict)



TODO
=========

Expand All @@ -331,4 +334,3 @@ License
- Wrapper code is licensed under New BSD License.
- Bundled `madoka`_ C++ library is licensed under the Simplified BSD License.


2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
author_email='[email protected]',
url='https://github.com/ikegami-yukino/madoka-python',
description = """Memory-efficient CountMin Sketch key-value structure (based on Madoka C++ library)""",
long_description = open('README.rst').read() + "\n\n" + open('CHANGES.rst').read(),
long_description = open('README.rst').read() + "\n" + open('CHANGES.rst').read(),

packages=['madoka'],
ext_modules=[
Expand Down

0 comments on commit efd4917

Please sign in to comment.