pyrangelist
Hello Jerry
This is my work for the take home interview. I'm not a JS guy. But if Jerry wants to take data science seriously, I will help you build the best infrastructure for it.
The package has 100% test coverage and has 10/10 pylint score, and it is stress-tested with 100k random add/remove operations.
Intstallation
pip install pyrangelist
Developer guide
Intall
python setup.py develop
As customary, pinned requirements are in the requirements.txt.
Test
python -m pytest
About
This version uses intervaltree library under the hood.
A more efficient implementation would be a modified B-tree structure that would keep ranges as values,
as well as keep the minimum and maximum value of the subtree for each edge. This would allow deletion
and addition to be O(long(n) + m), where n is the number of ranges currently stored and m is the
number of ranges that the new range overlaps with. However, from the task description it didn't seem
like you guys were looking for maximum efficiency, so I focused my efforts elsewhere. The current implementation
is sub-optimal: O(long(n) * m)
Metadata
Release files for pyrangelist 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyrangelist-0.1.2.tar.gz | 8.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyrangelist-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.3 kB
Release files / pyrangelist-0.1.2.tar.gz
| Download URL | pyrangelist-0.1.2.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1cd80753898302b7082a1eaa7d4edbef617fa7f6f92faa4130649c1ff8fd6eef
|
|
BLAKE2b-256 checksum How to use checksums |
0983eb64d231b53870b79a78e6babf985d7a99eda565094d1900adc4afcf0568
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5
|
Release files / pyrangelist-0.1.2-py3-none-any.whl
| Download URL | pyrangelist-0.1.2-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db3672506363f1c6842a471858813fd966816dbe02915987153141ef95f4616a
|
|
BLAKE2b-256 checksum How to use checksums |
501c29fd6cad698fb8c00b32bf619042b7d24ff7b6ecdbaa3000ec41fe2271f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5
|