GitXplorerGitXplorer
D

RLE

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
7ef568bbeeda0fa742862565f324f11cbecab93d

Add recur2() and explanation for readers to understand the underlying logic

DDavidMertz committed 5 months ago
Unverified
e87999295d32ddda570e61a472d4b189364cea8f

Merge changes

DDavidMertz committed 5 months ago
Unverified
0bfa1da06dae5c7e107a7e7ffe4dd5824cde7ad6

Simplify and clarify recur() code

DDavidMertz committed 5 months ago
Verified
f219fecfc0e19a3eacbebd78fc1bdaa855d2e1de

More conformant spacing

DDavidMertz committed 5 months ago
Verified
a65a4269fd4dfc431cb454ff5cf2008d39b07e35

Update README.md

DDavidMertz committed 5 months ago
Unverified
63521171083e1316a2f4f3e23797c40c5bcb5449

Improve the README

DDavidMertz committed 5 months ago

README

The README file for this repository.

RLE

Simple Python module for run-length encoding iteratables.

from rle import rle_decode, rle_encode
orig = [1, 1, 1, 1, 2, 3, 4, 4, 3, 3, 3]
rle = [(1, 4), (2, 1), (3, 1), (4, 2), (3, 3)]
assert list(rle_encode(orig)) == rle
assert list(rle_decode(rle)) == orig

Fibonacci

Just for fun, throw in an infinite sequence.

<<<<<<< HEAD
from fib import recur
assert list(islice(recur(), 8)) == [1, 1, 2, 3, 5, 8, 13, 21]

No Copyright, Public Domain