Skip to main content

DinarLib

What is this?

This library simplifies the code

Intersec

A method for finding intersections of an array

def intersec(a,b):
c = []
for element in a:
    if element in b:
        c.append(element)
return len(c)

Quick_sort

The most optimized array sorting

def partition(sort_nums, begin, end):
part = begin
for i in range(begin+1, end+1):
    if int(sort_nums[i][4]) <= int(sort_nums[begin][4]):
        part += 1
        sort_nums[i], sort_nums[part] = sort_nums[part], sort_nums[i]
sort_nums[part], sort_nums[begin] = sort_nums[begin], sort_nums[part]
return part
def quick_sort(sort_nums, begin=0, end=None):
    if end is None:
        end = len(sort_nums) - 1
    def quick(sort_nums, begin, end):
        if begin >= end:
            return
        part = partition(sort_nums, begin, end)
        quick(sort_nums, begin, part-1)
        quick(sort_nums, part+1, end)
    return quick(sort_nums, begin, end)

Random_sum

The maximum and the sum of the numbers are accepted as input Allows you to randomly collect numbers in an array that will equal the amount specified in the parameter

def random_sum(n, num_terms = None):
    num_terms = (num_terms or random.randint(2, n)) - 1
    a = random.sample(range(1, abs(n)), num_terms) + [0, abs(n)]
    list.sort(a)
    return [a[i+1] - a[i] for i in range(len(a) - 1)]

Developer

https://github.com/ShakhmametovDinar

Metadata

Release files for dinarlib 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dinarlib 0.0.2
File Size Uploaded Provenance
dinarlib-0.0.2.tar.gz 2.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for dinarlib 0.0.2
File Interpreter ABI Platform
dinarlib-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 5.3 kB

Release files / dinarlib-0.0.2.tar.gz

Download URL dinarlib-0.0.2.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
eae0cd7e89deab3c6bfb38b8d5a3655b33500c0c732c1a6558f2a9447628712d
BLAKE2b-256 checksum
How to use checksums
052aaefc43629c288eeb78b800f919e4c7df8980d1fd4fb70a06807d36e472b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.5

Release files / dinarlib-0.0.2-py3-none-any.whl

Download URL dinarlib-0.0.2-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10ada868db01368e6d25fe8b43d6514fd58347500376efa4919ecf5104c0a9b3
BLAKE2b-256 checksum
How to use checksums
84c15c2227d66be5c357733de792d3efdd43b549e49fd49e02869b5ca2848eab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.5

Security for dinarlib 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page