Re: [sage-support] Displaying graphics from a Sage script

2017-01-13 Thread Michael Orlitzky
On 01/13/2017 06:50 PM, John H Palmieri wrote:
> This question comes from 
> http://stackoverflow.com/questions/41638257/graphics-in-sage-script: if I 
> have a file "foo.sage" and I want to run "sage foo.sage" and have it pop up 
> a window displaying a plot, how do I do this?
> 
> For example, if foo.sage contains
> 
> P = plot(sin(x))
> P.show()
> 
> then it prints "Graphics object consisting of 1 graphics primitive" rather 
> than displaying the plot. I know I can save the plot instead, but is there 
> an easy way to display it directly?
> 

import os.path
import subprocess
import tempfile
from sage.all import *

x = SR.var('x', domain='real')
p = plot(sin, x, -pi, pi)
imgpath = os.path.join(tempfile.mkdtemp(), 'foo.png')
p.save(imgpath)
subprocess.call(["xdg-open", imgpath])

-- 
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] Displaying graphics from a Sage script

2017-01-13 Thread William Stein
On Fri, Jan 13, 2017 at 5:23 PM, John H Palmieri  wrote:
[...]
>>
>> I fixed this by adding "sleep(1)" at the end of the file.
>
>
> Also, I should add that %load doesn't work for me. I don't know what it's
> supposed to do. I used %attach instead.

That's strange and annoying.  It used to be that "%load" was just
"load", and that attach was identical to load, except it would watch
the filesystem for changes and reload when the file changed.  People
re-implemented load and/or attach using IPython, so things
changed/diverged.

If %load doesn't work when %attach does in a situation like this, then
there is definitely some sort of bug.

William

>
>>
>>>
>>>
>>>   John
>>>
>>>


 >
 > --
 > John
 >
 > --
 > 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...@googlegroups.com.
 > To post to this group, send email to sage-s...@googlegroups.com.
 > Visit this group at https://groups.google.com/group/sage-support.
 > For more options, visit https://groups.google.com/d/optout.



 --
 William (http://wstein.org)
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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] Displaying graphics from a Sage script

2017-01-13 Thread John H Palmieri


On Friday, January 13, 2017 at 4:12:44 PM UTC-8, John H Palmieri wrote:
>
>
>
> On Friday, January 13, 2017 at 4:05:59 PM UTC-8, John H Palmieri wrote:
>>
>>
>>
>> On Friday, January 13, 2017 at 3:55:24 PM UTC-8, William wrote:
>>>
>>> On Fri, Jan 13, 2017 at 3:50 PM, John H Palmieri  
>>> wrote: 
>>> > This question comes from 
>>> > http://stackoverflow.com/questions/41638257/graphics-in-sage-script: 
>>> if I 
>>> > have a file "foo.sage" and I want to run "sage foo.sage" and have it 
>>> pop up 
>>> > a window displaying a plot, how do I do this? 
>>> > 
>>> > For example, if foo.sage contains 
>>> > 
>>> > P = plot(sin(x)) 
>>> > P.show() 
>>> > 
>>> > then it prints "Graphics object consisting of 1 graphics primitive" 
>>> rather 
>>> > than displaying the plot. I know I can save the plot instead, but is 
>>> there 
>>> > an easy way to display it directly? 
>>>
>>> I suspect 
>>>
>>>   echo "%load 'a.sage'" | sage 
>>>
>>> would have to work... 
>>>
>>
>> That is an interesting idea, but it doesn't work for me: the graphics 
>> file is stored in a temporary directory which is deleted once Sage exits. 
>> Maybe that's a reason this won't work at all.
>>
>
> I fixed this by adding "sleep(1)" at the end of the file.
>

Also, I should add that %load doesn't work for me. I don't know what it's 
supposed to do. I used %attach instead. 

 
>
>>
>>   John
>>
>>  
>>
>>>
>>> > 
>>> > -- 
>>> > John 
>>> > 
>>> > -- 
>>> > 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...@googlegroups.com. 
>>> > To post to this group, send email to sage-s...@googlegroups.com. 
>>> > Visit this group at https://groups.google.com/group/sage-support. 
>>> > For more options, visit https://groups.google.com/d/optout. 
>>>
>>>
>>>
>>> -- 
>>> William (http://wstein.org) 
>>>
>>

-- 
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] Displaying graphics from a Sage script

