Re: [sage-support] FYI : ipywidgets allows (sort of) interactive Sage graphs in Jupyter notebook.

2016-09-20 Thread Emmanuel Charpentier


Le mardi 20 septembre 2016 22:15:43 UTC+2, Jeroen Demeyer a écrit :
>
> On 2016-09-20 22:09, Emmanuel Charpentier wrote: 
> > May I ask why ? (Just curious, no hostility whatsoever implied...). 
>
> Because those packages are installed and the nbextension is enabled in 
> Sage by default: https://trac.sagemath.org/ticket/21256 
>

Thanks ! I missed this one...

--
Emmanuel Charpentier
 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] sage crash report

2016-09-20 Thread Fabio Di Cosmo
***

IPython post-mortem report

{'commit_hash': u'b630b41',
 'commit_source': 'installation',
 'default_encoding': 'UTF-8',
 'ipython_path':
'/usr/lib/sagemath/local/lib/python2.7/site-packages/IPython',
 'ipython_version': '4.2.1',
 'os_name': 'posix',
 'platform': 'Linux-4.4.0-38-generic-x86_64-with-debian-stretch-sid',
 'sys_executable': '/usr/lib/sagemath/local/bin/python',
 'sys_platform': 'linux2',
 'sys_version': '2.7.10 (default, Aug  6 2016, 15:34:26) \n[GCC 4.8.4]'}

***



***

Crash traceback:

---
---
ImportError   Python 2.7.10: /usr/lib/sagemath/local/bin/python
   Tue Sep 20 22:35:11 2016
A problem occurred executing Python code.  Here is the sequence of function
calls leading up to the error, with the most recent (innermost) call last.
/usr/lib/sagemath/src/bin/sage-ipython in ()
  1 #!/usr/bin/env python
  2 # -*- coding: utf-8 -*-
  3 """
  4 Sage IPython startup script.
  5 """
  6
  7 # Install extra readline commands before IPython initialization
  8 from sage.repl.readline_extra_commands import *
  9
 10 from sage.repl.interpreter import SageTerminalApp
 11
 12 app = SageTerminalApp.instance()
---> 13 app.initialize()
global app.initialize = >
 14 app.start()

 in
initialize(self=, argv=None)

/usr/lib/sagemath/local/lib/python2.7/site-packages/traitlets/config/application.pyc
in catch_config_error(method=,
app=, *args=(None,),
**kwargs={})
 59
 60
#-
 61 # Application class
 62
#-
 63
 64 @decorator
 65 def catch_config_error(method, app, *args, **kwargs):
 66 """Method decorator for catching invalid config
(Trait/ArgumentErrors) during init.
 67
 68 On a TraitError (generally caused by bad config), this will
print the trait's
 69 message, and exit the app.
 70
 71 For use on init methods, to prevent invoking excepthook on
invalid input.
 72 """
 73 try:
---> 74 return method(app, *args, **kwargs)
method = 
app = 
args = (None,)
kwargs = {}
 75 except (TraitError, ArgumentError) as e:
 76 app.print_help()
 77 app.log.fatal("Bad config encountered during
initialization:")
 78 app.log.fatal(str(e))
 79 app.log.debug("Config at the time: %s", app.config)
 80 app.exit(1)
 81
 82
 83 class ApplicationError(Exception):
 84 pass
 85
 86
 87 class LevelFormatter(logging.Formatter):
 88 """Formatter with additional `highlevel` record
 89

/usr/lib/sagemath/local/lib/python2.7/site-packages/IPython/terminal/ipapp.pyc
in initialize(self=,
argv=None)
290
291 return super(TerminalIPythonApp,
self).parse_command_line(argv)
292
293 @catch_config_error
294 def initialize(self, argv=None):
295 """Do actions after construct, but before starting the
app."""
296 super(TerminalIPythonApp, self).initialize(argv)
297 if self.subapp is not None:
298 # don't bother initializing further, starting subapp
299 return
300 # print self.extra_args
301 if self.extra_args and not self.something_to_run:
302 self.file_to_run = self.extra_args[0]
303 self.init_path()
304 # create the shell
--> 305 self.init_shell()
self.init_shell = >
306 # and draw the banner
307 self.init_banner()
308 # Now a variety of things that happen after the banner is
printed.
309 self.init_gui_pylab()
310 self.init_extensions()
311 self.init_code()
312
313 def init_shell(self):
314 """initialize the InteractiveShell instance"""
315 # Create an InteractiveShell instance.
316 # shell.display_banner should always be False for the
terminal
317 # based app, because we call shell.show_banner() by hand
below
318 # so the banner shows *before* all extension loading stuff.
319 self.shell = TerminalInteractiveShell.instance(parent=self,
320 display_banner=False,
profile_dir=self.profile_dir,

/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/repl/interpreter.pyc
in init_shell(self=)
783 self.shell.has_sage_extensions = 

Re: [sage-support] FYI : ipywidgets allows (sort of) interactive Sage graphs in Jupyter notebook.

2016-09-20 Thread Jeroen Demeyer

On 2016-09-20 22:09, Emmanuel Charpentier wrote:

May I ask why ? (Just curious, no hostility whatsoever implied...).


Because those packages are installed and the nbextension is enabled in 
Sage by default: https://trac.sagemath.org/ticket/21256


--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] FYI : ipywidgets allows (sort of) interactive Sage graphs in Jupyter notebook.

2016-09-20 Thread Emmanuel Charpentier


Le mardi 20 septembre 2016 16:27:28 UTC+2, Jeroen Demeyer a écrit :
>
> On 2016-09-20 16:12, Emmanuel Charpentier wrote: 
> > sage -pip install ipywidgets 
> > 
> > echo "jupyter nbextension enable --py --sys-prefix widgetsnbextension" | 
> > sage -sh 
>
> In recent Sage betas, the above should not be needed. 
>

May I ask why ? (Just curious, no hostility whatsoever implied...).

-
Emmanuel Charpentier 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] PALP database for 4D reflexive polytopes?

2016-09-20 Thread Vincent Delecroix
Justin is right, the question is precisely: how Sage was installed on
this computer?

On 20 September 2016 at 20:31, Justin C. Walker  wrote:
>
> On Sep 20, 2016, at 10:41 , Ursula Whitcher wrote:
>
>> I tried to install the PALP database for four-dimensional reflexive
>> polytopes on the SageMath cloud, following the documentation at
>>
>> http://doc.sagemath.org/html/en/reference/geometry/sage/geometry/polyhedron/palp_database.html
>> ,
>
> It looks (below) like two problems:
> 1. You don't have permission to write (create/change files) in the directory 
> tree SAGE_ROOT.
> 2. This: "Error: package 'polytopes_db_4d' not found"
>
> I'm not sure how to overcome the first.  If sage is installed on a multiuser 
> system, in an admin/root-owned tree, you are stuck, I think.  Check with the 
> system admins.
>
> As for the second, you don't seem to have enough information below to figure 
> out why the package is not found.  Are you sure the name is complete and 
> correct?  The link you include (above) only seems to give use examples, not 
> install instructions.
>
> HTH
>
> Justin
>
>> which suggests the shell command
>>
>> sage -i polytopes_db_4d
>> .
>>
>> This didn't work.  I'm not sure whether the failure implies a problem with
>> the database, or with the place I'm trying to put it on the cloud (this is
>> a standard Sage installation, not a development version, on a members-only
>> server without extra internet access enabled).  Here's the full terminal
>> output:
>>
>> ***
>>
>> make build/make/Makefile
>> make[1]: Entering directory '/projects/sage/sage-7.3'
>> make[1]: 'build/make/Makefile' is up to date.
>> make[1]: Leaving directory '/projects/sage/sage-7.3'
>> build/bin/sage-logger \
>>"cd build/make && ./install 'all-toolchain'" logs/install.log
>> tee: logs/install.log: Permission denied
>> ./install: line 28: /projects/sage/sage-7.3/.BUILDSTART: Permission denied
>> Nothing to (re)build / all up-to-date.
>>
>> Error: package 'polytopes_db_4d' not found
>> Assuming it is an old-style package... (this is deprecated: use -p instead 
>> of -i to install old-style packages)
>>
>> tee: /projects/sage/sage-7.3/logs/pkgs/polytopes_db_4d.log: Permission denied
>> /projects/sage/sage-7.3/build/bin/sage-spkg: line 283: cd: 
>> /projects/sage/sage-7.3/upstream: No such file or directory
>> Attempting to download package polytopes_db_4d
>> Traceback (most recent call last):
>>  File "/projects/sage/sage-7.3/build/bin/sage-download-file", line 27, in 
>> 
>>from sage_bootstrap.download.cmdline import run_safe
>>  File 
>> "/projects/sage/sage-7.3/build/bin/../sage_bootstrap/download/__init__.py", 
>> line 8, in 
>>from sage_bootstrap.download.mirror_list import MirrorList
>>  File 
>> "/projects/sage/sage-7.3/build/bin/../sage_bootstrap/download/mirror_list.py",
>>  line 22, in 
>>from sage_bootstrap.env import SAGE_DISTFILES
>>  File "/projects/sage/sage-7.3/build/bin/../sage_bootstrap/env.py", line 47, 
>> in 
>>assert os.path.isdir(SAGE_DISTFILES)
>> AssertionError
>>
>> ***
>>
>> Any ideas?
>>
>> Thanks--
>> Ursula.
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "sage-support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to sage-support+unsubscr...@googlegroups.com.
>> To post to this group, send email to sage-support@googlegroups.com.
>> Visit this group at https://groups.google.com/group/sage-support.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> Justin C. Walker, Curmudgeon-At-Large
> Institute for the Enhancement of the Director's Income
> 
> Experience is what you get
>   when you don't get what you want.
> 
>
>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-support+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-support@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] PALP database for 4D reflexive polytopes?

2016-09-20 Thread Justin C. Walker

On Sep 20, 2016, at 10:41 , Ursula Whitcher wrote:

> I tried to install the PALP database for four-dimensional reflexive 
> polytopes on the SageMath cloud, following the documentation at
> 
> http://doc.sagemath.org/html/en/reference/geometry/sage/geometry/polyhedron/palp_database.html
>  
> ,

It looks (below) like two problems:
1. You don't have permission to write (create/change files) in the directory 
tree SAGE_ROOT.
2. This: "Error: package 'polytopes_db_4d' not found"

I'm not sure how to overcome the first.  If sage is installed on a multiuser 
system, in an admin/root-owned tree, you are stuck, I think.  Check with the 
system admins.

As for the second, you don't seem to have enough information below to figure 
out why the package is not found.  Are you sure the name is complete and 
correct?  The link you include (above) only seems to give use examples, not 
install instructions.

HTH

Justin

> which suggests the shell command
> 
> sage -i polytopes_db_4d
> .
> 
> This didn't work.  I'm not sure whether the failure implies a problem with 
> the database, or with the place I'm trying to put it on the cloud (this is 
> a standard Sage installation, not a development version, on a members-only 
> server without extra internet access enabled).  Here's the full terminal 
> output: 
> 
> ***
> 
> make build/make/Makefile
> make[1]: Entering directory '/projects/sage/sage-7.3'
> make[1]: 'build/make/Makefile' is up to date.
> make[1]: Leaving directory '/projects/sage/sage-7.3'
> build/bin/sage-logger \
>"cd build/make && ./install 'all-toolchain'" logs/install.log
> tee: logs/install.log: Permission denied
> ./install: line 28: /projects/sage/sage-7.3/.BUILDSTART: Permission denied
> Nothing to (re)build / all up-to-date.
> 
> Error: package 'polytopes_db_4d' not found
> Assuming it is an old-style package... (this is deprecated: use -p instead of 
> -i to install old-style packages)
> 
> tee: /projects/sage/sage-7.3/logs/pkgs/polytopes_db_4d.log: Permission denied
> /projects/sage/sage-7.3/build/bin/sage-spkg: line 283: cd: 
> /projects/sage/sage-7.3/upstream: No such file or directory
> Attempting to download package polytopes_db_4d
> Traceback (most recent call last):
>  File "/projects/sage/sage-7.3/build/bin/sage-download-file", line 27, in 
> 
>from sage_bootstrap.download.cmdline import run_safe
>  File 
> "/projects/sage/sage-7.3/build/bin/../sage_bootstrap/download/__init__.py", 
> line 8, in 
>from sage_bootstrap.download.mirror_list import MirrorList
>  File 
> "/projects/sage/sage-7.3/build/bin/../sage_bootstrap/download/mirror_list.py",
>  line 22, in 
>from sage_bootstrap.env import SAGE_DISTFILES
>  File "/projects/sage/sage-7.3/build/bin/../sage_bootstrap/env.py", line 47, 
> in 
>assert os.path.isdir(SAGE_DISTFILES)
> AssertionError
> 
> ***
> 
> Any ideas?
> 
> Thanks--
> Ursula.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-support+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-support@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.

--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Enhancement of the Director's Income

Experience is what you get
  when you don't get what you want.




-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] PALP database for 4D reflexive polytopes?

2016-09-20 Thread Ursula Whitcher
I tried to install the PALP database for four-dimensional reflexive 
polytopes on the SageMath cloud, following the documentation at

http://doc.sagemath.org/html/en/reference/geometry/sage/geometry/polyhedron/palp_database.html
 
,

which suggests the shell command

sage -i polytopes_db_4d
.

This didn't work.  I'm not sure whether the failure implies a problem with 
the database, or with the place I'm trying to put it on the cloud (this is 
a standard Sage installation, not a development version, on a members-only 
server without extra internet access enabled).  Here's the full terminal 
output: 

***

make build/make/Makefile
make[1]: Entering directory '/projects/sage/sage-7.3'
make[1]: 'build/make/Makefile' is up to date.
make[1]: Leaving directory '/projects/sage/sage-7.3'
build/bin/sage-logger \
"cd build/make && ./install 'all-toolchain'" logs/install.log
tee: logs/install.log: Permission denied
./install: line 28: /projects/sage/sage-7.3/.BUILDSTART: Permission denied
Nothing to (re)build / all up-to-date.
 
Error: package 'polytopes_db_4d' not found
Assuming it is an old-style package... (this is deprecated: use -p instead of 
-i to install old-style packages)
 
tee: /projects/sage/sage-7.3/logs/pkgs/polytopes_db_4d.log: Permission denied
/projects/sage/sage-7.3/build/bin/sage-spkg: line 283: cd: 
/projects/sage/sage-7.3/upstream: No such file or directory
Attempting to download package polytopes_db_4d
Traceback (most recent call last):
  File "/projects/sage/sage-7.3/build/bin/sage-download-file", line 27, in 

from sage_bootstrap.download.cmdline import run_safe
  File 
"/projects/sage/sage-7.3/build/bin/../sage_bootstrap/download/__init__.py", 
line 8, in 
from sage_bootstrap.download.mirror_list import MirrorList
  File 
"/projects/sage/sage-7.3/build/bin/../sage_bootstrap/download/mirror_list.py", 
line 22, in 
from sage_bootstrap.env import SAGE_DISTFILES
  File "/projects/sage/sage-7.3/build/bin/../sage_bootstrap/env.py", line 47, 
in 
assert os.path.isdir(SAGE_DISTFILES)
AssertionError

***

Any ideas?

Thanks--
Ursula.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Instruction on how to use Sage with Eclipse and PyDev

2016-09-20 Thread Ahmed Zawia
hi, I am trying to install module sage.all but i could not !!
can you please assist me 
thanks

On Friday, December 16, 2011 at 11:22:25 PM UTC-3, Nicolas Essis-Breton 
wrote:
>
> I'm just beginning to use this setup. Maybe, there are are some hidden
> limitations.
>
> I assume you have a working installation of eclipse, PyDev and Sage.
>
> Do this in eclipse:
> 1- set PyDev python interpreter to Sage
> windows: preferences: PyDev: Interpreter Python: new: 
> /sage/local/bin/
> python2.6
> accept all the dependencies
>
> 2- add support for '.sage' file
> windows: preferences: general: content type: python file: add
> '.sage'
> windows: preferences: general: file association: add '.sage' with
> 'Python editor'
> windows: preferences: pydev: code style: file types: add 'sage' in
> valid source file,
>  and set 'sage' as default python extension
>
> 3- configure interactive console with appropriate startup command
> windows: preferences: pydev: interactive console: initial 
> interpreter
> commands :
> import sys; from sage.all import *;
> preparser(on=True);execfile=load;
> (we activate the preparser and overwrite PyDev 'execFile' with
> Sage 'load')
>
> To run Sage in Eclipse, I do in a terminal:
> $sage -sh
> $eclipse
>
> How I use it:
> -In top of each sage script, I need to write
> import sys
> from sage.all import *
>
> -I run a script by passing it directly to the interactive console.
> When a script as the focus in the text editor, the shortcut is 'Ctrl
> +Alt+Enter'.
>
> -I didn't yet find a way to properly configure the debugger and 'Run
> As' for .sage files. But, I think every functionality of sage is
> there.
>
> -I use Sage 4.7.2, Eclipse indigo, PyDev 2.3
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Algebraic Geometry in Sage

2016-09-20 Thread saad khalid
Hey everyone:

There's a command in M2 called "selectInSubring". I was wondering, though I 
know I can use M2 through sage, is there a direct way to do this through 
Sage itself? Or is interfacing to M2 the only way? Here is the M2 
description of the function:
http://www.math.uiuc.edu/Macaulay2/doc/Macaulay2-1.9/share/doc/Macaulay2/Macaulay2Doc/html/_select__In__Subring.html



-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] FYI : ipywidgets allows (sort of) interactive Sage graphs in Jupyter notebook.

2016-09-20 Thread Jeroen Demeyer

On 2016-09-20 16:12, Emmanuel Charpentier wrote:

sage -pip install ipywidgets

echo "jupyter nbextension enable --py --sys-prefix widgetsnbextension" |
sage -sh


In recent Sage betas, the above should not be needed.

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: How does @interact work in Sage 7.3 Jupiter notebook?

2016-09-20 Thread Emmanuel Charpentier
This post  
might help... Note that this solution is different of Sage's (@)interact 
function(s).

HTH,

--
Emmanuel Charpentier

Le mardi 13 septembre 2016 03:36:19 UTC+2, ahaus...@umassd.edu a écrit :
>
> Hi,
>
> the Interact command does not seem to be working in Sage 7.3 Jupyer 
> Notebook!
>
>
> Here is the code from a notebook cell:
> -
> from ipywidgets import interact, interactive, fixed
> import ipywidgets as widgets
>
>
> def plotNthRoots(n):
> # Create a unit circle
> c = circle((0,0), radius=1, rgbcolor=(1,0,0))
> # Combine the circle with points on the circle representing the roots 
> of unity
> theta = 2.0*pi/float(n)
> p = c + point([(cos(t), sin(t)) for t in srange(0, 2.0*pi, 
> theta)],frame=True,size=60)
> # Add in vectors from the origin to the roots of unity.
> p = p + sum([arrow2d( (0,0), (cos(t),sin(t)) ) for t in srange(0, 
> 2.0*pi, theta)])
> show(p)
> print("The Principle %d-Root: (%5.3f)+(%5.3f)I"%(n,cos(theta), 
> sin(theta)) )
>
> 
> @interact
> def _(n=(1,20)):
> plotNthRoots(n)
> -
>
> Rather than creating a slider, it generates a plot for the case n=20.
>
> Any suggestions?
>
> Adam Hausknecht
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] FYI : ipywidgets allows (sort of) interactive Sage graphs in Jupyter notebook.

2016-09-20 Thread Emmanuel Charpentier
I found this useful (at least as a stopgap measure while waiting for 
Trac#21267 , which may be not as 
easy as it seems...), and thought that documenting this might be useful to 
people wanting interactive displays in Sagemath Jupyter notebooks :

The ipywidgets  python package can 
be installed in the Sage jupyter notebook. To enable installation "in the 
right place", the installation instructions 
 
should be modified as :

sage -pip install ipywidgets

echo "jupyter nbextension enable --py --sys-prefix widgetsnbextension" | sage 
-sh

if you use the Sage Jupyter notebook (the original installation instructions 
are enough if you have installed your Sage kernel
in the system's Jupyter notebook). The following code snippet is enough to use 
the package :

from __future__ import print_functionfrom ipywidgets import interact, 
interactive, fixedimport ipywidgets as widgets

And that's all... My limited testing seems to validate this (ab?)use of the 
package :

var("x,a,b")
dbeta(x,a,b)=x^(a-1)*(1-x)^(b-1)/beta(a,b)
def showbeta(a,b):
show(plot(dbeta(x,a,b),(x,0,1),figsize=4))
return(None)
interact(showbeta,
 
a=widgets.FloatSlider(min=0.0,max=10.0,step=0.1,value=1.0,continuous_update=False),
 
b=widgets.FloatSlider(min=0.0,max=10.0,step=0.1,value=1.0,continuous_update=False));

Note that the ipywidget package has no way to use a lot of Sage data types. Any 
argument to them have to be cast to
native python data types (int, float, string).

Clunky, but damn useful, at least for pedagogic purposes...

HTH,

--
Emmanuel Charpentier

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: plotting ln(x) graph on sagemath

2016-09-20 Thread HG
syntax should be show(P)

or P 

but not print P which gives you your result

Le samedi 17 septembre 2016 23:13:05 UTC+2, Anoz a écrit :
>
> I'm trying to plot the graph ln(1+x/1-x) how do I do this on sagemath , I 
> just need the correct syntax.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] huge virtual memory size when launching 7.3

2016-09-20 Thread Jeroen Demeyer

On 2016-09-20 12:54, Jonathan Bober wrote:

 From reading what you've sent, I guess that what you have in mind is
calling mmap with PROT_NONE and then calling mprotect() to change that
to read/write whenever growing the stack? That seems like it might be a
reasonable thing to do (though I'm only basing that on spending a few
minutes reading what you sent, not from any actual knowledge that I had
before).


Yes, that is my idea.


I'm willing to devote some time (not today) to figuring out what the
right thing to do is (maybe the above is already the right thing) /
implementing this / reviewing this.


I don't mind implementing it. What I *do* mind is that I implement it 
and that the patch rots away on Sage Trac in needs_review state (highly 
specialized patches like these have a higher chance of that). That's why 
I asked for a commitment to review.


--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: plotting ln(x) graph on sagemath

2016-09-20 Thread HG
On mine sage 7.3 it does it straight

Le samedi 17 septembre 2016 23:13:05 UTC+2, Anoz a écrit :
>
> I'm trying to plot the graph ln(1+x/1-x) how do I do this on sagemath , I 
> just need the correct syntax.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: plotting ln(x) graph on sagemath

2016-09-20 Thread HG
Maybe fist write %matplotlib inline
Sometimes I got the same problem 
I do it first with python2 kernel and after I do it with sagemath again

Le samedi 17 septembre 2016 23:13:05 UTC+2, Anoz a écrit :
>
> I'm trying to plot the graph ln(1+x/1-x) how do I do this on sagemath , I 
> just need the correct syntax.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] huge virtual memory size when launching 7.3

2016-09-20 Thread Jonathan Bober
>From reading what you've sent, I guess that what you have in mind is
calling mmap with PROT_NONE and then calling mprotect() to change that to
read/write whenever growing the stack? That seems like it might be a
reasonable thing to do (though I'm only basing that on spending a few
minutes reading what you sent, not from any actual knowledge that I had
before).

I'm willing to devote some time (not today) to figuring out what the right
thing to do is (maybe the above is already the right thing) / implementing
this / reviewing this.

On Mon, Sep 19, 2016 at 7:31 PM, Jeroen Demeyer 
wrote:

> After spending some time reading on the subject, I think I might have a
> solution to this "problem". It involves calling mmap() with PROT_NONE,
> which will require a patch to upstream PARI.
>
> However, before implementing this, I would like a *strong commitment* from
> somebody to review my patch when I'm finished. Otherwise I'm just wasting
> my time.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-support@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: How can Sage and Python communicate via global variables?

2016-09-20 Thread Paul Leopardi
Thanks, that all works quite well.


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.