FLoC
Introduction
This is a Python wrapper of this implementation for FLoC written in go!
It's easy to calculate the CohortID using this lib, see the example below:
>>> from floc import simulate
>>> host_list = [
... 'www.nikkei.com',
... 'jovi0608.hatenablog.com',
... 'www.nikkansports.com',
... 'www.yahoo.co.jp',
... 'www.sponichi.co.jp',
... 'www.cnn.co.jp',
... 'floc.glitch.me',
... 'html5.ohtsu.org',
... ]
>>> simulate(host_list)
21454
By default, we'll use the SortingLshClusters from FLoC's 1.0.6 version. If you want to use other, just pass it to the function:
>>> from floc import simulate
>>> host_list = [
... 'www.nikkei.com',
... 'jovi0608.hatenablog.com',
... 'www.nikkansports.com',
... 'www.yahoo.co.jp',
... 'www.sponichi.co.jp',
... 'www.cnn.co.jp',
... 'floc.glitch.me',
... 'html5.ohtsu.org',
... ]
>>> sorting_cluster_data = "" # READ THE DATA FROM SOMEWHERE
>>> simulate(host_list, sorting_cluster_data)
21454
We also expose some other functions, see the documentation here
Metadata
Release files for floc 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| floc-0.4.0.tar.gz | 4.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| floc-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.6 MB
Release files / floc-0.4.0.tar.gz
| Download URL | floc-0.4.0.tar.gz |
|---|---|
| Size | 4.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e3dcd13f7c6bae38b3217428e1963e90f11c227495aaa5a75bd6920b92c5e18b
|
|
BLAKE2b-256 checksum How to use checksums |
7447a7f91164e91d8968214379bef2d8ca78e115b6f3963f40897c9e5113b6ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.6 CPython/3.9.7 Linux/5.10.68-1-MANJARO
|
Release files / floc-0.4.0-py3-none-any.whl
| Download URL | floc-0.4.0-py3-none-any.whl |
|---|---|
| Size | 4.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
16d9031a44a90d3ac2c6ba4012a48fcf1deb82c6a8ff4a32bfc9ec0938a6d8a0
|
|
BLAKE2b-256 checksum How to use checksums |
cb5cb1a29b63cf38d22ab13a5662e481d5f58d83076c984dbe6c7978e1bf9c6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.6 CPython/3.9.7 Linux/5.10.68-1-MANJARO
|