2017-01-13 Thread John H Palmieri


On Friday, January 13, 2017 at 4:05:59 PM UTC-8, John H Palmieri wrote:
>
>
>
> On Friday, January 13, 2017 at 3:55:24 PM UTC-8, William wrote:
>>
>> On Fri, Jan 13, 2017 at 3:50 PM, John H Palmieri  
>> wrote: 
>> > This question comes from 
>> > http://stackoverflow.com/questions/41638257/graphics-in-sage-script: 
>> if I 
>> > have a file "foo.sage" and I want to run "sage foo.sage" and have it 
>> pop up 
>> > a window displaying a plot, how do I do this? 
>> > 
>> > For example, if foo.sage contains 
>> > 
>> > P = plot(sin(x)) 
>> > P.show() 
>> > 
>> > then it prints "Graphics object consisting of 1 graphics primitive" 
>> rather 
>> > than displaying the plot. I know I can save the plot instead, but is 
>> there 
>> > an easy way to display it directly? 
>>
>> I suspect 
>>
>>   echo "%load 'a.sage'" | sage 
>>
>> would have to work... 
>>
>
> That is an interesting idea, but it doesn't work for me: the graphics file 
> is stored in a temporary directory which is deleted once Sage exits. Maybe 
> that's a reason this won't work at all.
>

I fixed this by adding "sleep(1)" at the end of the file.
 

>
>   John
>
>  
>
>>
>> > 
>> > -- 
>> > John 
>> > 
>> > -- 
>> > 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...@googlegroups.com. 
>> > To post to this group, send email to sage-s...@googlegroups.com. 
>> > Visit this group at https://groups.google.com/group/sage-support. 
>> > For more options, visit https://groups.google.com/d/optout. 
>>
>>
>>
>> -- 
>> William (http://wstein.org) 
>>
>

-- 
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] Displaying graphics from a Sage script

2017-01-13 Thread John H Palmieri


On Friday, January 13, 2017 at 3:55:24 PM UTC-8, William wrote:
>
> On Fri, Jan 13, 2017 at 3:50 PM, John H Palmieri  > wrote: 
> > This question comes from 
> > http://stackoverflow.com/questions/41638257/graphics-in-sage-script: if 
> I 
> > have a file "foo.sage" and I want to run "sage foo.sage" and have it pop 
> up 
> > a window displaying a plot, how do I do this? 
> > 
> > For example, if foo.sage contains 
> > 
> > P = plot(sin(x)) 
> > P.show() 
> > 
> > then it prints "Graphics object consisting of 1 graphics primitive" 
> rather 
> > than displaying the plot. I know I can save the plot instead, but is 
> there 
> > an easy way to display it directly? 
>
> I suspect 
>
>   echo "%load 'a.sage'" | sage 
>
> would have to work... 
>

That is an interesting idea, but it doesn't work for me: the graphics file 
is stored in a temporary directory which is deleted once Sage exits. Maybe 
that's a reason this won't work at all.

  John

 

>
> > 
> > -- 
> > John 
> > 
> > -- 
> > 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...@googlegroups.com . 
> > To post to this group, send email to sage-s...@googlegroups.com 
> . 
> > Visit this group at https://groups.google.com/group/sage-support. 
> > For more options, visit https://groups.google.com/d/optout. 
>
>
>
> -- 
> William (http://wstein.org) 
>

-- 
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] Displaying graphics from a Sage script

2017-01-13 Thread William Stein
On Fri, Jan 13, 2017 at 3:50 PM, John H Palmieri  wrote:
> This question comes from
> http://stackoverflow.com/questions/41638257/graphics-in-sage-script: if I
> have a file "foo.sage" and I want to run "sage foo.sage" and have it pop up
> a window displaying a plot, how do I do this?
>
> For example, if foo.sage contains
>
> P = plot(sin(x))
> P.show()
>
> then it prints "Graphics object consisting of 1 graphics primitive" rather
> than displaying the plot. I know I can save the plot instead, but is there
> an easy way to display it directly?

