Created
October 17, 2017 10:56
-
-
Save gigasquid/994181ca6719c658cd42d21626d26c32 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns graal-test.core | |
(:import (org.graalvm.polyglot Context))) | |
(def py-context (Context/create (into-array ["python"]))) | |
(.eval py-context "python" "print('Hello polyglot world Python!');") | |
(.eval py-context "python" " | |
import time; | |
time.clock() | |
") ;=> #object[org.graalvm.polyglot.Value 0x4a6b3b70 "1.508202803249E9"] | |
;;; This is what I would love to do!!! | |
(.eval py-context "python" " | |
import tensorflow as tf | |
hello = tf.constant('Hello, TensorFlow!') | |
sess = tf.Session() | |
print(sess.run(hello)) | |
") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment