Coder Social home page Coder Social logo

alebianco / lib-aoc Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 500 KB

collection of utilities to play with Advent of Code and other coding puzzles

License: The Unlicense

Shell 0.15% JavaScript 99.85%
advent-of-code coding-challenges modern-javascript nodejs utility-library

lib-aoc's Introduction

Lib AOC

NPM Package Version License JavaScript Style Guide

A growing collection of utilities to partecipate in Advent of Code and other coding puzzles.

Getting Started

Prerequisites

Installation

npm install https://github.com/alebianco/lib-aoc

Usage

...

Roadmap

See the open issues for a list of proposed features (and known issues).

Support

Reach out to the maintainer at one of the following places:

Project assistance

If you want to say thank you or/and support active development of lib-aoc:

  • Add a GitHub Star to the project.
  • Tweet Toot about lib-aoc.
  • Write interesting articles about the project on Dev.to, Medium or your personal blog.

Together, we can make lib-aoc better!

Contributing

First off, thanks for taking the time to contribute! Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are greatly appreciated.

Please read our contribution guidelines, and thank you for being involved!

Authors & contributors

The original setup of this repository is by Alessandro Bianco.

For a full list of all authors and contributors, see the contributors page.

Security

lib-aoc follows good practices of security, but 100% security cannot be assured. lib-aoc is provided "as is" without any warranty. Use at your own risk.

For more information and to report security issues, please refer to our security documentation.

License

This project is distributed under the Unlicense License.

See LICENSE.txt for more information.

Acknowledgments

The itertools package is heavily inspired by:

lib-aoc's People

Contributors

alebianco avatar

Watchers

 avatar

lib-aoc's Issues

feat: itertools method whishlist

Feature Request

Describe the Feature Request

Implement a comprehensive set of methods, analogous to other languages/libraries implementations.

Additional Context

Personal additions

  • naturals
  • evens
  • odds
  • fork
  • symmetricDifference

From TC39 proposal

  • map
  • filter
  • take
  • drop
  • flatMap
  • reduce
  • toArray
  • forEach
  • some
  • every
  • find
  • from

From itertools.js

  • Ports of builtins

    • all ➡️ every
    • any ➡️ some
    • contains
    • enumerate
    • filter 🚫 eager version
    • iter
    • map 🚫 eager version
    • max
    • min
    • range
    • reduce
    • reduce_ 🚫
    • sorted
    • sum
    • zip 🚫 eager version
    • zip3 🚫 eager version
  • Port of itertools

    • chain
    • compress 🚫 eager version
    • count
    • cycle
    • dropwhile
    • groupby
    • icompress
    • ifilter ➡️ filter
    • imap ➡️ map
    • islice ➡️ slice
    • izip
    • izip3
    • izipLongest
    • izipMany
    • permutations
    • repeat
    • takewhile
    • zipLongest 🚫 eager version
    • zipMany 🚫 eager version
  • Ports of more-itertools

    • chunked
    • flatten
    • intersperse
    • itake ➡️ take
    • pairwise
    • partition
    • roundrobin
    • heads
    • take 🚫 eager version
    • uniqueEverseen
    • uniqueJustseen
  • Additions

    • compact 🚫 eager version
    • compactObject 🚫
    • first
    • flatmap
    • icompact

From Python itertools

  • count
  • cycle
  • repeat
  • accumulate
  • chain
  • chain.from_iterable ➡️ chain
  • compress
  • dropwhile
  • filterfalse
  • groupby
  • islice ➡️ slice
  • pairwise
  • starmap 🚫
  • takewhile
  • tee
  • zip_longest
  • product 1
  • permutations 1 2
  • combinations
  • combinations_with_replacement

From Python more-itertools

  • Grouping

    • chunked
    • ichunked
    • chunked_even
    • sliced
    • constrained_batches
    • distribute
    • divide
    • split_at
    • split_before
    • split_after
    • split_into
    • split_when
    • bucket
    • unzip
    • batched
    • grouper
    • partition
  • Lookahead and lookback

    • spy
    • peekable
    • seekable
  • Windowing

    • windowed
    • substrings
    • substrings_indexes
    • stagger
    • windowed_complete
    • pairwise
    • triplewise
    • sliding_window
    • subslices
  • Augmenting

    • count_cycle
    • intersperse
    • padded
    • repeat_each
    • mark_ends
    • repeat_last
    • adjacent
    • groupby_transform
    • pad_none
    • ncycles
  • Combining

    • collapse
    • sort_together
    • interleave
    • interleave_longest
    • interleave_evenly
    • zip_offset
    • zip_equal
    • zip_broadcast
    • dotproduct
    • convolve
    • flatten
    • roundrobin
    • prepend
    • value_chain ➡️ chain
  • Summarizing

    • ilen
    • unique_to_each
    • sample
    • consecutive_groups
    • run_length
    • map_reduce
    • exactly_n
    • is_sorted
    • all_equal
    • all_unique
    • minmax
    • first_true
    • quantify
    • iequals ➡️ equals
  • Selecting

    • islice_extended first ➡️ slice
    • first ➡️ take(_, 1)
    • last ➡️ tail(_, 1)
    • one
    • only
    • strictly_n
    • strip
    • lstrip
    • rstrip
    • filter_except
    • map_except
    • nth_or_last
    • unique_in_window
    • before_and_after
    • nth
    • take
    • tail
    • unique_everseen
    • unique_justseen
    • duplicates_everseen
    • duplicates_justseen
    • longest_common_prefix
  • Combinatorics

    • distinct_permutations
    • distinct_combinations
    • circular_shifts
    • partitions
    • set_partitions
    • product_index
    • combination_index
    • permutation_index
    • powerset
    • random_product
    • random_permutation
    • random_combination
    • random_combination_with_replacement
    • nth_product
    • nth_permutation
    • nth_combination
  • Wrapping

    • always_iterable
    • always_reversible
    • countable
    • consumer
    • with_iter
    • iter_except
  • Others

    • locate
    • rlocate
    • replace
    • numeric_range ➡️ range
    • side_effect ➡️ forEach
    • iterate
    • difference
    • make_decorator 🚫
    • SequenceView 🚫
    • time_limited
    • map_if
    • consume
    • tabulate
    • repeatfunc
    • polynomial_from_roots
    • sieve