I suspect

  echo "%load 'a.sage'" | sage

would have to work...

>
> --
> John
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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] Displaying graphics from a Sage script

2017-01-13 Thread John H Palmieri
This question comes from 
http://stackoverflow.com/questions/41638257/graphics-in-sage-script: if I 
have a file "foo.sage" and I want to run "sage foo.sage" and have it pop up 
a window displaying a plot, how do I do this?

For example, if foo.sage contains

P = plot(sin(x))
P.show()

then it prints "Graphics object consisting of 1 graphics primitive" rather 
than displaying the plot. I know I can save the plot instead, but is there 
an easy way to display it directly?

-- 
John

-- 
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] simplifying radicals of trigonometric expressions

2017-01-13 Thread Michael Orlitzky
On 01/13/2017 05:12 AM, Enrique Artal wrote:
> I would like to know how to handle with this issue. Consider a function
> f=sqrt(cos(x)^3 - 3*cos(x)^2 - cos(x) + 6). It is possible to deal with
> this function for standard procedures like numerical_integral in (-1,1).
> If one considers f.canonicalize_radical() it is presented
> as sqrt(cos(x)^2 - cos(x) - 3)*sqrt(cos(x) - 2), which avoids numerical
> integration in particular since each factor is complex in (-1,1). It is
> not solved if x is declared as a real variable (with domain='real'). For
> this particular function, it is not hard to avoid the issue, but if it
> appears in more complex expressions, it is less obvious.

Don't use canonicalize_radical =)

If you read its documentation, there is a big WARNING stating that it is
going to do weird and unpredictable things. As you have discovered, it's
not a form of simplification -- the input and output may be wildly
different functions.

-- 
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] Re: How to limit heavy computations

2017-01-13 Thread Dima Pasechnik


On Friday, January 13, 2017 at 5:30:04 PM UTC, Enrique Artal wrote:
>
> Putting limits in /etc/security/limits.conf (or in files in limits.d) 
> works right up to Sage 7.3. Namely, if a user performs a strong computation 
> (memory or CPU time), the system stops the computation when the limit is 
> reached; usually one needs to quit the worksheet, but it is possible to 
> reuse the notebook. With 7.4 and 7.5, when the limit is reached the 
> notebook becomes unusable and the only possibility to work is to kill and 
> restart it. Some change between 7.3 and 7.4 may cause it.
>

"the notebook"? Which one? sagenb, or jupyter?
 

>
>
> El domingo, 27 de noviembre de 2016, 21:55:06 (UTC+1), Enrique Artal 
> escribió:
>>
>> It seems to work now with the ulimits for the server_pool users. If they 
>> become too strict, we (maybe more precisely MIguel Marco) will try the 
>> worker user approach. We will let know. Thanks for the help!
>>
>> El domingo, 27 de noviembre de 2016, 21:23:33 (UTC+1), Nils Bruin 
>> escribió:
>>>
>>> On Sunday, November 27, 2016 at 3:04:48 AM UTC-8, Enrique Artal wrote:

 Thanks, As you say, it would be better something more direct, but your 
 approach is a strong improvement for my needs. 
 By the way, I changed in our experimental notebook 7.4 -> 7.3 and the 
 limits work: they stop the process and the notebook is still running.

>>>
>>> for sage 7.5beta(?) setting ulimits does have effect: with
>>>
>>> sh$ ulimit  -v 1000
>>> sh$ sage -c 'L=[1]
>>> for i in [1..1000]:
>>>   L = L+L
>>>   print i'
>>>
>>> I get a memory error after "28" has been printed (and without it, it 
>>> continues longer), and if I take the bound much lower sage will not even 
>>> start.
>>>
>>> So if you configure the "worker" user to have such a ulimit, I'd expect 
>>> memory problems to be significantly reduced. People who try to use more 
>>> memory should see their kernel die before it's causing problems for other 
>>> people.
>>>
>>> Given that there's no way of controling which notebook user gets mapped 
>>> to which worker uid, I don't think there's much mileage to be had from 
>>> configuring multiple worker uids (other than having them on multiple 
>>> machines to load-balance a little bit).
>>>
>>>

-- 
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] Re: How to resume working in SAGE after 10 years?

2017-01-13 Thread William Stein
On Fri, Jan 13, 2017 at 10:27 AM, John Cremona  wrote:
> Go to https://cloud.sagemath.com/ and make yourself a free account.
> You can upload .sws files, but yours are very old so may not convert
> cleanly.  SageMathCloud has its own mailing list.
>
> People may have been put off by the date 2005 since I think Sage was
> only created around then.  Version 4.8 is certainly old (7.5 has just
> been released)!

Feb 2005 was the first release of Sage as "sage".

The very first sagenb launch was in 2006, so indeed nearly 10 years ago.

William

>
> John Cremona
>
> On 13 January 2017 at 15:17, Charles Pique  wrote:
>> The online site where I worked with SAGE (sagenb.org) was taken down because
>> of spammers according to
>> https://ask.sagemath.org/question/36274/what-happened-to-my-user-name-10-years-ago/.
>> I had noticed some restrictions and comments about it back then.  I went my
>> way for some years and now a number of my bookmarks get an error.  I erased
>> them yesterday but they all contain "sagenb.org".  I have seen websites
>> disappear before so I copied all my files to my hard drive.  They had the
>> extension .sws.  I also got a large file with the name SAGE-4.8.ova which
>> might be a software package. I still have my old user name and password but
>> nowhere to try them.  I think I have a new password with same old name at
>> https://ask.sagemath.org/account/signin/?next=/  but that gets a blog.  I
>> don't know how to get the interactive web page that does all the nice things
>> that I used to play with. I never could find instructions for basic things.
>> I never heard of the Sage store before.
>> Today I have a need to solve cubic equations as part of a root locus plot in
>> electronic circuit analysis.
>>
>> On Friday, January 13, 2017 at 4:30:15 AM UTC-5, Charles Pique wrote:
>>>
>>> I used Sage sometime around 2005 +/-5 and had a user name and password.
>>> Now my login doesn't work and I can't even register.
>>> I had a bunch of work saved on the site and I downloaded it too in case
>>> the site lost it.   Years ago the stuff could have been uploaded and
>>> restored.  I don't know if the format is the same after all this time.  Back
>>> then I could not find basic help that I needed.   It appears to be better
>>> today.   Is there a registration page?
>>
>> --
>> 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.



-- 
William (http://wstein.org)

-- 
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] Re: How to limit heavy computations

2017-01-13 Thread Enrique Artal
Putting limits in /etc/security/limits.conf (or in files in limits.d) works 
right up to Sage 7.3. Namely, if a user performs a strong computation 
(memory or CPU time), the system stops the computation when the limit is 
reached; usually one needs to quit the worksheet, but it is possible to 
reuse the notebook. With 7.4 and 7.5, when the limit is reached the 
notebook becomes unusable and the only possibility to work is to kill and 
restart it. Some change between 7.3 and 7.4 may cause it.

El domingo, 27 de noviembre de 2016, 21:55:06 (UTC+1), Enrique Artal 
escribió:
>
> It seems to work now with the ulimits for the server_pool users. If they 
> become too strict, we (maybe more precisely MIguel Marco) will try the 
> worker user approach. We will let know. Thanks for the help!
>
> El domingo, 27 de noviembre de 2016, 21:23:33 (UTC+1), Nils Bruin escribió:
>>
>> On Sunday, November 27, 2016 at 3:04:48 AM UTC-8, Enrique Artal wrote:
>>>
>>> Thanks, As you say, it would be better something more direct, but your 
>>> approach is a strong improvement for my needs. 
>>> By the way, I changed in our experimental notebook 7.4 -> 7.3 and the 
>>> limits work: they stop the process and the notebook is still running.
>>>
>>
>> for sage 7.5beta(?) setting ulimits does have effect: with
>>
>> sh$ ulimit  -v 1000
>> sh$ sage -c 'L=[1]
>> for i in [1..1000]:
>>   L = L+L
>>   print i'
>>
>> I get a memory error after "28" has been printed (and without it, it 
>> continues longer), and if I take the bound much lower sage will not even 
>> start.
>>
>> So if you configure the "worker" user to have such a ulimit, I'd expect 
>> memory problems to be significantly reduced. People who try to use more 
>> memory should see their kernel die before it's causing problems for other 
>> people.
>>
>> Given that there's no way of controling which notebook user gets mapped 
>> to which worker uid, I don't think there's much mileage to be had from 
>> configuring multiple worker uids (other than having them on multiple 
>> machines to load-balance a little bit).
>>
>>

-- 
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: finding complex roots

2017-01-13 Thread Dima Pasechnik
If your equation can be solved exactly, 
the standard Sage way would be something like this:
sage: var('y')
y
sage: solve(y^2==-2,y)
[y == -I*sqrt(2), y == I*sqrt(2)]
sage: (y^2+2).roots()
[(-I*sqrt(2), 1), (I*sqrt(2), 1)]
sage: (y^2+2).roots()[0]# one of the roots exactly, with 
multiplicity
(-I*sqrt(2), 1)
sage: (y^2+2).roots()[0][0]
-I*sqrt(2)
sage: (y^2+2).roots()[0][0].n() # one of the roots, numerically
-1.41421356237309*I


On Friday, January 13, 2017 at 1:01:23 PM UTC, Дмитрий Фролов wrote:
>
> Hellow! I have problem: I need to solve equation with one variable, but 
> solution must be complex number. "find_root()" and "root()" in 
> scipy.optimize can't do it. Help me please.
>
>

-- 
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] Re: How to resume working in SAGE after 10 years?

2017-01-13 Thread Dima Pasechnik


On Friday, January 13, 2017 at 3:27:47 PM UTC, John Cremona wrote:
>
> Go to https://cloud.sagemath.com/ and make yourself a free account. 
> You can upload .sws files, but yours are very old so may not convert 
> cleanly.  SageMathCloud has its own mailing list. 
>

an alternative is to install Sage locally, then you would be able to run 
more or less the
same sagenb interface, without converting .sws files.

sage-4.8.ova is a virtual machine image for VirtualBox 
(https://www.virtualbox.org/)
(although this .ova file might be too old to run on an up to date version 
of VirtualBox)
More precisely, it is Sage installed into a more or less minimal build of a 
Linux system,
packaged for running on VirtualBox rather than on real hardware.

You can also get an .ova file for a more recent Sage version, 
see http://files.sagemath.org/win/
Installing this setup would allow you to run Sage anywhere you can install 
VirtualBox.

(If you have a Linux or an OSX machine, this is not needed, you can compile 
from source
or get a "native" binary installation).

HTH,
Dima


> People may have been put off by the date 2005 since I think Sage was 
> only created around then.  Version 4.8 is certainly old (7.5 has just 
> been released)! 
>
> John Cremona 
>
> On 13 January 2017 at 15:17, Charles Pique  > wrote: 
> > The online site where I worked with SAGE (sagenb.org) was taken down 
> because 
> > of spammers according to 
> > 
> https://ask.sagemath.org/question/36274/what-happened-to-my-user-name-10-years-ago/.
>  
>
> > I had noticed some restrictions and comments about it back then.  I went 
> my 
> > way for some years and now a number of my bookmarks get an error.  I 
> erased 
> > them yesterday but they all contain "sagenb.org".  I have seen websites 
> > disappear before so I copied all my files to my hard drive.  They had 
> the 
> > extension .sws.  I also got a large file with the name SAGE-4.8.ova 
> which 
> > might be a software package. I still have my old user name and password 
> but 
> > nowhere to try them.  I think I have a new password with same old name 
> at 
> > https://ask.sagemath.org/account/signin/?next=/  but that gets a blog. 
>  I 
> > don't know how to get the interactive web page that does all the nice 
> things 
> > that I used to play with. I never could find instructions for basic 
> things. 
> > I never heard of the Sage store before. 
> > Today I have a need to solve cubic equations as part of a root locus 
> plot in 
> > electronic circuit analysis. 
> > 
> > On Friday, January 13, 2017 at 4:30:15 AM UTC-5, Charles Pique wrote: 
> >> 
> >> I used Sage sometime around 2005 +/-5 and had a user name and password. 
> >> Now my login doesn't work and I can't even register. 
> >> I had a bunch of work saved on the site and I downloaded it too in case 
> >> the site lost it.   Years ago the stuff could have been uploaded and 
> >> restored.  I don't know if the format is the same after all this time. 
>  Back 
> >> then I could not find basic help that I needed.   It appears to be 
> better 
> >> today.   Is there a registration page? 
> > 
> > -- 
> > 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...@googlegroups.com . 
> > To post to this group, send email to sage-s...@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] Re: How to resume working in SAGE after 10 years?

