[sage-support] Strange behaviour for two similar functions
Hi, How to explain the difference between these two similar functions ? Thansk. = Test 1 F = [1,2,3] def test1(F): F[0] = 0 F[1] = 0 F[2] = 0 print F test1(F); F [0, 0, 0] [0, 0, 0] === Test 2 === F = [1,2,3] def test2(F): F = [0,0,0] test2(F); F [0, 0, 0] [1, 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 http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-support] Strange behaviour for two similar functions
I think you need to read a python intro to see the difference between mutable / immutable lists and similar. This is a python question, not really a Sage question. John Cremona On 7 June 2013 09:24, B. Zhang yangtz...@gmail.com wrote: Hi, How to explain the difference between these two similar functions ? Thansk. = Test 1 F = [1,2,3] def test1(F): F[0] = 0 F[1] = 0 F[2] = 0 print F test1(F); F [0, 0, 0] [0, 0, 0] === Test 2 === F = [1,2,3] def test2(F): F = [0,0,0] test2(F); F [0, 0, 0] [1, 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 http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- 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 http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-support] Strange behaviour for two similar functions
+1 2013/6/7 John Cremona john.crem...@gmail.com I think you need to read a python intro to see the difference between mutable / immutable lists and similar. This is a python question, not really a Sage question. John Cremona On 7 June 2013 09:24, B. Zhang yangtz...@gmail.com wrote: Hi, How to explain the difference between these two similar functions ? Thansk. = Test 1 F = [1,2,3] def test1(F): F[0] = 0 F[1] = 0 F[2] = 0 print F test1(F); F [0, 0, 0] [0, 0, 0] === Test 2 === F = [1,2,3] def test2(F): F = [0,0,0] test2(F); F [0, 0, 0] [1, 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 http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- 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 http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- 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 http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] Re: Strange behaviour for two similar functions
OK. Thanks. On Friday, June 7, 2013 10:24:25 AM UTC+2, B. Zhang wrote: Hi, How to explain the difference between these two similar functions ? Thansk. = Test 1 F = [1,2,3] def test1(F): F[0] = 0 F[1] = 0 F[2] = 0 print F test1(F); F [0, 0, 0] [0, 0, 0] === Test 2 === F = [1,2,3] def test2(F): F = [0,0,0] test2(F); F [0, 0, 0] [1, 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 http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] multiple instances of sage -notebook
Short version of my question: What is supposed to happen when different users simultaneously invoke ./sage -notebook for the same installation of Sage? Long version: I have a small research group this summer, consisting of myself and two undergraduate students. We don't need to engage in full-on development of Sage (yet?) but we would like to use some packages which aren't included in the standard build of Sage. Our campus is primarily a Windows campus, but I have scrounged accounts for us on a research cluster running CentOS. This is not my system, and in particular I'm pretty sure I can't turn it into a full-fledged notebook server. I installed Sage in my personal directory, and set the permissions so that the two other members of my research group can also run my copy of Sage. I ran ./sage -notebook , and created an admin account and a personal account on that version of the notebook. Meanwhile, one of my students logged in, also ran ./sage -notebook , and was prompted to create his own admin account. He did so, but although he was able to see the notebook, the admin password didn't work. He tried resetting the admin password, but still was not able to log in. I was able to load his version of the notebook and test my own admin password, which also didn't work. This all leads to two questions, at different levels of complexity: 1) Any idea what is going wrong with my student's admin password? What trouble-shooting steps should we try? 2) Is there a way to ensure that every invocation of ./sage -notebook yields the *same* notebook server, so that we could just create one admin account and three user accounts? Or would that only work if I left my version of the notebook running? (This seems as if it could create a security breach, but maybe I am fretting unnecessarily, or there are extra layers of security we could apply.) UAW -- 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 http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-support] multiple instances of sage -notebook
On Fri, Jun 7, 2013 at 9:48 AM, Ursula Whitcher whitc...@uwec.edu wrote: Short version of my question: What is supposed to happen when different users simultaneously invoke ./sage -notebook for the same installation of Sage? Long version: I have a small research group this summer, consisting of myself and two undergraduate students. We don't need to engage in full-on development of Sage (yet?) but we would like to use some packages which aren't included in the standard build of Sage. Our campus is primarily a Windows campus, but I have scrounged accounts for us on a research cluster running CentOS. This is not my system, and in particular I'm pretty sure I can't turn it into a full-fledged notebook server. I installed Sage in my personal directory, and set the permissions so that the two other members of my research group can also run my copy of Sage. I ran ./sage -notebook , and created an admin account and a personal account on that version of the notebook. Meanwhile, one of my students logged in, also ran ./sage -notebook , and was prompted to create his own admin account. He did so, but although he was able to see the notebook, the admin password didn't work. He tried resetting the admin password, but still was not able to log in. I was able to load his version of the notebook and test my own admin password, which also didn't work. This all leads to two questions, at different levels of complexity: 1) Any idea what is going wrong with my student's admin password? What trouble-shooting steps should we try? 2) Is there a way to ensure that every invocation of ./sage -notebook yields the *same* notebook server, so that we could just create one admin account and three user accounts? No. Or would that only work if I left my version of the notebook running? Yes. (This seems as if it could create a security breach, but maybe I am fretting unnecessarily, or there are extra layers of security we could apply.) Yes, it would. By the way, I'm curious what features are missing from https://cloud.sagemath.com that you might need for it to work for your project? For example, what extra packages would you need, documentation, etc.? Too many bugs (if so, which ones, so I can fix them)? Is the network connection too slow? Not enough disk space? Compute servers are too slow? Last night I rolled out a feature so multiple people can collaborate on worksheets, files, terminals, etc. in the same project (=a Linux account on a VM) simultaneously, which could be useful for collaborative projects. Also, you can download and install your own copy of Sage into a project on cloud.sagemath, and even switch to using that copy of Sage for worksheets. William UAW -- 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 http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- William Stein Professor of Mathematics University of Washington 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 http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-support] multiple instances of sage -notebook
On 7 June 2013 18:18, William Stein wst...@gmail.com wrote: On Fri, Jun 7, 2013 at 9:48 AM, Ursula Whitcher whitc...@uwec.edu wrote: Short version of my question: What is supposed to happen when different users simultaneously invoke ./sage -notebook for the same installation of Sage? Long version: I have a small research group this summer, consisting of myself and two undergraduate students. We don't need to engage in full-on development of Sage (yet?) but we would like to use some packages which aren't included in the standard build of Sage. Our campus is primarily a Windows campus, but I have scrounged accounts for us on a research cluster running CentOS. This is not my system, and in particular I'm pretty sure I can't turn it into a full-fledged notebook server. I installed Sage in my personal directory, and set the permissions so that the two other members of my research group can also run my copy of Sage. I ran ./sage -notebook , and created an admin account and a personal account on that version of the notebook. Meanwhile, one of my students logged in, also ran ./sage -notebook , and was prompted to create his own admin account. He did so, but although he was able to see the notebook, the admin password didn't work. He tried resetting the admin password, but still was not able to log in. I was able to load his version of the notebook and test my own admin password, which also didn't work. This all leads to two questions, at different levels of complexity: 1) Any idea what is going wrong with my student's admin password? What trouble-shooting steps should we try? 2) Is there a way to ensure that every invocation of ./sage -notebook yields the *same* notebook server, so that we could just create one admin account and three user accounts? No. Or would that only work if I left my version of the notebook running? Yes. (This seems as if it could create a security breach, but maybe I am fretting unnecessarily, or there are extra layers of security we could apply.) Yes, it would. By the way, I'm curious what features are missing from https://cloud.sagemath.com that you might need for it to work for your project? For example, what extra packages would you need, documentation, etc.? Too many bugs (if so, which ones, so I can fix them)? Is the network connection too slow? Not enough disk space? Compute servers are too slow? Last night I rolled out a feature so multiple people can collaborate on worksheets, files, terminals, etc. in the same project (=a Linux account on a VM) simultaneously, which could be useful for collaborative projects. Is there some documentation for SMC? I created an account and a project but have no idea what to do in or with it! John Also, you can download and install your own copy of Sage into a project on cloud.sagemath, and even switch to using that copy of Sage for worksheets. William UAW -- 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 http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- William Stein Professor of Mathematics University of Washington 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 http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- 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 http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] Can Sage do high-precision polynomial integration?
you can also use Pari/GP and mpmath from Sage. See pages 312-314 of http://sagebook.gforge.inria.fr/. Paul Zimmermann -- 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 http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.