Ask Your Question

riemann's profile - activity

2023-12-21 21:37:22 +0200 received badge  Notable Question (source)
2023-12-21 21:37:22 +0200 received badge  Popular Question (source)
2022-01-13 01:08:09 +0200 received badge  Notable Question (source)
2021-11-17 00:38:33 +0200 received badge  Notable Question (source)
2020-10-13 07:33:25 +0200 received badge  Popular Question (source)
2020-08-07 06:24:19 +0200 received badge  Famous Question (source)
2017-08-15 19:02:01 +0200 received badge  Famous Question (source)
2016-07-02 00:02:17 +0200 received badge  Popular Question (source)
2016-04-12 20:24:20 +0200 received badge  Notable Question (source)
2014-06-29 03:14:54 +0200 marked best answer 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,

2014-06-29 03:14:54 +0200 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-29 03:14:54 +0200 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 20:28:25 +0200 received badge  Popular Question (source)
2013-09-18 10:21:07 +0200 received badge  Notable Question (source)
2013-02-03 22:29:07 +0200 received badge  Popular Question (source)
2012-06-19 03:33:04 +0200 received badge  Taxonomist
2011-07-22 10:13:00 +0200 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-22 02:14:42 +0200 received badge  Nice Question (source)
2011-07-21 17:58:46 +0200 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 19:56:57 +0200 received badge  Nice Question (source)
2011-07-14 12:14:42 +0200 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 17:38:17 +0200 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 14:38:06 +0200 asked a question Location of Sage packages?

Where does Sage store its Python packages?

2011-07-12 12:03:55 +0200 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 12:03:43 +0200 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 17:10:45 +0200 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 10:27:28 +0200 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 12:02:41 +0200 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!