2017-01-13 Thread John Cremona
Go to https://cloud.sagemath.com/ and make yourself a free account.
You can upload .sws files, but yours are very old so may not convert
cleanly.  SageMathCloud has its own mailing list.

People may have been put off by the date 2005 since I think Sage was
only created around then.  Version 4.8 is certainly old (7.5 has just
been released)!

John Cremona

On 13 January 2017 at 15:17, Charles Pique  wrote:
> The online site where I worked with SAGE (sagenb.org) was taken down because
> of spammers according to
> https://ask.sagemath.org/question/36274/what-happened-to-my-user-name-10-years-ago/.
> I had noticed some restrictions and comments about it back then.  I went my
> way for some years and now a number of my bookmarks get an error.  I erased
> them yesterday but they all contain "sagenb.org".  I have seen websites
> disappear before so I copied all my files to my hard drive.  They had the
> extension .sws.  I also got a large file with the name SAGE-4.8.ova which
> might be a software package. I still have my old user name and password but
> nowhere to try them.  I think I have a new password with same old name at
> https://ask.sagemath.org/account/signin/?next=/  but that gets a blog.  I
> don't know how to get the interactive web page that does all the nice things
> that I used to play with. I never could find instructions for basic things.
> I never heard of the Sage store before.
> Today I have a need to solve cubic equations as part of a root locus plot in
> electronic circuit analysis.
>
> On Friday, January 13, 2017 at 4:30:15 AM UTC-5, Charles Pique wrote:
>>
>> I used Sage sometime around 2005 +/-5 and had a user name and password.
>> Now my login doesn't work and I can't even register.
>> I had a bunch of work saved on the site and I downloaded it too in case
>> the site lost it.   Years ago the stuff could have been uploaded and
>> restored.  I don't know if the format is the same after all this time.  Back
>> then I could not find basic help that I needed.   It appears to be better
>> today.   Is there a registration page?
>
> --
> 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 to resume working in SAGE after 10 years?

2017-01-13 Thread Charles Pique
The online site where I worked with SAGE (sagenb.org) was taken down 
because of spammers according to 
https://ask.sagemath.org/question/36274/what-happened-to-my-user-name-10-years-ago/.
 
  I had noticed some restrictions and comments about it back then.  I went 
my way for some years and now a number of my bookmarks get an error.  I 
erased them yesterday but they all contain "sagenb.org".  I have seen 
websites disappear before so I copied all my files to my hard drive.  They 
had the extension .sws.  I also got a large file with the name SAGE-4.8.ova 
which might be a software package. I still have my old user name and 
password but nowhere to try them.  I think I have a new password with same 
old name at https://ask.sagemath.org/account/signin/?next=/  but that gets 
a blog.  I don't know how to get the interactive web page that does all the 
nice things that I used to play with. I never could find instructions for 
basic things.   I never heard of the Sage store before. 
Today I have a need to solve cubic equations as part of a root locus plot 
in electronic circuit analysis.   

On Friday, January 13, 2017 at 4:30:15 AM UTC-5, Charles Pique wrote:
>
> I used Sage sometime around 2005 +/-5 and had a user name and password. 
> Now my login doesn't work and I can't even register.
> I had a bunch of work saved on the site and I downloaded it too in case 
> the site lost it.   Years ago the stuff could have been uploaded and 
> restored.  I don't know if the format is the same after all this time.  
> Back then I could not find basic help that I needed.   It appears to be 
> better today.   Is there a registration page?
>

