Ask Your Question

riemann's profile - activity

2017-08-15 12:02:01 -0500 received badge  Famous Question (source)
2016-07-01 17:02:17 -0500 received badge  Popular Question (source)
2016-04-12 13:24:20 -0500 received badge  Notable Question (source)
2014-06-28 20:14:54 -0500 marked best answer equivalent command in sage?

Hi!

I wonder if there an equivalent command in Sage that behaves like "manipulate" in Mathematica?

Thanks,

2014-06-28 20:14:54 -0500 marked best answer [Sage-4.7]SageNB returns no result

As a new sage user, I recently compiled Sage-4.7 from source and it runs smoothly in the command line. However, when I set up the sage notebook, the expression returns no result in browser For instance, if you enter 1+1, then click "Evaluate", the cell turns green but then it keeps running and never returns anything. The terminal displays the following:

sage: notebook(interface='', server_pool=['sage1@localhost'],                 
....: ulimit='-v 500000', secure=True, directory="/tmp/work", accounts=True)  
The notebook files are stored in: work.sagenb                                 
****************************************************                          
*                                                  *                          
* Open your web browser to https://localhost:8000  *                          
*                                                  *                          
****************************************************                          
There is an admin account.  If you do not remember the password,              
quit the notebook and type notebook(reset=True).                              
/tmp/work/sage-4.7/local/bin/sage-native-execute: line 8: firefox: command not
 found                                                                        
2011-06-20 13:50:09-0400 [-] Log opened.                                      
2011-06-20 13:50:09-0400 [-] twistd 9.0.0 (/tmp/work/sage-4.7/local/bin/python
 2.6.4) starting up.                                                          
2011-06-20 13:50:09-0400 [-] reactor class: twisted.internet.selectreactor.Sel
ectReactor.                                                                   
2011-06-20 13:50:09-0400 [-] twisted.web2.channel.http.HTTPFactory starting on
 8000                                                                         
2011-06-20 13:50:09-0400 [-] Starting factory <twisted.web2.channel.http.HTTPF
actory instance at 0x19ef35a8>

I tried checking the installation using make check and it is fine. Can someone give me some ideas on how to proceed?

Thanks so much!

Riemann

2014-03-27 14:28:25 -0500 received badge  Popular Question (source)
2013-09-18 03:21:07 -0500 received badge  Notable Question (source)
2013-02-03 15:29:07 -0500 received badge  Popular Question (source)
2012-06-18 20:33:04 -0500 received badge  Taxonomist
2011-07-22 03:13:00 -0500 marked best answer Change how sage full_output is displayed?

Right now, there's not a way to configure it from the notebook directly, but if you edit the source code in $SAGE_ROOT/devel/sagenb-main/sagenb/notebook/cell.py, you can change the following lines:

# Maximum number of characters allowed in output.  This is needed
# avoid overloading web browser.  For example, it should be possible
# to gracefully survive:
#    while True:
#       print "hello world"
# On the other hand, we don't want to lose the output of big matrices
# and numbers, so don't make this too small.
MAX_OUTPUT = 32000
MAX_OUTPUT_LINES = 120

to what you need.

2011-07-21 19:14:42 -0500 received badge  Nice Question (source)
2011-07-21 10:58:46 -0500 asked a question Change how sage full_output is displayed?

Hi!

I know if you are doing some calulations for Sage in a browser and if you have a long result, it will truncate the output and shows a link to "full_result.txt". Is there a way to change the threshold such that Sage will truncate the output for (let's say) more than 50 lines?

Thanks,

2011-07-14 12:56:57 -0500 received badge  Nice Question (source)
2011-07-14 05:14:42 -0500 marked best answer using sage "interact"

I don't think interact is currently designed to work this way -- according to the source file server/notebook/interact.py, it is still in an early version. I've tried a few ideas, and looked at how it determines which controls to draw, and I don't see a way to do this.

2011-07-12 10:38:17 -0500 marked best answer Location of Sage packages?

Try the shell command "sage -sh" and then "echo $PYTHONHOME" and "echo $PYTHONPATH". If this doesn't give enough information, have a look at this SO question about retreiving python module path from within python. You should be able to use that technique inside sage to find what you need.

Does this address your question, or have I misunderstood?

2011-07-12 07:38:06 -0500 asked a question Location of Sage packages?

Where does Sage store its Python packages?

2011-07-12 05:03:55 -0500 marked best answer SAGE modules

If you run sage -sh, then you can use easy_install to install whatever you want. If you have a source tarball and need to run python setup.py install, just do sage -python setup.py install and it will install it into Sage's Python environment.

2011-07-12 05:03:43 -0500 asked a question using sage "interact"

Is there some way to make sage "interact" to dynamically change the controls? For instance, based on the selection of radio button, the number of sliders controls will change accordingly in the 'interact'.

2011-07-06 10:10:45 -0500 asked a question SAGE modules

Hello! I am new to sage, how do you install new Python modules in Sage? This module can't be installed by easy_install and you need to do the following in the downloaded package

python setup.py install

But how do you install and use it in Sage?

2011-07-01 03:27:28 -0500 marked best answer [sagenb] load modules

You may be able to do this with a init.sage file. You would place any code you wanted evaluated ahead of time (such as attach foo.sage or implicit_multiplication(True) there, and it should work.

The precise location should be in your home directory, in a file named

.sage/init.sage

I think.

2011-06-30 05:02:41 -0500 asked a question [sagenb] load modules

How do you add existing Sage/Python Scripts as a module to the sagenb such that it loads automatically every it starts?

Thanks!

2011-06-29 03:05:54 -0500 marked best answer reuse scripts in Sage-NB

This is really easy, I'm pleased as punch that this actually works, I'd never tried it.

  • Create a file. I made foo.sage, whose entire content is g(x)=x^2. I put it in my home directory.
  • Do load("~/foo.sage"), or whatever is appropriate for where your script lives.
  • Enjoy!

This should work with .py files as well. It's conceivable that you'll need appropriate permissions, etc.

If you have custom data to use as well, the best thing to do is see if the DATA variable will do what you need. This is documented in the "Help" link at the top of the notebook, and it should be pretty easy to upload an appropriate data file there as need be.

2011-06-28 10:07:47 -0500 commented answer reuse scripts in Sage-NB

Thanks, it's much easier than I thought. That does work for all the *.py files and the data. Thanks for the help!

2011-06-28 08:49:43 -0500 asked a question reuse scripts in Sage-NB

Hi!

I have some existing Python scripts and data on a machine with Sage-NB running. The Python script takes in the data file as the argument. Is there a way to use them in the Sage-NB interface?

Thanks,

2011-06-23 09:51:02 -0500 marked best answer equivalent command in sage?

Yep: it's the decorator interact.

Documentation: http://www.sagemath.org/doc/reference...

Examples: http://wiki.sagemath.org/interact/