[sage-support] Re: Simple multiprocessing example in Sage-Notebook
On Mar 7, 9:47 pm, William Stein wrote: > With a function as *trivial* as your f above, the overhead of > @parallel will kill your benchmark. As I explained, for *every* > single call, an entire copy of Sage is forked off. This is no problem > if evaluating f takes at least a second (say), but it kind of > pointless for something like the above. > > -- William I have created a simple time-exhaustive function to compute some million elements FFT. Each call was taking approximately 5 secs. However I couldn't get speed-ups with @parallel on my dual core 2.5 Ghz cpu laptop. Could you provide an example showing the @parallel use with an easy-observable example? I am going to give a demonstration on Wednesday and I would like to be able to demonstrate this feature as well. Thanks again William. -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: spellchecker for tinymce
On 8 bře, 22:21, Rado wrote: > PS. Work-around in the meantime, hit the "edit HTML source" button. > Right click in tinymce also show option to install dictionary switch spellchecking on. Seems to work for me. Thank you. Robert -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: spellchecker for tinymce
PS. Work-around in the meantime, hit the "edit HTML source" button. On Mar 8, 3:17 pm, Rado wrote: > I tried to enable the firefox build-in spellcheck by adding this > simple > optionhttp://wiki.moxiecode.com/index.php/TinyMCE:Configuration/gecko_spell... > in the file ../data/sage/js/tinymce.js in the sagenb package. However, > it doesn't work very well, some misspelled words lose their red > underline after a few s. Not sure if it is TinyMCE problem or > part of the modifications done for Sage. Next thing to try is tinymce > spellcheck plugin. > > But I am definitely for adding spellcheck capability (it saves my ass > on a daily basis). > > Rado > > On Mar 8, 5:51 am, "ma...@mendelu.cz" wrote: > > > Dear support, > > > do you know how to enable spelling for Sage notebooks? > > > I use Firefox and it checks input cells automatically, but I do not > > know hot to check the text in text cells. > > > Thank you > > > Robert Marik -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: spellchecker for tinymce
I tried to enable the firefox build-in spellcheck by adding this simple option http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/gecko_spellcheck in the file ../data/sage/js/tinymce.js in the sagenb package. However, it doesn't work very well, some misspelled words lose their red underline after a few s. Not sure if it is TinyMCE problem or part of the modifications done for Sage. Next thing to try is tinymce spellcheck plugin. But I am definitely for adding spellcheck capability (it saves my ass on a daily basis). Rado On Mar 8, 5:51 am, "ma...@mendelu.cz" wrote: > Dear support, > > do you know how to enable spelling for Sage notebooks? > > I use Firefox and it checks input cells automatically, but I do not > know hot to check the text in text cells. > > Thank you > > Robert Marik -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: Newbie – Local Functional Maxim ization
For numerical results you can use find_root. For example: R. = RDF[] f = (sin(5.0*pi*x))^6 find_root(diff((sin(5.0*pi*x))^6,x),.01,.2) gives 0.10001 as output. -Marshall -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
Re: [sage-support] Re: newbie -- defining a multivariate polynomial
On Monday 08 March 2010, John H Palmieri wrote: > sage: R = PolynomialRing(ZZ, names=['a' + str(i) for i in range(5)] + > ['b' + str(i) for i in range(10)]) > sage: R > Multivariate Polynomial Ring in a0, a1, a2, a3, a4, b0, b1, b2, b3, > b4, b5, b6, b7, b8, b9 over Integer Ring > > Then to define the ideal, note that you can get elements like this: > > sage: R('a0') > a0 > sage: R('b' + str(2)) > b2 Almost. He's looking for a boolean polynomial ring, i.e. F_2[x_1, ... , x_n]/ < x_1^2 - x_1, ..., x_n^2 - x_n > for which we have a special implementation (PolyBoRi which the OP tries to call through the native PolyBoRi interface). R = BooleanPolynomialRing(15, ['a' + str(i) for i in range(5)] + ['b' + str(i) for i in range(10)]) should do the trick, see: http://www.sagemath.org/doc/reference/sage/rings/polynomial/pbori.html Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://www.informatik.uni-bremen.de/~malb _jab: martinralbre...@jabber.ccc.de -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
Re: [sage-support] spellchecker for tinymce
On Mar 8, 2010, at 3:51 AM, ma...@mendelu.cz wrote: Dear support, do you know how to enable spelling for Sage notebooks? I use Firefox and it checks input cells automatically, but I do not know hot to check the text in text cells. We don't do any spell checking, have you tried asking on tinymce's lists? - Robert -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: newbie -- defining a multivariate polynomial
On Mar 8, 7:59 am, lesshaste wrote: > I am having problems simply defining a multivariate polynomial. I have > a slightly modified excerpt from a very helpful python script I was > given that looks like > > #!/opt/sage-4.3.3-linux-32bit-ubuntu_9.10-i686-Linux/sage -python > > import sys > from sage.all import * > > from polybori.blocks import declare_ring > from polybori.blocks import HigherOrderBlock > > index1_range=range(2) > index2_range=range(2) > index3_range=range(3) > size=(len(index1_range),len(index2_range),len(index3_range)) > declare_ring([HigherOrderBlock("alpha",size),HigherOrderBlock("beta",size), > HigherOrderBlock("gamma",size)], > globals()) You could do something like this: sage: R = PolynomialRing(ZZ, names=['a' + str(i) for i in range(5)] + ['b' + str(i) for i in range(10)]) sage: R Multivariate Polynomial Ring in a0, a1, a2, a3, a4, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9 over Integer Ring Then to define the ideal, note that you can get elements like this: sage: R('a0') a0 sage: R('b' + str(2)) b2 So it should be easy to define a function which computes the ideal you want. -- John -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: Newbie – Local Functional Maxim ization
The problem is that Sage returns only one valua when solving sin(x)==0 and only one value, when solving cos(x) ==0. This makes only two valuaes for equation like sin(x)*cos(x) == 0 which is similar to your derivative. You will have problems with solving f'(x)==0 if the derivative f'(x) is too complicated. In such a case you can find global min/max numerically. Robert On 8 bře, 17:50, Mike Brown wrote: > Hi Marshall, > > Thank you for replaying. I do realize that this could probably be > done by hand. It is the easiest funcation that I have. But I wanted > to start with this one to get my feet wet. I have much bigger ones > like the Ackley function. > > I am trying to get my head around what sage is producing. There are > an infinate number of optima for f=(sin(5*pi*x))^6. Sage is producing > only two values. I would think that part of solving this using sage > is to limit x to values between 0 and 1. I believe that for > f=(sin(5*pi*x))^6 there are 5 or 6 maximums and 5 or 6 miniums for x > values between 0 and 1. So, what is [x == 0, x == (1/10)]? > > Thanks > Mike > > On Mar 8, 7:50 am, Marshall Hampton wrote: > > > That particular example is almost easier to do by hand, but one way in > > Sage is: > > > f=(sin(5*pi*x))^6 > > solve(diff(f,x)==0,x) > > > which gives > > > [x == 0, x == (1/10)] > > > Of course there are a lot more solutions than those in this case; > > those might have been chosen by taking one branch of the inverse > > sine. > > > -M.Hampton > > > On Mar 7, 2:47 pm, Mike Brown wrote: > > > > Hello, > > > > I want to say that I just learned about Sage. I tried installing it, > > > but I didn’t have enough memory and then I saw that I could run it > > > online. Impressive! What it can do is amazing. > > > > I have been playing around with sage and reading the documentation. I > > > am trying to find the local maximums for some continuous functions for > > > define domain ranges. I tried taking the derivative and finding out > > > where it is 0. That would tell me the local min and maxs. Then I was > > > going to figure out which ones are the local maxs. > > > > Here is one of the equations: f(x) = (sin (5*PI*x))^6, where 0 <= x > > > <=1. I am trying to find out what are the local maximums of that > > > equation. Can someone point me in the right direction? Can sage do > > > that directly? Is there a way to set the domain (ie 0 <= x <=1)? Any > > > help is greatly appreciated. > > > > Thanks > > > Mike Brown- Hide quoted text - > > > - Show quoted text - -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Automatic login to notebook not working with seamonkey 2.0.3
When I last used sage, I started it with sage -notebook, and my web browser got automatically logged into the overview of the notebooks I have created. Recently I have upgraded my web-browser to seamonkey 2.0.3, and now this does not work any more: An empty browser window is opened, but the browser does not access any page on the local server. I can manually access http://localhost:8000/, but there I am asked for a password for "admin", which I do not know. The problem appears both with my old sage Version 3.4, and with the new sage 4.3.3 Any help? -- Professor Dr. Jörg R. Weimar, Ostfalia, Germany -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] How to create variables with multi-indices?
Hi, I'm new to Sage (and Python) and still have some trouble finding my way through the documentation. I would like to create variables with multi-indices (hence indices are n integers (s_1,s_2,...,s_n)) and I would like to do it in such a way that I can access these indices and do some simple operations on them (like increasing the k-th index by one). What is the best way to do this? Or can someone point me to an answer in the documentation? Some more background: I would like to do some symbolic computations with generic multivariate polynomials where the coefficients are unknown. Hence these coefficients should be my variables with multi- indices. Thanks in advance for any help. Best Michael -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: Newbie – Local Functional Maxim ization
Hi Marshall, Thank you for replaying. I do realize that this could probably be done by hand. It is the easiest funcation that I have. But I wanted to start with this one to get my feet wet. I have much bigger ones like the Ackley function. I am trying to get my head around what sage is producing. There are an infinate number of optima for f=(sin(5*pi*x))^6. Sage is producing only two values. I would think that part of solving this using sage is to limit x to values between 0 and 1. I believe that for f=(sin(5*pi*x))^6 there are 5 or 6 maximums and 5 or 6 miniums for x values between 0 and 1. So, what is [x == 0, x == (1/10)]? Thanks Mike On Mar 8, 7:50 am, Marshall Hampton wrote: > That particular example is almost easier to do by hand, but one way in > Sage is: > > f=(sin(5*pi*x))^6 > solve(diff(f,x)==0,x) > > which gives > > [x == 0, x == (1/10)] > > Of course there are a lot more solutions than those in this case; > those might have been chosen by taking one branch of the inverse > sine. > > -M.Hampton > > On Mar 7, 2:47 pm, Mike Brown wrote: > > > > > Hello, > > > I want to say that I just learned about Sage. I tried installing it, > > but I didn’t have enough memory and then I saw that I could run it > > online. Impressive! What it can do is amazing. > > > I have been playing around with sage and reading the documentation. I > > am trying to find the local maximums for some continuous functions for > > define domain ranges. I tried taking the derivative and finding out > > where it is 0. That would tell me the local min and maxs. Then I was > > going to figure out which ones are the local maxs. > > > Here is one of the equations: f(x) = (sin (5*PI*x))^6, where 0 <= x > > <=1. I am trying to find out what are the local maximums of that > > equation. Can someone point me in the right direction? Can sage do > > that directly? Is there a way to set the domain (ie 0 <= x <=1)? Any > > help is greatly appreciated. > > > Thanks > > Mike Brown- Hide quoted text - > > - Show quoted text - -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: newbie -- defining a multivariate polynomial
Sorry I should have said a system of multivariate polynomials. Raphael On Mar 8, 3:59 pm, lesshaste wrote: > I am having problems simply defining a multivariate polynomial. I have > a slightly modified excerpt from a very helpful python script I was > given that looks like > > #!/opt/sage-4.3.3-linux-32bit-ubuntu_9.10-i686-Linux/sage -python > > import sys > from sage.all import * > > from polybori.blocks import declare_ring > from polybori.blocks import HigherOrderBlock > > index1_range=range(2) > index2_range=range(2) > index3_range=range(3) > size=(len(index1_range),len(index2_range),len(index3_range)) > declare_ring([HigherOrderBlock("alpha",size),HigherOrderBlock("beta",size),HigherOrderBlock("gamma",size)], > globals()) > def delta(a,b,c,d,i,j,k): > if b==c and i==a and j==d: > return 1 > else: > return 0 > > ideal=[ sum([alpha(a,b,k)*beta(c,d,k)*gamma(i,j,k) for k in > index3_range]) + delta(a,b,c,d,i,j,k) for a in index1_range\ > for b in index2_range for c in index1_range\ > for d in index2_range for i in index1_range for j in > index2_range ] > > I would like "ideal" to be an ideal so I can do things like > ideal.groebner_basis() . Sorry for the dim question but how do I do > that? > > Raphael -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] newbie -- defining a multivariate polynomial
I am having problems simply defining a multivariate polynomial. I have a slightly modified excerpt from a very helpful python script I was given that looks like #!/opt/sage-4.3.3-linux-32bit-ubuntu_9.10-i686-Linux/sage -python import sys from sage.all import * from polybori.blocks import declare_ring from polybori.blocks import HigherOrderBlock index1_range=range(2) index2_range=range(2) index3_range=range(3) size=(len(index1_range),len(index2_range),len(index3_range)) declare_ring([HigherOrderBlock("alpha",size),HigherOrderBlock("beta",size),HigherOrderBlock("gamma",size)], globals()) def delta(a,b,c,d,i,j,k): if b==c and i==a and j==d: return 1 else: return 0 ideal=[ sum([alpha(a,b,k)*beta(c,d,k)*gamma(i,j,k) for k in index3_range]) + delta(a,b,c,d,i,j,k) for a in index1_range\ for b in index2_range for c in index1_range\ for d in index2_range for i in index1_range for j in index2_range ] I would like "ideal" to be an ideal so I can do things like ideal.groebner_basis() . Sorry for the dim question but how do I do that? Raphael -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: Newbie – Local Functional Maxim ization
That particular example is almost easier to do by hand, but one way in Sage is: f=(sin(5*pi*x))^6 solve(diff(f,x)==0,x) which gives [x == 0, x == (1/10)] Of course there are a lot more solutions than those in this case; those might have been chosen by taking one branch of the inverse sine. -M.Hampton On Mar 7, 2:47 pm, Mike Brown wrote: > Hello, > > I want to say that I just learned about Sage. I tried installing it, > but I didn’t have enough memory and then I saw that I could run it > online. Impressive! What it can do is amazing. > > I have been playing around with sage and reading the documentation. I > am trying to find the local maximums for some continuous functions for > define domain ranges. I tried taking the derivative and finding out > where it is 0. That would tell me the local min and maxs. Then I was > going to figure out which ones are the local maxs. > > Here is one of the equations: f(x) = (sin (5*PI*x))^6, where 0 <= x > <=1. I am trying to find out what are the local maximums of that > equation. Can someone point me in the right direction? Can sage do > that directly? Is there a way to set the domain (ie 0 <= x <=1)? Any > help is greatly appreciated. > > Thanks > Mike Brown -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] complex_plot .png output
SageThe Sage Notebook Searching for Sage server... Version 4.3.1 - complex_plot(lambda z: z, (-3, 3), (-3, 3)) The color ( phase ) plot can be saved on right-clicking as sage0.png But this image is not a 'proper' .PNG file. In fact it is an html file which can not be displayed! Compare with the output of say : list_plot([1,2,3,4,5,6]).show() which can be saved as a proper .PNG file. -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] spellchecker for tinymce
Dear support, do you know how to enable spelling for Sage notebooks? I use Firefox and it checks input cells automatically, but I do not know hot to check the text in text cells. Thank you Robert Marik -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
Re: [sage-support] Re: Sage Live CD (Alternativ based on Puppy Linux)
Some other notices: I saved the Puppy files to HD D: A copy to a USB -stick renamed the files on D: because sometimes something goes wrong with shutting down and then starting Puppy from USB has changed (e.g. nearly all desktopitems have vanished) So saving sage worksheets and in case of emergency I have good Puppy files on D: copy again to USB and the damage is resolved. (Clear enough described?) Greets Peter 2010/2/25 Peter K.H. Gragert > Oh, wireless would be much more convenient ;-) so I will look at the > given link and will watch, if there will be > a try to make it directly (ISO) ok .. > > 2010/2/24 emil > > >> On Feb 24, 12:40 pm, "Peter K.H. Gragert" >> wrote: >> > By the way, via a ethernet-kabel I succeeded to acces the internet ;-). >> > Peter >> > >> > 2010/2/21 emil >> > >> > >> > >> > > > > 5- The screen was dim and I couldn't figure out how to make it >> > > brighter. >> > >> > > > This can also be done in the Menu>Setup>Xorg Video Wizard>Gamma >> > > > Calibration >> > >> > > Hi Berkin, >> > >> > > I have to correct my answer, obviously the Gamma calibration is not >> > > working as expected. I will try to fix this but can't promise. >> > > There is a possible fix with the programm xgamma (I tried it, worked >> > > for me) >> > >> > >http://www.murga-linux.com/puppy/viewtopic.php?t=29447 >> > > cheers, >> > > emil >> > >> > > -- >> > > To post to this group, send email to sage-support@googlegroups.com >> > > To unsubscribe from this group, send email to >> > > sage-support+unsubscr...@googlegroups.com >> >> > >> > > For more options, visit this group at >> > >http://groups.google.com/group/sage-support >> > > URL:http://www.sagemath.org >> >> Hi peter, >> Sorry for the hazzle, if you have nerves left for tinkering: >> Howto wifi from commandline >> http://www.murga-linux.com/puppy/viewtopic.php?t=22469 >> >> Any problems else, I might release a bugfix version until end of next >> week, so please let me know. >> emil >> >> -- >> To post to this group, send email to sage-support@googlegroups.com >> To unsubscribe from this group, send email to >> sage-support+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/sage-support >> URL: http://www.sagemath.org >> > > -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: How to find a simple solution in ODE
In Sage 4.3.3 and later (2*sol).log_simplify().solve(y) gives [y(t) == -(e^(2*c + 2*t) + 1)/(e^(2*c + 2*t) - 1)] You may want to rename constant: C=var('C') SOL=(2*sol).log_simplify().solve(y)[0] SOL.subs(c=1/2*ln(C)).simplify_full() y(t) == -(C*e^(2*t) + 1)/(C*e^(2*t) - 1) Robert M. On 8 bře, 07:53, fromken wrote: > Hi there, > > I've got a problem with expressing a solution of ODE as follow. > > t = var('t') > y = function('y', t) > eqn = diff(y, t) - y^2 +1 > sol = desolve(eqn, dvar = y, ivar = t, contrib_ode=True) > sol.show() > > The above expression resulted in 1/2*log(y(t)-1) - 1/2*log(y(t)+1) = c > + t. > However, I want more simpler form of the solution like y(t) = (exp(2*t > +2) + 1) / (1-exp(2*t+2)). > How can I get the solution? > Thanks in advance. -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org