-- 
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] Re: Question about upgrading.

2017-01-13 Thread Thierry Dumont
Le 13/01/2017 à 11:09, Dima Pasechnik a écrit :
> IMHO you should be able to finish build by (repeatedly) running make.
> (It would in the end give you working Sage, although make will report an
> error in the end)
> 
> Just in case, coxeter3 installs in 7.5 just fine for me (on a gentoo
> linux box)
> 
True; sage -i -f coxeter3 solved the problem.
Thanks!
t.
> On Friday, January 13, 2017 at 8:40:10 AM UTC, tdumont wrote:
> 
> Today, I have tried to upgrade from 7.4 to 7.5 (git pull; make ...)
> 
> I have a problem with the optional package coxeter3 (it does not
> compile).
> 
> Before trying to solve this problem with coxeter, I would like to know
> if there is a canonical way to remove coxeter3 from sage tree to finish
> the build correctly. coxeter3 appears there:
> 
> ./upstream/coxeter3-1.1.tar.gz
> ./local/var/tmp/sage/build/coxeter3-1.1
> ./local/lib/python2.7/site-packages/sage/libs/coxeter3
> ./logs/pkgs/coxeter3-1.1.log
> ./build/pkgs/coxeter3
> ./src/sage/libs/coxeter3
> ./src/build/cythonized/sage/libs/coxeter3
> ./src/build/temp.linux-x86_64-2.7/sage/libs/coxeter3
> ./src/build/lib.linux-x86_64-2.7/sage/libs/coxeter3
> 
> Is is ok to remove all this before doing make again or is there
> something cleaner ?
> 
> t.
> 
> -- 
> 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] finding complex roots

2017-01-13 Thread Vegard Lima
Hi,

On Fri, Jan 13, 2017 at 1:54 PM, Дмитрий Фролов  wrote:
> Hellow! I have problem: I need to solve equation with one variable, but
> solution must be complex number. "find_root()" and "root()" in
> scipy.optimize can't do it. Help me please.

root() from scipy.optimize should work:

F.ex. to find the root of f(z) = z^2 + 1, write z = x + iy
so that f(x,y) = (x^2-y^2+1, 2*xy).
Following the example in:
https://docs.scipy.org/doc/scipy-0.18.1/reference/tutorial/optimize.html

import numpy as np
import scipy.optimize as opti


def func(x):
f = [x[0]**2 - x[1]**2 + 1, 2*x[0]*x[1]]
# The Jacobian:
df = np.array([[2*x[0], -2*x[1]], [2*x[1], 2*x[0]]])
return f, df

sol = opti.root(func, [0.5, 0.5], jac=True, method='lm')
print sol.x


Cheers,
-- 
Vegard Lima

-- 
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] finding complex roots

2017-01-13 Thread Дмитрий Фролов
Hellow! I have problem: I need to solve equation with one variable, but 
solution must be complex number. "find_root()" and "root()" in 
scipy.optimize can't do it. Help me please.

-- 
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] Sageplot is not supported in powerdot class

2017-01-13 Thread noufal asharaf

Dear friends,

I was using powerdot class for presentation and used sagetex package to 
plot the math functions and tried to insert
but it created the sage-plot directory and sage worked fine on the 
.sagmath.sage file. The problem is the created plots are not inserted in 
the  dvi --> ps-->pdf seqence
i.e. some graphics unsupported issue came. I couldn't rectify this. Thanks 
in advance for any clue in this regard.

-- 
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] simplifying radicals of trigonometric expressions

2017-01-13 Thread Enrique Artal
I would like to know how to handle with this issue. Consider a function 
f=sqrt(cos(x)^3 - 3*cos(x)^2 - cos(x) + 6). It is possible to deal with 
this function for standard procedures like numerical_integral in (-1,1). If 
one considers f.canonicalize_radical() it is presented as sqrt(cos(x)^2 - 
cos(x) - 3)*sqrt(cos(x) - 2), which avoids numerical integration in 
particular since each factor is complex in (-1,1). It is not solved if x is 
declared as a real variable (with domain='real'). For this particular 
function, it is not hard to avoid the issue, but if it appears in more 
complex expressions, it is less obvious.

