{"id":28458816,"url":"https://github.com/openmined/clojure-dp","last_synced_at":"2025-08-11T05:09:08.100Z","repository":{"id":103099636,"uuid":"264978750","full_name":"OpenMined/clojure-dp","owner":"OpenMined","description":null,"archived":false,"fork":false,"pushed_at":"2020-07-27T23:17:44.000Z","size":48,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-07-02T09:42:16.214Z","etag":null,"topics":["clojure","differential-privacy","jvm"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenMined.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"openmined","open_collective":"openmined"}},"created_at":"2020-05-18T15:18:42.000Z","updated_at":"2020-07-27T23:17:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"fdfd1837-18c3-4968-b654-bc5aac167ef5","html_url":"https://github.com/OpenMined/clojure-dp","commit_stats":{"total_commits":24,"total_committers":1,"mean_commits":24.0,"dds":0.0,"last_synced_commit":"29a8ef8d10029cb86edfa109bf5c8e0a39b39dda"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/OpenMined/clojure-dp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenMined%2Fclojure-dp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenMined%2Fclojure-dp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenMined%2Fclojure-dp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenMined%2Fclojure-dp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenMined","download_url":"https://codeload.github.com/OpenMined/clojure-dp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenMined%2Fclojure-dp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269832882,"owners_count":24482330,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clojure","differential-privacy","jvm"],"created_at":"2025-06-07T00:40:05.029Z","updated_at":"2025-08-11T05:09:08.075Z","avatar_url":"https://github.com/OpenMined.png","language":"Clojure","funding_links":["https://github.com/sponsors/openmined","https://opencollective.com/openmined"],"categories":[],"sub_categories":[],"readme":"# differential-privacy-clj\n![](https://github.com/OpenMined/clojure-dp/workflows/Tests/badge.svg)\n[![codecov](https://codecov.io/gh/OpenMined/clojure-dp/branch/master/graph/badge.svg)](https://codecov.io/gh/OpenMined/clojure-dp)\n\nA Clojure wrapper for the Java [differential-privacy library](https://github.com/google/differential-privacy).\n\nSee [online demo notebooks](https://mybinder.org/v2/gh/OpenMined/JavaDP/master/?filepath=%2Fdoc%2Fclojure).\n\n## Installation\n\nSteps to build it locally:\n\n1. Make sure you have [Maven](https://maven.apache.org/), [Bazel](https://docs.bazel.build/versions/master/install.html) and [Leiningen](https://leiningen.org/) installed.\n\n2. Download and build the Java [differential-privacy library](https://github.com/google/differential-privacy):\n```\ngit clone https://github.com/google/differential-privacy.git\ncd differential-privacy/java/\nbazel build \"...\"\n```\n\n3. Install `libdifferentialprivacy.jar` and `libsummary-proto-speed.jar` in your local Maven repository:\n\n```\nmvn install:install-file -Dfile=bazel-bin/main/com/google/privacy/differentialprivacy/libdifferentialprivacy.jar -DgroupId=com.google.privacy.differentialprivacy -DartifactId=libdifferentialprivacy -Dversion=1.0 -Dpackaging=jar\n\nmvn install:install-file -Dfile=bazel-bin/external/com_google_differential_privacy/proto/libsummary-proto-speed.jar -DgroupId=com.google.differentialprivacy -DartifactId=libsummary-proto-speed -Dversion=1.0 -Dpackaging=jar\n```\n\n4. Clone this repository and install the library:\n\n```\ngit clone https://github.com/OpenMined/clojure-dp.git\ncd clojure-dp\nlein install\n```\n\n## Usage\n\nSee [demo notebooks](https://github.com/OpenMined/JavaDP/tree/master/doc/clojure) ([run online](https://mybinder.org/v2/gh/OpenMined/JavaDP/master/?filepath=%2Fdoc%2Fclojure)).\n\nExamples:\n\n```clojure\n(require '[differential-privacy-clj.core :as dp])\n\n(def example-data (take 1000 (repeatedly #(rand 10.0))))\n\n(println \"True sum: \"\n         (reduce + example-data))\n(println \"DP sum:   \"\n         (dp/bounded-sum example-data :epsilon 0.1\n                         :lower 0 :upper 10\n                         :max-partitions-contributed 1))\n\n(println \"True count:\"\n         (count example-data))\n(println \"DP count:  \"\n         (dp/count example-data :epsilon 0.1\n                   :max-partitions-contributed 1))\n\n(println \"True mean:\" (/ (reduce + example-data)\n                         (count example-data)))\n(println \"DP mean:\" (dp/bounded-mean example-data :epsilon 0.1\n                                     :lower 0 :upper 10\n                                     :max-partitions-contributed 1\n                                     :max-contributions-per-partition 1))\n```\nwill print something like:\n```\nTrue sum:  4988.542973798648\nDP sum:    5175.075793958153\nTrue count: 1000\nDP count:   999\nTrue mean: 4.988542973798648\nDP mean: 5.002603661455349\n```\n\n## Available algorithms:\n\n:heavy_check_mark: - Supported :white_check_mark: - Planned\n\n| Algorithm          |                    |\n|--------------------|--------------------|\n| Count              | :heavy_check_mark: |\n| Sum                | :heavy_check_mark: |\n| Mean               | :heavy_check_mark: |\n| Variance           | :white_check_mark: |\n| Standard deviation | :white_check_mark: |\n| Order statistics (incl. min, max, and median) | :white_check_mark: |\n\n\n## Support\n\nFor support in using this library, please join the **#lib_dp_java** Slack channel. If you’d like to follow along with any code changes to the library, please join the **#code_dp_clojure** Slack channel. [Click here to join our Slack community!](https://slack.openmined.org)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenmined%2Fclojure-dp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenmined%2Fclojure-dp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenmined%2Fclojure-dp/lists"}