-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Enhancements for SageMath Cloud #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is sweet, thanks! I had some trouble giving it a test run on cloud.sagemath.com. I started an IPython notebook and entered:
and was told:
It looks like I'm goofing somewhere, can you tell where? It's been a couple years since I last ran sage!
would be super helpful for me. Thanks a bunch! |
Hi, I have just thrown this together in like 10 minutes and I've not checked it -- I assumed there will be QA anyways 😀 On cloud.sagemath.com are two different types of "notebooks". The IPython notebook is a little bit enhanced (real-time sync between all collaborators) and should not be affected by this patch in any way. I.e. it's working with a pure python. |
I've changed the second commit to be more Sage-idiomatic. |
Ok, I have checked that my latest code works in three different modes on Sagemath Cloud: Test Example:
It works in:
|
Very sweet! The RR, ZZ JSON encoder is great. I'm still having some trouble running the plotly.py in the cloud.sagemath Sage Worksheet. In particular, I can't get the requests library imported. I tried:
2 - Making a new sage worksheet and running
and got an import error
Any ideas? Thx a bunch! |
Hi, the underlying "problem" might be, that this Sage process is only forked, not restarted. There is currently no provision to dynamically load newly installed libraries. So, maybe the red "reload" button inside the Sage Worksheet helps. If not, you have to go to the project specific settings ( 🔧 symbol ) and press the orange reload buttons (and then reload again). I don't remember having to install the requests library, but I've maybe done it a while ago in that project, which is dedicated just for testing stuff ❓ Sorry for the confusion, this still has its rough edges, but I hope you can imagine where it is heading at 😀 |
Cool, the big orange reload button did it. The plots look great in the worksheet (screenshot for those interested: http://grab.by/t3xC). Thanks for the help! I'll push out to PyPi this evening :) |
Enhancements for SageMath Cloud
I've added a fix to the existing
iplot()
function to make it work like in the IPython notebook. (I've also fixed the quite ugly line for the<iframe ... >
The other fix is for encoding "native" Sage number types to JSON (They are implicitly created when numbers like
42
or4.2
are entered in the Sage Notebook.)To test it, install it in a project at https://cloud.sagemath.com