Git Product home page Git Product logo

floc_simulator's Introduction

FLoC Simulator

Command line FLoC simulator to calculate CohortID with using host list and cluster data.

Build and Run Demo

$ cd

$ cd demos/floc_sample/
ohtsu@opro:~/github/shigeki/floc_simulator/demos/floc_sample$ go build
$ go get
go: downloading golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4
$ go build
$ ./floc_sample host_list.json
domain_list: [nikkei.com hatenablog.com nikkansports.com yahoo.co.jp sponichi.co.jp cnn.co.jp floc.glitch.me ohtsu.org]
sim_hash: 779363756518407
cohortId: 21454

Input json file of host list for history data is needed to run. See host_list.json file in this repo.

Comuputed result below shows the same cohort Id as Chromium that has the history of servers included in host_list.json. This is only tested in the FLoC version of "Chrome 2.1".

Notes on a domain list when you compare the cohort ID between Chrome and floc_simulator

Chrome requires the following requirements for the domain list in your browsing histories. Please be sure if your domain list for this simulator meets them when you compare the result of cohort Id between Chrome and floc_simulator. You need to use the exact same domain list as that used in Chrome.

// computation. The history entry is eligible for floc computation if all of the
// following conditions hold:
// 1) the IP of the navigation was publicly routable.
// 2) the interest-cohort permissions policy in the main document allows the
// floc history inclusion.
// 3) either the page has an ad resource, or the document.interestCohort API is
// used in the page.

References

floc_simulator's People

Contributors

shigeki avatar jfoote avatar wogboy69afk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.