-- 
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: Question about upgrading.

2017-01-13 Thread Dima Pasechnik
IMHO you should be able to finish build by (repeatedly) running make.
(It would in the end give you working Sage, although make will report an 
error in the end)

Just in case, coxeter3 installs in 7.5 just fine for me (on a gentoo linux 
box)

On Friday, January 13, 2017 at 8:40:10 AM UTC, tdumont wrote:
>
> Today, I have tried to upgrade from 7.4 to 7.5 (git pull; make ...) 
>
> I have a problem with the optional package coxeter3 (it does not compile). 
>
> Before trying to solve this problem with coxeter, I would like to know 
> if there is a canonical way to remove coxeter3 from sage tree to finish 
> the build correctly. coxeter3 appears there: 
>
> ./upstream/coxeter3-1.1.tar.gz 
> ./local/var/tmp/sage/build/coxeter3-1.1 
> ./local/lib/python2.7/site-packages/sage/libs/coxeter3 
> ./logs/pkgs/coxeter3-1.1.log 
> ./build/pkgs/coxeter3 
> ./src/sage/libs/coxeter3 
> ./src/build/cythonized/sage/libs/coxeter3 
> ./src/build/temp.linux-x86_64-2.7/sage/libs/coxeter3 
> ./src/build/lib.linux-x86_64-2.7/sage/libs/coxeter3 
>
> Is is ok to remove all this before doing make again or is there 
> something cleaner ? 
>
> t. 
>

-- 
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 to resume working in SAGE after 10 years?

2017-01-13 Thread Dima Pasechnik


On Friday, January 13, 2017 at 9:30:15 AM UTC, Charles Pique wrote:
>
> I used Sage sometime around 2005 +/-5 and had a user name and password. 
> Now my login doesn't work and I can't even register.
> I had a bunch of work saved on the site and I downloaded it too in case 
> the site lost it.   Years ago the stuff could have been uploaded and 
> restored.  I don't know if the format is the same after all this time.  
> Back then I could not find basic help that I needed.   It appears to be 
> better today.   Is there a registration page?
>

To begin with, are you talking about sage as in http://www.sagemath.org/ ?
Then, what site are you referring to? sagenb.org ? 
(I suspect you might be talking about Sage as in https://shop.sage.co.uk/ - 
and we have nothing to do with this, and never ever had)



  

-- 
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] How to resume working in SAGE after 10 years?

2017-01-13 Thread Charles Pique
I used Sage sometime around 2005 +/-5 and had a user name and password. Now 
my login doesn't work and I can't even register.
I had a bunch of work saved on the site and I downloaded it too in case the 
site lost it.   Years ago the stuff could have been uploaded and restored.  
I don't know if the format is the same after all this time.  Back then I 
could not find basic help that I needed.   It appears to be better today.   
Is there a registration page?

-- 
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] Question about upgrading.

2017-01-13 Thread Thierry Dumont
Today, I have tried to upgrade from 7.4 to 7.5 (git pull; make ...)

I have a problem with the optional package coxeter3 (it does not compile).

Before trying to solve this problem with coxeter, I would like to know
if there is a canonical way to remove coxeter3 from sage tree to finish
the build correctly. coxeter3 appears there:

./upstream/coxeter3-1.1.tar.gz
./local/var/tmp/sage/build/coxeter3-1.1
./local/lib/python2.7/site-packages/sage/libs/coxeter3
./logs/pkgs/coxeter3-1.1.log
./build/pkgs/coxeter3
./src/sage/libs/coxeter3
./src/build/cythonized/sage/libs/coxeter3
./src/build/temp.linux-x86_64-2.7/sage/libs/coxeter3
./src/build/lib.linux-x86_64-2.7/sage/libs/coxeter3

Is is ok to remove all this before doing make again or is there
something cleaner ?

t.

-- 
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.
<>