Skip to content

Commit 3e4cb17

Browse files
committed
Make Clojure demo runnable online (mybinder)
1 parent 82618ec commit 3e4cb17

File tree

4 files changed

+26
-4
lines changed

4 files changed

+26
-4
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/OpenMined/org.openmined.dp/live_notebooks)
2+
13
# org.openmined.dp
24
Differential privacy implementation in the Java family of languages (Java, Kotlin, Scala etc...)
35

doc/clojure/ClojureCarrotsDemo.ipynb

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,15 +187,29 @@
187187
}
188188
],
189189
"source": [
190-
"%classpath config resolver mvnLocal\n",
191-
"\n",
192190
"%classpath add mvn com.google.protobuf protobuf-java 3.11.4\n",
193191
"%classpath add mvn org.apache.commons commons-math3 3.6.1\n",
194192
"%classpath add mvn com.google.guava guava 28.2-jre\n",
195193
"%classpath add mvn org.clojure data.csv 1.0.0\n",
196194
"\n",
197-
"%classpath add mvn com.google.privacy.differentialprivacy libdifferentialprivacy 1.0\n",
198-
"%classpath add mvn differential-privacy-clj differential-privacy-clj 0.1.1-SNAPSHOT\n",
195+
"\n",
196+
";; Download two jars from a server (temporary solution before release)\n",
197+
"%classpath add mvn commons-io commons-io 2.6\n",
198+
"(import (org.apache.commons.io FileUtils)\n",
199+
" (java.io File)\n",
200+
" (java.net URL))\n",
201+
"\n",
202+
"(def dpUrl \"http://replomancer.net/OpenMined/libdifferentialprivacy-1.0.jar\")\n",
203+
"(def dpFile (str (System/getProperty \"java.io.tmpdir\") \"/differentialprivacy-1.0.jar\"))\n",
204+
"(FileUtils/copyURLToFile (URL. dpUrl) (File. dpFile))\n",
205+
"%classpath add dynamic dpFile\n",
206+
"\n",
207+
"(def dp2Url \"http://replomancer.net/OpenMined/differential-privacy-clj-0.1.1-SNAPSHOT.jar\")\n",
208+
"(def dp2File (str (System/getProperty \"java.io.tmpdir\") \"/differential-privacy-clj-0.1.1-SNAPSHOT.jar\"))\n",
209+
"(FileUtils/copyURLToFile (URL. dp2Url) (File. dp2File))\n",
210+
"%classpath add dynamic dp2File\n",
211+
"\n",
212+
"\n",
199213
"\n",
200214
"(require '[clojure.data.csv :as csv]\n",
201215
" '[clojure.java.io :as io]\n",

environment.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: beakerx
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- numpy

postBuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
conda install beakerx

0 commit comments

Comments
 (0)