Skip to content

Instantly share code, notes, and snippets.

View Bezoar's full-sized avatar

Mark Welch Bezoar

  • Portland, Oregon, US
View GitHub Profile
@Bezoar
Bezoar / round_robin_zip.py
Last active January 14, 2019 22:53
Round robin with multiple iterators
def round_robin_zip(*args):
"""
Make an iterator that aggregates elements from each of the iterables.
If the iterables are of uneven length, shorter iterables are re-iterated.
Iteration continues until the longest iterable is exhausted.
Derived from itertools.zip_longest().
"""
iterators = [iter(it) for it in args]
orig_iterators = set(iterators)
@Bezoar
Bezoar / keybase.md
Created April 11, 2017 23:27
Keybase proof

Keybase proof

I hereby claim:

  • I am bezoar on github.
  • I am bezoar (https://keybase.io/bezoar) on keybase.
  • I have a public key ASDPI7L4xK8EWl-CClB3ijRvoD9AQGphlZPrdhRQvrMmywo

To claim this, I am signing this object:

Verifying that +bezoar is my openname (Bitcoin username). https://onename.io/bezoar