معرفی شرکت ها


circular-queue-0.0.3


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

A pythonic implementation of a circular queue
ویژگی مقدار
سیستم عامل -
نام فایل circular-queue-0.0.3
نام circular-queue
نسخه کتابخانه 0.0.3
نگهدارنده []
ایمیل نگهدارنده []
نویسنده -
ایمیل نویسنده Gui Luz <salgl@yahoo.com.br>
آدرس صفحه اصلی -
آدرس اینترنتی https://pypi.org/project/circular-queue/
مجوز -
# Circular Queue ### A pythonic implementation of the beloved data structure Circular Queue is an object that can be used whenever you need to connect the head of an iterable to its tail. It can be easily connected to a database in order to persist your queue rotation. ##### Installation ``` pip install circular-queue ``` ##### How to use After cloning the repo, you can import the **CircularQueue** class to your project: ```python3 from circular_queue import CircularQueue ``` You can instantiate the **CircularQueue** object passing a **queue** an a **pointer** as arguments: ```python3 mylist = ['Banana', 'Star Fruit', 'Apple', 'Orange', 'Avocado'] pointer = 'Apple' myqueue = CircularQueue(mylist, pointer) ``` Now you have two methods at your disposal: **get_next_element** and **get_previous_element**: ```python3 myqueue.get_next_element() >>> 'Orange' myqueue.get_next_element() >>> 'Avocado' myqueue.get_next_element() >>> 'Banana' myqueue.get_previous_element() >>> 'Avocado' ``` If you need to get a batch of elements you can use the get_batch method like so: ```python3 mylist = ['Banana', 'Star Fruit', 'Apple', 'Orange', 'Avocado'] pointer = 'Banana' batch_size = 3 myqueue = CircularQueue(mylist, pointer) myqueue.get_batch(batch_size) >>> ['Star Fruit', 'Apple', 'Orange'] ```` You can also get batch elements in queue rotating to the left: ```python3 myqueue.get_batch(batch_size, rotation='left') >>> ['Orange', 'Apple', 'Star Fruit'] ```


زبان مورد نیاز

مقدار نام
>=3.0 Python


نحوه نصب


نصب پکیج whl circular-queue-0.0.3:

    pip install circular-queue-0.0.3.whl


نصب پکیج tar.gz circular-queue-0.0.3:

    pip install circular-queue-0.0.3.tar.gz