Ask Your Question

ted's profile - activity

2018-06-27 18:16:19 +0200 received badge  Notable Question (source)
2018-03-15 21:14:07 +0200 received badge  Popular Question (source)
2016-08-24 12:14:18 +0200 received badge  Notable Question (source)
2013-10-11 05:59:10 +0200 received badge  Popular Question (source)
2013-02-25 07:24:25 +0200 received badge  Popular Question (source)
2011-07-25 17:28:29 +0200 received badge  Nice Question (source)
2011-07-25 15:27:21 +0200 marked best answer sage, can't run command at notebook

execfile('/foo/bar.py') works for me. Check the path.

2011-07-21 16:23:13 +0200 asked a question sagenb no login needed?

Is there a way to start an instanace of Sagenb that is open to everyone on the network without a need to login?

2011-07-19 17:36:29 +0200 asked a question sage, can't run command at notebook

I have some Python scripts and I need to run them under notebook.

I run the scripts in %Sage -python <scriptname>.py. It works fine If I run it under sage shell by execfile('/foo/bar.py'). It works fine as well

But if I run execfile('/foo/bar.py') in Sage Notebook, it complains about

...cannot open shared object file: No such file or directory

It appears to me that the notebook can't find the lib. Does Sage and SageNB uses a separate Library-path and Run-path?

2011-07-15 15:33:44 +0200 asked a question [Updated] Sagenb via Simple Sage Server API

Hi!

I know Sage has a simple server API that you can start/moniter a Sage calculation via a terminal. But is there a way to use it to access existing Worksheets that are already in SageNB?

In reference to the Simple Server API here: http://www.sagemath.org/doc/reference...

2011-07-15 15:28:05 +0200 received badge  Scholar (source)
2011-07-15 15:28:05 +0200 marked best answer direct result on sagenb

You can pickle the resulting object and then read it into another Sage session, if that is your question.

For example, in the first Sage session:

sage: result = 42
sage: result.dumps()
'x\x9ck`J.NLO\xd5+\xca\xccK/\xd6\xcb\xcc+IMO-\xe2\xcaM\xccN\x8d\x87q\n\x19C\x99\x0c\x13[\x83\n\x99\xf4\x00\x88\x14\x0f\xc5'

Then you can load the pickled object in another session:

sage: loads('x\x9ck`J.NLO\xd5+\xca\xccK/\xd6\xcb\xcc+IMO-\xe2\xcaM\xccN\x8d\x87q\n\x19C\x99\x0c\x13[\x83\n\x99\xf4\x00\x88\x14\x0f\xc5')
42

For simplicity I used dumps/loads to save/load strings. If you have large objects you probably want to use dump/load and save the data to a file. Of course you need file system access on the Sage server, then.

2011-07-15 10:00:14 +0200 received badge  Editor (source)
2011-07-14 18:51:21 +0200 asked a question inter-mixing Sage and R

Updated: How well is compatibility with intermixing Sage code and R code? For instance, if I want to do:

f = r.read.table("bar.txt", row.names = NULL, header=T, sep=";") calling some sage function and prints some output

but it didn't work as Sage can't find the corresponding R "table" method. But I do %r and just use "read.table(...)", it works flawlessly. But I can't use the pass the R timeseries to Sage list.

Is there a better way around this?

2011-07-14 16:19:53 +0200 received badge  Student (source)
2011-07-14 11:55:54 +0200 received badge  Supporter (source)
2011-07-12 18:06:07 +0200 asked a question direct result on sagenb

I am running some lengthy calculations on the Sage Notebook, and I want to access them later on another client terminal that doesn't have a browser. Is there some ways you can "ask" the Sage Server and it gives the result? If not, is there a way to direct result to another client terminal?

Thanks,