-
-
Save georgewsinger/d71d33a5a272aa5cc12b3fad240eb657 to your computer and use it in GitHub Desktop.
test.m
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
Attributes[remoteExecute] = {HoldAllComplete}; | |
remoteExecute[(*remote_,*)expr_] := | |
Module[{compressed = Compress[Unevaluated[expr]], | |
ubuntuBox = RemoteConnect["192.162.0.2", "username", "password"]}, | |
compressed = ExportString[ToString[Hold[expr], InputForm], "Base64"]; | |
ToExpression[ | |
RemoteRunProcess[ubuntuBox, | |
"wolframscript -format InputForm -code 'ReleaseHold[ImportString[\ | |
\"" <> Uncompress[compressed] <> "\",\"Base64\"]]'", | |
"StandardOutput"]]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment