Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thepabloaguilar/floc
A floc simulator wrapper over a Go implementation
https://github.com/thepabloaguilar/floc
floc machine-learning
Last synced: about 10 hours ago
JSON representation
A floc simulator wrapper over a Go implementation
- Host: GitHub
- URL: https://github.com/thepabloaguilar/floc
- Owner: thepabloaguilar
- License: mit
- Created: 2021-04-11T00:18:10.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-28T11:02:00.000Z (almost 3 years ago)
- Last Synced: 2024-09-18T14:32:14.630Z (15 days ago)
- Topics: floc, machine-learning
- Language: Go
- Homepage: https://floc.rtfd.io
- Size: 17.4 MB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# FLoC
---
## Introduction
This is a Python wrapper of [this](https://github.com/shigeki/floc_simulator) implementation for FLoC written in go!
It's easy to calculate the CohortID using this lib, see the example below:
```python
>>> 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:
```python
>>> 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](https://floc.readthedocs.io)