From Rust

  • functions

    • all ➡️ every
    • any ➡️ some
    • assert_equal 🚫
    • chain
    • cloned 🚫
    • concat
    • cons_tuples
    • diff_with
    • enumerate
    • equal
    • fold
    • interleave
    • intersperse
    • intersperse_with
    • iterate
    • join
    • kmerge
    • kmerge_by
    • max
    • merge
    • merge_join_by
    • min
    • multipeek
    • multiunzip
    • multizip
    • partition
    • peek_nth
    • process_results 🚫
    • put_back
    • put_back_n
    • rciter 🚫
    • repeat_callDeprecated
    • repeat_n ➡️ repeat
    • rev
    • sorted
    • unfold
    • zipDeprecated
    • zip_eq
  • Iterator trait

    • all_equal
    • all_unique
    • at_most_one
    • batching
    • cartesian_product
    • chunks
    • circular_tuple_windows
    • coalesce
    • collect_tuple 🚫
    • collect_vec ➡️ toArray
    • combinations
    • combinations_with_replacement
    • concat
    • contains
    • counts
    • counts_by
    • dedup
    • dedup_by
    • dedup_by_with_count
    • dedup_with_count
    • dropping ➡️ drop
    • dropping_back ➡️ forget
    • duplicates
    • duplicates_by
    • exactly_one
    • filter_map_ok
    • filter_ok ➡️ filter
    • find_or_first
    • find_or_last
    • find_position ➡️ find (sort of)
    • flatten_ok
    • fold1
    • fold_ok
    • fold_options
    • fold_results
    • fold_while
    • foreach
    • format
    • format_with
    • group_by
    • interleave
    • interleave_shortest
    • intersperse
    • intersperse_with
    • into_group_map
    • into_group_map_by
    • into_grouping_map
    • into_grouping_map_by
    • join
    • k_smallest
    • kmerge
    • kmerge_by
    • map_into
    • map_ok
    • map_results
    • max_set
    • max_set_by
    • max_set_by_key
    • merge
    • merge_by
    • merge_join_by
    • min_set
    • min_set_by
    • min_set_by_key
    • minmax
    • minmax_by ➡️ minmax
    • minmax_by_key ➡️ minmax
    • multi_cartesian_product
    • multipeek
    • multiunzip
    • 9_tuple
    • pad_using
    • partition_map
    • partition_result
    • peeking_take_while
    • permutations
    • position_max
    • position_max_by
    • position_max_by_key
    • position_min
    • position_min_by
    • position_min_by_key
    • position_minmax
    • position_minmax_by
    • position_minmax_by_key
    • positions
    • powerset
    • product1
    • set_from
    • sorted
    • sorted_by ➡️ sorted
    • sorted_by_cached_key 🚫
    • sorted_by_key ➡️ sorted
    • sorted_unstable 🚫
    • sorted_unstable_by 🚫
    • sorted_unstable_by_key 🚫
    • step
    • sum1
    • take_while_ref
    • tee
    • tree_fold1
    • try_collect ➡️ toArray (sort of)
    • tuple_combinations
    • tuple_windows
    • tuples
    • unique
    • unique_by
    • update ➡️ map
    • while_some
    • with_position
    • zip_eq
    • zip_longest

From C#

  • Aggregate ➡️ reduce
  • All ➡️ every
  • Any ➡️ some
  • Append
  • AsEnumerable 🚫
  • Average
  • Cast 🚫
  • Chunk
  • Concat ➡️ chain
  • Contains
  • Count
  • DefaultIfEmpty
  • Distinct
  • DistinctBy
  • ElementAt
  • ElementAtOrDefault
  • Empty
  • Except ➡️ difference
  • ExceptBy
  • First ➡️ take(_, 1)
  • FirstOrDefault
  • GroupBy
  • GroupJoin
  • Intersect
  • IntersectBy
  • Join
  • Last ➡️ tail(_, 1)
  • LastOrDefault
  • LongCount
  • Max
  • MaxBy ➡️ max
  • Min
  • MinBy ➡️ min
  • OfType ➡️ filter
  • Order ➡️ sorted
  • OrderBy ➡️ sorted
  • OrderByDescending ➡️ sorted
  • OrderDescending ➡️ sorted
  • Prepend
  • Range
  • Repeat
  • Reverse
  • Select ➡️ map
  • SelectMany ➡️ flatMap
  • SequenceEqual ➡️ equals
  • Single ➡️ find
  • SingleOrDefault
  • Skip ➡️ drop
  • SkipLast ➡️ forget
  • SkipWhile
  • Sum
  • Take
  • TakeLast ➡️ tail
  • TakeWhile
  • ThenBy 🚫
  • ThenByDescending 🚫
  • ToArray
  • ToDictionary 🚫
  • ToHashSet 🚫
  • ToList ➡️ toArray
  • ToLookup 🚫
  • TryGetNonEnumeratedCount
  • Union
  • UnionBy
  • Where ➡️ filter
  • Zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.