Skip to main content

A lib to fit objects of different size into multiple baskets (of the same size) optimally. For example, use it to backup contents to CDs, DVDs, USB sticks, etc

Project description

basket_case

A lib to fit objects of different size into multiple baskets (of the same size) optimally.

For example, use it to backup contents to CDs, DVDs, USB sticks, etc.

Note: the name refers to a good horror film of the 80s

Repository

The lib code lives on gitlab at this address

Notes

As it can be seen below, the time of computation grows exponentially based on the number of objects in input:

$ python tests/timings.py

Run with params:
    NUM_OBJECTS=28
    FREQ_OVERSIZE=6
    BASKET_SIZE=100
    NUM_TIMINGS=10
    
Preserving input: 50.43828155000028
Without preserving input: 5.0550676299999395

$ python tests/timings.py 
Run with params:
    NUM_OBJECTS=29
    FREQ_OVERSIZE=6
    BASKET_SIZE=100
    NUM_TIMINGS=10
    
Preserving input: 99.51453974099968
Without preserving input: 9.925193711000247

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

basket_case_pynchia-0.1.0.tar.gz (31.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

basket_case_pynchia-0.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file basket_case_pynchia-0.1.0.tar.gz.

File metadata

  • Download URL: basket_case_pynchia-0.1.0.tar.gz
  • Upload date:
  • Size: 31.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.12.3 CPython/3.11.4

File hashes

Hashes for basket_case_pynchia-0.1.0.tar.gz
Algorithm Hash digest
SHA256 54d1f02fbdbaaae5e23764869ce709374de95f3b8ae0fab63dd3bdbb120bb5e0
MD5 52f8af51bc30d951e94a193513d94a58
BLAKE2b-256 aa805df6e79282695187a2494ed7c4eee126278300a5822bcbc2dd3566a36d0b

See more details on using hashes here.

File details

Details for the file basket_case_pynchia-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for basket_case_pynchia-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0ed299b8c5bc2f39f764611ccfd41f5cd410a00505778c2b85c3b2a37e11f024
MD5 921b021b3afb5deba0d7365ec0236c65
BLAKE2b-256 3a125027bce2bed557e759f4a28c1f0cdb4a49298fb5c61e11a53c5b1b7e09a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page